*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.55;
}

a { color: var(--color-accent-dark); }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; hyphens: auto; overflow-wrap: break-word; }
main { overflow-wrap: break-word; }
h1 { font-size: 1.9rem; margin: 0 0 var(--space-m); }
h2 { font-size: 1.3rem; margin: var(--space-l) 0 var(--space-s); }
@media (max-width: 30rem) { h1 { font-size: 1.55rem; overflow-wrap: anywhere; } .page { padding: var(--space-m); } }

.topbar {
  display: flex; flex-wrap: wrap; gap: var(--space-m); align-items: center; justify-content: space-between;
  padding: var(--space-m); border-bottom: 1px solid var(--color-line); background: var(--color-surface);
}
.mainnav { display: flex; flex-wrap: wrap; gap: var(--space-m); align-items: center; }
.mainnav a { text-decoration: none; color: var(--color-text); }
.mainnav a:hover { color: var(--color-accent-dark); }

.banner { background: var(--color-warn-soft); padding: var(--space-s) var(--space-m); text-align: center; font-size: 0.9rem; }

.page { max-width: var(--max-width); margin: 0 auto; padding: var(--space-l) var(--space-m); }

.messages { list-style: none; padding: 0; margin: 0 0 var(--space-m); display: grid; gap: var(--space-s); }
.msg { padding: var(--space-s) var(--space-m); border-radius: var(--radius); background: var(--color-accent-soft); }
.msg-error { background: var(--color-error-soft); color: var(--color-error); }
.msg-info { background: var(--color-warn-soft); }

