/* Atemschutzüberwachung – Web-Testversion.
   Farben, Maße und Schriftgrößen entsprechen der Tablet-App (Material 3, FeuerwehrEinsatzHubTheme,
   AtemschutzDesign.kt). 1 dp ≙ 1 CSS-Pixel. */

/* Schriften wie auf dem Tablet: Roboto (variabel) und Droid Sans Mono für die Uhr (Apache-2.0) */
@font-face {
    font-family: "Roboto App";
    src: url("fonts/Roboto.ttf") format("truetype");
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: "Droid Sans Mono";
    src: url("fonts/DroidSansMono.ttf") format("truetype");
    font-display: swap;
}

:root {
    --primary: #CC0000;
    --on-primary: #FFFFFF;
    --primary-container: #FFDAD4;
    --surface: #FFFBFF;
    --on-surface: #1C1B1F;
    --surface-variant: #E7E0EC;
    --on-surface-variant: #49454F;
    --secondary-container: #E8DEF8;
    --on-secondary-container: #1D192B;
    --surface-container-high: #ECE6F0;
    --outline: #79747E;
    --error: #B3261E;
    --fg: #1C1B1F;

    --fw-rot: #CC0000;
    --squad-active: #1B5E20;
    --squad-retreat: #E65100;
    --squad-ended: #616161;
    --squad-idle: #9E9E9E;
    --ms-begin: #1565C0;
    --ms-goal: #2E7D32;
    --ms-retreat: #E65100;
    --ms-end: #424242;
    --ms-query: #6A1B9A;

    --shadow1: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 3px 1px rgba(0, 0, 0, .15);

    --font: "Roboto App", Roboto, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --mono: "Droid Sans Mono", ui-monospace, Consolas, "Cascadia Mono", "Courier New", monospace;
    color-scheme: light;
}

/* Kontrastmodus (pro Einsatz): dunkles Schema wie ContrastDarkColors */
body.contrast {
    --primary: #FF8A80;
    --on-primary: #3B0000;
    --surface: #121212;
    --on-surface: #FFFFFF;
    --surface-variant: #2A2A2A;
    --on-surface-variant: #E0E0E0;
    --secondary-container: #4A4458;
    --on-secondary-container: #E8DEF8;
    --surface-container-high: #2B2930;
    --outline: #938F99;
    --error: #F2B8B5;
    --fg: #FFFFFF;
    color-scheme: dark;
}

/* Tonal Elevation (M3): Primärfarbe über Surface – 1 dp 5,1 %, 2 dp 6,9 %, 3 dp 8,2 %.
   Am body definiert, damit der Kontrastmodus die Mischfarben neu berechnet. */
