/* Artist Büro live dashboard (mw-ab-*) — standalone, no scoped CSS.
   Command-palette aesthetic (ported from docs/mockups/artist-buero.html): deep near-black
   canvas, MitWare violet accent, hairline borders, soft shadows, Geist body + JetBrains Mono
   numerics + Material Symbols Rounded icons. Every custom property is scoped to .mw-ab-dashboard
   so it never leaks into the rest of the app. The stage row splits evenly across however many
   stages exist via --mw-ab-stage-count. Stage cards themselves are MwStageStatusCard (mw-ssc-*)
   and the handover board is MwKanbanBoard (mw-kb-*); only their in-card content is styled here. */

.mw-ab-dashboard {
    /* canvas */
    --mw-ab-bg-page: #07070a;
    --mw-ab-glow-1: hsl(263 75% 12%);
    --mw-ab-glow-2: hsl(220 60% 9%);

    /* surfaces */
    --mw-ab-surface: hsl(240 12% 9%);
    --mw-ab-surface-elev: hsl(240 11% 11.5%);
    --mw-ab-surface-hover: hsla(0 0% 100% / 0.03);

    /* borders */
    --mw-ab-border: hsla(0 0% 100% / 0.06);
    --mw-ab-border-strong: hsla(0 0% 100% / 0.10);
    --mw-ab-border-light: hsla(0 0% 100% / 0.10);

    /* text */
    --mw-ab-text: hsl(0 0% 96%);
    --mw-ab-text-dim: hsl(240 5% 60%);
    --mw-ab-text-faint: hsl(240 5% 40%);

    /* accent — MitWare violet */
    --mw-ab-accent: hsl(263 90% 67%);
    --mw-ab-accent-soft: hsl(263 70% 79%);
    --mw-ab-accent-glow: hsla(263 90% 67% / 0.18);
    --mw-ab-accent-tint: hsla(263 90% 67% / 0.10);
    --mw-ab-accent-line: hsla(263 90% 67% / 0.30);

    /* status — calm, not neon */
    --mw-ab-green: hsl(152 55% 56%);
    --mw-ab-green-dim: hsla(152 55% 56% / 0.13);
    --mw-ab-amber: hsl(38 92% 62%);
    --mw-ab-amber-dim: hsla(38 92% 62% / 0.13);
    --mw-ab-amber-glow: hsla(38 92% 62% / 0.35);
    --mw-ab-red: hsl(351 75% 64%);
    --mw-ab-blue: hsl(210 80% 65%);
    --mw-ab-teal: hsl(172 60% 50%);
    --mw-ab-pink: hsl(322 70% 68%);

    --mw-ab-font-body: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
    --mw-ab-font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --mw-ab-radius: 12px;
    --mw-ab-radius-sm: 8px;
    --mw-ab-gap: 12px;
    --mw-ab-shadow:
        0 1px 0 hsla(0 0% 100% / 0.02) inset,
        0 18px 40px -24px hsla(0 0% 0% / 0.8);
    --mw-ab-stage-count: 1;

    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* rows: command bar, stage strip, then ONE panel row — all four panels sit side by side
       at uniform size below the stages. Header lives in the app bar now. */
    grid-template-rows: auto auto 1fr;
    gap: var(--mw-ab-gap);
    padding: var(--mw-ab-gap);
    /* fill the viewport minus the dense MudAppBar (48px) so the board never scrolls the page */
    height: calc(100dvh - 48px);
    max-height: calc(100dvh - 48px);
    box-sizing: border-box;
    overflow: hidden;
    background: var(--mw-ab-bg-page);
    color: var(--mw-ab-text);
    font-family: var(--mw-ab-font-body);
    font-weight: 400;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.mw-ab-dashboard *,
.mw-ab-dashboard *::before,
.mw-ab-dashboard *::after { box-sizing: border-box; }

/* Atmosphere — soft brand glows + faint grid, masked toward edges (behind all content) */
.mw-ab-dashboard::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 45% at 18% 0%, var(--mw-ab-glow-1), transparent 60%),
        radial-gradient(ellipse 50% 40% at 92% 100%, var(--mw-ab-glow-2), transparent 60%);
    opacity: 0.8;
    pointer-events: none;
    z-index: 0;
}

.mw-ab-dashboard::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(hsla(0 0% 100% / 0.015) 1px, transparent 1px),
        linear-gradient(90deg, hsla(0 0% 100% / 0.015) 1px, transparent 1px);
    background-size: 52px 52px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