.card {
  background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius);
  padding: var(--space-m);
}
.grid { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.stack { display: grid; gap: var(--space-m); align-content: start; }
.row { display: flex; flex-wrap: wrap; gap: var(--space-s); align-items: center; }
.muted { color: var(--color-muted); }
.small { font-size: 0.875rem; }
.pill {
  display: inline-block; padding: 0.1rem 0.6rem; border-radius: 999px; font-size: 0.8rem;
  background: var(--color-accent-soft); color: var(--color-accent-dark);
}
.pill-warn { background: var(--color-warn-soft); color: #6b4d00; }
.pill-error { background: var(--color-error-soft); color: var(--color-error); }

.btn {
  display: inline-block; border: 0; border-radius: var(--radius); padding: 0.6rem 1.1rem;
  background: var(--color-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--color-accent-dark); }
.btn-secondary { background: transparent; color: var(--color-accent-dark); border: 1px solid var(--color-accent); }
.btn-secondary:hover { background: var(--color-accent-soft); }
.btn-danger { background: var(--color-error); }
.btn-small { padding: 0.35rem 0.8rem; font-size: 0.9rem; }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #f2b600; outline-offset: 2px;
}

form p, .field { margin: 0 0 var(--space-m); }
label { font-weight: 600; display: block; margin-bottom: var(--space-xs); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; max-width: 40rem; padding: 0.55rem 0.7rem; border: 1px solid var(--color-line);
  border-radius: 8px; font: inherit; background: #fff;
}
fieldset { border: 1px solid var(--color-line); border-radius: var(--radius); padding: var(--space-m); margin: 0 0 var(--space-l); background: var(--color-surface); }
legend { font-weight: 700; padding: 0 var(--space-s); }
ul.choices, .choices ul, div[id^="id_"] > div { list-style: none; padding: 0; }
.choices label, div[id^="id_"] label { font-weight: 400; display: inline; }
.errorlist { color: var(--color-error); padding-left: 1rem; }
.helptext { color: var(--color-muted); font-size: 0.85rem; }

.steps { list-style: none; padding: 0; display: grid; gap: var(--space-s); }
.steps li { display: flex; gap: var(--space-s); align-items: center; }
.check { width: 1.4rem; height: 1.4rem; border-radius: 50%; display: inline-grid; place-items: center;
  border: 2px solid var(--color-line); font-size: 0.8rem; }
.check.done { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

.clip video { display: block; margin: 0 auto; aspect-ratio: 9 / 16; height: 30rem; max-height: 70vh; max-width: 100%; background: #000; border-radius: 8px; }
.clip textarea { min-height: 5rem; }

table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { text-align: left; padding: var(--space-s); border-bottom: 1px solid var(--color-line); vertical-align: top; }
.table-wrap { overflow-x: auto; }
.tabular { font-variant-numeric: tabular-nums; }

.hero { padding: var(--space-l) 0; }
.hero p { font-size: 1.15rem; max-width: 38rem; }
.legal { max-width: 46rem; }

.footer {
  display: flex; flex-wrap: wrap; gap: var(--space-m); justify-content: center;
  padding: var(--space-l) var(--space-m); font-size: 0.9rem; border-top: 1px solid var(--color-line);
}
.footer a { color: var(--color-muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Freigabe: Versionen, Änderungswünsche, Status-Board */
.versions summary { cursor: pointer; font-weight: 600; }
.version-grid { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); margin-top: var(--space-s); }
.version-grid video { width: 100%; border-radius: var(--radius); background: #000; }
.change-log { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-s); }
.change-log li { border-left: 3px solid var(--color-line); padding-left: var(--space-s); }
.text-error { color: var(--color-error); }
.board { display: grid; gap: var(--space-m); grid-template-columns: repeat(5, minmax(10.5rem, 1fr)); overflow-x: auto; padding-bottom: var(--space-s); }
.board-col { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); padding: var(--space-s); min-height: 8rem; }
.board-col h2 { font-size: 1rem; margin: 0; display: flex; justify-content: space-between; }
.board-col .hint { margin: 0 0 var(--space-s); }
.board-card { border: 1px solid var(--color-line); border-radius: calc(var(--radius) - 4px); padding: var(--space-s); margin-top: var(--space-s); background: var(--color-bg); }
.board-card.is-error { border-color: var(--color-error); background: var(--color-error-soft); }
.board-card p { margin: 0; }
@media (max-width: 48rem) { .board { grid-template-columns: 1fr; } }
/* Staff overview: key figure tiles */
.stat-grid { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fill, minmax(min(9.5rem, 100%), 1fr)); }
@media (max-width: 30rem) { .stat-grid { gap: var(--space-s); } .stat-value { font-size: 1.4rem; } }
.stat { display: grid; gap: 0.25rem; align-content: start; }
.stat-label { color: var(--color-muted); font-size: 0.875rem; }
.stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1.2; }

/* ---------------- App-Rahmen: linke Leiste, Glocke, Leiste unten (Ticket 11) ---------------- */
.skip-link { position: absolute; left: var(--space-m); top: -3rem; z-index: 50; background: var(--color-surface);
  padding: var(--space-s) var(--space-m); border-radius: var(--radius-s); }
.skip-link:focus { top: var(--space-s); }
main:focus { outline: none; }

.sidebar-brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--color-text); }
.brand-word { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.logo { width: 1.75rem; height: 1.75rem; flex: none; }
.logo-fruit { fill: var(--color-accent); }
.logo-stem { fill: none; stroke: var(--color-accent-dark); stroke-width: 1.6; stroke-linecap: round; }

.icon { width: 1.25rem; height: 1.25rem; flex: none; }

/* --shell-offset: width taken by the sidebar, for pages that grow wider than the text column (calendar). */
.has-shell { --shell-offset: var(--sidebar-width); padding-left: var(--shell-offset); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: 20;
  display: flex; flex-direction: column; gap: var(--space-l);
  padding: 1.25rem 0.75rem 1rem; background: var(--color-surface); border-right: 1px solid var(--color-line);
  overflow-y: auto;
}
.sidebar .sidebar-brand { padding: 0 0.6rem; }
.sidenav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sidenav-link {
  position: relative; display: flex; align-items: center; gap: 0.75rem;
  padding: 0.55rem 0.65rem; border-radius: var(--radius-s);
  color: var(--color-muted); text-decoration: none; font-weight: 500; font-size: 0.95rem;
}
.sidenav-link:hover { background: var(--color-bg); color: var(--color-text); }
.sidenav-link.is-active { background: var(--color-accent-soft); color: var(--color-accent-dark); font-weight: 600; }
.bell-toggle[aria-expanded="true"] { background: var(--color-accent-soft); color: var(--color-accent-dark); }
.sidebar-foot { margin-top: auto; display: grid; gap: 2px; padding-top: var(--space-m); border-top: 1px solid var(--color-line); }

.bell-icon { position: relative; display: inline-grid; }
.badge {
  position: absolute; top: -0.45rem; right: -0.55rem; min-width: 1.15rem; height: 1.15rem; padding: 0 0.3rem;
  display: inline-grid; place-items: center; border-radius: 999px;
  background: var(--color-error); color: var(--color-surface); box-shadow: 0 0 0 2px var(--color-surface);
  font-size: 0.68rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}
.badge[hidden] { display: none; }
.avatar {
  width: 1.6rem; height: 1.6rem; flex: none; display: inline-grid; place-items: center; border-radius: 50%;
  background: var(--color-accent-soft); color: var(--color-accent-dark); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.02em;
}
.sidenav-link.is-active .avatar { background: var(--color-surface); }

.shell-main { min-height: 100vh; display: flex; flex-direction: column; }
.shell-main .page { width: 100%; padding: 2.5rem 2rem 3rem; flex: 1 0 auto; }
.shell-main .footer { margin-top: auto; }

.mobilebar, .tabbar { display: none; }

.icon-button {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--radius-s);
  border: 0; background: transparent; color: var(--color-text); cursor: pointer; text-decoration: none; padding: 0;
}
.icon-button:hover { background: var(--color-bg); }
.icon-button:focus-visible, .link-button:focus-visible, .segment:focus-visible, .switch:focus-visible,
.sidenav-link:focus-visible, .tabbar-link:focus-visible { outline: 3px solid #f2b600; outline-offset: 2px; }

/* Compact rail: icon above a short label */
@media (max-width: 68.75rem) and (min-width: 48rem) {
  .has-shell { --shell-offset: var(--sidebar-width-compact); }
  .sidebar { width: var(--sidebar-width-compact); padding: 1rem 0.5rem; align-items: stretch; }
  .sidebar .sidebar-brand { justify-content: center; padding: 0; }
  .sidebar .brand-word { display: none; }
  .sidenav-link { flex-direction: column; gap: 0.25rem; padding: 0.55rem 0.2rem; font-size: 0.7rem; text-align: center; }
  .sidenav-link .icon { width: 1.35rem; height: 1.35rem; }
}

/* Phones: slim bar on top (brand, bell, account), five entries at the bottom */
@media (max-width: 47.99rem) {
  .has-shell { --shell-offset: 0px; padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .mobilebar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
    height: var(--mobilebar-height); padding: 0 0.5rem 0 1rem;
    background: var(--color-surface); border-bottom: 1px solid var(--color-line);
  }
  .mobilebar-actions { display: flex; gap: 0.25rem; align-items: center; }
  .tabbar {
    position: fixed; inset: auto 0 0 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    height: calc(var(--tabbar-height) + env(safe-area-inset-bottom)); padding: 0.35rem 0.25rem env(safe-area-inset-bottom);
    background: var(--color-surface); border-top: 1px solid var(--color-line);
  }
  .tabbar-link {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem;
    margin: 0 0.15rem; border-radius: var(--radius-s);
    color: var(--color-muted); text-decoration: none; font-size: 0.68rem; font-weight: 500;
  }
  .tabbar-link .icon { width: 1.35rem; height: 1.35rem; }
  .tabbar-link.is-active { color: var(--color-accent-dark); font-weight: 600; background: var(--color-accent-soft); }
  .shell-main { min-height: calc(100vh - var(--mobilebar-height)); }
  .shell-main .page { padding: 1.5rem 1rem 2rem; }
  h1 { font-size: 1.6rem; }
}

/* Bell panel */
.hinweis-panel {
  position: fixed; z-index: 40; left: calc(var(--sidebar-width) + 0.75rem); bottom: 1rem;
  width: min(25rem, calc(100vw - var(--sidebar-width) - 1.5rem)); max-height: min(38rem, calc(100vh - 2rem));
  display: flex; flex-direction: column;
  background: var(--color-surface); border: 1px solid var(--color-line); border-radius: 12px; box-shadow: var(--shadow-panel);
}
.hinweis-panel[hidden] { display: none; }
@media (max-width: 68.75rem) and (min-width: 48rem) {
  .hinweis-panel { left: calc(var(--sidebar-width-compact) + 0.75rem); width: min(25rem, calc(100vw - var(--sidebar-width-compact) - 1.5rem)); }
}
@media (max-width: 47.99rem) {
  .hinweis-panel {
    left: 0.5rem; right: 0.5rem; top: calc(var(--mobilebar-height) + 0.5rem); bottom: auto; width: auto;
    max-height: calc(100vh - var(--mobilebar-height) - var(--tabbar-height) - 1.5rem);
  }
}
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0.75rem 0.25rem 1.1rem; }
.panel-head h2 { margin: 0; font-size: 1.05rem; }
.panel-head h2:focus { outline: none; }
.panel-bar { display: flex; flex-wrap: wrap; gap: var(--space-s); align-items: center; justify-content: space-between;
  padding: 0.5rem 1.1rem 0.75rem; border-bottom: 1px solid var(--color-line); }
