/* ==========================================================================
   Ticketing – Designsystem v3 (LUKAS Kassensysteme)
   Übernommen aus Artikelverwaltung / Installationsdokumentation:
   neutrale Grautöne, Graphit (#3a4044) als Hauptfarbe, Markengelb (#faba00)
   nur als Akzent (Markierungen, Hauptaktion), flache Flächen mit Rahmen.
   Keine externen Fonts/CDNs (DSGVO) – Systemschrift.
   Modifier nie ".alert"/".warn" nennen (kollidiert mit Flash-Meldungen).
   ========================================================================== */

:root {
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font);
  --font-mono: "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace;

  --bg: #f7f7f6;
  --bg-glow: transparent;
  --surface: #ffffff;
  --surface-2: #f3f3f2;
  --surface-3: #eceded;
  --text: #22262b;
  --text-2: #3a4044;
  --muted: #6c7178;
  --border: #e5e6e6;
  --border-strong: #d3d5d6;

  /* Graphit: Schaltflächen, Links, aktive Elemente */
  --primary: #3a4044;
  --primary-hover: #2a2f33;
  --primary-soft: #eceded;
  --primary-text: #3a4044;
  --on-primary: #ffffff;

  /* Markengelb: nur als Fläche/Markierung, nie als Textfarbe auf Weiß */
  --brand: #faba00;
  --brand-hover: #e6ab00;
  --on-brand: #22262b;

  /* Ocker: lesbare Textvariante des Gelbs (Hinweise, "hoch", zweite Diagrammlinie) */
  --accent: #94601f;
  --accent-hover: #7a4e17;
  --accent-soft: #fbeedf;
  --on-accent: #ffffff;

  --danger: #b3402a;
  --danger-soft: #fbe9e4;
  --warning: #94601f;
  --warning-soft: #fbeedf;
  --success: #12753a;
  --success-soft: #def5e6;
  --info: #1d4ed8;
  --info-soft: #e3ebfe;
  --violet: #6d28d9;
  --violet-soft: #eee8fe;

  --ring: 0 0 0 3px rgba(58, 64, 68, .28);
  --shadow-xs: none;
  --shadow-sm: none;
  --shadow: 0 12px 32px -8px rgb(24 28 26 / 22%), 0 2px 6px rgb(24 28 26 / 8%);
  --shadow-lg: 0 12px 32px -8px rgb(24 28 26 / 22%), 0 2px 6px rgb(24 28 26 / 8%);

  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;

  --sidebar-w: 248px;
  --topbar-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --logo: url(../img/logo.png);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131416; --bg-glow: transparent; --surface: #1b1d20; --surface-2: #222528; --surface-3: #2a2d31;
    --text: #e8e9ea; --text-2: #c9ccd0; --muted: #9a9fa6; --border: #2e3135; --border-strong: #41454a;
    --primary: #dcdee1; --primary-hover: #f0f1f2; --primary-soft: #2a2d31; --primary-text: #dcdee1; --on-primary: #17191c;
    --accent: #efc993; --accent-hover: #f6dcb4; --accent-soft: #3c2c17; --on-accent: #17191c;
    --danger: #f08a70; --danger-soft: #3c2219; --warning: #efc993; --warning-soft: #3c2c17;
    --success: #4ade80; --success-soft: #0f2c1b; --info: #93b4fd; --info-soft: #15223f; --violet: #c4b5fd; --violet-soft: #241b40;
    --ring: 0 0 0 3px rgba(220, 222, 225, .30);
    --shadow-xs: none; --shadow-sm: none; --shadow: 0 16px 40px -8px rgb(0 0 0 / 60%); --shadow-lg: 0 16px 40px -8px rgb(0 0 0 / 60%);
    --logo: url(../img/logo-dark.png);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131416; --bg-glow: transparent; --surface: #1b1d20; --surface-2: #222528; --surface-3: #2a2d31;
  --text: #e8e9ea; --text-2: #c9ccd0; --muted: #9a9fa6; --border: #2e3135; --border-strong: #41454a;
  --primary: #dcdee1; --primary-hover: #f0f1f2; --primary-soft: #2a2d31; --primary-text: #dcdee1; --on-primary: #17191c;
  --accent: #efc993; --accent-hover: #f6dcb4; --accent-soft: #3c2c17; --on-accent: #17191c;
  --danger: #f08a70; --danger-soft: #3c2219; --warning: #efc993; --warning-soft: #3c2c17;
  --success: #4ade80; --success-soft: #0f2c1b; --info: #93b4fd; --info-soft: #15223f; --violet: #c4b5fd; --violet-soft: #241b40;
  --ring: 0 0 0 3px rgba(220, 222, 225, .30);
  --shadow-xs: none; --shadow-sm: none; --shadow: 0 16px 40px -8px rgb(0 0 0 / 60%); --shadow-lg: 0 16px 40px -8px rgb(0 0 0 / 60%);
  --logo: url(../img/logo-dark.png);
  color-scheme: dark;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text);
  background: radial-gradient(900px 420px at 70% -120px, var(--bg-glow), transparent 70%), var(--bg);
  background-attachment: fixed; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-family: var(--font-display); font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: 24px; letter-spacing: -.025em; } h2 { font-size: 17px; } h3 { font-size: 15px; } h4 { font-size: 13px; }
