/* ============================================================
   Kundenportal · Design Tokens (subset for Dashboard)
   Colors, type, spacing, radii. Single source of truth.
   ============================================================ */

:root {
  /* ----- Type ----- */
  --ff-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ff-text:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ff-hero:    "Inter Display", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ff-mono:    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;

  /* ----- Colors ----- */
  --c-dark:           #222222;
  --c-blue:           #4D97FE;  /* Accent — only accent in use */
  --c-cyan:           #9CECFB;
  --c-warning:        #C0392B;
  --c-white:          #FFFFFF;

  --c-bg:             #F4F4F2;  /* page background (dashboard + artifact page) */
  --c-highlight-bg:   #E3EFFF;  /* tint of blue */
  --c-accent-bg-cyan: #EAF9FE;
  --c-warning-bg:     #FFF0F0;
  --c-neutral-bg:     #F2F2F2;
  --c-row-bg:         #F9F9F9;

  --c-text:           #333333;
  --c-text-strong:    #222222;
  --c-text-muted:     #505050;
  --c-text-dim:       #646464;
  --c-text-hint:      #5A6B7D;
  --c-text-on-dark:   #FFFFFF;

  --c-border:         #D0D0D0;
  --c-border-accent:  #4D97FE;
  --c-border-soft:    #E5E7EB;

  /* Pending / "warte auf Aktion" — used ONLY for active gate badges. */
  --c-pending-bg:     #FFF6DC;
  --c-pending-fg:     #7a5600;
  --c-pending-dot:    #f0b429;
  --c-pending-strong: #b88700;

  /* Diagnose-Ansichten (Input-Inspektor #647/#650, Hinweis „Nur lesen" #352). Eigene Namen
     statt der Status-Tokens des Portals: die gibt es nur im Satz portal-dark, und sie hier hell
     zu belegen, aenderte die helle Darstellung anderer Komponenten. Werte aus Entwurf D1. */
  --c-diag-ok:          #1E8E6E;
  --c-diag-ok-bg:       #E3F5EF;
  --c-diag-mid:         #8a6100;
  --c-diag-warn:        #C0392B;
  --c-diag-warn-bg:     #FFF0F0;
  --c-diag-info:        #2F6FCE;
  --c-diag-info-bg:     #E3EFFF;
  --c-diag-info-border: #4D97FE;
  --c-diag-faint:       #8A8A8A;
  --c-diag-rest:        #B9C2CC;

  /* ----- Spacing ----- */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-7:  32px;
  --sp-8:  40px;

  /* ----- Radii ----- */
  --r-sm:  3px;
  --r-md:  6px;
  --r-lg:  10px;
  --r-xl:  16px;
  --r-pill: 999px;

  /* ----- Shadow (used sparingly) ----- */
  --shadow-sm: 0 1px 2px rgba(34,34,34,0.06);
  --shadow-md: 0 4px 12px rgba(34,34,34,0.08);
  --shadow-lg: 0 12px 32px rgba(34,34,34,0.10);
}

/* ============================================================
   Space Grotesk (variable, VENDORED — kein externer Fetch, CSP font-src 'self')
   Die Schrift der Landingpage cooperium.com; dieselben beiden Dateien wie
   dort (landing/public/assets/fonts/), alle Gewichte 400–700 darin. Die
   unicode-range-Angaben entsprechen den Standard-Subsets von Google Fonts,
   damit der Browser nur die Subsets laedt, die die Seite tatsaechlich braucht.
   ============================================================ */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./vendor/fonts/space-grotesk-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./vendor/fonts/space-grotesk-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   Dark-Theme "portal-dark" (Kundenportal, nur index.html)
   Ueberschreibt den hellen Satz oben AUSSCHLIESSLICH unter dem
   data-theme-Selektor — artifact.html und operator.html laden
   dieselbe Datei und bleiben deshalb unveraendert hell.
   ============================================================ */

