/* Prime Salt CRM — design tokens
   Kolory marki Prime Salt (granat #0B2A5B, błękit kryształu #1F6FD1).
   Układ: stały panel boczny + roboczy obszar tabel i kart; tryb jasny i ciemny z tych samych tokenów. */

:root {
  /* marka */
  --brand-50:  #EEF5FC;
  --brand-100: #D6E7FA;
  --brand-500: #1F6FD1;
  --brand-600: #1859AB;
  --brand-700: #0B2A5B;
  --brand-press: #0B2A5B;
  --on-accent: #FFFFFF;

  /* neutralne / tekst */
  --ink-900: #0E1A2B;
  --ink-700: #2B333B;
  --ink-600: #4B5563;
  --ink-400: #7A8597;
  --ink-300: #B6BEC9;

  /* powierzchnie */
  --surface: #FFFFFF;
  --canvas:  #FAFBFC;
  --line:    #E4E7EC;
  --line-strong: #D6DAE1;
  --scrim: rgba(13, 19, 26, 0.45);

  /* akcenty stanu */
  --green-50:  #E8F6EE;
  --green-500: #2E9E5B;
  --green-700: #17643A;
  --amber-50:  #FFF8E8;
  --amber-500: #F59E0B;
  --amber-700: #9A6400;
  --red-50:  #FDECEC;
  --red-100: #FBD9D9;
  --red-500: #DC2626;
  --red-700: #A11616;
  --blue-50:  #EFF4FF;
  --blue-500: #3B6DE0;
  --blue-700: #274C9E;
  --gray-50: #F3F4F6;
  --gray-600: #6B7280;

  /* powiadomienia */
  --toast-bg: #0E1A2B;
  --toast-fg: #FFFFFF;
  --toast-success-bg: #0B2A5B;
  --toast-error-bg: #A11616;

  /* geometria */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-pill: 999px;
  --shadow-pop: 0 8px 24px rgba(13, 19, 26, 0.10), 0 1px 2px rgba(13, 19, 26, 0.06);

  /* typografia */
  --font-ui: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Open Sans", Roboto, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;

  --sidebar-w: 240px;
  --topbar-h: 56px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-50:  #14243D;
    --brand-100: #1D3558;
    --brand-500: #3A7BDE;
    --brand-600: #5590EA;
    --brand-700: #A9C8F7;
    --brand-press: #2D66BD;
    --on-accent: #FFFFFF;
    --ink-900: #E7EDF6;
    --ink-700: #CAD3DF;
    --ink-600: #A9B4C3;
    --ink-400: #8590A2;
    --ink-300: #4A5566;
    --surface: #151D29;
    --canvas:  #0F151E;
    --line:    #253144;
    --line-strong: #314057;
    --scrim: rgba(0, 0, 0, 0.62);
    --green-50:  #10291C;
    --green-500: #46B978;
    --green-700: #7DDCA6;
    --amber-50:  #2C2310;
    --amber-500: #F2A93B;
    --amber-700: #F3C877;
    --red-50:  #2F1717;
    --red-100: #422020;
    --red-500: #E36161;
    --red-700: #FFA3A3;
    --blue-50:  #152547;
    --blue-500: #6890F0;
    --blue-700: #AFC6FF;
    --gray-50: #1C2634;
    --gray-600: #A3ADBD;
    --toast-bg: #E7EDF6;
    --toast-fg: #0E1A2B;
    --toast-success-bg: #A9C8F7;
    --toast-error-bg: #FFA3A3;
    --shadow-pop: 0 10px 28px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --brand-50:  #14243D;
  --brand-100: #1D3558;
  --brand-500: #3A7BDE;
  --brand-600: #5590EA;
  --brand-700: #A9C8F7;
  --brand-press: #2D66BD;
  --on-accent: #FFFFFF;
  --ink-900: #E7EDF6;
  --ink-700: #CAD3DF;
  --ink-600: #A9B4C3;
  --ink-400: #8590A2;
  --ink-300: #4A5566;
  --surface: #151D29;
  --canvas:  #0F151E;
  --line:    #253144;
  --line-strong: #314057;
  --scrim: rgba(0, 0, 0, 0.62);
  --green-50:  #10291C;
  --green-500: #46B978;
  --green-700: #7DDCA6;
  --amber-50:  #2C2310;
  --amber-500: #F2A93B;
  --amber-700: #F3C877;
  --red-50:  #2F1717;
  --red-100: #422020;
  --red-500: #E36161;
  --red-700: #FFA3A3;
  --blue-50:  #152547;
  --blue-500: #6890F0;
  --blue-700: #AFC6FF;
  --gray-50: #1C2634;
  --gray-600: #A3ADBD;
  --toast-bg: #E7EDF6;
  --toast-fg: #0E1A2B;
  --toast-success-bg: #A9C8F7;
  --toast-error-bg: #FFA3A3;
  --shadow-pop: 0 10px 28px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* , *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  color: var(--ink-900);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

::selection { background: var(--brand-100); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
