/* DBS Ampel (27.10.2026): the management reports as a phone PWA, in the look of the employee app (src/UnitPlan.Mobile):
   dark bar with the orange line, Teko headings, bottom navigation. The colours are the MudBlazor palette variables of the
   web theme; the dark palette follows the phone (prefers-color-scheme). Fonts bundled like in the app (OFL), so the
   offline pages need no network. */
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/lato-400.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/lato-700.woff2') format('woff2'); }
@font-face { font-family: 'Teko'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('fonts/teko-variable.woff2') format('woff2'); }

html, body.ampel-body {
    margin: 0;
    min-height: 100%;
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    /* clip, not hidden (02.11.2026): "hidden" made html/body a scroll container and the sticky header scrolled away */
    overflow-x: clip;
}

.ampel-app { min-height: 100vh; min-height: 100dvh; }

/* Header: sticky dark bar with the orange line; under the iPhone status bar / notch. */
.ampel-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: calc(6px + env(safe-area-inset-top)) calc(8px + env(safe-area-inset-right)) 6px calc(16px + env(safe-area-inset-left));
    background: #222222;
    color: #fff;
    border-bottom: 3px solid #eb7223;
}

.ampel-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-family: 'Teko', sans-serif;
    font-weight: 600;
    font-size: 1.7rem;
    line-height: 1;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-top: 4px;
}

/* Company logo at the top right (light variant on the dark bar), keeps its proportions. */
.ampel-logo { flex: none; height: 34px; max-width: 104px; object-fit: contain; }

/* Back and forward in the header (02.11.2026): the installed app has no browser bar. Centred in the room between the tab
   name and the menu, so the logo keeps the left edge to itself. */
.ampel-history { display: flex; flex: none; gap: 4px; order: 2; margin: 0 auto; }
.ampel-header-nav .ampel-title { flex: 0 1 auto; order: 1; }
.ampel-header-nav .ampel-logo { order: 0; }
.ampel-header-nav .ampel-menu { order: 3; }
.ampel-history-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}
.ampel-history-button .mud-icon-root { font-size: 2rem; }
.ampel-history-button:disabled { opacity: .3; cursor: default; }
.ampel-history-button:not(:disabled):active, .ampel-history-button:focus-visible { background: rgba(255, 255, 255, .14); outline: none; }
@media (max-width: 360px) { .ampel-logo { max-width: 72px; } }

/* Header menu: Unit-Plan im Browser, Abmelden. A native <details>, no script needed. */
.ampel-menu { position: relative; flex: none; }
.ampel-menu > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
}
.ampel-menu > summary::-webkit-details-marker { display: none; }
.ampel-menu > summary:focus-visible, .ampel-menu[open] > summary { background: rgba(255, 255, 255, .14); outline: none; }
.ampel-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 230px;
    padding: 6px 0;
    border-radius: 10px;
    background: var(--mud-palette-surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
    border: 1px solid var(--mud-palette-lines-default);
}
.ampel-menu-panel a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 16px;
    color: var(--mud-palette-text-primary);
    text-decoration: none;
    font-size: .95rem;
}
.ampel-menu-panel a:active, .ampel-menu-panel a:focus-visible { background: rgba(var(--mud-palette-primary-rgb), .1); outline: none; }
.ampel-menu-panel .mud-icon-root { color: var(--mud-palette-text-secondary); font-size: 1.3rem; }

/* Offline banner (the service worker served the last kept page). */
.ampel-offline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 8px calc(16px + env(safe-area-inset-right)) 8px calc(16px + env(safe-area-inset-left));
    background: var(--mud-palette-warning);
    color: #222222;
    font-weight: 700;
    font-size: .9rem;
}
.ampel-offline[hidden] { display: none; }
.ampel-offline button {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #222222;
    border-radius: 18px;
    background: transparent;
    color: #222222;
    font: inherit;
    cursor: pointer;
}

