/*
 * TCMS – Design-Variablen (AP4)
 *
 * Alle Farben, Schriften, Größen und Abstände der Oberfläche liegen hier.
 * Theme und Look schalten nur über Attribute am Wurzelelement um:
 *   <html data-theme="kuehl|dunkel" data-look="klassisch|studio2">
 * Die Bausteine in app.css benutzen ausschließlich diese Variablen.
 *
 * Quellen der Werte: Mockup 02 (Theme-Tabelle T, CSS-Regeln, Stand 22.11.2026),
 * Mockup 04 (Look "Studio 2", html.lk2/html.lk3, Korrekturen 25.11.2026), spec/40.
 * Alle Pixelwerte sind wie im Mockup schon mit 0,8 genommen (spec/40 "Größe").
 */

/* ---------- Grundwerte (beide Themes, beide Looks) ---------- */
:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-base: 12.8px;               /* Mockup: html{font-size:80%} */
  --fs-bar: clamp(12px, 1.05vw, 13.6px);
  --fs-sub: clamp(12px, .9vw, 12.8px);
  --fs-btn: clamp(12px, 1vw, 12.8px);
  --fs-sw: clamp(12px, 1.1vw, 13.6px);
  --fs-yr: clamp(12.8px, 1.25vw, 16px);
  --fs-leg: clamp(12px, .95vw, 12.8px);
  --fs-pgt: clamp(16px, 1.8vw, 20.8px);
  --fw-pgt: 700;
  --ls-pgt: 0;
  --fs-pgs: 12px;
  --fs-srow: clamp(12px, 1.1vw, 14.4px);
  --fs-pl: clamp(12px, 1.1vw, 14.4px);
  --fs-band: clamp(12.8px, 1.25vw, 16px);
  --fw-band: 700;
  --ls-body: 0;

  --sz-ctl: 32px;                  /* Höhe von Knöpfen und Schiebern */
  --sz-ctl-hm: 40px;               /* Handy: Trefferfläche */
  --rad-pill: 999px;
  --pad-app-x: 12.8px;
  --pad-app-b: 9.6px;
  --gap-sub: 6.4px 14.4px;
  --max-list: 900px;               /* Aufgaben, Neueste, Letzte (spec/40 Größe) */
  --max-set: 656px;                /* Einstellungen */

  /* Kopfleiste (Menüband) */
  --bar-rad: 6.4px;
  --bar-pad: 7.2px 11.2px;
  --bar-bd: transparent;
  --bar-sh: none;
  --logo-w: 89px;
  --logo-h: 19px;

  /* Rahmen (Platzhalter, Monatskarten) */
  --frame-rad: 6.4px;
  --frame-sh: none;
  --band-align: center;
  --band-pad: 4px 8px;

  --shadow-pop: 0 12px 40px rgba(0, 0, 0, .45);
  --shadow-toast: 0 6.4px 19.2px rgba(0, 0, 0, .35);
  --t-slide: .2s ease;
}

/* ---------- Theme Kühl (hell) – Mockup 02, Tabelle T.light ---------- */
:root,
html[data-theme="kuehl"] {
  color-scheme: light;
  --c-bg: #edf2f7;
  --c-card: #ffffff;
  --c-tx: #1a202c;
  --c-mu: #718096;
  --c-bar: #555b63;
  --c-bartx: #ffffff;
  --c-mb: #8a8f95;          /* Monatsband */
  --c-mbtx: #ffffff;
  --c-wb: #d3d6d9;          /* Wochentagsstreifen */
  --c-wbtx: #454a50;
  --c-cmb: #646a72;         /* aktueller Monat */
  --c-cmbtx: #ffffff;
  --c-omb: #a2a7ad;         /* gedämpfter Monat */
  --c-ombtx: #ffffff;
  --c-mnsh: 0 1px 1px rgba(0, 0, 0, .22);
  --c-bd: #d5dce6;
  --c-ring: #7f858c;
  --c-red: #c0392b;
  --c-opt: #b5d4f4; --c-opttx: #0c447c;
  --c-zus: #f5be5c; --c-zustx: #4a2f00;
  --c-ver: #b9db6d; --c-vertx: #2c3d0c;
  --c-abs: #ebb3d3; --c-abstx: #5a1f3d;
  --c-ef: #ffffff;          /* Eingabefeld */
  --c-efb: #8c98a6;         /* Feldrand */
  --c-err-bg: #fde8e6;
  --c-err-tx: #8a1c12;
}

