/* Commander Report – Design nach www.commander-systems.de */

@font-face { font-family: "Space Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/space-grotesk-latin-500-normal.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; }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/space-grotesk-latin-ext-500-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/space-grotesk-latin-600-normal.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; }
@font-face { font-family: "Space Grotesk"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/space-grotesk-latin-ext-600-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/space-grotesk-latin-700-normal.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; }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/space-grotesk-latin-ext-700-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.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; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.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; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.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; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-700-normal.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; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-ext-400-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-ext-600-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-ext-700-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-italic.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; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.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; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.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; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-600-normal.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; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-ext-400-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-ext-500-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Marke */
  --navy: #141B29;
  --navy-2: #1B2230;
  --navy-3: #222B3B;
  --navy-line: #2E3546;
  --navy-line-soft: #242C3D;
  --badge: #2B3440;
  --blue: #2A74A6;
  --blue-hover: #23648F;
  --blue-logo: #3D82C4;
  --blue-bright: #4A90D9;
  --sky: #6CB5DF;
  --sky-2: #4598C8;
  --on-dark: #FFFFFF;
  --on-dark-2: #BBC6D3;
  --on-dark-3: #7E8A9C;
  --green: #34D399;
  --amber: #F2A516;
  --red: #E05252;
  --teal: #0F8A7E;

  /* Fläche (hell) */
  --paper: #F4F7FA;
  --card: #FFFFFF;
  --zebra: #F4F7FA;
  --ink: #0E1726;
  --text: #495465;
  --muted: #677487;
  --line: #E3E8EE;
  --line-2: #D3DAE3;
  --link: #1F6A99;
  --field: #FFFFFF;
  --soft-blue: #E8F1F8;
  --soft-amber: #FDF3E1;
  --soft-red: #FCE8E8;
  --soft-green: #E3F7EF;
  --shadow: 0 1px 2px rgba(14, 23, 38, .04), 0 10px 28px rgba(14, 23, 38, .06);
  --shadow-lg: 0 18px 50px rgba(14, 23, 38, .18);

  --radius: 16px;
  --radius-sm: 10px;
  --font-head: "Space Grotesk", "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wrap: 1180px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #0F1520;
  --card: #1B2230;
  --zebra: #20283A;
  --ink: #FFFFFF;
  --text: #BBC6D3;
  --muted: #8B97A8;
  --line: #2A3242;
  --line-2: #364053;
  --link: #6CB5DF;
  --field: #141B29;
  --soft-blue: rgba(108, 181, 223, .12);
  --soft-amber: rgba(242, 165, 22, .14);
  --soft-red: rgba(224, 82, 82, .16);
  --soft-green: rgba(52, 211, 153, .14);
  --shadow: 0 1px 0 rgba(255, 255, 255, .02), 0 10px 30px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-weight: 700; }