/* Content: 12 px gutter (plus the safe areas in landscape), room for the bottom navigation. */
.ampel-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 12px calc(12px + env(safe-area-inset-right)) calc(84px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
    box-sizing: border-box;
    min-width: 0;
}
.ampel-app-plain .ampel-main { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

/* Bottom navigation: four tabs, icon + label, thumb-sized; the active tab in the primary colour. */
.ampel-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: var(--mud-palette-surface);
    border-top: 1px solid var(--mud-palette-lines-default);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, .08);
}
.ampel-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 58px;
    padding: 6px 0 8px;
    color: var(--mud-palette-text-secondary);
    text-decoration: none;
    font-size: .75rem;
}
.ampel-nav-icon { font-size: 1.3rem; line-height: 1.4; padding: 0 16px; border-radius: 16px; }
.ampel-nav a.active { color: var(--mud-palette-primary); font-weight: 700; }
.ampel-nav a.active .ampel-nav-icon { background: rgba(var(--mud-palette-primary-rgb), .16); }
.ampel-nav a:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: -4px; }

/* The reports inside: no outer card on the phone (the charts have their own cards), the period selector centred. */
.ampel-main > .unit-perf.mud-paper { background: transparent; box-shadow: none; padding: 0 !important; }
.ampel-main .perf-head { justify-content: center; margin-bottom: 4px; }
.ampel-period { gap: 4px !important; }
.ampel-period .perf-month-name { min-width: 0; font-size: 1rem; }
.ampel-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--mud-palette-primary);
    text-decoration: none;
    flex: none;
}
.ampel-step:active, .ampel-step:focus-visible { background: rgba(var(--mud-palette-primary-rgb), .14); outline: none; }
.ampel-step-off { color: var(--mud-palette-text-disabled); opacity: .45; }
.ampel-today {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 10px;
    color: var(--mud-palette-primary);
    font-weight: 700;
    text-decoration: none;
}
.ampel-main .unit-probs .pc-card { scroll-margin-top: calc(72px + env(safe-area-inset-top)); }
.ampel-main a.pt-tile { color: inherit; text-decoration: none; }
.ampel-main a.perf-row { color: inherit; text-decoration: none; }
.ampel-main a:not([href]) { cursor: inherit; }
.ampel-main a:not([href]):hover { text-decoration: none; }

/* Tap targets of the charts: the details open as a card above the navigation (ampel.js). */
.ampel-tap { cursor: pointer; }
.ampel-tap:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 1px; border-radius: 4px; }
.ampel-tap.ampel-tap-on { outline: 2px solid var(--mud-palette-primary); outline-offset: 1px; border-radius: 4px; }
.ampel-tap.ampel-tap-on .pc-slot { background: rgba(var(--mud-palette-primary-rgb), .08); border-radius: 4px; }

.ampel-sheet {
    position: fixed;
    left: calc(8px + env(safe-area-inset-left));
    right: calc(8px + env(safe-area-inset-right));
    bottom: calc(66px + env(safe-area-inset-bottom));
    z-index: 30;
    max-width: 560px;
    margin: 0 auto;
    max-height: 55vh;
    overflow-y: auto;
    padding: 14px 52px 14px 16px;
    border-radius: 14px;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border: 1px solid var(--mud-palette-lines-default);
    border-top: 3px solid var(--mud-palette-primary);
    box-shadow: 0 10px 32px rgba(0, 0, 0, .3);
    font-size: .92rem;
    line-height: 1.45;
}
.ampel-sheet[hidden] { display: none; }
.ampel-sheet-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.ampel-sheet-close:focus-visible { outline: 2px solid var(--mud-palette-primary); }
.ampel-app-plain .ampel-sheet { bottom: calc(12px + env(safe-area-inset-bottom)); }
/* From a figure to the real data (02.11.2026): the links of the tapped mark, as large buttons under the details. */
.ampel-tip-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--mud-palette-lines-default);
}
.ampel-tip-link {
    display: block;
    min-height: 44px;
    padding: 11px 12px;
    border-radius: 10px;
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text, #fff);
    font-weight: 600;
    text-decoration: none;
    line-height: 1.3;
}
.ampel-tip-link:focus-visible { outline: 2px solid var(--mud-palette-text-primary); outline-offset: 2px; }

/* "alle anzeigen" and the table as native disclosures. */
details.ampel-more { margin-top: 4px; }
details.ampel-more > summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: var(--mud-palette-primary);
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
}

