/* ============================================================================
   FreelanceOS — Design System
   The visual spine. Dark foundation, gold/amber + teal, glassmorphism.
   No external dependencies. Everything here.
   ============================================================================ */

/* ----- Tokens ----- */
:root {
  /* Foundations — deep, cool near-black */
  --bg-0: #07070e;          /* near-black, faint blue */
  --bg-1: #0b0c16;          /* panel base */
  --bg-2: #11121f;          /* raised surface */
  --bg-3: #191a2b;          /* hover / input */
  --rail-bg: #08080f;

  /* Glass — frosted DARK translucent "windows" (the aurora glows through) */
  --glass-bg: rgba(18, 19, 34, 0.50);
  --glass-bg-strong: rgba(24, 25, 44, 0.66);
  --glass-border: rgba(255, 255, 255, 0.085);
  --glass-border-strong: rgba(255, 255, 255, 0.18);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --blur: 22px;

  /* Accent — premium periwinkle→violet primary, teal + magenta counter-accents */
  --accent: #8b7bff;
  --accent-2: #b48cff;
  --accent-3: #6ea8ff;      /* blue (logo) */
  --accent-soft: rgba(139, 123, 255, 0.16);
  --accent-line: rgba(139, 123, 255, 0.42);
  --magenta: #d96cf0;
  --teal: #2DD4BF;
  --teal-soft: rgba(45, 212, 191, 0.12);
  --teal-line: rgba(45, 212, 191, 0.35);

  /* gold-* aliases kept for backward-compat — now mapped to the new accent */
  --gold: var(--accent);
  --gold-2: var(--accent-2);
  --gold-soft: var(--accent-soft);
  --gold-line: var(--accent-line);

  /* Semantic */
  --danger: #F87171;
  --danger-soft: rgba(248, 113, 113, 0.13);
  --success: #34D399;
  --success-soft: rgba(52, 211, 153, 0.13);
  --warn: #FBBF24;
  --warn-soft: rgba(251, 191, 36, 0.13);
  --info: #60A5FA;
  --info-soft: rgba(96, 165, 250, 0.13);

  /* Text — cool whites */
  --text-0: #eef0f8;        /* primary */
  --text-1: #aab1c6;        /* secondary */
  --text-2: #717892;        /* muted */
  --text-3: #474d61;        /* faint */

  /* Type — premium, airy display */
  --font-ui: 'Segoe UI Variable Text', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, system-ui, sans-serif;
  --font-display: 'Segoe UI Variable Display', 'Sora', 'Geist', 'Gill Sans', 'Segoe UI', var(--font-ui);
  --font-mono: 'Geist Mono', 'JetBrains Mono', 'SFMono-Regular', 'Cascadia Code', Consolas, 'Liberation Mono', monospace;

  /* Geometry — generously rounded */
  --r-sm: 11px;
  --r-md: 15px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Spacing scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px;
  --s-9: 56px; --s-10: 72px;

  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.40);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.58);
  --glow-gold: 0 0 0 1px var(--accent-line), 0 10px 38px rgba(139, 123, 255, 0.30);
  --glow-teal: 0 0 0 1px var(--teal-line), 0 8px 30px rgba(45, 212, 191, 0.18);

  --rail-w: 250px;
  --ticker-h: 38px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 240ms;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.01em;
  position: relative;
}
/* Aurora mesh — colourful, soft, biased to the left; deep dark on the right for readability */
body::before {
  content: ''; position: fixed; inset: -25%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(46% 56% at 6% 32%, rgba(139, 92, 246, 0.42), transparent 60%),
    radial-gradient(44% 54% at 16% 72%, rgba(56, 110, 246, 0.34), transparent 62%),
    radial-gradient(40% 50% at 2% 86%, rgba(217, 70, 239, 0.32), transparent 60%),
    radial-gradient(38% 46% at 22% 52%, rgba(20, 184, 166, 0.26), transparent 60%),
    radial-gradient(50% 60% at 30% 12%, rgba(99, 102, 241, 0.22), transparent 64%);
  filter: blur(46px) saturate(1.18);
}
/* darken the right two-thirds so content windows stay legible */
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(102deg, transparent 0%, transparent 26%, rgba(7, 7, 14, 0.55) 58%, var(--bg-0) 84%),
    radial-gradient(120% 90% at 100% 100%, rgba(7,7,14,0.6), transparent 55%);
}
@keyframes aurora-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(3%, -2%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 3%, 0) scale(1.04); }
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.005em; line-height: 1.16; margin: 0; }
a { color: var(--accent-3); text-decoration: none; }
button { font-family: inherit; }
::selection { background: var(--gold-soft); color: #fff; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.14) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.20); background-clip: content-box; }

/* Accessibility: visible focus */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--gold); color: #1a1300; padding: 10px 16px; border-radius: 8px; font-weight: 700; transition: top var(--speed); }
.skip-link:focus { top: 12px; }