p { margin: 0 0 var(--sp-3); }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-4) 0; }
code, kbd { font-family: var(--font-mono); font-size: .88em; background: var(--surface-3); padding: 2px 6px; border-radius: 6px; }
kbd { border: 1px solid var(--border-strong); border-bottom-width: 2px; background: var(--surface); color: var(--muted); font-size: 11px; padding: 1px 6px; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }
::selection { background: var(--primary-soft); color: var(--text); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.grow { flex: 1 1 auto; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre { white-space: pre-wrap; word-break: break-word; }
.hidden { display: none !important; }
.stack > * + * { margin-top: var(--sp-4); }
.stack-sm > * + * { margin-top: var(--sp-2); }
.row { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }

/* ---------- App-Shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  padding: 16px 12px 12px; background: var(--surface); border-right: 1px solid var(--border); scrollbar-width: thin;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; font-family: var(--font-display); font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; color: var(--text); }
.brand:hover { text-decoration: none; }
/* Das Logo hat Graphit und Gelb. In der dunklen Ansicht wird das Graphit hell. */
.logo { display: block; width: 150px; aspect-ratio: 1688 / 624; background: var(--logo) left center / contain no-repeat; }
.brand { flex-direction: column; align-items: flex-start !important; gap: 6px !important; }
.brand b { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.nav-section { margin-top: var(--sp-5); }
.nav-label { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 0 10px 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: 36px; border-radius: var(--radius);
  color: var(--text-2); font-weight: 550; border: 1px solid transparent;
  transition: background .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
}
.nav a .icon { color: var(--muted); transition: color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--surface-3); color: var(--primary); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }
.nav a.active .icon { color: var(--primary); }
.nav .count { margin-left: auto; font-size: 11.5px; font-weight: 650; background: var(--surface-3); color: var(--text-2); border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.nav .count.hot { background: var(--danger-soft); color: var(--danger); }
.nav .count.new { background: var(--brand); color: var(--on-brand); }
.new-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-right: 6px; vertical-align: middle; box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
.row-new .t-title { font-weight: 700; }
.nav a.sub { padding-left: 38px; font-size: 13px; min-height: 32px; font-weight: 500; position: relative; }
.nav a.sub::before { content: ""; position: absolute; left: 18px; top: 0; bottom: 0; width: 1px; background: var(--border-strong); }
.nav a.sub.active::before { background: var(--primary); width: 2px; }
.sidebar-foot { margin-top: auto; padding-top: var(--sp-4); }
.user-card {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: var(--radius); cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); color: var(--text); text-align: left;
}
.user-card:hover { border-color: var(--border-strong); }
.user-card .u-name { font-weight: 650; font-size: 13px; line-height: 1.2; }
.user-card .u-role { font-size: 12px; color: var(--muted); }
.scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: var(--sp-2);
  padding: 0 var(--sp-6) 0 var(--sp-2); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px);
}
.topbar .search { flex: 1 1 auto; max-width: 480px; position: relative; }
.topbar .search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.topbar .search input { padding-left: 38px; padding-right: 40px; height: 40px; background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-xs); border-radius: 12px; }
.topbar .search input:focus { border-color: var(--primary); }
.topbar .search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.topbar .search input:focus + kbd, .topbar .search input:not(:placeholder-shown) + kbd { display: none; }
.btn.menu-toggle { display: none; }
.content { padding: var(--sp-2) var(--sp-6) var(--sp-8) var(--sp-2); width: 100%; max-width: 1520px; animation: rise .28s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.page-head h1::after { content: "."; color: var(--brand); }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.breadcrumb a { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 14px;
  border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important; box-shadow: var(--shadow-xs);
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease), transform .08s;
}
.btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--border-strong) 70%, var(--text)); }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-accent { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 650; }
.btn-accent:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; color: var(--text); }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-block { width: 100%; }
.btn.is-dirty { box-shadow: 0 0 0 4px var(--accent-soft); background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary-text); cursor: pointer; font-weight: 550; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: 13px; color: var(--text-2); }
.field .req { color: var(--danger); }
.hint { font-size: 12.5px; color: var(--muted); }
.input, input:not([type]), input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], input[type=url], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .15s;
}
select { padding-right: 30px; cursor: pointer; }
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--border-strong) 60%, var(--text)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
input:disabled, select:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
input[type=file] { font: inherit; font-size: 13px; color: var(--text-2); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: 10px; padding: 7px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--surface-2); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex: none; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.is-invalid { border-color: var(--danger) !important; }
.field-error { color: var(--danger); font-size: 12.5px; font-weight: 550; display: flex; gap: 5px; align-items: center; }
.form-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid-3 { display: grid; gap: var(--sp-4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { display: flex; gap: var(--sp-2); justify-content: flex-end; flex-wrap: wrap; }
.code-input { font-family: var(--font-mono); font-size: 24px !important; letter-spacing: .4em; text-align: center; min-height: 56px !important; }

/* ---------- Karten / Panels ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 16px var(--sp-5); border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { font-size: 15px; }
.card-body { padding: var(--sp-5); }
.card-body.tight { padding: var(--sp-3) var(--sp-4); }
.card-foot { padding: 14px var(--sp-5); border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card > .table-wrap:first-child .table th:first-child { border-top-left-radius: var(--radius-lg); }
.card > .table-wrap:first-child .table th:last-child { border-top-right-radius: var(--radius-lg); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 348px; gap: var(--sp-5); align-items: start; }
.layout-side-left { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.sticky-side { position: sticky; top: calc(var(--topbar-h) + 8px); }

/* ---------- KPI-Kacheln ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-4); margin-bottom: var(--sp-5); }
.kpi {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon label" "value value"; align-items: center; gap: 10px 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px;
  color: var(--text); box-shadow: var(--shadow-sm); transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
}
a.kpi:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.kpi-icon { grid-area: icon; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.kpi .kpi-label { grid-area: label; font-size: 13px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .kpi-value { grid-area: value; font-family: var(--font-display); font-size: 32px; line-height: 1; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi:not(:has(.kpi-icon)) { grid-template-areas: "label label" "value value"; }
.kpi.is-alert .kpi-icon { background: var(--danger-soft); color: var(--danger); }
.kpi.is-alert .kpi-value { color: var(--danger); }
.kpi.is-warn .kpi-icon { background: var(--warning-soft); color: var(--warning); }
.kpi.is-warn .kpi-value { color: var(--warning); }
.kpi.tone-blue .kpi-icon { background: var(--info-soft); color: var(--info); }
.kpi.tone-green .kpi-icon { background: var(--success-soft); color: var(--success); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px;
  font-weight: 650; white-space: nowrap; background: var(--surface-3); color: var(--text-2); line-height: 1;
}
a.badge:hover { text-decoration: none; filter: brightness(.96); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-offen { background: var(--info-soft); color: var(--info); }
.status-in_bearbeitung { background: var(--warning-soft); color: var(--warning); }
.status-wartend { background: var(--violet-soft); color: var(--violet); }
.status-erledigt { background: var(--success-soft); color: var(--success); }
.st-blue { background: var(--info-soft); color: var(--info); }
.st-amber { background: var(--warning-soft); color: var(--warning); }
.st-violet { background: var(--violet-soft); color: var(--violet); }
.st-green { background: var(--success-soft); color: var(--success); }
.st-teal { background: var(--primary-soft); color: var(--primary-text); }
.st-orange { background: var(--accent-soft); color: var(--accent); }
.st-red { background: var(--danger-soft); color: var(--danger); }
.st-gray { background: var(--surface-3); color: var(--text-2); }
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.prio::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: currentColor; }
.prio-niedrig { color: var(--muted); } .prio-normal { color: var(--primary-text); } .prio-hoch { color: var(--accent); } .prio-dringend { color: var(--danger); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 12px; font-weight: 550; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
a.tag:hover { text-decoration: none; border-color: var(--primary); color: var(--primary-text); }
.due { font-size: 12.5px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.due.overdue { color: var(--danger); font-weight: 650; }
.due.soon { color: var(--warning); font-weight: 650; }
.pill-new { background: var(--accent-soft); color: var(--accent); }

.tse-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tse-chip b { font-weight: 650; color: var(--muted); }
.tse-chip.is-bald { background: var(--warning-soft); border-color: transparent; color: var(--warning); }
.tse-chip.is-abgelaufen { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.tse-chip.is-bald b, .tse-chip.is-abgelaufen b { color: inherit; }
.repeat-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.2fr) 38px; gap: 8px; align-items: end; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: 12px; font-weight: 650; color: var(--muted); letter-spacing: .01em; white-space: nowrap; background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); padding-top: 10px; padding-bottom: 10px; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .t-title { font-weight: 600; color: var(--text); display: block; }
.table .t-title:hover { color: var(--primary-text); text-decoration: none; }
.table .t-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.table .w-check { width: 40px; }
.table.compact td, .table.compact th { padding: 9px 12px; }
.table input, .table select { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
.t-main { min-width: 240px; }
.row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--danger); }

/* ---------- Filterleiste ---------- */
.toolbar { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; padding: 14px var(--sp-4); border-bottom: 1px solid var(--border); }
.toolbar select, .toolbar input { width: auto; min-height: 36px; padding: 5px 10px; font-size: 13px; border-radius: var(--radius-sm); }
.toolbar select { padding-right: 28px; font-weight: 550; color: var(--text-2); }
.toolbar select.is-set { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); }
.toolbar input[type=search] { min-width: 220px; flex: 1 1 220px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius); background: var(--surface-3); }
.seg a, .seg > label { padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; border-radius: 7px; cursor: pointer; transition: background .15s, color .15s; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.active, .seg > label:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.seg > label input { position: absolute; opacity: 0; pointer-events: none; }
.seg > label:has(input:focus-visible) { box-shadow: var(--ring); }
.seg-full { display: flex; width: 100%; }
.seg-full > * { flex: 1 1 0; justify-content: center; white-space: nowrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 13px; font-weight: 550; color: var(--text-2); background: var(--surface); }
.chip:hover { text-decoration: none; border-color: var(--primary); color: var(--primary-text); }
.chip.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.bulkbar { display: none; position: sticky; bottom: 20px; z-index: 15; margin: var(--sp-3) auto 0; width: fit-content; max-width: 100%;
  background: var(--text); color: var(--bg); border-radius: 14px; padding: 8px 10px 8px 18px; box-shadow: var(--shadow-lg); gap: 8px; align-items: center; flex-wrap: wrap; animation: rise .2s var(--ease); }
.bulkbar.show { display: flex; }
.bulkbar select { width: auto; min-height: 34px; padding: 4px 28px 4px 10px; font-size: 13px; border-radius: var(--radius-sm); }

/* ---------- Meldungen ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); border: 1px solid; margin-bottom: var(--sp-4); font-weight: 500; }
.alert-success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 25%, transparent); color: var(--success); }
.alert-error { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 25%, transparent); color: var(--danger); }
.alert-warning { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 25%, transparent); color: var(--warning); }
.alert-info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 25%, transparent); color: var(--info); }
.alert .icon { margin-top: 1px; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.toasts { position: fixed; z-index: 80; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 14px 11px 12px; border-radius: 12px; font-weight: 550;
  background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); animation: toast-in .28s var(--ease) both; max-width: 560px;
}
.toast .icon { color: #4ade80; }
.toast.is-warning .icon { color: #fbbf24; }
.toast.out { animation: toast-out .2s ease-in both; }
.toast button { background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 2px; display: grid; }
.toast button:hover { opacity: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Dropdown (details) ---------- */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; z-index: 40; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .14s var(--ease);
}
.dropdown-menu.left { left: 0; right: auto; }
.dropdown-menu.up { top: auto; bottom: calc(100% + 8px); left: 0; right: 0; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text);
  background: none; border: 0; font: inherit; font-weight: 500; text-align: left; cursor: pointer;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); text-decoration: none; }