:root[data-theme="portal-dark"] {
  /* ----- Type ----- */
  --ff-display: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ff-text:    "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ff-hero:    "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* ----- Portal-Tokens (Farben der Landingpage cooperium.com) ----- */
  --c-accent:         #40E5C4;
  --c-accent-2:       #2F8CE8;
  --c-accent-soft:    #8AF2DC;
  --c-on-accent:      #052620;
  --c-accent-2-soft:  #7DB9F5;            /* Blau als Textfarbe auf dunkler Flaeche */

  /* Freigabe: gelb gefuellt (erteilt), gelb umrandet (steht an), gedaempft (gesperrt). */
  --c-approve:           #F5C451;
  --c-on-approve:        #2A1D00;
  --c-approve-locked:    #8A7A4A;
  --c-approve-locked-fg: #B59F5E;

  /* Flaechen sind deckend — kein Glas mehr (--blur-card bleibt als Token, damit die
     vorhandenen backdrop-filter-Regeln gueltig bleiben, wirkt aber nicht mehr). */
  --c-surface:        #0D161D;
  --c-surface-focus:  #0B1A1A;            /* Karte „Fokus heute" */
  --c-surface-2:      rgba(255, 255, 255, .07);
  --c-surface-border: rgba(255, 255, 255, .09);

  --c-text:           #EEF6F5;
  --c-text-muted:     #B7C6C8;
  --c-text-hint:      #9FB0B3;
  --c-text-faint:     #8A9A9A;            /* gesperrte Kacheln und Zeilen */

  --r-card:   22px;
  --r-inner:  16px;
  --r-pill:   999px;

  --shadow-card: 0 0 0 0 transparent;
  --blur-card:   none;

  /* ----- Status (kontrastgeprueft auf #070D12) ----- */
  --c-status-done:        #40E5C4;  /* ~12:1 auf #070D12 */
  --c-status-progress:    #F5C451;  /* ~12:1 */
  --c-status-warning:     #FF7A7A;  /* ~8:1 */
  --c-status-blocked:     #FF7A7A;
  --c-status-done-bg:     rgba(64, 229, 196, .12);
  --c-status-progress-bg: rgba(245, 196, 81, .13);
  --c-status-warning-bg:  rgba(255, 122, 122, .12);

  /* ----- Bestehende Tokens auf Dark-Entsprechungen ----- */
  --c-dark:           #EEF6F5;            /* war Textfarbe -> hell */
  --c-blue:           #40E5C4;            /* Akzent des Portals */
  --c-cyan:           #8AF2DC;
  --c-warning:        #FF7A7A;
  --c-white:          #0D161D;            /* "Flaeche", nicht mehr Weiss */

  --c-bg:             #070D12;
  --c-highlight-bg:   rgba(64, 229, 196, .12);
  --c-accent-bg-cyan: rgba(47, 140, 232, .14);
  --c-warning-bg:     rgba(255, 122, 122, .12);
  --c-neutral-bg:     rgba(255, 255, 255, .06);
  --c-row-bg:         rgba(255, 255, 255, .03);

  --c-text-strong:    #EEF6F5;
  --c-text-dim:       #9FB0B3;
  --c-text-soft:      #B7C6C8;
  --c-text-on-dark:   #052620;            /* Text AUF dem Akzent */

  --c-border:         rgba(255, 255, 255, .12);
  --c-border-accent:  rgba(64, 229, 196, .55);
  --c-border-soft:    rgba(255, 255, 255, .09);

  --c-pending-bg:     rgba(245, 196, 81, .13);
  --c-pending-fg:     #F5C451;
  --c-pending-dot:    #F5C451;
  --c-pending-strong: #FFD57A;

  /* Diagnose-Ansichten (siehe heller Satz): auf die Status-Tokens des Portals gelegt. */
  --c-diag-ok:          var(--c-status-done);
  --c-diag-ok-bg:       var(--c-status-done-bg);
  --c-diag-mid:         var(--c-status-progress);
  --c-diag-warn:        var(--c-status-warning);
  --c-diag-warn-bg:     var(--c-status-warning-bg);
  --c-diag-info:        var(--c-accent-2-soft);
  --c-diag-info-bg:     rgba(47, 140, 232, .14);
  --c-diag-info-border: rgba(47, 140, 232, .35);
  --c-diag-faint:       var(--c-text-faint);
  --c-diag-rest:        rgba(255, 255, 255, .22);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .40);
  --shadow-lg: 0 20px 56px rgba(0, 0, 0, .48);
}
