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 {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.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;
}

.shows-page {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.desktop-shows {
    width: 100%;
    min-width: 0;
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.grid-section {
    width: 100%;
    min-width: 0;
}

.show-heading {
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 6px;
}

.show-heading .section-title {
    flex: 1 1 auto;
    margin-bottom: 0;
}

.show-heading .show-button {
    flex: 0 0 auto;
}

.performance-section {
    margin-top: 6px;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

    .performance-section .hac-grid {
        flex: 1 1 auto;
        min-height: 0;
    }

.performance-time-display {
    margin-top: 5px;
    color: #555;
    font-size: 0.9rem;
}

.performance-duration-display {
    padding: 8px 9px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #f5f5f5;
    font-weight: 600;
}

.performance-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

    .performance-heading .section-title {
        margin-bottom: 0;
    }

.performance-add-button {
    flex: 0 0 auto;
}

.section-title {
    background: #b51f24;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    padding: 5px 8px;
    box-sizing: border-box;
}
.hac-grid {
    width: 100%;
    font-size: 0.9rem;
    user-select: none;
    -webkit-user-select: none;
}

    /* All grid cells */
    .hac-grid .flexgrid-cell {
        filter: none !important;
        -webkit-filter: none !important;
        user-select: none !important;
        -webkit-user-select: none !important;
    }

        /* Column headers */
        .hac-grid .flexgrid-cell[row-index="0"] {
            background-color: teal !important;
            color: white !important;
            font-weight: 600;
        }

    .hac-grid .column-header-options-container {
        display: none !important;
    }

.loading-message,
.empty-message,
.error-message {
    padding: 12px;
    border: 1px solid #d0d0d0;
}

.empty-message {
    background: #f7f7f7;
}

.error-message {
    background: #f8d7da;
    color: #842029;
}

/* Mobile Shows / Performances */

.mobile-shows {
    display: none;
}

@media (max-width: 767px) {

    .desktop-shows {
        display: none;
    }

    .mobile-shows {
        display: block;
    }

    .shows-page {
        padding: 0;
    }

    .mobile-show-list,
    .mobile-performance-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }

    .mobile-show-card {
        display: block;
        width: 100%;
        padding: 12px;
        border: 1px solid #d0d0d0;
        border-radius: 6px;
        background: #fff;
        color: inherit;
        text-align: left;
        font: inherit;
        cursor: pointer;
    }

        .mobile-show-card.selected {
            border: 2px solid #b51f24;
            background: #fdf3f3;
        }

    .mobile-card-title {
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.25;
    }

    .mobile-card-company {
        margin-top: 4px;
        font-weight: 600;
    }

    .mobile-card-genre {
        margin-top: 2px;
        color: #555;
    }

    .mobile-card-dates {
        margin-top: 8px;
        font-size: 0.9rem;
    }

    .mobile-card-summary {
        display: flex;
        gap: 20px;
        margin-top: 8px;
        font-size: 0.9rem;
    }

    .mobile-performance-title {
        margin-top: 6px;
    }

    .mobile-performance-card {
        padding: 12px;
        border: 1px solid #d0d0d0;
        border-radius: 6px;
        background: #fff;
    }

    .mobile-performance-times {
        margin-top: 6px;
        font-weight: 600;
    }

    .mobile-time-separator {
        padding: 0 4px;
    }

    .mobile-performance-duration,
    .mobile-performance-actual {
        margin-top: 3px;
        font-size: 0.9rem;
        color: #555;
    }

    .mobile-performance-summary {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 12px;
        padding-top: 10px;
        border-top: 1px solid #e0e0e0;
    }

        .mobile-performance-summary > div {
            display: flex;
            justify-content: space-between;
            gap: 8px;
        }

    .mobile-label {
        color: #555;
    }
}

.mobile-back-button {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #d0d0d0;
    background: #f5f5f5;
    padding: 12px 16px;
    text-align: left;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.mobile-selected-show {
    padding: 14px 16px;
    background: #fff;
}

.mobile-selected-show-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.mobile-selected-show-company {
    margin-top: 3px;
    font-weight: 600;
}

.mobile-selected-show-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 7px;
    color: #555;
    font-size: 0.9rem;
}

/* ============================================================
   Show Editor
   ============================================================ */

.show-editor-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
}

.show-editor-header {
    background: #b51f24;
    color: white;
    padding: 8px 14px;
    font-size: 1.1rem;
    font-weight: 700;
}

.show-editor-body {
    padding: 16px;
}

.show-editor-section {
    margin-bottom: 20px;
    border: 1px solid #d0d0d0;
}

.show-editor-section-title {
    padding: 7px 10px;
    background: #f0f0f0;
    border-bottom: 1px solid #d0d0d0;
    font-weight: 700;
}

.show-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    padding: 16px;
}

.show-field {
    min-width: 0;
}

.show-field-wide {
    grid-column: 1 / -1;
}

.show-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.show-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 9px;
    border: 1px solid #aaa;
    border-radius: 4px;
    font: inherit;
    background: white;
}

    .show-input:focus {
        outline: 2px solid #5b9bd5;
        outline-offset: 1px;
    }