.dropdown-menu .icon { color: var(--muted); }
.dropdown-menu .sep { height: 1px; background: var(--border); margin: 6px 0; }
.dropdown-menu .head { padding: 8px 10px; font-size: 12.5px; color: var(--muted); }

/* ---------- Avatar ---------- */
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); font-size: 11px; font-weight: 700;
  display: inline-grid; place-items: center; flex: none; letter-spacing: .02em; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent); }
.avatar-lg { width: 36px; height: 36px; font-size: 13px; }
.avatar-empty { background: var(--surface-3); color: var(--muted); box-shadow: none; }
.who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }

/* ---------- Benachrichtigungen ---------- */
.bell { position: relative; }
.bell .dot-count { position: absolute; top: 2px; right: 1px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.notif-list { max-height: 440px; overflow-y: auto; width: 370px; max-width: calc(100vw - 32px); }
.notif { display: block; padding: 10px; border-radius: var(--radius-sm); color: var(--text); position: relative; }
.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif.unread { padding-left: 22px; }
.notif.unread::before { content: ""; position: absolute; left: 9px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.notif .n-title { font-weight: 650; font-size: 13px; }
.notif .n-meta { font-size: 12px; color: var(--muted); }

/* ---------- Ticket-Detail ---------- */
.ticket-title { font-size: 22px; font-weight: 700; }
.props { display: grid; gap: var(--sp-3); }
.props .form-grid { gap: var(--sp-3); }
.props .field > label { font-size: 12px; color: var(--muted); font-weight: 600; }
.tl-item { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.tl-item:last-child { border-bottom: 0; }
.tl-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.tl-head .name { font-weight: 650; }
.tl-head time { font-size: 12.5px; color: var(--muted); }
.tl-body { color: var(--text); white-space: pre-wrap; word-break: break-word; line-height: 1.6; }
.tl-item.type-email .tl-bubble { background: var(--info-soft); border-radius: 12px; padding: 12px 14px; }
.tl-item.type-loesung .tl-bubble { background: var(--success-soft); border-radius: 12px; padding: 12px 14px; }
.tl-event { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0 9px 9px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--border); }
.tl-event:last-child { border-bottom: 0; }
.tl-event .icon { margin-top: 2px; }
.tl-event b { color: var(--text-2); font-weight: 650; }
.change del { color: var(--muted); text-decoration: line-through; }
.change ins { text-decoration: none; color: var(--text); font-weight: 650; }
.mention { color: var(--primary-text); font-weight: 650; background: var(--primary-soft); padding: 1px 5px; border-radius: 6px; }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.att { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 550; color: var(--text-2); background: var(--surface); max-width: 280px; box-shadow: var(--shadow-xs); }
.att:hover { border-color: var(--primary); text-decoration: none; color: var(--primary-text); }
.composer { border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.composer textarea { border: 0; box-shadow: none !important; min-height: 100px; border-radius: 14px 14px 0 0; background: transparent; }
.composer-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); border-radius: 0 0 14px 14px; }
.composer-bar select { width: auto; min-height: 32px; padding: 4px 28px 4px 10px; font-size: 13px; border-radius: var(--radius-sm); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 var(--sp-4); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a, .tabs button { padding: 14px 12px 12px; color: var(--muted); border: 0; background: none; font: inherit; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; }
.tabs .active { color: var(--text); border-bottom-color: var(--primary); }
.tabs .n { font-size: 11.5px; background: var(--surface-3); color: var(--text-2); padding: 0 7px; border-radius: 999px; font-weight: 650; }

/* ---------- Kunden-Combobox ---------- */
.combo { position: relative; }
.combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg); max-height: 340px; overflow-y: auto; padding: 6px; animation: pop .14s var(--ease);
}
.combo-item { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.combo-item[aria-selected="true"], .combo-item:hover { background: var(--primary-soft); }
.combo-item .c-name { font-weight: 600; }
.combo-item .c-name mark { background: transparent; color: var(--primary-text); font-weight: 750; }
.combo-item .c-meta { font-size: 12.5px; color: var(--muted); }
.combo-new { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 10px; color: var(--accent); font-weight: 650; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.combo-empty { padding: 10px; color: var(--muted); font-size: 13px; }
.selected-customer { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent); background: var(--primary-soft); border-radius: var(--radius); }
.selected-customer .grow { color: var(--text); }

/* ---------- Kanban ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(264px, 1fr); gap: var(--sp-4); overflow-x: auto; padding-bottom: var(--sp-4); align-items: start; }
.col { background: color-mix(in srgb, var(--surface-3) 55%, transparent); border-radius: var(--radius-lg); display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 10px; font-weight: 650; }
.col-body { padding: 2px 8px 8px; overflow-y: auto; min-height: 120px; display: flex; flex-direction: column; gap: 8px; transition: background .15s; border-radius: 0 0 var(--radius-lg) var(--radius-lg); scrollbar-width: thin; }
.col-body.drop { background: var(--primary-soft); outline: 2px dashed var(--primary); outline-offset: -4px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; box-shadow: var(--shadow-xs); cursor: grab; transition: box-shadow .15s, transform .15s, border-color .15s; }
.kcard:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.kcard.dragging { opacity: .45; transform: rotate(1.5deg); }
.kcard.is-overdue { box-shadow: inset 3px 0 0 var(--danger), var(--shadow-xs); }
.kcard a { color: var(--text); font-weight: 600; }
.kcard .k-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }

/* ---------- Leerzustand ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty > .icon { width: 28px; height: 28px; padding: 12px; box-sizing: content-box; border-radius: 16px; background: var(--surface-3); color: var(--muted); margin-bottom: 12px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty p { max-width: 420px; margin-left: auto; margin-right: auto; }

/* ---------- Dialog ---------- */
dialog { border: 1px solid var(--border); border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(8, 14, 20, .5); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .18s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 14px; }
.dialog-body { padding: 4px 20px 20px; }
.dialog-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); border-radius: 0 0 18px 18px; }