h2 { font-weight: 700; font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
h3 { font-weight: 700; font-size: 1.1rem; }
p { margin: 0 0 1em; }
.mono { font-family: var(--font-mono); font-feature-settings: "zero" 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.xs { font-size: .78rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Kopfzeile ---------- */
.topstrip { background: #0E1420; color: var(--on-dark-3); font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.topstrip .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; }
.topstrip b { color: var(--on-dark-2); font-weight: 500; }
@media (max-width: 760px) { .topstrip { display: none; } }

.hdr { position: sticky; top: 0; z-index: 40; background: var(--navy); border-bottom: 1px solid var(--navy-line); }
.hdr .wrap { display: flex; align-items: center; gap: 18px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none !important; flex-shrink: 0; }
.brand-logo { display: block; height: 34px; width: auto; flex-shrink: 0; }
.brand-mark { display: none; height: 30px; width: auto; flex-shrink: 0; }
.brand-tag { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .18em; color: var(--sky); border: 1px solid var(--navy-line); border-radius: 6px; padding: 3px 6px; margin-left: 2px; text-transform: uppercase; }

.nav { display: flex; gap: 4px; margin-left: 18px; }
.nav a { color: var(--on-dark-2); font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 8px; text-decoration: none; position: relative; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav a.active { color: #fff; }
.nav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -15px; height: 2px; background: var(--sky-2); border-radius: 2px; }
.hdr-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.icon-btn { width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--navy-line); background: transparent; color: #fff; cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s; }
.icon-btn:hover { background: rgba(255,255,255,.05); border-color: #3B4458; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.primary { background: var(--blue); border-color: var(--blue); }
.icon-btn.primary:hover { background: var(--blue-hover); }
.icon-btn.running { background: #1E3A33; border-color: #2C5E4F; color: var(--green); }
.icon-btn.running:hover { background: #24463D; }
.menu-btn { display: none; }
@media (max-width: 1020px) { .nav { display: none; } .menu-btn { display: inline-grid; } }
@media (max-width: 420px) { .brand-tag { display: none; } .brand-logo { height: 28px; } .hdr .wrap { gap: 10px; } .hdr-actions { gap: 8px; } .icon-btn { width: 44px; height: 44px; } }

.live-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid #2C5E4F; background: rgba(52,211,153,.07); color: #fff; font-family: var(--font-mono); font-size: .85rem; text-decoration: none !important; }
.live-chip .lbl { color: var(--on-dark-3); font-size: .7rem; letter-spacing: .14em; }
.live-chip.paused { border-color: #5B4A22; background: rgba(242,165,22,.08); }
@media (max-width: 640px) { .live-chip .lbl, .live-chip .who { display: none; } }

.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); display: inline-block; flex-shrink: 0; box-shadow: 0 0 0 4px rgba(52,211,153,.18); }
.dot.pulse { animation: pulse 1.8s ease-in-out infinite; }
.dot.amber { background: var(--amber); box-shadow: 0 0 0 4px rgba(242,165,22,.18); }
.dot.blue { background: var(--sky); box-shadow: 0 0 0 4px rgba(108,181,223,.18); }
.dot.gray { background: #6B7689; box-shadow: none; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(52,211,153,.25);} 50% { box-shadow: 0 0 0 7px rgba(52,211,153,.06);} }
@media (prefers-reduced-motion: reduce) { .dot.pulse { animation: none; } html { scroll-behavior: auto; } }

/* Mobile-Menü */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(8,12,20,.6); display: none; }
.drawer.open { display: block; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(360px, 88vw); background: var(--navy); border-left: 1px solid var(--navy-line); padding: 20px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.drawer-panel .row.between { margin-bottom: 18px; }
.drawer-panel a.navlink { color: var(--on-dark-2); font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; padding: 12px 8px; border-bottom: 1px solid var(--navy-line-soft); text-decoration: none; display: flex; justify-content: space-between; }
.drawer-panel a.navlink.active { color: #fff; }
.drawer-panel a.navlink.active::after { content: "●"; color: var(--sky); font-size: .7rem; }
.drawer-foot { margin-top: auto; padding-top: 18px; color: var(--on-dark-3); font-family: var(--font-mono); font-size: .75rem; }

/* ---------- Hero ---------- */
.hero { background-color: var(--navy); color: var(--on-dark-2); position: relative; overflow: hidden;
  background-image: linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 48px 48px; background-position: -1px -1px; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 80px; background: linear-gradient(transparent, rgba(20,27,41,.6)); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; padding-top: 40px; padding-bottom: 40px; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.08; margin-bottom: 14px; }
.hero p.lead { font-size: 1.08rem; max-width: 720px; color: var(--on-dark-2); }
.hero .row.between { align-items: flex-end; }
.eyebrow { display: flex; gap: 10px; align-items: baseline; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--sky); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sky-2); flex-shrink: 0; transform: translateY(-1px); }
.hero.compact .wrap { padding-top: 28px; padding-bottom: 28px; }
.hero.compact h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin-bottom: 4px; }
.hero .crumbs { font-family: var(--font-mono); font-size: .78rem; color: var(--on-dark-3); margin-bottom: 8px; letter-spacing: .04em; }
.hero .crumbs a { color: var(--on-dark-2); }

/* KPI-Kacheln im Hero */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.kpi { border: 1px solid var(--navy-line-soft); background: rgba(255,255,255,.018); border-radius: 14px; padding: 16px 18px; }
.kpi .k { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-3); }
.kpi .v { font-family: var(--font-head); font-weight: 800; color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.15; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: .5em; color: var(--on-dark-3); font-weight: 600; margin-left: 4px; }
.kpi .s { font-size: .82rem; color: var(--on-dark-3); margin-top: 2px; }
.kpi .s .up { color: var(--green); }
.kpi .s .down { color: #F08A8A; }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Live-Status-Box (wie Webseite) */
.live { margin-top: 26px; border: 1px solid var(--navy-line-soft); background: rgba(255,255,255,.02); border-radius: 14px; }
.live-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 20px; }
.pill-label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sky); border: 1px solid var(--navy-line); border-radius: 6px; padding: 3px 8px; }
.live-title { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; }
.live-sub { font-family: var(--font-mono); font-size: .8rem; color: var(--on-dark-3); }
.live-clock { margin-left: auto; font-family: var(--font-mono); font-weight: 500; font-size: clamp(1.6rem, 4vw, 2.2rem); color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.live-items { border-top: 1px solid var(--navy-line-soft); padding: 12px 20px 14px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: var(--font-mono); font-size: .82rem; color: var(--on-dark-2); }
.live-items span { display: inline-flex; gap: 8px; align-items: center; }
.live-items .dot { width: 7px; height: 7px; box-shadow: none; }
.live-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 20px 18px; }
.live form { margin: 0; }

/* ---------- Inhalt ---------- */
.content { padding: 36px 0 110px; }
.section { margin-bottom: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-title { position: relative; padding-top: 16px; margin: 0; }
.section-title::before { content: ""; position: absolute; top: 0; left: 0; width: 48px; height: 3px; border-radius: 2px; background: var(--sky-2); }
.section-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.sidebar { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 960px) { .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.sidebar { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.card-body { padding: 22px; }
.card h3 + p { margin-top: -4px; }
.card.dark { background: var(--navy); border-color: var(--navy-line); color: var(--on-dark-2); }
.card.dark h3 { color: #fff; }

/* Leistungskarten-Stil (Icon + Titel) */
.svc { display: flex; flex-direction: column; gap: 10px; text-decoration: none !important; color: inherit; transition: transform .15s, box-shadow .15s; }
a.svc:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.svc-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--soft-blue); color: var(--blue); }
.svc-icon svg { width: 24px; height: 24px; }
.svc .big { font-family: var(--font-head); font-weight: 800; font-size: 1.7rem; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-body); font-weight: 600; font-size: .98rem; line-height: 1.2; padding: 12px 20px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; font-weight: 700; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-soft { background: var(--soft-blue); color: var(--link); }
.btn-soft:hover { filter: brightness(.97); }
.btn-danger { background: transparent; color: var(--red); border-color: rgba(224,82,82,.4); }
.btn-danger:hover { background: var(--soft-red); }
.btn-green { background: #1F9D6E; color: #fff; }
.btn-green:hover { background: #198A60; }
.btn-amber { background: transparent; border-color: rgba(242,165,22,.55); color: #B47605; }
:root[data-theme="dark"] .btn-amber { color: var(--amber); }
.btn-sm { padding: 8px 12px; font-size: .88rem; border-radius: 7px; }
.btn-block { width: 100%; }
.hero .btn-ghost, .card.dark .btn-ghost, .live .btn-ghost { color: #fff; border-color: var(--navy-line); }
.hero .btn-ghost:hover, .live .btn-ghost:hover { border-color: var(--sky-2); color: #fff; background: rgba(255,255,255,.04); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.linklike { background: none; border: none; color: var(--link); cursor: pointer; padding: 0; font: inherit; }
.linklike:hover { text-decoration: underline; }
form.inline { display: inline; margin: 0; }

/* Formulare */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 18px; }
.f { grid-column: span 12; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f.s6 { grid-column: span 6; } .f.s4 { grid-column: span 4; } .f.s3 { grid-column: span 3; } .f.s8 { grid-column: span 8; } .f.s2 { grid-column: span 2; }
@media (max-width: 720px) { .f.s6, .f.s4, .f.s8 { grid-column: span 12; } .f.s3, .f.s2 { grid-column: span 6; } }
label, .label { font-weight: 600; font-size: .88rem; color: var(--ink); }
.hint { font-size: .8rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=tel], input[type=url], input[type=month], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--field); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 11px 13px; min-height: 46px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky-2); box-shadow: 0 0 0 4px rgba(69,152,200,.18); }
input.mono, .mono input { font-family: var(--font-mono); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--blue); flex-shrink: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .95rem; color: var(--text); cursor: pointer; }
.check input { margin-top: 2px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.form-actions .grow { flex: 1; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin: 0; }
legend { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--muted); padding: 0 6px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; gap: 3px; background: var(--field); flex-wrap: wrap; }
.seg label { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 7px; cursor: pointer; font-weight: 500; font-size: .92rem; color: var(--text); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--blue); color: #fff; }
.seg label:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(69,152,200,.35); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: .85rem; border: 1px solid var(--line-2); background: var(--card); color: var(--text); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chip:hover { border-color: var(--sky-2); color: var(--link); }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.timepair { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .timepair { grid-template-columns: 1fr 1fr; } }
.preview-box { background: var(--soft-blue); border-radius: var(--radius-sm); padding: 12px 16px; display: flex; gap: 22px; flex-wrap: wrap; font-family: var(--font-mono); font-size: .88rem; color: var(--ink); }
.preview-box b { font-weight: 600; }

/* Flash-Meldungen */
.flashes { position: fixed; top: 86px; right: 20px; z-index: 70; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.flash { background: var(--navy); color: #fff; border: 1px solid var(--navy-line); border-left: 4px solid var(--green); border-radius: 10px; padding: 12px 40px 12px 16px; box-shadow: var(--shadow-lg); position: relative; font-size: .95rem; animation: slidein .25s ease-out; }
.flash.err { border-left-color: var(--red); }
.flash.info { border-left-color: var(--sky); }
.flash.warn { border-left-color: var(--amber); }
.flash button { position: absolute; top: 8px; right: 8px; background: none; border: none; color: var(--on-dark-3); cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 4px; }
@keyframes slidein { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.alert { border-radius: var(--radius-sm); padding: 14px 16px; background: var(--soft-blue); color: var(--ink); display: flex; gap: 12px; align-items: flex-start; }
.alert.warn { background: var(--soft-amber); }
.alert.err { background: var(--soft-red); }
.alert.ok { background: var(--soft-green); }
.alert p:last-child { margin-bottom: 0; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: var(--soft-blue); color: var(--link); white-space: nowrap; font-weight: 500; }
.badge.entwurf, .badge.warn { background: var(--soft-amber); color: #A86C00; }
.badge.abgeschlossen { background: var(--soft-blue); color: var(--link); }
.badge.versendet, .badge.ok { background: var(--soft-green); color: #11795A; }
.badge.over, .badge.err { background: var(--soft-red); color: #B33A3A; }
.badge.gray { background: rgba(103,116,135,.12); color: var(--muted); }
:root[data-theme="dark"] .badge.entwurf, :root[data-theme="dark"] .badge.warn { color: var(--amber); }
:root[data-theme="dark"] .badge.versendet, :root[data-theme="dark"] .badge.ok { color: var(--green); }
:root[data-theme="dark"] .badge.over, :root[data-theme="dark"] .badge.err { color: #F08A8A; }

/* Avatar */
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: .9rem; flex-shrink: 0; letter-spacing: .02em; }
.avatar.sm { width: 32px; height: 32px; font-size: .75rem; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.15rem; }

/* Häkchen-Liste */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.tick { width: 26px; height: 26px; border-radius: 50%; background: #1F3347; color: var(--sky); display: inline-grid; place-items: center; flex-shrink: 0; }
.tick svg { width: 14px; height: 14px; }
.card .tick { background: var(--soft-blue); color: var(--blue); }

/* Fortschritt / Kontingent */
.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--blue); }
.meter.warn > i { background: var(--amber); }
.meter.over > i { background: var(--red); }
.contingent { display: grid; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contingent:last-child { border-bottom: none; padding-bottom: 0; }
.contingent:first-child { padding-top: 0; }
.contingent .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.contingent .nums { font-family: var(--font-mono); font-size: .88rem; color: var(--ink); white-space: nowrap; }
.contingent .meta { font-size: .82rem; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* Eintragsliste */
.entries { display: flex; flex-direction: column; }
.entry { display: grid; grid-template-columns: 92px 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); text-decoration: none !important; color: inherit; transition: background .12s; }
.entry:last-child { border-bottom: none; }
a.entry:hover { background: rgba(69,152,200,.05); }
.entry .when { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); line-height: 1.35; }
.entry .when b { color: var(--ink); font-weight: 600; display: block; font-size: .88rem; }
.entry .what { min-width: 0; }
.entry .who { font-weight: 600; color: var(--ink); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .95rem; }
.entry .desc { color: var(--text); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry .dur { font-family: var(--font-mono); font-weight: 600; font-size: 1rem; color: var(--ink); text-align: right; white-space: nowrap; }
.entry .dur small { display: block; font-weight: 400; font-size: .72rem; color: var(--muted); }
.entry.select { grid-template-columns: 28px 92px minmax(0, 1fr) auto; cursor: pointer; }
@media (max-width: 640px) {
  .entry { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 14px 16px; gap: 12px; }
  .entry .when { grid-column: 2 / 4; grid-row: 1; display: flex; gap: 8px; }
  .entry .when b { display: inline; }
  .entry .avatar { grid-row: 1 / 3; grid-column: 1; width: 34px; height: 34px; font-size: .72rem; align-self: start; }
  .entry .what { grid-column: 2; grid-row: 2; }
  .entry .dur { grid-column: 3; grid-row: 2; }
  .entry .desc { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .entry.select { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .entry.select .when { grid-column: 2 / 4; }
  .entry.select input { grid-row: 1 / 3; grid-column: 1; align-self: start; }
  .entry.select .what { grid-column: 2; }
}
.day-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 22px; background: rgba(69,152,200,.06); border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: .8rem; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.day-head b { color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .day-head { padding: 10px 16px; } }
.lock { color: var(--muted); display: inline-flex; }
.lock svg { width: 14px; height: 14px; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th { text-align: left; font-family: var(--font-mono); font-weight: 500; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table td.num, .table th.num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.table tfoot td { font-weight: 700; color: var(--ink); border-top: 2px solid var(--line-2); }
.table tbody tr:hover { background: rgba(69,152,200,.04); }
.table a.rowlink { color: var(--ink); font-weight: 600; }
@media (max-width: 680px) {
  table.table.stack-sm thead { display: none; }
  table.table.stack-sm tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  table.table.stack-sm td { border: none; padding: 0; }
  table.table.stack-sm td[data-l]::before { content: attr(data-l) ": "; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  table.table.stack-sm td.num { text-align: right; }
  table.table.stack-sm tfoot tr { border-bottom: none; }
}

/* Filterleiste */
.filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.filters .f { grid-column: auto; }
@media (max-width: 1000px) { .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .filters { grid-template-columns: 1fr 1fr; } }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 16px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; margin-bottom: -1px; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--sky-2); }
.tabs a:hover { color: var(--ink); }
.period-nav { display: flex; align-items: center; gap: 8px; }
.period-nav .label { font-family: var(--font-mono); font-weight: 500; min-width: 170px; text-align: center; }

/* Kalender */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .wd { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 4px; }
.cal .day { min-height: 92px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--card); display: flex; flex-direction: column; gap: 4px; text-decoration: none !important; color: inherit; transition: border-color .12s; }
.cal a.day:hover { border-color: var(--sky-2); }
.cal .day.out { opacity: .4; }
.cal .day.today { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.cal .day .n { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); }
.cal .day .h { margin-top: auto; font-family: var(--font-mono); font-weight: 600; color: var(--ink); font-size: .95rem; }
.cal .day .bar { height: 4px; border-radius: 4px; background: var(--sky-2); }
.cal .day.weekend { background: transparent; }
@media (max-width: 640px) { .cal { gap: 3px; } .cal .day { min-height: 58px; padding: 5px; border-radius: 7px; } .cal .day .h { font-size: .72rem; } .cal .wd { font-size: .6rem; letter-spacing: .04em; } }

/* Woche */
.week { display: grid; gap: 14px; }
.week-day { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
.week-day .dlabel { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); padding-top: 14px; }
.week-day .dlabel b { display: block; color: var(--ink); font-size: 1rem; }
.week-day .dlabel .sum { display: inline-block; margin-top: 6px; color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .week-day { grid-template-columns: 1fr; gap: 6px; } .week-day .dlabel { padding-top: 0; display: flex; gap: 10px; align-items: baseline; } .week-day .dlabel b { display: inline; } .week-day .dlabel .sum { margin: 0 0 0 auto; } }

/* Schritte 01/02/03 */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.step { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: var(--card); display: flex; gap: 14px; align-items: flex-start; }
.step .no { font-family: var(--font-mono); font-weight: 600; font-size: 1.5rem; color: var(--line-2); line-height: 1; }
.step b { display: block; color: var(--ink); font-family: var(--font-head); }
.step span { font-size: .85rem; color: var(--muted); }
.step.active { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue) inset; }
.step.active .no { color: var(--blue); }
.step.done .no { color: var(--sky-2); }
.hero .steps .step { background: rgba(255,255,255,.02); border-color: var(--navy-line-soft); }
.hero .steps .step b { color: #fff; }
.hero .steps .step span { color: var(--on-dark-3); }
.hero .steps .step .no { color: #3A4559; }
.hero .steps .step.active { border-color: var(--sky-2); box-shadow: none; }
.hero .steps .step.active .no { color: var(--sky); }
.hero .steps .step.done .no { color: var(--sky-2); }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; gap: 8px; } .step { padding: 12px 14px; } .step span { display: none; } .hero .steps { margin-top: 18px; } }

/* Diagramme */
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 320px; }
.chart-empty { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: .92rem; text-align: center; }
.legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.legend-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: .92rem; }
.legend-list .bar { grid-column: 1 / 3; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.legend-list .bar i { display: block; height: 100%; background: var(--blue); border-radius: 6px; }
.legend-list .val { font-family: var(--font-mono); color: var(--ink); font-weight: 500; }

/* Kundenkarte */
.cust { display: flex; gap: 14px; align-items: flex-start; text-decoration: none !important; color: inherit; }
.cust h3 { margin: 0 0 2px; font-size: 1.05rem; }
.cust .meta { font-size: .85rem; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: .94rem; margin: 0; }
.kv dt { color: var(--muted); font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; padding-top: 3px; }
.kv dd { margin: 0; color: var(--ink); word-break: break-word; }

/* Leere Zustände */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 42px; height: 42px; color: var(--sky-2); margin-bottom: 10px; }
.empty h3 { color: var(--ink); }

/* Schwebender Button (wie „Fragen?“) */
.fab { position: fixed; right: 22px; bottom: 22px; z-index: 50; display: inline-flex; align-items: center; gap: 10px; background: #286F9F; color: #fff; font-weight: 700; font-size: 1.05rem; padding: 15px 22px; border-radius: 999px; box-shadow: 0 10px 30px rgba(20, 27, 41, .35); text-decoration: none !important; transition: transform .15s, background .15s; }
.fab:hover { background: var(--blue-hover); transform: translateY(-2px); }
.fab svg { width: 22px; height: 22px; }
@media (max-width: 640px) { .fab { right: 16px; bottom: 16px; padding: 14px 20px; } }

/* Fußzeile */
.ftr { background: var(--navy); color: var(--on-dark-3); border-top: 1px solid var(--navy-line); font-size: .88rem; }
.ftr .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 24px; }
.ftr .brand-logo { height: 28px; }
.ftr a { color: var(--on-dark-2); }
.ftr .mono { font-size: .76rem; letter-spacing: .06em; }

/* Login / Portal */
.auth { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 30px; padding: 24px; background-color: var(--navy);
  background-image: linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px); background-size: 48px 48px; }
.auth-card { width: min(440px, 100%); background: var(--card); border-radius: 18px; padding: 34px 30px; box-shadow: var(--shadow-lg); }
.auth-logo { display: block; width: min(330px, 82vw); height: auto; margin: 0 auto; }
.auth-card h1 { font-size: 1.5rem; text-align: center; margin-bottom: 4px; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 24px; font-size: .95rem; }
.auth-foot { margin-top: 22px; text-align: center; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); letter-spacing: .08em; }

/* Unterschrift */
.sig-wrap { border: 2px dashed var(--line-2); border-radius: 14px; background: #fff; position: relative; touch-action: none; }
.sig-wrap canvas { display: block; width: 100%; height: 260px; border-radius: 12px; cursor: crosshair; }
.sig-wrap .base { position: absolute; left: 24px; right: 24px; bottom: 54px; border-bottom: 1px solid #C9D1DB; pointer-events: none; }
.sig-wrap .x { position: absolute; left: 24px; bottom: 58px; color: #9AA5B5; font-family: var(--font-mono); pointer-events: none; }
.sig-img { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; max-width: 320px; }

/* PDF-Vorschau */
.pdf-frame { width: 100%; height: 78vh; min-height: 520px; border: 1px solid var(--line); border-radius: 12px; background: #525659; }
@media (max-width: 640px) { .pdf-frame { height: 70vh; min-height: 420px; } }

/* Code / Token */
.token { font-family: var(--font-mono); font-size: .82rem; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; word-break: break-all; color: var(--ink); }
.qr { width: 240px; max-width: 100%; background: #fff; border-radius: 12px; overflow: hidden; line-height: 0; }
.qr svg { display: block; width: 100%; height: auto; }

hr.sep { border: none; border-top: 1px solid var(--line); margin: 22px 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--ink); }
details[open] summary { margin-bottom: 12px; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }

@media print {
  .hdr, .topstrip, .fab, .ftr, .flashes, .no-print { display: none !important; }
  .hero { background: none; color: #000; } .hero h1 { color: #000; }
  body { background: #fff; }
}
@media (min-width: 961px) { .sticky-side { position: sticky; top: 92px; } }
@media (max-width: 640px) { .hdr .hdr-theme { display: none; } }
@media (max-width: 480px) { .hdr.has-timer .brand-logo { display: none; } .hdr.has-timer .brand-mark { display: block; } }
.t-warn { color: #A86C00; }
:root[data-theme="dark"] .t-warn { color: var(--amber); }
.hero .t-warn { color: var(--amber); }
tr.sub td { border-top: none; }

/* Betroffenes System – Auswahl aus Commander Inventar */
[hidden] { display: none !important; }
.inv-input { display: flex; gap: 8px; align-items: stretch; }
.inv-input input { flex: 1; min-width: 0; }
.inv-scan { padding: 0 14px; flex-shrink: 0; }
.inv-scan svg { width: 20px; height: 20px; }
.inv-linked { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .78rem; color: var(--link); background: var(--soft-blue); border-radius: 8px; padding: 5px 5px 5px 10px; }
.inv-linked svg { width: 14px; height: 14px; flex-shrink: 0; }
.inv-linked span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.inv-unlink { border: none; background: transparent; color: inherit; font-size: 1.15rem; line-height: 1; width: 30px; height: 30px; border-radius: 6px; cursor: pointer; flex-shrink: 0; }
.inv-unlink:hover { background: rgba(31, 106, 153, .12); }
:root[data-theme="dark"] .inv-linked { color: var(--sky); }
@media (max-width: 420px) { .inv-scan span { display: none; } }
.chip svg { width: 14px; height: 14px; vertical-align: -2px; }

/* QR-Etikett scannen */
body.scan-open { overflow: hidden; }
.scan-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(9, 14, 22, .72); display: grid; place-items: center; padding: 16px; }
.scan-box { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); color: var(--text); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.scan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.scan-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.scan-head h3 svg { width: 20px; height: 20px; color: var(--sky-2); }
.scan-head .icon-btn { color: var(--ink); border-color: var(--line-2); width: 40px; height: 40px; }
.scan-head .icon-btn:hover { background: var(--soft-blue); }
.scan-cam { position: relative; border-radius: 12px; overflow: hidden; background: #0B111B; aspect-ratio: 4 / 3; }
.scan-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 16% 22%; border: 2px solid rgba(108, 181, 223, .95); border-radius: 12px; box-shadow: 0 0 0 999px rgba(9, 14, 22, .32); }
.scan-manual label { display: block; margin-bottom: 6px; font-size: .85rem; font-weight: 600; color: var(--ink); }
.scan-manual input { flex: 1; min-width: 0; text-transform: uppercase; }
.inv-table tr.sub td { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--paper); padding-top: 8px; padding-bottom: 8px; }
.scan-manual input:placeholder-shown { text-transform: none; }
@media (max-width: 680px) {
  .inv-table td.m-hide { display: none; }
  .inv-table tr.sub { padding: 14px 16px 2px; border-bottom: none; }
  .inv-table tr.sub td { background: transparent; padding: 0; }
}
.seg.remember { display: flex; }
.seg.remember label { flex: 1; justify-content: center; padding: 8px 6px; white-space: nowrap; }
@media (max-width: 680px) { table.table.stack-sm.sessions tr { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) {
  table.table.stack-sm.cfg-table tr { grid-template-columns: 1fr; }
  table.table.stack-sm.cfg-table td { overflow-wrap: anywhere; }
}

/* Wiederkehrende Einsätze */
.seg.days { display: flex; flex-wrap: nowrap; }
.seg.days label { flex: 1; min-width: 0; padding: 8px 0; justify-content: center; }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.btn-del:hover { color: #B33A3A; border-color: #E05252; }

/* Zeitlisten: abwechselnd weiß / grau, Kundenname einzeilig */
.entries .entry:nth-child(even) { background: var(--zebra); }
.entries a.entry:hover { background: rgba(69, 152, 200, .09); box-shadow: inset 3px 0 0 var(--sky-2); }
.entry .who .cust-name { flex: 0 0 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry .who .badge { font-size: .62rem; padding: 3px 7px; }

/* Cloudflare Turnstile auf der Login-Seite */
.turnstile { min-height: 65px; display: flex; justify-content: center; }
.turnstile-msg { text-align: center; margin: -6px 0 0; }

/* ---------- Einstellungen: Navigation links, Inhalt rechts ---------- */
.grid.split { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
@media (max-width: 960px) { .grid.split { grid-template-columns: minmax(0, 1fr); } }
.settings { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 36px; align-items: start; }
.snav { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 2px; }
.snav-group { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 18px 12px 6px; }
.snav a, .snav-m-list a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: 500; font-size: .93rem; line-height: 1.25; }
.snav a svg, .snav-m-list a svg, .snav-m summary svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.snav-label { flex: 1; min-width: 0; }
.snav a:hover, .snav-m-list a:hover { background: var(--soft-blue); color: var(--ink); }
.snav a.active, .snav-m-list a.active { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--sky-2), var(--shadow); }
.snav a.active svg, .snav-m-list a.active svg { color: var(--blue); }
.sdot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; background: var(--line-2); }
.sdot.ok { background: var(--green); }
.sdot.warn { background: var(--amber); }
.sdot.err { background: var(--red); }
.snav-m { display: none; }
.settings-main { min-width: 0; }
.spage-head { margin-bottom: 22px; }
.spage-group { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sky-2); }
.spage-head h2 { margin: 4px 0 6px; font-size: 1.55rem; }
.spage-head p { margin: 0; color: var(--muted); max-width: 70ch; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-title h3 { margin: 0; }
.fsec { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 22px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-actions.bar { border-top: 1px solid var(--line); padding-top: 18px; }
.card-foot { margin: 0; padding: 14px 22px; border-top: 1px solid var(--line); }
.logo-preview { width: 100%; max-width: 320px; display: block; background: var(--navy); border-radius: 12px; padding: 18px; box-sizing: border-box; }
.srow { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 10px 32px; padding: 22px 0; border-top: 1px solid var(--line); align-items: start; }
.srow.first { border-top: 0; padding-top: 2px; }
.srow-l b { display: block; color: var(--ink); font-weight: 600; }
.srow-l span { display: block; font-size: .82rem; color: var(--muted); margin-top: 4px; }
.srow-r.f { gap: 6px; grid-column: auto; }

/* Übersicht */
.todo-card { margin-bottom: 8px; }
.todo-list { list-style: none; padding: 0; margin: 0; }
.todo-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.todo-list li:first-child { border-top: 0; padding-top: 2px; }
.todo-text { flex: 1; min-width: 0; color: var(--ink); }
.todo-list .btn svg { width: 14px; height: 14px; }
.sgroup-title { font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 30px 0 12px; }
.stiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stile { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.stile:hover { border-color: var(--sky-2); transform: translateY(-1px); }
.stile-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--soft-blue); color: var(--blue); display: grid; place-items: center; flex: none; }
.stile-ico svg { width: 20px; height: 20px; }
.stile-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.stile-body b { color: var(--ink); font-weight: 600; }
.stile-text { display: flex; align-items: baseline; gap: 8px; font-size: .85rem; color: var(--muted); }
.stile-text .sdot { transform: translateY(-1px); }
.stile-go { color: var(--muted); flex: none; }
.stile-go svg { width: 16px; height: 16px; display: block; }

/* Tätigkeitsarten */
.acts-new input[name=name] { flex: 1; min-width: 180px; min-height: 38px; padding: 7px 10px; }
.acts-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 64px 72px 80px; gap: 12px; align-items: center; padding: 7px 22px; border-top: 1px solid var(--line); margin: 0; }
.acts-row:nth-child(even) { background: var(--zebra); }
.acts-headrow { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 10px 22px; border-top: 0; background: none !important; }
.acts-row input[name=name] { min-height: 38px; padding: 7px 10px; }
.acts-row.off input[name=name] { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.acts-lbl { display: none; }
.acts-btns { display: flex; gap: 6px; justify-content: flex-end; }

/* Textbausteine */
.chip { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.chip-n { font-family: var(--font-mono); font-size: .74rem; opacity: .7; }
.snips .snip { padding: 12px 22px; border-top: 1px solid var(--line); }
.snips .snip:first-child { border-top: 0; }
.snip, .snip summary { min-width: 0; }
.snip summary { font-weight: 600; }
.snip-prev { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); margin: 2px 0 0 1.1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snip[open] .snip-prev { display: none; }
.snip-empty { padding: 14px 22px; margin: 0; }

@media (max-width: 960px) {
  .settings { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .snav { display: none; }
  .snav-m { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
  .snav-m summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; margin: 0; cursor: pointer; color: var(--ink); font-weight: 600; }
  .snav-m summary::-webkit-details-marker { display: none; }
  .snav-m summary svg { color: var(--blue); }
  .snav-m-more { font-size: .8rem; color: var(--link); font-weight: 500; }
  .snav-m[open] summary { border-bottom: 1px solid var(--line); }
  .snav-m-list { display: flex; flex-direction: column; gap: 2px; padding: 4px 8px 10px; }
  .snav-m-list .snav-group { padding: 14px 12px 4px; }
}
@media (max-width: 720px) {
  .srow { grid-template-columns: minmax(0, 1fr); padding: 18px 0; }
  .stiles { grid-template-columns: 1fr; }
  .acts-headrow { display: none; }
  .acts-row { grid-template-columns: 1fr 1fr; padding: 12px 16px; }
  .acts-row input[name=name] { grid-column: 1 / -1; }
  .acts-lbl { display: inline; }
  .todo-list li { flex-wrap: wrap; }
  .todo-text { flex-basis: calc(100% - 24px); }
  .todo-list li .btn { margin-left: 20px; }
  .spage-head h2, .spage-group { display: none; }
}