/* ---------- Theme Dunkel – Mockup 02, Tabelle T.dark ---------- */
html[data-theme="dunkel"] {
  color-scheme: dark;
  --c-bg: #14171c;
  --c-card: #1e232b;
  --c-tx: #e8ebf0;
  --c-mu: #9aa3b2;
  --c-bar: #2c3037;
  --c-bartx: #e8ebf0;
  --c-mb: #2f333a;
  --c-mbtx: #e8ebf0;
  --c-wb: #2a2e35;
  --c-wbtx: #e8ebf0;
  --c-cmb: #2f333a;
  --c-cmbtx: #e8ebf0;
  --c-omb: #24272c;
  --c-ombtx: #8e949c;
  --c-mnsh: none;
  --c-bd: #2f3644;
  --c-ring: #8a919b;
  --c-red: #f08a8a;
  --c-opt: #2c4a6e; --c-opttx: #cfe3fa;
  --c-zus: #9a6a1a; --c-zustx: #fff1d4;
  --c-ver: #5f7f1d; --c-vertx: #f1f8dc;
  --c-abs: #7a4a63; --c-abstx: #f6dbe9;
  --c-ef: #353e4b;
  --c-efb: #4d586a;
  --c-err-bg: #4a2323;
  --c-err-tx: #ffd9d4;
}