/* ============================================================================
   APP SHELL
   ============================================================================ */
#app { min-height: 100%; display: flex; flex-direction: column; }

/* Ticker tape — Bloomberg-style live metrics */
.ticker {
  height: var(--ticker-h);
  display: flex; align-items: center;
  border-bottom: 1px solid var(--glass-border);
  background: linear-gradient(180deg, rgba(8,8,15,0.78), rgba(8,8,15,0.62));
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  position: sticky; top: 0; z-index: 60; overflow: hidden;
  font-family: var(--font-mono); font-size: 12.5px;
}
.ticker-label {
  flex: 0 0 auto; padding: 0 14px; height: 100%; position: relative; z-index: 2;
  display: flex; align-items: center; gap: 7px;
  font-weight: 700; letter-spacing: 0.14em; font-size: 11px; color: var(--gold);
  border-right: 1px solid var(--glass-border);
  background: linear-gradient(180deg, #0b0c11, #0a0b0f);
  text-transform: uppercase;
}
.ticker-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); animation: pulse 2s infinite; }
.ticker-track { display: flex; align-items: center; white-space: nowrap; animation: ticker-scroll 46s linear infinite; will-change: transform; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; color: var(--text-1); }
.ticker-item b { color: var(--text-0); font-weight: 650; }
.ticker-item .up { color: var(--success); }
.ticker-item .down { color: var(--danger); }
.ticker-sep { color: var(--text-3); }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.shell { flex: 1; display: grid; grid-template-columns: var(--rail-w) 1fr; min-height: 0; }

/* Left rail */
.rail {
  background: linear-gradient(180deg, rgba(10, 10, 19, 0.55), rgba(7, 7, 14, 0.66));
  border-right: 1px solid var(--glass-border);
  backdrop-filter: blur(26px) saturate(1.25); -webkit-backdrop-filter: blur(26px) saturate(1.25);
  display: flex; flex-direction: column;
  position: sticky; top: var(--ticker-h);
  height: calc(100vh - var(--ticker-h));
  overflow-y: auto; z-index: 50;
}
.brand { padding: 20px 18px 14px; display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px; flex: 0 0 auto;
  background: linear-gradient(140deg, var(--accent-3), var(--accent) 55%, var(--accent-2));
  display: grid; place-items: center; color: #fff; font-weight: 800;
  font-family: var(--font-display); box-shadow: 0 8px 24px rgba(110,168,255,0.4), var(--glass-inner); font-size: 19px;
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.06em; text-transform: uppercase; }
.brand-name span { color: var(--gold); }
.brand-sub { font-size: 10.5px; color: var(--text-2); letter-spacing: 0.16em; text-transform: uppercase; }

.rail-search {
  margin: 4px 14px 10px; padding: 9px 12px; display: flex; align-items: center; gap: 9px;
  background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--r-md);
  color: var(--text-2); cursor: pointer; font-size: 13px; transition: all var(--speed) var(--ease);
}
.rail-search:hover { border-color: var(--glass-border-strong); color: var(--text-1); }
.rail-search kbd {
  margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-1);
  background: var(--bg-3); border: 1px solid var(--glass-border); border-radius: 6px; padding: 2px 6px;
}

