/* =====================================================
   Overwatch Assessments – Brand Theme
   Primary:  Navy   #1a3a6b
   Accent:   Orange #e8640c
   Light BG: Cream  #f5f0e8
   ===================================================== */

:root {
    --ow-navy:         #1a3a6b;
    --ow-navy-dark:    #112549;
    --ow-navy-light:   #244d8f;
    --ow-orange:       #e8640c;
    --ow-orange-dark:  #c4520a;
    --ow-orange-light: #f07c30;
    --ow-cream:        #f5f0e8;
    --ow-cream-dark:   #e8e0d0;
    --ow-white:        #ffffff;
    --ow-text-dark:    #1a1a2e;
    --ow-text-muted:   #5a6a85;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--ow-cream);
    color: var(--ow-text-dark);
}

a, .btn-link {
    color: var(--ow-navy);
}

a:hover, .btn-link:hover {
    color: var(--ow-orange);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--ow-navy) 0%, var(--ow-navy-dark) 100%);
    border-color: var(--ow-navy-dark);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(26, 58, 107, 0.3);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--ow-navy-light) 0%, var(--ow-navy) 100%);
    border-color: var(--ow-navy);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 58, 107, 0.5);
    color: #fff;
}

.btn-warning {
    color: #fff;
    background: linear-gradient(135deg, var(--ow-orange) 0%, var(--ow-orange-dark) 100%);
    border-color: var(--ow-orange-dark);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(232, 100, 12, 0.3);
}

.btn-warning:hover, .btn-warning:focus {
    background: linear-gradient(135deg, var(--ow-orange-dark) 0%, var(--ow-orange) 100%);
    border-color: var(--ow-orange-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 100, 12, 0.5);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(232, 100, 12, 0.4);
}

.content {
    padding-top: 1.1rem;
}

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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA9NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMzNTg2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

/* ── Dark Theme ── */
.dark-theme {
    --settings-card-bg: #1e293b;
    --settings-card-border: #334155;
    --settings-text: #f1f5f9;
    --settings-muted: #94a3b8;
}

.dark-theme,
.dark-theme main,
.dark-theme article {
    background-color: #0f172a;
    color: #e2e8f0;
}

.dark-theme .top-row {
    background-color: #1e293b;
    border-bottom-color: #334155;
}

.dark-theme .top-row a {
    color: #94a3b8;
}

