/* =============================================================================
   amadee CRM - Design-Tokens

   Die einzige Stelle mit Farben, Maßen und Schriften. Alle anderen Stylesheets
   (shell.css, components.css, style.css) verwenden nur var(--...) - ein literaler
   Farbwert außerhalb dieser Datei ist ein Fehler.

   Ladereihenfolge (template.xhtml): PrimeFaces-Theme -> primeflex -> tokens.css ->
   style.css -> shell.css -> components.css -> modules/*.css. tokens.css steht nach dem Theme, damit
   die Theme-Variablen (--surface-*, --text-color, --primary-color, ...) hier
   überschrieben werden können.

   Namensschema: --cm-<bereich>-<variante>. Das Präfix "cm" ist historisch (Cash
   Manager) und bleibt, damit bestehende Regeln nicht umbenannt werden müssen.

   Bis 11/2026 standen die Tokens in zwei :root-Blöcken in style.css (ein dunkler
   Satz und ein heller, der ihn überschrieb). Hier steht nur noch der Wert, der sich
   damals durchgesetzt hat - das Erscheinungsbild ist unverändert.
   ============================================================================= */

:root {
    /* --- Marke (Farbsystem des RivalsDataImporter) --- */
    --cm-brand: #034562;
    --cm-brand-hover: #377BA0;
    --cm-brand-tint: #E8F1F5;
    --cm-accent: #0B8E78;

    /* --- Module: Kennfarbe in Modulleiste und Seitenleiste --- */
    --cm-module-contacts: #0B8E78;
    --cm-module-cash: #3D8B2F;
    --cm-module-support: #7B5EA7;
    --cm-module-admin: #6B7A86;
    --cm-module-start: #034562;
    --cm-module-todo: #EF6C00;
    --cm-module-calendar: #377BA0;

    /* --- Calendar: colours of the entry kinds --- */
    --cm-cal-mine: #4E79D8;
    --cm-cal-global: #0B8E78;
    --cm-cal-other: #8A96A3;
    --cm-cal-ticket: #7B5EA7;
    --cm-cal-todo: #EF6C00;
    --cm-cal-holiday: #49C17A;
    --cm-cal-text: #FFFFFF;
    --cm-cal-followup-border: rgba(255, 255, 255, .7);

    /* --- Kopfzeile (Modulleiste) --- */
    --cm-topbar-bg: var(--cm-brand);
    --cm-topbar-fg: #FFFFFF;
    --cm-topbar-muted: #A9C6D4;
    --cm-topbar-hover-bg: rgba(255, 255, 255, 0.08);
    --cm-topbar-height: 52px;

    /* --- Seitenleiste --- */
    --cm-sidebar-width: 232px;
    --cm-sidebar-bg: #FFFFFF;
    --cm-sidebar-active-bg: var(--cm-brand-tint);
    --cm-sidebar-active-fg: var(--cm-brand);

    /* --- Abstände (4er-Raster) --- */
    --cm-space-1: .25rem;
    --cm-space-2: .5rem;
    --cm-space-3: .75rem;
    --cm-space-4: 1rem;
    --cm-space-5: 1.5rem;
    --cm-space-6: 2rem;

    /* --- Radien und Schatten --- */
    --cm-radius-sm: 6px;
    --cm-radius-lg: 12px;
    --cm-shadow-sm: 0 1px 2px rgba(3, 69, 98, 0.05);
    --cm-shadow-md: 0 6px 20px rgba(3, 69, 98, 0.12);

    /* --- Schrift --- */
    --cm-font-size-base: 13px;
    --cm-font-size-sm: .85rem;
    --cm-font-size-xs: .75rem;
    --cm-font-size-h1: 1.35rem;

    /* --- Flächen und Text (überschreibt das PrimeFaces-Theme saga-blue) --- */
    --surface-a: #FFFFFF;
    --surface-b: #F5F7F9;
    --surface-c: #F0F8FF;
    --surface-d: #E4E9ED;
    --surface-e: #FFFFFF;
    --surface-f: #FFFFFF;
    --surface-ground: #F5F7F9;
    --surface-section: #F5F7F9;
    --surface-card: #FFFFFF;
    --surface-overlay: #FFFFFF;
    --surface-border: #E4E9ED;
    --surface-hover: #F0F8FF;

    --text-color: #222222;
    --text-color-secondary: #666666;
    --primary-color: #034562;
    --primary-color-text: #FFFFFF;
    --border-radius: 8px;

    --font-family: "Segoe UI", Arial, Helvetica, sans-serif;

    /* --- Zustände (Pastell-Paletten, Rivals-Semantik) --- */
    --cm-ok: #2e7d32;
    --cm-ok-bg: #E8F5E9;
    --cm-ok-border: #A5D6A7;
    --cm-err: #c62828;
    --cm-err-bg: #FFEBEE;
    --cm-err-border: #EF9A9A;
    --cm-warn: #EF6C00;
    --cm-warn-bg: #FFF8E1;
    --cm-warn-border: #FFD54F;

    /* Outlook-Farbkategorien (presetN wie in Outlook), SupportDesk › E-Mails */
    --cm-outlook-preset0: #E74856;  /* Rot */
    --cm-outlook-preset1: #FF8C00;  /* Orange */
    --cm-outlook-preset2: #AB7B52;  /* Braun */
    --cm-outlook-preset3: #FFD200;  /* Gelb */
    --cm-outlook-preset4: #47D041;  /* Grün */
    --cm-outlook-preset5: #30C6CC;  /* Türkis */
    --cm-outlook-preset6: #73AA24;  /* Oliv */
    --cm-outlook-preset7: #4A9FE8;  /* Blau */
    --cm-outlook-preset8: #A592F0;  /* Lila */
    --cm-outlook-preset9: #E43BA6;  /* Cranberry */
    --cm-outlook-preset10: #8B9DAA; /* Stahl */
    --cm-outlook-preset11: #4C6B83; /* Dunkler Stahl */
    --cm-outlook-preset12: #ABABAB; /* Grau */
    --cm-outlook-preset13: #666666; /* Dunkelgrau */
    --cm-outlook-preset14: #474747; /* Schwarz */
    --cm-outlook-preset15: #9B2030; /* Dunkelrot */
    --cm-outlook-preset16: #C25B0E; /* Dunkelorange */
    --cm-outlook-preset17: #8A5C3A; /* Dunkelbraun */
    --cm-outlook-preset18: #B39A00; /* Dunkelgelb */
    --cm-outlook-preset19: #2E8B2E; /* Dunkelgrün */
    --cm-outlook-preset20: #1F8A8F; /* Dunkeltürkis */
    --cm-outlook-preset21: #506F1C; /* Dunkeloliv */
    --cm-outlook-preset22: #2A65A8; /* Dunkelblau */
    --cm-outlook-preset23: #6A4FB2; /* Dunkellila */
    --cm-outlook-preset24: #9C1F6F; /* Dunkelcranberry */
    --cm-neutral-bg: #EFF2F5;
    --cm-neutral-border: #D5DBE1;

    /* --- Kompakte Eingabeelemente --- */
    --cm-input-height: 28px;
    --cm-input-font-size: 0.95rem;
    --cm-input-pad-x: 8px;
    --cm-trigger-width: 32px;
    /* Suche und Filter über Listen (<div class="cm-list">) - etwas größer als im Formular */
    --cm-input-height-lg: 34px;

    /* --- Listen (<div class="cm-list">) --- */
    --cm-list-head-fg: #6B7A86;
    --cm-list-row-border: #EEF2F5;
    --cm-list-row-hover: #EEF4F8;
    /* jede zweite Zeile leicht abgesetzt */
    --cm-list-row-alt: #F8FAFB;
    --cm-list-inactive-fg: #9AA5AE;

    /* --- SupportDesk: offene (verpasste) Anrufe, Live-Anzeige --- */
    --cm-call-open-bg: #FFF4E0;
    --cm-call-open-hover: #FFEBC8;
    --cm-call-open-mark: #EF6C00;
    --cm-live: #2e7d32;
    --cm-call-running-bg: #E3F2FD;
    --cm-call-running-hover: #D2E9FB;
    --cm-call-running-mark: #377BA0;

    /* --- CashDesk: fachliche Signalfarben --- */
    --cm-pos: #2e7d32;
    --cm-neg: #c62828;
    --cm-neutral: #222222;
    --cm-pos-strong: #2e7d32;
    --cm-neg-strong: #c62828;
    --cm-text-dim: #666666;
    --cm-text-group: #1a1a1a;

    /* --- CashDesk: Gruppen- und Bilanzzeilen der Übersicht --- */
    --cm-group-bg: #F2F6F8;
    --cm-group-bg-hover: #E8F1F5;
    --cm-group-border: #E4E9ED;
    --cm-hover-bg: #F5FAFD;
    --cm-outcome-bg: #FDF0EF;
    --cm-outcome-border: #F3C9C5;
    --cm-balance-bg: #E3F2FA;
    --cm-balance-sum-bg: #EFF7FB;
    --cm-balance-border: #BBDDEE;
    --cm-sticky-bg: #F2F6F8;
    --cm-sticky-border: #E4E9ED;

    /* --- CashDesk: Akzentstreifen der Gruppenzeilen --- */
    --cm-accent-neutral-from: #377BA0;
    --cm-accent-neutral-to: #034562;
    --cm-accent-income-from: #0B8E78;
    --cm-accent-income-to: #09796A;
    --cm-accent-outcome-from: #EF6C00;
    --cm-accent-outcome-to: #C62828;

    /* --- CashDesk: Schnellwahl-Knöpfe der Datumsfilter --- */
    --cm-quick-bg: #EDF1F4;
    --cm-quick-bg-hover: #DFE7EC;
    --cm-quick-border: #CBD5DC;
}