/* Material Symbols Rounded icon helper (scoped) */
.mw-ab-mi {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'liga';
    font-variation-settings: 'opsz' 20;
}

/* ── Command bar (row 1) — page tools on the left, artist check-in dropdown anchor.
   z-index above the sibling panels so the open dropdown floats over the stage row. ── */
.mw-ab-topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--mw-ab-surface);
    border: 1px solid var(--mw-ab-border);
    border-radius: var(--mw-ab-radius);
    box-shadow: var(--mw-ab-shadow);
}

.mw-ab-topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid var(--mw-ab-border);
    border-radius: 999px;
    background: transparent;
    color: var(--mw-ab-text-dim);
    font-family: var(--mw-ab-font-body);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.mw-ab-topbar-btn:hover {
    color: var(--mw-ab-text);
    border-color: var(--mw-ab-accent-line);
    background: var(--mw-ab-surface-elev);
}

.mw-ab-topbar-btn .mw-ab-mi {
    font-size: 17px;
}

.mw-ab-topbar-btn-label {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.mw-ab-topbar-btn--accent {
    color: var(--mw-ab-accent-soft);
    border-color: var(--mw-ab-accent-line);
    background: var(--mw-ab-accent-tint);
}

.mw-ab-topbar-btn--accent:hover {
    color: var(--mw-ab-accent-soft);
    background: var(--mw-ab-accent-glow);
}

.mw-ab-legend-btn--active {
    color: var(--mw-ab-accent);
    border-color: var(--mw-ab-accent-line);
    background: var(--mw-ab-accent-tint);
}

/* ── Artist check-in dropdown (anchored under its command-bar button) ── */
.mw-ab-ci-anchor {
    position: relative;
}

.mw-ab-ci-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--mw-ab-accent);
    color: hsl(0 0% 100%);
    font-family: var(--mw-ab-font-mono);
    font-size: 10px;
    font-weight: 600;
}

/* Transparent full-viewport click-catcher below the dropdown: any outside click closes it. */
.mw-ab-ci-scrim {
    position: fixed;
    inset: 0;
    z-index: 98;
    background: transparent;
}

.mw-ab-ci-pop {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 99;
    width: 400px;
    max-height: min(540px, 72vh);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: var(--mw-ab-surface-elev);
    border: 1px solid var(--mw-ab-border-strong);
    border-radius: var(--mw-ab-radius);
    box-shadow: 0 28px 70px -20px hsla(0 0% 0% / 0.9);
}

/* ── Aufladen popover (embeds the mobile MwTopUpStation, artist-office budget pot) ── */
.mw-ab-topup-anchor {
    position: relative;
}

.mw-ab-topup-scrim {
    position: fixed;
    inset: 0;
    z-index: 98;
    background: transparent;
}

/* A phone-width panel with a fixed height so the station's internal viewport scrolls; the
   component supplies its own chrome/padding, so the panel is padding-free and clips to its radius. */
.mw-ab-topup-pop {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 99;
    width: 420px;
    height: min(760px, 82vh);
    overflow: hidden;
    background: var(--mud-palette-background);
    border: 1px solid var(--mw-ab-border-strong);
    border-radius: var(--mw-ab-radius);
    box-shadow: 0 28px 70px -20px hsla(0 0% 0% / 0.9);
}

/* ── Stage-Rider popover (embeds the mobile MwStageRider) ────────────────── */
.mw-ab-sr-anchor {
    position: relative;
}

.mw-ab-sr-scrim {
    position: fixed;
    inset: 0;
    z-index: 98;
    background: transparent;
}

/* A phone-width panel with a fixed height so MwStageRider's internal viewport scrolls; the
   component supplies its own chrome/padding, so the panel is padding-free and clips to its radius. */
.mw-ab-sr-pop {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 99;
    width: 420px;
    height: min(760px, 82vh);
    overflow: hidden;
    border: 1px solid var(--mw-ab-border-strong);
    border-radius: var(--mw-ab-radius);
    box-shadow: 0 28px 70px -20px hsla(0 0% 0% / 0.9);
}

/* ── Stage row (row 2, splits across all stages) — cards rendered by MwStageStatusCard (mw-ssc-*).
   z-index above the sibling panels (1) so the downward-opening artist-care popover floats over
   the notes/tents row below; still under the command bar (30) and its check-in dropdown. ── */
.mw-ab-stages {
    grid-column: 1 / -1;
    grid-row: 2;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(var(--mw-ab-stage-count), minmax(0, 1fr));
    gap: var(--mw-ab-gap);
    min-height: 0;
}

