/* ============================================================
   kavrishon admin — design tokens (the CONTRACT: controllers rely on these names)
   SOURCE: palette from SPEC.md (the spec document's own steel/cable/copper tokens);
           radius scale from מערכות לדוגמה/מערכת בדיקות בטון/SolidFlow/SolidFlow/WWW/css/style.css (R-17);
           layered shadows + focus ring from מערכות לדוגמה/ShutterFlow/ShutterFlow/WWW/css/style.css (:104-110).
   COPIED: 2026-09-23 (T-005)
   CHANGES: neutral "steel + cable" palette instead of ShutterFlow's gold; dark scheme via prefers-color-scheme.
   ============================================================ */

:root {
  color-scheme: light;

  /* Surfaces + ink */
  --paper:      #e6ecf2;
  --sheet:      #ffffff;
  --field:      #f2f5f8;
  --ink:        #1d2733;
  --ink-soft:   #566376;
  --ink-dim:    #6b788a;   /* AA on sheet/paper */
  --line:       #c3cdd8;
  --line-soft:  #dbe3ec;

  /* Brand-neutral accents */
  --cable:      #1f5fad;   /* primary actions, links, focus */
  --cable-deep: #174a87;
  --cable-soft: #e4edf9;
  --copper:     #a85a22;   /* highlights, warnings of the soft kind */
  --copper-soft:#f6ebe2;
  --earth:      #2f7f24;   /* success */
  --earth-soft: #e6f2e4;
  --loss:       #b03434;   /* danger */
  --loss-soft:  #f8e6e6;

  /* Dark panel (login hero, sidebar) */
  --dark:       #152029;
  --dark-2:     #1d2a36;
  --dark-3:     #0f171e;
  --dark-grad:  linear-gradient(160deg, #1d2a36 0%, #152029 50%, #0f171e 100%);

  /* Client status colours (semantic, never changed per screen) */
  --status-active:   var(--earth);
  --status-quota:    var(--cable);
  --status-grace:    var(--copper);
  --status-overdue:  var(--loss);
  --status-disabled: var(--ink-dim);

  /* Aliases used by components */
  --text:          var(--ink);
  --text-muted:    var(--ink-soft);
  --text-inverse:  #ffffff;
  --bg:            var(--paper);
  --surface:       var(--sheet);
  --border:        var(--line);
  --primary:       var(--cable);
  --primary-deep:  var(--cable-deep);
  --primary-soft:  var(--cable-soft);
  --primary-ring:  rgba(31, 95, 173, 0.28);
  --danger:        var(--loss);
  --danger-soft:   var(--loss-soft);
  --success:       var(--earth);
  --success-soft:  var(--earth-soft);
  --warning:       var(--copper);
  --warning-soft:  var(--copper-soft);
  --wa:            #25d366;

  /* Shape */
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  /* Depth (ambient + key light) */
  --shadow-sm:  0 1px 2px rgba(29,39,51,.05), 0 6px 22px -14px rgba(29,39,51,.28);
  --shadow-md:  0 2px 6px rgba(29,39,51,.06), 0 14px 36px -18px rgba(29,39,51,.32);
  --shadow-lg:  0 4px 12px rgba(29,39,51,.07), 0 22px 54px -24px rgba(29,39,51,.36);
  --shadow-xl:  0 8px 20px rgba(29,39,51,.09), 0 34px 74px -30px rgba(29,39,51,.44);
  --ring-focus: 0 0 0 3px var(--primary-ring);

  /* Type */
  --font-body: "Heebo", "Assistant", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --fs-sm:  .875rem;
  --fs-md:  1rem;
  --fs-lg:  1.125rem;
  --fs-xl:  1.375rem;
  --fs-2xl: clamp(1.6rem, 4.5vw, 1.9rem);

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: 140ms;
  --dur:      220ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:     #152029;
    --sheet:     #1d2a36;
    --field:     #243443;
    --ink:       #e4eaf0;
    --ink-soft:  #9daaba;
    --ink-dim:   #8c9aab;
    --line:      #34485c;
    --line-soft: #2b3d4f;
    --cable:     #74a7ea;
    --cable-deep:#5a92db;
    --cable-soft:#213650;
    --copper:    #e3915a;
    --copper-soft:#3a2a1f;
    --earth:     #71c25f;
    --earth-soft:#1f3520;
    --loss:      #eb7b7b;
    --loss-soft: #3d2222;
    --primary-ring: rgba(116, 167, 234, 0.35);
  }
}