/* ---------- Diagramme ---------- */
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: var(--border); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 11px; }
.chart .line-new { fill: none; stroke: var(--primary); stroke-width: 2; }
.chart .line-done { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart .cross { stroke: var(--border-strong); stroke-width: 1; opacity: 0; }
.chart .hover-dot { opacity: 0; stroke: var(--surface); stroke-width: 2; }
.chart-wrap.is-hover .cross, .chart-wrap.is-hover .hover-dot { opacity: 1; }
.chart-tip {
  position: absolute; top: 0; left: 0; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 5; min-width: 132px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 10px 12px; font-size: 12.5px;
}
.chart-wrap.is-hover .chart-tip { opacity: 1; }
.chart-tip .t-date { color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.chart-tip .t-row { display: flex; align-items: center; gap: 8px; }
.chart-tip .t-row i { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.chart-tip .t-row b { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 13px; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-2); font-weight: 550; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.bars { display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) 56px; gap: 12px; align-items: center; font-size: 13px; padding: 7px 8px; border-radius: var(--radius-sm); color: var(--text); }
.bar-row:hover { background: var(--surface-2); text-decoration: none; }
.bar-row .who { font-weight: 550; }
.bar-track { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--primary); border-radius: 999px; min-width: 0; transition: width .5s var(--ease); }

/* ---------- Listen ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px var(--sp-5); border-bottom: 1px solid var(--border); transition: background .12s; }
.list > li:last-child { border-bottom: 0; }
.list.hover > li:hover { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
.list.tight > li { padding: 10px var(--sp-4); }
.dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 12px; margin: 0; }
.dl dt { color: var(--muted); font-size: 13px; }
.dl dd { margin: 0; word-break: break-word; font-weight: 550; }

/* ---------- Wissensdatenbank ---------- */
.prose { font-size: 15px; line-height: 1.75; max-width: 760px; }
.prose h1, .prose h2, .prose h3 { margin: 1.5em 0 .5em; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose li { margin-bottom: .3em; }
.prose img { max-width: 100%; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.prose pre { background: var(--surface-2); padding: 14px; border-radius: var(--radius); overflow-x: auto; border: 1px solid var(--border); }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 0 0 1em; padding: 10px 16px; border-left: 3px solid var(--primary); background: var(--primary-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose table { border-collapse: collapse; margin-bottom: 1em; }
.prose th, .prose td { border: 1px solid var(--border); padding: 6px 10px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: space-between; padding: 12px var(--sp-4); border-top: 1px solid var(--border); flex-wrap: wrap; }
.pagination .pages { display: flex; gap: 4px; }
.pagination a, .pagination span.cur, .pagination span.dis { min-width: 34px; height: 34px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; color: var(--text-2); }
.pagination a:hover { text-decoration: none; background: var(--surface-3); }
.pagination span.cur { background: var(--primary); color: var(--on-primary); }
.pagination span.dis { opacity: .4; }

/* ---------- Gast-Seiten (Login etc.) ---------- */
.guest { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.guest-card { width: min(430px, 100%); animation: rise .35s var(--ease) both; }
.guest-card .card { border-radius: 22px; box-shadow: var(--shadow-lg); }
.guest-card .card-body { padding: 32px; }
.guest-brand { display: grid; justify-items: center; gap: 8px; margin-bottom: 22px; }
.guest-brand .logo { width: 190px; background-position: center; }
.guest-brand b { color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.qr { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 14px; border: 1px solid var(--border); width: fit-content; margin: 0 auto; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-family: var(--font-mono); font-size: 14px; }
.codes span { padding: 9px; text-align: center; background: var(--surface-2); border-radius: var(--radius-sm); border: 1px solid var(--border); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .layout-side { grid-template-columns: minmax(0, 1fr) 310px; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .22s var(--ease); box-shadow: var(--shadow-lg); background: var(--bg); }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(8,14,20,.5); backdrop-filter: blur(2px); z-index: 45; }
  .scrim.open { display: block; }
  .btn.menu-toggle { display: inline-flex; }
  .topbar { padding: 0 var(--sp-3); height: 58px; }
  .content { padding: var(--sp-2) var(--sp-4) var(--sp-6); }
  .layout-side, .layout-side-left, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-md { display: none !important; }
}
@media (max-width: 640px) {
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; }
  .topbar .btn-label, .topbar .search kbd { display: none; }
  .page-head h1 { font-size: 20px; }
  .table th, .table td { padding: 10px 8px; }
  .t-main { min-width: 0; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 8px; }
  .repeat-row { grid-template-columns: 1fr 1fr; }
  .bar-row { grid-template-columns: 96px minmax(0, 1fr) 44px; }
  .kpi { padding: 14px; }
  .kpi .kpi-value { font-size: 28px; }
  .card-head, .card-body { padding-left: var(--sp-4); padding-right: var(--sp-4); }
  .list > li { padding-left: var(--sp-4); padding-right: var(--sp-4); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* ---------- Buchhaltung oben im geschlossenen Ticket ---------- */
.acct { border-left: 3px solid var(--brand); }
.acct-sums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border); }
.acct-sum { background: var(--surface); padding: 14px var(--sp-5); display: grid; gap: 4px; }
.acct-sum span { font-size: 12px; font-weight: 600; color: var(--muted); }
.acct-sum b { font-family: var(--font-mono); font-size: 20px; font-variant-numeric: tabular-nums; }
.acct-sum.is-total { background: var(--surface-2); }
.acct-sum.is-total b { font-size: 24px; }
.acct-sum.is-empty b { color: var(--muted); font-weight: 500; }
.acct-bill { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding: 14px var(--sp-5); border-top: 1px solid var(--border); }
.acct-bill-state { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.acct-bill-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acct-bill-form select { width: auto; min-width: 190px; }
.acct-bill-form input { width: auto; min-width: 220px; flex: 1 1 220px; }
.acct-add { border-top: 1px solid var(--border); }
.acct-add > summary { list-style: none; cursor: pointer; padding: 12px var(--sp-5); font-weight: 600; font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.acct-add > summary::-webkit-details-marker { display: none; }
.acct-add > summary:hover { color: var(--text); background: var(--surface-2); }
.acct-form { display: grid; grid-template-columns: 140px 170px 1fr 1fr; gap: var(--sp-4); padding: 4px var(--sp-5) var(--sp-5); align-items: start; }
@media (max-width: 760px) { .acct-form { grid-template-columns: 1fr 1fr; } }

/* ---------- Angebotsplanung ---------- */
.offer-group { border: 0; border-top: 1px solid var(--border); margin: 0; padding: 0; min-width: 0; }
.offer-group > legend { float: left; width: 100%; padding: 10px var(--sp-5); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); display: flex; align-items: center; gap: 8px; }
.offer-group > legend + * { clear: both; }
.offer-group .count { font-size: 11px; letter-spacing: 0; text-transform: none; background: var(--brand); color: var(--on-brand); border-radius: 999px; padding: 1px 8px; }
.offer-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 10px var(--sp-5); border-top: 1px solid var(--border); }
.offer-item.is-on { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); box-shadow: inset 3px 0 0 var(--brand); }
.offer-pick { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; min-height: 32px; padding: 4px 0; }
.offer-pick input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--primary); }
.offer-price { white-space: nowrap; text-align: right; }
.offer-extra { grid-column: 1 / -1; display: none; gap: 8px; padding-left: 30px; }
.offer-item.is-on .offer-extra { display: flex; }
.offer-qty { width: 76px !important; text-align: right; font-variant-numeric: tabular-nums; }
.offer-note { flex: 1 1 auto; }
.offer-group-row th { background: var(--surface-2); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.product-add { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(90px, 1fr) minmax(100px, 1fr) minmax(110px, 1fr) auto; gap: 8px; padding: 12px var(--sp-5); border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
@media (max-width: 860px) { .product-add { grid-template-columns: 1fr 1fr; } .product-add input:first-of-type { grid-column: 1 / -1; } }
@media print {
  .layout-side { display: block; }
  .card { border: 0; box-shadow: none; }
  .offer-group-row th { background: none; border-bottom: 2px solid #000; }
}

/* ---------- Notizen ---------- */
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-4); align-items: start; }
.note { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: left; width: 100%; font: inherit; color: inherit; cursor: pointer; }
.note:hover { border-color: var(--border-strong); }
.note:focus-visible { box-shadow: var(--ring); }
.note.is-pinned { border-top: 3px solid var(--brand); }
.note h3 { font-size: 15px; display: flex; gap: 6px; align-items: center; }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); font-size: 13.5px; max-height: 220px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.note-meta { font-size: 12px; color: var(--muted); }

/* ---------- Anmeldung: Trenner "oder" ---------- */
.or-line { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Wissensdatenbank: Editor & Ordner ---------- */
.editor { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.editor:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.editor.is-invalid { border-color: var(--danger); }
.editor-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; position: sticky; top: var(--topbar-h); z-index: 5; }
.editor-bar button, .editor-bar .ed-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; min-width: 32px; justify-content: center; padding: 0 9px; border: 1px solid transparent; border-radius: 7px; background: none; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.editor-bar button:hover, .editor-bar .ed-btn:hover { background: var(--surface-3); color: var(--text); }
.editor-bar button.is-on { background: var(--primary); color: var(--on-primary); }
.editor-bar button:focus-visible, .editor-bar .ed-btn:focus-within { box-shadow: var(--ring); }
.editor-bar select { width: auto; min-height: 32px; padding: 3px 28px 3px 9px; font-size: 13px; font-weight: 600; border-radius: 7px; }
.editor-bar .ed-sep { width: 1px; align-self: stretch; margin: 4px 3px; background: var(--border-strong); }
.editor.is-source .editor-bar > :not([data-ed-source]):not(.grow) { opacity: .4; pointer-events: none; }
.editor-area { min-height: 420px; max-width: none; padding: 18px 20px; outline: none; overflow-wrap: anywhere; }
.editor-area:empty::before { content: "Hier schreiben …"; color: var(--muted); }
.editor-area table { width: 100%; }
.editor-area td, .editor-area th { min-width: 60px; }
.editor-source { display: block; width: 100%; border: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 16px 18px; font-size: 13px; line-height: 1.6; background: var(--surface); color: var(--text); resize: vertical; box-shadow: none; }
.editor-source:focus { outline: none; box-shadow: none; }
.editor-source.hidden, .editor-area.hidden { display: none; }
.prose h2 { font-size: 21px; } .prose h3 { font-size: 17px; } .prose h4 { font-size: 15px; }
.prose hr { margin: 1.4em 0; }
.prose th { background: var(--surface-2); text-align: left; }
.prose a { text-decoration: underline; }
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; padding: 14px var(--sp-4); border-bottom: 1px solid var(--border); }
.folder-tile { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-weight: 600; background: var(--surface-2); }
.folder-tile:hover { border-color: var(--primary); text-decoration: none; }
.folder-tile .icon { color: var(--brand); }
.folder-tile .count { font-size: 11.5px; font-weight: 650; background: var(--surface-3); color: var(--text-2); border-radius: 999px; padding: 1px 8px; }

/* ---------- Buchhaltung: Art der Arbeitszeit ---------- */
.kind-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.kind-pick label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; background: var(--surface); }
.kind-pick label:hover { border-color: var(--primary); }
.kind-pick input { position: absolute; opacity: 0; pointer-events: none; }
.kind-pick label:has(input:checked) { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.kind-pick label:has(input:focus-visible) { box-shadow: var(--ring); }

/* ---------- Ticket anlegen: Schritte ---------- */
.steps { display: grid; gap: var(--sp-4); max-width: 880px; }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-4); }
.step-head h2 { font-size: 15px; margin: 0; }
.step-head .hint { margin: 0 0 0 auto; }
.step-no { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--primary); color: var(--on-primary); }
.steps-foot { display: flex; justify-content: flex-end; align-items: center; gap: var(--sp-3); }
.guest-theme { position: fixed; top: 14px; right: 14px; z-index: 5; }
@media (max-width: 720px) {
  .step-head .hint { display: none; }
  .steps-foot .btn { flex: 1 1 auto; }
}