/* Seat the shared now-playing cards as panels on the dark canvas (scoped — stage view unaffected).
   Track cards (mw-ssc--track) bring their own edge-glow border and must NOT get a flat one on top. */
.mw-ab-stages .mw-ssc:not(.mw-ssc--track) {
    border: 1px solid var(--mw-ab-border);
    box-shadow: var(--mw-ab-shadow);
}

/* The track cards inherit the dashboard's own tones — surface, hairline, text and the status
   colours — so the shared component never carries a second palette around and the cards sit at
   exactly the panel tone. NOTE: compound with .mw-ssc on purpose — mw-stage-status-card.css loads
   AFTER this file, so an equal-specificity selector would lose and the cards would fall back to
   the MudBlazor surface. */
.mw-ab-dashboard .mw-ssc.mw-ssc--track {
    --mw-ssc-surface: var(--mw-ab-surface);
    --mw-ssc-dd-surface: var(--mw-ab-surface-elev);
    --mw-ssc-hairline: var(--mw-ab-border-strong);
    --mw-ssc-dim: var(--mw-ab-text-dim);
    --mw-ssc-faint: var(--mw-ab-text-faint);
    --mw-ssc-teal: var(--mw-ab-teal);
    --mw-ssc-amber: var(--mw-ab-amber);
    --mw-ssc-green: var(--mw-ab-green);
    --mw-ssc-pink: var(--mw-ab-pink);
    --mw-ssc-mono: var(--mw-ab-font-mono);

    /* the panels' own top highlight, so a card and a panel read as the same material */
    --mw-ssc-inner-light: 0 1px 0 hsla(0 0% 100% / 0.02) inset;
}

/* The care dropdown of the last stages flips to the right edge so it stays inside the viewport
   (mirrored tail corner: it then points at the anchor from the other side). */
.mw-ab-stages .mw-ssc:nth-last-child(-n+3) .mw-ssc-dd {
    left: auto;
    right: -1px;
    border-top-left-radius: 14px;
    border-top-right-radius: 4px;
}

/* ── Panels (shared) ── */
.mw-ab-panel {
    position: relative;
    z-index: 1;
    background: var(--mw-ab-surface);
    border: 1px solid var(--mw-ab-border);
    border-radius: var(--mw-ab-radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    box-shadow: var(--mw-ab-shadow);
}

.mw-ab-panel-header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--mw-ab-border);
    flex-shrink: 0;
}

.mw-ab-panel-header .mw-ab-mi {
    font-size: 18px;
    color: var(--mw-ab-accent-soft);
}

.mw-ab-panel-title {
    font-family: var(--mw-ab-font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mw-ab-text-dim);
}

.mw-ab-panel-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.mw-ab-panel-body--headerless { padding-top: 4px; }

/* ── Grid placement of the lower panels — one uniform row, four equal columns:
   communication (Notizen, Chat) on the left, ops (Zeltbelegung, Fahrten) on the right ── */
.mw-ab-notes { grid-column: 1; grid-row: 3; }
.mw-ab-chat { grid-column: 2; grid-row: 3; }
.mw-ab-tents { grid-column: 3; grid-row: 3; }
.mw-ab-fahrten { grid-column: 4; grid-row: 3; }

/* ── Zeltbelegung (tent occupation planner — inner chrome is mw-to-*) ── */
.mw-ab-tents-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Legend mode — quick "where is what": every area gets a grayish tint, a colored
   border, and its name in big type. Toggled by the command-bar button; any click exits. ── */
.mw-ab-dashboard--legend [data-legend] { position: relative; }

.mw-ab-dashboard--legend [data-legend]::after {
    content: attr(data-legend);
    position: absolute;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
    box-sizing: border-box;
    background: hsla(240 4% 35% / 0.55);
    border: 3px solid var(--mw-ab-legend-color, var(--mw-ab-accent));
    border-radius: var(--mw-ab-radius);
    color: var(--mw-ab-legend-color, var(--mw-ab-text));
    font-family: var(--mw-ab-font-body);
    font-size: clamp(18px, 2.6vw, 40px);
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 0 2px 12px hsla(0 0% 0% / 0.7);
    cursor: pointer;
}

