/* Recorder-Look (mobile-app-26, 2026-10-12): Schwarz, IBM Plex, Rot fuer
   Aufnehmen, Blau fuer Aktionen, Tuerkis fuer Erledigt/ok. Entwurf in
   Claude Design (00_DKO 20_gestaltung/claude-design-app). Wird nach
   components.css geladen und ueberschreibt nur die Optik; Aufbau und
   Logik bleiben in den bisherigen Dateien. */

@font-face { font-family: 'Plex Sans'; src: url(/static/fonts/sans-400.woff) format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Sans'; src: url(/static/fonts/sans-500.woff) format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex Sans'; src: url(/static/fonts/sans-600.woff) format('woff'); font-weight: 600 800; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url(/static/fonts/mono-500.woff) format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url(/static/fonts/mono-600.woff) format('woff'); font-weight: 600 800; font-display: swap; }

:root {
  --bg: #000000;
  --panel: #0B0F12;
  --panel-2: #11161A;
  --btn: #161C21;
  --track: #1C2329;
  --text: #F2F4F5;
  --soft: #C9D2D8;
  --muted: #8C99A3;
  --faint: #5B6770;
  --line: #161C21;
  --accent: #3DD6C4;
  --accent-2: #4DA8FF;
  --red: #FF4D3D;
  --danger: #FF8A7A;
  --ok: #3DD6C4;
  --okbg: #0E2A27;
  --bluebg: #0F2236;
  --warn: #F2C94C;
  --warnbg: #2E2610;
  --errbg: #3A1512;
  --radius: 18px;
  --shadow: none;
  --sans: 'Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Plex Mono', ui-monospace, Consolas, monospace;
}

