/*
  San Marino Audit: design tokens. Three layers; components (app.css) read layers 2 and 3 only.
  The full system is described in logpanel/DESIGN.md.

  Identity: the panel belongs to the San Marino server, so it wears the server's own colours: the "night indigo"
  palette of the in-game F2 menu (src_cef_f2/src/views/player/sanmarino/tokens.css), the same logo, the same
  duotone line icons, the same number face. One brand hue (indigo) is kept for focus, selection and the primary
  action. Meaning has its own small palette (money in / out, warning, critical); the six event areas are told
  apart by an icon first and a quiet tint second.
*/

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/Inter-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, 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+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans Georgian"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/NotoSansGeorgian-georgian.woff2") format("woff2");
  unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+2D00-2D2F; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geist-mono-latin.woff2") format("woff2"); }
/* Oswald: the face the game's menus set their numbers in */
@font-face { font-family: "SM Num"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/oswald-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "SM Num"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/oswald-latin-700-normal.woff2") format("woff2"); }

/* ---- 1. primitives ------------------------------------------------------------------------------------------- */
:root {
  /* night: the server's indigo-tinted neutrals, from its darkest page to its brightest text */
  --night-1000: #070912; --night-950: #0B0D1A; --night-900: #0E1122; --night-850: #151827; --night-800: #1A1D2E;
  --night-750: #1E2133;  --night-700: #262A40; --night-650: #30354F; --night-600: #3D4364; --night-500: #5C6389;
  --night-400: #8389AB;  --night-300: #A2A7BF; --night-200: #C4C8DA; --night-100: #E2E4F0; --night-75: #ECEEF6;
  --night-50: #F2F3F9;   --night-25: #F8F9FC;  --night-0: #FFFFFF;

  /* indigo: the server's brand hue */
  --indigo-100: #E6E8FD; --indigo-200: #C9CDFB; --indigo-300: #9DA5FC; --indigo-400: #8890F2; --indigo-500: #6A70E3;
  --indigo-600: #565BCE; --indigo-700: #4549B0; --indigo-800: #393E87; --indigo-900: #242757;

  --green-300: #4CD18F; --green-400: #35B97A; --green-700: #12754B;
  --red-300: #F27477;   --red-400: #EF5E61;   --red-700: #B92C33;
  --gold-300: #E7B23C;  --gold-400: #D9A12A;  --gold-800: #7A5200;
  --rose-300: #F57BAC;  --rose-400: #EE5F95;  --rose-700: #A62260;
  --summer-400: #F4A254;

  --font-sans: "Inter", "Noto Sans Georgian", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "Geist Mono", "Cascadia Mono", "SF Mono", Consolas, ui-monospace, monospace;
  --font-num: "SM Num", "Inter", "Segoe UI", system-ui, sans-serif;

  --text-2xs: 11px; --text-xs: 12px; --text-sm: 13px; --text-md: 14px; --text-lg: 16px; --text-xl: 20px; --text-2xl: 28px;
  --space-1: 2px; --space-2: 4px; --space-3: 6px; --space-4: 8px; --space-5: 12px; --space-6: 16px; --space-7: 20px; --space-8: 24px; --space-9: 32px; --space-10: 40px;
  --radius-xs: 4px; --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px; --radius-full: 999px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1); --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --dur-fast: 110ms; --dur-base: 170ms; --dur-slow: 240ms;
  --z-sticky: 10; --z-header: 20; --z-sidebar: 30; --z-drawer: 40; --z-pop: 50; --z-palette: 60; --z-toast: 70;
}

/* ---- 2. semantic: dark (the default, and the server's own look) ------------------------------------------------- */
:root {
  color-scheme: dark;
  --bg-app: var(--night-950);
  --bg-sidebar: var(--night-900);
  --bg-surface: var(--night-850);
  --bg-raised: var(--night-800);
  --bg-hover: var(--night-750);
  --bg-active: #272B42;
  --bg-selected: var(--indigo-900);
  --bg-overlay: var(--night-800);
  --bg-inset: var(--night-950);
  --border-subtle: #1F2236;
  --border: var(--night-700);
  --border-strong: #3A3F5E;
  --text-1: var(--night-50);
  --text-2: var(--night-200);
  --text-3: #8E94B2;
  --text-disabled: var(--night-500);
  --accent: var(--indigo-400);
  --accent-hover: var(--indigo-300);
  --accent-fill: var(--indigo-600);
  --accent-fill-hover: var(--indigo-500);
  --accent-contrast: #FFFFFF;
  --accent-soft: rgba(106, 112, 227, 0.17);
  --accent-border: rgba(136, 144, 242, 0.45);
  --focus: var(--indigo-300);
  --positive: var(--green-300);   --positive-soft: rgba(76, 209, 143, 0.13);
  --negative: var(--red-300);     --negative-soft: rgba(239, 94, 97, 0.15);
  --warning: var(--gold-300);     --warning-soft: rgba(231, 178, 60, 0.14);
  --critical: var(--rose-300);    --critical-soft: rgba(238, 95, 149, 0.16);
  --shadow-pop: 0 0 0 1px rgba(3, 4, 10, 0.5), 0 12px 32px rgba(3, 4, 10, 0.55);
  --shadow-drawer: -1px 0 0 var(--border), -24px 0 48px rgba(3, 4, 10, 0.45);
  --scrim: rgba(5, 6, 14, 0.62);
  --logo-ink: #FFFFFF; --logo-brand: #6A70E3;
  /* six event areas, fixed order; lightness, chroma and colour-blind separation validated on --bg-surface */
  --area-money: #4A90F0; --area-items: #DD7430; --area-players: #1FA97A; --area-world: #BE8A10; --area-staff: #DA5C94; --area-system: #8C86E8;
}