.mw-ab-dashboard--legend .mw-ab-topbar::after  { --mw-ab-legend-color: var(--mw-ab-green); }
.mw-ab-dashboard--legend .mw-ab-stages::after  { --mw-ab-legend-color: var(--mw-ab-amber); }
.mw-ab-dashboard--legend .mw-ab-tents::after   { --mw-ab-legend-color: var(--mw-ab-accent); }
.mw-ab-dashboard--legend .mw-ab-fahrten::after { --mw-ab-legend-color: var(--mw-ab-blue); }
.mw-ab-dashboard--legend .mw-ab-notes::after   { --mw-ab-legend-color: var(--mw-ab-teal); }
.mw-ab-dashboard--legend .mw-ab-chat::after    { --mw-ab-legend-color: var(--mw-ab-pink); }

.mw-ab-empty {
    padding: 12px;
    font-size: 12px;
    color: var(--mw-ab-text-faint);
    font-style: italic;
}

/* ── Fahrten ── */
.mw-ab-fahrt-list {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mw-ab-fahrt-item {
    background: var(--mw-ab-surface-elev);
    border: 1px solid var(--mw-ab-border);
    border-radius: var(--mw-ab-radius-sm);
    padding: 11px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mw-ab-fahrt-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.mw-ab-fahrt-when {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
}

.mw-ab-fahrt-weekday {
    font-size: 11px;
    font-weight: 600;
    color: var(--mw-ab-text-dim);
    text-transform: capitalize;
}

.mw-ab-fahrt-date {
    font-family: var(--mw-ab-font-mono);
    font-size: 10.5px;
    color: var(--mw-ab-text-faint);
}

.mw-ab-fahrt-driver {
    min-width: 0;
    font-family: var(--mw-ab-font-mono);
    font-size: 10.5px;
    color: var(--mw-ab-text-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Middot separating the driver from the date it sits next to. */
.mw-ab-fahrt-driver::before {
    content: "·";
    margin-right: 5px;
    color: var(--mw-ab-text-faint);
}

.mw-ab-fahrt-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--mw-ab-text-faint);
    border-radius: var(--mw-ab-radius-sm);
    cursor: pointer;
    transition: color .12s ease, background .12s ease;
}

.mw-ab-fahrt-open:hover {
    color: var(--mw-ab-accent-soft);
    background: var(--mw-ab-accent-tint);
}

.mw-ab-fahrt-open .mw-ab-mi { font-size: 15px; }

/* Card body — stop timeline on the left, passenger list on the right. */
.mw-ab-fahrt-body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.mw-ab-fahrt-stops-col {
    flex: 1 1 auto;
    min-width: 0;
}

.mw-ab-fahrt-pax {
    flex: 0 0 auto;
    max-width: 46%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding-top: 1px;
    text-align: right;
}

.mw-ab-fahrt-pax-name {
    max-width: 100%;
    font-weight: 600;
    font-size: 12px;
    line-height: 1.25;
    color: var(--mw-ab-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The passenger's act name, shown muted in parentheses after their name. */
.mw-ab-fahrt-pax-act {
    margin-left: 3px;
    font-weight: 500;
    color: var(--mw-ab-accent-soft);
}

.mw-ab-fahrt-route {
    font-size: 11.5px;
    color: var(--mw-ab-text-dim);
    display: flex;
    align-items: center;
    gap: 5px;
}

.mw-ab-fahrt-route .mw-ab-arrow { color: var(--mw-ab-accent-soft); margin: 0 2px; }

/* Per-trip stop timeline — every stop with its scheduled arrival time, connected by a vertical rail. */
.mw-ab-fahrt-stops {
    position: relative;
    display: flex;
    flex-direction: column;
    margin-top: 3px;
}

.mw-ab-fahrt-stop {
    position: relative;
    display: grid;
    grid-template-columns: 40px 1fr;
    align-items: center;
    column-gap: 10px;
    padding: 3px 0 3px 16px;
}

/* The rail: a vertical line through the left gutter, trimmed to start/end at the first/last dot. */
.mw-ab-fahrt-stop::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--mw-ab-border);
}

.mw-ab-fahrt-stop:first-child::before { top: 50%; }
.mw-ab-fahrt-stop:last-child::before  { bottom: 50%; }

/* The dot marking each stop on the rail. */
.mw-ab-fahrt-stop::after {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mw-ab-surface-elev);
    border: 1.5px solid var(--mw-ab-accent-soft);
}

.mw-ab-fahrt-stop-time {
    font-family: var(--mw-ab-font-mono);
    font-size: 10.5px;
    color: var(--mw-ab-accent-soft);
}

.mw-ab-fahrt-stop-name {
    font-size: 11.5px;
    color: var(--mw-ab-text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mw-ab-fahrt-item--next {
    border-color: var(--mw-ab-accent-line);
    background: linear-gradient(90deg, var(--mw-ab-accent-tint) 0%, var(--mw-ab-surface-elev) 45%);
}

/* ── Merged Notizen & Übergabe panel — composer + view switch on top, feed or board below ── */
/* ── Notizen & Übergabe — the panel content itself is MwTeamNotesPanel (mw-tn-*,
   team-notes.css); only the panel-body frame above and the grid placement remain here. ── */
.mw-ab-notes-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Chat — both chat surfaces (office room panel + Fahrer-Chat in the Fahrten panel) embed the
   shared MwChat component (mw-chat-*) unstyled, so its internals match every other chat embed;
   the .mw-ab-panel provides the frame. ── */

/* ── Fahrten panel split — trip list on top (2/3), drivers' chat below (1/3). The chat FAB flips
   .mw-ab-fahrten--chat-full, which animates the chat to fill the whole panel (list → 0). ── */
.mw-ab-fahrten-list-pane {
    flex: 2 1 0;
    min-height: 0;
    overflow-y: auto;
    transition: flex-grow .32s cubic-bezier(.4, 0, .2, 1);
}

.mw-ab-fahrten-chat-pane {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-top: 1px solid var(--mw-ab-border);
    transition: flex-grow .32s cubic-bezier(.4, 0, .2, 1);
}

.mw-ab-fahrten--chat-full .mw-ab-fahrten-list-pane { flex-grow: 0; }

/* The FAB toggling the chat between the 1/3 split and full-panel. Floats over the chat's top-right. */
.mw-ab-fahrten-chat-fab {
    position: absolute;
    top: 7px;
    left: 9px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--mw-ab-border);
    border-radius: 999px;
    background: var(--mw-ab-surface-elev);
    color: var(--mw-ab-text-dim);
    box-shadow: var(--mw-ab-shadow);
    cursor: pointer;
    transition: color .12s ease, background .12s ease, border-color .12s ease;
}

.mw-ab-fahrten-chat-fab:hover {
    color: var(--mw-ab-accent-soft);
    border-color: var(--mw-ab-accent-line);
    background: var(--mw-ab-accent-tint);
}

.mw-ab-fahrten-chat-fab .mw-ab-mi { font-size: 20px; }

/* ── Fahrer im Dienst — compact status bar on top of the Fahrten panel + unfolding shift-check-in roster ── */
.mw-ab-drv { flex-shrink: 0; border-bottom: 1px solid var(--mw-ab-border); background: linear-gradient(180deg, hsla(263 40% 20% / 0.16), transparent); }

.mw-ab-drv-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }

.mw-ab-drv-live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--mw-ab-green); flex-shrink: 0; }
.mw-ab-drv-live::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--mw-ab-green); opacity: 0; animation: mw-ab-drv-pulse 2.2s ease-out infinite; }
.mw-ab-drv-live.off { background: var(--mw-ab-text-faint); }
.mw-ab-drv-live.off::after { display: none; }
@keyframes mw-ab-drv-pulse { 0% { transform: scale(0.6); opacity: 0.8; } 100% { transform: scale(1.5); opacity: 0; } }