.hinweis-panel .notice-list { overflow-y: auto; flex: 1 1 auto; }
.panel-empty { padding: 2rem 1.5rem; text-align: center; }
.panel-empty p { margin: 0.25rem 0; }
.panel-empty .empty-icon { margin: 0 auto 0.5rem; }
.panel-foot { display: flex; justify-content: space-between; gap: var(--space-m); padding: 0.75rem 1.1rem;
  border-top: 1px solid var(--color-line); font-size: 0.875rem; }

.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-s); background: var(--color-bg);
  border: 1px solid var(--color-line); }
.segment {
  border: 0; background: transparent; font: inherit; font-size: 0.875rem; color: var(--color-muted); cursor: pointer;
  padding: 0.25rem 0.75rem; border-radius: 6px; text-decoration: none;
}
.segment.is-active { background: var(--color-surface); color: var(--color-text); font-weight: 600;
  box-shadow: 0 0 0 1px var(--color-line); }
.link-button { border: 0; background: none; padding: 0; font: inherit; font-size: 0.875rem; color: var(--color-accent-dark);
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* Notices */
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice-list--page { padding: 0; margin: var(--space-m) 0 var(--space-l); overflow: hidden; }
.notice {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.85rem; align-items: start;
  padding: 0.85rem 1.1rem; color: var(--color-text); text-decoration: none; border-bottom: 1px solid var(--color-line);
}
.notice-list li:last-child .notice { border-bottom: 0; }
.notice:hover { background: var(--color-bg); }
.notice-icon { width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border-radius: 50%;
  background: var(--color-accent-soft); color: var(--color-accent-dark); }
.notice-icon .icon { width: 1.1rem; height: 1.1rem; }
.notice-icon.is-alert { background: var(--color-error-soft); color: var(--color-error); }
.notice-text { display: grid; gap: 0.15rem; min-width: 0; }
.notice-title { font-weight: 500; line-height: 1.35; }
.notice.is-unread .notice-title { font-weight: 650; }
.notice-body { font-size: 0.875rem; color: var(--color-muted); line-height: 1.45; }
.notice-meta { font-size: 0.78rem; color: var(--color-muted); }
.unread-dot { width: 0.5rem; height: 0.5rem; margin-top: 0.45rem; border-radius: 50%; background: var(--color-accent); }

/* Page heads and empty states */
.page-head { display: flex; flex-wrap: wrap; gap: var(--space-m); align-items: flex-start; justify-content: space-between;
  margin-bottom: var(--space-m); }
.page-head > :first-child { flex: 1 1 22rem; }
.page-head h1 { margin-bottom: 0.35rem; }
.page-head p { margin: 0; }
.empty {
  display: flex; gap: var(--space-m); align-items: flex-start; padding: 1.5rem;
  background: var(--color-surface); border: 1px dashed var(--color-line); border-radius: var(--radius); margin: var(--space-m) 0;
}
.empty p { margin: 0 0 0.6rem; }
.empty-title { font-weight: 600; }
.empty-icon { width: 2.75rem; height: 2.75rem; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--color-accent-soft); color: var(--color-accent-dark); }