.rail-group { padding: 6px 10px; }
.rail-group-label { padding: 10px 10px 6px; font-size: 10.5px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 11px; border-radius: var(--r-md); border: 1px solid transparent;
  background: none; color: var(--text-1); cursor: pointer; text-align: left;
  font-size: 13.5px; font-weight: 500; transition: all 160ms var(--ease); position: relative;
}
.nav-item:hover { background: var(--glass-bg); color: var(--text-0); }
.nav-item .nav-ico { width: 20px; height: 20px; flex: 0 0 auto; display: grid; place-items: center; color: var(--text-2); transition: color 160ms; }
.nav-item.active { background: var(--gold-soft); color: #fff; border-color: var(--gold-line); }
.nav-item.active .nav-ico { color: var(--gold); }
.nav-item.active::before { content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%); width: 3px; height: 18px; background: var(--gold); border-radius: 0 3px 3px 0; box-shadow: 0 0 10px var(--gold); }
.nav-badge { margin-left: auto; font-size: 10.5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--bg-3); color: var(--text-1); display: grid; place-items: center; font-family: var(--font-mono); }
.nav-item.active .nav-badge { background: var(--gold); color: #1a1200; font-weight: 700; }

.rail-foot { margin-top: auto; padding: 12px 14px; border-top: 1px solid var(--glass-border); display: flex; flex-direction: column; gap: 8px; }
.runway-chip {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--glass-bg); border: 1px solid var(--glass-border); cursor: pointer; transition: all var(--speed) var(--ease);
}
.runway-chip:hover { border-color: var(--glass-border-strong); }
.runway-chip .rc-ring { flex: 0 0 auto; }
.runway-chip .rc-meta { display: flex; flex-direction: column; line-height: 1.25; }
.runway-chip .rc-val { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.runway-chip .rc-lbl { font-size: 10.5px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.1em; }

/* Main view */
.view { min-width: 0; padding: 26px clamp(18px, 3vw, 38px) 64px; overflow-x: hidden; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.view-title { font-size: clamp(23px, 2.7vw, 32px); font-weight: 600; letter-spacing: 0.015em; }
.view-kicker { font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; margin-bottom: 8px; }
.view-sub { color: var(--text-1); margin-top: 6px; max-width: 62ch; }
.view-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================================
   PRIMITIVES
   ============================================================================ */
.panel {
  background: linear-gradient(165deg, var(--glass-bg-strong), var(--glass-bg));
  border: 1px solid var(--glass-border); border-radius: var(--r-lg);
  box-shadow: var(--glass-inner), var(--shadow-md); position: relative;
  backdrop-filter: blur(var(--blur)) saturate(1.3); -webkit-backdrop-filter: blur(var(--blur)) saturate(1.3);
}
.panel::after { /* subtle top highlight edge for the glass feel */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,0.06), transparent 32%);
}
.panel > * { position: relative; }
.panel-pad { padding: var(--s-5); }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--glass-border); }
.panel-head h3 { font-size: 15px; }
.panel-head .ph-ico { color: var(--gold); display: grid; place-items: center; }
.panel-head .ph-actions { margin-left: auto; display: flex; gap: 8px; }
.panel-body { padding: 18px; }
.panel-title-sm { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-2); font-weight: 700; }

/* cards use a more opaque dark glass (no per-card backdrop blur — keeps it fast
   even with many cards; the parent panel already frosts the background) */
.card {
  background: rgba(21, 22, 41, 0.66); border: 1px solid var(--glass-border); border-radius: var(--r-md);
  padding: var(--s-4); transition: transform var(--speed) var(--ease), border-color var(--speed), box-shadow var(--speed), background var(--speed);
}
.card.hoverable:hover { transform: translateY(-3px); border-color: var(--glass-border-strong); box-shadow: var(--shadow-md); background: rgba(28, 29, 52, 0.72); }