/* ---- 2. semantic: light: its own steps from the same ramps -------------------------------------------------------- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg-app: #F1F2F8; --bg-sidebar: var(--night-25); --bg-surface: var(--night-0); --bg-raised: var(--night-25); --bg-hover: #EDEEF6; --bg-active: #E4E6F1; --bg-selected: var(--indigo-100);
  --bg-overlay: var(--night-0); --bg-inset: #F4F5FA;
  --border-subtle: #E9EAF2; --border: #DADCE8; --border-strong: #C2C5D8;
  --text-1: #12142A; --text-2: #474B66; --text-3: #676C89; --text-disabled: #A5A9C0;
  --accent: var(--indigo-700); --accent-hover: var(--indigo-800); --accent-fill: var(--indigo-600); --accent-fill-hover: var(--indigo-700); --accent-contrast: #FFFFFF;
  --accent-soft: #ECEDFC; --accent-border: #B9BDF3; --focus: var(--indigo-600);
  --positive: var(--green-700); --positive-soft: #E1F5EB; --negative: var(--red-700); --negative-soft: #FCE8E8;
  --warning: var(--gold-800); --warning-soft: #FBF1D8; --critical: var(--rose-700); --critical-soft: #FCE5EE;
  --shadow-pop: 0 0 0 1px rgba(18, 20, 42, 0.06), 0 12px 32px rgba(18, 20, 42, 0.14);
  --shadow-drawer: -1px 0 0 var(--border), -24px 0 48px rgba(18, 20, 42, 0.1);
  --scrim: rgba(18, 20, 42, 0.34);
  --logo-ink: #1C1F3D; --logo-brand: #565BCE;
  --area-money: #2F7BD9; --area-items: #D9652B; --area-players: #1A9E77; --area-world: #B88A00; --area-staff: #C2528B; --area-system: #6A63D6;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg-app: #F1F2F8; --bg-sidebar: var(--night-25); --bg-surface: var(--night-0); --bg-raised: var(--night-25); --bg-hover: #EDEEF6; --bg-active: #E4E6F1; --bg-selected: var(--indigo-100);
    --bg-overlay: var(--night-0); --bg-inset: #F4F5FA;
    --border-subtle: #E9EAF2; --border: #DADCE8; --border-strong: #C2C5D8;
    --text-1: #12142A; --text-2: #474B66; --text-3: #676C89; --text-disabled: #A5A9C0;
    --accent: var(--indigo-700); --accent-hover: var(--indigo-800); --accent-fill: var(--indigo-600); --accent-fill-hover: var(--indigo-700); --accent-contrast: #FFFFFF;
    --accent-soft: #ECEDFC; --accent-border: #B9BDF3; --focus: var(--indigo-600);
    --positive: var(--green-700); --positive-soft: #E1F5EB; --negative: var(--red-700); --negative-soft: #FCE8E8;
    --warning: var(--gold-800); --warning-soft: #FBF1D8; --critical: var(--rose-700); --critical-soft: #FCE5EE;
    --shadow-pop: 0 0 0 1px rgba(18, 20, 42, 0.06), 0 12px 32px rgba(18, 20, 42, 0.14);
    --shadow-drawer: -1px 0 0 var(--border), -24px 0 48px rgba(18, 20, 42, 0.1);
    --scrim: rgba(18, 20, 42, 0.34);
    --logo-ink: #1C1F3D; --logo-brand: #565BCE;
    --area-money: #2F7BD9; --area-items: #D9652B; --area-players: #1A9E77; --area-world: #B88A00; --area-staff: #C2528B; --area-system: #6A63D6;
  }
}

/* ---- 3. component ----------------------------------------------------------------------------------------------- */
:root {
  --sidebar-width: 232px;
  --sidebar-rail: 56px;
  --topbar-height: 48px;
  --control-height: 30px;
  --control-height-sm: 24px;
  --row-height: 38px;
  --icon: 16px;
  --icon-sm: 14px;
  --drawer-width: 620px;
  --page-pad: var(--space-8);
}
