/* NorthStar — Theme polish layer.
   Loaded LAST on every page (after per-page <style> blocks) so its rules win
   over the local duplicates of .btn / .card / .field etc. that pages carry.
   Visual refinements only — no layout, sizing, or behavioural changes. */

/* ── Typography: self-hosted Inter (the font stack already lists it first) ── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility }
body { font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11' }
h1, h2, h3 { letter-spacing: -0.015em }
::selection { background: rgba(14, 165, 164, 0.22) }

/* ── Scrollbars (light content areas) ── */
::-webkit-scrollbar { width: 10px; height: 10px }
::-webkit-scrollbar-track { background: transparent }
::-webkit-scrollbar-thumb { background: #c5d2df; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box }
::-webkit-scrollbar-thumb:hover { background: #a7b9cb; border: 2px solid transparent; background-clip: padding-box }
/* keep the dark sidebar's own scrollbar */
aside::-webkit-scrollbar { width: 8px }
aside::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.10); border: none }
aside::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); border: none }

/* ── Buttons ── */
.btn {
  background: linear-gradient(180deg, #ff9c1f, #f28000);
  border-radius: 9px;
  box-shadow: 0 1px 2px rgba(15, 23, 36, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.btn:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 5px 12px -3px rgba(240, 128, 0, 0.50), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn:active:not(:disabled) { transform: translateY(0); filter: brightness(0.97); box-shadow: 0 1px 2px rgba(15, 23, 36, 0.12) }
.btn-teal {
  background: linear-gradient(180deg, #15b8a8, #0c9b9a);
  border-radius: 9px;
  box-shadow: 0 1px 2px rgba(15, 23, 36, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.btn-teal:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 5px 12px -3px rgba(13, 148, 136, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn-teal:active:not(:disabled) { transform: translateY(0); filter: brightness(0.97) }
.btn-ghost {
  background: #fff;
  border-color: #d9e3ee;
  border-radius: 9px;
  transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.btn-ghost:hover { background: #f4f8fb; border-color: #bccde0; box-shadow: 0 2px 6px -2px rgba(15, 23, 36, 0.12) }
.btn-danger { border-radius: 9px; transition: background-color 0.12s ease }
button:focus-visible, a:focus-visible { outline: 2px solid rgba(14, 165, 164, 0.55); outline-offset: 2px }

/* ── Cards / panels ── */
.card, .section-card, .kpi {
  border-radius: 12px;
  border: 1px solid var(--line, #e3ebf4);
  box-shadow: var(--shadow-card, 0 1px 2px rgba(15, 23, 36, 0.04), 0 10px 28px -16px rgba(15, 23, 36, 0.16));
}
.card-title, .section-title { color: #8da1b8 }
.kpi-value { letter-spacing: -0.02em }

/* ── Form fields ── */
.field {
  border-color: #d9e3ee;
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field:hover { border-color: #c2d3e4 }
.field:focus { border-color: var(--teal, #0ea5a4); box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.16) }

/* ── Micro-interactions: smooth hover on list rows & clickable items ── */
[class*="-item"] { transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease }

/* ── Empty states ── */
.empty-state .icon { opacity: 0.35 }

/* ── Page headers ── */
.page-header h2 { font-weight: 700; letter-spacing: -0.02em }

/* ── Login page (standalone — no nav.css) ── */
body:has(> .login-card) {
  background: radial-gradient(1100px 700px at 50% -10%, #1d2d4a 0%, #131e33 45%, #0d1422 100%);
}
.login-card { border-radius: 16px; box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.25) }
.login-card .logo {
  background: linear-gradient(135deg, #ffa01e 0%, #ff8a00 55%, #f07000 100%);
  box-shadow: 0 4px 14px -2px rgba(255, 138, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