/* ---------- Bausteine, Look Klassisch (Standard) ---------- */
:root {
  --bar-bg: var(--c-bar);
  --bar-tx: var(--c-bartx);
  --mi-tx: inherit;
  --mi-fw: 400;
  --mi-pad: 4.8px 11.2px;
  --mi-hover-bg: color-mix(in srgb, var(--c-bartx) 10%, transparent);
  --mi-hover-tx: inherit;
  --mi-on-bg: color-mix(in srgb, var(--c-bartx) 16%, transparent);
  --mi-on-tx: inherit;
  --mi-on-fw: 700;

  --barctl-bg: color-mix(in srgb, var(--c-bartx) 16%, transparent);   /* Suche, Regler, Theme-Schieber */
  --barctl-bg-hover: color-mix(in srgb, var(--c-bartx) 26%, transparent);
  --barctl-bg-on: color-mix(in srgb, var(--c-bartx) 34%, transparent);
  --barctl-bd: transparent;
  --barctl-tx: var(--c-bartx);
  --srch-bg: var(--barctl-bg);
  --srch-tx: var(--c-bartx);
  --srch-input: inherit;
  --srch-ph: color-mix(in srgb, var(--c-bartx) 72%, transparent);
  --srch-bd: transparent;
  --tsw-knob: var(--c-card);
  --tsw-knob-sh: 0 1px 2.4px rgba(0, 0, 0, .3);
  --tsw-tx: var(--c-bartx);
  --tsw-on-tx: var(--c-tx);

  --sw-bg: color-mix(in srgb, var(--c-tx) 9%, transparent);   /* weiche Schieber */
  --sw-bd: transparent;
  --sw-knob: var(--c-card);
  --sw-knob-sh: 0 1px 2.4px rgba(0, 0, 0, .25);
  --sw-tx: var(--c-mu);
  --sw-on-tx: var(--c-tx);
  --sw-fw: 400;
  --sw-on-fw: 700;

  --btn-bg: color-mix(in srgb, var(--c-tx) 9%, transparent);  /* Zurück, runde Knöpfe */
  --btn-bg-hover: color-mix(in srgb, var(--c-tx) 16%, transparent);
  --btn-bd: transparent;
  --btn-tx: var(--c-tx);
  --add-bg: var(--c-mb);
  --add-bg-hover: color-mix(in srgb, var(--c-mb) 85%, #000);
  --add-tx: var(--c-mbtx);
  --add-fw: 600;
  --add-sh: none;

  --yr-bg: color-mix(in srgb, var(--c-tx) 9%, transparent);
  --yr-bd: transparent;
  --yr-sh: none;
  --nb-bg: var(--c-card);
  --nb-bg-hover: color-mix(in srgb, var(--c-card) 85%, var(--c-tx));
  --nb-sh: 0 1px 2.4px rgba(0, 0, 0, .25);

  --frame-bg: var(--c-card);
  --frame-bd: var(--c-bd);
  --band-bg: var(--c-mb);
  --band-tx: var(--c-mbtx);
  --band-cur-bg: var(--c-cmb);
  --band-cur-tx: var(--c-cmbtx);
  --band-old-bg: var(--c-omb);
  --band-old-tx: var(--c-ombtx);
  --band-sh: var(--c-mnsh);

  --panel-bg: var(--c-bar);          /* Handy-Menü */
  --panel-tx: var(--c-bartx);
  --panel-bd: transparent;
  --hdtb-bg: color-mix(in srgb, var(--c-bartx) 12%, transparent);
  --hdtb-on-bg: var(--c-bartx);
  --hdtb-on-tx: var(--c-bar);

  /* Logo: Studio 2 Hell = logo.png (schwarzes TCM), sonst logo2 mit weißem TCM (Vorgabe 25.11.2026) */
  --logo-hell-d: none;
  --logo-dunkel-d: block;

  --acc: var(--c-ring);              /* Akzent (Fokusrahmen, Links) */
  --link: var(--c-tx);
  --pgh-pad: 0;
}

/* ---------- Look Studio 2 – Mockup 04 (html.lk2 + html.lk3) ---------- */
html[data-look="studio2"][data-theme="kuehl"] {
  --c-bg: #f1f3f7;
  --c-card: #ffffff;
  --c-bd: #e2e6ed;
  --c-tx: #151a22;
  --c-mu: #687284;
  --c-bar: #ffffff;
  --c-bartx: #151a22;
  --c-ef: #f5f7fa;
  --c-efb: #e2e6ed;
  --c-ring: #2a78d6;
  --lk-acc: #2a78d6;
  --lk-sh: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 1px rgba(16, 24, 40, .03);
  /* lk3 hell (25.11.2026: grauer Kopf wie der Kalenderkopf) */
  --lk-hd: #cacaca;
  --lk-hdtx: #111111;
  --lk-band: #cacaca;
  --lk-bandtx: #111111;
  --lk-curband: #2a78d6;
  --lk-curtx: #ffffff;
  --lk-line: #b9bfc8;
  --lk-ctl: rgba(255, 255, 255, .28);
  --logo-hell-d: block;
  --logo-dunkel-d: none;
}
html[data-look="studio2"][data-theme="dunkel"] {
  --c-bg: #0f1216;
  --c-card: #181c22;
  --c-bd: #262c35;
  --c-tx: #e8ecf1;
  --c-mu: #8a94a3;
  --c-bar: #181c22;
  --c-bartx: #e8ecf1;
  --c-ef: #1f242c;
  --c-efb: #2c333e;
  --c-ring: #3987e5;
  --lk-acc: #3987e5;
  --lk-sh: 0 0 0 0 transparent;
  --lk-hd: #2c3139;
  --lk-hdtx: #eef1f5;
  --lk-band: #2f343c;
  --lk-bandtx: #eef1f5;
  --lk-curband: #2f6fc4;
  --lk-curtx: #ffffff;
  --lk-line: #3a414c;
  --lk-ctl: #3a414c;
}
html[data-look="studio2"] {
  --ls-body: -.003em;
  --bar-bg: var(--lk-hd);
  --bar-tx: var(--lk-hdtx);
  --bar-rad: 14px;
  --bar-pad: 7px 10px 7px 14px;
  --bar-sh: var(--lk-sh);
  --mi-tx: var(--lk-hdtx);
  --mi-fw: 550;
  --mi-pad: 6px 12px;
  --mi-hover-bg: rgba(255, 255, 255, .22);
  --mi-hover-tx: var(--lk-hdtx);
  --mi-on-bg: #ffffff;
  --mi-on-tx: var(--lk-acc);
  --mi-on-fw: 700;

  --barctl-bg: var(--lk-ctl);
  --barctl-bg-hover: color-mix(in srgb, var(--lk-acc) 14%, var(--lk-ctl));
  --barctl-bg-on: color-mix(in srgb, var(--lk-acc) 18%, var(--lk-ctl));
  --barctl-tx: var(--lk-hdtx);
  --srch-bg: #ffffff;
  --srch-tx: #5b6370;
  --srch-input: #151a22;
  --srch-ph: #7a8290;
  --tsw-tx: var(--lk-hdtx);

  --sw-bg: color-mix(in srgb, var(--c-tx) 5%, var(--c-bg));
  --sw-bd: var(--c-bd);
  --sw-knob-sh: 0 1px 3px rgba(0, 0, 0, .14);
  --sw-fw: 500;
  --sw-on-fw: 650;

  --btn-bg: var(--c-card);
  --btn-bg-hover: color-mix(in srgb, var(--c-tx) 6%, var(--c-card));
  --btn-bd: var(--c-bd);
  --add-bg: var(--lk-acc);
  --add-bg-hover: color-mix(in srgb, var(--lk-acc) 88%, #000);
  --add-tx: #ffffff;
  --add-fw: 650;
  --add-sh: 0 1px 2px color-mix(in srgb, var(--lk-acc) 40%, transparent);

  --yr-bg: var(--c-card);
  --yr-bd: var(--c-bd);
  --yr-sh: var(--lk-sh);
  --nb-bg: transparent;
  --nb-bg-hover: color-mix(in srgb, var(--c-tx) 6%, transparent);
  --nb-sh: none;

  --frame-rad: 14px;
  --frame-sh: var(--lk-sh);
  --band-bg: var(--lk-band);
  --band-tx: var(--lk-bandtx);
  --band-cur-bg: var(--lk-curband);
  --band-cur-tx: var(--lk-curtx);
  --band-old-bg: var(--lk-band);
  --band-old-tx: var(--lk-bandtx);
  --band-sh: none;
  --band-align: center;   /* Hendrik 28.11.2026: Monatsnamen mittig wie in Klassisch (Mockup 04: links) */
  --band-pad: 6px 10px;
  --fs-band: clamp(12.5px, 1.1vw, 15px);

  --panel-bg: var(--c-card);
  --panel-tx: var(--c-tx);
  --panel-bd: var(--c-bd);
  --hdtb-bg: color-mix(in srgb, var(--c-tx) 8%, transparent);
  --hdtb-on-bg: var(--lk-acc);
  --hdtb-on-tx: #ffffff;

  --acc: var(--lk-acc);
  --link: var(--lk-acc);
  --pgh-pad: 10px 2px 10px;
  --fs-pgt: clamp(18px, 2vw, 24px);
  --fw-pgt: 750;
  --ls-pgt: -.015em;
  --fs-pgs: 12.5px;
}
/* Studio 2 Dunkel: Schieber mit mehr Kontrast (Mockup 04) */
html[data-look="studio2"][data-theme="dunkel"] {
  --sw-bg: #262c36;
  --sw-bd: #3a424e;
  --sw-knob: #47505e;
  --sw-knob-sh: 0 1px 3px rgba(0, 0, 0, .45);
  --sw-tx: #a4adbb;
  --sw-on-tx: #ffffff;
  --tsw-knob: #47505e;
  --tsw-on-tx: #ffffff;
  --hdtb-bg: #262c36;
  --hdtb-on-bg: #47505e;
}

/* ---------- AP5: Ansichten (Kalendertage, Listen, Eintragsarten) ----------
 * Quellen: Mockup 02 (Theme-Tabelle T: --c-dn, --c-odn, --c-owb, --c-cwb, --c-today, --c-rt, --c-rth),
 * Mockup 04 (lk2/lk3: Wochentage ohne Streifen, Tönung 24/32 % hell, 11/18 % dunkel, Balken 3 px).
 * Grau für Urlaub, privat, sonstige und "ohne Status": Annahme AP5 (spec/40 "Vorschlag neutrales Grau").
 */
:root,
html[data-theme="kuehl"] {
  --c-dn: #4f5866;          /* Tageszahl */
  --c-odn: #8e98a8;         /* Tageszahl gedämpfter Monat */
  --c-today: #1a202c;       /* Ring heute */
  --c-owb: #e6e8ea; --c-owbtx: #6b7178;   /* Wochentagsstreifen gedämpft */
  --c-cwb: #b4b9bf; --c-cwbtx: #21262b;   /* Wochentagsstreifen aktueller Monat */
  --c-oth: #c9ced4; --c-othtx: #2d333a;   /* Urlaub, privat, sonstige, ohne Status */
  --row-t: 40%; --row-th: 58%;            /* Zeilentönung, beim Überfahren */
}
html[data-theme="dunkel"] {
  --c-dn: #e8ebf0;
  --c-odn: #9aa3b2;
  --c-today: #e8ebf0;
  --c-owb: #212428; --c-owbtx: #7d838b;
  --c-cwb: #2a2e35; --c-cwbtx: #e8ebf0;
  --c-oth: #4a5059; --c-othtx: #e3e6ea;
  --row-t: 20%; --row-th: 34%;
}
:root {
  --wb-bg: var(--c-wb); --wb-tx: var(--c-wbtx);
  --wb-old-bg: var(--c-owb); --wb-old-tx: var(--c-owbtx);
  --wb-cur-bg: var(--c-cwb); --wb-cur-tx: var(--c-cwbtx);
  --wd-fs: clamp(11px, 5.8cqw, 12px); --wd-fw: 600; --wd-tt: none; --wd-ls: 0;
  --day-fs: clamp(12px, 7.6cqw, 16px); --day-fw: 600; --day-st-fw: 600;
  --day-rad: 50%;
  --row-bar: 0px;           /* farbiger Balken links an Listenzeilen (Studio 2) */
  --st-fs: 12px; --st-fw: 600;
  --pop-bg: var(--c-card);
  --tbl-th-tt: none; --tbl-th-fs: 12px; --tbl-th-ls: 0;
  --msi-bg: transparent; --msi-bd: transparent; --msi-align: center;
}
html[data-look="studio2"][data-theme="kuehl"] {
  --c-dn: #2b323d; --c-odn: #a3abb7; --c-today: #2a78d6;
  --row-t: 24%; --row-th: 32%;
}
html[data-look="studio2"][data-theme="dunkel"] {
  --c-dn: #d6dbe2; --c-odn: #5f6773; --c-today: #5b9cec;
  --row-t: 11%; --row-th: 18%;
}
html[data-look="studio2"] {
  --wb-bg: transparent; --wb-tx: var(--c-mu);
  --wb-old-bg: transparent; --wb-old-tx: var(--c-mu);
  --wb-cur-bg: transparent; --wb-cur-tx: var(--c-mu);
  --wd-fs: clamp(9.5px, 5cqw, 10.5px); --wd-tt: uppercase; --wd-ls: .04em;
  --day-fs: clamp(11.5px, 7cqw, 14.5px); --day-fw: 500; --day-st-fw: 650;
  --row-bar: 3px;
  --st-fs: 11px; --st-fw: 650;
  --tbl-th-tt: uppercase; --tbl-th-fs: 11px; --tbl-th-ls: .05em;
  --msi-bg: var(--c-card); --msi-bd: var(--c-bd); --msi-align: flex-start;
}

/* ---------- AP6: Termin-Maske (Mockup 02, Theme-Tabelle T: --c-es Fläche, --c-ef Feld, --c-efb Feldrand,
 * --c-eh Blockkopf, --c-eht Schrift im Blockkopf, --c-okc "gespielt"). Studio 2 hat in Mockup 04 keine Maske:
 * Werte dort als Annahme aus den Look-Farben abgeleitet (Fläche = Karte, Kopf = grauer Kopf des Looks).
 * --set-ctl: Breite der Schalterspalte der Einstellungen (alle Schalter gleich breit). ---------- */
:root,
html[data-theme="kuehl"] {
  --c-es: #c6ced8;
  --c-eh: #5d6875;
  --c-eht: #ffffff;
  --c-okc: #2d8a12;
  --c-hint-bg: #fbd38d; --c-hint-tx: #4a2f00;
}
html[data-theme="dunkel"] {
  --c-es: #232932;
  --c-eh: #2e3642;
  --c-eht: #e8ebf0;
  --c-okc: #9fe35a;
  --c-hint-bg: #9a6a1a; --c-hint-tx: #fff1d4;
}
html[data-look="studio2"][data-theme="kuehl"] { --c-es: #e4e8ee; --c-eh: var(--lk-hd); --c-eht: var(--lk-hdtx); }
html[data-look="studio2"][data-theme="dunkel"] { --c-es: #181c22; --c-eh: var(--lk-hd); --c-eht: var(--lk-hdtx); }
:root {
  --bx-rad: 6.4px;           /* Blöcke der Maske */
  --bx-bd: transparent;
  --bx-sh: none;
  --bx-hfs: 13.6px;          /* Blockkopf */
  --bx-hls: .06em;
  --ef-rad: 4px;             /* Eingabefelder */
  --ef-fs: 13px;
  --ef-h: 27px;
  --el-fs: 12.5px;           /* Beschriftung */
  --set-ctl: 340px;
  --max-set2: 900px;
}
html[data-look="studio2"] {
  --bx-rad: 14px;
  --bx-bd: var(--c-bd);
  --bx-sh: var(--lk-sh);
  --bx-hls: .05em;
  --ef-rad: 8px;
}

/* ---------- Druck: weißer Grund, dunkle Schrift (spec/40) ---------- */
@media print {
  :root, html[data-theme] {
    --c-bg: #fff; --c-card: #fff; --c-tx: #000; --c-mu: #444; --c-bd: #999;
  }
}