.grid { display: grid; gap: var(--s-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.row { display: flex; gap: var(--s-3); align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-5 { gap: var(--s-5); }
.mt-2 { margin-top: var(--s-2);} .mt-3 { margin-top: var(--s-3);} .mt-4 { margin-top: var(--s-4);} .mt-5{margin-top:var(--s-5);}
.muted { color: var(--text-2); } .dim { color: var(--text-1); }
.tnum { font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.center { text-align: center; }

/* Stat tiles */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat-value { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.02em; line-height: 1; }
.stat-value.teal { color: var(--teal); }
.stat-value.gold { color: var(--gold); }
.stat-foot { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.delta { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 99px; }
.delta.up { color: var(--success); background: var(--success-soft); }
.delta.down { color: var(--danger); background: var(--danger-soft); }
.delta.flat { color: var(--text-1); background: var(--glass-bg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--r-md); border: 1px solid var(--glass-border);
  background: var(--glass-bg); color: var(--text-0); font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all 160ms var(--ease); white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--glass-bg-strong); border-color: var(--glass-border-strong); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(135deg, var(--accent-3), var(--accent), var(--accent-2)); color: #fff; border-color: transparent; box-shadow: 0 8px 26px rgba(139,123,255,0.34); font-weight: 650; }
.btn-primary:hover { box-shadow: var(--glow-gold); filter: brightness(1.08); }
.btn-teal { background: linear-gradient(135deg, var(--teal), #22b8a4); color: #002a25; border-color: transparent; }
.btn-ghost { background: none; }
.btn-danger { color: var(--danger); border-color: var(--danger-soft); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-icon { padding: 8px; width: 36px; height: 36px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

/* Pills / chips / tags */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-1); }
.pill.gold { background: var(--gold-soft); color: var(--gold); border-color: var(--gold-line); }
.pill.teal { background: var(--teal-soft); color: var(--teal); border-color: var(--teal-line); }
.pill.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.pill.success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-1); display: flex; align-items: center; gap: 6px; }
.field-hint { font-size: 11.5px; color: var(--text-2); }
.field-row { display: flex; gap: 12px; }
.field-row > .field { flex: 1; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--bg-1); border: 1px solid var(--glass-border); color: var(--text-0);
  font-family: inherit; font-size: 14px; transition: border-color var(--speed), box-shadow var(--speed), background var(--speed);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--gold-soft); background: var(--bg-2); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23727B8E' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; cursor: pointer; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; background: var(--bg-3); border: 1px solid var(--glass-border); color: var(--text-2); font-size: 13px; font-family: var(--font-mono); }
.input-group .addon:first-child { border-right: 0; border-radius: var(--r-md) 0 0 var(--r-md); }
.input-group .addon:last-child { border-left: 0; border-radius: 0 var(--r-md) var(--r-md) 0; }
.input-group input { border-radius: 0; }
.input-group > :first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.input-group > :last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
label.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 8px 0; }
label.check input[type=checkbox], label.check input[type=radio] { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--gold); margin-top: 1px; cursor: pointer; }

/* Range slider */
input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; padding: 0; background: var(--bg-3); border-radius: 99px; border: none; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: none; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); cursor: grab; }

/* Segmented control */
.seg { display: inline-flex; padding: 4px; background: var(--bg-1); border: 1px solid var(--glass-border); border-radius: var(--r-md); gap: 2px; flex-wrap: wrap; }
.seg button { padding: 7px 14px; border-radius: var(--r-sm); border: none; background: none; color: var(--text-1); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 160ms var(--ease); }
.seg button:hover { color: var(--text-0); }
.seg button.active { background: var(--gold-soft); color: var(--gold); box-shadow: var(--glass-inner); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--glass-border); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 11px 16px; border: none; background: none; color: var(--text-2); font-size: 13.5px; font-weight: 600; cursor: pointer; position: relative; white-space: nowrap; transition: color 160ms; }
.tab:hover { color: var(--text-0); }
.tab.active { color: var(--gold); }
.tab.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--gold); border-radius: 2px 2px 0 0; box-shadow: 0 0 8px var(--gold); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--glass-border); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid rgba(255,255,255,0.045); color: var(--text-1); }
.table tbody tr { transition: background 120ms; }
.table tbody tr:hover { background: var(--glass-bg); }
.table tbody tr:last-child td { border-bottom: none; }
.table td .strong, .table .strong { color: var(--text-0); font-weight: 600; }

/* Empty states */
.empty { text-align: center; padding: 46px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-2); margin-bottom: 4px; }
.empty h4 { font-size: 16px; color: var(--text-0); }
.empty p { color: var(--text-2); max-width: 42ch; margin: 0; }

