h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    min-height: 100vh;
    padding: 2rem;
    color: #08223f;
    background:
        radial-gradient(ellipse at 20% 15%, rgba(255, 255, 255, 0.90), transparent 42%),
        radial-gradient(ellipse at 80% 86%, rgba(88, 209, 228, 0.20), transparent 42%),
        linear-gradient(135deg, #f8fcff 0%, #eaf6ff 48%, #dff2fb 100%);
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}

    .blazor-error-boundary::after {
        display: grid;
        max-width: 520px;
        min-height: 260px;
        place-items: center;
        margin: 10vh auto;
        padding: 2rem;
        border: 1px solid rgba(255, 255, 255, 0.86);
        border-radius: 28px;
        background: rgba(255, 255, 255, 0.82);
        box-shadow: 0 36px 100px rgba(5, 43, 76, 0.22);
        content: "Operations Portal stopped this screen before it could continue. Reload the page or try again.";
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.5;
        text-align: center;
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
.app-shell.theme-dark .assignment-transfer-preview,
.app-shell.theme-dark .assignment-transfer-preview .employee-name,
.app-shell.theme-dark .assignment-transfer-preview .assignment-hours,
.app-shell.theme-dark .assignment-transfer-preview .agency-badge {
    color: #071321 !important;
}

.app-shell.theme-dark .panel-add-text-button,
.app-shell.theme-dark .panel-add-text-button span,
.app-shell.theme-dark .panel-add-button.text-button,
.app-shell.theme-dark .panel-add-button.text-button span {
    color: #0b1422 !important;
    text-shadow: none !important;
}

.app-shell.theme-dark .panel-add-text-button:disabled,
.app-shell.theme-dark .panel-add-button.text-button:disabled {
    color: #0b1422 !important;
    opacity: 0.72;
}

/* =====================================================
   Weekly Manning - A3 print sheets (one page per site)
   Always printed in a light, high-contrast style,
   regardless of the on-screen theme.
   ===================================================== */

.print-sheets {
    display: none;
}

@media print {
    @page {
        size: A3 landscape;
        margin: 9mm;
    }

    html,
    body {
        height: auto !important;
        background: #ffffff !important;
    }

    /* Hide the interactive application */
    .app-shell > .sidebar,
    .main-panel > .topbar,
    .manning-page,
    .employee-panel-backdrop,
    .employee-details-panel,
    .available-panel-backdrop,
    .available-panel,
    #blazor-error-ui {
        display: none !important;
    }

    .app-shell,
    .main-panel,
    .content-area {
        display: block !important;
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #ffffff !important;
        box-shadow: none !important;
    }

    .print-sheets {
        display: block !important;
        color: #111726;
        background: #ffffff;
        font-family: "Segoe UI", Arial, sans-serif;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-sheet {
        page-break-after: always;
        break-after: page;
    }

    .print-table tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .print-sheet:last-child {
        page-break-after: auto;
        break-after: auto;
    }

    .print-sheet-header {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 3.5mm;
        padding-bottom: 2mm;
        border-bottom: 2.5px solid #1f345f;
    }

    .print-sheet-title h1 {
        margin: 0;
        color: #1f345f;
        font-size: 19pt;
        font-weight: 800;
        letter-spacing: 0.5px;
    }

    .print-sheet-title span {
        display: block;
        margin-top: 1mm;
        color: #33415e;
        font-size: 11pt;
        font-weight: 700;
    }

    .print-sheet-meta {
        text-align: right;
    }

    .print-sheet-meta strong {
        display: block;
        color: #1f345f;
        font-size: 11.5pt;
        font-weight: 800;
    }

    .print-sheet-meta span {
        display: block;
        margin-top: 1mm;
        color: #5b6780;
        font-size: 7.5pt;
        font-weight: 600;
    }

    .print-table {
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed;
    }

    .print-table th,
    .print-table td {
        border: 1pt solid #a3aec2;
        vertical-align: middle;
    }

    .print-table thead th {
        padding: 1.5mm 1.5mm;
        color: #ffffff;
        background: #1f345f !important;
        font-size: 9pt;
        font-weight: 800;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }

    .print-table th.print-line-column {
        width: 11%;
    }

    .print-table th.print-position-column {
        width: 13%;
    }

    .print-table tbody tr.print-line-start td {
        border-top: 1.8pt solid #1f345f;
    }

    .print-line-cell {
        padding: 1mm 1.5mm;
        background: #eef2f8 !important;
    }

    .print-line-cell strong {
        display: block;
        color: #111726;
        font-size: 9.5pt;
        font-weight: 800;
    }

    .print-line-cell span {
        display: block;
        margin-top: 0.4mm;
        color: #44506a;
        font-size: 7.5pt;
        font-weight: 700;
    }

    .print-position-cell {
        padding: 0.8mm 1.5mm;
        color: #111726;
        font-size: 8.5pt;
        font-weight: 700;
    }

    .print-position-cell.print-optional {
        color: #5b6780;
        font-style: italic;
        font-weight: 600;
    }

    .print-assignment-cell {
        padding: 0.7mm 1.3mm;
        background: #ffffff !important;
    }

    .print-assignment-cell strong {
        display: block;
        overflow: hidden;
        color: #111726;
        font-size: 9pt;
        font-weight: 800;
        line-height: 1.12;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .print-assignment-cell span {
        display: block;
        margin-top: 0.2mm;
        color: #44506a;
        font-size: 7pt;
        font-weight: 700;
    }

    .print-assignment-cell.print-vacant {
        background: repeating-linear-gradient(
            45deg,
            #ffffff 0,
            #ffffff 5px,
            #f0f2f6 5px,
            #f0f2f6 10px) !important;
    }

    .print-assignment-cell.print-agency {
        background: #fff3bd !important;
    }

    .print-assignment-cell.status-holiday {
        background: #dcecff !important;
    }

    .print-assignment-cell.status-training {
        background: #eee5fb !important;
    }

    .print-assignment-cell.status-sick {
        background: #fde5e7 !important;
    }

    .print-sheet-footer {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 4.5mm;
        margin-top: 2.5mm;
        color: #33415e;
        font-size: 7.5pt;
        font-weight: 700;
    }

    .print-legend-item {
        display: inline-flex;
        align-items: center;
        gap: 2mm;
    }

    .print-legend-swatch {
        display: inline-block;
        width: 5mm;
        height: 3mm;
        border: 1pt solid #97a3b8;
        border-radius: 1mm;
    }

    .print-legend-swatch.swatch-agency {
        background: #fff3bd !important;
    }

    .print-legend-swatch.swatch-holiday {
        background: #dcecff !important;
    }

    .print-legend-swatch.swatch-training {
        background: #eee5fb !important;
    }

    .print-legend-swatch.swatch-sick {
        background: #fde5e7 !important;
    }

    .print-legend-swatch.swatch-vacant {
        background: repeating-linear-gradient(
            45deg,
            #ffffff 0,
            #ffffff 3px,
            #f0f2f6 3px,
            #f0f2f6 6px) !important;
    }

    .print-legend-note {
        color: #5b6780;
        font-weight: 600;
    }
}

/* ============================================================
   Invisible scrollbars — scrolling stays fully functional,
   the scrollbar itself is simply not painted anywhere in the app.
   (Firefox / legacy Edge use the width props; Chromium / Safari
   use the ::-webkit-scrollbar rule. !important beats the custom
   thin-scrollbar rules defined elsewhere in the app.)
   ============================================================ */
html,
body,
.app-shell,
.app-shell * {
    scrollbar-width: none;      /* Firefox */
    -ms-overflow-style: none;   /* legacy Edge / IE */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.app-shell::-webkit-scrollbar,
.app-shell *::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;   /* Chrome / Edge / Safari */
}

/* ============================================================
   Rail sizing variables promoted to the shared ancestor.
   These were defined only on .manning-page, but the Employee
   Details panel is a SIBLING of .manning-page — so the vars were
   undefined for it and its width/top collapsed to auto (the panel
   shrank to its content and dropped to the bottom-right). Defining
   them on .app-shell lets them cascade to the panel too, so it
   opens as a right-rail starting at the "WHO IS FREE" corner,
   exactly matching the Available panel. .manning-page still
   redefines them locally (same values), so nothing else changes.
   ============================================================ */
.app-shell {
    --manning-rail-top-offset: 124px;
    --manning-rail-width: clamp(300px, 23vw, 408px);
}

/* On QHD/2K+ monitors the right rail (Who Is Free + Employee Details)
   gets a little more room so the larger typography never clips. */
@media (min-width: 1900px) {
    .app-shell {
        --manning-rail-width: clamp(340px, 20vw, 480px);
    }
}

/* ============================================================
   Mobile login: flat white document.

   Scoped component CSS cannot style <html> or <body>, so the
   login screen asks for this class once on entry (see
   wwwroot/js/login-performance.js) and drops it on exit. No
   other page in the app is affected: without the class these
   rules do nothing.
   ============================================================ */
@media (max-width: 768px), (pointer: coarse) {

    html.login-mobile-flat,
    html.login-mobile-flat body {
        margin: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        min-height: 100% !important;
        background: #ffffff !important;
        background-image: none !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-x: none;
        overscroll-behavior-y: auto;
        touch-action: pan-y;
    }

    html.login-mobile-flat body::before,
    html.login-mobile-flat body::after {
        display: none !important;
        content: none !important;
        background: none !important;
    }

    /* The layout root rendered directly into <body> by App.razor. */
    html.login-mobile-flat body > .account-shell {
        background: #ffffff !important;
        background-image: none !important;
    }
}
