/* ─────────────────────────────────────────────────────────────────────────────
   Alpaca Tools — shared design tokens, header/nav primitives, toast styles.

   Loaded after the page's inline <style> block, so inline rules still win on
   pages that haven't been migrated yet. Keep selectors here aligned with the
   existing in-template rules to allow incremental dedup.
   ─────────────────────────────────────────────────────────────────────────
 
  Author: Sergey Zasukha <sergeyzasukha@gmail.com>
 */

:root {
  --bg: #F2F4F7;   --panel: #FFFFFF;  --surface: #F8F9FB;  --surface2: #EEF0F5;
  --border: #E1E4EC; --border2: #CBD1DE;
  --text: #0D1117; --muted: #7A8499; --muted2: #4D5668;
  --blue: #0052FF; --blue-dim: #EBF1FF; --blue-glow: rgba(0,82,255,.15);
  --green: #00A878; --green-dim: #E6F7F3;
  --amber: #E8890A; --amber-dim: #FEF3E2;
  --red: #E03737; --red-dim: #FDECEC;
  --purple: #6E3FF3; --purple-dim: #F0EAFE;
  --teal: #0891B2; --teal-dim: #E0F7FA;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --radius: 8px;
  --trans: 160ms cubic-bezier(.4,0,.2,1);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --explorer-w: 320px;
}

:root[data-theme="dark"] {
  --bg: #070d18; --panel: #0c1424; --surface: #101d31; --surface2: #162038;
  --border: #1c2e48; --border2: #243a5e;
  --text: #dde6f0; --muted: #5b7a9a; --muted2: #8aa4be;
  --blue: #4890f5; --blue-dim: #0e2240; --blue-glow: rgba(72,144,245,.3);
  --green: #34d399; --green-dim: #062419;
  --amber: #fbbf24; --amber-dim: #251800;
  --red: #f87171; --red-dim: #220b0b;
  --purple: #a78bfa; --purple-dim: #170f38;
  --teal: #2dd4bf; --teal-dim: #052926;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,.5);
}

html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 13px;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ---------------- Header ---------------- */
header {
  flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  padding: 0 16px; height: 52px;
  background: var(--panel); border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100;
}

.logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo-icon {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 2px 8px var(--blue-glow);
}
.logo-icon svg { color: #fff; width: 18px; height: 18px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; gap: 1px; }
.logo-name { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -.2px; }
.logo-name span { color: var(--muted); font-weight: 400; }
.logo-edition {
  font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  padding: 1px 0 0; line-height: 1;
}

/* ---------------- Global Layout (Sidebar & Main Content) ---------------- */
.app-layout {
  display: flex; min-height: calc(100vh - 52px); /* Adjust for header height */
}

.sidebar {
  flex-shrink: 0; width: 240px; /* Fixed width for sidebar */
  padding: 16px 0;
  background: var(--panel); border-right: 1px solid var(--border);
  position: sticky; top: 52px; /* Stick below the header */
  height: calc(100vh - 52px);
  display: flex; flex-direction: column;
}

.sidebar-header {
  padding: 0 16px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  margin: 0;
}

.sidebar-menu {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
}

.menu-item {
  border-radius: 4px; transition: background var(--trans);
}

.menu-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; text-decoration: none;
  color: var(--text); font-size: 14px; font-weight: 500;
}

.menu-link:hover {
  background: var(--blue-dim);
}

.menu-link.active {
  background: var(--blue-dim);
  color: var(--blue);
  font-weight: 600;
}

/* ---------------- Main Content Area ---------------- */
.content-area {
  flex-grow: 1; padding: 24px; overflow-y: auto;
}

/* ---------------- Utility Components (Toast/Diff) ---------------- */
/* (Existing code for Toasts and Diff Viewer maintained here) */

/* Toast styles moved to soft-notus.css in R11.16 — window.alpacaToast is exposed
   there, on all 172 templates, and the styles must travel with it. */

/* ── Inline diff viewer (used by AI-fix flows) ───────────────────────────── */
.alpaca-diff {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  overflow: auto; max-height: 360px; white-space: pre;
}
.alpaca-diff .diff-line  { padding: 0 12px; }
.alpaca-diff .diff-add    { background: rgba(0,168,120,.10); color: var(--green); }
.alpaca-diff .diff-del    { background: rgba(224,55,55,.10); color: var(--red); text-decoration: line-through; text-decoration-color: rgba(224,55,55,.5); }
.alpaca-diff .diff-hunk   { color: var(--muted); font-style: italic; background: var(--surface); }

/* ---------------- Layout & Components --------------------- */

/* General flex containers for content areas */
.flex-row {
  display: flex; gap: 20px; align-items: flex-start;
}

.card {
  background: var(--panel); padding: 20px; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}

/* ---------------- Mobile Responsiveness (Optimized for the new layout) --*/
@media (max-width: 1200px) {
  .sidebar {
    width: 200px;
    padding: 16px 0;
  }
  .sidebar-menu {
    flex-direction: row; flex-wrap: wrap; gap: 8px;
  }
  .menu-item {
    flex-shrink: 0;
  }
  .menu-link {
    padding: 8px 12px; font-size: 13px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none; /* Hide sidebar on mobile, rely on header navigation/menu toggle */
  }
  .logo-name { font-size: 12px; }
  .logo-edition { font-size: 7.5px; letter-spacing: .12em; }
  .content-area {
    padding: 16px;
  }
}

/* build 9f343ce2 */