/* Progress */
.bar { height: 8px; border-radius: 99px; background: var(--bg-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width 600ms var(--ease); }
.bar.teal > span { background: linear-gradient(90deg, var(--teal), #22b8a4); }
.bar.danger > span { background: linear-gradient(90deg, var(--danger), #ef4444); }

/* Meter / score gauge bits used across modules */
.score-big { font-family: var(--font-display); font-weight: 800; font-size: 52px; line-height: 1; letter-spacing: -0.03em; }

/* Toasts */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border-radius: var(--r-md); background: rgba(20,23,32,0.92); border: 1px solid var(--glass-border-strong); box-shadow: var(--shadow-lg); backdrop-filter: blur(16px); animation: toast-in 360ms var(--ease); }
.toast.out { animation: toast-out 280ms var(--ease) forwards; }
.toast .t-ico { flex: 0 0 auto; margin-top: 1px; }
.toast.success .t-ico { color: var(--success); } .toast.error .t-ico { color: var(--danger); }
.toast.info .t-ico { color: var(--teal); } .toast.warn .t-ico { color: var(--warn); }
.toast .t-body { font-size: 13.5px; color: var(--text-0); } .toast .t-body small { display: block; color: var(--text-2); font-size: 12px; margin-top: 2px; }
@keyframes toast-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateX(30px); opacity: 0; } }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 250; background: rgba(5,6,9,0.66); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade-in 200ms; }
.modal { width: min(620px, 100%); max-height: 88vh; overflow: auto; background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); border: 1px solid var(--glass-border-strong); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); animation: modal-in 320ms var(--ease); }
.modal.wide { width: min(900px, 100%); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--glass-border); position: sticky; top: 0; background: var(--bg-2); z-index: 1; }
.modal-head h3 { font-size: 17px; }
.modal-head .x { margin-left: auto; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--glass-border); display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; background: var(--bg-2); }
@keyframes modal-in { from { transform: translateY(16px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================================
   COMMAND PALETTE — signature element
   ============================================================================ */
.palette-backdrop { position: fixed; inset: 0; z-index: 400; background: rgba(5,6,9,0.6); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; animation: fade-in 160ms; }
.palette { width: min(660px, 92vw); background: linear-gradient(180deg, rgba(22,26,38,0.98), rgba(13,17,23,0.98)); border: 1px solid var(--glass-border-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-lg), var(--glow-gold); overflow: hidden; animation: modal-in 240ms var(--ease); }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--glass-border); }
.palette-input svg { color: var(--gold); flex: 0 0 auto; }
.palette-input input { border: none; background: none; padding: 0; font-size: 17px; box-shadow: none; }
.palette-input input:focus { box-shadow: none; }
.palette-input .pk { font-family: var(--font-mono); font-size: 11px; color: var(--text-2); border: 1px solid var(--glass-border); border-radius: 6px; padding: 3px 7px; }
.palette-results { max-height: 52vh; overflow-y: auto; padding: 8px; }
.palette-group-label { padding: 10px 12px 6px; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.palette-item { display: flex; align-items: center; gap: 13px; padding: 11px 13px; border-radius: var(--r-md); cursor: pointer; color: var(--text-1); }
.palette-item .pi-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--gold); flex: 0 0 auto; }
.palette-item .pi-body { min-width: 0; } .palette-item .pi-title { color: var(--text-0); font-weight: 600; font-size: 14px; }
.palette-item .pi-sub { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-item .pi-meta { margin-left: auto; font-size: 11px; color: var(--text-3); font-family: var(--font-mono); white-space: nowrap; }
.palette-item.active, .palette-item:hover { background: var(--gold-soft); color: #fff; }
.palette-item.active .pi-ico { background: var(--gold); color: #1a1200; }
.palette-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--glass-border); font-size: 11.5px; color: var(--text-3); }
.palette-foot kbd { font-family: var(--font-mono); background: var(--bg-3); border: 1px solid var(--glass-border); border-radius: 4px; padding: 1px 5px; color: var(--text-2); }
.palette-empty { padding: 30px; text-align: center; color: var(--text-2); }
.palette-quickcalc { padding: 14px 18px; border-top: 1px solid var(--glass-border); background: var(--teal-soft); }
.palette-quickcalc .qc-val { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--teal); }

/* ============================================================================
   COMMAND CENTER — weather + hero
   ============================================================================ */
.hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 34px 36px; margin-bottom: 22px; border: 1px solid var(--glass-border); background: linear-gradient(140deg, rgba(26,27,50,0.60), rgba(11,12,22,0.46)); backdrop-filter: blur(var(--blur)) saturate(1.3); -webkit-backdrop-filter: blur(var(--blur)) saturate(1.3); box-shadow: var(--shadow-md), var(--glass-inner); }
.hero-sky { position: absolute; inset: 0; z-index: 0; opacity: 0.9; pointer-events: none; }
.hero-content { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.hero-greet { font-size: 13px; color: var(--gold); font-weight: 600; letter-spacing: 0.04em; margin-bottom: 8px; }
.hero h1 { font-size: clamp(26px, 3.6vw, 42px); margin-bottom: 14px; font-weight: 600; letter-spacing: 0.012em; line-height: 1.18; }
.hero-focus { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: var(--r-pill); background: var(--glass-bg-strong); border: 1px solid var(--glass-border); font-size: 13.5px; }
.hero-weather { text-align: right; min-width: 180px; }
.hero-weather .hw-icon { font-size: 42px; line-height: 1; }
.hero-weather .hw-label { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-top: 4px; }
.hero-weather .hw-sub { font-size: 12.5px; color: var(--text-1); margin-top: 2px; max-width: 26ch; margin-left: auto; }
.hero-desc { color: var(--text-1); max-width: 58ch; margin: 0 0 2px; font-size: 14.5px; line-height: 1.65; }
.hero-features { display: flex; flex-direction: column; gap: 13px; min-width: 230px; }
.feat-row { display: flex; align-items: flex-start; gap: 11px; }
.feat-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); flex: 0 0 auto; }
.feat-t { font-weight: 600; font-size: 13.5px; }
.feat-s { font-size: 12px; color: var(--text-2); }