@media print {
  .sidebar, .topbar, .no-print, .toasts { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
}

/* Auswahl-Chips (z. B. Kassensysteme beim Kunden): anklickbare Tags mit Mehrfachauswahl */
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; transition: background .15s, border-color .15s, color .15s; }
.pick label:hover span { color: var(--text); background: var(--surface-2); }
.pick input:checked + span { background: var(--brand); border-color: var(--brand); color: #24282b; }
.pick input:checked + span::before { content: "\2713"; font-weight: 700; }
.pick input:focus-visible + span { box-shadow: var(--ring); }

/* Einklappbare Menügruppen (Tickets-Ansichten, Verwaltung). Der Zustand steht am <html>, damit beim Laden nichts springt. */
.nav-row { display: flex; align-items: center; gap: 2px; }
.nav-row > a { flex: 1; min-width: 0; }
.nav-toggle { flex: none; width: 30px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--muted); border-radius: var(--radius-sm); cursor: pointer; }
.nav-toggle:hover, .nav-toggle-label:hover { background: var(--surface-2); color: var(--text); }
.nav-toggle:focus-visible, .nav-toggle-label:focus-visible { outline: none; box-shadow: var(--ring); }
.nav-toggle .icon, .nav-toggle-label .icon { transition: transform .18s var(--ease); }
.nav-toggle-label { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: none; cursor: pointer; font-family: inherit; padding: 6px 8px 6px 10px; margin-bottom: 2px; border-radius: var(--radius-sm); text-align: left; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
html[data-nav-collapsed~="tickets"] [data-nav-group="tickets"] > a:not(.active),
html[data-nav-collapsed~="verwaltung"] [data-nav-group="verwaltung"] > a:not(.active) { display: none; }
html[data-nav-collapsed~="tickets"] [data-nav-toggle="tickets"] .icon,
html[data-nav-collapsed~="verwaltung"] [data-nav-toggle="verwaltung"] .icon { transform: rotate(-90deg); }
@media (prefers-reduced-motion: reduce) { .nav-toggle .icon, .nav-toggle-label .icon { transition: none; } }

html[data-nav-collapsed~="kunden"] [data-nav-group="kunden"] > a:not(.active),
html[data-nav-collapsed~="arbeit"] [data-nav-group="arbeit"] > a:not(.active) { display: none; }
html[data-nav-collapsed~="kunden"] [data-nav-toggle="kunden"] .icon,
html[data-nav-collapsed~="arbeit"] [data-nav-toggle="arbeit"] .icon { transform: rotate(-90deg); }
.sidebar .nav-section { margin-top: var(--sp-4); }
.nav-star { margin-left: auto; color: var(--brand); flex: none; }

/* Ticket: Verlauf als eigener, einklappbarer Bereich */
details.history > summary { list-style: none; cursor: pointer; }
details.history > summary::-webkit-details-marker { display: none; }
details.history > summary:hover h2 { color: var(--primary-text); }
details.history:not([open]) .history-chevron { transform: rotate(-90deg); }
details.history:not([open]) > summary { border-bottom: 0; }

/* Lizenznummern beim Kunden */
.license { display: flex; align-items: center; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.license:last-child { border-bottom: 0; }

/* Breiterer Dialog (z. B. Kunde anlegen mit allen Angaben) */
dialog.dialog-wide { width: min(720px, calc(100vw - 32px)); }
dialog.dialog-wide .dialog-body { max-height: calc(100vh - 220px); overflow: auto; }

html[data-nav-collapsed~="extern"] [data-nav-group="extern"] > a:not(.active) { display: none; }
html[data-nav-collapsed~="extern"] [data-nav-toggle="extern"] .icon { transform: rotate(-90deg); }

/* Extern: Knöpfe zu externen Werkzeugen */
.ext-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ext-tile { position: relative; }
.ext-link { display: flex; align-items: center; gap: 12px; padding: 16px 44px 16px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); min-height: 72px; transition: border-color .15s, background .15s; }
.ext-link:hover { text-decoration: none; border-color: var(--brand); background: var(--surface-2); }
.ext-link:focus-visible { outline: none; box-shadow: var(--ring); }
.ext-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand); color: var(--on-brand); }
.ext-name { display: block; font-weight: 700; }
.ext-meta { display: block; font-size: 12.5px; color: var(--muted); }
.ext-edit { position: absolute; top: 8px; right: 8px; }