.dark-theme .card,
.dark-theme .settings-card {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

.dark-theme .alert-info {
    background-color: #1e3a5f;
    border-color: #2563eb;
    color: #93c5fd;
}

.dark-theme .alert-success {
    background-color: #14532d;
    border-color: #16a34a;
    color: #86efac;
}

.dark-theme .alert-warning {
    background-color: #451a03;
    border-color: #d97706;
    color: #fde68a;
}

.dark-theme .alert-danger {
    background-color: #450a0a;
    border-color: #dc2626;
    color: #fca5a5;
}

.dark-theme .form-control,
.dark-theme .form-select {
    background-color: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

.dark-theme .form-control:focus,
.dark-theme .form-select:focus {
    background-color: #1e293b;
    border-color: #6366f1;
    color: #f1f5f9;
}

.dark-theme .form-check-input {
    background-color: #334155;
    border-color: #475569;
}

.dark-theme .text-muted {
    color: #94a3b8 !important;
}

.dark-theme .bg-light {
    background-color: #1e293b !important;
}

.dark-theme table {
    color: #e2e8f0;
}

.dark-theme .table {
    --bs-table-bg: #0f172a;
    --bs-table-striped-bg: #1e293b;
    --bs-table-hover-bg: #1e293b;
    --bs-table-border-color: #334155;
    color: #e2e8f0;
}

.dark-theme .btn-outline-secondary {
    color: #94a3b8;
    border-color: #475569;
}

.dark-theme .btn-outline-secondary:hover {
    background-color: #334155;
    border-color: #64748b;
    color: #f1f5f9;
}

.dark-theme .progress {
    background-color: #334155;
}

.dark-theme a:not(.btn):not(.nav-link) {
    color: #818cf8;
}

.dark-theme h1, .dark-theme h2, .dark-theme h3,
.dark-theme h4, .dark-theme h5, .dark-theme h6 {
    color: #f1f5f9;
}

.dark-theme .dropdown-menu {
    background-color: #1e293b;
    border-color: #334155;
}

.dark-theme .dropdown-item {
    color: #e2e8f0;
}

.dark-theme .dropdown-item:hover {
    background-color: #334155;
    color: #f1f5f9;
}

.dark-theme .modal-content {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

.dark-theme .modal-header {
    border-bottom-color: #334155;
}

.dark-theme .modal-footer {
    border-top-color: #334155;
}

.dark-theme .feature-card,
.dark-theme .admin-section,
.dark-theme .reviewer-panel,
.dark-theme .stat-item {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

.dark-theme .stats-banner,
.dark-theme .quick-stats,
.dark-theme .admin-footer,
.dark-theme .rp-stat-card,
.dark-theme .rp-pending-item,
.dark-theme .admin-action-btn {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

.dark-theme .section-title,
.dark-theme .feature-title,
.dark-theme .section-title h5,
.dark-theme .quick-stats h6,
.dark-theme .stat-value {
    color: #f1f5f9;
}

.dark-theme .section-subtitle,
.dark-theme .feature-description,
.dark-theme .section-title p,
.dark-theme .stat-label,
.dark-theme .admin-footer-content,
.dark-theme .rp-stat-label {
    color: #94a3b8;
}

.dark-theme .rp-stat-card-pending {
    background: #3a2e10;
    border-color: #7c5f18;
}

.dark-theme .rp-pending-alert {
    background: #3a2e10;
    border-left-color: #f59e0b;
    color: #fcd34d;
}

.dark-theme .admin-action-btn:hover,
.dark-theme .rp-pending-item:hover {
    color: #f8fafc;
}

/* ── Top Row Breadcrumb ── */
.top-row-icon {
    font-size: 1rem;
    color: var(--ow-navy, #1a365d);
}

.top-row-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: #2d3748;
    letter-spacing: 0.2px;
}

.dark-theme .top-row-icon {
    color: #93c5fd;
}

.dark-theme .top-row-title {
    color: #e2e8f0;
}

/* ── Dark Theme – Page Body & Containers ── */
.dark-theme .page {
    background-color: #0f172a;
}

/* ── Theme-Aware Spartan Icon ── */
.theme-icon-white { display: none; }
.theme-icon-dark  { display: inline; }
.dark-theme .theme-icon-white { display: inline; }
.dark-theme .theme-icon-dark  { display: none; }

/* ── Dark Theme – Inline Color Overrides ── */
.dark-theme .card-title i[style*="color: #2c5282"],
.dark-theme .card-title i[style*="color:#2c5282"],
.dark-theme i[style*="color: #2c5282"],
.dark-theme i[style*="color:#2c5282"] {
    color: #93c5fd !important;
}

.dark-theme i[style*="color: #9b2c2c"],
.dark-theme i[style*="color:#9b2c2c"] {
    color: #fca5a5 !important;
}

.dark-theme i[style*="color: #2d3748"],
.dark-theme i[style*="color:#2d3748"] {
    color: #e2e8f0 !important;
}

.dark-theme strong[style*="color: #2c5282"],
.dark-theme strong[style*="color:#2c5282"] {
    color: #93c5fd !important;
}

.dark-theme strong[style*="color: #9b2c2c"],
.dark-theme strong[style*="color:#9b2c2c"] {
    color: #fca5a5 !important;
}

.dark-theme span[style*="color: #64748b"],
.dark-theme span[style*="color:#64748b"] {
    color: #94a3b8 !important;
}

.dark-theme span[style*="color: #475569"],
.dark-theme span[style*="color:#475569"] {
    color: #94a3b8 !important;
}

/* Broader dark-theme color overrides for card icons & labels */
.dark-theme .card-title i,
.dark-theme .assessment-card .card-body i {
    color: #93c5fd !important;
}

.dark-theme .bta-card .card-body i.bi-shield-check,
.dark-theme .bta-card .card-body i.bi-person-bounding-box {
    color: #fca5a5 !important;
}

/* ── Dark Theme – Info Alert / Footer Banner ── */
.dark-theme .alert-light,
.dark-theme .alert-light[style] {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

/* ── Dark Theme – Generic Light Backgrounds ── */
.dark-theme .assessment-table,
.dark-theme .toolbar-section,
.dark-theme .type-filter-bar,
.dark-theme .submission-card,
.dark-theme .assessment-card,
.dark-theme .section-panel,
.dark-theme .question-card,
.dark-theme .delete-modal,
.dark-theme .reviewer-panel,
.dark-theme .reviewer-panel-body,
.dark-theme .empty-state {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

/* ── Dark Theme – Feature Cards (Home) ── */
.dark-theme .feature-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .feature-card:hover {
    border-color: var(--ow-orange, #e8640c) !important;
    box-shadow: 0 12px 40px rgba(232, 99, 26, 0.15);
}

/* ── Dark Theme – Section Titles & Text ── */
.dark-theme .section-title,
.dark-theme .feature-title,
.dark-theme .card-title {
    color: #f1f5f9 !important;
}

.dark-theme .section-subtitle,
.dark-theme .feature-description,
.dark-theme .card-description {
    color: #94a3b8 !important;
}

/* ── Dark Theme – Stats Banner (Home) ── */
.dark-theme .stats-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-color: #334155;
}

/* ── Dark Theme – Admin Console ── */
.dark-theme .admin-section {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .admin-section:hover {
    box-shadow: 0 12px 40px rgba(14, 165, 233, 0.15);
    border-color: #0ea5e9 !important;
}

.dark-theme .section-header {
    border-bottom-color: #334155;
}

.dark-theme .section-title h5 {
    color: #f1f5f9 !important;
}

.dark-theme .section-title p {
    color: #94a3b8 !important;
}

.dark-theme .admin-action-btn {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #334155;
}

.dark-theme .admin-action-btn:hover {
    background: linear-gradient(135deg, #0c4a6e 0%, #0ea5e9 100%) !important;
    color: white !important;
}

.dark-theme .stat-item {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

.dark-theme .quick-stats {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}

.dark-theme .quick-stats h6 {
    color: #f1f5f9 !important;
}

.dark-theme .admin-footer {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

.dark-theme .admin-footer-content {
    color: #94a3b8 !important;
}

/* ── Dark Theme – Assessment Admin List ── */
.dark-theme .assessment-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%) !important;
}

.dark-theme .search-input {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

.dark-theme .search-input:focus {
    background-color: #1e293b !important;
    border-color: #6366f1 !important;
}

.dark-theme .search-input::placeholder {
    color: #64748b;
}

.dark-theme .filter-chip,
.dark-theme .type-chip {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #94a3b8 !important;
}

.dark-theme .filter-chip:hover,
.dark-theme .type-chip:hover {
    background-color: #334155 !important;
    border-color: #6366f1 !important;
    color: #e2e8f0 !important;
}

.dark-theme .filter-chip.active,
.dark-theme .type-chip.active {
    color: white !important;
}

.dark-theme .card-meta-grid {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

.dark-theme .card-meta-label {
    color: #64748b !important;
}

.dark-theme .card-meta-value {
    color: #e2e8f0 !important;
}

.dark-theme .meta-row {
    color: #94a3b8 !important;
}

.dark-theme .context-menu {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

.dark-theme .context-menu-item {
    color: #e2e8f0 !important;
}

.dark-theme .context-menu-item:hover {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
}

.dark-theme .context-menu-divider {
    background-color: #334155 !important;
}

.dark-theme .delete-modal {
    background-color: #1e293b !important;
    color: #e2e8f0;
}

.dark-theme .delete-confirm-input {
    background-color: #0f172a;
    border-color: #475569;
    color: #e2e8f0;
}

.dark-theme .btn-cancel-delete {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
}

.dark-theme .btn-cancel-delete:hover {
    background-color: #475569 !important;
}

/* ── Dark Theme – Assessment Fill ── */
.dark-theme .assessment-fill {
    color: #e2e8f0;
}

.dark-theme .section-panel {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

.dark-theme .assessment-fill .section-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-bottom-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .assessment-fill .section-header:hover {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%) !important;
}

.dark-theme .section-title {
    color: #f1f5f9 !important;
}

.dark-theme .section-body {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 60%) !important;
}

.dark-theme .section-content-blocks {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-left-color: #818cf8 !important;
    color: #94a3b8 !important;
}

.dark-theme .question-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .question-card:hover {
    border-color: #6366f1 !important;
    background-color: #1e293b !important;
}

.dark-theme .question-card.border-danger {
    border-color: #f87171 !important;
    background: linear-gradient(135deg, #1e293b 0%, #2d1b1b 100%) !important;
}

.dark-theme .question-number {
    background: linear-gradient(135deg, #312e81 0%, #4338ca 100%) !important;
    color: #e0e7ff !important;
}

.dark-theme .question-placeholder-hint {
    color: #64748b !important;
}

.dark-theme .question-card .form-check:hover {
    background-color: #334155 !important;
}

.dark-theme .question-card .form-check.bg-primary-subtle {
    background: linear-gradient(135deg, #312e81 0%, #1e293b 100%) !important;
    border-color: #4338ca !important;
}

.dark-theme .question-card label.form-label {
    color: #94a3b8 !important;
}

.dark-theme .scale-value-display {
    background: linear-gradient(135deg, #312e81 0%, #1e293b 100%) !important;
    color: #a5b4fc !important;
}

.dark-theme .scale-labels {
    color: #64748b !important;
}

.dark-theme .action-bar-inner {
    background: rgba(15, 23, 42, 0.95) !important;
    border-top-color: #334155 !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3) !important;
}

.dark-theme .question-context-menu {
    background: rgba(30, 41, 59, 0.97) !important;
    border-color: #334155 !important;
}

.dark-theme .question-context-menu .dropdown-item {
    color: #e2e8f0 !important;
}

.dark-theme .question-context-menu .dropdown-item:hover {
    background-color: #334155 !important;
    color: #a5b4fc !important;
}

.dark-theme .assessment-progress-panel {
    background-color: #1e293b;
    border-color: #334155;
}

.dark-theme .progress-panel-header {
    color: #e2e8f0;
}

.dark-theme .progress-track {
    background-color: #334155 !important;
}

.dark-theme .review-status-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #e2e8f0;
}

.dark-theme .followup-area {
    border-left-color: #4338ca !important;
}

.dark-theme .followup-area::before {
    background: #4338ca !important;
}

.dark-theme .question-marked-review {
    border-left-color: #f59e0b !important;
    background: linear-gradient(90deg, #2d2006 0%, #1e293b 6%) !important;
}

/* ── Dark Theme – Available Assessments / BTAs ── */
.dark-theme .assessment-card {
    background-color: #1e293b !important;
    color: #e2e8f0;
    border-color: #334155 !important;
}

.dark-theme .assessment-card .card-body {
    background-color: #1e293b !important;
    color: #e2e8f0;
}

.dark-theme .assessment-card:hover {
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.15) !important;
}

.dark-theme .assessment-card-icon-placeholder,
.dark-theme .submission-card-icon-placeholder,
.dark-theme .bta-card-icon-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #818cf8 !important;
}

.dark-theme .assessment-card-img,
.dark-theme .assessment-card-img-admin,
.dark-theme .assessment-card-img-placeholder,
.dark-theme .submission-card-img,
.dark-theme .submission-card-img-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
}

.dark-theme .assessment-thumb {
    background: #0f172a !important;
    border-color: #334155 !important;
}

.dark-theme .bta-card-img-admin,
.dark-theme .bta-card-img,
.dark-theme .bta-thumb {
    background: linear-gradient(135deg, #1e293b 0%, #1a0f0f 100%) !important;
}

.dark-theme .bta-thumb {
    border-color: #334155 !important;
}

.dark-theme .bta-card-icon-placeholder-admin {
    background: linear-gradient(135deg, #1e293b 0%, #1a0f0f 100%) !important;
}

.dark-theme .card-title {
    color: #f1f5f9 !important;
}

.dark-theme .card-description {
    color: #94a3b8 !important;
}

/* ── Dark Theme – My Submissions ── */
.dark-theme .submission-card {
    background-color: #1e293b !important;
    color: #e2e8f0;
}

.dark-theme .submission-card:hover {
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.12) !important;
}

/* ── Dark Theme – Reviewer Panel (Home) ── */
.dark-theme .reviewer-panel {
    border-color: #4c1d95 !important;
}

.dark-theme .reviewer-panel-body {
    background-color: #1e293b !important;
}

.dark-theme .rp-stat-card {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

.dark-theme .rp-stat-card:hover {
    border-color: #7c3aed !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15) !important;
}

.dark-theme .rp-stat-card-pending {
    background-color: #3a2e10 !important;
    border-color: #7c5f18 !important;
}

.dark-theme .rp-stat-label {
    color: #94a3b8 !important;
}

.dark-theme .rp-pending-alert {
    background: linear-gradient(135deg, #3a2e10 0%, #2d2006 100%) !important;
    border-left-color: #f59e0b !important;
    color: #fcd34d !important;
}

.dark-theme .rp-pending-item {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

.dark-theme .rp-pending-item:hover {
    background-color: #2e1065 !important;
    border-color: #6d28d9 !important;
}

/* ── Dark Theme – Assessment Empty States ── */
.dark-theme .empty-state {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #e2e8f0;
}

/* ── Dark Theme – Settings Page Variables ── */
.dark-theme {
    --stg-card-bg: #1e293b;
    --stg-border: #334155;
    --stg-text: #f1f5f9;
    --stg-muted: #94a3b8;
    --stg-info-bg: #0f172a;
}

.dark-theme .stg-profile {
    background: var(--stg-card-bg);
    border-color: var(--stg-border);
}

.dark-theme .stg-card {
    background: var(--stg-card-bg);
    border-color: var(--stg-border);
}

.dark-theme .stg-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.dark-theme .stg-info-item {
    background: var(--stg-info-bg);
}

.dark-theme .stg-uid {
    background: var(--stg-info-bg);
    color: var(--stg-text);
}

.dark-theme .stg-version {
    background: linear-gradient(135deg, #312e81, #1e1b4b);
    color: #a5b4fc;
}

.dark-theme .stg-skeleton {
    background: linear-gradient(90deg, #334155 25%, #1e293b 50%, #334155 75%);
    background-size: 200% 100%;
}

.dark-theme .stg-toggle {
    background: #475569;
}

.dark-theme .stg-form .form-control {
    background: var(--stg-info-bg);
    border-color: var(--stg-border);
    color: var(--stg-text);
}

.dark-theme .stg-form .form-control:focus {
    border-color: #6366f1;
}

.dark-theme .stg-btn-edit {
    border-color: var(--stg-border);
    color: var(--stg-text);
}

.dark-theme .stg-btn-edit:hover {
    background: var(--stg-info-bg);
    border-color: #6366f1;
    color: #818cf8;
}

.dark-theme .stg-btn-cancel {
    border-color: var(--stg-border);
    color: var(--stg-muted);
}

.dark-theme .stg-btn-cancel:hover {
    background: var(--stg-info-bg);
}

.dark-theme .stg-row:not(:last-child) {
    border-bottom-color: #334155;
}

/* ── Dark Theme – ViewResponse Pages ── */
.dark-theme .answer-value {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

.dark-theme .btn-back {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

.dark-theme .btn-back:hover {
    border-color: #10b981 !important;
    color: #34d399 !important;
}

/* ── Dark Theme – Edit Response ── */
.dark-theme .review-info-banner {
    background-color: #1e293b;
    color: #e2e8f0;
}

/* ── Dark Theme – Status Chips (AssessmentFill) ── */
.dark-theme .status-chip-danger {
    background-color: #2d1b1b !important;
    border-color: #7f1d1d !important;
    color: #fca5a5 !important;
}

.dark-theme .status-chip-warning {
    background-color: #2d2006 !important;
    border-color: #7c5f18 !important;
    color: #fde68a !important;
}

/* ── Dark Theme – Meta Badges ── */
.dark-theme .meta-badge-template {
    background: linear-gradient(135deg, #3a2e10 0%, #2d2006 100%) !important;
    color: #fde68a !important;
}

.dark-theme .meta-badge-questions {
    background-color: #1e1b4b !important;
    color: #a5b4fc !important;
}

.dark-theme .meta-badge-sections {
    background-color: #172554 !important;
    color: #93c5fd !important;
}

/* ── Dark Theme – Dropdown Items ── */
.dark-theme .dropdown-item-custom:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%) !important;
}

/* ── Dark Theme – General Link Color Fix ── */
.dark-theme .text-primary {
    color: #818cf8 !important;
}

/* ── Dark Theme – Badge Colors on Dark BG ── */
.dark-theme .badge.bg-warning.text-dark {
    color: #1e293b !important;
}

/* ── Dark Theme – Search Clear Button ── */
.dark-theme .search-clear {
    background-color: #475569 !important;
    color: #e2e8f0 !important;
}

.dark-theme .search-clear:hover {
    background-color: #64748b !important;
}

/* ── Dark Theme – Loading Spinner ── */
.dark-theme .loading-spinner {
    border-color: #334155;
    border-top-color: #818cf8;
}

/* ── Dark Theme – Assessment Hero (Fill page) ── */
.dark-theme .assessment-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
}

/* ── Dark Theme – BTA / Activity Tracker cards ── */
.dark-theme .bta-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

/* ── Dark Theme – Unsaved / Saved indicators ── */
.dark-theme .unsaved-indicator {
    color: #fbbf24;
}

.dark-theme .saved-indicator {
    color: #34d399;
}

/* ── Dark Theme – Editor Pages (Assessment, BTA, Activity Tracker) ── */
.dark-theme .editor-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .editor-card:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12) !important;
    border-color: #6366f1 !important;
}

.dark-theme .content-block-card {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .content-block-card:hover {
    background-color: #1e293b !important;
}

.dark-theme .followup-card {
    background-color: #1e293b !important;
    border-color: #4338ca !important;
}

.dark-theme .followup-header {
    background: linear-gradient(90deg, #1e1b4b, #0c4a6e) !important;
    border-bottom-color: #4338ca !important;
    color: #e2e8f0;
}

.dark-theme .followup-body {
    background-color: #1e293b !important;
}

.dark-theme .condition-box {
    background-color: #0c4a6e !important;
    border-color: #0369a1 !important;
    color: #e2e8f0;
}

.dark-theme .condition-box .condition-title {
    color: #38bdf8 !important;
}

.dark-theme .form-label-custom {
    color: #e2e8f0 !important;
}

.dark-theme .form-control-custom,
.dark-theme .form-select-custom {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

.dark-theme .form-control-custom:focus,
.dark-theme .form-select-custom:focus {
    background-color: #1e293b !important;
    border-color: #6366f1 !important;
}

.dark-theme .action-buttons-sticky {
    background: rgba(15, 23, 42, 0.95) !important;
    border-top-color: #334155 !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25) !important;
    backdrop-filter: blur(8px);
}

/* ── Dark Theme – Editor Section Headers (BTA / Activity / generic) ── */
.dark-theme .section-header {
    background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%) !important;
    border-bottom-color: #334155 !important;
    border-left-color: #818cf8 !important;
    color: #e2e8f0;
}

.dark-theme .section-divider {
    background: linear-gradient(90deg, transparent, #475569, transparent) !important;
}


.dark-theme .block-type-pill {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #818cf8 !important;
}

.dark-theme .btn-icon {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #94a3b8 !important;
}

.dark-theme .btn-icon:hover {
    background-color: #312e81 !important;
    border-color: #6366f1 !important;
    color: #818cf8 !important;
}

.dark-theme .btn-ghost-brand {
    background-color: #1e1b4b !important;
    border-color: #4338ca !important;
    color: #a5b4fc !important;
}

.dark-theme .btn-ghost-brand:hover {
    background-color: #312e81 !important;
}

.dark-theme .btn-ghost-danger {
    background-color: #2d1b1b !important;
    border-color: #7f1d1d !important;
    color: #fca5a5 !important;
}

.dark-theme .btn-ghost-danger:hover {
    background-color: #450a0a !important;
}

.dark-theme .section-outer-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

.dark-theme .section-outer-card:hover {
    border-color: #6366f1 !important;
}

.dark-theme .section-outer-header {
    background: linear-gradient(90deg, #1e1b4b 0%, #0f172a 100%) !important;
    border-bottom-color: #4338ca !important;
    color: #e2e8f0;
}

.dark-theme .section-outer-body {
    background-color: #1e293b !important;
}

.dark-theme .badge-order {
    background-color: #1e1b4b !important;
    color: #a5b4fc !important;
    border-color: #4338ca !important;
}

.dark-theme .debug-toggle {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

.dark-theme .debug-toggle:hover {
    color: #818cf8 !important;
}

/* ── Dark Theme – Assessment Editor Custom Properties ── */
.dark-theme {
    --surface: #1e293b;
    --surface-2: #0f172a;
    --border: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
}

/* ── Dark Theme – BTA Admin List ── */
.dark-theme .bta-table {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .bta-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(155, 44, 44, 0.1) 0%, transparent 100%) !important;
}

.dark-theme .bta-card-mobile {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .bta-thumb-placeholder {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #64748b !important;
}

.dark-theme .bta-card-icon-placeholder-admin {
    background: linear-gradient(135deg, #1e293b 0%, #2d1b1b 100%) !important;
    color: #f87171 !important;
}

.dark-theme .btn-create-new {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

.dark-theme .btn-create-new:hover {
    color: white !important;
}

/* ── Dark Theme – Activity Tracker Pages ── */
.dark-theme .tracker-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .tracker-card:hover {
    border-color: #16a085 !important;
}

.dark-theme .activity-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .activity-card:hover {
    border-color: #16a085 !important;
}

.dark-theme .stat-badge {
    background-color: #0f2922 !important;
    color: #34d399 !important;
}

.dark-theme .category-tag {
    background-color: #0f2922 !important;
    border-color: #16a085 !important;
    color: #34d399 !important;
}

.dark-theme .category-selector {
    background-color: #1e293b !important;
    border-color: #334155;
    color: #e2e8f0;
}

.dark-theme .category-option {
    border-color: #475569 !important;
    color: #e2e8f0;
}

.dark-theme .category-option:hover {
    border-color: #16a085 !important;
    background-color: #0f2922 !important;
}

.dark-theme .category-option.selected {
    color: white;
}

/* ── Dark Theme – Activity Tracker Sessions ── */
.dark-theme .session-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .session-card:hover {
    box-shadow: 0 8px 20px rgba(128, 90, 213, 0.12) !important;
}

.dark-theme .info-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

/* ── Dark Theme – Review Dashboard (Assessment + BTA) ── */
.dark-theme .review-tab {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #94a3b8;
}

.dark-theme .review-tab:hover {
    color: #a5b4fc !important;
    border-color: #6366f1 !important;
}

.dark-theme .review-tab.active {
    color: white !important;
    border-color: transparent !important;
}

.dark-theme .review-tab:not(.active) .tab-count {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
}

.dark-theme .review-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .review-card:hover {
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.12) !important;
}

.dark-theme .comment-box {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #e2e8f0;
}

.dark-theme .comment-box textarea {
    color: #e2e8f0 !important;
}

.dark-theme .comment-box:focus-within {
    border-color: #6366f1 !important;
}

.dark-theme .comment-bubble {
    color: #e2e8f0;
}

.dark-theme .comment-reviewer {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%) !important;
}

.dark-theme .comment-submitter {
    background-color: #0f172a !important;
}

.dark-theme .stats-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .stats-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.dark-theme .empty-state-review {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #e2e8f0;
}

/* ── Dark Theme – View Response (Assessment + BTA) ── */
.dark-theme .answer-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .answer-card:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1) !important;
}

.dark-theme .answer-label {
    color: #f1f5f9 !important;
}

.dark-theme .view-response-section-header,
.dark-theme .answer-card + .section-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    color: #e2e8f0;
}

/* ── Dark Theme – Edit Response (BTA + Assessment) ── */
.dark-theme .review-banner {
    color: #e2e8f0;
}

.dark-theme .review-banner-rejected {
    background: linear-gradient(135deg, #2d1b1b 0%, #450a0a 100%) !important;
    border-left-color: #ef4444 !important;
}

.dark-theme .review-banner-approved {
    background: linear-gradient(135deg, #052e16 0%, #14532d 100%) !important;
    border-left-color: #10b981 !important;
}

.dark-theme .review-banner-pending {
    background: linear-gradient(135deg, #2d2006 0%, #451a03 100%) !important;
    border-left-color: #f59e0b !important;
}

.dark-theme .review-banner-draft {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-left-color: #64748b !important;
}

.dark-theme .feedback-card {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .feedback-card .reviewer-name {
    color: #f87171 !important;
}

.dark-theme .feedback-card .feedback-time {
    color: #64748b !important;
}

/* ── Dark Theme – Body & Global Text ── */
.dark-theme html,
.dark-theme body {
    background-color: #0f172a;
    color: #e2e8f0;
}

.dark-theme .empty-state {
    color: #e2e8f0 !important;
}

.dark-theme .empty-state-icon {
    color: #818cf8 !important;
}

/* ── Dark Theme – Bootstrap Overrides ── */
.dark-theme .border {
    border-color: #334155 !important;
}

.dark-theme .bg-white {
    background-color: #1e293b !important;
}

.dark-theme .shadow-sm {
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}

.dark-theme .text-dark {
    color: #e2e8f0 !important;
}

.dark-theme .list-group-item {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

.dark-theme .card-body {
    color: #e2e8f0;
    background-color: inherit;
}

.dark-theme .card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}

.dark-theme .form-text,
.dark-theme small.text-muted {
    color: #64748b !important;
}

.dark-theme .form-check-label {
    color: #e2e8f0;
}

.dark-theme input::placeholder,
.dark-theme textarea::placeholder {
    color: #64748b !important;
}

.dark-theme .btn-outline-danger {
    color: #f87171;
    border-color: #7f1d1d;
}

.dark-theme .btn-outline-danger:hover {
    background-color: #450a0a;
    border-color: #ef4444;
    color: #fca5a5;
}

.dark-theme .btn-light {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

.dark-theme .btn-light:hover {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
}

.dark-theme hr {
    border-color: #334155;
}

.dark-theme .section-divider {
    background: linear-gradient(90deg, transparent, #334155, transparent) !important;
}

/* ── Dark Theme – Breadcrumb / Navigation ── */
.dark-theme .breadcrumb-item a {
    color: #818cf8;
}

.dark-theme .breadcrumb-item.active {
    color: #94a3b8;
}

/* ── Dark Theme – Pagination ── */
.dark-theme .page-link {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

.dark-theme .page-link:hover {
    background-color: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

.dark-theme .page-item.active .page-link {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.dark-theme .page-item.disabled .page-link {
    background-color: #0f172a;
    border-color: #334155;
    color: #475569;
}

/* ── Dark Theme – Accordion ── */
.dark-theme .accordion-item {
    background-color: #1e293b;
    border-color: #334155;
}

.dark-theme .accordion-button {
    background-color: #1e293b;
    color: #e2e8f0;
}

.dark-theme .accordion-button:not(.collapsed) {
    background-color: #0f172a;
    color: #f1f5f9;
}

.dark-theme .accordion-body {
    background-color: #1e293b;
    color: #e2e8f0;
}

/* ── Dark Theme – Tooltips & Popovers ── */
.dark-theme .tooltip-inner {
    background-color: #334155;
    color: #f1f5f9;
}

.dark-theme .popover {
    background-color: #1e293b;
    border-color: #334155;
}

.dark-theme .popover-body {
    color: #e2e8f0;
}

/* -- Compliance (Yes / No / N-A) question cards --
   Rendered by QuestionRenderer.RenderYesNoNaCards / RenderBoolean via manual
   RenderTreeBuilder calls, so these must live here rather than in the component's
   scoped .razor.css — Blazor never attaches the CSS-isolation scope attribute to
   elements built imperatively in C#, so scoped rules for them silently never match. */
.bool-choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.25rem;
}

.bool-choice-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.1rem;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
    text-align: left;
    font-family: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

    .bool-choice-btn:hover {
        border-color: #adb5bd;
        background: #f8f9fa;
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    }

    .bool-choice-btn:focus-visible {
        outline: 3px solid #16a085;
        outline-offset: 2px;
    }

/* Selected state per choice type */
.bool-choice-btn.bool-choice-yes.selected {
    border-color: #198754;
    background: #d1e7dd;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, .2);
}

.bool-choice-btn.bool-choice-no.selected {
    border-color: #dc3545;
    background: #f8d7da;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, .2);
}

.bool-choice-btn.bool-choice-na.selected {
    border-color: #6c757d;
    background: #e9ecef;
    box-shadow: 0 0 0 3px rgba(108, 117, 125, .2);
}

.bool-choice-btn.bool-choice-other.selected {
    border-color: #6f42c1;
    background: #ece4fb;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, .2);
}

/* Icon circle */
.bool-choice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    background: #e9ecef;
    color: #495057;
    transition: background 0.15s, color 0.15s;
}

.bool-choice-yes.selected .bool-choice-icon {
    background: #198754;
    color: #fff;
}

.bool-choice-no.selected .bool-choice-icon {
    background: #dc3545;
    color: #fff;
}

.bool-choice-na.selected .bool-choice-icon {
    background: #6c757d;
    color: #fff;
}

.bool-choice-other.selected .bool-choice-icon {
    background: #6f42c1;
    color: #fff;
}

/* Label stack */
.bool-choice-labels {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.bool-choice-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212529;
}

.bool-choice-sublabel {
    font-size: 0.73rem;
    color: #6c757d;
}

.bool-choice-yes.selected .bool-choice-label,
.bool-choice-yes.selected .bool-choice-sublabel {
    color: #0a3622;
}

.bool-choice-no.selected .bool-choice-label,
.bool-choice-no.selected .bool-choice-sublabel {
    color: #58151c;
}

.bool-choice-other.selected .bool-choice-label,
.bool-choice-other.selected .bool-choice-sublabel {
    color: #3d2569;
}

/* -- Blazor Error UI -- */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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;
}

/* =========================================================================
   Question Recommendations — inline editor (QuestionRecommendationsEditor)

   Lives here rather than in a page <style> block: the editor is embedded from
   AssessmentFill, EditResponse and QuestionRenderer, and page-scoped styles
   would leave it unstyled on all but the first.
   ========================================================================= */
/* ── Question Recommendations ────────────── */
.question-recs-panel details summary {
    list-style: none;
}

.question-recs-panel details summary::-webkit-details-marker {
    display: none;
}

.question-recs-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #b35309;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s;
    user-select: none;
}

.question-recs-toggle:hover {
    background: #fff4e5;
}

.rec-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    margin-left: 0.3rem;
    padding: 0 0.32rem;
    border-radius: 999px;
    background: #e8640c;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
}

.question-recs-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.rec-card {
    border: 1px solid #e6e9f2;
    border-left: 3px solid #1a3a6b;
    border-radius: 10px;
    background: #fcfdff;
    padding: 0.7rem 0.75rem;
}

.rec-card--critical { border-left-color: #c0392b; }
.rec-card--high     { border-left-color: #e8640c; }
.rec-card--medium   { border-left-color: #1a3a6b; }
.rec-card--low      { border-left-color: #0d7c4d; }

/* Excluded entries stay visible but visibly out of the deliverable, so an inspector can
   park a draft without wondering later why it never printed. */
.rec-card--excluded {
    opacity: 0.62;
    background: #f6f7f9;
}

.rec-card-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.rec-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 6px;
    background: #112549;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
}

.rec-priority  { width: auto; min-width: 6.2rem; font-size: 0.78rem; }
.rec-category  { flex: 1 1 9rem; min-width: 8rem; font-size: 0.78rem; }
.rec-target    { width: auto; max-width: 9.5rem; font-size: 0.78rem; }
.rec-remove    { margin-left: auto; padding: 0.15rem 0.45rem; }

.rec-text {
    font-size: 0.85rem;
    border-radius: 8px;
    border-color: #fed7aa;
    resize: vertical;
}

.rec-text:focus {
    border-color: #e8640c;
    box-shadow: 0 0 0 3px rgba(232, 100, 12, 0.1);
}

.rec-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.rec-photo {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.rec-photo img {
    display: block;
    width: 84px;
    height: 84px;
    object-fit: cover;
}

.rec-photo-file {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 11rem;
    padding: 0.5rem 1.6rem 0.5rem 0.55rem;
    font-size: 0.75rem;
    color: #475569;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rec-photo-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 1.15rem;
    height: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 5px;
    background: rgba(17, 37, 73, 0.72);
    color: #fff;
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
}

.rec-photo-remove:hover { background: #c0392b; }

.rec-card-foot {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.rec-photo-btn {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: #475569;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 7px;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.rec-photo-btn:hover {
    border-color: #e8640c;
    color: #b35309;
    background: #fff7ed;
}

.rec-include {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: #64748b;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
}

.rec-chars {
    margin-left: auto;
    font-size: 0.7rem;
    color: #94a3b8;
}

.rec-add-btn {
    align-self: flex-start;
    font-size: 0.78rem;
    font-weight: 600;
    color: #b35309;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 0.32rem 0.8rem;
}

.rec-add-btn:hover {
    background: #ffedd5;
    border-color: #e8640c;
    color: #9a4508;
}

/* =========================================================================
   Site Information - saved-site picker and client logo
   ========================================================================= */
.site-group-picker .form-select {
    border-color: #c7d2fe;
}

.site-logo-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.site-logo-preview {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 72px;
    padding: 0.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

/* Client logos arrive at wildly different aspect ratios; contain rather than cover so the
   whole mark stays visible, matching how it is drawn on the report cover. */
.site-logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.site-logo-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #112549;
    color: #fff;
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.site-logo-remove:hover { background: #c0392b; }

/* Confirmation strip for removing a recommendation. Destructive because it also deletes the
   uploaded photos from storage, so it is deliberately not a one-click action. */
.rec-confirm {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.5rem 0.7rem;
    border: 1px solid #f5c2c7;
    border-radius: 8px;
    background: #fdf2f2;
    font-size: 0.82rem;
    color: #8c2f26;
}

.rec-confirm-actions { display: flex; gap: 0.4rem; }

/* Keyboard focus must stay visible on the compact controls, where the default outline is
   easily lost against the card border. */
.question-recs-body :is(button, select, input, textarea, label.rec-photo-btn):focus-visible {
    outline: 2px solid #e8640c;
    outline-offset: 2px;
}

.question-recs-toggle:focus-visible {
    outline: 2px solid #e8640c;
    outline-offset: 2px;
    border-radius: 6px;
}


/* =========================================================================
   OVERWATCH DESIGN SYSTEM
   -------------------------------------------------------------------------
   Shared primitives every page builds from, so the product reads as one
   application rather than fifty separately-styled screens.

   The --ow-* brand tokens already existed at the top of this file and were
   simply not being used: pages each declared their own header gradient and
   their own button colours, which is why the same action looked different on
   every screen. What follows extends those tokens into surfaces, spacing and
   state, then builds the handful of primitives the pages actually need.

   Rules of the road:
     - Structure is navy. The single accent is orange. Use it once per view.
     - Colour that is not navy or orange must MEAN something: amber = waiting,
       green = good, red = problem. Decoration does not get a hue.
     - Everything interactive gets a hover state, a visible focus ring, and a
       pressed state. If it does not, it should not look clickable.
   ========================================================================= */

:root {
    /* Surfaces */
    --ow-surface:        #ffffff;
    --ow-surface-sunken: #f4f6fa;
    --ow-surface-raised: #ffffff;
    --ow-border:         #e3e8f0;
    --ow-border-strong:  #cbd5e5;

    /* Ink */
    --ow-ink:        #16233a;
    --ow-ink-muted:  #5a6a85;
    --ow-ink-faint:  #93a1b8;

    /* Semantic — these carry meaning and are not interchangeable with the accent */
    --ow-good:        #0d7c4d;
    --ow-good-bg:     #e6f7ef;
    --ow-warn:        #a86a08;
    --ow-warn-bg:     #fdf3e0;
    --ow-bad:         #c0392b;
    --ow-bad-bg:      #fdecea;
    --ow-info:        #1a3a6b;
    --ow-info-bg:     #eef3fb;

    /* Form */
    --ow-radius:    10px;
    --ow-radius-sm: 7px;
    --ow-radius-lg: 14px;

    --ow-shadow-sm: 0 1px 2px rgba(17, 37, 73, .06);
    --ow-shadow:    0 1px 2px rgba(17, 37, 73, .06), 0 6px 18px -10px rgba(17, 37, 73, .25);
    --ow-shadow-lg: 0 2px 4px rgba(17, 37, 73, .07), 0 18px 40px -20px rgba(17, 37, 73, .38);

    --ow-focus: 0 0 0 3px rgba(232, 100, 12, .35);
}

.dark-theme {
    --ow-surface:        #131c2b;
    --ow-surface-sunken: #0c1421;
    --ow-surface-raised: #1a2537;
    --ow-border:         #26334a;
    --ow-border-strong:  #37475f;

    --ow-ink:        #e7ecf4;
    --ow-ink-muted:  #a3b0c4;
    --ow-ink-faint:  #75849c;

    --ow-good:    #4cbb8c;
    --ow-good-bg: #102b22;
    --ow-warn:    #d9a441;
    --ow-warn-bg: #2e2513;
    --ow-bad:     #ef8272;
    --ow-bad-bg:  #341d1a;
    --ow-info:    #7fabe0;
    --ow-info-bg: #16233a;

    --ow-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --ow-shadow:    0 1px 2px rgba(0, 0, 0, .4), 0 8px 22px -12px rgba(0, 0, 0, .8);
    --ow-shadow-lg: 0 2px 6px rgba(0, 0, 0, .5), 0 20px 44px -22px rgba(0, 0, 0, .9);
}

/* ── Page header ───────────────────────────────────────────────────────────
   One header treatment for every screen. Previously each page invented its
   own gradient — cyan on Groups, slate on Submissions, blue on Available —
   so moving between them felt like moving between different products.       */

.ow-page-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ow-navy-dark) 0%, var(--ow-navy) 58%, var(--ow-navy-dark) 100%);
    color: #fff;
    border-radius: var(--ow-radius-lg);
    padding: clamp(1.4rem, 3vw, 2.1rem) clamp(1.25rem, 3vw, 2.1rem);
    margin-bottom: 1.75rem;
    box-shadow: var(--ow-shadow);
}

/* The one decorative flourish, kept faint so it never competes with content. */
.ow-page-header::after {
    content: "";
    position: absolute;
    top: -45%;
    right: -8%;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 100, 12, .16) 0%, transparent 68%);
    pointer-events: none;
}

.ow-page-header-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.ow-page-eyebrow {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ow-orange-light);
    margin-bottom: .35rem;
}

.ow-page-title {
    font-size: clamp(1.35rem, 3.2vw, 1.85rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
    color: #fff;
}

.ow-page-subtitle {
    margin: .4rem 0 0;
    font-size: .92rem;
    color: #9fb4d4;
    max-width: 62ch;
}

.ow-page-header-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* ── Buttons ───────────────────────────────────────────────────────────────
   Actions read as actions: solid fill for the primary path, outline for the
   alternatives, ghost for tertiary. Size is a modifier, never a new class.   */

.ow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.2;
    padding: .58rem 1.1rem;
    border-radius: var(--ow-radius-sm);
    border: 1px solid transparent;
    background: none;
    color: var(--ow-ink);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease,
                box-shadow .15s ease, transform .12s ease;
}

.ow-btn:hover { text-decoration: none; }
.ow-btn:focus-visible { outline: none; box-shadow: var(--ow-focus); }
.ow-btn:active { transform: translateY(1px); }

.ow-btn:disabled,
.ow-btn[disabled],
.ow-btn.disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

.ow-btn i { font-size: 1em; line-height: 1; }

/* Primary — the one action the screen wants you to take. At most one per view. */
.ow-btn--primary {
    background: var(--ow-orange);
    border-color: var(--ow-orange);
    color: #fff;
    box-shadow: var(--ow-shadow-sm);
}
.ow-btn--primary:hover { background: var(--ow-orange-dark); border-color: var(--ow-orange-dark); color: #fff; }

/* Secondary — the structural action: navigate, open, view. */
.ow-btn--secondary {
    background: var(--ow-navy);
    border-color: var(--ow-navy);
    color: #fff;
}
.ow-btn--secondary:hover { background: var(--ow-navy-dark); border-color: var(--ow-navy-dark); color: #fff; }

/* Outline — alternatives sitting beside a primary. */
.ow-btn--outline {
    background: var(--ow-surface);
    border-color: var(--ow-border-strong);
    color: var(--ow-ink);
}
.ow-btn--outline:hover { border-color: var(--ow-navy); color: var(--ow-navy); background: var(--ow-info-bg); }

/* Ghost — tertiary, for dense toolbars where a border would be noise. */
.ow-btn--ghost { color: var(--ow-ink-muted); }
.ow-btn--ghost:hover { background: var(--ow-surface-sunken); color: var(--ow-ink); }

/* Danger — destructive only. Never used for emphasis. */
.ow-btn--danger {
    background: var(--ow-surface);
    border-color: var(--ow-bad);
    color: var(--ow-bad);
}
.ow-btn--danger:hover { background: var(--ow-bad); color: #fff; }

/* On the navy page header, outline and ghost need light treatment to stay legible. */
.ow-page-header .ow-btn--outline {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .28);
    color: #fff;
}
.ow-page-header .ow-btn--outline:hover { background: rgba(255, 255, 255, .16); border-color: #fff; color: #fff; }
.ow-page-header .ow-btn--ghost { color: #c5d5ec; }
.ow-page-header .ow-btn--ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.ow-btn--sm { font-size: .8rem; padding: .4rem .75rem; }
.ow-btn--lg { font-size: .95rem; padding: .75rem 1.4rem; }
.ow-btn--block { width: 100%; }

/* ── Stat tile ─────────────────────────────────────────────────────────────
   A number on its own tells you nothing. Every tile carries a value, what it
   counts, and a line of context that says whether it needs attention — and
   links to the screen where you would act on it.                            */

.ow-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.ow-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1.15rem 1.25rem 1.05rem;
    background: var(--ow-surface-raised);
    border: 1px solid var(--ow-border);
    border-radius: var(--ow-radius);
    box-shadow: var(--ow-shadow-sm);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}

/* The state stripe. Colour here is information, so it is driven by the
   --ow-stat-accent a modifier sets rather than by which tile it happens to be. */
.ow-stat::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--ow-stat-accent, var(--ow-navy));
}

a.ow-stat:hover {
    border-color: var(--ow-border-strong);
    box-shadow: var(--ow-shadow);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}
a.ow-stat:focus-visible { outline: none; box-shadow: var(--ow-focus); }

.ow-stat-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }

.ow-stat-label {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--ow-ink-muted);
}

.ow-stat-icon {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ow-radius-sm);
    background: var(--ow-stat-accent-bg, var(--ow-info-bg));
    color: var(--ow-stat-accent, var(--ow-navy));
    font-size: .95rem;
}

.ow-stat-value {
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1;
    color: var(--ow-ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

.ow-stat-context {
    font-size: .8rem;
    line-height: 1.4;
    color: var(--ow-ink-muted);
    display: flex;
    align-items: center;
    gap: .3rem;
}

.ow-stat-context--attention { color: var(--ow-warn); font-weight: 600; }
.ow-stat-context--good { color: var(--ow-good); font-weight: 600; }

/* Modifiers set the accent. They describe STATE, not which metric it is. */
.ow-stat--neutral   { --ow-stat-accent: var(--ow-navy);   --ow-stat-accent-bg: var(--ow-info-bg); }
.ow-stat--attention { --ow-stat-accent: var(--ow-warn);   --ow-stat-accent-bg: var(--ow-warn-bg); }
.ow-stat--good      { --ow-stat-accent: var(--ow-good);   --ow-stat-accent-bg: var(--ow-good-bg); }
.ow-stat--critical  { --ow-stat-accent: var(--ow-bad);    --ow-stat-accent-bg: var(--ow-bad-bg); }
.ow-stat--accent    { --ow-stat-accent: var(--ow-orange); --ow-stat-accent-bg: rgba(232,100,12,.12); }

/* ── Action button (the old "quick action card") ───────────────────────────
   These are buttons, so they look like buttons: a solid affordance, a chevron
   that moves on hover, and a pressed state. Previously they were flat cards
   indistinguishable from the read-only panels beside them.                   */

.ow-action-grid {
    display: grid;
    /* 300px, not 260: below that the description truncates to the point of uselessness
       ("Bring in assessments fro..."), which is worse than showing no description at all. */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: .85rem;
}

.ow-action {
    display: flex;
    align-items: center;
    gap: .9rem;
    height: 100%;
    padding: .95rem 1.05rem;
    background: var(--ow-surface-raised);
    border: 1px solid var(--ow-border);
    border-radius: var(--ow-radius);
    box-shadow: var(--ow-shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease, background-color .15s ease;
}

.ow-action:hover {
    border-color: var(--ow-navy);
    box-shadow: var(--ow-shadow);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.ow-action:active { transform: translateY(0); }
.ow-action:focus-visible { outline: none; box-shadow: var(--ow-focus); }

.ow-action-icon {
    width: 2.4rem;
    height: 2.4rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ow-radius-sm);
    background: var(--ow-info-bg);
    color: var(--ow-navy);
    font-size: 1.05rem;
    transition: background-color .15s ease, color .15s ease;
}

.ow-action:hover .ow-action-icon { background: var(--ow-navy); color: #fff; }

.ow-action-text { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }

.ow-action-title {
    font-size: .92rem;
    font-weight: 600;
    color: var(--ow-ink);
    line-height: 1.25;
    text-wrap: balance;
}

/* Two lines, clamped. A single line with an ellipsis cut almost every description mid-word;
   two lines fit the copy this app actually uses while still keeping cards a predictable size. */
.ow-action-desc {
    font-size: .78rem;
    line-height: 1.35;
    color: var(--ow-ink-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ow-action-chevron {
    margin-left: auto;
    color: var(--ow-ink-faint);
    font-size: .95rem;
    transition: transform .15s ease, color .15s ease;
}
.ow-action:hover .ow-action-chevron { transform: translateX(3px); color: var(--ow-orange); }

/* Promoted — the two or three actions this role does most. Everything else
   stays quiet so these read first. */
.ow-action--primary {
    background: linear-gradient(135deg, var(--ow-navy) 0%, var(--ow-navy-dark) 100%);
    border-color: var(--ow-navy-dark);
    color: #fff;
}
.ow-action--primary .ow-action-title { color: #fff; }
.ow-action--primary .ow-action-desc { color: #a9c0e0; }
.ow-action--primary .ow-action-chevron { color: var(--ow-orange-light); }
.ow-action--primary .ow-action-icon { background: rgba(255, 255, 255, .14); color: var(--ow-orange-light); }
.ow-action--primary:hover { color: #fff; border-color: var(--ow-orange); }
.ow-action--primary:hover .ow-action-icon { background: var(--ow-orange); color: #fff; }

/* ── Panel ─────────────────────────────────────────────────────────────────
   The read-only container. Visually quieter than .ow-action on purpose: a
   panel holds information, an action does something.                        */

.ow-panel {
    background: var(--ow-surface-raised);
    border: 1px solid var(--ow-border);
    border-radius: var(--ow-radius);
    box-shadow: var(--ow-shadow-sm);
    overflow: hidden;
}

.ow-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1.1rem;
    background: var(--ow-surface-sunken);
    border-bottom: 1px solid var(--ow-border);
}

.ow-panel-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .92rem;
    font-weight: 700;
    color: var(--ow-ink);
    margin: 0;
}

.ow-panel-title i { color: var(--ow-orange); }
.ow-panel-body { padding: 1.1rem; }

.ow-panel-empty {
    padding: 2rem 1.1rem;
    text-align: center;
    color: var(--ow-ink-faint);
    font-size: .87rem;
}

/* ── Section heading ───────────────────────────────────────────────────── */

.ow-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0 0 .85rem;
}

.ow-section-heading h2 {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--ow-ink);
    margin: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.ow-section-heading h2 i { color: var(--ow-orange); }
.ow-section-hint { font-size: .8rem; color: var(--ow-ink-muted); }

/* ── Status pill ───────────────────────────────────────────────────────── */

.ow-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    white-space: nowrap;
}

.ow-pill--good      { background: var(--ow-good-bg); color: var(--ow-good); }
.ow-pill--attention { background: var(--ow-warn-bg); color: var(--ow-warn); }
.ow-pill--bad       { background: var(--ow-bad-bg);  color: var(--ow-bad); }
.ow-pill--neutral   { background: var(--ow-info-bg); color: var(--ow-info); }

@media (prefers-reduced-motion: reduce) {
    .ow-btn, .ow-action, .ow-stat, .ow-action-chevron { transition: none; }
    .ow-action:hover, a.ow-stat:hover { transform: none; }
}