/* "Leistung": the employee tabs swipe sideways inside their strip; the page itself never scrolls sideways. */
.ampel-emp-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding: 2px 2px 8px;
    margin: 0 -12px;
    padding-left: 12px;
    padding-right: 12px;
    border-bottom: 1px solid var(--mud-palette-divider);
}
.ampel-emp-tabs::-webkit-scrollbar { display: none; }
.ampel-emp-tab {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 22px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    text-decoration: none;
    white-space: nowrap;
    font-size: .9rem;
    scroll-snap-align: start;
}
.ampel-emp-tab-on {
    border-color: var(--mud-palette-primary);
    background: rgba(var(--mud-palette-primary-rgb), .14);
    color: var(--mud-palette-primary);
    font-weight: 700;
}

/* Hint at the bottom of every tab. */
.ampel-hint {
    margin: 28px 0 8px;
    padding: 16px;
    text-align: center;
    border-top: 1px solid var(--mud-palette-divider);
    color: var(--mud-palette-text-secondary);
    font-size: .9rem;
}
.ampel-hint p { margin: 0 0 12px; }
.ampel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 10px;
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}
.ampel-button:focus-visible { outline: 3px solid rgba(var(--mud-palette-primary-rgb), .45); outline-offset: 2px; }

/* Login, logout, no access, offline fallback. */
.ampel-login {
    max-width: 400px;
    margin: 16px auto 0;
    padding: 24px 20px;
    border-radius: 14px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    text-align: center;
}
.ampel-login-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.ampel-login-title {
    margin: 12px 0 0;
    font-family: 'Teko', sans-serif;
    font-weight: 600;
    font-size: 2.2rem;
    line-height: 1;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.ampel-login-sub { margin: 6px 0 16px; color: var(--mud-palette-text-secondary); font-size: .95rem; line-height: 1.4; }
.ampel-login-sub a { color: var(--mud-palette-primary); }
.ampel-login-form { display: flex; flex-direction: column; text-align: left; gap: 4px; }
.ampel-login-form label { font-weight: 700; font-size: .9rem; margin-top: 10px; }
.ampel-login-form input:not([type="checkbox"]), .ampel-login-form textarea {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--mud-palette-lines-inputs, #bdbdbd);
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
    font: inherit;
    font-size: 16px; /* no zoom on focus in iOS Safari */
}
.ampel-login-form textarea { min-height: 140px; resize: vertical; }
.ampel-login-form input:focus, .ampel-login-form textarea:focus { outline: 2px solid var(--mud-palette-primary); border-color: var(--mud-palette-primary); }
.ampel-login-form .validation-message { color: var(--mud-palette-error); font-size: .85rem; }
.ampel-login-check { display: flex !important; align-items: center; gap: 10px; min-height: 44px; font-weight: 400 !important; }
.ampel-login-check input { width: 22px; height: 22px; accent-color: var(--mud-palette-primary); }
.ampel-login-button { width: 100%; margin-top: 16px; }
.ampel-login-error, .ampel-login-note {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: .92rem;
    text-align: left;
}
.ampel-login-error { background: rgba(var(--mud-palette-error-rgb), .12); color: var(--mud-palette-error); font-weight: 700; }
.ampel-login-note { background: rgba(var(--mud-palette-success-rgb), .12); color: var(--mud-palette-text-primary); }

/* The offline fallback page has no MudBlazor theme: the few colours it needs. */
.ampel-static {
    --mud-palette-background: #f7f7f7;
    --mud-palette-surface: #ffffff;
    --mud-palette-text-primary: #333333;
    --mud-palette-text-secondary: #666666;
    --mud-palette-lines-default: #e3e3e3;
    --mud-palette-primary: #eb7223;
    --mud-palette-primary-text: #ffffff;
}
@media (prefers-color-scheme: dark) {
    .ampel-static {
        --mud-palette-background: #1c1c1c;
        --mud-palette-surface: #262626;
        --mud-palette-text-primary: #e6e6e6;
        --mud-palette-text-secondary: #a6a6a6;
        --mud-palette-lines-default: #363636;
        --mud-palette-primary: #f0843e;
        --mud-palette-primary-text: #1c1c1c;
    }
}

/* "DBS Ampel installieren": QR code (always on white so that cameras read it in dark mode) and the steps per device. */
.ampel-install-qr { display: block; margin: 8px auto 4px; padding: 10px; background: #fff; border-radius: 10px; width: 220px; height: 220px; }
.ampel-install-url { margin: 0 0 4px; font-size: .85rem; word-break: break-all; color: var(--mud-palette-text-secondary); }
.ampel-install-steps { margin-top: 20px; text-align: left; }
.ampel-install-steps h3 { margin: 16px 0 4px; font-size: 1rem; }
.ampel-install-steps ol { margin: 0; padding-left: 1.3rem; line-height: 1.55; }

/* "Leistung" with many employees: one list instead of a long row of tabs (28.10.2026). */
.ampel-emp-pick { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; }
.ampel-emp-pick label { font-weight: 700; font-size: .9rem; }
.ampel-emp-pick select {
    min-height: 48px; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 16px;
    border: 1px solid var(--mud-palette-lines-inputs, #bdbdbd); background: var(--mud-palette-background); color: var(--mud-palette-text-primary);
}

/* ── Office version (Büro, 02.11.2026): KI calls, switch "Büro erreichbar", to-dos, phone book ── */
.office-page { padding: 4px 0 16px; }
.office-caption { margin: 0 0 10px; font-size: .85rem; color: var(--mud-palette-text-secondary); }
.office-empty { margin: 24px 0; text-align: center; color: var(--mud-palette-text-secondary); }
.office-heading { margin: 22px 0 8px; font-family: 'Teko', sans-serif; font-size: 1.6rem; font-weight: 600; line-height: 1; }
.office-status { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 12px;
    border-radius: 12px; text-decoration: none; color: var(--mud-palette-text-primary); font-weight: 600; font-size: .9rem; }
.office-status-on { background: rgba(46, 160, 67, .12); }
.office-status-off { background: rgba(244, 67, 54, .14); }
.office-status-link { flex: none; color: var(--mud-palette-primary); font-weight: 600; }
.office-list { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.office-call { border: 1px solid var(--mud-palette-lines-default); border-left: 6px solid; border-radius: 12px; background: var(--mud-palette-surface); overflow: hidden; }
.office-call-done { opacity: .7; }
.office-call-main { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 6px; color: inherit; text-decoration: none; }
.office-call-time { font-size: .8rem; color: var(--mud-palette-text-secondary); }
.office-call-who { font-weight: 700; font-size: 1.02rem; }
.office-call-what { font-size: .9rem; }
.office-call-text { font-size: .9rem; color: var(--mud-palette-text-primary); }
.office-call-state { font-size: .8rem; color: var(--mud-palette-text-secondary); }
.office-call-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 10px; }
.office-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px;
    border: 1px solid var(--mud-palette-primary); border-radius: 10px; background: transparent; color: var(--mud-palette-primary);
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.office-btn-primary { background: var(--mud-palette-primary); color: var(--mud-palette-primary-text, #fff); }
.office-switch { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 14px; border-radius: 14px; border: 2px solid; }
.office-switch-on { border-color: #2ea043; background: rgba(46, 160, 67, .08); }
.office-switch-off { border-color: var(--mud-palette-error); background: rgba(244, 67, 54, .08); }
.office-switch-state { display: flex; gap: 12px; align-items: flex-start; }
.office-switch-state div { display: flex; flex-direction: column; gap: 2px; }
.office-switch-state b { font-size: 1.15rem; }
.office-switch-state small { color: var(--mud-palette-text-secondary); }
.office-switch-light { font-size: 2rem; line-height: 1; }
.office-switch-button { min-height: 52px; font-size: 1rem; }
.office-contact { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default); }
.office-contact-text { display: flex; flex-direction: column; min-width: 0; }
.office-contact-text span { font-size: .85rem; color: var(--mud-palette-text-secondary); }
.office-contact .office-btn { min-height: 40px; padding: 0 10px; font-size: .85rem; }
.office-todo { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; color: inherit; text-decoration: none;
    border-bottom: 1px solid var(--mud-palette-lines-default); }
.office-todo span { font-size: .85rem; color: var(--mud-palette-text-secondary); }
.office-todo-urgent b { color: var(--mud-palette-error); }

/* Login cards: the product large, the company below in a second line (Sergey 02.11.2026). */
.login-company { display: block; margin-top: .15em; font-size: .5em; letter-spacing: .08em; opacity: .75; }