body { background: var(--bg); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
/* Eigenes Ziehen-zum-Aktualisieren statt des Browser-Neuladens (Android-Chrome). */
html, body { overscroll-behavior-y: contain; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* Seitenflaeche: keine Karte um alles, die Inhalte bringen eigene Flaechen mit. */
.app-shell { padding: calc(24px + env(safe-area-inset-top, 0px)) 18px calc(170px + env(safe-area-inset-bottom, 0px)); }
.app-shell > .card { width: min(560px, 100%); background: transparent; border: 0; box-shadow: none; padding: 0; border-radius: 0; }

h1 { font-size: 32px; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
p { color: var(--muted); }
label { color: var(--soft); font-weight: 500; }

input, select, textarea { background: var(--panel-2); border: 1px solid var(--track); border-radius: 14px; color: var(--text); font-family: var(--sans); }
input:focus, select:focus, textarea:focus { border-color: var(--accent-2); }

button { background: var(--accent-2); color: #00121F; border-radius: 14px; font-family: var(--sans); font-weight: 600; min-height: 44px; }
button.secondary { background: var(--btn); color: var(--text); }
button.secondary.danger, button.danger { background: var(--btn); color: var(--danger); border: 0; }
a.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 14px; background: var(--btn); color: var(--text); text-decoration: none; font-weight: 600; }

.small { color: var(--muted); }
.success { color: var(--ok); }
.error { color: var(--danger); }
#message:empty { display: none; }
#message { margin: -4px 0 12px; }

/* Flaechen */
.status, .dashboard-section, .settings-panel, .device-pair-form, .item, .list-card, .planning-day-card, .day-task-box, .admin-board-card {
  background: var(--panel); border: 0; border-radius: 18px; box-shadow: none;
}
.status { padding: 14px 16px; }

/* Seitenkopf: Titel, Unterzeile, rundes Zahnrad. */
.page-head { align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.page-head .page-icon { display: none; }
.page-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.page-head h1 { font-size: 32px; margin: 0; }
.page-sub { font-size: 15px; color: var(--muted); }
.page-head-actions { display: flex; gap: 8px; }
.page-gear, .page-search { width: 44px; height: 44px; padding: 0; border-radius: 50%; background: var(--panel-2); color: var(--soft); display: grid; place-items: center; text-decoration: none; }
.page-gear svg, .page-search svg { width: 20px; height: 20px; }
.page-back { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--panel-2); color: var(--text); display: grid; place-items: center; text-decoration: none; }
.page-back svg { width: 20px; height: 20px; }

/* Untere Leiste: Pille mit drei Bereichen, aktiver Bereich hell. */
.tabbar {
  background: var(--panel); border: 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .8);
  padding: 5px; gap: 4px; width: min(420px, calc(100vw - 36px));
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
.tabbar a { flex-direction: row; justify-content: center; gap: 8px; height: 50px; padding: 0 8px; color: var(--soft); font-size: 15px; font-weight: 500; letter-spacing: 0; }
.tabbar a svg { width: 18px; height: 18px; display: none; }
.tabbar a.active { background: var(--text); color: #000000; font-weight: 600; }
.tabbar a.active svg { display: block; }
.tab-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #FFFFFF; font-family: var(--mono); font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; }
.tab-badge[hidden] { display: none; }

/* Schwebende Knoepfe: Plus blau oben, Mikro als roter Ring wie am Recorder. */
.fab-stack { flex-direction: column-reverse; align-items: center; right: 18px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
.fab { box-shadow: 0 10px 30px rgba(0, 0, 0, .6); min-height: 0; }
.fab-plus { width: 52px; height: 52px; background: var(--accent-2); color: #00121F; border: 0; }
.fab-plus svg { width: 22px; height: 22px; }
.fab-mic { width: 66px; height: 66px; background: var(--panel-2); color: var(--red); border: 2px solid var(--red); }
.fab-mic svg { width: 26px; height: 26px; }

/* Abschnitts-Beschriftung und Gruppen von Zeilen */
.section-label { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: .02em; text-transform: uppercase; padding: 0 4px 6px; }
.row-group { background: var(--panel); border-radius: 18px; overflow: hidden; }
.row-group > .t-row:last-child, .row-group > .list-row:last-child, .row-group > .settings-row:last-child { border-bottom: 0; }
.stack { gap: 14px; }

/* Hinweis auf den Eingang (Heute) */
.inbox-hint { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--panel); color: var(--text); text-decoration: none; }
.inbox-hint-icon { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--bluebg); color: var(--accent-2); display: grid; place-items: center; }
.inbox-hint-icon svg { width: 20px; height: 20px; }
.inbox-hint-text { flex: 1; display: grid; gap: 2px; }
.inbox-hint-text b { font-size: 16px; font-weight: 600; }
.chevron { color: var(--faint); font-size: 22px; line-height: 1; }

/* Aufgabenzeile: runder Haken, Titel, Liste mit Farbpunkt */
.t-row { grid-template-columns: 44px 1fr auto; gap: 6px; padding: 6px 14px 6px 6px; border-bottom: 1px solid var(--line); }
.t-row .t-main { padding: 6px 0; }
.t-row .t-title { font-size: 16px; font-weight: 500; }
.t-row .t-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.meta-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--project-color, var(--faint)); flex: none; }
.t-check { width: 44px; height: 44px; min-height: 44px; border: 0; border-radius: 50%; background: transparent; position: relative; }
.t-check::before { content: ''; position: absolute; left: 10px; top: 10px; width: 24px; height: 24px; box-sizing: border-box; border-radius: 50%; border: 2px solid #3A444C; }
.t-check:disabled { background: transparent; border: 0; opacity: 1; }
.t-check:disabled::before { border: 0; background: var(--ok); }
.t-check:disabled::after { content: ''; position: absolute; left: 18px; top: 15px; width: 6px; height: 11px; border: solid #00261F; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.t-done .t-title { color: var(--faint); }
.t-star { min-height: 44px; font-size: 18px; opacity: .35; background: none; }
.t-star.on { color: var(--warn); opacity: 1; }
.t-row.task-important { border-left: 0; padding-left: 6px; }
/* hidden muss immer gewinnen: Karten, Aufklapper und Filter setzen das Attribut, aber
   display:grid/flex aus den Komponenten ueberstimmt es sonst (Filter im Eingang zeigte
   deshalb alles, Kostja 2026-10-12). */
[hidden] { display: none !important; }
.t-details .actions { justify-content: flex-start; }
.t-details .actions button { min-height: 40px; padding: 0 14px; font-size: 14px; }
.done-tasks { display: grid; gap: 8px; }
.done-tasks > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--muted); text-transform: uppercase; padding: 0 4px; }
.done-tasks > summary::-webkit-details-marker { display: none; }
.done-tasks > summary::after { content: '⌄'; font-size: 16px; }
.done-tasks[open] > summary::after { content: '⌃'; }
.planned-link { display: flex; justify-content: space-between; align-items: center; min-height: 44px; margin-top: 8px; padding: 0 4px; color: var(--accent-2); font-weight: 500; }

/* Leere Ansichten */
.empty-state { padding: 48px 16px 32px; }
.empty-state-icon { color: var(--faint); }
.empty-state-icon svg { width: 48px; height: 48px; }

/* Eingang: Filter, Eintraege als Karten mit Quelle */
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.filter-chips button { min-height: 40px; padding: 0 14px; border-radius: 12px; background: var(--panel); color: var(--soft); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.filter-chips button[aria-pressed="true"] { background: var(--text); color: #000000; }
.filter-chips span { font-family: var(--mono); font-size: 12px; opacity: .75; }
#list.stack { gap: 8px; }
.t-row.inbox-review-item, .t-row.inbox-review-item.no-image, .t-row.inbox-review-item.has-image {
  background: var(--panel); border: 0; border-radius: 18px; padding: 14px; gap: 10px;
  grid-template-columns: 36px minmax(0, 1fr); grid-template-areas: none;
}
.t-row.inbox-review-item { align-items: start; }
.t-row.inbox-review-item.open { background: var(--panel-2); }
.t-row.inbox-review-item .t-details, .t-row.inbox-review-item > .inbox-audio-layer { grid-column: 2; }
.source-ico { width: 36px; height: 36px; border-radius: 50%; background: var(--btn); color: var(--soft); display: grid; place-items: center; }
.source-ico svg { width: 17px; height: 17px; }
.source-ico.recorder { background: #000000; border: 2px solid var(--red); color: var(--red); box-sizing: border-box; }
.t-source { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.t-source b { font-weight: 600; color: var(--soft); }
.t-source b.recorder { color: var(--red); }
.t-source .mono { font-family: var(--mono); }
.t-row.inbox-review-item .t-title { font-size: 16px; line-height: 1.4; }
.t-row .inbox-choice-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.t-row .inbox-choice-actions button { min-height: 44px; padding: 0 10px; }
.inbox-audio-layer { width: 100%; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.inbox-audio-label { display: none; }
.inbox-audio-layer audio { height: 40px; }
.task-image-strip a { border: 0; border-radius: 14px; }

/* Recorder-Aufnahmen ohne Abschrift */
.stray-recording { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px 12px; padding: 14px; border-radius: 18px; background: var(--panel); }
.stray-recording .stray-body { display: grid; gap: 8px; min-width: 0; }
.stray-recording audio { width: 100%; height: 40px; }
.stray-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stray-actions button { min-height: 40px; padding: 0 14px; font-size: 14px; }

/* Chips */
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.ok { background: var(--okbg); color: var(--ok); }
.chip.warn { background: var(--warnbg); color: var(--warn); }
.chip.neu { background: var(--bluebg); color: var(--accent-2); }
.chip.err { background: var(--errbg); color: var(--danger); }

/* Erfassen: Blatt mit grossem Aufnahmeknopf */
.capture-sheet > .dashboard-section { background: var(--panel); border-radius: 22px; padding: 18px; }
.capture-sheet .inline-form { gap: 14px; margin: 0; }
/* Wie im Entwurf: erst das Textfeld, darunter der Aufnahmeknopf. */
.capture-sheet .inline-form > textarea[name="text"] { order: -1; }
.voice-dictation-panel { border: 0; background: transparent; padding: 0; gap: 12px; }
.voice-dictation-controls { flex-direction: column; gap: 12px; }
.voice-task-button { width: 132px; height: 132px; min-height: 132px; border-radius: 50%; padding: 12px; white-space: normal; line-height: 1.3; font-size: 14px; background: var(--panel-2); color: var(--red); border: 2px solid var(--red); box-shadow: 0 0 0 10px var(--panel), 0 0 0 12px var(--track); }
.voice-task-button.ready { background: var(--panel-2); color: var(--red); }
.voice-task-button.recording { background: var(--red); color: #FFFFFF; box-shadow: 0 0 0 10px var(--panel), 0 0 0 12px rgba(255, 77, 61, .35); }
.voice-task-button.processing, .voice-task-button.locked, .voice-task-button:disabled { background: var(--btn); color: var(--muted); border-color: var(--track); }
[data-action="voice-polish"] { min-height: 40px; padding: 0 14px; background: var(--btn); color: var(--text); font-size: 14px; }
.voice-level-meter { border: 0; background: var(--panel-2); border-radius: 14px; }
.voice-level-track { background: var(--track); height: 8px; }
.voice-level-track span { background: var(--red); }
.voice-level-meter.speaking .voice-level-topline b { color: var(--red); }
.voice-transcript-grid textarea { background: var(--panel-2); font-size: 14px; }
.voice-transcript-actions button { min-height: 40px; background: var(--btn); color: var(--text); }
.capture-sheet #inboxForm > button, .capture-sheet form > button:last-child { min-height: 52px; font-size: 16px; }

/* Listen */
.lists-board.stack { display: block; }
.list-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; min-height: 56px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.list-row .t-title { font-size: 16px; font-weight: 500; }
.list-count { font-family: var(--mono); font-size: 14px; }
.list-chevron { color: var(--faint); }
.list-search { position: relative; margin-bottom: 14px; display: block; }
.list-search input { margin: 0; padding-left: 42px; height: 48px; background: var(--panel); }
.list-search svg { position: absolute; left: 14px; top: 15px; width: 18px; height: 18px; color: var(--muted); }
.list-new svg { width: 16px; height: 16px; }
.list-new { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 16px; border-radius: 0; background: transparent; color: var(--accent-2); font-weight: 500; font-size: 15px; }
.more-group { margin-top: 14px; }

/* Einstellungen: Liste mit Zustand je Bereich */
.settings-row { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 16px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.settings-row > svg { width: 20px; height: 20px; color: var(--soft); flex: none; }
.settings-row .settings-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.settings-row .settings-text b { font-size: 16px; font-weight: 500; }
.settings-row .settings-text span { font-size: 13px; color: var(--muted); }
.settings-row.logout { color: var(--danger); background: transparent; width: 100%; border: 0; border-radius: 0; justify-content: flex-start; font-weight: 500; font-size: 16px; }
.switch { width: 52px; height: 30px; min-height: 30px; flex: none; border-radius: 15px; padding: 3px; background: #2A333B; display: flex; justify-content: flex-start; }
.switch[aria-checked="true"] { background: var(--accent-2); justify-content: flex-end; }
.switch span { width: 24px; height: 24px; border-radius: 50%; background: var(--text); }
.settings-version { text-align: center; font-family: var(--mono); font-size: 12px; color: var(--faint); margin-top: 18px; }
.settings-layout { display: block; margin-top: 0; }
.settings-menu { display: none; }
.settings-panel { padding: 18px; }

/* Geraete */
.device-hero { display: grid; gap: 16px; padding: 18px; border-radius: 20px; background: var(--panel); margin-bottom: 16px; }
.device-hero-top { display: flex; align-items: center; gap: 16px; }
.recorder-hero-svg { width: 64px; height: 78px; border: 0; border-radius: 0; box-shadow: none; flex: none; }
.device-hero-text { display: grid; gap: 4px; }
.device-hero-text b { font-size: 20px; font-weight: 600; }
.device-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.device-stat { display: grid; gap: 4px; padding: 12px; border-radius: 14px; background: var(--panel-2); }
.device-stat b { font-family: var(--mono); font-size: 24px; font-weight: 600; }
.device-stat span { font-size: 12px; color: var(--muted); }
.device-stat.ok b { color: var(--ok); }
.device-stat.warn b { color: var(--warn); }
.device-card, .recording-row { background: var(--panel); border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.device-grid, .device-recordings { background: var(--panel); border-radius: 18px; overflow: hidden; gap: 0; }
.device-orb svg { width: 20px; height: 20px; }
.device-orb { background: #000000; border: 2px solid var(--red); color: var(--red); border-radius: 50%; box-shadow: none; }
.recording-row b { font-weight: 500; }
.recording-row audio { width: 100%; height: 36px; }
.device-pair-form { padding: 16px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.device-pair > summary { list-style: none; cursor: pointer; }
.device-pair > summary::-webkit-details-marker { display: none; }

/* Login und Mehr */
.brand-mark { color: var(--red); }
.brand-mark img { box-shadow: none; }
.account-section { gap: 12px; }
.system-status-chip { border: 0; background: var(--btn); }
.system-status-chip.ok { background: var(--okbg); color: var(--ok); box-shadow: none; }
.system-status-chip.warn { background: var(--warnbg); color: var(--warn); }
.system-status-chip.error { background: var(--errbg); color: var(--danger); }

.ptr { position: fixed; top: env(safe-area-inset-top, 0px); left: 50%; z-index: 60; transform: translate(-50%, -48px); opacity: 0; pointer-events: none; transition: transform .22s ease, opacity .22s ease; }
.ptr.pulling { transition: none; }
body.ptr-dragging, body.ptr-dragging * { user-select: none; -webkit-user-select: none; cursor: grabbing; }
.ptr-circle { width: 40px; height: 40px; border-radius: 50%; background: var(--panel-2); color: var(--muted); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .7); }
.ptr-circle svg { width: 20px; height: 20px; }
.ptr.ready .ptr-circle, .ptr.busy .ptr-circle { color: var(--accent-2); }
.ptr.busy .ptr-circle svg { animation: luca-spin .8s linear infinite; }

@media (max-width: 720px) {
  .app-shell { padding-left: 16px; padding-right: 16px; }
  .app-shell > .card { max-width: 100%; padding: 0; }
  h1, .page-head h1 { font-size: 30px; }
  button { padding: 0 14px; }
  .tabbar a { font-size: 14px; }
}