/* Tool directory (Command Center) */
.dir-grid { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.dir-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 13px; box-shadow: var(--glass-inner); transition: border-color var(--speed), box-shadow var(--speed), transform var(--speed); }
.dir-card:hover { border-color: var(--glass-border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.dir-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0; background: none; border: none; color: inherit; cursor: pointer; text-align: left; }
.dir-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(140deg, var(--accent-soft), rgba(217,108,240,0.12)); color: var(--accent-2); flex: 0 0 auto; border: 1px solid var(--glass-border); }
.dir-title { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; }
.dir-sub { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dir-go { margin-left: auto; color: var(--text-3); transition: transform 160ms, color 160ms; }
.dir-head:hover .dir-go { color: var(--accent); transform: translateX(3px); }
.dir-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.dir-chip { font-size: 12px; padding: 5px 11px; border-radius: var(--r-pill); background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); color: var(--text-1); cursor: pointer; transition: all 150ms var(--ease); font-family: inherit; }
.dir-chip:hover { background: var(--accent-soft); border-color: var(--accent-line); color: #fff; transform: translateY(-1px); }
@media (max-width: 860px) { .dir-grid { grid-template-columns: 1fr; } }

.deadline-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.deadline-row:last-child { border-bottom: none; }
.deadline-when { font-family: var(--font-mono); font-size: 12px; padding: 4px 9px; border-radius: 7px; background: var(--glass-bg); border: 1px solid var(--glass-border); white-space: nowrap; }
.deadline-when.soon { color: var(--warn); border-color: var(--warn-soft); }
.deadline-when.over { color: var(--danger); border-color: var(--danger-soft); }

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.kan-col { background: var(--bg-1); border: 1px solid var(--glass-border); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 200px; }
.kan-col-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--glass-border); font-weight: 600; font-size: 13px; }
.kan-col-head .count { margin-left: auto; }
.kan-list { padding: 10px; display: flex; flex-direction: column; gap: 9px; flex: 1; min-height: 60px; transition: background 160ms; }
.kan-list.drop { background: var(--gold-soft); }
.kan-card { background: var(--glass-bg-strong); border: 1px solid var(--glass-border); border-radius: var(--r-md); padding: 12px; cursor: grab; transition: border-color 160ms, transform 160ms; }
.kan-card:hover { border-color: var(--glass-border-strong); }
.kan-card.dragging { opacity: 0.5; }
.kan-card h5 { font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }

/* Timer ring */
.timer-display { font-family: var(--font-display); font-size: 64px; font-weight: 700; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }

/* Article / knowledge */
.article-body { max-width: 72ch; }
.article-body p { color: var(--text-1); margin: 0 0 16px; }
.article-body h2 { font-size: 22px; margin: 30px 0 12px; }
.article-body h3 { font-size: 17px; margin: 24px 0 10px; color: var(--gold); }
.article-body ul, .article-body ol { color: var(--text-1); padding-left: 22px; margin: 0 0 16px; }
.article-body li { margin-bottom: 7px; }
.article-body blockquote { border-left: 3px solid var(--gold); padding: 4px 0 4px 18px; margin: 18px 0; color: var(--text-0); font-style: italic; }
.article-body strong { color: var(--text-0); }
.article-body code { font-family: var(--font-mono); background: var(--bg-3); padding: 2px 6px; border-radius: 5px; font-size: 0.9em; color: var(--teal); }
.reading-pill { font-size: 12px; color: var(--text-2); }

/* Template viewer */
.template-text { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; color: var(--text-1); background: var(--bg-0); border: 1px solid var(--glass-border); border-radius: var(--r-md); padding: 18px; max-height: 60vh; overflow: auto; }
.template-text mark { background: var(--gold-soft); color: var(--gold); border-radius: 4px; padding: 0 3px; }