/* Dubletten prüfen */
.dup-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; padding: 16px; align-items: center; }
.dup-side { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.dup-side.is-suggested { border-color: color-mix(in srgb, var(--success) 50%, var(--border)); }
.dup-side .badge { align-self: flex-start; }
.dup-mid { text-align: center; }
.dup-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 720px) { .dup-grid { grid-template-columns: 1fr; } }

.dup-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin-bottom: 14px; position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 5; }
.dup-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 0; }
.dup-name { border: 0; margin: 0; padding: 0 16px 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.dup-name legend { float: left; margin-right: 6px; }

/* Installationsdokumentation */
.inst-tabs { padding: 0; margin-bottom: 16px; }
.inst-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.inst-fields:disabled input, .inst-fields:disabled textarea, .inst-fields:disabled select { opacity: 1; color: var(--text); }
.dev-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) 56px minmax(0, 1fr) minmax(0, .9fr) minmax(0, .9fr) minmax(0, 1.3fr) 38px; gap: 6px; align-items: center; }
.net-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 2fr) 38px; gap: 6px; align-items: center; }
.dev-row input, .net-row input { min-width: 0; }
@media (max-width: 900px) {
  .dev-row { grid-template-columns: 1fr 1fr; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .net-row { grid-template-columns: 1fr 1fr; }
}

/* Ticket-Seitenleiste: Kundendaten als Schilder in einer Zeile */
.cust-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cust-chips .badge .icon-sm { width: 13px; height: 13px; }

/* ---------- Datum- und Zeitwähler ---------- */
html.dp-on input[type=date]::-webkit-calendar-picker-indicator,
html.dp-on input[type=time]::-webkit-calendar-picker-indicator,
html.dp-on input[type=datetime-local]::-webkit-calendar-picker-indicator { display: none; }
html.dp-on input[type=date], html.dp-on input[type=datetime-local], html.dp-on input[type=time] {
  cursor: pointer; padding-right: 38px; background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8f96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='17' rx='3'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E");
}
html.dp-on input[type=time] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8f96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}
input[type=date]::-webkit-datetime-edit-fields-wrapper, input[type=time]::-webkit-datetime-edit-fields-wrapper,
input[type=datetime-local]::-webkit-datetime-edit-fields-wrapper { padding: 0; }