body {
    --tone1: color-mix(in srgb, var(--primary) 5.12%, var(--surface));
    --tone2: color-mix(in srgb, var(--primary) 6.94%, var(--surface));
    --tone3: color-mix(in srgb, var(--primary) 8.24%, var(--surface));
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 20px;
    letter-spacing: .25px;
    background: var(--surface);
    color: var(--on-surface);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
p { margin: 0; }
h2, h3 { margin: 0; font-weight: inherit; }
a { color: inherit; }

#root { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-width: 0; overflow: hidden; }

/* ---- Typografie (M3) ---- */
.headline-large { font-size: 32px; line-height: 40px; letter-spacing: 0; }
.headline-medium { font-size: 28px; line-height: 36px; letter-spacing: 0; }
.headline-small { font-size: 24px; line-height: 32px; letter-spacing: 0; }
.title-large { font-size: 22px; line-height: 28px; letter-spacing: 0; }
.title-medium { font-size: 16px; line-height: 24px; letter-spacing: .15px; font-weight: 500; }
.title-small { font-size: 14px; line-height: 20px; letter-spacing: .1px; font-weight: 500; }
.body-large { font-size: 16px; line-height: 24px; letter-spacing: .5px; }
.body-medium { font-size: 14px; line-height: 20px; letter-spacing: .25px; }
.body-small { font-size: 12px; line-height: 16px; letter-spacing: .4px; }
.label-large { font-size: 14px; line-height: 20px; letter-spacing: .1px; font-weight: 500; }
.label-medium { font-size: 12px; line-height: 16px; letter-spacing: .5px; font-weight: 500; }
.bold { font-weight: 700 !important; }
.semibold { font-weight: 600 !important; }
.medium { font-weight: 500; }
.fg { color: var(--fg); }
.muted { color: var(--on-surface-variant); }
.red { color: var(--fw-rot); }
.green { color: var(--squad-active); }
.error-text { color: var(--error); }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Layout-Helfer ---- */
.row { display: flex; flex-direction: row; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1 1 0; min-width: 0; }
.min0 { min-height: 0; }
.fill { height: 100%; }
.fill-h { height: 100%; min-height: 0; }
.wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.gap4 { gap: 4px; } .gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; }
.gap14 { gap: 14px; } .gap16 { gap: 16px; } .gap24 { gap: 24px; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .ml8 { margin-left: 8px; }
.pad24 { padding: 24px; }
.full { width: 100%; }
.h56 { height: 56px !important; }
.scroll-y { overflow-y: auto; min-height: 0; }
.center-fill { flex: 1; display: flex; align-items: center; justify-content: center; height: 100%; }
.screen-pad { padding: 16px; min-height: 0; }

/* ---- Hinweis Testversion ---- */
.test-banner {
    flex: none; display: flex; align-items: center; justify-content: center; gap: 16px;
    min-height: 28px; padding: 4px 16px; background: #9A0000; color: #fff;
    font-size: 12px; line-height: 16px; letter-spacing: .3px;
}
.test-banner a { color: #fff; font-weight: 600; white-space: nowrap; }

/* ---- Kopfleiste (TabletTopBar) ---- */
.topbar {
    flex: none; height: 72px; padding: 0 20px; display: flex; align-items: center; gap: 24px;
    background: var(--fw-rot); color: #fff;
}
.tb-title { width: 260px; flex: none; }
.tb-sub { color: rgba(255, 255, 255, .85); }
.tb-einsatz { flex: 1 1 0; min-width: 0; cursor: pointer; }
.tb-clock { font-family: var(--mono); font-size: 32px; line-height: 40px; font-weight: 700; white-space: nowrap; }
.btn.btn-onred {
    flex: none; background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .7);
    padding: 0 24px 0 16px;
}
.btn.btn-onred:hover { background: rgba(255, 255, 255, .08); }
.icon-btn.icon-white { color: #fff; }

/* ---- Navigation Rail (104 dp) ---- */
.body-row { flex: 1; display: flex; min-height: 0; }
.rail {
    flex: none; width: 104px; background: var(--tone3);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.rail-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    width: 100%; padding: 8px 0; margin: 8px 0; background: none; border: 0;
    color: var(--on-surface-variant);
}
.rail-ind {
    width: 56px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
    transition: background-color .15s;
}
.rail-item:hover .rail-ind { background: color-mix(in srgb, var(--on-surface) 8%, transparent); }
.rail-item.is-selected { color: var(--on-surface); }
.rail-item.is-selected .rail-ind { background: var(--secondary-container); color: var(--on-secondary-container); }
.rail-label { font-size: 14px; line-height: 20px; letter-spacing: .1px; font-weight: 500; }
.rail-item:focus-visible { outline: none; }
.rail-item:focus-visible .rail-ind { outline: 2px solid var(--primary); }

.content { flex: 1; min-width: 0; min-height: 0; position: relative; }

/* ---- Icons ---- */
.ic { width: 24px; height: 24px; fill: currentColor; flex: none; display: block; }
.icon-red { color: var(--fw-rot) !important; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 24px; border-radius: 20px; border: 0;
    font-size: 14px; line-height: 20px; letter-spacing: .1px; font-weight: 500;
    position: relative; white-space: nowrap; user-select: none;
}
.btn .ic { width: 18px; height: 18px; }
.btn-filled { background: var(--c, var(--primary)); color: var(--on-primary); }
.btn-filled[style*="--c"] { color: #fff; }
.btn-outlined { background: transparent; border: 1px solid var(--outline); color: var(--primary); }
.btn-text { background: transparent; color: var(--primary); padding: 0 12px; }
.btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; transition: opacity .15s; pointer-events: none; }
.btn:hover::after { opacity: .08; }
.btn:active::after { opacity: .12; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled { cursor: default; }
.btn:disabled::after { display: none; }
.btn-filled:disabled { background: color-mix(in srgb, var(--on-surface) 12%, transparent); color: color-mix(in srgb, var(--on-surface) 38%, transparent); }
.btn-outlined:disabled { border-color: color-mix(in srgb, var(--on-surface) 12%, transparent); color: color-mix(in srgb, var(--on-surface) 38%, transparent); }
.btn-text:disabled { color: color-mix(in srgb, var(--on-surface) 38%, transparent); }

/* Stempel-Buttons: eigene Farbe, deaktiviert 22 % Farbe / 45 % Weiß */
.btn-stamp {
    flex: 1 1 0; min-width: 0; height: 54px; background: var(--c); color: #fff;
    font-size: 16px; line-height: 24px; letter-spacing: .15px; font-weight: 600;
}
.btn-stamp.stamp-compact { border-radius: 12px; padding: 0 4px; }
.btn-stamp:disabled { background: color-mix(in srgb, var(--c) 22%, transparent); color: rgba(255, 255, 255, .45); }
.btn-stamp span { overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
    width: 48px; height: 48px; border-radius: 50%; border: 0; background: transparent; flex: none;
    display: inline-flex; align-items: center; justify-content: center; color: var(--on-surface-variant);
}
.icon-btn:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.icon-btn-tonal {
    width: 40px; height: 40px; margin: 4px; border-radius: 50%; border: 0; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--secondary-container); color: var(--on-secondary-container);
}
.icon-btn-tonal:hover { filter: brightness(.96); }

/* ---- Textfelder (OutlinedTextField) ---- */
.tf {
    position: relative; display: flex; align-items: center; min-height: 56px; min-width: 0;
    border: 1px solid var(--outline); border-radius: 4px; background: transparent; cursor: text;
}
.tf:hover { border-color: var(--on-surface); }
.tf:focus-within { border: 2px solid var(--primary); }
.tf input {
    flex: 1; min-width: 0; width: 100%; height: 54px; border: 0; outline: 0; background: transparent;
    padding: 0 15px; font-size: 16px; line-height: 24px; letter-spacing: .5px; color: var(--on-surface);
}
.tf:focus-within input { padding: 0 14px; }
.tf input::placeholder { color: var(--on-surface-variant); opacity: 0; transition: opacity .1s; }
.tf:focus-within input::placeholder, .tf.tf-lead input::placeholder, .tf:not(:has(.tf-label)) input::placeholder { opacity: 1; }
.tf-label {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%); padding: 0 4px;
    font-size: 16px; line-height: 24px; letter-spacing: .5px; color: var(--on-surface-variant);
    pointer-events: none; transition: all .12s ease; background: transparent; max-width: calc(100% - 24px);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tf:focus-within .tf-label, .tf.tf-filled .tf-label, .tf.tf-dropdown.is-open .tf-label {
    top: -1px; font-size: 12px; line-height: 16px; letter-spacing: .4px; background: var(--fbg, var(--surface));
}
.tf:focus-within .tf-label { color: var(--primary); top: -2px; }
.tf.tf-error { border-color: var(--error); }
.tf.tf-error .tf-label { color: var(--error); }
.tf-large input { font-size: 28px; line-height: 36px; height: 64px; }
.tf-large { min-height: 66px; }
.tf-small-label .tf-label { font-size: 12px; }
.tf-icon { display: flex; align-items: center; color: var(--on-surface-variant); flex: none; }
.tf-icon-lead { padding-left: 12px; }
.tf-icon-trail { padding-right: 4px; }
.tf-icon-trail .ic { margin: 0 8px; }
.tf.tf-lead input { padding-left: 16px; }
.tf-readonly, .tf-readonly input { cursor: pointer; }
.tf-search { background: transparent; }

.dropdown { position: relative; }
.menu {
    position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 2px); max-height: 280px; overflow-y: auto;
    padding: 8px 0; border-radius: 4px; background: var(--surface-container-high);
    box-shadow: 0 2px 6px 2px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .3);
}
.menu-item {
    display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0 12px; height: 48px;
    font-size: 14px; letter-spacing: .1px; font-weight: 500; color: var(--on-surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.menu-item:hover, .menu-item:focus-visible { background: color-mix(in srgb, var(--on-surface) 8%, transparent); outline: 0; }

/* ---- Karten, Abschnitte ---- */
.section-title {
    background: var(--surface-variant); border-radius: 8px 8px 0 0; padding: 8px 12px; color: var(--on-surface-variant); flex: none;
}
.section-title-main { font-size: 16px; line-height: 24px; letter-spacing: .15px; font-weight: 700; }
.section-title-sub { font-size: 12px; line-height: 16px; letter-spacing: .4px; }
.section-card {
    --fbg: var(--tone1);
    background: var(--tone1); border-radius: 8px; box-shadow: var(--shadow1); padding: 12px; min-width: 0;
}
.divider { border: 0; border-top: 1px solid color-mix(in srgb, var(--outline) 45%, transparent); margin: 0; }

/* ---- Einsatz: drei Trupp-Spalten ---- */
.monitoring { display: flex; gap: 16px; padding: 16px; height: 100%; }
.squad-col {
    --fbg: var(--tone2);
    flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 12px;
    background: var(--tone2); border-radius: 12px;
    border: 3px solid color-mix(in srgb, var(--state) 90%, transparent);
}
.squad-col.is-ready { border-color: color-mix(in srgb, var(--state) 40%, transparent); }
.squad-col .section-card { --fbg: var(--tone3); background: var(--tone3); }
.squad-head {
    background: color-mix(in srgb, var(--state) 12%, var(--tone2)); border-radius: 8px; padding: 12px;
    display: flex; flex-direction: column; gap: 6px; flex: none;
}
.squad-head-row { display: flex; align-items: center; }
.squad-title { flex: 1; min-width: 0; font-size: 22px; line-height: 28px; font-weight: 700; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-pill {
    background: var(--state); color: #fff; border-radius: 999px; padding: 4px 10px;
    font-size: 14px; line-height: 20px; letter-spacing: .1px; font-weight: 700; white-space: nowrap;
}
.crew-row { display: flex; gap: 12px; align-items: center; }
.crew { flex: 1 1 0; min-width: 0; }
.crew-label { font-size: 12px; line-height: 16px; letter-spacing: .5px; font-weight: 500; color: var(--on-surface-variant); }
.crew-name { font-size: 16px; line-height: 24px; letter-spacing: .15px; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.limit-line {
    font-size: 14px; line-height: 20px; letter-spacing: .1px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: color-mix(in srgb, var(--fg) 80%, transparent);
}
.live-card { flex: none; }
.live-row { display: flex; gap: 12px; }
.live-cell { flex: 1 1 0; min-width: 0; }
.stamp-grid { display: flex; flex-direction: column; gap: 8px; flex: none; }
.stamp-row { display: flex; gap: 6px; }
.btn-stamp.stamp-query { border-radius: 27px; }
.replace-btn { flex: none; height: 56px; width: 100%; --c: var(--squad-active); color: #fff; font-weight: 700; }
.table-box { flex: 1 1 0; min-height: 0; display: flex; }
.table-card { flex: 1; overflow: hidden; }

.summary { display: flex; flex-direction: column; gap: 4px; }
.summary-row { display: flex; align-items: flex-end; gap: 12px; }
.summary-row .label-large { padding-bottom: 4px; }

/* Druck-/Zeittabelle */
.pt { display: flex; flex-direction: column; gap: 6px; color: var(--fg); font-size: 12px; }
.pt-row { display: flex; align-items: baseline; }
.pt-row > span { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-row > .pt-l { flex: 1.2 1 0; font-weight: 500; font-size: 13px; }
.pt-row > .pt-span { flex: 2 1 0; }
.pt-head > span { font-weight: 700; }
.pt-row.is-muted { color: color-mix(in srgb, var(--fg) 55%, transparent); }
.pt-query .pt-l { color: var(--ms-query); }
.pt-v { font-weight: 700; }
.pt-hidden { color: color-mix(in srgb, var(--fg) 60%, transparent); white-space: nowrap; }
.pt-large { gap: 4px; font-size: 14px; line-height: 18px; }
.pt-large .pt-row > .pt-l { font-size: 15px; }
.pt-large .pt-v { font-size: 15px; }
.pt-large .pt-query .pt-v { font-size: 14px; }

/* ---- Dialoge ---- */
.dialogs:empty { display: none; }
.scrim {
    position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .32);
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.dialog {
    --fbg: var(--surface-container-high);
    background: var(--surface-container-high); color: var(--on-surface); border-radius: 28px; padding: 24px;
    max-height: calc(100vh - 48px); display: flex; flex-direction: column; min-width: 280px;
    box-shadow: 0 4px 8px 3px rgba(0, 0, 0, .15), 0 1px 3px rgba(0, 0, 0, .3);
}
.dialog-title { font-size: 24px; line-height: 32px; margin-bottom: 16px; color: var(--on-surface); }
.dialog-body { color: var(--on-surface-variant); font-size: 14px; line-height: 20px; overflow-y: auto; padding-top: 6px; margin-top: -6px; }
.dialog-body:empty { display: none; }
.dialog-body .title-small, .dialog-body .title-medium { color: var(--on-surface); }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.dialog-actions:empty { display: none; }
.web-note { padding: 8px 12px; border-radius: 8px; background: var(--primary-container); color: #400006; }
body.contrast .web-note { background: #92000E; color: #FFDAD4; }

/* ---- Radio, Chips ---- */
.radio-row {
    display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 4px 8px; border-radius: 4px; cursor: pointer;
    font-size: 14px; line-height: 20px;
}
.radio-row.is-selected { background: color-mix(in srgb, var(--primary) 6.94%, transparent); }
.radio-row:hover { background: color-mix(in srgb, var(--on-surface) 6%, transparent); }
.radio-row:focus-visible { outline: 2px solid var(--primary); }
.radio { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; flex: none; }
.radio::before { content: ""; width: 16px; height: 16px; border: 2px solid var(--on-surface-variant); border-radius: 50%; position: absolute; }
.radio { position: relative; }
.radio-dot { width: 10px; height: 10px; border-radius: 50%; background: transparent; z-index: 1; }
.is-selected > .radio::before { border-color: var(--primary); }
.is-selected .radio-dot { background: var(--primary); }

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0; flex: none; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 16px; border-radius: 8px; flex: none;
    border: 1px solid var(--outline); background: transparent; color: var(--on-surface-variant);
    font-size: 14px; line-height: 20px; letter-spacing: .1px; font-weight: 500; white-space: nowrap;
}
.chip:hover { background: color-mix(in srgb, var(--on-surface-variant) 8%, transparent); }
.chip .ic { width: 18px; height: 18px; }
.chip-filter.is-selected { background: var(--secondary-container); color: var(--on-secondary-container); border-color: transparent; padding-left: 8px; }

/* ---- Mannschaft ---- */
.list-card { display: flex; flex-direction: column; padding: 12px; }
.plist-head { display: flex; align-items: center; padding: 4px 8px; }
.plist-lg { flex: .8 1 0; min-width: 0; }
.plist-scroll { overflow-y: auto; min-height: 0; flex: 1; }
.plist-row { display: flex; align-items: center; padding-left: 8px; cursor: pointer; }
.plist-row:hover { background: color-mix(in srgb, var(--on-surface) 5%, transparent); }

/* ---- Archiv ---- */
.archive-item {
    display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 12px; cursor: pointer;
    background: var(--tone2); flex: none;
}
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-content: start; }
.archive-card { --fbg: var(--tone2); background: var(--tone2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.archive-card .section-card { background: var(--tone3); }

/* ---- Hilfe ---- */
.help-grid { columns: 2; column-gap: 16px; margin-top: 12px; }
.help-card { break-inside: avoid; margin-bottom: 12px; }

/* ---- Toast, Spinner, Querformat-Hinweis ---- */
.toast {
    position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 30;
    background: #313033; color: #F4EFF4; padding: 14px 16px; border-radius: 4px; font-size: 14px;
    box-shadow: 0 4px 8px 3px rgba(0, 0, 0, .15);
}
.spinner { width: 48px; height: 48px; border: 4px solid var(--primary); border-right-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.portrait-hint { display: none; }

@media (orientation: portrait) and (max-width: 1100px) {
    .portrait-hint {
        display: block; position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 15;
        background: #313033; color: #F4EFF4; padding: 10px 14px; border-radius: 8px; font-size: 13px; text-align: center;
    }
}

@media (max-width: 1240px) {
    .topbar { gap: 16px; }
    .btn.btn-onred { padding: 0 14px 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* TM/TF-Feld: Liste öffnen per Pfeil, Hinweis bei freiem Namen */
.tf-arrow { width: 40px; height: 40px; }
.tf-dropdown .tf-icon-trail .ic { margin: 0; }
.menu-item.is-current { background: color-mix(in srgb, var(--on-surface) 8%, transparent); }
.menu-note { padding: 8px 12px; font-size: 12px; line-height: 16px; letter-spacing: .4px; color: var(--on-surface-variant); border-top: 1px solid color-mix(in srgb, var(--outline) 35%, transparent); }

/* Bemerkungen */
.tf-area { align-items: stretch; min-height: 64px; }
.tf-area textarea {
    flex: 1; width: 100%; min-height: 62px; max-height: 140px; resize: vertical; border: 0; outline: 0; background: transparent;
    padding: 16px 15px 8px; font: inherit; font-size: 16px; line-height: 22px; letter-spacing: .5px; color: var(--on-surface);
}
.tf-area:focus-within textarea { padding: 15px 14px 7px; }
.tf-area textarea::placeholder { color: var(--on-surface-variant); opacity: 0; }
.tf-area:focus-within textarea::placeholder { opacity: 1; }
.tf-area .tf-label { top: 28px; }
.tf-area:focus-within .tf-label, .tf-area.tf-filled .tf-label { top: -1px; }
.tf-area:focus-within .tf-label { top: -2px; }
.squad-note {
    font-size: 14px; line-height: 20px; font-weight: 500; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: color-mix(in srgb, var(--fg) 80%, transparent);
}
.pt-row[data-note] { cursor: pointer; border-radius: 4px; }
.pt-row[data-note]:hover { background: color-mix(in srgb, var(--on-surface) 6%, transparent); }

.ic.pt-note-ic { display: inline-block; width: 16px; height: 16px; margin-left: 4px; vertical-align: -3px; }
.pt-note { padding-left: 12px; font-style: italic; font-size: 12px; line-height: 16px; color: color-mix(in srgb, var(--fg) 80%, transparent); white-space: pre-wrap; }
.italic { font-style: italic; }
.on-surface { color: var(--on-surface); }
.btn-outlined.btn-danger { color: var(--fw-rot); }

/* Trupp-Kasten: Aufteilung ohne abgeschnittene Angaben (wie Tablet-App 0.3.3) */
.squad-head { padding: 10px 12px; gap: 4px; }
.squad-title { font-size: 20px; }
.status-pill { font-size: 12px; line-height: 16px; letter-spacing: .5px; padding: 3px 8px; }
.crew-row { gap: 10px; align-items: flex-start; }
.crew { flex: 1.2 1 0; }
.crew.crew-ruf { flex: .6 1 0; }
.crew-name { font-size: 15px; line-height: 19px; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.limit-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; row-gap: 2px; font-size: 13px; line-height: 18px; color: var(--fg); }
.limit-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.limit-l { color: color-mix(in srgb, var(--fg) 70%, transparent); }
.squad-note { font-size: 13px; line-height: 17px; font-weight: 400; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.squad-col { gap: 6px; }
.btn-stamp { height: 50px; }
.live-card .headline-large { font-size: 30px; line-height: 36px; }
.pt-row > .pt-l { flex: 1.15 1 0; }
.pt-row > .pt-t { flex: .75 1 0; }
.pt-row > .pt-span { flex: 2.75 1 0; }
.pt-row > .pt-n { flex: 0 0 20px; display: flex; justify-content: flex-end; }
.ic.pt-note-ic { margin-left: 0; vertical-align: middle; }
.pt-large .pt-row > .pt-t { font-size: 15px; }
.pt-query .pt-t { color: var(--ms-query); }
.pt-large .pt-row.is-muted .pt-span { font-size: 14px; }

.pt-hidden.is-link { cursor: pointer; color: var(--ms-query); font-weight: 500; text-decoration: underline; overflow: hidden; text-overflow: ellipsis; }
.pt-hidden.is-link:hover { background: color-mix(in srgb, var(--on-surface) 6%, transparent); border-radius: 4px; }
.dialog .pt { --fg: var(--on-surface); }

/* ---- PDF-Protokoll (Druckansicht, ui/report.js) ------------------------------------------ */
#print-root { display: none; }
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 12mm 14mm;
    @bottom-right { content: "Seite " counter(page) " / " counter(pages); font: 7pt Roboto, Arial, sans-serif; color: #555; }
  }
  html, body { height: auto; overflow: visible; background: #fff; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; color: #000; font: 9pt/1.25 Roboto, Arial, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  :where(#print-root) table { width: 100%; border-collapse: collapse; }
  :where(#print-root) td, :where(#print-root) th { border: 0.6pt solid #000; padding: 1.2mm 1.5mm; text-align: left; font-weight: normal; vertical-align: middle; }
  .r-doc h1 { font-size: 14pt; text-align: center; margin: 0 0 3mm; }
  .r-header { border: 1.6pt solid #000; }
  .r-header td { width: 25%; height: 6.5mm; }
  .r-meta { font-size: 7pt; color: #555; margin: 1mm 0 1.5mm; }
  /* Grauer Trennbalken: Trupp-Titel oder Abschnitt (gleiche Optik wie „Ereignisprotokoll“). */
  .r-bar { background: #D9D9D9; font-size: 10pt; font-weight: bold; margin: 4mm 0 1.5mm; padding: 1mm 1.5mm; break-after: avoid; }
  .r-squad-head { break-inside: avoid; break-after: avoid; }
  .r-block { border: 1.6pt solid #000; margin-bottom: 1.5mm; table-layout: fixed; }
  .r-block td, .r-block th { height: 5.6mm; padding: 0.6mm 1.2mm; }
  .r-block .big { font-size: 11pt; }
  .r-head th { text-align: center; font-weight: bold; }
  .r-sub td { text-align: center; font-size: 8pt; }
  .r-block .nr { font-size: 20pt; font-weight: bold; text-align: center; width: 9mm; }
  .r-block .lbl { text-align: center; font-weight: bold; }
  .r-block .v { text-align: center; font-weight: bold; font-size: 10pt; }
  .r-ext td { background: #F2F2F2; font-size: 6.5pt; color: #555; height: auto; padding: 0.6mm 1.2mm; }
  .r-ext .warn { color: #C00000; font-weight: bold; }
  .r-notes { border: 1.6pt solid #000; margin: 1.5mm 0; }
  .r-notes td { height: 5.2mm; font-size: 8pt; padding: 0 1.5mm; }
  .r-ref { border: 1.6pt solid #000; table-layout: fixed; }
  .r-ref th { width: 24mm; font-size: 7pt; font-weight: bold; text-align: center; }
  .r-ref td { text-align: center; font-weight: bold; height: 6mm; }
  .c-green { background: #00B050 !important; }
  .c-yellow { background: #FFFF00 !important; }
  .c-red { background: #FF0000 !important; }
  #print-root .gray, #print-root .gray td { background: #D9D9D9; }
  .r-doc .muted { color: #555; font-size: 8.5pt; margin: 0 0 1.5mm; }
  .r-doc .pre { white-space: pre-wrap; margin: 0; }
  .r-doc .warn { color: #C00000; font-weight: bold; margin: 1mm 0; }
  .r-kv td, .r-kv th { border: none; padding: 0.4mm 0; }
  .r-kv th { width: 52mm; font-weight: bold; }
  .r-tl { margin: 1.5mm 0; }
  .r-tl thead th { background: #F2F2F2; font-weight: bold; font-size: 8pt; }
  .r-tl tr { break-inside: avoid; }
  .r-tl td:nth-child(1) { width: 28mm; } .r-tl td:nth-child(2) { width: 22mm; } .r-tl td:nth-child(3), .r-tl td:nth-child(4) { width: 18mm; }
  /* Ereignisprotokoll beginnt immer auf einer neuen Seite. */
  .r-evpage { break-before: page; }
  .r-ev td { border: none; border-bottom: 0.5pt solid #D9D9D9; font-size: 8pt; padding: 0.6mm 1mm; }
  .r-ev td:nth-child(1) { width: 26mm; white-space: nowrap; } .r-ev td:nth-child(2) { width: 36mm; }
  .r-ev tr { break-inside: avoid; }
  .r-sign { display: flex; gap: 12mm; margin-top: 24mm; break-inside: avoid; }
  .r-sign div { flex: 1; border-top: 0.6pt solid #000; padding-top: 1mm; font-size: 8pt; color: #555; }
  .r-foot { margin-top: 4mm; font-size: 6.5pt; color: #555; }
}
