/* =========================================================================
 * NSH Theme tokens  (v1.7.0)
 * Design-system variables for the UI rebuild. Dark is the default (:root),
 * light is applied by setting data-theme="light" on <html>.
 * This file only DEFINES variables + the theme toggle control + the body
 * color transition. It does not restyle existing pages, so it is safe to
 * load site-wide; screens adopt the tokens as they are rebuilt.
 * ====================================================================== */

:root {
  /* Backgrounds and surfaces (dark, default) */
  --nsh-bg: #0A0A0A;
  --nsh-surface: #111111;
  --nsh-surface-sub: #0E0E0E;
  --nsh-card: linear-gradient(180deg, #151515 0%, #101010 100%);
  --nsh-card-top: #151515;
  --nsh-card-bottom: #101010;
  --nsh-border: #242424;
  --nsh-hairline: #1F1F1F;

  /* Text */
  --nsh-text: #FFFFFF;
  --nsh-text-dim: #A0A0A0;
  --nsh-text-muted: #8A8A8A;
  --nsh-text-on-gold: #0A0A0A;

  /* Brand accent */
  --nsh-gold: #B7996F;
  --nsh-gold-bright: #C9A97A;
  --nsh-gold-wash: rgba(183, 153, 111, 0.12);
  --nsh-gold-gradient: linear-gradient(135deg, #C9A97A 0%, #B7996F 100%);

  /* Status */
  --nsh-status-awaiting: #B7996F;
  --nsh-status-progress: #6B8FA8;
  --nsh-status-review: #C49A45;
  --nsh-status-completed: #7A9E7E;
  --nsh-status-cancelled: #C0604A;
  --nsh-status-awaiting-wash: rgba(183, 153, 111, 0.14);
  --nsh-status-progress-wash: rgba(107, 143, 168, 0.14);
  --nsh-status-review-wash: rgba(196, 154, 69, 0.14);
  --nsh-status-completed-wash: rgba(122, 158, 126, 0.14);
  --nsh-status-cancelled-wash: rgba(192, 96, 74, 0.14);
  --nsh-status-awaiting-border: rgba(183, 153, 111, 0.35);
  --nsh-status-progress-border: rgba(107, 143, 168, 0.35);
  --nsh-status-review-border: rgba(196, 154, 69, 0.35);
  --nsh-status-completed-border: rgba(122, 158, 126, 0.35);
  --nsh-status-cancelled-border: rgba(192, 96, 74, 0.35);

  /* Presence */
  --nsh-online: #4CAF6A;
  --nsh-offline: #8A8A8A;

  /* Danger, notification, star */
  --nsh-danger: #C0604A;
  --nsh-danger-wash: rgba(192, 96, 74, 0.14);
  --nsh-star: #C49A45;

  /* Shadows */
  --nsh-shadow-card: 0 1px 0 rgba(255, 255, 255, 0.02), 0 8px 24px rgba(0, 0, 0, 0.35);
  --nsh-shadow-raised: 0 14px 40px rgba(0, 0, 0, 0.55);
  --nsh-shadow-gold: 0 6px 16px rgba(183, 153, 111, 0.30);
  --nsh-focus-ring: 0 0 0 3px var(--nsh-gold-wash);

  --nsh-skeleton: linear-gradient(90deg, #1A1A1A 25%, #242424 50%, #1A1A1A 75%);
  --nsh-scrim: rgba(10, 10, 10, 0.60);

  /* Radii */
  --nsh-radius-card: 16px;
  --nsh-radius-control: 10px;
  --nsh-radius-inner: 8px;
  --nsh-radius-badge: 6px;
  --nsh-radius-pill: 999px;
  --nsh-radius-avatar: 50%;

  /* Spacing (4px base) */
  --nsh-space-1: 4px;  --nsh-space-2: 8px;  --nsh-space-3: 12px; --nsh-space-4: 16px;
  --nsh-space-5: 20px; --nsh-space-6: 24px; --nsh-space-7: 28px; --nsh-space-8: 32px;
  --nsh-space-10: 40px; --nsh-space-12: 48px;

  /* Layout */
  --nsh-sidebar-w: 240px;
  --nsh-topbar-h: 64px;
  --nsh-content-max: 1280px;
  --nsh-content-pad: 28px;
  --nsh-control-h: 44px;
  --nsh-control-h-sm: 38px;
  --nsh-touch-min: 44px;

  /* Z layers */
  --nsh-z-base: 0; --nsh-z-sticky: 10; --nsh-z-topbar: 20;
  --nsh-z-drawer: 30; --nsh-z-modal: 40; --nsh-z-toast: 50;

  /* Breakpoints (reference) */
  --nsh-bp-sm: 640px; --nsh-bp-md: 900px; --nsh-bp-lg: 1100px; --nsh-bp-xl: 1280px;

  /* Motion */
  --nsh-ease: cubic-bezier(0.2, 0, 0, 1);
  --nsh-dur-fast: 150ms; --nsh-dur-base: 180ms; --nsh-dur-enter: 250ms;

  /* Fonts */
  --nsh-font-head: 'Space Grotesk', system-ui, sans-serif;
  --nsh-font-body: 'Figtree', system-ui, sans-serif;
}

:root[data-theme='light'] {
  --nsh-bg: #F7F5F1;
  --nsh-surface: #FFFFFF;
  --nsh-surface-sub: #FBFAF8;
  --nsh-card: linear-gradient(180deg, #FFFFFF 0%, #FBFAF8 100%);
  --nsh-card-top: #FFFFFF;
  --nsh-card-bottom: #FBFAF8;
  --nsh-border: #ECE7DE;
  --nsh-hairline: #F1EDE6;

  --nsh-text: #141210;
  --nsh-text-dim: #6B6B6B;
  --nsh-text-muted: #857F77;
  --nsh-text-on-gold: #0A0A0A;

  --nsh-gold: #A8824F;
  --nsh-gold-bright: #B7996F;
  --nsh-gold-wash: rgba(168, 130, 79, 0.10);
  --nsh-gold-gradient: linear-gradient(135deg, #B7996F 0%, #A8824F 100%);

  --nsh-shadow-card: 0 1px 2px rgba(20, 18, 16, 0.04), 0 6px 20px rgba(20, 18, 16, 0.06);
  --nsh-shadow-raised: 0 10px 30px rgba(20, 18, 16, 0.14);
  --nsh-shadow-gold: 0 6px 16px rgba(168, 130, 79, 0.28);
  --nsh-focus-ring: 0 0 0 3px var(--nsh-gold-wash);

  --nsh-skeleton: linear-gradient(90deg, #EFEBE4 25%, #F7F5F1 50%, #EFEBE4 75%);
  --nsh-scrim: rgba(10, 10, 10, 0.55);
}

/* Smooth theme switch (body only, per spec) */
body { transition: background-color 200ms ease, color 200ms ease; }

/* ---- Theme toggle control (header icon button) ---- */
.nsh-theme-toggle{
  width:38px;height:38px;border-radius:var(--nsh-radius-control);
  border:1px solid var(--nsh-border);background:transparent;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;
  color:var(--nsh-text-dim);transition:background .15s ease,color .15s ease,border-color .15s ease;
  padding:0;line-height:0;
}
.nsh-theme-toggle:hover{background:var(--nsh-gold-wash);color:var(--nsh-gold);border-color:var(--nsh-gold)}
.nsh-theme-toggle svg{width:16px;height:16px}
.nsh-theme-toggle .nsh-ic-moon{display:none}
:root[data-theme='light'] .nsh-theme-toggle .nsh-ic-sun{display:none}
:root[data-theme='light'] .nsh-theme-toggle .nsh-ic-moon{display:inline}
@media (max-width:900px){ .nsh-theme-toggle{width:44px;height:44px} }

@media (prefers-reduced-motion: reduce){
  body{transition:none}
}