.dp {
  position: fixed; inset: auto; margin: 0; z-index: 1000; display: flex; gap: 0; padding: 0;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); font-size: 13px; overflow: hidden; animation: dp-in .14s var(--ease);
}
@keyframes dp-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.dp button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.dp button:disabled { cursor: default; opacity: .3; }
.dp button:focus-visible { box-shadow: var(--ring); outline: none; }

.dp-cal { padding: 12px; width: 280px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-title { font-weight: 650; font-size: 14px; }
.dp-nav { width: 32px; height: 32px; border-radius: var(--radius-sm); font-size: 18px !important; line-height: 1; color: var(--text-2) !important; }
.dp-nav:hover { background: var(--surface-2) !important; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-wd { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 4px 0 6px; }
.dp-day { height: 34px; border-radius: var(--radius-sm); font-variant-numeric: tabular-nums; position: relative; }
.dp-day:hover:not(:disabled) { background: var(--surface-2) !important; }
.dp-we { color: var(--muted) !important; }
.dp-out { color: color-mix(in srgb, var(--muted) 55%, transparent) !important; }
.dp-today { font-weight: 700; }
.dp-today::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--brand); }

.dp-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.dp-chip { padding: 5px 11px; border-radius: 999px; background: var(--surface-2) !important; color: var(--text-2) !important; font-weight: 600; font-size: 12.5px; }
.dp-chip:hover:not(:disabled) { background: var(--surface-3) !important; }
.dp-clear { margin-left: auto; color: var(--danger) !important; background: none !important; }