.show-notes {
    resize: vertical;
    min-height: 110px;
}

.required {
    color: #b51f24;
}

.field-error {
    margin-top: 4px;
    color: #b51f24;
    font-size: 0.9rem;
    font-weight: 600;
}

.show-information-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.show-info-item {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 12px;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.show-info-label {
    color: #555;
}

.show-save-error {
    margin-bottom: 12px;
}

.show-editor-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.show-button {
    min-width: 100px;
    padding: 9px 18px;
    border-radius: 4px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

    .show-button:disabled {
        opacity: 0.6;
        cursor: default;
    }

.show-button-primary {
    background: #b51f24;
    border-color: #b51f24;
    color: white;
}

.show-button-secondary {
    background: #f4f4f4;
    border-color: #aaa;
    color: #222;
}


@media (max-width: 767px) {

    .show-editor-page {
        max-width: none;
    }

    .show-editor-body {
        padding: 10px;
    }

    .show-form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 12px;
    }

    .show-field-wide {
        grid-column: auto;
    }

    .show-information-grid {
        grid-template-columns: 1fr;
    }

    .show-info-item {
        border-right: 0;
    }

    .show-editor-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .show-button {
        width: 100%;
        min-width: 0;
    }
}

/* Duty Manager */
.performance-actions { display:flex; align-items:center; gap:8px; }
.duty-manager-page .show-editor-body { max-width:1500px; margin:0 auto; }
.duty-title { background:#b51f24; color:white; font-size:1.25rem; font-weight:700; text-align:center; padding:9px 12px; }
.duty-subtitle { text-align:center; font-weight:600; padding:7px 0 2px; }
.duty-grid { display:grid; gap:12px; }
.duty-grid-times, .duty-grid-three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.duty-grid-four { grid-template-columns:repeat(4,minmax(0,1fr)); }
.duty-readonly { display:flex; flex-direction:column; gap:6px; }
.duty-readonly span { font-weight:600; }
.duty-readonly strong { min-height:38px; display:flex; align-items:center; padding:7px 9px; border:1px solid #d0d0d0; border-radius:4px; background:#f5f5f5; }
.duty-time-error { background:#c00 !important; color:white; }
.staffing-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:8px; }
.staffing-title { margin:0 !important; flex:1; }
.staffing-table-wrap { width:100%; overflow-x:auto; }
.staffing-table { width:100%; min-width:1050px; border-collapse:collapse; }
.staffing-table th { background:teal; color:white; text-align:left; padding:7px; white-space:nowrap; }
.staffing-table td { border-bottom:1px solid #ddd; padding:5px; vertical-align:middle; }
.staffing-table th:nth-child(1) { width:17%; }
.staffing-table th:nth-child(2) { width:18%; }
.staffing-table th:nth-child(3), .staffing-table th:nth-child(4) { width:13%; }
.staffing-table th:nth-child(5) { width:10%; }
.staffing-table th:nth-child(6) { width:25%; }
.staffing-total { font-weight:600; white-space:nowrap; }
.staffing-delete { border:0; background:#b51f24; color:white; border-radius:4px; width:30px; height:30px; font-size:1.25rem; line-height:1; cursor:pointer; }
.staffing-summary { text-align:right; padding-top:8px; }
.staffing-mobile { display:none; }
.duty-notes-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.duty-readonly-notes { background:#fffacd; }
.mobile-performance-actions { margin:8px 0; }

@media (max-width: 800px) {
    .duty-grid-times, .duty-grid-three, .duty-grid-four, .duty-notes-grid { grid-template-columns:1fr; }
    .duty-manager-page .show-editor-body { padding-left:8px; padding-right:8px; }

    .staffing-heading .show-button { display:none; }
    .staffing-desktop { display:none; }
    .staffing-mobile { display:block; padding:10px; }

    .staffing-card {
        border:1px solid #d0d0d0;
        border-radius:4px;
        padding:12px;
        margin-bottom:12px;
        background:#fff;
    }

    .staffing-card-header {
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:10px;
        margin-bottom:12px;
        padding-bottom:8px;
        border-bottom:1px solid #e0e0e0;
    }

    .staffing-card .show-field { margin-bottom:12px; }
    .staffing-card .show-field:last-child { margin-bottom:0; }

    .staffing-card-times {
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:10px;
    }

    .staffing-card-total {
        margin:-2px 0 12px;
        padding:8px 10px;
        background:#f5f5f5;
        border:1px solid #d0d0d0;
        border-radius:4px;
    }

    .staffing-mobile-add {
        width:100%;
        margin-top:2px;
    }

    .staffing-summary {
        padding:10px 12px;
        border-top:1px solid #d0d0d0;
        font-size:1.05rem;
    }
}

@media (max-width: 430px) {
    .staffing-card-times { grid-template-columns:1fr; }
}

/* =========================================================
   Staff maintenance
   ========================================================= */

.show-heading-actions,
.maintenance-header-actions,
.staff-delete-actions,
.mobile-maintenance-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.staff-page {
    width: 100%;
    padding: 14px;
}

.maintenance-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.maintenance-page-header h1 {
    margin: 0;
    font-size: 1.45rem;
}

.maintenance-subtitle {
    margin-top: 3px;
    color: #666;
    font-size: 0.9rem;
}

.staff-editor-section {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #d6d6d6;
    border-radius: 5px;
    background: #fff;
}

.staff-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.staff-checkbox-label {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: normal;
}

.staff-checkbox-label input {
    width: 18px;
    height: 18px;
}

.staff-delete-button {
    background: #b42318;
    color: #fff;
    border: 1px solid #b42318;
}

.staff-delete-button:disabled {
    opacity: 0.5;
}

.staff-delete-warning {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #d9a5a0;
    border-radius: 4px;
    background: #fff5f4;
}

.staff-delete-actions {
    margin-top: 10px;
}

.staff-mobile-list {
    display: none;
}

@media (max-width: 767px) {
    .staff-page {
        padding: 10px;
    }

    .maintenance-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .maintenance-header-actions,
    .mobile-maintenance-actions {
        width: 100%;
    }

    .maintenance-header-actions .show-button,
    .mobile-maintenance-actions .mobile-edit-button {
        flex: 1 1 0;
    }

    .staff-desktop-list {
        display: none;
    }

    .staff-mobile-list {
        display: grid;
        gap: 8px;
    }

    .staff-mobile-card {
        width: 100%;
        padding: 12px;
        border: 1px solid #d3d3d3;
        border-radius: 5px;
        background: #fff;
        text-align: left;
    }

    .staff-mobile-card.selected {
        border-color: #0078D7;
        box-shadow: inset 0 0 0 1px #0078D7;
    }

    .staff-mobile-name {
        font-weight: 700;
        font-size: 1rem;
    }

    .staff-mobile-type,
    .staff-mobile-status,
    .staff-mobile-notes {
        margin-top: 4px;
        color: #555;
        font-size: 0.9rem;
    }

    .staff-form-grid {
        grid-template-columns: 1fr;
    }

    .staff-editor-section {
        padding: 12px;
    }

    .staff-delete-actions {
        align-items: stretch;
        flex-direction: column;
    }
}


/* Desktop maintenance area */
.maintenance-menu {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 16px;
    margin-top: 18px;
}

.maintenance-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 110px;
    padding: 18px;
    text-align: left;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

    .maintenance-tile:hover {
        background: #f5f7f8;
        border-color: #999;
    }

    .maintenance-tile strong {
        font-size: 1.05rem;
    }

    .maintenance-tile span {
        color: #555;
    }

.maintenance-mobile-message {
    display: none;
    padding: 20px;
    margin: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f7f7f7;
}

@media (max-width:767px) {
    .maintenance-desktop-only {
        display: none !important;
    }

    .maintenance-mobile-message {
        display: block;
    }
}

/* =========================================================
   Operational action buttons
   ========================================================= */

.show-button-action {
    background: seagreen;
    border-color: seagreen;
    color: white;
}

.show-button-action:hover,
.show-button-action:focus {
    filter: brightness(0.9);
}

@media (max-width: 767px) {
    .mobile-action-button {
        width: auto;
        min-width: 140px;
        min-height: 46px;
        padding: 10px 22px;
        border: 1px solid seagreen;
        border-radius: 6px;
        background: seagreen;
        color: white;
        font: inherit;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
    }

    .mobile-action-button:hover,
    .mobile-action-button:focus {
        filter: brightness(0.9);
    }

    .mobile-maintenance-actions {
        justify-content: center;
    }

    .mobile-maintenance-actions .mobile-action-button {
        flex: 0 0 auto;
    }

    .mobile-performance-actions {
        display: flex;
        justify-content: center;
    }

    .mobile-performance-actions .mobile-action-button {
        width: auto;
    }
}


/* Mobile spacing for Add Show / Add Performance only */
@media (max-width: 767px) {
    .mobile-add-action {
        margin-top: 3px;
        margin-bottom: 3px;
    }

    .mobile-maintenance-actions,
    .performance-heading .performance-actions {
        justify-content: center;
    }
}


/* Final mobile Add Performance alignment */
@media (max-width: 767px) {
    .mobile-add-performance-action {
        display: flex;
        justify-content: center;
        width: 100%;
    }
}

/* Maintenance return buttons on individual maintenance screens */
.maintenance-page-header .show-button-secondary {
    background: seagreen;
    border-color: seagreen;
    color: white;
}

.maintenance-page-header .show-button-secondary:hover,
.maintenance-page-header .show-button-secondary:focus {
    filter: brightness(0.9);
}


/* =========================================================
   Duty Manager - mobile sticky Save / Cancel bar
   ========================================================= */
@media (max-width: 800px) {
    .duty-manager-page .show-editor-body {
        padding-bottom: 84px;
    }

    .duty-manager-page .show-editor-buttons {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 0;
        padding: 10px;
        background: white;
        border-top: 1px solid #cfcfcf;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
    }

    .duty-manager-page .show-editor-buttons .show-button {
        width: 100%;
        min-height: 46px;
        margin: 0;
    }
}
