:root {
    color-scheme: dark;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #070b0f;
}

html,
body {
    min-height: 100%;
    margin: 0;
    background: #070b0f;
    color: #f3f7fb;
}

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.fw-800 {
    font-weight: 800;
}

.ops-appbar {
    border-bottom: 1px solid #1d2b38;
}

.ops-main {
    min-height: 100vh;
    padding-top: 64px;
    background:
        linear-gradient(180deg, rgba(39, 169, 245, 0.08), rgba(7, 11, 15, 0) 280px),
        #070b0f;
}

.ops-shell {
    width: 100%;
    padding: 16px;
}

.summary-grid {
    margin-bottom: 18px;
}

.metric-card,
.mobile-row,
.event-editor {
    border: 1px solid #223344;
    border-radius: 8px;
    background: #101820;
    padding: 14px;
}

.ops-field-label {
    display: block;
    margin: 0 0 4px;
    color: #9fb0c2;
    font-size: 0.75rem;
    font-weight: 800;
}

.ops-native-input {
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    border: 1px solid #2a3b4c;
    border-radius: 4px;
    background: #0b1219;
    color: #f3f7fb;
    font: inherit;
    padding: 0 10px;
}

.event-save-cell {
    align-content: end;
}

.on-air-header {
    gap: 12px;
}

.event-tabs {
    margin-top: 4px;
}

.event-list {
    padding-top: 12px;
}

.event-row {
    max-width: 980px;
}

.event-actions,
.event-status-chips,
.event-dialog-actions {
    flex-wrap: wrap;
}

.poster-editor {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.poster-preview {
    display: grid;
    place-items: center;
    width: 86px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid #2a3b4c;
    border-radius: 6px;
    background: #0b1219;
}

.poster-preview img,
.poster-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-fields {
    min-width: 0;
}

.ops-file-input {
    padding-top: 8px;
}

.ops-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: 18px;
    background: rgba(3, 7, 11, 0.72);
}

.ops-modal {
    width: min(100%, 860px);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    border: 1px solid #2a3b4c;
    border-radius: 8px;
    background: #101820;
    padding: 18px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.48);
}

.metric-card .mud-typography-caption {
    color: #9fb0c2;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ops-tabs .mud-tabs-toolbar {
    border-bottom: 1px solid #223344;
}

.ops-tabs .mud-tab {
    min-height: 46px;
    font-weight: 800;
}

.search-row {
    gap: 10px;
}

.ops-table {
    border: 1px solid #223344;
    border-radius: 8px;
    overflow: hidden;
    background: #101820;
}

.ops-table th {
    color: #c8d6e3;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.user-actions {
    flex-wrap: wrap;
    margin-top: 10px;
}

.room-row {
    max-width: 900px;
}

.pin-audio {
    width: min(100%, 280px);
    height: 34px;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(39, 169, 245, 0.12), rgba(7, 11, 15, 0) 340px),
        #070b0f;
}

.login-card {
    width: min(100%, 420px);
    padding: 24px;
    border: 1px solid #223344;
    border-radius: 8px;
    background: #101820;
}

.login-label {
    display: block;
    margin: 14px 0 6px;
    color: #c8d6e3;
    font-size: 0.85rem;
    font-weight: 700;
}

.login-input {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    border: 1px solid #2a3b4c;
    border-radius: 6px;
    background: #0b1219;
    color: #f3f7fb;
    font: inherit;
    padding: 0 12px;
}

.login-input:focus {
    border-color: #27a9f5;
    box-shadow: 0 0 0 1px #27a9f5;
    outline: none;
}

.admin-actions,
.admin-reset-row {
    flex-wrap: wrap;
}

.admin-reset-row .mud-input-control {
    min-width: min(100%, 260px);
}

#blazor-error-ui {
    background: #ffcf33;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    color: #101820;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

@media (max-width: 640px) {
    .ops-shell {
        padding: 12px;
    }

    .ops-main {
        padding-top: 58px;
    }

    .search-row {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    .metric-card,
    .mobile-row,
    .event-editor {
        padding: 12px;
    }

    .poster-editor {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 10px;
    }

    .poster-preview {
        width: 72px;
    }
}