/* Switches (e-mail settings) */
.toggle-list { display: grid; gap: 0; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-m);
  padding: 0.75rem 0; border-bottom: 1px solid var(--color-line); }
.toggle-row label { display: grid; gap: 0.1rem; margin: 0; font-weight: 400; cursor: pointer; }
.toggle-label { font-weight: 600; }
.switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 2.6rem; height: 1.5rem; margin: 0;
  border-radius: 999px; background: var(--color-line); cursor: pointer; transition: background 0.15s;
}
.switch::before {
  content: ""; position: absolute; top: 0.2rem; left: 0.2rem; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: var(--color-surface); box-shadow: 0 1px 2px rgb(27 36 32 / 0.25); transition: transform 0.15s;
}
.switch:checked { background: var(--color-accent); }
.switch:checked::before { transform: translateX(1.1rem); }
.toggle-list > .small { margin: var(--space-m) 0; }
.toggle-list > .btn { justify-self: start; }
.toggle-group { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-muted); margin: var(--space-m) 0 0; }
.toggle-group:first-of-type { margin-top: 0; }

/* Start page */
.greeting { margin-bottom: var(--space-l); }
.greeting h1 { margin-bottom: 0.25rem; }
.greeting p { margin: 0; }
.setup { padding: 1.5rem; margin-bottom: var(--space-l); }
.setup-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-s); }
.setup-head h2 { margin: 0; }
.progress { height: 0.4rem; border-radius: 999px; background: var(--color-bg); margin: 0.85rem 0 0.25rem; overflow: hidden;
  border: 1px solid var(--color-line); }