.dp-clock { padding: 12px; width: 264px; }
.dp-both .dp-clock { border-left: 1px solid var(--border); background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.dp-label { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 2px 0 6px; }
.dp-label + .dp-hours, .dp-label + .dp-mins { margin-bottom: 12px; }
.dp-hours, .dp-mins { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.dp-cell { height: 32px; border-radius: var(--radius-sm); font-variant-numeric: tabular-nums; background: var(--surface-2) !important; }
.dp-both .dp-cell { background: var(--surface) !important; }
.dp-cell:hover { background: var(--surface-3) !important; }
.dp-dim { color: var(--muted) !important; }
.dp-clock .dp-quick { margin-top: 0; }

.dp button.dp-sel, .dp button.dp-sel:hover { background: var(--primary) !important; color: var(--on-primary) !important; font-weight: 650; }
@media (max-width: 620px) { .dp-both { flex-direction: column; } .dp-both .dp-clock { border-left: 0; border-top: 1px solid var(--border); } }

/* Zwischenüberschrift in Tabellen (z. B. Kategorie) */
.table tr.group-row th { background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-top: 10px; padding-bottom: 8px; }

/* Wissensdatenbank: einfache Fassung im Formular */
.kb-simple { border: 1px dashed var(--border-strong); border-radius: 10px; padding: 10px 14px; }
.kb-simple > summary { cursor: pointer; }

/* Ladebalken oben, sobald eine neue Seite angefordert ist */
.page-loading { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 9999; background: var(--accent, #f5b800); opacity: 0; pointer-events: none; }
.page-loading.on { opacity: 1; animation: page-loading 8s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes page-loading { 0% { width: 0; } 10% { width: 45%; } 100% { width: 92%; } }
@media (prefers-reduced-motion: reduce) { .page-loading.on { animation: none; width: 100%; } }