/* Onboarding */
.onb-backdrop { position: fixed; inset: 0; z-index: 500; background: radial-gradient(900px 600px at 70% 10%, rgba(139,123,255,0.18), transparent), radial-gradient(700px 500px at 12% 90%, rgba(217,108,240,0.14), transparent), rgba(5,6,9,0.86); backdrop-filter: blur(10px); display: grid; place-items: center; padding: 20px; }
.onb { width: min(560px, 100%); background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); border: 1px solid var(--glass-border-strong); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden; animation: modal-in 400ms var(--ease); }
.onb-art { height: 150px; background: linear-gradient(135deg, rgba(139,123,255,0.26), rgba(217,108,240,0.14) 55%, rgba(45,212,191,0.12)); position: relative; overflow: hidden; display: grid; place-items: center; }
.onb-body { padding: 26px 28px; }
.onb-steps { display: flex; gap: 6px; margin-bottom: 18px; }
.onb-steps span { height: 4px; flex: 1; border-radius: 99px; background: var(--bg-3); }
.onb-steps span.on { background: var(--gold); }

/* misc utility */
.divider { height: 1px; background: var(--glass-border); margin: var(--s-5) 0; border: none; }
.kbd { font-family: var(--font-mono); font-size: 11px; background: var(--bg-3); border: 1px solid var(--glass-border); border-radius: 5px; padding: 2px 6px; color: var(--text-1); }
.list-reset { list-style: none; margin: 0; padding: 0; }
.scroll-x { overflow-x: auto; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px; border: 1px solid var(--glass-border); border-radius: var(--r-md); background: var(--bg-1); }
.tag-input .tg { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; background: var(--gold-soft); color: var(--gold); border-radius: 99px; font-size: 12px; }
.tag-input input { border: none; background: none; flex: 1; min-width: 90px; padding: 4px; }
.tag-input input:focus { box-shadow: none; }

.fade-seq { opacity: 0; transform: translateY(10px); animation: reveal 600ms var(--ease) forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }
@keyframes float-cloud { from { transform: translateX(-30px); } to { transform: translateX(30px); } }
@keyframes rain { to { transform: translateY(60px); opacity: 0; } }

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
.rail-toggle { display: none; }
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  :root { --rail-w: 0px; }
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: fixed; left: 0; top: var(--ticker-h); bottom: 0; width: 280px; z-index: 90;
    transform: translateX(-100%); transition: transform 280ms var(--ease); height: auto;
  }
  body.rail-open .rail { transform: none; box-shadow: var(--shadow-lg); }
  body.rail-open::after { content: ''; position: fixed; inset: var(--ticker-h) 0 0 0; background: rgba(0,0,0,0.5); z-index: 80; }
  .rail-toggle { display: inline-grid; }
  .view { padding: 18px 16px 60px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; gap: 0; }
  .hero-content { flex-direction: column; } .hero-weather { text-align: left; } .hero-weather .hw-sub { margin-left: 0; }
}
@media (max-width: 520px) {
  body { font-size: 14.5px; }
  .view-actions { width: 100%; }
  .modal-foot { flex-direction: column-reverse; } .modal-foot .btn { width: 100%; }
}

/* Mobile rail toggle button (floats in ticker on small screens) */
.mtoggle { position: fixed; left: 12px; top: calc(var(--ticker-h) + 10px); z-index: 95; display: none; }
@media (max-width: 860px) { .mtoggle { display: inline-grid; } .view { padding-top: 58px; } }

/* ============================================================================
   REDUCED MOTION
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .ticker-track { animation: none !important; }
  .fade-seq { opacity: 1; transform: none; }
}

/* ============================================================================
   ADS — blended, unobtrusive
   ============================================================================ */
.ad-slot { position: relative; border-radius: var(--r-lg); overflow: hidden; }
.ad-slot .ad-label { position: absolute; top: 8px; left: 14px; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); font-weight: 700; z-index: 2; pointer-events: none; }
.ad-slot .ad-ins { width: 100%; padding-top: 10px; }
.ad-slot .adsbygoogle { display: block; width: 100%; min-height: 90px; }
/* Quiet, blended windows: barely-there tint + hairline border so they read as a
   calm part of the page, never a loud ad block. A real ad fills the slot when
   served; otherwise a subtle first-party note shows (see ads.js). */