.progress-fill { height: 100%; background: var(--color-accent); border-radius: 999px; }
.setup-steps { list-style: none; margin: var(--space-s) 0 0; padding: 0; }
.setup-step { display: grid; grid-template-columns: auto 1fr auto; gap: 0.85rem; align-items: center;
  padding: 0.85rem 0; border-top: 1px solid var(--color-line); }
.setup-step:first-child { border-top: 0; }
.step-mark { width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--color-line); color: var(--color-muted); font-size: 0.8rem; font-weight: 600; }
.step-mark .icon { width: 0.95rem; height: 0.95rem; }
.setup-step.is-done .step-mark { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-surface); }
.setup-step.is-done .step-label { color: var(--color-muted); font-weight: 500; }
.setup-step.is-done .step-action a { color: var(--color-muted); }
.step-label { font-weight: 600; }
.step-text { display: block; font-size: 0.875rem; color: var(--color-muted); font-weight: 400; }
.tiles { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.25rem; }
.tile h2 { font-size: 0.85rem; font-weight: 600; color: var(--color-muted); margin: 0; }
.tile-value { font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile p { margin: 0; }
.tile .tile-action { margin-top: auto; padding-top: var(--space-s); font-size: 0.9rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-m);
  margin: var(--space-l) 0 var(--space-s); }
.section-head h2 { margin: 0; }
@media (max-width: 47.99rem) {
  .setup { padding: 1.1rem; }
  .setup-step:not(.is-done) .step-action { grid-column: 2 / -1; justify-self: start; }
}