.mw-ab-av { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 50%; font-family: var(--mw-ab-font-mono); font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--mw-ab-accent), hsl(263 70% 45%)); }
.mw-ab-av-md { width: 32px; height: 32px; font-size: 11px; }
.mw-ab-av-sm { width: 26px; height: 26px; font-size: 9.5px; }

.mw-ab-drv-who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mw-ab-drv-nm { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-ab-drv-nm--none { color: var(--mw-ab-text-dim); }
.mw-ab-drv-meta { font-family: var(--mw-ab-font-mono); font-size: 10px; color: var(--mw-ab-text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-ab-drv-meta b { color: var(--mw-ab-green); font-weight: 500; }
.mw-ab-drv-spacer { flex: 1; }

.mw-ab-drv-act { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: none; border-radius: 7px; background: rgba(255,255,255,0.05); color: var(--mw-ab-text-dim); cursor: pointer; text-decoration: none; flex-shrink: 0; transition: background 120ms ease, color 120ms ease; }
.mw-ab-drv-act:hover { background: rgba(255,255,255,0.12); color: var(--mw-ab-text); }
.mw-ab-drv-act.call:hover { background: var(--mw-ab-green-dim); color: var(--mw-ab-green); }
.mw-ab-drv-act .mw-ab-mi { font-size: 17px; }
.mw-ab-drv-act.chev { background: transparent; }
.mw-ab-drv-act.chev .mw-ab-mi { color: var(--mw-ab-text-faint); transition: transform .28s cubic-bezier(.4,0,.2,1), color .12s ease; }
.mw-ab-drv-open .mw-ab-drv-act.chev .mw-ab-mi { transform: rotate(180deg); color: var(--mw-ab-accent-soft); }

/* the unfold */
.mw-ab-drv-roster { overflow: hidden; max-height: 0; transition: max-height .34s cubic-bezier(.4,0,.2,1); background: hsla(240 12% 7% / 0.5); }
.mw-ab-drv-open .mw-ab-drv-roster { max-height: 300px; }
.mw-ab-drv-roster-inner { padding: 8px 10px 10px; }
.mw-ab-drv-roster-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; }
.mw-ab-drv-roster-head .mw-ab-mi { font-size: 15px; color: var(--mw-ab-accent-soft); }
.mw-ab-drv-roster-head .ttl { font-family: var(--mw-ab-font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--mw-ab-text-dim); }
.mw-ab-drv-roster-head .day { margin-left: auto; font-family: var(--mw-ab-font-mono); font-size: 10px; color: var(--mw-ab-text-faint); text-transform: capitalize; }

.mw-ab-drv-row { display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: var(--mw-ab-radius-sm); }
.mw-ab-drv-row + .mw-ab-drv-row { border-top: 1px solid var(--mw-ab-border); }
.mw-ab-drv-row.now { background: var(--mw-ab-accent-tint); }
.mw-ab-drv-win { font-family: var(--mw-ab-font-mono); font-size: 10px; color: var(--mw-ab-text-faint); }
.mw-ab-drv-empty { padding: 8px 6px; font-size: 11.5px; font-style: italic; color: var(--mw-ab-text-faint); }
.mw-ab-drv-tag.in { color: var(--mw-ab-green); }
.mw-ab-drv-tag.out { color: var(--mw-ab-blue); }

/* Three-state attendance pill: Erwartet · Da (green) · Weg (blue). One click switches state. */
.mw-ab-drv-seg { margin-left: auto; display: inline-flex; flex-shrink: 0; border: 1px solid var(--mw-ab-border-strong); border-radius: 999px; overflow: hidden; }
.mw-ab-drv-seg button {
    display: inline-flex; align-items: center; gap: 3px;
    border: none; background: transparent; color: var(--mw-ab-text-faint);
    font-family: var(--mw-ab-font-body); font-size: 10px; font-weight: 500;
    padding: 4px 9px; cursor: pointer; transition: background .12s ease, color .12s ease;
}
.mw-ab-drv-seg button + button { border-left: 1px solid var(--mw-ab-border); }
.mw-ab-drv-seg button .mw-ab-mi { font-size: 13px; }
.mw-ab-drv-seg button:hover { color: var(--mw-ab-text-dim); }
.mw-ab-drv-seg button.on { background: rgba(255,255,255,0.08); color: var(--mw-ab-text); }
.mw-ab-drv-seg button.on.in { background: var(--mw-ab-green); color: #06210f; }
.mw-ab-drv-seg button.on.out { background: var(--mw-ab-blue); color: #041322; }

.mw-ab-drv-roster-foot { margin-top: 8px; padding: 7px 4px 1px; border-top: 1px solid var(--mw-ab-border); font-size: 10px; color: var(--mw-ab-text-faint); line-height: 1.5; }
.mw-ab-drv-roster-foot b { color: var(--mw-ab-text-dim); font-weight: 600; }

/* ── Scrollbars ── */
.mw-ab-dashboard ::-webkit-scrollbar { width: 8px; height: 8px; }
.mw-ab-dashboard ::-webkit-scrollbar-track { background: transparent; }
.mw-ab-dashboard ::-webkit-scrollbar-thumb {
    background: hsla(0 0% 100% / 0.08);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.mw-ab-dashboard ::-webkit-scrollbar-thumb:hover {
    background: hsla(0 0% 100% / 0.14);
    background-clip: padding-box;
}

/* ── Booking-Wiki panel (mw-ab-wiki-*) — a docked "mini wiki" hung from the command bar (modelled on
   the check-in dropdown). It embeds MwWikiCategoryPanel, which reuses the wiki renderer (mw-wiki-*) and
   the floating hover preview wholesale; these rules only frame it and retint the rendered article to the
   artist-office palette. ── */
.mw-ab-wiki-anchor {
    position: relative;
}

/* Transparent full-viewport click-catcher below the panel: any outside click closes it. */
.mw-ab-wiki-scrim {
    position: fixed;
    inset: 0;
    z-index: 98;
    background: transparent;
}

.mw-ab-wiki-pop {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 99;
    width: min(760px, 90vw);
    height: min(620px, 78vh);
    display: flex;
    background: var(--mw-ab-surface-elev);
    border: 1px solid var(--mw-ab-border-strong);
    border-radius: var(--mw-ab-radius);
    box-shadow: 0 28px 70px -20px hsla(0 0% 0% / 0.9);
    overflow: hidden;
}

.mw-ab-wiki-panel {
    display: flex;
    width: 100%;
    min-height: 0;
    font-family: var(--mw-ab-font-body);
}

.mw-ab-wiki-list {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    overflow-y: auto;
    border-right: 1px solid var(--mw-ab-border);
}

.mw-ab-wiki-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: var(--mw-ab-radius-sm);
    background: transparent;
    color: var(--mw-ab-text-dim);
    font-family: var(--mw-ab-font-body);
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.mw-ab-wiki-list-item:hover {
    background: var(--mw-ab-surface-hover);
    color: var(--mw-ab-text);
}

.mw-ab-wiki-list-item--active {
    background: var(--mw-ab-accent-tint);
    border-color: var(--mw-ab-accent-line);
    color: var(--mw-ab-text);
}

.mw-ab-wiki-list-item .mw-ab-mi {
    font-size: 16px;
    color: var(--mw-ab-accent-soft);
}

.mw-ab-wiki-list-item-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mw-ab-wiki-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    color: var(--mw-ab-text);
}

.mw-ab-wiki-body-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--mw-ab-border);
    flex-shrink: 0;
}

.mw-ab-wiki-body-title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--mw-ab-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mw-ab-wiki-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--mw-ab-border);
    border-radius: var(--mw-ab-radius-sm);
    background: transparent;
    color: var(--mw-ab-text-dim);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.mw-ab-wiki-open:hover {
    border-color: var(--mw-ab-accent-line);
    color: var(--mw-ab-text);
}

.mw-ab-wiki-open .mw-ab-mi {
    font-size: 16px;
}

.mw-ab-wiki-article {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 20px;
    color: var(--mw-ab-text);
}

/* Search view: top-aligned, scrollable column hosting the shared MwWikiTwoPhaseSearch (whose field
   pin + empty states live in mw-wiki.css); only its office tint is applied here. */
.mw-ab-wiki-search {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 16px 20px;
    color: var(--mw-ab-text);
}

.mw-ab-wiki-search .mw-wiki-search-empty {
    color: var(--mw-ab-text-faint);
}

/* Retint the reused wiki renderer to the dark panel — links to the violet accent, headings/rules to the
   panel's text/hairline colours — so mw-wiki-* content sits inside the artist-office aesthetic. */
.mw-ab-wiki-article :is(h1, h2, h3, h4, h5, h6) {
    color: var(--mw-ab-text);
}

.mw-ab-wiki-article a,
.mw-ab-wiki-article .mw-wiki-link {
    color: var(--mw-ab-accent-soft);
}

.mw-ab-wiki-article .mw-wiki-link--missing {
    color: var(--mw-ab-red);
}

.mw-ab-wiki-article hr {
    border-color: var(--mw-ab-border);
}

.mw-ab-wiki-empty {
    margin: auto;
    padding: 24px;
    color: var(--mw-ab-text-faint);
    font-size: 12.5px;
    text-align: center;
}

/* ── Animations ── */
@keyframes mw-ab-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* ── Mobile layout (below Breakpoint.Md, the app-wide "this is a mobile layout" signal) ──
   The SAME component instances as the desktop grid, re-arranged: every panel and every
   toolbar popover becomes one full screen in a horizontally swipeable track (mw-swipe.ts,
   reusing .mw-dg-swap-track exactly like MwStageRider), navigated by a two-row tab bar at
   the bottom. The modifier overrides the desktop grid on the SAME .mw-ab-dashboard element,
   so all custom properties and the atmosphere pseudo-elements keep working. */
.mw-ab-dashboard--mobile {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
}

.mw-ab-m-viewport {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.mw-ab-m-viewport > .mw-dg-swap-track {
    display: flex;
    height: 100%;
    width: calc(var(--mw-ab-m-cells, 1) * 100%);
    transition: transform 0.34s cubic-bezier(0.32, 0.72, 0.28, 1);
    touch-action: pan-y;
    will-change: transform;
}

.mw-ab-m-viewport > .mw-dg-swap-track.mw-dg-swap-track--dragging { transition: none; }

/* One screen = one viewport width, used edge to edge — no gutters, every pixel goes to the
   component. Each screen scrolls (or hosts a self-scrolling panel) on its own — unlike
   MwStageRider there is no shared scroll position across cells. */
.mw-ab-m-screen {
    flex: 0 0 calc(100% / var(--mw-ab-m-cells, 1));
    width: calc(100% / var(--mw-ab-m-cells, 1));
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* A desktop panel dropped into a screen fills it flush; the panel's own body scrolls.
   The card chrome (radius, border, shadow) is desktop framing — at full bleed it's dropped. */
.mw-ab-m-screen > .mw-ab-panel {
    flex: 1;
    min-height: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Bühnen screen: the stage status cards as a vertical, scrollable, full-width card list. */
.mw-ab-m-screen--stages { overflow-y: auto; gap: 6px; }

.mw-ab-m-screen--stages .mw-ssc {
    flex-shrink: 0;
    border-radius: 0;
    border-top: 1px solid var(--mw-ab-border);
    border-bottom: 1px solid var(--mw-ab-border);
    border-left: none;
    border-right: none;
}

/* The wide track card keeps its full chrome on the phone — the edge glow lives IN the border,
   so it cannot go full-bleed; it sits inset instead. */
.mw-ab-m-screen--stages .mw-ssc.mw-ssc--track {
    margin: 0 8px;
    border: 2px solid transparent;
    border-radius: 14px;
    border-top-left-radius: 4px;
}

.mw-ab-m-screen--stages { padding-top: 8px; padding-bottom: 8px; }

/* ── Two-row bottom tab bar — ALL views live here (no separate top navigation) ── */
.mw-ab-m-tabbar {
    flex-shrink: 0;
    position: relative;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--mw-ab-border-strong);
    background: hsl(240 12% 7.5% / 0.92);
    backdrop-filter: blur(12px);
}

.mw-ab-m-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 2px 5px;
    border: none;
    border-radius: 10px;
    background: none;
    color: var(--mw-ab-text-faint);
    font-family: var(--mw-ab-font-body);
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease;
}

.mw-ab-m-tab .mw-ab-mi { font-size: 21px; transition: transform 0.18s ease; }

.mw-ab-m-tab-label {
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.mw-ab-m-tab--active {
    color: var(--mw-ab-accent-soft);
    background: var(--mw-ab-accent-tint);
}

.mw-ab-m-tab--active .mw-ab-mi { transform: translateY(-1px); }

/* The open-check-in counter rides the Check-in tab as a corner badge. */
.mw-ab-m-tab .mw-ab-ci-count {
    position: absolute;
    top: 2px;
    right: calc(50% - 24px);
}

/* ── Wiki screen: full-width article, category list as an off-canvas drawer ──
   The wiki panel's structural CSS is host-side by design ("host surfaces tint it by scoping
   mw-ab-wiki-* overrides"), so the drawer needs no change to MwWikiCategoryPanel itself. */
.mw-ab-m-wiki .mw-ab-wiki-panel { position: relative; }

.mw-ab-m-wiki .mw-ab-wiki-list {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    width: min(78%, 300px);
    background: var(--mw-ab-surface-elev);
    border-right: 1px solid var(--mw-ab-border-strong);
    box-shadow: 24px 0 60px -30px hsla(0 0% 0% / 0.85);
    transform: translateX(-106%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0.28, 1);
}

.mw-ab-m-wiki--drawer .mw-ab-wiki-list { transform: none; }

/* Room for the floating menu button above the article. */
.mw-ab-m-wiki .mw-ab-wiki-body { padding-top: 52px; }

.mw-ab-m-wiki-menu {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 25;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--mw-ab-border-strong);
    border-radius: 10px;
    background: var(--mw-ab-surface-elev);
    color: var(--mw-ab-text-dim);
    cursor: pointer;
}

.mw-ab-m-wiki-menu .mw-ab-mi { font-size: 19px; }

.mw-ab-m-wiki-drawer-scrim {
    position: absolute;
    inset: 0;
    z-index: 15;
    background: hsla(240 20% 3% / 0.5);
}