.ad-banner { margin: 22px 0 2px; padding: 15px 16px; background: rgba(255,255,255,0.022); border: 1px solid rgba(255,255,255,0.06); }
.ad-native { padding: 14px 16px; background: rgba(255,255,255,0.022); border: 1px solid rgba(255,255,255,0.06); }
/* first-party fallback row */
.ad-house { display: flex; align-items: center; gap: 13px; }
.ad-house .ah-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); flex: 0 0 auto; }
.ad-house .ah-text { flex: 1; min-width: 0; font-size: 13px; color: var(--text-1); line-height: 1.45; }
.ad-house .btn { flex: 0 0 auto; }
@media (max-width: 560px) { .ad-house { flex-wrap: wrap; } .ad-house .ah-text { flex: 1 1 100%; } }
@media print { .ad-slot { display: none !important; } }

/* ============================================================================
   DONATION FLOATING BUTTON
   ============================================================================ */
.donate-fab {
  position: fixed; left: 18px; bottom: 18px; z-index: 120;
  display: inline-flex; align-items: center; gap: 0; overflow: hidden;
  height: 50px; padding: 0 14px; border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--magenta), var(--accent-2)); color: #fff;
  font-weight: 700; font-size: 14px; text-decoration: none;
  box-shadow: 0 10px 30px rgba(217,108,240,0.36), var(--glass-inner);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed), padding var(--speed);
  max-width: 56px;
}
.donate-fab .df-ico { display: grid; place-items: center; width: 26px; flex: 0 0 auto; }
.donate-fab .df-label { white-space: nowrap; opacity: 0; max-width: 0; transition: opacity var(--speed), max-width var(--speed), margin var(--speed); }
.donate-fab:hover, .donate-fab:focus-visible { max-width: 320px; padding: 0 20px 0 14px; transform: translateY(-2px); box-shadow: 0 14px 40px rgba(217,108,240,0.5); }
.donate-fab:hover .df-label, .donate-fab:focus-visible .df-label { opacity: 1; max-width: 240px; margin-left: 8px; }
.donate-fab::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(217,108,240,0.5); animation: fab-pulse 2.8s var(--ease) infinite; }
@keyframes fab-pulse { 0% { box-shadow: 0 0 0 0 rgba(217,108,240,0.4); } 70% { box-shadow: 0 0 0 16px rgba(217,108,240,0); } 100% { box-shadow: 0 0 0 0 rgba(217,108,240,0); } }
@media (max-width: 860px) { .donate-fab { left: 12px; bottom: 12px; height: 46px; } }
@media (prefers-reduced-motion: reduce) { .donate-fab::after { animation: none; } }
@media print { .donate-fab { display: none !important; } }

/* Auto-save indicator */
.autosave-line { display: flex; align-items: center; gap: 8px; padding: 6px 11px 2px; font-size: 11px; color: var(--text-2); }
.autosave-line .as-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: var(--success); box-shadow: 0 0 6px rgba(52,211,153,0.6); }
.autosave-line.saving { color: var(--text-1); }
.autosave-line.saving .as-dot { background: var(--accent); box-shadow: 0 0 6px rgba(139,123,255,0.8); animation: pulse 1s infinite; }
.autosave-line .as-time { color: var(--text-3); }

/* Recovery points */
.recovery-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.recovery-row:last-child { border-bottom: none; }
.recovery-row .rr-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex: 0 0 auto; }

/* Language switcher */
.lang-btn { display: flex; align-items: center; gap: 10px; }
.lang-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lang-opt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--glass-border); background: var(--glass-bg); color: var(--text-0); cursor: pointer; font-size: 14px; font-weight: 600; text-align: left; transition: all 160ms var(--ease); }
.lang-opt:hover { border-color: var(--glass-border-strong); background: var(--glass-bg-strong); }
.lang-opt.active { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }
.lang-opt small { display: block; color: var(--text-2); font-weight: 400; font-size: 11.5px; }
.lang-opt.active small { color: var(--gold); opacity: 0.8; }
@media (max-width: 520px) { .lang-list { grid-template-columns: 1fr; } }

/* Print (invoices, templates) */
@media print {
  .ticker, .rail, .view-actions, #toasts, .mtoggle, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .shell { grid-template-columns: 1fr; }
  .view { padding: 0; }
  .panel, .card { box-shadow: none; border-color: #ddd; background: #fff; color: #000; }
  .print-doc { color: #000; }
}