/* Posteingang */
.tabs { display: flex; flex-wrap: wrap; gap: var(--space-xs); border-bottom: 1px solid var(--color-line); margin: var(--space-m) 0; }
.tabs a {
  padding: var(--space-s) var(--space-m); text-decoration: none; color: var(--color-muted);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs a[aria-current="page"] { color: var(--color-text); border-bottom-color: var(--color-accent); font-weight: 600; }
.tabs .count { font-size: 0.75rem; background: var(--color-accent-soft); color: var(--color-accent-dark); border-radius: 999px; padding: 0 0.45rem; margin-left: 0.25rem; }
.comments { display: grid; gap: var(--space-m); }
.comment-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.comment-meta { display: flex; flex-wrap: wrap; gap: var(--space-s); align-items: center; }
.comment-reply { border-left: 3px solid var(--color-accent); padding-left: var(--space-m); }
.comment.is-done { opacity: 0.7; }
.chips { margin-bottom: var(--space-m); display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.chips a { text-decoration: none; }
.chips a[aria-current="true"] .pill { background: var(--color-accent); color: #fff; }
.htmx-request .when-idle { display: none; }
.when-busy { display: none; }
.htmx-request .when-busy { display: inline; }
.comment { gap: var(--space-s); }
.comment-form { display: grid; gap: var(--space-s); }
.btn-link { background: transparent; color: var(--color-muted); text-decoration: underline; padding-left: var(--space-s); padding-right: var(--space-s); }
.btn-link:hover { color: var(--color-text); }

/* Aufnahmen: chunked upload progress and unfinished uploads */
.upload-progress { margin: 0 0 var(--space-m); display: grid; gap: var(--space-xs); }
.upload-progress-head { display: flex; justify-content: space-between; gap: var(--space-s); font-weight: 600; }
.upload-file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.upload-progress progress { width: 100%; height: 0.9rem; accent-color: var(--color-accent); }
.upload-progress p { margin: 0; }
.upload-error { margin: 0 0 var(--space-m); padding: var(--space-s) var(--space-m); border-radius: var(--radius); background: var(--color-error-soft); color: var(--color-error); }
.upload-hint { margin: var(--space-s) 0 0; }
.session-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-s); }
.session { display: flex; flex-wrap: wrap; gap: var(--space-s); align-items: center; justify-content: space-between; }
.session-info { display: grid; min-width: 0; }
.session-name { font-weight: 600; overflow-wrap: anywhere; }
.session form { margin: 0; }
.upload-progress[hidden], .upload-error[hidden], .upload-hint[hidden], #open-sessions[hidden], .btn[hidden] { display: none; }
.btn:disabled, .btn:disabled:hover { background: var(--color-muted); cursor: not-allowed; opacity: 0.7; }


/* Statistics */
.trend-up { color: var(--color-accent-dark); font-weight: 600; }
.trend-down { color: var(--color-error); font-weight: 600; }
.chart { display: block; overflow: visible; margin-top: var(--space-s); }
.chart-bar { fill: var(--color-accent); }
.chart-bar:hover { fill: var(--color-accent-dark); }
.chart-grid { stroke: var(--color-line); stroke-dasharray: 3 3; }
.chart-axis { stroke: var(--color-muted); }
.chart-tick, .chart-label { fill: var(--color-muted); font-size: 12px; font-family: var(--font-body); }
.chart-tick { fill: var(--color-text); stroke: var(--color-surface); stroke-width: 4px; stroke-linejoin: round; paint-order: stroke; }
.chart-card { margin-top: var(--space-m); }
.stack > p, .stack > h2, .stack > h3, .stack > ul, .stack > ol, .stack > dl { margin-top: 0; margin-bottom: 0; }
td.num, th.num { text-align: right; }
.nowrap { white-space: nowrap; }
.top-posts td:first-child { min-width: 10rem; }
.stats-insights { margin-top: var(--space-l); }
.compare { margin: 0; display: grid; gap: var(--space-s); }
.compare div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-s); border-bottom: 1px solid var(--color-line); padding-bottom: var(--space-s); }
.compare dt { font-weight: 600; }
.compare dd { margin: 0; }
.empty-state h2 { margin-top: 0; }

/* Help / FAQ */
.help { max-width: 46rem; }
.help-search { margin: 0 0 var(--space-m); }
.help-search input { width: 100%; max-width: 40rem; padding: 0.6rem 0.75rem; border: 1px solid var(--color-line); border-radius: 8px; font: inherit; background: #fff; }
.help-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-m); }
.help-section details { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); margin-bottom: var(--space-s); }
.help-section summary { cursor: pointer; font-weight: 600; padding: 0.7rem var(--space-m); }
.help-section summary:focus-visible { outline: 3px solid #f2b600; outline-offset: 2px; }
.help-section details > :not(summary) { margin: 0 var(--space-m) var(--space-m); }
.help-section details > ul, .help-section details > ol { padding-left: 1.25rem; }
.help-contact { margin-top: var(--space-l); }
.help-contact h2 { margin-top: 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

/* Konto on phones: areas that are not in the tab bar */
.more-areas { display: none; margin-bottom: var(--space-l); }
.more-areas h2 { margin-top: 0; font-size: 1.1rem; }
.more-areas ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: var(--space-s); }
.more-areas a { display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0 var(--space-s); border: 1px solid var(--color-line); border-radius: var(--radius); text-decoration: none; color: var(--color-text); }
.more-areas a:focus-visible { outline: 3px solid #f2b600; outline-offset: 2px; }
.more-areas .icon { width: 1.25rem; height: 1.25rem; flex: none; }
@media (max-width: 47.99rem) { .more-areas { display: block; } }
