/* Additional styles for the admin app */
/* This file can be used to extend or override the styles in index.html */

/* Local Fallback Fonts */
@font-face {
    font-family: 'Sora';
    src: url('/fonts/Sora-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('/fonts/Manrope-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6,
.btn, .nav-item, .modal-title, .content-title,
.logo-text {
    font-family: 'Sora', sans-serif !important;
}

blockquote {
    font-family: 'Manrope', sans-serif !important;
    font-style: italic !important;
}

:root {
    /* Border Radius - Reduced */
    --br-xl: 12px;
    --br-lg: 8px;
    --br-md: 6px;
    --br-sm: 4px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(71,16,235,0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(71,16,235,0.5);
}

/* Animation for content transitions */
.content-area>div {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .table {
        font-size: 9px;
    }

    .table th,
    .table td {
        padding: 6px 4px;
    }

    .status-badge {
        padding: 2px 6px;
        font-size: 8px;
    }
}

/* Chart container enhancements */
.chart-container {
    position: relative;
    overflow: hidden;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-wrapper {
    position: relative;
    height: 91%;
    min-height: 300px;
    width: 100%;
}

/* Form enhancements */
.form-control:focus {
    outline: none;
    border-color: #4710EB;
    box-shadow: 0 0 0 3px rgba(71,16,235,0.2);
}

/* Button hover effects */
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.reconcile-btn {
    min-width: 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 10px;
}

/* Card hover effects */

/* Side Pane Styles */
.side-pane-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.side-pane-overlay.active {
    opacity: 1;
}

.side-pane {
    position: fixed;
    top: 0;
    right: -750px;
    width: 750px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.side-pane.active {
    right: 0;
}

.side-pane-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.side-pane-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.side-pane-header p {
    margin: 5px 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.side-pane-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 18px;
}

.side-pane-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.side-pane-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.side-pane-footer {
    padding: 15px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-shrink: 0;
    background: #f8fafc;
}

@media (max-width: 768px) {
    .side-pane {
        width: 100vw;
        max-width: 100vw;
    }
}

/* Photo Upload Styles for Side Pane */
.photo-upload-section {
    margin-bottom: 24px;
}

.photo-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.photo-preview-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px dashed #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8fafc;
    position: relative;
    transition: all 0.3s ease;
}

.photo-preview-circle.has-photo {
    border-style: solid;
    border-color: var(--primary-green);
}

.photo-preview-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.photo-preview-circle.has-photo img {
    display: block;
}

.photo-placeholder-icon {
    text-align: center;
    color: #94a3b8;
}

.photo-placeholder-icon i {
    font-size: 48px;
    margin-bottom: 8px;
}

.photo-placeholder-icon p {
    font-size: 12px;
    margin: 0;
}

.photo-preview-circle.has-photo .photo-placeholder-icon {
    display: none;
}

/* ── Cancel control for an in-flight document upload ──
   Sits in the progress bar header; disabled once the bytes are away and the
   server has taken over the transfer. */
.upload-progress-cancel {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border: 1px solid #fecaca;
    border-radius: 999px;
    background: #fef2f2;
    color: #dc2626;
    font-family: inherit;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.upload-progress-cancel:hover:not(:disabled) {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

.upload-progress-cancel:focus-visible {
    outline: 3px solid rgba(220, 38, 38, 0.35);
    outline-offset: 2px;
}

.upload-progress-cancel:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── Premium photo upload actions ── */
.photo-upload-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
}

.photo-upload-btn {
    position: relative;
    flex: 1;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 18px;
    border: 1.5px solid transparent;
    border-radius: 14px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease,
        background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.photo-upload-btn i {
    font-size: 15px;
    line-height: 1;
}

/* Sheen that sweeps across on hover; sits above the fill, below the label. */
.photo-upload-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: translateX(-120%);
    transition: transform 0.6s ease;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.3) 50%, transparent 80%);
}

.photo-upload-btn:hover::after {
    transform: translateX(120%);
}

/* Primary — the upload action, matching the pane's gradient CTA. */
.photo-upload-btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #4710EB 0%, #312e81 100%);
    box-shadow: 0 10px 22px -10px rgba(71, 16, 235, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.photo-upload-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px -12px rgba(71, 16, 235, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Secondary — the camera action, on a glassy lilac surface. */
.photo-upload-btn-secondary {
    color: #4710EB;
    background: #ffffff;
    border-color: #dcd6fb;
    box-shadow: 0 6px 16px -12px rgba(15, 23, 42, 0.45);
}

.photo-upload-btn-secondary::after {
    background: linear-gradient(120deg, transparent 20%, rgba(71, 16, 235, 0.14) 50%, transparent 80%);
}

.photo-upload-btn-secondary:hover {
    transform: translateY(-2px);
    color: #4710EB;
    background: #f5f3ff;
    border-color: #4710EB;
    box-shadow: 0 12px 22px -14px rgba(71, 16, 235, 0.6);
}

.photo-upload-btn:active {
    transform: translateY(0) scale(0.985);
}

.photo-upload-btn:focus-visible {
    outline: 3px solid rgba(71, 16, 235, 0.35);
    outline-offset: 2px;
}

.photo-upload-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.photo-upload-btn input[type="file"] {
    display: none;
}

/* Button Warning Style */
.btn-warning {
    background: #f59e0b;
    color: white;
    border: none;
}

.btn-warning:hover {
    background: #d97706;
}

/* Dropdown Menu Styles */
.dropdown-item:hover {
    background: #f3f4f6;
}

.action-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Status Badge Styles */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-badge i {
    font-size: 10px;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-inactive {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.stat-card,
.table-container,
.chart-container {
    transition: all 0.3s ease;
}

.stat-card:hover,
.table-container:hover,
.chart-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Chart legend adjustments */
.chart-container .chartjs-legend {
    margin-top: 20px;
}

.chart-container .chartjs-legend ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.chart-container .chartjs-legend li {
    display: flex;
    align-items: center;
    margin: 0 10px 5px 0;
    font-size: 10px;
}

.chart-container .chartjs-legend li span {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
    border-radius: 2px;
}

/* Compact layout adjustments */
.stats-container {
    gap: 15px;
}

.stat-card {
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 12px;
    padding-bottom: 10px;
}

.chart-header {
    margin-bottom: 10px;
}

.table th,
.table td {
    padding: 10px;
}

.content-header {
    margin-bottom: 10px;
}

/* Fix for chart container overflow */
/* The app shell sets the height and the content area flexes into it, so it
   fills the window instead of being capped at an arbitrary viewport slice. */
.content-area {
    overflow-y: auto;
    max-height: none;
    min-height: 0;
}

/* Additional styles for editable table cells */
.form-control-sm {
    padding: 4px 6px;
    font-size: 9px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-dark);
    width: 100%;
    box-sizing: border-box;
}

.form-control-sm:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(71,16,235,0.2);
}

select.form-control-sm {
    height: 24px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 16px;
    padding-right: 24px;
    appearance: none;
}

/* Inline score editing (Result Management tab) */
td.score-edit-cell {
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s ease;
    white-space: nowrap;
}

td.score-edit-cell:hover {
    background: rgba(71, 16, 235, 0.06);
}

td.score-edit-cell .score-inline-input {
    width: 64px;
    padding: 4px 6px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--primary-green);
    border-radius: 4px;
    outline: none;
    box-shadow: 0 0 0 2px rgba(71, 16, 235, 0.15);
    color: var(--text-dark);
    background: #fff;
    box-sizing: border-box;
}

/* Score flag icons (Super Admin flags each exam component) */
td.score-edit-cell .score-value {
    vertical-align: middle;
}

td.score-edit-cell .score-flag-btn {
    vertical-align: middle;
    margin-left: 5px;
    background: none;
    border: none;
    padding: 2px 3px;
    font-size: 9px;
    line-height: 1;
    color: #cbd5e1;
    cursor: pointer;
    border-radius: 3px;
    transition: color 0.15s ease, background 0.15s ease;
}

td.score-edit-cell .score-flag-btn:hover {
    color: #f57c00;
    background: rgba(245, 124, 0, 0.1);
}

td.score-edit-cell .score-flag-btn.is-flagged {
    color: #f57c00;
}

/* Graduated students grouped by session (collapsible group rows) */
tr.graduate-group-row td {
    background: #f1f5f9;
    padding: 10px 14px;
    font-size: 11px;
    color: #334155;
    cursor: pointer;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    user-select: none;
}

tr.graduate-group-row:hover td {
    background: #e2e8f0;
}

tr.graduate-group-row .graduate-group-chevron {
    display: inline-block;
    margin-right: 8px;
    color: #64748b;
    font-size: 10px;
    transition: transform 0.15s ease;
}

tr.graduate-group-row.expanded .graduate-group-chevron {
    transform: rotate(90deg);
}

tr.graduate-group-row .graduate-group-label {
    font-weight: 700;
    color: #1e293b;
}

tr.graduate-group-row .graduate-group-count {
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 20px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 10px;
}

/* Nested class-level group rows inside an expanded session group */
tr.graduate-class-row td {
    background: #f8fafc;
    border-left: none;
}
tr.graduate-class-row:hover td {
    background: #f1f5f9;
}
tr.graduate-class-row .graduate-group-label {
    font-weight: 600;
    color: #475569;
}

/* Spinner styles */
.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* Sub-tab Navigation */
.sub-tab-nav {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0;
}

.sub-tab-btn {
    background: none;
    border: none;
    padding: 12px 10px;
    font-size: 11px;
    font-weight: 500;
    color: var(--dark-gray);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.sub-tab-btn:hover {
    color: var(--primary-green);
    background: rgba(71,16,235,0.05);
}

.sub-tab-btn.active {
    color: var(--primary-green);
    font-weight: 600;
    border-bottom-color: var(--primary-green);
}

/* Academic Performance Specific Styles */
.stat-card .stat-value {
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--dark-gray) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-text {
    display: inline;
}

.btn-loading .btn-text {
    display: none;
}

.btn-loading .spinner {
    display: inline-block;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    background: white;
    border-radius: var(--br-lg);
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
}

/* Specific override for Promotion Modal to be EXTRA wide */
#promotionModal .modal-dialog {
    max-width: 1100px !important;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.modal-content {
    border-radius: var(--br-lg);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
}

.modal-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.btn-close {
    background: none;
    border: none;
    font-size: 19px;
    cursor: pointer;
    color: var(--dark-gray);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-close:hover {
    color: var(--darker-gray);
    background: rgba(0, 0, 0, 0.05);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* New Task modal - taller on desktop, body scrolls when content overflows */
#newTaskModal .modal-dialog {
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

#newTaskModal .modal-content {
    min-height: 0;
}

#newTaskModal .modal-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(255, 255, 255, 0.8);
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-size: 10px;
    font-weight: 500;
    color: var(--darker-gray);
}

.form-control {
    width: 100%;
    padding: 10px;
    border-radius: var(--br-sm);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(71,16,235,0.2);
}

select.form-control {
    height: 38px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 36px;
    appearance: none;
}

/* Form grid for horizontal layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Ensure form-grid stays 2-column on desktop */
@media (min-width: 769px) {
    .form-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Pagination styles */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    gap: 10px;
}

.pagination-info {
    font-size: 10px;
    color: var(--darker-gray);
}

.btn-sm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-sm:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-dialog {
        width: 95%;
        max-width: 95%;
        max-height: 95vh;
    }

    .modal-body {
        padding: 15px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Sub-tab navigation styles */
.sub-tab-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 5px;
}

.sub-tab-btn {
    background: none;
    border: none;
    font-size: 11px;
    font-weight: 500;
    color: var(--dark-gray);
    cursor: pointer;
    padding: 8px 12px;
    position: relative;
    transition: all 0.3s ease;
}

.sub-tab-btn:hover {
    color: var(--primary-green);
}

.sub-tab-btn.active {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

/* Wizard Steps */
.wizard-step {
    padding: 10px 10px;
}

/* Hero Section (Step 1) */
.promo-hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(71,16,235,0.03) 100%);
    border-radius: var(--br-lg);
}

.promo-hero-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(71,16,235,0.05) 0%, rgba(71,16,235,0.15) 100%);
    color: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 26px;
    box-shadow: 0 10px 20px rgba(71,16,235,0.15);
}

.promo-hero h4 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.promo-req-list {
    background: white;
    padding: 20px;
    border-radius: var(--br-md);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.03);
    text-align: left;
    max-width: 400px;
    margin: 30px auto;
}

/* Summary Cards (Dashboard Style) */
.promotion-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: var(--br-lg);
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.summary-card.promoted::before {
    background: linear-gradient(90deg, #0055EF, #81c784);
}

.summary-card.repeating::before {
    background: linear-gradient(90deg, #f44336, #e57373);
}

.summary-card.graduated::before {
    background: linear-gradient(90deg, #2196f3, #64b5f6);
}

.summary-card h3 {
    font-size: 19px;
    font-weight: 800;
    margin: 10px 0 5px;
    color: var(--text-dark);
}

.summary-card p {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #90a4ae;
}

.card-icon-bg {
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 48px;
    opacity: 0.05;
    transform: rotate(-15deg);
}

/* Modern Tabs */
.promotion-tabs {
    background: #f8f9fa;
    padding: 5px;
    border-radius: var(--br-md);
    display: inline-flex;
    gap: 5px;
    margin-bottom: 20px;
    border: none;
}

.promotion-tab {
    padding: 8px 20px;
    border-radius: var(--br-sm);
    font-size: 10px;
    font-weight: 600;
    color: var(--dark-gray);
    background: transparent;
    transition: all 0.2s ease;
}

.promotion-tab:hover {
    color: var(--text-dark);
    background: rgba(0, 0, 0, 0.02);
}

.promotion-tab.active {
    background: white;
    color: var(--primary-green);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Premium Table */
.promo-table-container {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--br-md);
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
}

.table.premium-table thead {
    background: #fcfcfc;
}

.table.premium-table th {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #90a4ae;
    font-weight: 700;
    padding: 15px 20px;
    border: none;
}

.table.premium-table td {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    font-size: 10px;
    vertical-align: middle;
}

.table.premium-table tr:hover td {
    background: #fafafa;
}

/* Status Badges */
.status-badge {
    padding: 5px 12px;
    border-radius: var(--br-xl);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.status-active,
.status-approved {
    background: rgba(71,16,235,0.1);
    color: #4710EB;
    border: 1px solid rgba(71,16,235,0.2);
}

.status-inactive,
.status-rejected,
.status-disapproved {
    background: rgba(211, 47, 47, 0.1);
    color: #d32f2f;
    border: 1px solid rgba(211, 47, 47, 0.2);
}

.status-pending {
    background: rgba(245, 124, 0, 0.1);
    color: #f57c00;
    border: 1px solid rgba(245, 124, 0, 0.2);
}

/* Premium Tooltip for Children Names */
.children-count-container {
    position: relative;
    display: inline-block;
}

.children-tooltip {
    visibility: hidden;
    width: max-content;
    max-width: 250px;
    background-color: var(--text-dark);
    color: #fff;
    text-align: left;
    border-radius: var(--br-sm);
    padding: 10px 14px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 9px;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    line-height: 1.5;
    white-space: normal;
    word-wrap: break-word;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.children-tooltip b {
    display: block;
    color: var(--primary-green-light);
    margin-bottom: 4px;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.children-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: var(--text-dark) transparent transparent transparent;
}

.children-count-container:hover .children-tooltip {
    visibility: visible;
    opacity: 1;
    bottom: 140%;
}

/* Bulk Actions Toolbar */
.bulk-actions-toolbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--br-md);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.bulk-actions-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-dark);
}

.bulk-actions-info span {
    background: var(--primary-green);
    color: white;
    padding: 2px 8px;
    border-radius: var(--br-xl);
    font-size: 10px;
}

.bulk-actions-btns {
    display: flex;
    gap: 10px;
}

/* Search Bar */
.search-container input {
    border-radius: 50px;
    background: #f1f3f4;
    border: 1px solid transparent;
    transition: all 0.3s;
    padding: 10px 20px 10px 40px;
}

.search-container input:focus {
    background: white;
    border-color: rgba(71,16,235,0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Buttons */
.btn-primary-gradient {
    background: linear-gradient(135deg, #4710EB 0%, #000033 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(71,16,235,0.3);
    transition: all 0.3s;
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(71,16,235,0.4);
}

/* Promotion Table Refinements */
.premium-table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    color: var(--dark-gray);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Checkout Modal Enhancements */
.search-results-dropdown {
    position: absolute;
    width: 100%;
    max-height: 250px;
    background: white;
    border-radius: var(--br-sm);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1100;
    overflow-y: auto;
    border: 1px solid var(--medium-gray);
    margin-top: 5px;
}

.search-result-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8fafc;
}

.search-result-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 1px solid #e2e8f0;
}

.search-result-info h4 {
    font-size: 11px;
    margin: 0;
    color: var(--text-dark);
}

.search-result-info p {
    font-size: 10px;
    margin: 0;
    color: var(--dark-gray);
}

.fee-row-selected {
    background-color: var(--accent-green) !important;
}

.premium-table tbody tr:hover {
    background-color: rgba(71,16,235,0.03) !important;
}

.premium-table tr.row-repeating td {
    background-color: rgba(0, 0, 0, 0.01);
}

.row-repeating {
    opacity: 0.95;
}

/* Promote / Repeat status badges - color + text signal for the review lists.
   .promoted = green (advancing), .repeating = amber (staying), .blocked =
   red (cannot move), .skipped = gray (no action this run). */
.status-badge.promoted {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.repeating {
    background: rgba(245, 124, 0, 0.12);
    color: #b45309;
    border: 1px solid rgba(245, 124, 0, 0.3);
}

.status-badge.skipped {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.status-badge.blocked {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

/* Row-level tint: promoting = green wash, repeating = amber wash. */
.premium-table tr.row-promoted td {
    background-color: rgba(16, 185, 129, 0.05);
}

.premium-table tr.row-repeating td {
    background-color: rgba(245, 124, 0, 0.06);
}

/* Override button inside the promotion review list. */
.promo-override-btn {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 9px;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.promo-override-btn:hover {
    border-color: #4710EB;
    color: #4710EB;
    background: rgba(71, 16, 235, 0.04);
}

.promo-override-btn.applied {
    border-color: #4710EB;
    color: #fff;
    background: #4710EB;
}

.promo-override-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Card Badge Animations */
.summary-card:hover .badge {
    opacity: 1 !important;
    transform: scale(1.1);
}

.badge {
    transition: all 0.3s ease;
}

/* Sticky Header Helper */
.table-container {
    max-height: 500px;
    overflow-y: auto;
}

/* Dropdown Functional Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #fff;
    min-width: 160px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: var(--br-sm);
    padding: 8px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 8px 16px;
    color: var(--text-dark);
    text-decoration: none;
    display: block;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: var(--accent-green);
    color: var(--primary-green-dark);
}

/* Attendance Comment Bubble Styles */
.comment-bubble {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: #4710EB;
    color: white;
    padding: 10px 15px;
    border-radius: var(--br-md);
    font-size: 10px;
    width: 250px;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    cursor: default;
    transform-origin: bottom center;
    animation: bubbleEmanate 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
    line-height: 1.5;
}

.comment-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: #4710EB transparent transparent transparent;
}

@keyframes bubbleEmanate {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

.comment-icon-wrapper i:hover {
    transform: scale(1.2);
    transition: transform 0.2s;
}

/* --- Ultra-Premium POS Design Tokens --- */
:root {
    --pos-glass-bg: rgba(255, 255, 255, 0.7);
    --pos-glass-border: rgba(255, 255, 255, 0.2);
    --pos-accent: #4710EB;
    --pos-accent-light: rgba(71,16,235,0.05);
    --pos-text-main: #1e293b;
    --pos-text-muted: #64748b;
    --pos-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Wizard Animations */
.wizard-slide-in {
    animation: slideLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Financial Passport */
.financial-passport {
    background: white;
    border-radius: var(--br-xl);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--pos-shadow);
    margin-bottom: 25px;
    border: 1px solid #f1f5f9;
}

.sticky-passport {
    position: sticky;
    top: 0;
    z-index: 110;
    margin: 0 -5px 25px -5px;
    border-radius: 0 0 20px 20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.passport-identity {
    display: flex;
    align-items: center;
    gap: 20px;
}

.passport-photo-frame {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-size: cover;
    background-position: center;
}

.passport-stats {
    display: flex;
    gap: 30px;
}

.passport-stat-item {
    text-align: right;
}

.passport-stat-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--pos-text-muted);
    letter-spacing: 0.5px;
}

.passport-stat-value {
    font-size: 14px;
    font-weight: 800;
    color: var(--pos-text-main);
}

/* Fee Groups (Session/Term) */
.fee-group {
    margin-bottom: 10px;
}

.fee-group-header {
    font-size: 11px;
    font-weight: 800;
    color: var(--pos-text-main);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border-radius: var(--br-md);
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
    position: relative;
}

.fee-group-header:hover {
    background: #f1f5f9;
}

.fee-group-header .toggle-icon {
    margin-left: auto;
    transition: transform 0.3s;
}

.fee-group.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.fee-group.collapsed .fee-grid {
    display: none !important;
}

.fee-group-header i:first-child {
    color: var(--pos-accent);
}

/* Fee Shopping Cards */
.fee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.fee-card {
    background: white;
    border-radius: var(--br-lg);
    padding: 16px 20px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
}

.fee-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.fee-card.selected {
    border-color: var(--pos-accent);
    background: var(--pos-accent-light);
}

.fee-card.selected::after {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    color: var(--pos-accent);
    font-size: 14px;
    display: none;
    /* Hide default icon as we use layout now */
}

.fee-card-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--br-md);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--pos-text-muted);
    flex-shrink: 0;
}

.selected .fee-card-icon {
    background: white;
    color: var(--pos-accent);
}

.fee-card-info-stack {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fee-card-title {
    font-weight: 800;
    font-size: 12px;
    color: var(--pos-text-main);
}

.fee-card-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--pos-text-muted);
    letter-spacing: 0.5px;
}

.fee-card-balance {
    color: var(--pos-text-main);
    font-weight: 900;
    font-size: 14px;
    text-align: right;
    margin-left: auto;
}

.selected .fee-card-balance {
    color: var(--pos-accent);
}

.fee-card-input-wrapper {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0, 0, 0, 0.05);
    width: 100%;
}

/* Merchant Sticky Bar */
.merchant-footer {
    position: sticky;
    bottom: -30px;
    left: -30px;
    right: -30px;
    background: white;
    padding: 30px 40px 50px 40px;
    /* Increased bottom padding */
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.05);
    /* Enhanced shadow */
    margin: 30px -30px -30px -30px;
    /* Increased top margin */
}

.merchant-total-info {
    display: flex;
    flex-direction: column;
}

.merchant-total-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--pos-text-muted);
}

.merchant-total-value {
    font-size: 22px;
    font-weight: 900;
    color: var(--pos-accent);
}

/* POS Search Hub */
.search-hub {
    text-align: center;
    padding: 60px 20px;
}

.hub-icon {
    font-size: 40px;
    color: var(--pos-accent);
    margin-bottom: 20px;
    opacity: 0.8;
}

.hub-chips {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.hub-chip {
    padding: 6px 14px;
    border-radius: var(--br-xl);
    background: #f1f5f9;
    font-size: 10px;
    font-weight: 600;
    color: var(--pos-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.hub-chip:hover {
    background: white;
    border-color: var(--pos-accent);
    color: var(--pos-accent);
}

/* Loading States */
.pos-loader {
    display: none;
    margin: 20px 0;
}

.pos-loading-shimmer {
    height: 4px;
    width: 100%;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.pos-loading-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--pos-accent), transparent);
    animation: shimmerShift 1.2s infinite ease-in-out;
}

@keyframes shimmerShift {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(400%);
    }
}

/* Fee Card Details (Partial Amount Input) */
.fee-partial-input-group {
    background: #f8fafc;
    border-radius: var(--br-md);
    padding: 10px 15px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #edf2f7;
}

.fee-partial-input-group input {
    border: none;
    background: transparent;
    font-weight: 800;
    color: var(--pos-text-main);
    width: 120px;
    outline: none;
    font-size: 13px;
    padding: 0;
}

.fee-partial-input-group span {
    font-size: 8px;
    font-weight: 800;
    color: var(--pos-text-muted);
}

/* Refined Teacher Subject Table Popover */
.subjects-popover-wrapper {
    position: relative;
    display: inline-block;
}

.btn-subjects-toggle {
    background: linear-gradient(135deg, rgba(71,16,235,0.08) 0%, rgba(71,16,235,0.04) 100%);
    color: #4710EB;
    border: 1px solid rgba(71,16,235,0.2);
    padding: 6px 12px;
    border-radius: var(--br-sm);
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.btn-subjects-toggle:hover {
    background: linear-gradient(135deg, rgba(71,16,235,0.12) 0%, rgba(71,16,235,0.08) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(71,16,235,0.1);
    border-color: rgba(71,16,235,0.3);
}

.subjects-popover {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    z-index: 100;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--br-md);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.subjects-popover.active {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.popover-header {
    background: rgba(71,16,235,0.05);
    padding: 10px 15px;
    font-size: 9px;
    font-weight: 800;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.popover-body {
    padding: 10px;
    max-height: 250px;
    overflow-y: auto;
}

.popover-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 10px;
    color: var(--text-dark);
    font-weight: 500;
    transition: background 0.2s ease;
    border-radius: 6px;
}

.popover-item i {
    color: var(--primary-green);
    font-size: 8px;
}

.popover-item:hover {
    background: rgba(71,16,235,0.05);
}

/* Modal Autocomplete Suggestions */
.nerdc-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.2s ease;
}

.nerdc-suggestions.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.suggestion-item {
    padding: 10px 15px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
    transition: all 0.2s;
}

.suggestion-item:hover {
    background: #f8fafc;
    color: var(--primary-green);
    padding-left: 20px;
}

.suggestion-item i {
    font-size: 10px;
    opacity: 0.5;
}

/* Tag Styles */
.tags-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--br-md);
    background: rgba(255, 255, 255, 0.95);
    min-height: 48px;
    align-items: center;
    position: relative;
}

.tag {
    background: linear-gradient(135deg, #4710EB 0%, #000033 100%);
    color: white;
    padding: 6px 14px;
    border-radius: var(--br-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(71,16,235,0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: tagPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tag i {
    cursor: pointer;
    font-size: 9px;
}

.tag-input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    min-width: 120px;
    font-size: 11px;
}

@keyframes tagPop {
    from {
        transform: scale(0.6);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Clean Tooltip Styles */
.status-info-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    cursor: help;
}

.status-info-icon {
    font-size: 11px;
    color: var(--dark-gray);
    opacity: 0.6;
    transition: all 0.2s ease;
}

.status-info-wrapper:hover .status-info-icon {
    opacity: 1;
    color: var(--primary-green);
    transform: scale(1.1);
}

.status-tooltip {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
    padding: 8px 12px;
    border-radius: var(--br-sm);
    font-size: 9px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    pointer-events: none;
}

.status-info-wrapper:hover .status-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.status-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
}

/* Glassmorphic Chart Tooltip */
#chartjs-tooltip {
    opacity: 0;
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--br-md);
    padding: 10px 15px;
    pointer-events: none;
    transition: all .2s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 2000;
}

#chartjs-tooltip table {
    margin: 0;
}

#chartjs-tooltip .tooltip-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

#chartjs-tooltip .tooltip-value {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    gap: 6px;
}

#chartjs-tooltip .tooltip-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-green);
    box-shadow: 0 0 8px var(--primary-green);
}

/* =========================================
   PREMIUM TEACHER REGISTRATION MODAL STYLES
   ========================================= */

/* Glassmorphism Modal Overlay */
.modal {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.fade-in {
    opacity: 1;
}

/* Premium Modal Dialog */
.premium-modal-dialog {
    max-width: 900px;
    width: 95%;
    height: 90vh;
    margin: 5vh auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--br-xl);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    overflow: hidden;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.premium-modal-dialog .modal-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--br-xl);
}

.premium-modal-dialog .modal-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: thin;
}

.modal.show .premium-modal-dialog {
    transform: scale(1);
    opacity: 1;
}

/* Modal Header with Gradient */
.premium-modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.premium-modal-title {
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    margin: 0;
}

.btn-close-premium {
    width: 36px;
    height: 36px;
    border-radius: var(--br-md);
    border: none;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close-premium:hover {
    background: #e2e8f0;
    color: #ef4444;
    transform: rotate(90deg);
}

/* Premium Toggle Switch */
.premium-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.premium-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.premium-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
}

.premium-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.premium-slider {
    background-color: #4710EB;
}

input:checked+.premium-slider:before {
    transform: translateX(18px);
}

.premium-slider.round {
    border-radius: 34px;
}

.premium-slider.round:before {
    border-radius: 50%;
}

/* Layout Grid */
.premium-modal-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    padding: 0;
    min-height: 0;
    /* Changed from 500px to avoid overflow issues */
    flex: 1;
    overflow-y: auto;
}

/* Sidebar / Profile Section */
.premium-sidebar {
    background: #f8fafc;
    padding: 24px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-preview {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: #94a3b8;
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 0 0 4px #ffffff;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

/* Main Form Area */
.premium-form-area {
    padding: 24px;
    background: #ffffff;
}

.premium-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.full-width {
    grid-column: span 2;
}

/* Float Label Input */
.float-label-group {
    position: relative;
    margin-bottom: 8px;
}

.premium-input {
    width: 100%;
    padding: 8px 12px 8px 40px;
    /* Space for icon */
    border: 2px solid #e2e8f0;
    border-radius: var(--br-md);
    font-size: 10px;
    font-weight: 500;
    color: #334155;
    background: #fff;
    transition: all 0.2s ease;
    height: 42px;
    box-sizing: border-box;
}

.premium-input:focus {
    border-color: #4710EB;
    box-shadow: 0 0 0 4px rgba(71,16,235,0.1);
    outline: none;
}

.premium-input::placeholder {
    color: transparent;
    /* Hide default placeholder for float effect */
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 12px;
    transition: color 0.2s ease;
    pointer-events: none;
}

.premium-input:focus~.input-icon {
    color: #4710EB;
}

.float-label {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 10px;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    padding: 0 4px;
}

/* Active State for Float Label */
.premium-input:focus~.float-label,
.premium-input:not(:placeholder-shown)~.float-label {
    top: 0;
    left: 14px;
    font-size: 8px;
    font-weight: 600;
    color: #4710EB;
}

/* Select styling */
select.premium-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 48px;
}

.premium-tag {
    background: rgba(71,16,235,0.05);
    color: #000033;
    padding: 6px 12px;
    border-radius: var(--br-xl);
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: scaleIn 0.2s ease;
}

.premium-tag i {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.premium-tag i:hover {
    opacity: 1;
}

.tag-input-ghost {
    border: none;
    outline: none;
    flex: 1;
    min-width: 120px;
    font-size: 11px;
    color: #334155;
    padding: 4px 0;
}

/* Footer Actions */
.premium-footer {
    padding: 24px 32px;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: #fff;
}

.btn-premium-ghost {
    padding: 12px 24px;
    border-radius: var(--br-md);
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-premium-ghost:hover {
    background: #f1f5f9;
    color: #334155;
}

.btn-premium-primary {
    padding: 12px 32px;
    border-radius: var(--br-md);
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #4710EB 0%, #000033 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(71,16,235,0.2);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-premium-primary:hover {
    box-shadow: 0 10px 15px -3px rgba(71,16,235,0.3);
    transform: translateY(-2px);
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}

@keyframes avatarPop {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Role Selection Grid */
.role-selection-section {
    margin-bottom: 32px;
}

.section-label {
    font-size: 10px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-label i {
    color: #4710EB;
}

.role-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.role-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: var(--br-md);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(71,16,235,0.05) 0%, rgba(71,16,235,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.role-card:hover {
    border-color: #4710EB;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(71,16,235,0.15);
}

.role-card:hover::before {
    opacity: 1;
}

.role-card.selected {
    border-color: #4710EB;
    background: linear-gradient(135deg, rgba(71,16,235,0.08) 0%, rgba(71,16,235,0.03) 100%);
    box-shadow: 0 4px 12px rgba(71,16,235,0.2);
}

.role-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(71,16,235,0.05) 0%, rgba(71,16,235,0.15) 100%);
    border-radius: var(--br-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 19px;
    transition: all 0.3s ease;
}

.role-card.selected .role-card-icon {
    background: linear-gradient(135deg, #4710EB 0%, #000033 100%);
    color: white;
    transform: scale(1.1);
}

.role-card-title {
    font-size: 10px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.role-card.selected .role-card-title {
    color: #4710EB;
}

.role-card-desc {
    font-size: 9px;
    color: #64748b;
    line-height: 1.4;
}

.role-card-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: #4710EB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.role-card.selected .role-card-check {
    opacity: 1;
    transform: scale(1);
}

/* Floating Label Inputs */
.form-floating {
    position: relative;
    margin-bottom: 24px;
}

.form-floating-input {
    width: 100%;
    padding: 16px 16px 8px 44px;
    border: 2px solid #e2e8f0;
    border-radius: var(--br-md);
    font-size: 11px;
    color: #334155;
    background: white;
    transition: all 0.3s ease;
    outline: none;
}

.form-floating-input:focus {
    border-color: #4710EB;
    box-shadow: 0 0 0 4px rgba(71,16,235,0.1);
}

.form-floating-input:focus+.form-floating-label,
.form-floating-input:not(:placeholder-shown)+.form-floating-label {
    transform: translateY(-8px) scale(0.85);
    color: #4710EB;
    font-weight: 600;
}

.form-floating-label {
    position: absolute;
    left: 44px;
    top: 16px;
    font-size: 11px;
    color: #64748b;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left top;
    background: white;
    padding: 0 4px;
}

.form-floating-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    transition: color 0.3s ease;
}

.form-floating-input:focus~.form-floating-icon {
    color: #4710EB;
}

/* Enhanced Subject Tags */
.premium-subjects-section {
    margin-bottom: 24px;
}

.popular-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.popular-subject-btn {
    padding: 6px 14px;
    border-radius: var(--br-xl);
    font-size: 10px;
    font-weight: 500;
    color: #4710EB;
    background: rgba(71,16,235,0.08);
    border: 1px solid rgba(71,16,235,0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popular-subject-btn:hover {
    background: rgba(71,16,235,0.15);
    transform: translateY(-2px);
}

.popular-subject-btn i {
    font-size: 8px;
}

.tags-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: var(--br-md);
    background: white;
    min-height: 56px;
    transition: all 0.3s ease;
}

.tags-input-container:focus-within {
    border-color: #4710EB;
    box-shadow: 0 0 0 4px rgba(71,16,235,0.1);
}

.tag {
    padding: 6px 12px;
    border-radius: var(--br-xl);
    font-size: 10px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    animation: tagSlideIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid;
}

@keyframes tagSlideIn {
    from {
        transform: scale(0) translateX(-20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateX(0);
        opacity: 1;
    }
}

/* Pastel color variations for tags */
.tag:nth-child(5n+1) {
    background: rgba(139, 195, 74, 0.15);
    color: #558b2f;
    border-color: rgba(139, 195, 74, 0.3);
}

.tag:nth-child(5n+2) {
    background: rgba(33, 150, 243, 0.15);
    color: #1565c0;
    border-color: rgba(33, 150, 243, 0.3);
}

.tag:nth-child(5n+3) {
    background: rgba(156, 39, 176, 0.15);
    color: #6a1b9a;
    border-color: rgba(156, 39, 176, 0.3);
}

.tag:nth-child(5n+4) {
    background: rgba(255, 152, 0, 0.15);
    color: #e65100;
    border-color: rgba(255, 152, 0, 0.3);
}

.tag:nth-child(5n+5) {
    background: rgba(0, 188, 212, 0.15);
    color: #00838f;
    border-color: rgba(0, 188, 212, 0.3);
}

.tag .remove-tag {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    font-size: 9px;
}

.tag .remove-tag:hover {
    opacity: 1;
}

.tag-input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 150px;
    font-size: 10px;
    color: #334155;
    background: transparent;
}

.tag-input::placeholder {
    color: #94a3b8;
}

/* Form Sections */
.premium-form-section {
    margin-bottom: 32px;
    animation: sectionFadeIn 0.5s ease-out backwards;
}

.premium-form-section:nth-child(1) {
    animation-delay: 0.1s;
}

.premium-form-section:nth-child(2) {
    animation-delay: 0.2s;
}

.premium-form-section:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e2e8f0 50%, transparent 100%);
    margin: 32px 0;
}

/* ── Document drop zones ──
   The visual half of the shared upload UX in upload-helpers.js: a drag lands on
   one of these slots, or a click opens the file picker. Used by the Add New
   Teacher pane and the student Documents tab. The .doc-drag-over class is
   applied by bindDocDropZone(). */
.doc-dropzones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.doc-dropzone {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 132px;
    padding: 18px 14px;
    text-align: center;
    border: 1.5px dashed #c7d2fe;
    border-radius: 14px;
    background: linear-gradient(160deg, #ffffff 0%, #f5f3ff 100%);
    box-shadow: 0 6px 16px -14px rgba(15, 23, 42, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease,
        border-color 0.25s ease, background 0.25s ease;
}

/* Same sweeping sheen as the photo upload buttons; it sits above the fill and
   below the label. */
.doc-dropzone::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: translateX(-120%);
    transition: transform 0.6s ease;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.6) 50%, transparent 80%);
}

.doc-dropzone:hover::after {
    transform: translateX(120%);
}

.doc-dropzone:hover {
    transform: translateY(-2px);
    border-color: #4710EB;
    background: linear-gradient(160deg, #ffffff 0%, #ede9fe 100%);
    box-shadow: 0 16px 28px -20px rgba(71, 16, 235, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* The type icon reads as a chip, so each document type keeps its own colour. */
.doc-dropzone > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 3px;
    border-radius: 12px;
    font-size: 16px;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(71, 16, 235, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doc-dropzone:hover > i,
.doc-dropzone.doc-drag-over > i {
    transform: translateY(-1px) scale(1.05);
}

.doc-dropzone-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.1px;
}

.doc-dropzone-hint {
    font-size: 10px;
    color: #94a3b8;
}

.doc-dropzone-name {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    word-break: break-word;
}

/* Filled: the dashed affordance gives way to a solid, gradient-tinted card. */
.doc-dropzone.has-file {
    border-style: solid;
    border-color: transparent;
    background: linear-gradient(160deg, #f5f3ff 0%, #ede9fe 100%);
    box-shadow: 0 12px 24px -18px rgba(71, 16, 235, 0.9), inset 0 0 0 1px rgba(71, 16, 235, 0.35);
}

.doc-dropzone.has-file .doc-dropzone-name {
    color: #4710EB;
}

/* A filled slot still lifts on hover, so it reads as replaceable. */
.doc-dropzone.has-file:hover {
    box-shadow: 0 18px 30px -18px rgba(71, 16, 235, 0.95), inset 0 0 0 1px rgba(71, 16, 235, 0.45);
}

/* Dragging: the strongest state, furthest lift and the deepest shadow. */
.doc-dropzone.doc-drag-over {
    transform: translateY(-3px) scale(1.02);
    border-color: #4710EB;
    background: linear-gradient(160deg, #ede9fe 0%, #ddd6fe 100%);
    box-shadow: 0 20px 34px -20px rgba(71, 16, 235, 0.95), inset 0 0 0 1px rgba(71, 16, 235, 0.3);
    outline: none;
}

.doc-dropzone:active {
    transform: translateY(0) scale(0.99);
}

.doc-dropzone:focus-visible {
    outline: 3px solid rgba(71, 16, 235, 0.35);
    outline-offset: 2px;
}

/* Every zone wired through bindDocDropZone() lights up while a file hovers it,
   so surfaces with their own card styling (admission, staff application) get the
   affordance without needing drop-specific rules of their own. The shared slots
   above carry the full treatment already, so they are excluded. */
.doc-drag-over:not(.doc-dropzone) {
    outline: 2px dashed #4710EB;
    outline-offset: 4px;
}

/* NERDC Autocomplete Enhancement */
.nerdc-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #4710EB;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 16px rgba(71,16,235,0.15);
    display: none;
}

.nerdc-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    color: #334155;
}

.suggestion-item:hover {
    background: rgba(71,16,235,0.08);
    color: #4710EB;
}

.suggestion-item i {
    color: #4710EB;
    font-size: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .role-selection-grid {
        grid-template-columns: 1fr;
    }
}

/* Wizard Progress Bar */
.wizard-progress-container {
    padding: 12px 20px 0;
    background: white;
}

.wizard-progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.wizard-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4710EB 0%, #0055EF 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

/* Step Indicators */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
}

.wizard-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.wizard-step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 10px;
    color: #94a3b8;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.wizard-step-indicator.active .wizard-step-circle {
    background: linear-gradient(135deg, #4710EB 0%, #0055EF 100%);
    border-color: #4710EB;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(71,16,235,0.3);
}

.wizard-step-indicator.completed .wizard-step-circle {
    background: #4710EB;
    border-color: #4710EB;
    color: white;
}

.wizard-step-label {
    font-size: 8px;
    font-weight: 500;
    color: #94a3b8;
    text-align: center;
    transition: color 0.3s ease;
}

.wizard-step-indicator.active .wizard-step-label {
    color: #4710EB;
    font-weight: 600;
}

.wizard-step-indicator.completed .wizard-step-label {
    color: #4710EB;
}

/* Wizard Content */
.wizard-content {
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.wizard-step-content {
    display: none;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-step-content.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Step 1: Photo Capture */
.photo-capture-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
}

.photo-preview-large {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    overflow: hidden;
    border: 2px dashed #cbd5e1;
    box-shadow: 0 10px 30px rgba(71,16,235,0.2);
    position: relative;
    transition: all 0.3s ease;
}

.photo-preview-large:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(71,16,235,0.3);
}

.photo-preview-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.photo-preview-large.has-photo img {
    display: block;
}

.photo-preview-large i {
    font-size: 24px;
    color: #4710EB;
    opacity: 0.3;
}

.photo-preview-large.has-photo i {
    display: none;
}

.photo-capture-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.photo-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.photo-badge:hover {
    transform: scale(1.1);
    background: #4710EB;
    color: white;
}

.photo-badge i {
    font-size: 16px;
    color: #4710EB;
}

.photo-badge:hover i {
    color: white;
}

/* Class Selection Cards (Step 3) */
.class-selection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.class-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: var(--br-md);
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.class-card:hover {
    border-color: #4710EB;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(71,16,235,0.15);
}

.class-card.selected {
    border-color: #4710EB;
    background: linear-gradient(135deg, rgba(71,16,235,0.08) 0%, rgba(71,16,235,0.03) 100%);
    box-shadow: 0 4px 12px rgba(71,16,235,0.2);
}

.class-card-label {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    transition: color 0.3s ease;
}

.class-card.selected .class-card-label {
    color: #4710EB;
}

.class-card-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: #4710EB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.class-card.selected .class-card-check {
    opacity: 1;
    transform: scale(1);
}

/* Parent Search */
.parent-search-container {
    position: relative;
    margin-bottom: 24px;
}

.parent-search-result {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(71,16,235,0.08);
    border-radius: var(--br-sm);
    border-left: 3px solid #4710EB;
    display: none;
}

.parent-search-result.show {
    display: block;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.parent-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--br-md);
    font-size: 9px;
    font-weight: 600;
    margin-left: 8px;
}

.parent-badge.existing {
    background: rgba(71,16,235,0.15);
    color: #4710EB;
}

.parent-badge.new {
    background: rgba(33, 150, 243, 0.15);
    color: #1565c0;
}

/* Step 4: Student Card Preview */
.student-card-preview {
    background: linear-gradient(135deg, #4710EB 0%, #000033 100%);
    border-radius: var(--br-lg);
    padding: 30px;
    color: white;
    box-shadow: 0 15px 40px rgba(71,16,235,0.4);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.student-card-preview::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

.student-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.student-card-logo {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.9;
}

.student-card-body {
    display: flex;
    gap: 24px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.student-card-photo {
    width: 100px;
    height: 100px;
    border-radius: var(--br-md);
    background: white;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.student-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-card-photo i {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #4710EB;
}

.student-card-info {
    flex: 1;
}

.student-card-name {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px;
}

.student-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 10px;
    opacity: 0.9;
}

.student-card-detail {
    display: flex;
    align-items: center;
    gap: 6px;
}

.student-card-detail i {
    font-size: 10px;
    opacity: 0.7;
}

/* Review Sections */
.review-section {
    background: white;
    border-radius: var(--br-md);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.review-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.review-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-section-title i {
    color: #4710EB;
}

.review-edit-btn {
    padding: 6px 12px;
    border-radius: var(--br-sm);
    font-size: 10px;
    font-weight: 500;
    color: #4710EB;
    background: rgba(71,16,235,0.08);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-edit-btn:hover {
    background: rgba(71,16,235,0.15);
}

.review-field {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.review-field:last-child {
    border-bottom: none;
}

.review-field-label {
    font-size: 10px;
    color: #64748b;
    font-weight: 500;
}

.review-field-value {
    font-size: 10px;
    color: #334155;
    font-weight: 600;
}

/* Wizard Navigation */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    padding: 20px 32px;
    border-top: 1px solid #e2e8f0;
    background: white;
}

.wizard-nav-btn {
    padding: 12px 24px;
    border-radius: var(--br-md);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizard-nav-btn.btn-back {
    background: transparent;
    color: #64748b;
}

.wizard-nav-btn.btn-back:hover {
    background: #f1f5f9;
    color: #334155;
}

.wizard-nav-btn.btn-next,
.wizard-nav-btn.btn-submit {
    background: linear-gradient(135deg, #4710EB 0%, #0055EF 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(71,16,235,0.3);
}

.wizard-nav-btn.btn-next:hover,
.wizard-nav-btn.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(71,16,235,0.4);
}

.wizard-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Success Animation */
@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #4710EB;
    position: absolute;
    animation: confetti 3s ease-out forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .class-selection-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wizard-steps {
        flex-wrap: wrap;
    }

    .wizard-step-label {
        font-size: 8px;
    }

    .student-card-body {
        flex-direction: column;
        text-align: center;
    }

    .student-card-details {
        grid-template-columns: 1fr;
    }
}

/* Cropper Overlays */
#cropperModal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.cropper-modal-content {
    background: white;
    margin: 5vh auto;
    padding: 24px;
    border-radius: var(--br-xl);
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

#cropper-container {
    width: 100%;
    height: 400px;
    background: #f8fafc;
    border-radius: var(--br-md);
    overflow: hidden;
    margin-bottom: 20px;
}

/* Hostel Management Styles */
.status-badge {
    padding: 4px 10px;
    border-radius: var(--br-xl);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-active {
    background: rgba(71,16,235,0.1);
    color: #4710EB;
    border: 1px solid rgba(71,16,235,0.2);
}

.status-inactive {
    background: rgba(158, 158, 158, 0.1);
    color: #757575;
    border: 1px solid rgba(158, 158, 158, 0.2);
}

.icon-blue {
    background: rgba(33, 150, 243, 0.1) !important;
    color: #1976d2 !important;
}

.icon-green {
    background: rgba(76, 175, 80, 0.1) !important;
    color: #4710EB !important;
}

.icon-orange {
    background: rgba(255, 152, 0, 0.1) !important;
    color: #ef6c00 !important;
}



.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.review-card-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-edit-all-btn {
    background: rgba(71,16,235,0.1);
    color: var(--primary-green);
    border: none;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.review-edit-all-btn:hover {
    background: var(--primary-green);
    color: white;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.review-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: fieldReveal 0.5s ease backwards;
}

@keyframes fieldReveal {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.review-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.review-value:empty::before {
    content: "Not provided";
    font-style: italic;
    font-weight: 400;
    color: #94a3b8;
}

/* Specific formatting for address/long fields */
.full-row {
    grid-column: 1 / -1;
}


/* --- CV-STYLE REGISTRATION SUMMARY --- */
.cv-container {
    padding: 20px;
    background: #f1f5f9;
    border-radius: var(--br-xl);
}

.cv-paper {
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    min-height: 800px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .cv-paper {
        flex-direction: column;
    }
}

.cv-sidebar {
    width: 260px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 40px 30px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cv-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid var(--primary-green);
        padding: 30px 20px;
        text-align: center;
    }
}

.cv-photo-frame {
    width: 150px;
    height: 180px;
    background: #f1f5f9;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin: 0 auto 30px;
    overflow: hidden;
    position: relative;
}

.cv-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cv-photo-frame i {
    font-size: 60px;
    color: #cbd5e1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.cv-sidebar-section {
    margin-bottom: 30px;
}

.cv-sidebar-title {
    font-size: 9px;
    font-weight: 800;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    display: block;
    border-bottom: 1px solid rgba(71,16,235,0.1);
    padding-bottom: 4px;
}

.cv-contact-item {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cv-contact-label {
    font-size: 8px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.cv-contact-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dark);
    word-break: break-all;
}

.cv-main {
    flex: 1;
    padding: 50px 40px;
}

@media (max-width: 768px) {
    .cv-main {
        padding: 30px 20px;
    }
}

.cv-header {
    margin-bottom: 40px;
    border-bottom: 2px solid var(--primary-green);
    padding-bottom: 20px;
}

.cv-name {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.1;
    margin-bottom: 4px;
}

.cv-role {
    font-size: 9.6px;
    font-weight: 700;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.cv-section {
    margin-bottom: 35px;
}

.cv-section-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cv-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.cv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 480px) {
    .cv-grid {
        grid-template-columns: 1fr;
    }
}

.cv-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cv-item-label {
    font-size: 8px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.cv-item-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dark);
}

@media print {
    .wizard-container, .wizard-navigation, .portal-header {
        display: none !important;
    }
    body {
        background: white;
        padding: 0;
    }
    .cv-container {
        padding: 0;
        background: white;
    }
    .cv-paper {
        box-shadow: none;
        border: none;
        width: 100%;
        max-width: none;
        margin: 0;
    }
}

/* PWA Install Button - Floating Action Button */
.pwa-install-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: linear-gradient(135deg, #4710EB 0%, #000033 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(71,16,235,0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideUp 0.5s ease;
}

.pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(71,16,235,0.5);
}

.pwa-install-btn:active {
    transform: translateY(0);
}

.pwa-install-btn i {
    font-size: 16px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .pwa-install-btn {
        bottom: 15px;
        right: 15px;
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* Hide install button when app is installed */
@media all and (display-mode: standalone) {
    .pwa-install-btn {
        display: none !important;
    }
}

/* ── Premium Admission View Modal Styles ── */
#admissionViewModal {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.6);
}

#admissionViewModal .modal-content {
    max-width: 850px;
    width: 95%;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25);
    background: #ffffff;
    overflow: hidden;
    animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

#admissionViewModal .modal-header {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    color: white;
    padding: 1.25rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: none;
}

#admissionViewModal .modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
}

#admissionViewModal .modal-header .close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

#admissionViewModal .modal-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.adm-detail-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Applicant Header Card */
.adm-profile-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.adm-avatar-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    flex-shrink: 0;
    background: #0f766e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.adm-avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.adm-profile-info {
    flex: 1;
    min-width: 200px;
}

.adm-profile-info h3 {
    margin: 0 0 0.4rem 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
}

.adm-badges-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.adm-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.adm-badge-appnum {
    background: #ccfbf1;
    color: #0f766e;
}

.adm-badge-school {
    background: #e0e7ff;
    color: #4338ca;
}

.adm-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.adm-status-pending { background: #fef3c7; color: #d97706; }
.adm-status-admitted { background: #dcfce7; color: #15803d; }
.adm-status-notadmitted { background: #fee2e2; color: #b91c1c; }

/* Grid Sections */
.adm-grid-two {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.adm-section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.adm-section-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.adm-section-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 1rem 0;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.adm-section-title i {
    color: #0f766e;
}

.adm-info-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 1rem;
}

.adm-info-item {
    display: flex;
    flex-direction: column;
}

.adm-info-item.full-width {
    grid-column: span 2;
}

.adm-info-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.adm-info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    word-break: break-word;
}

/* Documents Gallery */
.adm-docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.adm-doc-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.adm-doc-card:hover {
    border-color: #0f766e;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.1);
}

.adm-doc-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #ccfbf1;
    color: #0f766e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.adm-doc-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.adm-doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 8px;
    background: #0f766e;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.adm-doc-btn:hover {
    background: #0d9488;
    color: #ffffff;
}

/* Modal Footer Styling */
#admissionViewModal .modal-footer {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

#admissionViewModal .modal-footer select {
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    background: #ffffff;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

#admissionViewModal .modal-footer select:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

/* ── Inline Admission Score Inputs ── */
.inline-score-input {
    width: 75px;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
    transition: all 0.2s ease;
}

.inline-score-input:focus {
    background: #ffffff;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

.inline-score-input.saved {
    border-color: #10b981;
    background: #ecfdf5;
}

.inline-score-input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.score-total-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #0f172a;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

/* =========================================
   PREMIUM QUERY VERDICT MODAL
   ========================================= */
/* Both classes are named in the selector on purpose. index.html carries its
   own inline `.modal { z-index: 1050 }` (a Bootstrap-style base), and a bare
   `.premium-verdict-overlay` rule loses that tie: equal specificity, but the
   inline <style> is parsed after the stylesheet <link>, so it wins and the
   dialog dropped to 1050 — behind the staff/student detail panes (overlay
   19998, pane 19999). Clicks aimed at the dialog's buttons then landed on the
   pane backdrop instead. Naming .modal here raises specificity above that
   inline rule, so this z-index actually applies. */
.modal.premium-verdict-overlay {
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 20500;
}

.premium-verdict-dialog {
    width: min(92vw, 560px);
    max-height: 92vh;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 30px 60px -15px rgba(2, 6, 23, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset,
        0 0 80px rgba(245, 158, 11, 0.08);
    display: flex;
    flex-direction: column;
    animation: premiumVerdictIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes premiumVerdictIn {
    from { opacity: 0; transform: translateY(18px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.premium-verdict-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #334155 100%);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.premium-verdict-header::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.28) 0%, transparent 70%);
}

.premium-verdict-title {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.premium-verdict-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px -6px rgba(245, 158, 11, 0.7);
}

.premium-verdict-title h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}

.premium-verdict-title p {
    margin: 2px 0 0;
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 0.2px;
}

.premium-verdict-header .btn-close-premium {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    position: relative;
    z-index: 1;
}

.premium-verdict-header .btn-close-premium:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

/* Body */
.premium-verdict-body {
    padding: 20px 24px 8px;
    overflow-y: auto;
    min-height: 0;
    flex: 1;
}

/* Case / response card */
.premium-verdict-case {
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 12px;
    color: #475569;
    margin-bottom: 18px;
}

.premium-verdict-case strong {
    color: #92400e;
}

.premium-verdict-case .pv-response {
    margin-top: 10px;
    background: #fff;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 10px 12px;
}

.premium-verdict-case .pv-response .pv-resp-head {
    font-weight: 700;
    color: #92400e;
    margin-bottom: 3px;
}

.premium-verdict-case .pv-attach {
    margin-top: 8px;
    font-size: 11px;
    color: #92400e;
}

/* Section label */
.premium-verdict-section-label {
    font-size: 11px;
    font-weight: 800;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 10px;
}

/* Decision choice cards */
.premium-verdict-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.premium-verdict-choice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.premium-verdict-choice:hover {
    border-color: #cbd5e1;
    background: #fff;
    transform: translateY(-1px);
}

.premium-verdict-choice input {
    position: absolute;
    opacity: 0;
}

.premium-verdict-choice .choice-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.premium-verdict-choice .choice-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.premium-verdict-choice .choice-text strong {
    font-size: 13px;
    color: #0f172a;
}

.premium-verdict-choice .choice-text span {
    font-size: 10.5px;
    color: #94a3b8;
    line-height: 1.4;
}

.premium-verdict-choice .choice-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    color: #fff;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.2s ease;
}

/* Active state (toggled by JS .is-active) */
.premium-verdict-choice[data-choice="PARDONED"].is-active {
    border-color: #86efac;
    background: #f0fdf4;
}

.premium-verdict-choice[data-choice="PARDONED"].is-active .choice-icon {
    background: #dcfce7;
    color: #16a34a;
}

.premium-verdict-choice[data-choice="PARDONED"].is-active .choice-check {
    background: #16a34a;
    border-color: #16a34a;
    opacity: 1;
    transform: scale(1);
}

.premium-verdict-choice[data-choice="PENALIZED"].is-active {
    border-color: #fca5a5;
    background: #fef2f2;
}

.premium-verdict-choice[data-choice="PENALIZED"].is-active .choice-icon {
    background: #fee2e2;
    color: #dc2626;
}

.premium-verdict-choice[data-choice="PENALIZED"].is-active .choice-check {
    background: #dc2626;
    border-color: #dc2626;
    opacity: 1;
    transform: scale(1);
}

/* Penalty amount row */
.premium-verdict-amount-row {
    margin-top: 16px;
    animation: premiumFadeIn 0.25s ease;
}

@keyframes premiumFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.premium-verdict-amount-row label {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    display: block;
}

.premium-verdict-amount-input {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    overflow: hidden;
    transition: all 0.2s ease;
}

.premium-verdict-amount-input:focus-within {
    border-color: #f59e0b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.premium-verdict-amount-input .naira {
    padding-left: 14px;
    font-size: 16px;
    font-weight: 800;
    color: #b45309;
}

.premium-verdict-amount-input input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 11px 12px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    min-width: 0;
}

.premium-verdict-amount-row small {
    display: block;
    margin-top: 6px;
    color: #94a3b8;
    font-size: 10.5px;
}

/* Note */
.premium-verdict-note {
    margin-top: 16px;
    margin-bottom: 12px;
}

.premium-verdict-note label {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    display: block;
}

.premium-verdict-note input {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 13px;
    background: #f8fafc;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.premium-verdict-note input:focus {
    border-color: #f59e0b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* Footer */
.premium-verdict-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 20px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
}

.btn-verdict-ghost {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 11px 22px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-verdict-ghost:hover {
    background: #e2e8f0;
}

.btn-verdict-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 11px 22px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px -6px rgba(217, 119, 6, 0.6);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-verdict-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -6px rgba(217, 119, 6, 0.7);
}

.btn-verdict-primary:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .premium-verdict-choices {
        grid-template-columns: 1fr;
    }
}

/* ── A payroll run changed on another screen ────────────────────────────────
   A bursar submits, or an approver signs, on a different dashboard. The payroll
   panel is moved to that run, and the two elements that identify it — the month
   picker and the status banner — are flashed rather than the whole panel
   repainting. The class is deliberately left on the element: with no
   fill-mode the computed style reverts when the animation ends, and re-adding it
   (after removing it and forcing a reflow) is what lets the same run flash twice
   in a row. */
@keyframes wfPayrollFlash {
    0% {
        box-shadow: 0 0 0 0 rgba(71, 16, 235, 0.5);
    }

    70% {
        box-shadow: 0 0 0 7px rgba(71, 16, 235, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(71, 16, 235, 0);
    }
}

.wf-payroll-flash {
    animation: wfPayrollFlash 1.3s ease-out 2;
}

/* =========================================
   PREMIUM PAYROLL EDIT MODAL
   ========================================= */
/* The Edit Payroll editor is the widest sheet in the family: a 30/70 split with
   each records list sitting beside the form that adds to it. This base width is
   therefore 40% wider than the 900px it was; the smaller dialogs below keep
   their own widths. */
.ppx-dialog {
    width: min(96vw, 1260px);
    box-shadow:
        0 30px 60px -15px rgba(2, 6, 23, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset,
        0 0 80px rgba(71, 16, 235, 0.12);
}

/* The Edit Payroll editor packs a lot onto one sheet, so it is drawn at 70% of
   the family's size: the layout, type and spacing all shrink together as one
   piece rather than being restyled piecemeal. It is then stretched 20% taller
   than that 70% sheet (0.7 x 1.2 = 0.84), giving a slightly portrait sheet that
   shows more of the earnings/deduction lists before they scroll. Its entrance
   animation is restated here, ending on those same scales so the dialog does
   not flash at full size before settling. */
#payrollEditModal .ppx-dialog {
    transform: scale(0.7, 0.84);
    animation: payrollEditIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes payrollEditIn {
    from { opacity: 0; transform: translateY(18px) scale(0.672, 0.8064); }
    to { opacity: 1; transform: translateY(0) scale(0.7, 0.84); }
}

.ppx-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #312e81 100%);
    padding: 18px 22px;
}

.ppx-header::after {
    right: -50px;
    top: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(71, 16, 235, 0.45) 0%, transparent 70%);
}

.ppx-icon {
    background: linear-gradient(135deg, #6366f1, #4710EB);
    box-shadow: 0 8px 20px -6px rgba(71, 16, 235, 0.75);
}

.ppx-body {
    flex: 1;
    min-height: 0;
    display: flex;
    overflow: hidden;
    padding: 16px 20px 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* Two columns keep the whole editor in one view: the figures on the left (30%),
   the earnings and deductions it builds them from on the right (70%). Only a
   list that outgrows its panel scrolls, never the modal itself. */
.ppx-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
    gap: 18px;
}

.ppx-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    min-height: 0;
}

.ppx-col-left {
    overflow-y: auto;
}

/* Two stacked rows — Allowances & other earnings, then Deductions. */
.ppx-col-right {
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 14px;
    overflow: hidden;
}

/* Live pay summary */
.ppx-hero {
    position: relative;
    flex-shrink: 0;
    border-radius: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: 0 16px 32px -20px rgba(15, 23, 42, 0.8);
    overflow: hidden;
}

.ppx-hero::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -70px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(71, 16, 235, 0.55) 0%, transparent 70%);
}

.ppx-hero-top {
    position: relative;
    z-index: 1;
}

.ppx-hero-label {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #93c5fd;
}

.ppx-hero-net {
    display: flex;
    align-items: baseline;
    gap: 3px;
    margin-top: 3px;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.15;
    color: #ffffff;
    transition: color 0.2s ease;
}

.ppx-hero-net .naira {
    font-size: 17px;
    font-weight: 800;
    color: #a5b4fc;
}

.ppx-hero-net.is-negative {
    color: #fca5a5;
}

.ppx-hero-chips {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.ppx-chip {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 700;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ppx-chip-allow {
    color: #4ade80;
}

.ppx-chip-ded {
    color: #f87171;
}

.ppx-hero-warn {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    padding: 7px 11px;
    border-radius: 10px;
    background: rgba(248, 113, 113, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
    font-size: 10.5px;
    font-weight: 700;
}

/* Sections */
.ppx-section {
    margin: 0;
    flex-shrink: 0;
}

/* A section that owns a list: the label spans the whole panel and beneath it
   the records it keeps (left) sit beside the form that adds new ones (right).
   Only the list scrolls; the composer stays put. */
.ppx-section.is-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 16px;
    min-height: 0;
}

.ppx-section.is-panel > .ppx-section-label {
    grid-column: 1 / -1;
}

.ppx-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: #64748b;
}

.ppx-section-label i {
    color: #4710EB;
}

.ppx-section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #e2e8f0, transparent);
}

.ppx-field {
    margin-bottom: 14px;
}

.ppx-field > label {
    display: block;
    margin-bottom: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: #334155;
}

.ppx-hint {
    display: block;
    margin-top: 5px;
    font-size: 10.5px;
    line-height: 1.5;
    color: #94a3b8;
}

/* Inputs */
.ppx-input {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    overflow: hidden;
    transition: all 0.2s ease;
}

.ppx-input:focus-within {
    border-color: #4710EB;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(71, 16, 235, 0.12);
}

.ppx-input .naira {
    padding-left: 14px;
    font-size: 15px;
    font-weight: 800;
    color: #4710EB;
}

.ppx-input input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 11px 12px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.ppx-input input:disabled {
    color: #94a3b8;
}

.ppx-text {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    padding: 10px 12px;
    font-size: 12.5px;
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.ppx-text:focus {
    border-color: #4710EB;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(71, 16, 235, 0.12);
}

.ppx-text:disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.ppx-select {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    padding: 10px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    outline: none;
    transition: all 0.2s ease;
}

.ppx-select:focus {
    border-color: #4710EB;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(71, 16, 235, 0.12);
}

.ppx-select:disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.ppx-select-sm {
    width: auto;
    min-width: 150px;
    padding: 8px 12px;
    font-size: 11.5px;
}

/* Active / Inactive segmented control */
.ppx-status {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
}

.ppx-status-option {
    display: flex;
    align-items: center;
    gap: 7px;
    border: none;
    border-radius: 10px;
    background: transparent;
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ppx-status-option:hover {
    color: #334155;
}

.ppx-status-option.is-active {
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #4710EB);
    box-shadow: 0 6px 14px -6px rgba(71, 16, 235, 0.75);
}

.ppx-status-option.is-active[data-value="false"] {
    background: linear-gradient(135deg, #f87171, #dc2626);
    box-shadow: 0 6px 14px -6px rgba(220, 38, 38, 0.75);
}

.ppx-status-select {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Notes */
.ppx-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 13px;
    font-size: 11px;
    line-height: 1.55;
    margin-top: 12px;
}

.ppx-note i {
    margin-top: 2px;
    flex-shrink: 0;
}

.ppx-note.is-warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.ppx-note.is-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.ppx-loading {
    padding: 28px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
}

.ppx-note-body {
    flex: 1;
    min-width: 0;
}

.ppx-inline-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 9px;
    border: 1px solid #fcd34d;
    background: #fff;
    color: #92400e;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ppx-inline-btn:hover {
    background: #fef3c7;
}

/* Lists */
.ppx-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
}

.ppx-empty {
    padding: 10px 12px;
    border: 1px dashed #e2e8f0;
    border-radius: 11px;
    background: #f8fafc;
    font-size: 11px;
    color: #94a3b8;
}

.ppx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 0.18s ease;
}

.ppx-item:hover {
    border-color: #e2e8f0;
    box-shadow: 0 8px 18px -14px rgba(15, 23, 42, 0.6);
}

.ppx-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 12px;
    flex-shrink: 0;
}

.ppx-item.is-earn .ppx-item-icon {
    background: #ecfdf5;
    color: #059669;
}

.ppx-item.is-ded .ppx-item-icon {
    background: #fef2f2;
    color: #dc2626;
}

.ppx-item-body {
    flex: 1;
    min-width: 0;
}

.ppx-item-amount {
    font-size: 12.5px;
    font-weight: 800;
}

.ppx-item.is-earn .ppx-item-amount {
    color: #047857;
}

.ppx-item.is-ded .ppx-item-amount {
    color: #dc2626;
}

.ppx-item-label {
    font-weight: 600;
    color: #0f172a;
}

.ppx-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    font-size: 10px;
    color: #94a3b8;
}

.ppx-item-reason {
    margin-top: 2px;
    font-size: 10px;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ppx-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 700;
}

.ppx-badge.is-penalty {
    background: #fef2f2;
    color: #dc2626;
}

.ppx-badge.is-statutory {
    background: #f5f3ff;
    color: #4710EB;
}

.ppx-badge.is-other {
    background: #eff6ff;
    color: #2563eb;
}

.ppx-badge.is-soft {
    background: #f1f5f9;
    color: #64748b;
}

.ppx-item-link {
    font-size: 10px;
    font-weight: 700;
    color: #4710EB;
    text-decoration: none;
}

.ppx-item-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #dc2626;
    font-size: 11px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.18s ease;
}

.ppx-item-remove:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
    transform: scale(1.05);
}

.ppx-item-lock {
    flex-shrink: 0;
    color: #92400e;
    font-size: 12px;
}

/* Composer */
.ppx-composer {
    flex-shrink: 0;
    align-self: stretch;
    min-height: 0;
    overflow-y: auto;
    padding: 11px;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: #f8fafc;
}

.ppx-composer-grid {
    display: grid;
    grid-template-columns: 1fr 132px;
    gap: 8px;
}

.ppx-composer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.ppx-composer-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    color: #94a3b8;
}

.ppx-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.ppx-check input {
    width: 14px;
    height: 14px;
    accent-color: #4710EB;
}

.ppx-add-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    border: none;
    border-radius: 11px;
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #6366f1, #4710EB);
    box-shadow: 0 8px 18px -8px rgba(71, 16, 235, 0.8);
    transition: all 0.2s ease;
}

.ppx-add-btn:hover {
    transform: translateY(-1px);
}

.ppx-add-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.ppx-save {
    background: linear-gradient(135deg, #6366f1, #4710EB);
    box-shadow: 0 8px 20px -6px rgba(71, 16, 235, 0.7);
}

.ppx-save:hover {
    box-shadow: 0 12px 24px -6px rgba(71, 16, 235, 0.85);
}

/* ── Shared shell for the smaller payroll dialogs ────────────────────────────
   Email Payslips, Amend Penalty and Payroll Variance reuse the same header,
   body and footer so the whole payroll flow reads as one family. */
.ppx-dialog-sm {
    width: min(96vw, 520px);
}

.ppx-dialog-lg {
    width: min(96vw, 1000px);
}

.ppx-body-plain {
    display: block;
    overflow-y: auto;
    padding: 18px 22px 22px;
}

/* Amber accent for the one dialog that is about taking money away. */
.ppx-header.is-amber::after {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.45) 0%, transparent 70%);
}

.ppx-icon.is-amber {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 8px 20px -6px rgba(217, 119, 6, 0.75);
}

.ppx-input-icon {
    padding-left: 14px;
    color: #94a3b8;
    font-size: 12px;
}

.ppx-input:focus-within .ppx-input-icon {
    color: #4710EB;
}

.ppx-optional {
    font-weight: 500;
    color: #94a3b8;
}

/* Two figures that summarise what the dialog will do. */
.ppx-summary {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 16px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: 0 16px 32px -22px rgba(15, 23, 42, 0.8);
}

.ppx-summary-figure {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ppx-summary-value {
    font-size: 26px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.8px;
    color: #fff;
}

.ppx-summary-value-sm {
    font-size: 15px;
    letter-spacing: 0;
    padding-top: 8px;
}

.ppx-summary-label {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #93c5fd;
}

.ppx-summary-divider {
    width: 1px;
    align-self: stretch;
    background: rgba(255, 255, 255, 0.12);
}

.ppx-progress {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 11px;
    font-weight: 600;
}

/* ── Variance report ──────────────────────────────────────────────────────── */
.ppx-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.ppx-stat {
    padding: 12px 14px;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ppx-stat-label {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #94a3b8;
}

.ppx-stat-value {
    margin-top: 4px;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -0.6px;
    color: #0f172a;
}

.ppx-stat-delta {
    margin-top: 2px;
    font-size: 10.5px;
    font-weight: 700;
}

.ppx-stat-delta.is-up {
    color: #b45309;
}

.ppx-stat-delta.is-down {
    color: #047857;
}

.ppx-stat-delta.is-flat {
    color: #94a3b8;
}

.ppx-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 11.5px;
    color: #475569;
}

.ppx-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-weight: 600;
}

.ppx-tag.is-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
    font-weight: 700;
}

.ppx-tag.is-ok {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
    font-weight: 700;
}

.ppx-flag {
    display: inline-block;
    margin: 2px 4px 2px 0;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
}

.ppx-flag.is-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.ppx-flag.is-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.ppx-table-wrap {
    max-height: 52vh;
    overflow: auto;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: #fff;
}

.ppx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.ppx-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: #64748b;
    text-align: left;
    white-space: nowrap;
}

.ppx-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f6f8fb;
    vertical-align: top;
    color: #334155;
}

.ppx-table tbody tr:last-child td {
    border-bottom: none;
}

.ppx-table tbody tr:hover td {
    background: #fbfcfe;
}

.ppx-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ppx-strong {
    font-weight: 700;
    color: #0f172a;
}

.ppx-cell-sub {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 500;
    color: #94a3b8;
}

/* Narrow screens cannot hold two columns side by side, so they stack. This is
   the one place the modal is allowed to scroll. */
@media (max-width: 880px) {
    .ppx-dialog {
        width: 100%;
    }

    .ppx-stat-grid {
        grid-template-columns: 1fr;
    }

    .ppx-body {
        display: block;
        overflow-y: auto;
    }

    .ppx-grid {
        display: block;
    }

    .ppx-col {
        overflow: visible;
    }

    .ppx-col + .ppx-col {
        margin-top: 16px;
    }

    .ppx-section.is-panel {
        display: block;
    }

    .ppx-list {
        flex: none;
        min-height: 0;
        overflow: visible;
    }
}

@media (max-width: 520px) {
    .ppx-hero-net {
        font-size: 25px;
    }

    .ppx-composer-grid {
        grid-template-columns: 1fr;
    }

    .ppx-status-option {
        padding: 8px 12px;
        font-size: 11px;
    }
}

/* =========================================
   PREMIUM WORKFLOW SECTION
   ========================================= */
/* Sub-tab navigation */
#workflowContent .sub-tab-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 22px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px -10px rgba(15, 23, 42, 0.14);
}

#workflowContent .wf-nav-right {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#workflowContent .wf-new-task-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #10b981 0%, #0d9488 100%);
    color: #fff;
    border: none;
    border-radius: 11px;
    padding: 9px 18px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 16px -8px rgba(13, 148, 136, 0.6);
    transition: all 0.22s ease;
    font-family: inherit;
}

#workflowContent .wf-new-task-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -8px rgba(13, 148, 136, 0.7);
}

#workflowContent .wf-new-task-btn:active {
    transform: translateY(0);
}

/* Premium dropdowns (tab bar) */
#workflowContent .wf-premium-select {
    appearance: none;
    -webkit-appearance: none;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    padding: 8px 32px 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    max-width: 220px;
}

#workflowContent .wf-premium-select:hover {
    border-color: #cbd5e1;
    background-color: #fff;
}

#workflowContent .wf-premium-select:focus {
    outline: none;
    border-color: #d97706;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

#workflowContent .wf-premium-select option {
    background: #fff;
    color: #334155;
    font-weight: 600;
    padding: 8px;
}

#workflowContent .wf-premium-select option:checked {
    background: #fffbeb;
    color: #92400e;
}

#workflowContent .wf-premium-select option:hover {
    background: #f1f5f9;
}

#workflowContent .sub-tab-btn {
    background: transparent;
    border: none;
    border-radius: 11px;
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.22s ease;
    font-family: inherit;
}

#workflowContent .sub-tab-btn i {
    font-size: 11px;
}

#workflowContent .sub-tab-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

#workflowContent .sub-tab-btn.active {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 6px 14px -8px rgba(15, 23, 42, 0.5);
}

/* Stat cards */
#workflowContent .stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 178px));
    justify-content: start;
    gap: 6px;
    margin-bottom: 22px;
}

#workflowContent .stat-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 10px 14px;
    box-shadow: 0 8px 24px -14px rgba(15, 23, 42, 0.18);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

#workflowContent .stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--wf-accent, #2563eb) 0%, transparent 90%);
}

#workflowContent .stat-card:nth-child(1)::before { --wf-accent: #2563eb; }
#workflowContent .stat-card:nth-child(2)::before { --wf-accent: #dc2626; }
#workflowContent .stat-card:nth-child(3)::before { --wf-accent: #d97706; }
#workflowContent .stat-card:nth-child(4)::before { --wf-accent: #16a34a; }

#workflowContent .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px -16px rgba(15, 23, 42, 0.28);
}

#workflowContent .stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0;
}

#workflowContent .stat-title {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin-top: 4px;
    line-height: 1.3;
}

#workflowContent .stat-value {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.8px;
    line-height: 1;
    background: linear-gradient(135deg, #0f172a 0%, #475569 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#workflowContent .stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

#workflowContent .stat-icon.icon-blue { background: #eff6ff; color: #2563eb; }
#workflowContent .stat-icon.icon-red { background: #fef2f2; color: #dc2626; }
#workflowContent .stat-icon.icon-yellow { background: #fffbeb; color: #d97706; }
#workflowContent .stat-icon.icon-green { background: #f0fdf4; color: #16a34a; }

/* Table containers */
#workflowContent .table-container {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px -18px rgba(15, 23, 42, 0.22);
    margin-bottom: 22px;
    max-height: none;
}

#workflowContent .table-header {
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #fcfcfd 0%, #f8fafc 100%);
}

#workflowContent .table-title {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#workflowContent .table-title i {
    color: #d97706;
    font-size: 12px;
}

/* Status badges (class-based, generated by wfStatusBadge) */
#workflowContent .wf-badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}

#workflowContent .wf-badge-assigned,
#workflowContent .wf-badge-in_progress {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

#workflowContent .wf-badge-forwarded {
    background: #f5f3ff;
    color: #6d28d9;
    border-color: #ddd6fe;
}

#workflowContent .wf-badge-completed,
#workflowContent .wf-badge-pardoned {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

#workflowContent .wf-badge-expired,
#workflowContent .wf-badge-penalized {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

#workflowContent .wf-badge-queried,
#workflowContent .wf-badge-responded {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

#workflowContent .wf-badge-created,
#workflowContent .wf-badge-closed {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

/* Deadline cells */
#workflowContent .wf-deadline {
    font-weight: 600;
    color: #334155;
}

#workflowContent .wf-deadline-soon {
    color: #d97706;
}

#workflowContent .wf-deadline-overdue {
    color: #dc2626;
    font-weight: 700;
    animation: wfPulse 2s ease-in-out infinite;
}
@keyframes wfPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* Recent activity feed */
#workflowContent .wf-activity {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #f8fafc;
    font-size: 12.5px;
    color: #334155;
    transition: background 0.15s ease;
}

#workflowContent .wf-activity:last-child {
    border-bottom: none;
}

#workflowContent .wf-activity:hover {
    background: #fafbfc;
}

#workflowContent .wf-activity .wf-activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.05);
}

#workflowContent .wf-activity .wf-activity-time {
    margin-left: auto;
    color: #94a3b8;
    font-size: 11px;
    white-space: nowrap;
    padding-left: 12px;
}

/* Chain view — premium timeline */
#workflowContent .wf-chain-view {
    animation: premiumFadeIn 0.25s ease;
}

#workflowContent .wf-chain-view .btn-secondary {
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 16px;
}

/* ── Premium task chain card (expanded rows + full-page view) ───────────── */
#workflowContent .wf-cc {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 16px 40px -24px rgba(15, 23, 42, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

/* Hero header */
#workflowContent .wf-cc-hero {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #334155 100%);
    padding: 22px 24px 18px;
    overflow: hidden;
}

#workflowContent .wf-cc-hero-glow {
    position: absolute;
    right: -60px;
    top: -80px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

#workflowContent .wf-cc-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

#workflowContent .wf-cc-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

#workflowContent .wf-cc-title-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px -6px rgba(16, 185, 129, 0.7);
    flex-shrink: 0;
}

#workflowContent .wf-cc h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -0.4px;
    color: #fff;
}

#workflowContent .wf-cc-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

#workflowContent .wf-cc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 10.5px;
    font-weight: 600;
}

#workflowContent .wf-cc-chip i {
    color: #10b981;
    font-size: 10px;
}

#workflowContent .wf-cc-prio-high i {
    color: #f59e0b;
}

#workflowContent .wf-cc-prio-urgent i {
    color: #f87171;
}

#workflowContent .wf-cc-fwd {
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 16px;
    box-shadow: 0 10px 22px -8px rgba(16, 185, 129, 0.7);
    position: relative;
    z-index: 1;
}

#workflowContent .wf-cc-desc {
    margin: 14px 0 0;
    font-size: 12.5px;
    color: #cbd5e1;
    line-height: 1.55;
    position: relative;
    z-index: 1;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

/* Chain timeline */
#workflowContent .wf-cc-chain {
    padding: 18px 20px 22px;
}

#workflowContent .wf-cc-empty {
    color: #94a3b8;
    font-size: 12px;
    padding: 8px 0;
}

/* Timeline node */
#workflowContent .wf-tn {
    position: relative;
    padding-left: calc(20px + var(--depth, 0) * 26px);
    margin-bottom: 14px;
}

#workflowContent .wf-tn-rail {
    position: absolute;
    left: calc(8px + var(--depth, 0) * 26px);
    top: 0;
    bottom: 0;
    width: 10px;
}

#workflowContent .wf-tn-dot {
    position: absolute;
    top: 20px;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    z-index: 1;
}

#workflowContent .wf-tn-dot.wf-tn-green {
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
}

#workflowContent .wf-tn-dot.wf-tn-amber {
    background: #d97706;
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.15);
}

#workflowContent .wf-tn-dot.wf-tn-red {
    background: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

#workflowContent .wf-tn-line {
    position: absolute;
    top: 34px;
    bottom: -14px;
    left: 4px;
    width: 2px;
    background: linear-gradient(180deg, #e2e8f0 0%, #f1f5f9 100%);
    border-radius: 2px;
}

#workflowContent .wf-tn:last-child .wf-tn-line {
    display: none;
}

/* Node card */
#workflowContent .wf-tn-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 6px 18px -14px rgba(15, 23, 42, 0.3);
    transition: all 0.2s ease;
}

#workflowContent .wf-tn-card:hover {
    box-shadow: 0 14px 30px -18px rgba(15, 23, 42, 0.4);
    border-color: #e2e8f0;
}

/* Expired (past-deadline) states */
#workflowContent .wf-tn-card.wf-tn-card-expired {
    border-color: #fecaca;
    background: #fef2f2;
}

#workflowContent .wf-row-expired {
    border-left: 4px solid #dc2626;
    background: #fef2f2;
}

#workflowContent .wf-row-tip-anchor { position: relative; z-index: 1; }

/* Hover tooltip on expired rows — explains the query/review path and
   links to the chain view. */
#workflowContent .wf-row-tip {
    display: none;
    position: absolute;
    right: 8px;
    width: min(340px, 55vw);
    max-width: 90vw;
    z-index: 9999;
    background: #fff;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    padding: 10px;
    font-size: 11px;
    line-height: 1.5;
    color: #7f1d1d;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    text-align: left;
    overflow-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
}
/* Below (default) */
#workflowContent .wf-row-tip.wf-tip-below { top: calc(100% + 4px); }
/* Above — applied by JS when near viewport bottom */
#workflowContent .wf-row-tip.wf-tip-above { bottom: calc(100% + 4px); top: auto; }

#workflowContent .wf-row-expired:hover .wf-row-tip { display: block; }

#workflowContent .wf-tip-link { margin-top: 6px; }
#workflowContent .wf-tip-link a { font-weight: 700; color: #b91c1c; text-decoration: none; }
#workflowContent .wf-tip-link a:hover { text-decoration: underline; }

#workflowContent .wf-expired-note {
    margin-top: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 8px;
    font-size: 11px;
    color: #b91c1c;
}

/* Verdict pills on the Resolved sub-tab. */
#workflowContent .wf-verdict-cell {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

#workflowContent .wf-verdict-cell-penalized {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

#workflowContent .wf-verdict-cell-pardoned {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Dark-mode variants: keep the red states readable when the OS prefers dark. */
@media (prefers-color-scheme: dark) {
    #workflowContent .wf-tn-card.wf-tn-card-expired {
        border-color: #7f1d1d;
        background: #1f1213;
    }

    #workflowContent .wf-row-expired {
        border-left-color: #ef4444;
        background: #1f1213;
    }

    #workflowContent .wf-badge-expired,
    #workflowContent .wf-badge-penalized {
        background: #2b1414;
        color: #fca5a5;
        border-color: #7f1d1d;
    }

    #workflowContent .wf-expired-note {
        background: #2b1414;
        border-color: #7f1d1d;
        color: #fca5a5;
    }

    #workflowContent .wf-row-tip {
        background: #1f1213;
        border-color: #7f1d1d;
        color: #fca5a5;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
    }

    #workflowContent .wf-tip-link a { color: #f87171; }

    #workflowContent .wf-verdict-cell-penalized {
        background: #2b1414;
        color: #fca5a5;
        border-color: #7f1d1d;
    }

    #workflowContent .wf-verdict-cell-pardoned {
        background: #10231a;
        color: #86efac;
        border-color: #14532d;
    }
}

/* Per-task query history timeline */
#workflowContent .wf-qh {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

#workflowContent .wf-qh-title {
    font-weight: 800;
    font-size: 12px;
    color: #92400e;
    margin-bottom: 10px;
}

#workflowContent .wf-qh-event {
    border-left: 3px solid #f59e0b;
    padding: 2px 0 6px 12px;
    margin: 0 0 10px 0;
    font-size: 11px;
    line-height: 1.5;
}

#workflowContent .wf-tn-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

#workflowContent .wf-tn-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#workflowContent .wf-tn-avatar.wf-tn-green {
    background: #ecfdf5;
    color: #059669;
}

#workflowContent .wf-tn-avatar.wf-tn-amber {
    background: #fffbeb;
    color: #b45309;
}

#workflowContent .wf-tn-avatar.wf-tn-red {
    background: #fef2f2;
    color: #dc2626;
}

#workflowContent .wf-tn-who {
    flex: 1;
    min-width: 0;
}

#workflowContent .wf-tn-name {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#workflowContent .wf-tn-role {
    font-size: 10.5px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 2px 9px;
}

#workflowContent .wf-tn-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

#workflowContent .wf-tn-meta i {
    color: #94a3b8;
    font-size: 9.5px;
}

#workflowContent .wf-tn-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

#workflowContent .wf-tn-actions {
    display: flex;
    gap: 6px;
}

#workflowContent .wf-tn-btn {
    border-radius: 8px;
    font-size: 11px;
    padding: 5px 12px;
}

/* Query cards inside a node */
#workflowContent .wf-tq {
    margin-top: 12px;
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 10px 13px;
    font-size: 11.5px;
    color: #475569;
}

#workflowContent .wf-tq-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #92400e;
}

#workflowContent .wf-tq-head i {
    color: #d97706;
    font-size: 12px;
}

#workflowContent .wf-tq-resp {
    margin-top: 8px;
    background: #fff;
    border: 1px solid #fde68a;
    border-radius: 9px;
    padding: 8px 10px;
}

#workflowContent .wf-tq-resp-head {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 800;
    color: #b45309;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

#workflowContent .wf-tq-resp p {
    margin: 0;
    font-size: 11.5px;
    color: #334155;
    line-height: 1.5;
}

#workflowContent .wf-tq-wait {
    margin-top: 7px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #b45309;
    font-size: 11px;
}

#workflowContent .wf-tq-decision {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #1e40af;
}

#workflowContent .wf-tq-decision i {
    color: #2563eb;
}

#workflowContent .wf-tq-evidence {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    color: #78350f;
}

#workflowContent .wf-tq-evidence i {
    color: #92400e;
}

/* Collapsible Task Center rows */
#workflowContent .wf-center-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

#workflowContent .wf-center-row:hover td {
    background: #f8fafc;
}

#workflowContent .wf-center-chevron {
    color: #94a3b8;
    transition: transform 0.2s ease, color 0.2s ease;
}

#workflowContent .wf-center-chevron.wf-chevron-open {
    transform: rotate(180deg);
    color: #d97706;
}

#workflowContent .wf-center-expand td {
    animation: premiumFadeIn 0.2s ease;
}

/* Small action buttons inside workflow tables */
#workflowContent .table .btn-sm,
#workflowContent .wf-tn-btn {
    border-radius: 8px;
    font-size: 11px;
    padding: 5px 12px;
}

/* ── Premium New Task modal ─────────────────────────────────────────────── */
.premium-task-overlay {
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1200;
}

.premium-task-dialog {
    width: min(92vw, 640px);
    max-height: 92vh;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 30px 60px -15px rgba(2, 6, 23, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset,
        0 0 80px rgba(16, 185, 129, 0.08);
    display: flex;
    flex-direction: column;
    animation: premiumVerdictIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.premium-task-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #334155 100%);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.premium-task-header::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.28) 0%, transparent 70%);
}

.premium-task-title {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.premium-task-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px -6px rgba(16, 185, 129, 0.7);
}

.premium-task-title h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}

.premium-task-title p {
    margin: 2px 0 0;
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 0.2px;
}

.premium-task-header .btn-close-premium {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    position: relative;
    z-index: 1;
}

.premium-task-header .btn-close-premium:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

/* Body */
.premium-task-body {
    padding: 20px 24px 8px;
    overflow-y: auto;
    min-height: 0;
    flex: 1;
}

.premium-task-field {
    margin-bottom: 14px;
}

.premium-task-field label {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    display: block;
}

.premium-task-field label em {
    color: #dc2626;
    font-style: normal;
}

.premium-task-field input[type="text"],
.premium-task-field input[type="datetime-local"],
.premium-task-field textarea,
.premium-task-field select {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 13px;
    background: #f8fafc;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    color: #0f172a;
    transition: all 0.2s ease;
}

.premium-task-field textarea {
    resize: vertical;
    min-height: 76px;
}

.premium-task-field input:focus,
.premium-task-field textarea:focus,
.premium-task-field select:focus {
    border-color: #10b981;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.premium-task-field select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.premium-task-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Assignee pick list */
.premium-task-assignees {
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    height: 150px;
    overflow-y: auto;
    padding: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.premium-task-assignees:focus-within {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    background: #fff;
}

.premium-task-assignees .wf-assignee-item {
    display: flex !important;
    gap: 10px !important;
    align-items: flex-start !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    border-radius: 9px !important;
    transition: background 0.15s ease;
}

.premium-task-assignees .wf-assignee-item:hover {
    background: #ecfdf5;
}

.premium-task-assignees .wf-assignee-item input[type="checkbox"] {
    margin-top: 1px;
    width: 15px;
    height: 15px;
    accent-color: #10b981;
    cursor: pointer;
    flex-shrink: 0;
}

.premium-task-assignees .wf-assignee-item:has(input:checked) {
    background: #d1fae5;
    font-weight: 600;
}

/* Reminder chips */
.premium-task-reminders {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 2px;
}

.premium-task-remind {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 9px 13px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.premium-task-remind:hover {
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.premium-task-remind input {
    accent-color: #10b981;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.premium-task-remind:has(input:checked) {
    border-color: #6ee7b7;
    background: #d1fae5;
    color: #065f46;
}

/* Footer */
.premium-task-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 20px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
}

.btn-task-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 11px 24px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 22px -8px rgba(16, 185, 129, 0.7);
    transition: all 0.2s ease;
}

.btn-task-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px -8px rgba(16, 185, 129, 0.8);
    filter: brightness(1.05);
}

.btn-task-primary:active {
    transform: translateY(0);
}

@media (max-width: 520px) {
    .premium-task-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Note Deadline modal — polish layer over the premium-task pattern ────── */
.nd-dialog {
    /* Wider than the stock premium dialog so the class/subject chip grids
       sit side by side with room to breathe. */
    width: min(96vw, 1140px);
    animation: ndPopIn 0.28s cubic-bezier(0.21, 1.02, 0.73, 1);
}

@keyframes ndPopIn {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}

/* Period strip — reminds admins the session/term comes from Global Filters */
.nd-period {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 6px;
    font-size: 12.5px;
    color: #14532d;
}

.nd-period strong {
    color: #065f46;
}

.nd-period-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 14px -6px rgba(16, 185, 129, 0.7);
}

.nd-period-hint {
    margin-top: 2px;
    font-size: 11px;
    color: #4d7c0f;
}

/* Section dividers */
.nd-section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 18px 0 10px;
}

.nd-section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #f1f5f9;
}

/* "All classes / All subjects" toggle rows */
.nd-all-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 13px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.nd-all-row:hover {
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.nd-all-row input {
    accent-color: #10b981;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.nd-all-row:has(input:checked) {
    border-color: #6ee7b7;
    background: #d1fae5;
    color: #065f46;
}

/* Search box above the pick lists */
.nd-search {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    color: #0f172a;
    margin-bottom: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nd-search:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Chip pickers (reused for classes and subjects) */
.nd-chip-grid {
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    max-height: 148px;
    overflow-y: auto;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nd-chip-grid:focus-within {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    background: #fff;
}

/* Shimmer placeholders while the options load behind the open dialog */
.nd-skel {
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
    background-size: 400% 100%;
    animation: ndShimmer 1.3s ease infinite;
}

@keyframes ndShimmer {
    from { background-position: 100% 0; }
    to   { background-position: 0 0; }
}

/* ── Compliance board — expandable deadline cards ───────────────────────── */
.nd-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.nd-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 26px -14px rgba(15, 23, 42, 0.18);
}

.nd-card.open {
    border-color: #a7f3d0;
    box-shadow: 0 16px 38px -20px rgba(16, 185, 129, 0.3);
}

.nd-card.expired { border-color: #fecaca; }
.nd-card.expired.open { box-shadow: 0 16px 38px -20px rgba(220, 38, 38, 0.35); }
.nd-card.cancelled { opacity: 0.72; }

.nd-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    cursor: pointer;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    user-select: none;
}

.nd-card-head:hover { background: #f8fafc; }

.nd-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 8px 18px -8px rgba(16, 185, 129, 0.7);
}

.nd-card.expired .nd-card-icon { background: linear-gradient(135deg, #f87171, #dc2626); box-shadow: 0 8px 18px -8px rgba(220, 38, 38, 0.6); }
.nd-card.sealed .nd-card-icon  { background: linear-gradient(135deg, #94a3b8, #64748b); box-shadow: 0 8px 18px -8px rgba(100, 116, 139, 0.6); }
.nd-card.cancelled .nd-card-icon { background: linear-gradient(135deg, #e2e8f0, #cbd5e1); color: #64748b; box-shadow: none; }

.nd-card-titles { flex: 1; min-width: 0; }

.nd-card-title {
    font-weight: 800;
    font-size: 13.5px;
    color: #0f172a;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nd-card-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
}

.nd-card-sub .late { color: #dc2626; font-weight: 800; }
.nd-rel { color: #94a3b8; }

.nd-card-chips {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nd-hchip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 5px 11px;
    border: 1px solid transparent;
    border-radius: 99px;
    white-space: nowrap;
}

.nd-hchip i { font-size: 10px; }

.nd-cells-hint {
    font-size: 10.5px;
    color: #94a3b8;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nd-card-actions { display: flex; gap: 6px; align-items: center; }

.nd-act {
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 11px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nd-act-danger:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

/* .lc-btn.ghost is the hero's translucent white skin — on the light card head
   it renders as a white blob. Re-qualify (0-3-0 beats 0-2-0) and give the row
   actions soft semantic tints, matching the sj-acts/fm-acts precedent. */
.nd-card-actions .lc-btn.nd-act {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    box-shadow: none;
}
.nd-card-actions .lc-btn.nd-act:hover { background: #e2e8f0; color: #0f172a; border-color: #cbd5e1; }
.nd-card-actions .lc-btn.nd-act-edit { background: #eef2ff; color: #4f46e5; border-color: #e0e7ff; }
.nd-card-actions .lc-btn.nd-act-edit:hover { background: #e0e7ff; color: #4338ca; border-color: #c7d2fe; }
.nd-card-actions .lc-btn.nd-act-danger { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.nd-card-actions .lc-btn.nd-act-danger:hover { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }

/* CBT vs class-notes kind picker — soft tints (house Compliance-card standard),
   never the hero's translucent-white ghost skin. */
.nd-kind-toggle { display: flex; gap: 8px; margin-bottom: 14px; }
.nd-kind {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.nd-kind:hover { border-color: #c7d2fe; color: #4f46e5; background: #eef2ff; }
.nd-kind.selected {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4338ca;
    box-shadow: 0 1px 4px rgba(99, 102, 241, 0.18);
}
.nd-kind i { font-size: 11px; }
/* Kind marker on CBT deadline cards */
.nd-kind-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    margin-right: 6px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    vertical-align: middle;
}
.nd-kind-chip i { font-size: 9px; }
/* Per-owner question progress pills inside CBT cell rows */
.nd-oprog { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.nd-oprog-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 999px;
    padding: 2px 8px;
}
.nd-oprog-item i { font-size: 9px; }
.nd-oprog-item.ok { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
/* Per-type split (MCQ / Theory) inside a progress pill — quieter than the
   headline worst-type count so the binding number stays legible. */
.nd-otype {
    font-size: 9px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.01em;
}
.nd-oprog-item.ok .nd-otype { color: #059669; }
/* A type whose checkbox is off: keep its minimum box on the modal (so the
   layout never jumps) but make it visibly inactive. */
.nd-count-off {
    opacity: 0.42;
}
.nd-count-off input {
    background: #f9fafb;
    cursor: not-allowed;
}

.nd-dstatus {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 4px 11px;
    border-radius: 99px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.nd-dstatus.active    { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.nd-dstatus.sealed    { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.nd-dstatus.cancelled { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.nd-chevron {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: transform 0.3s ease, background 0.2s ease, color 0.2s ease;
}

.nd-card.open .nd-chevron {
    transform: rotate(180deg);
    background: #d1fae5;
    color: #059669;
}

/* Smooth expand/collapse — the grid-rows trick, no height math */
.nd-card-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.32s ease;
}

.nd-card-body-in { min-height: 0; overflow: hidden; }
.nd-card.open .nd-card-body { grid-template-rows: 1fr; }

.nd-cell-wrap { padding: 2px 20px 18px; border-top: 1px solid #f1f5f9; }

.nd-cells-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 0 2px;
}

.nd-cells-note { font-size: 10.5px; color: #94a3b8; }
.nd-cells-note i { margin-right: 5px; color: #cbd5e1; }

/* Cells — compact accountability cards in a responsive grid */
.nd-cell-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.nd-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 13px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.nd-cell:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 18px -12px rgba(15, 23, 42, 0.22);
    transform: translateY(-1px);
}

.nd-cell.compliant { background: #f5fdf7; border-color: #d5f2dd; }
.nd-cell.defaulter { background: #fff8f7; border-color: #fbdcd8; }
.nd-cell.queried   { background: #faf9ff; border-color: #e6defb; }
.nd-cell.unowned   { background: #fffaef; border-color: #fdeac6; }

.nd-cell-top {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.nd-cell-top .nd-spill { margin-left: auto; flex-shrink: 0; }

.nd-spill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 99px;
    white-space: nowrap;
}

.nd-cell-class {
    font-size: 10px;
    font-weight: 800;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 4px 9px;
    border-radius: 7px;
    white-space: nowrap;
    flex-shrink: 0;
}

.nd-cell-subject {
    font-size: 12.5px;
    font-weight: 800;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.nd-cell-owners {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #64748b;
    min-width: 0;
}

.nd-cell-owners.none {
    gap: 7px;
    color: #b45309;
    font-weight: 600;
}

.nd-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(140deg, #06b6d4, #2563eb);
    color: #fff;
    font-size: 8.5px;
    font-weight: 800;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px #fff;
}

.nd-more {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
}

.nd-owner-names {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nd-meter-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nd-meter {
    flex: 1;
    height: 6px;
    background: #eef2f7;
    border-radius: 99px;
    overflow: hidden;
}

.nd-meter i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #34d399, #059669);
    transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nd-meter-num {
    font-size: 10px;
    font-weight: 800;
    color: #64748b;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.nd-wks {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.nd-wks-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-right: 2px;
}

.nd-wks-label i { margin-right: 5px; color: #059669; }
.nd-wks.ok .nd-wks-label { color: #059669; }

.nd-wk {
    font-size: 9.5px;
    font-weight: 800;
    color: #b91c1c;
    background: #fff;
    border: 1px solid #fecaca;
    min-width: 20px;
    text-align: center;
    padding: 2px 0;
    border-radius: 6px;
}

/* Assign owner fixes a gap — it must read as an amber call, not the white
   ghost skin (.lc-btn.ghost outranks a single-class rule, so win on specificity). */
.nd-cell .lc-btn.nd-assign {
    color: #fff;
    background: #f59e0b;
    border: 1px solid #f59e0b;
    box-shadow: 0 6px 14px -8px rgba(245, 158, 11, 0.8);
    font-size: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
}

.nd-cell .lc-btn.nd-assign:hover {
    background: #d97706;
    border-color: #d97706;
    color: #fff;
}

.nd-cell .nd-assign { margin-top: 2px; align-self: flex-start; }

.nd-skel-row { height: 56px; border-radius: 13px; margin-top: 10px; }

.nd-cell-error {
    padding: 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 11px;
    color: #b91c1c;
    font-size: 12px;
    margin-top: 10px;
}

.nd-cell-empty {
    padding: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 11.5px;
    background: #f8fafc;
    border-radius: 11px;
    margin-top: 10px;
}

@media (max-width: 720px) {
    .nd-card-head { flex-wrap: wrap; }
    .nd-card-chips { display: none; }
    .nd-cell-list { grid-template-columns: 1fr; }
}

.nd-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    padding: 7px 9px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    min-width: 0;
}

.nd-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nd-chip:hover {
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.nd-chip input {
    width: 14px;
    height: 14px;
    accent-color: #10b981;
    cursor: pointer;
    flex-shrink: 0;
}

.nd-chip:has(input:checked) {
    border-color: #6ee7b7;
    background: #d1fae5;
    color: #065f46;
}

.nd-count {
    font-size: 10.5px;
    color: #94a3b8;
    margin-top: 6px;
}

/* Number inputs sit beside the styled text inputs in premium fields */
.premium-task-field input[type="number"] {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 13px;
    background: #f8fafc;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.premium-task-field input[type="number"]:focus {
    border-color: #10b981;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Deadline quick-set chips */
.nd-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 9px;
}

.nd-preset {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 99px;
    padding: 6px 13px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.nd-preset:hover {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #065f46;
    transform: translateY(-1px);
}

/* Live fan-out summary — dark strip flush with the dialog edges */
.nd-summary {
    margin: 18px -24px 0;
    padding: 13px 24px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #cbd5e1;
    font-size: 11.5px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 11px;
}

.nd-summary i {
    color: #6ee7b7;
    font-size: 13px;
    flex-shrink: 0;
}

.nd-summary strong {
    color: #fff;
}

.btn-task-primary:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
    filter: none;
}

/* Expanded Task Center row — premium container */
#workflowContent .wf-center-expand-cell {
    padding: 16px 18px 20px !important;
    background: linear-gradient(180deg, #f1f5f9 0%, #eef2f7 100%) !important;
    border-bottom: 1px solid #e2e8f0;
}

#workflowContent .wf-center-expand-cell .wf-cc {
    animation: premiumFadeIn 0.22s ease;
}

/* Forward Task modal — blue accent + info banner */
.premium-task-icon-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 8px 20px -6px rgba(59, 130, 246, 0.7);
}

.premium-task-header:has(.premium-task-icon-blue)::after {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.28) 0%, transparent 70%);
}

.premium-forward-info {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 12px;
    color: #475569;
    margin-bottom: 16px;
    line-height: 1.5;
}

.premium-forward-info strong {
    color: #1e40af;
}

.premium-task-hint {
    display: block;
    margin-top: 6px;
    color: #94a3b8;
    font-size: 10.5px;
}

/* ── Premium Query Reply modal (defaulter side) ─────────────────────────── */
.premium-reply-dialog {
    width: min(92vw, 620px);
}

.premium-reply-text {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    font-family: inherit;
    background: #f8fafc;
    outline: none;
    box-sizing: border-box;
    color: #0f172a;
    resize: vertical;
    min-height: 96px;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.premium-reply-text:focus {
    border-color: #f59e0b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.premium-reply-text::placeholder {
    color: #94a3b8;
}

.premium-reply-attach-label {
    margin-top: 18px;
}

.premium-reply-attach-note {
    color: #94a3b8;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    font-size: 10.5px;
    margin-left: 4px;
}

.premium-reply-attachments {
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    height: 128px;
    overflow-y: auto;
    padding: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.premium-reply-attachments:focus-within {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
    background: #fff;
}

.premium-reply-attachments label {
    display: flex !important;
    gap: 10px !important;
    align-items: flex-start !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    border-radius: 9px !important;
    transition: background 0.15s ease;
}

.premium-reply-attachments label:hover {
    background: #fffbeb;
}

.premium-reply-attachments input[type="checkbox"] {
    margin-top: 1px;
    width: 15px;
    height: 15px;
    accent-color: #d97706;
    cursor: pointer;
    flex-shrink: 0;
}

.premium-reply-attachments label:has(input:checked) {
    background: #fef3c7;
    font-weight: 600;
}

/* History tab — verdict summary card */
#workflowContent .wf-hs {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    margin-bottom: 16px;
    animation: premiumFadeIn 0.22s ease;
}
#workflowContent .wf-hs-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}
#workflowContent .wf-hs-icon {
    flex: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: #fff;
    font-size: 16px;
    box-shadow: 0 8px 18px -6px rgba(217, 119, 6, 0.6);
}
#workflowContent .wf-hs-titles {
    flex: 1;
    min-width: 0;
}
#workflowContent .wf-hs-title {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.2px;
}
#workflowContent .wf-hs-sub {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#workflowContent .wf-hs-out {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}
#workflowContent .wf-hs-out-green { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
#workflowContent .wf-hs-out-red { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
#workflowContent .wf-hs-out-neutral { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.4); }
#workflowContent .wf-hs-body {
    padding: 16px 18px 18px;
}
#workflowContent .wf-hs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px 14px;
}
#workflowContent .wf-hs-item label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 3px;
}
#workflowContent .wf-hs-item span {
    font-size: 13px;
    color: #334155;
    font-weight: 600;
}
#workflowContent .wf-hs-item-penalty span { color: #dc2626; }
#workflowContent .wf-hs-block {
    margin-top: 12px;
    border-radius: 12px;
    padding: 12px 14px;
}
#workflowContent .wf-hs-block-amber { background: linear-gradient(180deg, #fffbeb, #fef3c7); border: 1px solid #fde68a; }
#workflowContent .wf-hs-block-blue { background: linear-gradient(180deg, #eff6ff, #dbeafe); border: 1px solid #bfdbfe; }
#workflowContent .wf-hs-block-head {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 5px;
}
#workflowContent .wf-hs-block-blue .wf-hs-block-head { color: #1e40af; }
#workflowContent .wf-hs-block-time {
    margin-left: auto;
    font-weight: 600;
    color: #b45309;
    font-size: 11px;
}
#workflowContent .wf-hs-block-blue .wf-hs-block-time { color: #1d4ed8; }
#workflowContent .wf-hs-block p {
    margin: 0;
    font-size: 13px;
    color: #78350f;
    line-height: 1.5;
}

/* Collapse animation for chain-card expansion rows */
#workflowContent tr.wf-center-expand.wf-expand-collapsing td {
    animation: wfExpandCollapse 0.22s ease forwards;
    overflow: hidden;
}
@keyframes wfExpandCollapse {
    from {
        opacity: 1;
        transform: translateY(0);
        padding-top: 16px;
        padding-bottom: 20px;
    }
    to {
        opacity: 0;
        transform: translateY(-6px);
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* Keep expanded chain cards from slamming against the top edge when scrolled into view */
#workflowContent tr.wf-center-expand {
    scroll-margin-top: 14px;
}

/* Verdict action inside the expanded chain card's query card */
#workflowContent .wf-tq-verdict {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 11px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 12px -4px rgba(217, 119, 6, 0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#workflowContent .wf-tq-verdict:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 16px -4px rgba(217, 119, 6, 0.65);
}

/* ── My Tasks: Progress bar & per-assignee breakdown ──────────────────────── */
#workflowContent .wf-progress-track {
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
#workflowContent .wf-progress-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 999px;
    transition: width 0.3s ease;
}
#workflowContent .wf-progress-fill.wf-progress-done {
    background: #16a34a;
}
#workflowContent .wf-progress-fill.wf-progress-partial {
    background: #f59e0b;
}
#workflowContent .wf-progress-label {
    font-size: 10px;
    color: #64748b;
    margin-top: 5px;
    font-weight: 600;
}

/* Per-assignee breakdown rows inside My Tasks */
#workflowContent .wf-assignee-list {
    padding: 8px 16px 10px;
    border-top: 1px dashed #e2e8f0;
}
#workflowContent .wf-assignee-row {
    padding: 8px 0 10px;
    border-bottom: 1px dashed #e2e8f0;
}
#workflowContent .wf-assignee-row:last-child {
    border-bottom: none;
    padding-bottom: 2px;
}
#workflowContent .wf-assignee-name {
    font-size: 11px;
    font-weight: 700;
    color: #0f172a;
}
#workflowContent .wf-assignee-role {
    font-size: 9px;
    font-weight: 600;
    color: #94a3b8;
    margin-left: 6px;
}
#workflowContent .wf-assignee-meta {
    font-size: 10px;
    color: #64748b;
    margin-top: 3px;
}
#workflowContent .wf-assignee-row .wf-completion-info,
#workflowContent .wf-assignee-row .wf-verdict-info {
    margin-top: 6px;
    padding: 8px;
    border-radius: 8px;
    font-size: 10.5px;
}
#workflowContent .wf-assignee-row .wf-completion-info {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
#workflowContent .wf-assignee-row .wf-verdict-info {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
#workflowContent .wf-assignee-row .wf-verdict-info.wf-verdict-pardoned {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}
#workflowContent .wf-completion-note,
#workflowContent .wf-verdict-note {
    margin-top: 4px;
    font-style: italic;
    font-size: 10px;
    color: #64748b;
}
#workflowContent .wf-overdue-label {
    color: #dc2626;
    font-weight: 600;
    font-size: 10px;
    animation: wfPulse 2s ease-in-out infinite;
}
#workflowContent .wf-row-between-g8 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
#workflowContent .wf-badge-row {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
#workflowContent .wf-assignee-detail-row {
    background: #fafbfc;
}
#workflowContent .wf-assignee-detail-row:hover {
    background: #f1f5f9;
}

/* ═══════════════════════════════════════════════════════════════
   STAFF APPLICATION VIEW MODAL — Premium Design  (sav-*)
   ═══════════════════════════════════════════════════════════════ */

/* ── Overlay ── */
.sav-overlay {
    position: fixed;
    inset: 0;
    z-index: 50000;
    background: rgba(10, 12, 28, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: savOverlayIn 0.25s ease;
}
@keyframes savOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Dialog shell ── */
.sav-dialog {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 820px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 32px 80px -16px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.12);
    animation: savDialogIn 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes savDialogIn {
    from { opacity: 0; transform: scale(0.93) translateY(20px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* ── Hero Banner ── */
.sav-hero {
    position: relative;
    background: linear-gradient(135deg, #3b0eb0 0%, #4710EB 40%, #7c3aed 100%);
    padding: 0;
    overflow: hidden;
    flex-shrink: 0;
}
.sav-hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 50%, rgba(255,255,255,0.07) 0%, transparent 50%),
        radial-gradient(circle at 85% 20%, rgba(255,255,255,0.05) 0%, transparent 40%);
    pointer-events: none;
}
.sav-hero-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 1.75rem;
}

/* ── Avatar ── */
.sav-avatar-ring {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    border: 3px solid rgba(255,255,255,0.35);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.85);
    font-size: 2rem;
    transition: transform 0.3s ease;
}
.sav-avatar-ring:hover { transform: scale(1.04); }
.sav-avatar-ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Hero text ── */
.sav-hero-info { flex: 1; min-width: 0; }
.sav-hero-name {
    margin: 0 0 0.45rem 0;
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sav-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Meta Chips ── */
.sav-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    backdrop-filter: blur(6px);
}
.sav-chip-appnum  { background: rgba(255,255,255,0.18); color: #fff; border: 1px solid rgba(255,255,255,0.25); cursor: pointer; transition: background 0.2s ease; }
.sav-chip-appnum:hover { background: rgba(255,255,255,0.3); }
.sav-chip-pending  { background: rgba(251,191,36,0.25);  color: #fde68a; border: 1px solid rgba(251,191,36,0.4); }
.sav-chip-passed   { background: rgba(16,185,129,0.25);  color: #6ee7b7; border: 1px solid rgba(16,185,129,0.4); }
.sav-chip-accepted { background: rgba(16,185,129,0.25);  color: #6ee7b7; border: 1px solid rgba(16,185,129,0.4); }
.sav-chip-failed   { background: rgba(239,68,68,0.25);   color: #fca5a5; border: 1px solid rgba(239,68,68,0.4); }
.sav-chip-rejected { background: rgba(239,68,68,0.25);   color: #fca5a5; border: 1px solid rgba(239,68,68,0.4); }
.sav-chip-onboarded{ background: rgba(139,92,246,0.3);   color: #c4b5fd; border: 1px solid rgba(139,92,246,0.5); }
.sav-chip-role     { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); border: 1px solid rgba(255,255,255,0.2); }

/* ── Close button ── */
.sav-close-btn {
    margin-left: auto;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.sav-close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

/* ── Scrollable body ── */
.sav-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: #f8fafc;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.sav-body::-webkit-scrollbar { width: 5px; }
.sav-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ── Section cards ── */
.sav-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.2rem 1.35rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease;
}
.sav-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.07); }

.sav-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1.5px solid #f1f5f9;
}
.sav-card-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.sav-card-icon-violet  { background: #ede9fe; color: #4710EB; }
.sav-card-icon-blue    { background: #dbeafe; color: #1d4ed8; }
.sav-card-icon-emerald { background: #d1fae5; color: #059669; }
.sav-card-icon-amber   { background: #fef3c7; color: #d97706; }
.sav-card-icon-rose    { background: #fee2e2; color: #dc2626; }
.sav-card-icon-slate   { background: #f1f5f9; color: #475569; }

.sav-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.sav-card-subtitle {
    font-size: 0.76rem;
    color: #94a3b8;
    margin: 0;
}

/* ── Info grid ── */
.sav-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem 1.25rem;
}
.sav-info-grid.full { grid-template-columns: 1fr; }
.sav-info-item { display: flex; flex-direction: column; gap: 3px; }
.sav-info-item.span2 { grid-column: span 2; }

.sav-info-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.sav-info-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    word-break: break-word;
}
.sav-info-value a { color: #4710EB; text-decoration: none; }
.sav-info-value a:hover { text-decoration: underline; }
.sav-info-value.muted { color: #94a3b8; font-weight: 500; font-style: italic; }

/* ── Two-column card row ── */
.sav-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* ── Subject pill tags ── */
.sav-tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.sav-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #ede9fe;
    color: #4710EB;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 600;
}

/* ── Document / resume card ── */
.sav-doc-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
}
.sav-doc-row:hover {
    border-color: #4710EB;
    background: #f5f3ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(71,16,235,0.08);
}
.sav-doc-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #ede9fe;
    color: #4710EB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.sav-doc-info { flex: 1; min-width: 0; }
.sav-doc-name { font-size: 0.88rem; font-weight: 700; color: #1e293b; }
.sav-doc-meta { font-size: 0.74rem; color: #94a3b8; }
.sav-doc-dl {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #4710EB;
    color: #ffffff;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
}
.sav-doc-dl:hover { background: #3b0eb0; color: #fff; transform: scale(1.04); }

/* ── Review status callout ── */
.sav-review-callout {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 0.25rem;
}
.sav-review-callout.notes {
    background: #fefce8;
    border: 1px solid #fde047;
    color: #713f12;
}
.sav-review-callout.onboarded {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

/* ══ Footer ══ */
.sav-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.5rem;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.sav-footer-left {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    align-items: flex-end;
    flex: 1;
    min-width: 0;
}
.sav-footer-right {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ── Footer field groups ── */
.sav-field-group { display: flex; flex-direction: column; gap: 4px; }
.sav-notes-group { flex: 1; min-width: 150px; max-width: 260px; }
.sav-footer-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 5px;
}
.sav-status-select {
    padding: 0.5rem 0.8rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    background: #f8fafc;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sav-status-select:focus {
    border-color: #4710EB;
    box-shadow: 0 0 0 3px rgba(71,16,235,0.12);
    background: #ffffff;
}
.sav-review-notes {
    padding: 0.5rem 0.8rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.83rem;
    font-family: inherit;
    color: #1e293b;
    background: #f8fafc;
    resize: none;
    outline: none;
    width: 100%;
    min-height: 38px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sav-review-notes:focus {
    border-color: #4710EB;
    box-shadow: 0 0 0 3px rgba(71,16,235,0.12);
    background: #ffffff;
}

/* ── Footer Buttons ── */
.sav-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0.55rem 1.15rem;
    border-radius: 11px;
    font-size: 0.83rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    font-family: inherit;
}
.sav-btn:active { transform: scale(0.97); }

.sav-btn-primary {
    background: linear-gradient(135deg, #4710EB 0%, #6d28d9 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(71,16,235,0.3);
}
.sav-btn-primary:hover {
    background: linear-gradient(135deg, #3b0eb0 0%, #5b21b6 100%);
    box-shadow: 0 6px 18px rgba(71,16,235,0.4);
    transform: translateY(-1px);
}

.sav-btn-emerald {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}
.sav-btn-emerald:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    box-shadow: 0 6px 18px rgba(16,185,129,0.4);
    transform: translateY(-1px);
}

.sav-btn-danger {
    background: #fff5f5;
    color: #dc2626;
    border: 1.5px solid #fecaca;
}
.sav-btn-danger:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    transform: translateY(-1px);
}

.sav-btn-ghost {
    background: #f1f5f9;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
}
.sav-btn-ghost:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* ── Divider ── */
.sav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin: 0.25rem 0;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .sav-hero-inner  { flex-wrap: wrap; }
    .sav-hero-name   { font-size: 1.1rem; }
    .sav-info-grid   { grid-template-columns: 1fr; }
    .sav-info-item.span2 { grid-column: span 1; }
    .sav-grid-2      { grid-template-columns: 1fr; }
    .sav-footer      { flex-direction: column; align-items: stretch; }
    .sav-footer-left { flex-direction: column; }
    .sav-notes-group { max-width: 100%; }
    .sav-footer-right{ justify-content: flex-end; }
}

/* ═══════════════════════════════════════════
   SAV — Exam Results Card (sec5)
═══════════════════════════════════════════ */
.sav-card-icon-rose { background: linear-gradient(135deg,#ffe4e6,#fecdd3); color:#e11d48; }

/* Pass / Fail verdict badge in card header */
.sav-result-verdict {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .4px;
}
.sav-result-verdict.pass { background:#d1fae5; color:#065f46; }
.sav-result-verdict.fail { background:#fee2e2; color:#991b1b; }

/* Layout: dial on left, breakdown bars on right */
.sav-score-total-row {
  display: flex; gap: 24px; align-items: flex-start;
  padding: 16px 0 6px;
  flex-wrap: wrap;
}

/* Circular progress dial */
.sav-score-dial-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-width: 120px;
}
.sav-score-dial {
  position: relative; width: 96px; height: 96px;
}
.sav-score-ring {
  width: 96px; height: 96px;
  transform: rotate(-90deg);
}
.sav-score-ring-bg {
  fill: none; stroke: #e2e8f0; stroke-width: 3.5;
}
.sav-score-ring-fill {
  fill: none; stroke-width: 3.5; stroke-linecap: round;
  transition: stroke-dasharray .6s ease;
}
.sav-score-dial-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
}
.sav-score-dial-label {
  font-size: 12px; color: #64748b; text-align: center; line-height: 1.5;
}

/* Per-subject breakdown bars */
.sav-score-breakdown {
  flex: 1; display: flex; flex-direction: column; gap: 12px;
  min-width: 200px;
}
.sav-score-row {
  display: grid;
  grid-template-columns: 90px 1fr 60px;
  align-items: center; gap: 10px;
}
.sav-score-row-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: #475569;
}
.sav-score-row-label i { color: #94a3b8; font-size: 12px; }
.sav-score-row-bar-wrap {
  height: 7px; background: #f1f5f9; border-radius: 99px; overflow: hidden;
}
.sav-score-row-bar {
  height: 100%; border-radius: 99px;
  transition: width .5s ease;
}
.sav-score-row-val {
  font-size: 13px; font-weight: 700; text-align: right;
}
.sav-score-row-val span { font-weight: 400; color: #94a3b8; }

@media (max-width: 600px) {
  .sav-score-total-row { flex-direction: column; align-items: center; }
  .sav-score-row { grid-template-columns: 75px 1fr 50px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   AI QUESTION GENERATOR STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* AI Question Generator — adopts the shared .lc-* / .dl-* design system.
   The section stacks a gradient hero above one visible subview at a time. */
#aiQuestionsContent {
  max-width: 1180px;
  margin: 0 auto;
}
#aiQuestionsContent .lc-stage {
  max-width: none;
  margin: 0;
}
.aiq-hero {
  margin-bottom: 16px;
}

/* The nav pills sit inside the dark .lc-hero, so they read as frosted chips. */
.aiq-nav-pills {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
}

.aiq-nav-pill {
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.aiq-nav-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.aiq-nav-pill.active {
  background: #fff;
  color: #2a0a8f;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.aiq-pill-count {
  background: rgba(0, 0, 0, 0.10);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
}

.aiq-nav-pill.active .aiq-pill-count {
  background: rgba(71, 16, 235, 0.12);
  color: #4710EB;
}

/* Studio Form */
.aiq-studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.aiq-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #eef1f7;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.aiq-card-head {
  padding: 14px 18px;
  border-bottom: 1px solid #eef1f7;
  background: linear-gradient(120deg, rgba(71, 16, 235, 0.09), rgba(0, 85, 239, 0.04));
  border-left: 4px solid #4710EB;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.2px;
  color: #2a0a8f;
}

.aiq-card-head i {
  color: #4710EB;
}

.aiq-card-body {
  padding: 18px;
}

.aiq-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.aiq-types-picker {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.aiq-type-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: #475569;
  transition: all 0.2s ease;
}

.aiq-type-label input[type="checkbox"] {
  accent-color: #4710EB;
}

.aiq-type-label:has(input:checked) {
  border-color: #4710EB;
  background: rgba(71, 16, 235, 0.06);
  color: #2a0a8f;
}

.aiq-type-label input[type="checkbox"] {
  accent-color: #4710EB;
}

.aiq-generate-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(125deg, #2a0a8f 0%, #4710EB 55%, #0055EF 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(71, 16, 235, 0.38);
  transition: all 0.25s ease;
}

.aiq-generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(71, 16, 235, 0.48);
}

.aiq-generate-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Status Badges */
.aiq-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.aiq-status-generating { background: #dbeafe; color: #1e40af; }
.aiq-status-ready      { background: #dcfce7; color: #15803d; }
.aiq-status-review_sent{ background: #ede9fe; color: #6d28d9; }
.aiq-status-reviewed   { background: #fef3c7; color: #b45309; }
.aiq-status-pushed     { background: #ccfbf1; color: #0f766e; }
.aiq-status-error      { background: #fee2e2; color: #b91c1c; }

/* Paper-type chips and row actions inside the archive .dl-table. */
.aiq-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.aiq-type-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(71, 16, 235, 0.08);
  color: #4710EB;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
}
.aiq-acts {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.aiq-acts .lc-btn {
  padding: 5px 10px;
  font-size: 11px;
}
/* Ghost buttons are the hero's white skin; on a white row they must be outlined. */
.aiq-acts .lc-btn.ghost {
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}
.aiq-acts .lc-btn.ghost:hover {
  color: #4710EB;
  border-color: rgba(71, 16, 235, 0.45);
  background: rgba(71, 16, 235, 0.06);
}
.aiq-acts .lc-btn.ghost.is-danger {
  color: #b91c1c;
}
.aiq-acts .lc-btn.ghost.is-danger:hover {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

/* Viewer & Tabs */
.aiq-type-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 16px;
}

.aiq-type-tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-weight: 700;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.aiq-type-tab-btn.active {
  color: #6366f1;
  border-bottom-color: #6366f1;
}

/* MCQ Question Card */
.aiq-q-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}

.aiq-q-card:hover {
  border-color: #cbd5e1;
}

.aiq-q-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.aiq-q-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Per-question AI regeneration buttons */
.aiq-regen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #6366f1;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.aiq-regen-btn:hover:not(:disabled) {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
  transform: rotate(-25deg);
}

.aiq-regen-btn.aiq-regen-option {
  color: #0f766e;
}

.aiq-regen-btn.aiq-regen-option:hover:not(:disabled) {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.aiq-regen-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* Per-option reroll control */
.aiq-opt-regen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #94a3b8;
  font-size: 9px;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.75;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.aiq-opt-regen-btn:hover:not(:disabled) {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
  opacity: 1;
  transform: rotate(-25deg);
}

.aiq-opt-regen-btn:disabled {
  opacity: 0.45;
  cursor: wait;
}

.aiq-option-pill .form-control {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.aiq-option-pill .aiq-opt-regen-btn {
  margin-left: auto;
}

/* Question history list */
.aiq-history-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #ffffff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.aiq-history-row:hover {
  background: #f8fafc;
  border-color: #c7d2fe;
}

.aiq-history-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eef2ff;
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.aiq-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

@media (max-width: 650px) {
  .aiq-options-grid { grid-template-columns: 1fr; }
}

.aiq-option-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.aiq-option-pill.correct {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
  font-weight: 600;
}

.aiq-option-pill .opt-letter {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aiq-option-pill.correct .opt-letter {
  background: #10b981;
  color: #ffffff;
}

/* Theory Question Card */
.aiq-theory-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 14px;
}

.aiq-sub-q {
  margin-left: 20px;
  padding-left: 12px;
  border-left: 3px solid #e2e8f0;
  margin-top: 10px;
}

.aiq-sub-sub-q {
  margin-left: 20px;
  padding-left: 12px;
  border-left: 3px solid #cbd5e1;
  margin-top: 6px;
  font-size: 12px;
}

.aiq-marks-tag {
  background: #f1f5f9;
  color: #475569;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

/* Teacher suggestion banner */
.aiq-suggestion-banner {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.aiq-suggestion-tag {
  background: #fff3cd;
  border-left: 3px solid #f59e0b;
  padding: 6px 10px;
  border-radius: 4px;
  margin-top: 6px;
  font-size: 11px;
  color: #92400e;
}

/* AI Question Generator Modals & Syllabus Audit */
.aiq-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  padding: 16px;
  animation: aiqFadeIn 0.2s ease-out;
}

@keyframes aiqFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes aiqSlideUp {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.aiq-modal-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 480px;
  max-height: 90vh;
  width: 100%;
  animation: aiqSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.aiq-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
}

.aiq-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.aiq-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.aiq-modal-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.aiq-modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  flex: 1;
}

.aiq-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafc;
}

/* Syllabus Coverage Pills & Badges */
.aiq-syllabus-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.aiq-syllabus-pill.covered {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.aiq-syllabus-pill.partial {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.aiq-syllabus-pill.uncovered {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Exam-Format Inspection (WAEC / NECO / JAMB style report) */
.aiq-format-banner {
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.aiq-format-banner.ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.aiq-format-banner.warn {
  background: #fffbeb;
  border-color: #fde68a;
}

.aiq-format-banner.bad {
  background: #fef2f2;
  border-color: #fecaca;
}

.aiq-format-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #1e293b;
}

.aiq-format-banner.ok .aiq-format-head i {
  color: #059669;
}

.aiq-format-banner.warn .aiq-format-head i {
  color: #d97706;
}

.aiq-format-banner.bad .aiq-format-head i {
  color: #dc2626;
}

.aiq-format-sub {
  flex: 1;
  min-width: 180px;
  font-size: 11.5px;
  color: #475569;
  line-height: 1.5;
}

.aiq-format-toggle {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
}

.aiq-format-list {
  list-style: none;
  margin: 10px 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 240px;
  overflow-y: auto;
}

.aiq-format-list li {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.5;
  padding: 5px 9px;
  border-radius: 6px;
  background: #ffffff;
  border-left: 3px solid #94a3b8;
}

.aiq-format-list li.bad {
  border-left-color: #dc2626;
  color: #991b1b;
}

.aiq-format-list li.fixed {
  border-left-color: #059669;
  color: #065f46;
}

/* Per-question format flag chip (sits next to the syllabus pill) */
.aiq-format-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}


.aiq-audit-scorecard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.aiq-audit-stat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.aiq-audit-stat-val {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.aiq-audit-stat-lbl {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  margin-top: 4px;
}

.aiq-audit-filter-btn {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.aiq-audit-filter-btn.active, .aiq-audit-filter-btn:hover {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
}

.aiq-audit-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: #ffffff;
  transition: border-color 0.15s ease;
}

.aiq-audit-item:hover {
  border-color: #cbd5e1;
}

/* ════════════════════════════════════════════════════════════════════════
   LIVE CLASS BOARD (Attendance → Teacher Attendance → 🔴 Live Class)
   A vivid, colour-coded reconciliation of who is / isn't in class this period.
   ════════════════════════════════════════════════════════════════════════ */
.lc-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  font-family: 'Inter', 'Manrope', sans-serif;
}

/* ── Gradient hero ── */
.lc-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 22px 24px 20px;
  color: #fff;
  background: linear-gradient(125deg, #000033 0%, #2a0a8f 42%, #4710EB 74%, #0055EF 100%);
  box-shadow: 0 18px 44px rgba(71, 16, 235, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.lc-hero::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -90px;
  top: -150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 85, 239, 0.55), transparent 68%);
  pointer-events: none;
}
.lc-hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  left: -70px;
  bottom: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
  pointer-events: none;
}
.lc-hero-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.lc-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.lc-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}
.lc-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22e08a;
  animation: lcPulse 1.6s infinite;
}
.lc-sub {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  max-width: 640px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}
.lc-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.lc-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
}
.lc-controls {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.lc-ctl {
  appearance: none;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease;
}
.lc-ctl:hover {
  background: rgba(255, 255, 255, 0.24);
}
.lc-ctl option {
  color: #10141c;
}
.lc-auto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
}
.lc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #2a0a8f;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease;
}
.lc-btn:hover {
  transform: translateY(-1px);
}
.lc-btn.ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: none;
}

/* ── Stat tiles ── */
.lc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 640px) {
  .lc-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
.lc-stat {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
}
.lc-stat::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.lc-stat-val {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}
.lc-stat-lab {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: 0.92;
}
.lc-stat-ico {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 22px;
  opacity: 0.85;
}
.lc-stat.s-sched {
  background: linear-gradient(135deg, #3b2a8f, #4710EB);
}
.lc-stat.s-present {
  background: linear-gradient(135deg, #0f9d58, #10b981);
}
.lc-stat.s-late {
  background: linear-gradient(135deg, #e67e22, #f59e0b);
}
.lc-stat.s-absent {
  background: linear-gradient(135deg, #c0392b, #ef4444);
}

/* ── Class cards ── */
.lc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.lc-card {
  position: relative;
  overflow: hidden;
  padding: 14px 16px 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eef1f7;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  animation: lcFadeUp 0.28s ease both;
}
.lc-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--lc-accent, #4710EB);
}
.lc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}
.lc-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lc-card-toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.lc-card-count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.lc-card-chev {
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.18s ease;
}
.lc-card.is-open .lc-card-chev {
  transform: rotate(180deg);
}
.lc-badge-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex-shrink: 0;
}
.lc-class {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #0f172a;
}
.lc-subject {
  display: inline-block;
  margin: 8px 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--lc-accent, #4710EB);
  background: rgba(71, 16, 235, 0.08);
}
.lc-roster {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}
.lc-card.is-open .lc-roster {
  display: flex;
}
.lc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px dashed #eef1f7;
}
.lc-row:first-child {
  border-top: 0;
}
.lc-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #4710EB, #0055EF);
}
.lc-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-when {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
  flex-shrink: 0;
}
.lc-date {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
}
.lc-time {
  font-size: 9px;
  color: #94a3b8;
}
.lc-pill {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}
.lc-pill.p-present {
  background: linear-gradient(135deg, #0f9d58, #10b981);
}
.lc-pill.p-late {
  background: linear-gradient(135deg, #e67e22, #f59e0b);
}
.lc-pill.p-absent {
  background: linear-gradient(135deg, #c0392b, #ef4444);
}
.lc-pill.p-pending {
  background: #94a3b8;
}
.lc-pill.p-unscheduled {
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
}
.lc-unexpected {
  font-size: 9px;
  font-weight: 700;
  color: #7c3aed;
}
.lc-warn {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 600;
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fcd34d;
}
.lc-empty {
  padding: 30px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}
.lc-empty-ico {
  margin-bottom: 8px;
  font-size: 34px;
  opacity: 0.7;
}

@keyframes lcPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 224, 138, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(34, 224, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 224, 138, 0); }
}
@keyframes lcFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════════════════
   CLASS DOOR SCAN LOG (Attendance → Teacher Attendance → 🧾 Door Scan Log)
   The audit table behind the live board: filters, date grouping, GPS chips.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Filter bar ── */
.dl-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 13px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eef1f7;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}
.dl-view-toggle {
  display: inline-flex;
  align-self: flex-start;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: #f1f5f9;
}
.dl-view-toggle button {
  border: 0;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #64748b;
  background: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}
.dl-view-toggle button:hover {
  color: #4710EB;
}
.dl-view-toggle button.active {
  color: #fff;
  background: linear-gradient(135deg, #4710EB, #0055EF);
  box-shadow: 0 6px 14px rgba(71, 16, 235, 0.28);
}
.dl-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
  gap: 10px;
  align-items: end;
}
.dl-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.dl-field label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #64748b;
}
.dl-field input,
.dl-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 11.5px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dl-field input:focus,
.dl-field select:focus {
  outline: 0;
  border-color: #4710EB;
  box-shadow: 0 0 0 3px rgba(71, 16, 235, 0.12);
}
.dl-field input:disabled,
.dl-field select:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}
.dl-grow {
  grid-column: span 2;
}
@media (max-width: 720px) {
  .dl-grow { grid-column: span 1; }
}
.dl-actions {
  flex-direction: row;
  gap: 8px;
}
.dl-actions .lc-btn {
  flex: 1;
  justify-content: center;
  white-space: nowrap;
}
.dl-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dl-quick button {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  transition: all 0.15s ease;
}
.dl-quick button:hover {
  border-color: rgba(71, 16, 235, 0.45);
  color: #4710EB;
  background: rgba(71, 16, 235, 0.06);
}

/* ── Audit table ── */
.dl-table-wrap {
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eef1f7;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}
.dl-scroll {
  overflow-x: auto;
}
table.dl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
table.dl-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #eef1f7;
}
table.dl-table tbody td {
  padding: 9px 12px;
  border-top: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #334155;
}
table.dl-table tbody tr:hover td {
  background: #f8fafc;
}
table.dl-table tbody tr.dl-day td {
  padding: 7px 12px;
  background: linear-gradient(90deg, rgba(71, 16, 235, 0.09), rgba(0, 85, 239, 0.04));
  border-top: 1px solid #eef1f7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #4710EB;
}
table.dl-table tbody tr.dl-day:first-child td {
  border-top: 0;
}
.dl-who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.dl-av {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #4710EB, #0055EF);
}
.dl-cls {
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}
.dl-sub {
  display: block;
  font-size: 9.5px;
  color: #94a3b8;
  margin-top: 1px;
}
.dl-per {
  display: inline-block;
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(71, 16, 235, 0.08);
  color: #4710EB;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}
.dl-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}
.dl-map {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  text-decoration: none;
  color: #0055EF;
  background: rgba(0, 85, 239, 0.08);
}
.dl-map:hover {
  color: #fff;
  background: linear-gradient(135deg, #4710EB, #0055EF);
}
.dl-none {
  color: #cbd5e1;
}
.dl-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.5;
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fcd34d;
}
.dl-note.info {
  color: #1e3a8a;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
  border-color: #93c5fd;
}

/* ── Pager ── */
.dl-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0 2px;
}
.dl-pager button {
  min-width: 30px;
  padding: 5px 9px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dl-pager button:hover:not(:disabled) {
  border-color: rgba(71, 16, 235, 0.45);
  color: #4710EB;
}
.dl-pager button.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #4710EB, #0055EF);
  box-shadow: 0 6px 14px rgba(71, 16, 235, 0.26);
}
.dl-pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.dl-pager .dl-count {
  margin-left: 6px;
  font-size: 10px;
  color: #94a3b8;
}

/* An extra stat tile tint for off-schedule scans. */
.lc-stat.s-unsched {
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
}

@media print {
  .dl-filters,
  .dl-pager,
  .lc-controls {
    display: none !important;
  }
  .dl-table-wrap {
    box-shadow: none;
    border-color: #cbd5e1;
  }
}

/* ══════════════════════════════════════════════════════════════════
   TEACHER ATTENDANCE → SETTINGS
   Gate QR, classroom door QR, school pin and the lateness cutoff.
   The hero and its chips reuse the .lc-* system; the rest is .ts-*.
   ══════════════════════════════════════════════════════════════════ */
.ts-stage {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 8px;
}
.ts-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
}
/* Hero chips carry a tone, so "not set" reads as a warning at a glance. */
.ts-chip.ok {
  background: rgba(16, 185, 129, 0.26);
  border-color: rgba(16, 185, 129, 0.5);
}
.ts-chip.warn {
  background: rgba(245, 158, 11, 0.24);
  border-color: rgba(245, 158, 11, 0.48);
}

/* ── Section headings ── */
.ts-section {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin: 6px 2px -4px;
}
.ts-section::after {
  content: "";
  flex: 1 1 120px;
  height: 1px;
  background: linear-gradient(90deg, #dfe3ef, rgba(223, 227, 239, 0));
}
.ts-section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: #4710eb;
}
.ts-section-label i {
  font-size: 10px;
}
.ts-section-hint {
  max-width: 560px;
  font-size: 11px;
  color: #8a91a8;
}

/* ── Cards ── */
.ts-card {
  position: relative;
  background: #fff;
  border: 1px solid #e6e9f4;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(16, 24, 56, 0.06);
  overflow: hidden;
}
.ts-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: #4710eb;
}
.ts-card.door::before {
  background: linear-gradient(90deg, #000033, #4710eb 55%, #0055ef);
}
.ts-card.gate::before {
  background: linear-gradient(90deg, #0f766e, #10b981);
}
.ts-card.gps::before {
  background: linear-gradient(90deg, #b45309, #f59e0b);
}
.ts-card.cut::before {
  background: linear-gradient(90deg, #9d174d, #f43f5e);
}
.ts-card.tips::before {
  background: linear-gradient(90deg, #334155, #64748b);
}
.ts-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px 15px;
  background: linear-gradient(180deg, #fbfbfe, #fff);
}
.ts-card-head-text {
  min-width: 0;
}
.ts-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1px;
  color: #101828;
}
.ts-card-sub {
  margin: 4px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: #7b8299;
}
.ts-ico {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: #fff;
  box-shadow: 0 8px 18px rgba(16, 24, 56, 0.18);
}
.ts-ico.door {
  background: linear-gradient(140deg, #4710eb, #0055ef);
  box-shadow: 0 8px 18px rgba(71, 16, 235, 0.32);
}
.ts-ico.gate {
  background: linear-gradient(140deg, #0f766e, #10b981);
}
.ts-ico.gps {
  background: linear-gradient(140deg, #b45309, #f59e0b);
}
.ts-ico.cut {
  background: linear-gradient(140deg, #9d174d, #f43f5e);
}
.ts-ico.info {
  background: linear-gradient(140deg, #334155, #64748b);
}
.ts-tag {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  color: #8a91a8;
  background: #f4f6fb;
  border: 1px solid #e6e9f4;
}
.ts-tag.ok {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.ts-tag.warn {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.ts-body {
  padding: 16px 20px 20px;
}
.ts-door-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
  gap: 18px;
  align-items: start;
}
.ts-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.ts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.ts-grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ts-grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

/* ── Fields ── */
.ts-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.ts-field label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #8a91a8;
}
.ts-field select,
.ts-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  font-family: inherit;
  font-size: 12.5px;
  color: #101828;
  background: #fff;
  border: 1px solid #dbe1ee;
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ts-field select:focus,
.ts-field input:focus {
  outline: none;
  border-color: #4710eb;
  box-shadow: 0 0 0 3px rgba(71, 16, 235, 0.14);
}

/* ── Status strip ── */
.ts-status {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f8fc;
  border: 1px solid #edf0f8;
  font-size: 11.5px;
  line-height: 1.5;
  color: #5b647a;
}
.ts-status strong {
  font-weight: 800;
}
.ts-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #a9b1c6;
}
.ts-dot.ok {
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}
.ts-dot.bad {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}
.ts-dot.busy {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

/* ── Live Class Settings: door table parts + GPS capture ── */
.ts-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.ts-room-cov-num b { color: #101828; font-weight: 800; }
.ts-room-cov-bar {
  display: inline-block;
  width: 120px; height: 7px;
  border-radius: 999px;
  background: #eef1f8;
  overflow: hidden;
}
.ts-room-cov-fill {
  display: block; height: 100%;
  background: linear-gradient(90deg, #4710eb, #0055ef);
  transition: width 0.3s ease;
}
.ts-room-cov-warn { color: #b45309; font-weight: 700; }
.ts-room-cov-ok { color: #047857; font-weight: 700; }
.ts-room-chip {
  font-family: inherit; font-size: 10.5px; font-weight: 800;
  color: #5b647a; background: #fff;
  border: 1px solid #dbe1ee; border-radius: 999px;
  padding: 6px 11px; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ts-room-chip:hover { background: #f6f3ff; }
.ts-room-chip.active { color: #fff; background: #4710eb; border-color: #4710eb; }
.ts-room-jump {
  font-family: inherit; font-size: 10.5px; font-weight: 800;
  color: #4710eb; background: #f6f3ff;
  border: 1px solid #d3c7fb; border-radius: 999px;
  padding: 6px 12px; cursor: pointer;
}
.ts-room-jump:hover { background: #ece6ff; }
.ts-gps-read { font-size: 11.5px; font-weight: 600; line-height: 1.5; padding: 9px 12px; border-radius: 12px; background: #f7f8fc; border: 1px solid #edf0f8; color: #5b647a; }
.ts-gps-read.ok { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.ts-gps-read.warn { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.ts-gps-read.bad { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.ts-gps-read.busy { color: #4710eb; background: #f6f3ff; border-color: #d3c7fb; }
.ts-gps-read[hidden] { display: none; }

/* ── Live Class Settings: the door table ── */
.ts-door-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid #f0f2f9; }
.ts-door-search { flex: 0 1 240px; min-width: 160px; padding: 8px 12px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 13px; }
.ts-door-search:focus { outline: none; border-color: #4710eb; box-shadow: 0 0 0 3px rgba(71, 16, 235, .14); }
.ts-door-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.dc-board { padding: 4px 20px 18px; }
.dc-coverage { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0 12px; font-size: 12px; color: #5b647a; }
.dc-head, .dc-row { display: grid; grid-template-columns: 30px minmax(140px, 2fr) minmax(210px, 1.5fr) 150px minmax(84px, auto); gap: 12px; align-items: center; }
.dc-head { padding: 8px 10px; border-bottom: 1px solid #edf0f8; font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #8a91a8; }
.dc-rows { display: block; }
.dc-row { padding: 10px; border-bottom: 1px solid #f3f5fb; border-radius: 10px; }
.dc-row:hover { background: #faf9ff; }
.dc-row.is-flash { animation: dcFlash 1.6s ease; }
@keyframes dcFlash { 0%,100% { background: transparent; } 25% { background: #f0ebff; box-shadow: inset 3px 0 0 #4710eb; } }
.dc-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.dc-check input { width: 16px; height: 16px; accent-color: #4710eb; cursor: pointer; }
.dc-class { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dc-class-name { font-size: 14px; font-weight: 900; color: #101828; }
.dc-class-sub { font-size: 11px; color: #8a91a8; }
.dc-cell { min-width: 0; }
.dc-cell-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.dc-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.dc-pill i { font-size: 10px; }
.dc-pill.ok { color: #047857; background: #ecfdf5; }
.dc-pill.warn { color: #b45309; background: #fffbeb; }
.dc-pill.bad { color: #b91c1c; background: #fef2f2; }
.dc-pill.muted { color: #6b7280; background: #f2f4f8; }
.dc-cell-loc { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.dc-coord { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #047857; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dc-radius { display: inline-flex; align-items: center; gap: 3px; margin-left: 10px; font-size: 11px; font-weight: 700; color: #6b7280; }
.dc-radius-input { width: 46px; padding: 3px 5px; border: 1px solid #e0def7; border-radius: 7px; font-size: 12px; font-weight: 700; color: #2b2f45; text-align: center; }
.dc-radius-input:focus { outline: none; border-color: #4710eb; box-shadow: 0 0 0 3px rgba(71, 16, 235, .14); }
.dc-radius-input:disabled { opacity: .5; cursor: not-allowed; }
.dc-empty { padding: 22px; text-align: center; color: #8a91a8; font-size: 13px; }
.dc-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid #e0def7; background: #fff; color: #2b2f45; font-size: 14px; cursor: pointer; transition: .15s; }
.dc-ico:hover { border-color: #4710eb; color: #4710eb; background: #f6f3ff; }
.dc-ico.qr { border-color: #d3c7fb; background: #f6f3ff; color: #4710eb; }
.dc-ico.is-busy, .dc-ico:disabled { opacity: .6; cursor: progress; }
.dc-bulk { margin: 0 20px 18px; }
@media (max-width: 900px) {
  .dc-head, .dc-row { grid-template-columns: 26px minmax(110px, 1.6fr) 1fr 1fr; }
  .dc-col-actions { display: none; }
  .dc-row .dc-cell-actions { grid-column: 1 / -1; justify-content: flex-start; margin-top: 4px; }
}
@media (max-width: 720px) {
  .ts-door-filters { margin-left: 0; width: 100%; }
  .ts-door-search { flex: 1 1 100%; }
}

/* ── Numbered setup steps ── */
.ts-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(90deg, #faf8ff, #f7fbff);
  border-top: 1px solid #f0f2f9;
  border-bottom: 1px solid #f0f2f9;
}
.ts-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px 6px 7px;
  font-size: 11px;
  font-weight: 600;
  color: #4b5468;
  background: #fff;
  border: 1px solid #e8ebf5;
  border-radius: 999px;
}
.ts-step b {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, #4710eb, #0055ef);
}

/* ── QR previews ── */
.ts-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 250px;
  padding: 16px;
  text-align: center;
  border: 1px dashed #d8dff2;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 0%, #f6f3ff, #fbfcff 65%);
}
.ts-preview.small {
  min-height: 190px;
}
.ts-preview canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  background: #fff;
}
.ts-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #98a0b6;
}
.ts-preview-empty i {
  font-size: 30px;
  color: #c3c9dd;
}
.ts-preview-empty p {
  margin: 0;
  max-width: 220px;
  font-size: 11px;
  line-height: 1.55;
}
.ts-preview-note {
  margin: 10px 0 8px;
  font-size: 10.5px;
  color: #8a91a8;
}

/* ── Bulk door sheet (one class per A4 page, one PDF to download) ──
   The tick-list is gone — rows tick inside the door table — so only the
   compact count-and-download bar is styled here. */
.ts-bulk {
  margin: 0 20px 20px;
  padding: 14px 14px 12px;
  border: 1px solid #e8ebf5;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfbff, #fff);
}
.ts-bulk-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #f0f2f9;
}
.ts-bulk-count {
  font-size: 11px;
  font-weight: 700;
  color: #7b8299;
}
.ts-bulk-foot .btn {
  margin-left: auto;
}
@media (max-width: 560px) {
  .ts-bulk {
    margin: 0 16px 16px;
    padding: 12px 12px 10px;
  }
  .ts-bulk-foot .btn {
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }
  .ts-bulk-count {
    width: 100%;
    text-align: center;
  }
  .ts-bulk-foot {
    flex-wrap: wrap;
  }
}

/* ── Actions & helper text ── */
.ts-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 2px;
}
.ts-card .btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
}
.ts-card .btn-sm {
  padding: 8px 13px;
  font-size: 11px;
}
.ts-card .btn i {
  margin-right: 0 !important;
}
.ts-help {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
  color: #8a91a8;
}
.ts-help i {
  margin-top: 2px;
  color: #b9c0d4;
}
.ts-cut-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.ts-cut-row .ts-field {
  flex: 1 1 160px;
  max-width: 220px;
}

/* ── "How a scan is judged" ── */
.ts-rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.ts-rules li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fafbfe;
  border: 1px solid #eff1f8;
}
.ts-rules strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11.5px;
  font-weight: 800;
  color: #101828;
}
.ts-rules li > div > span {
  font-size: 11px;
  line-height: 1.5;
  color: #7b8299;
}
.ts-rule-ico {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  color: #fff;
}
.ts-rule-ico.door {
  background: linear-gradient(140deg, #4710eb, #0055ef);
}
.ts-rule-ico.gps {
  background: linear-gradient(140deg, #b45309, #f59e0b);
}
.ts-rule-ico.cut {
  background: linear-gradient(140deg, #9d174d, #f43f5e);
}

@media (max-width: 900px) {
  .ts-door-body,
  .ts-grid,
  .ts-rules {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .ts-grid3 {
    grid-template-columns: 1fr;
  }
  .ts-card-head {
    flex-wrap: wrap;
    padding: 16px 16px 13px;
  }
  .ts-body {
    padding: 14px 16px 16px;
  }
  .ts-steps {
    padding: 10px 16px;
  }
  .ts-tag {
    order: 3;
    margin-left: 54px;
  }
}

/* ══════════════════════════════════════════════════════════════════
   TEACHER ATTENDANCE → RECORDS
   Built on the .lc-* hero/tiles and the .dl-* filter/table system; this
   block only adds the person cell, class chips, the late dot and the
   scroll hint those two do not cover.
   ══════════════════════════════════════════════════════════════════ */
#teacherAttendanceTable tbody td,
#attendanceTable tbody td {
  font-size: 12px;
}
.tr-who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.tr-who-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tr-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #0f172a;
}
.tr-comment {
  font-size: 11px;
  color: #4710EB;
  cursor: pointer;
}
.tr-comment:hover {
  color: #0055EF;
}
.tr-late-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: #ef4444;
  vertical-align: middle;
}
.tr-class {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #4710EB;
  background: rgba(71, 16, 235, 0.08);
}
.tr-date {
  font-size: 11px;
  color: #475569;
  white-space: nowrap;
}
.tr-loading {
  padding: 26px 12px;
  text-align: center;
  font-size: 11px;
  color: #64748b;
}
.tr-loading i {
  margin-right: 6px;
  color: #4710EB;
}
.tr-scroll-hint {
  padding: 10px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
}
.tr-scroll-hint i {
  margin-right: 5px;
}
.tr-scroll-hint.done {
  color: #10b981;
}
@media (max-width: 720px) {
  .tr-class {
    display: none;
  }
  #teacherAttendanceTable tbody td,
  #attendanceTable tbody td {
    font-size: 11px;
  }
  .tr-date {
    font-size: 10px;
  }
}

/* The records printout is a separate sheet, so only the table needs a rule. */
@media print {
  #teacherAttendanceRecordsSubContent .lc-stats {
    display: none !important;
  }
  #teacherAttendanceRecordsSubContent .dl-table-wrap {
    box-shadow: none;
    border-color: #cbd5e1;
  }
  /* The student register prints the same way: chrome off, table on. */
  #attendanceRecordsSubContent .lc-stats,
  #attendanceRecordsSubContent .dl-filters,
  #attendanceRecordsSubContent .lc-controls,
  #attendancePaginationContainer {
    display: none !important;
  }
  #attendanceRecordsSubContent .dl-table-wrap {
    box-shadow: none;
    border-color: #cbd5e1;
  }
  #attendanceTable thead th {
    position: static;
    background: #eef1f7 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #attendanceTable tbody tr {
    page-break-inside: avoid;
  }
}

/* ══════════════════════════════════════════════════════════════════
   ADMISSION → APPLICATIONS · ENTRANCE EXAM · SETTINGS
   Built on the .lc-* hero/tiles, the .dl-* filter/table system and the
   .ts-* settings cards. This block only adds what those three do not
   cover: the selection bar, sortable/numeric table cells, the class
   cutoff grid and the rule-section stack.
   ══════════════════════════════════════════════════════════════════ */

/* Two extra tile tones for the exam summary (average / highest). */
.lc-stat.s-info {
  background: linear-gradient(135deg, #0e7490, #06b6d4);
}
.lc-stat.s-violet {
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
}

/* ── Selection bars (admission, staff applications, fee lists) ── */
.bulk-bar {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #dbe1ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
}
.bulk-bar-danger {
  border-color: #fecaca;
  background: #fff5f5;
}
.bulk-bar-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 800;
  color: #2a0a8f;
  white-space: nowrap;
}
.bulk-bar-count i {
  color: #4710eb;
}
.bulk-bar-danger .bulk-bar-count {
  color: #b91c1c;
}
.bulk-bar-danger .bulk-bar-count i {
  color: #dc2626;
}
.bulk-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.bulk-bar-actions .lc-btn {
  padding: 6px 11px;
  font-size: 11px;
  white-space: nowrap;
}
.bulk-bar-actions .lc-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Table cells: numeric columns and sortable headers ── */
.dl-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
th.dl-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th.dl-sort:hover {
  color: #4710eb;
}
th.dl-sort::after {
  content: '\2195';
  margin-left: 5px;
  font-size: 9px;
  opacity: 0.45;
}
th.dl-sort[data-dir='asc']::after {
  content: '\2191';
  opacity: 1;
  color: #4710eb;
}
th.dl-sort[data-dir='desc']::after {
  content: '\2193';
  opacity: 1;
  color: #4710eb;
}

/* ── Settings forms ── */
#admissionSettingsForm,
#staffAppSettingsForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.adm-readonly,
.ts-readonly {
  background: #f1f5f9 !important;
  color: #64748b !important;
  font-weight: 800;
  cursor: not-allowed;
}
.adm-save,
.ts-save {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 4px;
}

/* ── Class cutoff grid ── */
.adm-cut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.adm-cut {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 11px;
  border: 1px solid #eff1f8;
  border-radius: 11px;
  background: #fafbfe;
}
.adm-cut label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #64748b;
}
.adm-cut-in {
  display: flex;
  align-items: center;
  gap: 5px;
}
.adm-cut-in input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #101828;
  background: #fff;
  border: 1px solid #dbe1ee;
  border-radius: 8px;
}
.adm-cut-in input:focus {
  outline: none;
  border-color: #4710eb;
  box-shadow: 0 0 0 3px rgba(71, 16, 235, 0.14);
}
.adm-cut-in input.saved {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}
.adm-cut-in span {
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
}

/* ── Rule sections ── */
.adm-rules {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ts-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  align-self: flex-start;
  padding: 8px 14px;
  border: 1px dashed #c7d0e4;
  border-radius: 10px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  color: #4710eb;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ts-add:hover {
  border-color: #4710eb;
  background: #f7f5ff;
}

@media (max-width: 720px) {
  .bulk-bar {
    padding: 10px 12px;
  }
  .bulk-bar-count {
    font-size: 11px;
  }
  .adm-cut-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Admission and staff-application sheets print as registers: chrome off,
   rows kept whole. */
@media print {
  #admissionContent .lc-controls,
  #admissionContent .lc-stats,
  #admissionContent .dl-filters,
  #admissionContent .bulk-bar,
  #admissionContent .ts-steps,
  #admissionContent .tr-scroll-hint,
  #staffApplicationsContent .lc-controls,
  #staffApplicationsContent .lc-stats,
  #staffApplicationsContent .dl-filters,
  #staffApplicationsContent .bulk-bar,
  #staffApplicationsContent .ts-steps,
  #staffApplicationsContent .tr-scroll-hint {
    display: none !important;
  }
  #admissionContent .lc-hero,
  #staffApplicationsContent .lc-hero {
    background: #fff !important;
    box-shadow: none;
    padding: 0 0 10px;
  }
  #admissionContent .lc-title,
  #admissionContent .lc-sub,
  #admissionContent .lc-live,
  #staffApplicationsContent .lc-title,
  #staffApplicationsContent .lc-sub,
  #staffApplicationsContent .lc-live {
    color: #101828 !important;
  }
  #admissionContent .dl-table-wrap,
  #staffApplicationsContent .dl-table-wrap {
    box-shadow: none;
    border-color: #cbd5e1;
  }
  #admissionContent thead th,
  #staffApplicationsContent thead th {
    position: static;
    background: #eef1f7 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #admissionContent thead th.dl-sort::after,
  #staffApplicationsContent thead th.dl-sort::after {
    content: '';
  }
  #admissionContent tbody tr,
  #staffApplicationsContent tbody tr {
    page-break-inside: avoid;
  }
  #admissionContent .lc-pill,
  #staffApplicationsContent .lc-pill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ══════════════════════════════════════════════════════════════════
   ACADEMIC PERFORMANCE → ANALYTICS · RANKINGS · RESULTS · TRANSCRIPTS · APPROVAL
   Built on the .lc-* hero/tiles and the .dl-* filter/table system. This
   block only adds the grade badge, the average bar, the subject board
   row, the chart card chrome and the promotion controls.
   ══════════════════════════════════════════════════════════════════ */

/* ── Release queue: the status chips that decide what the table shows ──
   Four pills, one on at a time, each carrying its own count, so the school can
   see how much of the term is still awaiting a decision without reading rows. */
.apr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.apr-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.apr-chip i {
  font-size: 10px;
  opacity: 0.75;
}
.apr-chip:hover {
  border-color: #4710EB;
  color: #2a0a8f;
}
.apr-chip.is-on {
  border-color: #4710EB;
  background: #f6f2ff;
  color: #2a0a8f;
}
.apr-chip.is-on i {
  opacity: 1;
}
.apr-chip-count {
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.apr-chip.is-on .apr-chip-count {
  background: #fff;
  color: #4710EB;
}

/* ── Release queue: the two bulk decisions on the selection bar ── */
.bulk-release-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.bulk-release-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}
.bulk-release-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.bulk-release-btn.approve {
  background: linear-gradient(135deg, #0f9d58, #10b981);
}
.bulk-release-btn.revoke {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

/* ── Release queue: how far a subject's components have gone ──
   Four ticks, lit in order, so "CA1 + CA2 out, Exam not" reads at a glance. */
.apr-parts {
  display: inline-flex;
  gap: 3px;
}
.apr-part {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e2e8f0;
}
.apr-part.is-on {
  background: #10b981;
}
.apr-part.is-off {
  background: #cbd5e1;
}

/* Approved mark on the subject column: a row whose exam-type is already
   released carries this badge next to the subject name, so "out to parents"
   reads without hunting for the status pill at the far end of the row. */
.rel-subject {
  white-space: normal;
}
.rel-approved-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f9d58;
  font-size: 10.5px;
  font-weight: 700;
  vertical-align: middle;
  white-space: nowrap;
}
.rel-approved-mark i {
  font-size: 11px;
}

/* Result Management (score registry): a released subject carries the same
   at-a-glance mark as the release queue. Green when every marked component is
   released, amber when the subject is only part out. */
.sr-subject {
  white-space: normal;
}
.sr-release-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f9d58;
  font-size: 10.5px;
  font-weight: 700;
  vertical-align: middle;
  white-space: nowrap;
}
.sr-release-mark.is-partial {
  background: #fffbeb;
  color: #b45309;
}
.sr-release-mark i {
  font-size: 11px;
}

/* ── Release queue: how much of the period is actually signed off ──
   Two meters — subjects, then components. "3 of 5 subjects released" is the
   number a head reports; the component count underneath is the work that
   produced it. A subject only reads complete when every marked component is
   released, so the bar never claims a finished term that still hasholds. */
.apr-progress {
  display: grid;
  gap: 14px;
  margin: 2px 0 4px;
  padding: 15px 18px;
  border: 1px solid #e8e6fb;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfaff, #ffffff);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.apr-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.apr-progress-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #1e1b4b;
  letter-spacing: 0.3px;
}
.apr-progress-title i {
  color: #4710EB;
  margin-right: 6px;
  font-size: 11px;
}
.apr-progress-sub {
  font-size: 11.5px;
  font-weight: 800;
  color: #2a0a8f;
  font-variant-numeric: tabular-nums;
}
.apr-meters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 24px;
}
.apr-meter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.apr-meter-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #64748b;
}
.apr-meter-label i {
  margin-right: 5px;
  opacity: 0.7;
}
.apr-meter-fig {
  font-size: 11.5px;
  font-weight: 800;
  color: #334155;
  font-variant-numeric: tabular-nums;
}
.apr-meter-of {
  color: #94a3b8;
  font-weight: 700;
}
.apr-meter-track {
  height: 8px;
  border-radius: 999px;
  background: #eef2f6;
  overflow: hidden;
}
.apr-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: #94a3b8;
  transition: width 0.35s ease;
}
.apr-meter.is-partial .apr-meter-fill {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.apr-meter.is-partial .apr-meter-fig {
  color: #b45309;
}
.apr-meter.is-done .apr-meter-fill {
  background: linear-gradient(90deg, #0f9d58, #10b981);
}
.apr-meter.is-done .apr-meter-fig {
  color: #047857;
}
.apr-meter.is-none .apr-meter-fill {
  background: #e2e8f0;
}

/* ── Release queue: the live bar while a bulk decision is saving ──
   A whole-class or whole-term release spans several POST batches, so the bar
   advances as each one lands rather than leaving only a spinning word. */
.apr-busy {
  display: grid;
  gap: 7px;
  margin: 2px 0 4px;
  padding: 13px 16px;
  border: 1px solid #e8e6fb;
  border-radius: 13px;
  background: linear-gradient(180deg, #f6f2ff, #ffffff);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.apr-busy-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.apr-busy-label {
  font-size: 11.5px;
  font-weight: 800;
  color: #2a0a8f;
}
.apr-busy-label i {
  color: #4710EB;
  margin-right: 7px;
}
.apr-busy-fig {
  font-size: 12px;
  font-weight: 800;
  color: #4710EB;
  font-variant-numeric: tabular-nums;
}
.apr-busy-track {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: #e9e3ff;
  overflow: hidden;
}
.apr-busy-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4710EB, #7c3aed);
  /* Deliberately no long glide: the bar snaps to each batch's real percentage, so
     a still bar means nothing has saved yet rather than a faked 0 to 100 sweep. */
  transition: width 0.12s steps(6, end);
}

/* ── Release queue: per-row Approve / Revoke, the irrelevant one disabled ──
   An Approved row can only be revoked, so its Approve button is greyed; a row
   that has never been released has nothing to revoke, so its Revoke is greyed. */
.release-actions {
  text-align: right;
  white-space: nowrap;
}
.release-actions .rel-ico {
  padding: 5px 9px;
  font-size: 11px;
  margin-right: 6px;
}
.rel-act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.rel-act + .rel-act {
  margin-left: 6px;
}
.rel-act:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}
.rel-act.approve {
  background: linear-gradient(135deg, #0f9d58, #10b981);
}
.rel-act.revoke {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}
.rel-act:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ── Grade badge (letter grade, tinted from the grade colour) ── */
.pf-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 3px 9px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.3px;
  line-height: 1.5;
  border: 0;
}

/* ── Average bar (rankings + subject board) ── */
.pf-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 150px;
}
.pf-bar-track {
  flex: 1;
  height: 6px;
  min-width: 60px;
  border-radius: 999px;
  background: #eef1f7;
  overflow: hidden;
}
.pf-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}
.pf-bar-val {
  min-width: 48px;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ── Performance band chip ── */
.pf-band {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.pf-band.b-excel {
  color: #065f46;
  background: rgba(16, 185, 129, 0.14);
}
.pf-band.b-good {
  color: #4710eb;
  background: rgba(71, 16, 235, 0.12);
}
.pf-band.b-fair {
  color: #b45309;
  background: rgba(245, 158, 11, 0.16);
}
.pf-band.b-weak {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.14);
}

/* ── Chart card: .chart-container keeps its own sizing contract, this only
      gives it the same skin as the table wraps around it. ── */
#performanceContent .pf-chart {
  padding: 16px 18px 10px;
  margin: 0;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eef1f7;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}
#performanceContent .pf-chart:hover {
  transform: none;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}
.pf-chart-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.pf-chart-title {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}
.pf-chart-sub {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #94a3b8;
}

/* ── Promotion controls (Third Term only) ── */
.pf-promo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.pf-promo-row:empty {
  display: none;
}
.pf-lab {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #92400e;
  white-space: nowrap;
}
.pf-cut-in {
  width: 62px;
  padding: 4px 6px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  color: #101828;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
}
.pf-cut-in:focus {
  border-color: #f57c00;
  box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.16);
}
.pf-promo-btn {
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #f57c00, #fb8c00);
  box-shadow: 0 6px 16px rgba(245, 124, 0, 0.28);
  cursor: pointer;
}
.pf-promo-btn:hover {
  transform: translateY(-1px);
}

/* ── Row action buttons (rankings) ── */
.pf-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pf-act:hover {
  border-color: rgba(71, 16, 235, 0.45);
  color: #4710eb;
  background: #f7f5ff;
}
.pf-act.warn:hover {
  border-color: rgba(245, 124, 0, 0.5);
  color: #f57c00;
  background: #fff7ed;
}
.pf-acts {
  display: inline-flex;
  gap: 5px;
  justify-content: center;
}

@media (max-width: 720px) {
  .pf-bar {
    min-width: 0;
  }
  .pf-bar-track {
    min-width: 40px;
  }
  .pf-chart-title {
    font-size: 12px;
  }
}

/* The academic sheets print as registers: chrome off, rows kept whole. */
@media print {
  #performanceContent .sub-tab-nav,
  #performanceContent .lc-controls,
  #performanceContent .lc-stats,
  #performanceContent .dl-filters,
  #performanceContent .bulk-bar,
  #performanceContent .tr-scroll-hint,
  #performanceContent .pf-chart,
  #performanceContent .dl-pager {
    display: none !important;
  }
  #performanceContent .lc-hero {
    background: #fff !important;
    box-shadow: none;
    padding: 0 0 10px;
  }
  #performanceContent .lc-title,
  #performanceContent .lc-sub,
  #performanceContent .lc-live {
    color: #101828 !important;
  }
  #performanceContent .dl-table-wrap {
    box-shadow: none;
    border-color: #cbd5e1;
  }
  #performanceContent thead th {
    position: static;
    background: #eef1f7 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #performanceContent thead th.dl-sort::after {
    content: '';
  }
  #performanceContent tbody tr {
    page-break-inside: avoid;
  }
  #performanceContent .lc-pill,
  #performanceContent .pf-grade,
  #performanceContent .pf-band,
  #performanceContent .pf-bar-fill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ══════════════════════════════════════════════════════════════════
   SUBJECT REGISTRY → CATALOG CARDS
   Built on the .lc-* hero and the .ts-card shell; this block only adds
   the catalog card, the delivery figures, the drift callout and the
   filter toggle the two panels need.
   ══════════════════════════════════════════════════════════════════ */

/* Two cards a row on a desk; one on a phone. */
.sj-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.sj-card {
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.sj-card:hover {
  box-shadow: 0 14px 32px rgba(16, 24, 56, 0.1);
  transform: translateY(-1px);
}
.sj-card.is-archived {
  opacity: 0.72;
}
.sj-card.is-archived:hover {
  transform: none;
}

.sj-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 10px;
}
.sj-code {
  flex: 0 0 auto;
  min-width: 44px;
  height: 44px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(71, 16, 235, 0.08);
  color: #4710eb;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.sj-id {
  flex: 1;
  min-width: 0;
}
.sj-name {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.1px;
  color: #101828;
}
.sj-alias {
  margin: 4px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: #94a3b8;
}
.sj-alias.is-empty {
  color: #cbd5e1;
}
.sj-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #64748b;
  background: #f1f5f9;
}
.sj-flag.lock {
  color: #92400e;
  background: #fef3c7;
}
.sj-flag.warn {
  color: #b45309;
  background: #fef3c7;
}

/* An unregistered name is not a registry row yet: amber question mark, no
   classification tags, one figure worth knowing (how many records use it). */
.sj-card.is-unmapped .sj-code {
  background: #fef3c7;
  color: #b45309;
}
.sj-card.is-unmapped .sj-alias {
  color: #b45309;
}
.sj-meta.is-single {
  grid-template-columns: minmax(0, 1fr);
}

/* Classification tags: level, department, type, then the legacy spellings. */
.sj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 18px 12px;
}
.sj-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  white-space: nowrap;
}
.sj-tag.lv {
  color: #6d28d9;
  background: #ede9fe;
}
.sj-tag.dep {
  color: #0369a1;
  background: #e0f2fe;
}
.sj-tag.type {
  color: #b45309;
  background: #fef3c7;
}
/* Which streams may offer the subject. Absent tag means every stream, which is
   the common case and would otherwise clutter every card. */
.sj-tag.stream {
  color: #0f766e;
  background: #ccfbf1;
}
.sj-tag.comp {
  color: #9f1239;
  background: #ffe4e6;
  font-weight: 700;
}
.sj-tag.alias {
  color: #475569;
  background: #f1f5f9;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

/* Delivery figures: who teaches it, where it sits, how much history it holds. */
.sj-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: auto;
  border-top: 1px solid #f0f2f9;
  background: #fbfbfe;
}
.sj-meta-item {
  padding: 10px 16px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #94a3b8;
}
.sj-meta-item + .sj-meta-item {
  border-left: 1px solid #f0f2f9;
}
.sj-meta-item b {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
  color: #101828;
}
.sj-meta-item b i {
  margin-right: 5px;
  font-size: 10px;
  color: #94a3b8;
}
.sj-meta-item.is-empty b {
  color: #94a3b8;
}

.sj-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid #f0f2f9;
}
.sj-avs {
  display: flex;
  align-items: center;
  min-width: 0;
}
.sj-av {
  width: 24px;
  height: 24px;
  margin-left: -7px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #4710eb, #7c5cf0);
  color: #fff;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.sj-av:first-child {
  margin-left: 0;
}
.sj-av.more {
  background: #fff;
  color: #475569;
  border-color: #e2e8f0;
}
.sj-avs-empty {
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
}
.sj-acts {
  display: inline-flex;
  gap: 6px;
  flex: 0 0 auto;
}
.sj-acts .lc-btn {
  padding: 5px 10px;
  font-size: 11px;
}
/* .lc-btn.ghost is the hero's white-on-purple skin, so it is invisible once it
   sits on a white card. Inside a card (and the amber drift callout) a ghost
   button has to be an outlined button again. */
.sj-acts .lc-btn.ghost,
.sj-drift-acts .lc-btn.ghost {
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}
.sj-acts .lc-btn.ghost:hover,
.sj-drift-acts .lc-btn.ghost:hover {
  color: #4710eb;
  background: #f7f5ff;
  border-color: rgba(71, 16, 235, 0.45);
}
/* The one action the card exists for. */
.sj-acts .lc-btn.primary {
  color: #fff;
  background: linear-gradient(135deg, #4710eb, #6a3df0);
  border: 1px solid transparent;
  box-shadow: 0 6px 14px rgba(71, 16, 235, 0.22);
}
.sj-acts .lc-btn.primary:hover {
  background: linear-gradient(135deg, #3b0dc4, #5a2fe6);
}
.sj-acts .lc-btn.danger {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}
.sj-acts .lc-btn.success {
  color: #15803d;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

/* Empty / loading / error panel shared by both sub-tabs. */
.sj-state {
  grid-column: 1 / -1;
  padding: 40px 24px;
  text-align: center;
  border: 1px dashed #d8dded;
  border-radius: 16px;
  background: #fbfbfe;
  font-size: 12px;
  color: #64748b;
}
.sj-state i {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  color: #cbd5e1;
}
.sj-state strong {
  color: #334155;
}
.sj-state.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}
.sj-state.is-error i {
  color: #f87171;
}
.sj-state.is-clear {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}
.sj-state.is-clear i {
  color: #34d399;
}
.sj-state.is-clear strong {
  color: #15803d;
}

.sj-note {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.6;
  color: #64748b;
}

/* "Show archived" is a switch, not another select. */
.sj-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  user-select: none;
}
.sj-toggle input {
  accent-color: #4710eb;
  cursor: pointer;
}
.sj-toggle:hover {
  border-color: rgba(71, 16, 235, 0.35);
  color: #4710eb;
}

/* Count pill inside the unregistered-names tab. */
.sj-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 10px;
  font-weight: 800;
}

/* Drift callout: same amber language as the other review banners. */
.sj-drift {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #fde68a;
  border-radius: 14px;
  background: #fffbeb;
}
.sj-drift-ico {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fef3c7;
  color: #d97706;
}
.sj-drift-text {
  flex: 1;
  min-width: 0;
}
.sj-drift-title {
  font-size: 13px;
  font-weight: 800;
  color: #92400e;
}
.sj-drift-detail {
  margin-top: 2px;
  font-size: 11.5px;
  color: #b45309;
}
.sj-drift-acts {
  display: inline-flex;
  gap: 8px;
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  .sj-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .sj-meta {
    grid-template-columns: 1fr;
  }
  .sj-meta-item + .sj-meta-item {
    border-left: 0;
    border-top: 1px solid #f0f2f9;
  }
  .sj-foot {
    flex-wrap: wrap;
  }
  .sj-drift {
    flex-wrap: wrap;
  }
  .sj-drift-acts {
    margin-left: auto;
  }
}

/* The catalog prints as a card sheet: chrome off, cards kept whole. */
@media print {
  #subjectsContent .lc-controls,
  #subjectsContent .dl-filters,
  #subjectsContent .sub-tab-nav,
  #subjectsContent .sj-drift,
  #subjectsContent .sj-acts,
  #subjectsContent .tr-scroll-hint {
    display: none !important;
  }
  #subjectsContent .lc-hero {
    background: #fff !important;
    box-shadow: none;
    padding: 0 0 10px;
  }
  #subjectsContent .lc-title,
  #subjectsContent .lc-sub,
  #subjectsContent .lc-live {
    color: #101828 !important;
  }
  #subjectsContent .sj-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  #subjectsContent .ts-card {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
    border-color: #cbd5e1;
  }
  #subjectsContent .ts-card::before {
    display: none;
  }
  #subjectsContent .sj-tag,
  #subjectsContent .sj-flag,
  #subjectsContent .sj-code {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   Fee Management — payment register, debtors, price list, revenue, payroll
   ══════════════════════════════════════════════════════════════════════════ */

/* The period line under the hero: which session/term the numbers describe. */
.fm-scope {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

/* ── Total chips (payroll run summary) ── */
.fm-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.fm-chip {
  flex: 1 1 150px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e9edf5;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.fm-chip-lab {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #64748b;
}
.fm-chip-val {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fm-chip-note {
  margin-top: 3px;
  font-size: 9.5px;
  font-weight: 600;
  color: #94a3b8;
}
/* Money direction is the one thing a run summary must shout about. */
.fm-chip-val.is-credit {
  color: #047857;
}
.fm-chip-val.is-debit {
  color: #b91c1c;
}
.fm-chip-val.is-net {
  color: #4710eb;
}

/* ── "Showing N of M" line under a table ── */
.fm-count {
  padding: 10px 4px 0;
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.fm-count.done {
  color: #047857;
}

/* ── Inline note / callout under a filter bar ── */
.fm-note {
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.55;
  color: #78350f;
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.fm-note i {
  margin-right: 5px;
}

/* ── Chart frame (revenue trends) ── */
.fm-chart {
  border-radius: 18px;
  overflow: hidden;
}
.fm-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.fm-chart-title {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}
.fm-chart-sub {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
}

/* ── Inline checkbox row (payroll "show inactive") ── */
.fm-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
}
.fm-check input {
  accent-color: #4710eb;
  width: 13px;
  height: 13px;
  cursor: pointer;
}

/* ── Payment status / debtor state pills ── */
.fm-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.fm-pill.p-paid {
  color: #065f46;
  background: rgba(16, 185, 129, 0.14);
}
.fm-pill.p-pending {
  color: #b45309;
  background: rgba(245, 158, 11, 0.16);
}
.fm-pill.p-overdue {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.14);
}
.fm-pill.p-cleared {
  color: #065f46;
  background: rgba(16, 185, 129, 0.14);
}
.fm-pill.p-partial {
  color: #4710eb;
  background: rgba(71, 16, 235, 0.1);
}
.fm-pill.p-unpaid {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}
/* Fee type: the price list is the only screen that shows mandatory vs optional,
   and the grey keeps "optional" quiet next to a green "mandatory". */
.fm-pill.p-mand {
  color: #065f46;
  background: rgba(16, 185, 129, 0.14);
}
.fm-pill.p-opt {
  color: #64748b;
  background: #f1f5f9;
}

/* ── Fee deadline chip ── */
.fm-due {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.3;
}
.fm-due b {
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}
.fm-due small {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.fm-due.is-soon small {
  color: #b45309;
}
.fm-due.is-late b,
.fm-due.is-late small {
  color: #b91c1c;
}
.fm-due.is-open small,
.fm-due.is-none small,
.fm-due.is-none b {
  color: #94a3b8;
}

/* ── Paid-share bar (debtors) ── */
.fm-share {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}
.fm-share-track {
  flex: 1;
  height: 6px;
  min-width: 54px;
  border-radius: 999px;
  background: #eef1f7;
  overflow: hidden;
}
.fm-share-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f9d58, #10b981);
}
.fm-share-fill.is-low {
  background: linear-gradient(135deg, #c0392b, #ef4444);
}
.fm-share-fill.is-mid {
  background: linear-gradient(135deg, #e67e22, #f59e0b);
}
.fm-share-val {
  min-width: 34px;
  font-size: 10.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #475569;
}
/* The state pill sits under the bar it explains, not beside it. */
.fm-share + .fm-pill {
  margin-top: 5px;
}

/* Payroll: a deactivated staffer's row is present but visibly set back. */
table.dl-table tr.is-inactive {
  background: #fafafa;
}

/* ── Money cells ── */
.fm-money {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
  color: #0f172a;
}
.fm-money.is-owed {
  color: #b91c1c;
  font-weight: 800;
}
.fm-ref {
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-size: 10.5px;
  color: #475569;
  white-space: nowrap;
}

/* ── Row actions ── */
.fm-acts {
  display: inline-flex;
  gap: 5px;
  justify-content: flex-end;
}
.fm-acts .lc-btn {
  padding: 5px 10px;
  font-size: 11px;
}
/* .lc-btn is white-on-purple for the hero; on a table row it has to be an
   outlined button or it disappears — the same trap the subject cards had. */
.fm-acts .lc-btn.ghost {
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}
.fm-acts .lc-btn.ghost:hover {
  color: #4710eb;
  background: #f7f5ff;
  border-color: rgba(71, 16, 235, 0.45);
}

/* ── Empty / loading row ── */
table.dl-table td.fm-empty {
  padding: 34px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 11.5px;
}
table.dl-table td.fm-empty i {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  color: #cbd5e1;
}

/* Payroll closed banner */
#payrollClosedBanner {
  padding: 11px 14px;
  border-radius: 13px;
  font-size: 11.5px;
  line-height: 1.55;
  color: #78350f;
  background: #fffbeb;
  border: 1px solid #fde68a;
}
#payrollClosedBanner i {
  margin-right: 4px;
}
#payrollClosedBanner .btn {
  vertical-align: middle;
}

@media (max-width: 720px) {
  #feesContent .lc-stat-val {
    font-size: 18px;
  }
  .fm-chip {
    flex-basis: 100%;
  }
  .fm-share {
    min-width: 80px;
  }
}

/* The fee sheets print as registers: chrome off, rows whole, pills kept. */
@media print {
  #feesContent .sub-tab-nav,
  #feesContent .lc-controls,
  #feesContent .lc-stats,
  #feesContent .dl-filters,
  #feesContent .fm-count,
  #feesContent .fm-note,
  #feesContent .fm-chart,
  #feesContent .fm-acts {
    display: none !important;
  }
  #feesContent .lc-hero {
    background: #fff !important;
    box-shadow: none;
    padding: 0 0 10px;
    border-radius: 0;
  }
  #feesContent .lc-hero::before,
  #feesContent .lc-hero::after {
    display: none;
  }
  #feesContent .lc-title,
  #feesContent .lc-sub,
  #feesContent .lc-live,
  #feesContent .lc-meta-chip {
    color: #101828 !important;
    background: none !important;
    border-color: #cbd5e1 !important;
  }
  #feesContent .dl-table-wrap {
    box-shadow: none;
    border-color: #cbd5e1;
  }
  #feesContent thead th {
    position: static;
    background: #eef1f7 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #feesContent thead th.dl-sort::after {
    content: '';
  }
  #feesContent tbody tr {
    page-break-inside: avoid;
  }
  #feesContent .fm-pill,
  #feesContent .fm-share-fill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* --------------------------------------------------------------------------
   People (Teachers / Students / Parents)
   The three registers share one vocabulary: a status pill, a person cell
   (avatar + two lines), a segmented filter and the scroll sentinel.
   -------------------------------------------------------------------------- */

/* Count badge inside the Active / Inactive / Deleted tabs. */
.pp-tab-count {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  color: #475569;
  background: #eef1f7;
  font-variant-numeric: tabular-nums;
}
.pp-tab-count.is-on {
  color: #065f46;
  background: rgba(16, 185, 129, 0.16);
}
.pp-tab-count.is-danger {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.14);
}

/* -- Residence segmented control (All / Day / Boarder) -- */
.pp-seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 10px;
  background: #eef1f7;
}
.pp-seg-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.pp-seg-btn:hover {
  color: #334155;
}
.pp-seg-btn.is-on {
  background: #fff;
  color: #2a0a8f;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

/* -- Status pills -- */
.pp-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.pp-pill.is-active {
  color: #065f46;
  background: rgba(16, 185, 129, 0.14);
}
.pp-pill.is-inactive {
  color: #b45309;
  background: rgba(245, 158, 11, 0.16);
}
.pp-pill.is-deleted {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}
.pp-pill.is-graduated {
  color: #0369a1;
  background: rgba(14, 165, 233, 0.14);
}
.pp-pill.is-left {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}
.pp-pill.is-approved {
  color: #065f46;
  background: rgba(16, 185, 129, 0.14);
}
.pp-pill.is-pending {
  color: #b45309;
  background: rgba(245, 158, 11, 0.16);
}
.pp-pill.is-rejected {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}
.pp-pill.is-boarder {
  color: #5b21b6;
  background: rgba(139, 92, 246, 0.14);
}
.pp-pill.is-day {
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
}
.pp-pill.is-plain {
  color: #64748b;
  background: #f1f5f9;
}
/* A guardian whose every linked pupil has left keeps the portal shut -- that
   is a different, louder state than "Rejected", so it gets its own tone. */
.pp-pill.is-blocked {
  color: #7f1d1d;
  background: rgba(220, 38, 38, 0.2);
}

/* -- Person cell: avatar, name, one quiet line underneath -- */
.pp-who {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.pp-av {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef1f7;
  color: #475569;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.pp-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pp-name {
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-sub {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-mono {
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
}

/* Role / subject tags. Deliberately quieter than a status pill: they are
   descriptive, not a state the admin acts on. */
.pp-tag {
  display: inline-block;
  padding: 2px 7px;
  margin: 1px 3px 1px 0;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 700;
  color: #334155;
  background: #f1f5f9;
  white-space: nowrap;
}
.pp-tag.is-subject {
  color: #4710eb;
  background: rgba(71, 16, 235, 0.08);
}

/* -- Row actions -- */
.pp-acts {
  display: inline-flex;
  gap: 5px;
  justify-content: flex-end;
  align-items: center;
}
.pp-acts .lc-btn {
  padding: 5px 9px;
  font-size: 11px;
}
/* Same trap the subject cards and the fee tables hit: .lc-btn is white on
   purple for the hero, and vanishes on a white row. */
.pp-acts .lc-btn.ghost {
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}
.pp-acts .lc-btn.ghost:hover {
  color: #4710eb;
  background: #f7f5ff;
  border-color: rgba(71, 16, 235, 0.45);
}
.pp-acts .lc-btn.ghost.is-danger {
  color: #b91c1c;
}
.pp-acts .lc-btn.ghost.is-danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
}

/* -- Empty row -- */
table.dl-table td.pp-empty {
  padding: 34px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 11.5px;
}
table.dl-table td.pp-empty i {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  color: #cbd5e1;
}

/* -- Infinite-scroll sentinel -- */
.pp-sentinel {
  padding: 18px 0 4px;
  text-align: center;
}
.pp-sentinel p {
  margin: 6px 0 0;
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.2px;
}
.pp-spinner {
  width: 22px;
  height: 22px;
  margin: 0 auto;
  border: 2.5px solid #e2e8f0;
  border-top-color: #4710eb;
  border-radius: 50%;
  display: inline-block;
  animation: teacherSpinnerRotate 0.8s linear infinite;
}
/* Both keyframes live here now that the markup no longer carries inline
   style blocks; the loading rows still reference them by name. */
@keyframes teacherSpinnerRotate {
  to {
    transform: rotate(360deg);
  }
}
@keyframes studentSpinnerRotate {
  to {
    transform: rotate(360deg);
  }
}

/* -- Filter fields that hold a .search-box -- */
.dl-field .search-box {
  width: 100%;
}
.dl-field .search-box input {
  padding: 8px 10px 8px 30px;
  font-size: 11.5px;
}
.dl-field .search-box i {
  font-size: 11px;
}

/* A deactivated or deleted person is present but visibly set back. */
table.dl-table tr.is-muted {
  background: #fafafa;
}
table.dl-table tr.is-muted .pp-name {
  color: #64748b;
}

@media (max-width: 720px) {
  #teachersContent .lc-stat-val,
  #studentsContent .lc-stat-val,
  #parentsContent .lc-stat-val {
    font-size: 18px;
  }
  .pp-seg {
    width: 100%;
  }
  .pp-seg-btn {
    flex: 1;
  }
}

/* The three registers print as lists: chrome off, one row per person, and the
   status pills kept so a printed page still says who is active. */
@media print {
  #teachersContent .sub-tab-nav,
  #teachersContent .lc-controls,
  #teachersContent .lc-stats,
  #teachersContent .dl-filters,
  #studentsContent .lc-controls,
  #studentsContent .lc-stats,
  #studentsContent .dl-filters,
  #parentsContent .lc-controls,
  #parentsContent .lc-stats,
  #parentsContent .dl-filters,
  #parentsContent .sub-tab-nav,
  #parentsContent .bulk-actions-toolbar,
  #teachersContent .pp-acts,
  #studentsContent .pp-acts,
  #parentsContent .pp-acts,
  #teachersContent .pp-sentinel,
  #studentsContent .pp-sentinel {
    display: none !important;
  }
  #teachersContent .lc-hero,
  #studentsContent .lc-hero,
  #parentsContent .lc-hero {
    background: #fff !important;
    box-shadow: none;
    padding: 0 0 10px;
    border-radius: 0;
  }
  #teachersContent .lc-hero::before,
  #teachersContent .lc-hero::after,
  #studentsContent .lc-hero::before,
  #studentsContent .lc-hero::after,
  #parentsContent .lc-hero::before,
  #parentsContent .lc-hero::after {
    display: none;
  }
  #teachersContent .lc-title,
  #teachersContent .lc-sub,
  #teachersContent .lc-live,
  #teachersContent .lc-meta-chip,
  #studentsContent .lc-title,
  #studentsContent .lc-sub,
  #studentsContent .lc-live,
  #studentsContent .lc-meta-chip,
  #parentsContent .lc-title,
  #parentsContent .lc-sub,
  #parentsContent .lc-live,
  #parentsContent .lc-meta-chip {
    color: #101828 !important;
    background: none !important;
    border-color: #cbd5e1 !important;
  }
  #teachersContent .dl-table-wrap,
  #studentsContent .dl-table-wrap,
  #parentsContent .dl-table-wrap {
    box-shadow: none;
    border-color: #cbd5e1;
  }
  #teachersContent thead th,
  #studentsContent thead th,
  #parentsContent thead th {
    position: static;
    background: #eef1f7 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #teachersContent thead th.dl-sort::after,
  #studentsContent thead th.dl-sort::after,
  #parentsContent thead th.dl-sort::after {
    content: '';
  }
  #teachersContent tbody tr,
  #studentsContent tbody tr,
  #parentsContent tbody tr {
    page-break-inside: avoid;
  }
  #teachersContent .pp-pill,
  #studentsContent .pp-pill,
  #parentsContent .pp-pill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* -- Bulk selection bar ------------------------------------------------------
   The bar is a white surface like a table row, so the hero's white-on-purple
   .lc-btn has to be re-skinned here too. Shared by every register that grows a
   selection bar (People today, Operations and Tools next). */
.bulk-actions-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bulk-actions-btns .lc-btn {
  padding: 6px 11px;
  font-size: 11px;
}
.bulk-actions-btns .lc-btn.ghost {
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}
.bulk-actions-btns .lc-btn.ghost:hover {
  color: #4710eb;
  background: #f7f5ff;
  border-color: rgba(71, 16, 235, 0.45);
}
.bulk-actions-btns .lc-btn.ghost.is-danger {
  color: #b91c1c;
}
.bulk-actions-btns .lc-btn.ghost.is-danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
}
.bulk-actions-btns .lc-btn.ghost.is-success {
  color: #15803d;
}
.bulk-actions-btns .lc-btn.ghost.is-success:hover {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

/* -- Hostel: the Operations registry ----------------------------------------
   Resumption and vacation are one table sliced by a tab; home leave and exeats
   are two card panels beside it. The hero, the tiles and the filter bar come
   from the shared .lc-* and .dl-* systems, so only what is peculiar to the boarding
   house lives here. */
#hostelContent .sub-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#hostelContent .sub-tab-btn > i {
  font-size: 10.5px;
  opacity: 0.75;
}
/* A tab badge counts the work still in the tab, so a live one stays loud while
   the tab is inactive. */
#hostelContent .pp-tab-count {
  min-width: 20px;
  text-align: center;
}

/* -- The home leave and exeats panels -- */
.hs-panel-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #eef1f7;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}
.hs-panel-copy {
  flex: 1 1 260px;
  min-width: 0;
}
.hs-panel-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: #0f172a;
}
.hs-panel-sub {
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: #64748b;
}
.hs-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
/* Same trap every white surface hits: .lc-btn is white on purple for the hero
   and disappears beside a panel title. */
.hs-panel-actions .lc-btn.ghost {
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}
.hs-panel-actions .lc-btn.ghost:hover {
  color: #4710eb;
  background: #f7f5ff;
  border-color: rgba(71, 16, 235, 0.45);
}
.hs-panel-actions .form-control {
  width: auto;
  min-width: 170px;
  font-size: 11px;
  padding: 7px 9px;
}
.hs-panel-actions .search-box {
  width: 230px;
}
.hs-panel-actions .search-box input {
  padding: 8px 10px 8px 30px;
  font-size: 11.5px;
}
.hs-panel-actions .search-box i {
  font-size: 11px;
}

/* Loading and failure states for the two card lists. */
.hs-list-state {
  padding: 34px 18px;
  text-align: center;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 600;
}
.hs-list-state p {
  margin: 8px 0 0;
}
.hs-list-state.is-error {
  color: #b91c1c;
}
.hs-list-state.is-error i {
  font-size: 20px;
  opacity: 0.6;
}

/* The boarders directory reads like the registers: person first, then class. */
#hostelBoardersList .hostel-dir-row .pp-who {
  flex: 1 1 auto;
}

/* The registry's own columns: the tick and the row actions stay narrow, and the
   action cell keeps its buttons against the right edge. */
#hostelTable .hostel-select-header {
  width: 34px;
}
#hostelTable .hostel-action-header {
  text-align: right;
}

@media (max-width: 720px) {
  #hostelContent .lc-stat-val {
    font-size: 18px;
  }
  .hs-panel-actions {
    width: 100%;
  }
  .hs-panel-actions .search-box {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* -- Ghost buttons on a white surface ---------------------------------------
   .lc-btn.ghost is the hero's white-on-translucent skin. A filter bar is a
   white card, so a ghost button dropped into one has to be re-inked or it
   disappears into the surface entirely. Shared by every .dl-filters bar. */
.dl-actions .lc-btn.ghost {
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}
.dl-actions .lc-btn.ghost:hover {
  color: #4710eb;
  background: #f7f5ff;
  border-color: rgba(71, 16, 235, 0.45);
}

/* -- Library: the Operations archive ----------------------------------------
   One register over every borrow and every study session, read through the
   shared .lc-* and .dl-* systems. What is peculiar to the library is the book
   column, the issue/return chain under the status pill, the three tiles that
   double as shortcuts, and the two catalogue dialogs. */

/* The tiles are this section's shortcuts, so a clickable tile keeps the tile's
   own look and sheds the chrome a <button> brings with it. */
.lc-stat.is-clickable {
  display: block;
  width: 100%;
  font: inherit;
  text-align: left;
  border: 0;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}
.lc-stat.is-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
  filter: saturate(1.08);
}
.lc-stat.is-clickable:active {
  transform: translateY(0);
}
.lc-stat.is-clickable:focus-visible {
  outline: 3px solid rgba(71, 16, 235, 0.45);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .lc-stat.is-clickable,
  .lc-stat.is-clickable:hover {
    transition: none;
    transform: none;
  }
}

/* The title is the only variable-length text in the row, so it wraps instead
   of pushing the status column off the edge. */
.lib-title {
  display: block;
  max-width: 260px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
}

/* Who issued the book and who took it back, read under the status pill. */
.lib-chain {
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.35;
  color: #94a3b8;
}
.lib-chain i {
  margin-right: 4px;
  opacity: 0.7;
}

/* "Load more" sits on the page rather than in the hero, so its ghost button is
   re-inked the way the filter bar's Clear button is. */
#lib-archive-load-more {
  margin-top: 12px;
  text-align: center;
}
#lib-archive-load-more .lc-btn.ghost {
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}
#lib-archive-load-more .lc-btn.ghost:hover {
  color: #4710eb;
  background: #f7f5ff;
  border-color: rgba(71, 16, 235, 0.45);
}

/* The loan list and the catalogue are read inside their own scroll box, so
   their headers stay put while the reader works down the list. */
.lib-modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.lib-modal-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: #64748b;
  text-align: left;
  white-space: nowrap;
}
.lib-modal-table tbody td {
  padding: 10px;
  border-top: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #334155;
}
.lib-modal-table tbody tr:hover td {
  background: #f8fafc;
}
.lib-modal-table .dl-num {
  text-align: right;
}

/* The two library dialogs: one head holding the title, the swatch and (in the
   catalogue) the search field, then a table that sticks under it while the
   reader works down the list. */
.lib-dialog {
  padding: 24px 16px;
  overflow-y: auto;
  align-items: flex-start;
}
.lib-dialog-card {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  animation: lcFadeUp 0.22s ease both;
}
.lib-dialog-card.is-wide {
  max-width: 1040px;
}
.lib-dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.lib-dialog-head h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #1e293b;
  white-space: nowrap;
}
.lib-dialog-head h4 i {
  font-size: 13px;
  color: #4710eb;
}
.lib-dialog-search {
  position: relative;
  flex: 1 1 auto;
  min-width: 120px;
  max-width: 420px;
  margin-left: auto;
}
.lib-dialog-search > i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #94a3b8;
  pointer-events: none;
}
.lib-dialog-search input {
  width: 100%;
  padding: 8px 12px 8px 33px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  font-size: 12.5px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lib-dialog-search input:focus {
  border-color: #4710eb;
  box-shadow: 0 0 0 3px rgba(71, 16, 235, 0.12);
}
.lib-dialog-x {
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lib-dialog-x:hover {
  background: #eef1f7;
  color: #0f172a;
}
.lib-dialog-body {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
.lib-dialog-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 24px;
  font-size: 12px;
  color: #64748b;
}
.lib-dialog-state p {
  margin: 0;
}
.lib-dialog-state.is-error {
  color: #b91c1c;
}
.lib-dialog-state.is-error i {
  font-size: 20px;
  opacity: 0.65;
}

@media (max-width: 720px) {
  .lib-dialog {
    padding: 12px 8px;
  }
  .lib-dialog-head {
    flex-wrap: wrap;
  }
  .lib-dialog-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
  }
  .lib-dialog-body {
    max-height: calc(100vh - 240px);
  }
  #libraryContent .lc-stat-val {
    font-size: 18px;
  }
  .lib-title {
    max-width: 180px;
  }
}

/* A4 copy: the paper shows the register, not the furniture around it. */
@media print {
  #libraryContent .lc-controls,
  #libraryContent .lc-stats,
  #libraryContent .dl-filters,
  #libraryPager,
  #lib-archive-load-more {
    display: none !important;
  }
  #libraryContent .lc-hero {
    background: #fff !important;
    box-shadow: none;
    padding: 0 0 10px;
    border-radius: 0;
  }
  #libraryContent .lc-hero::before,
  #libraryContent .lc-hero::after {
    display: none;
  }
  #libraryContent .lc-title,
  #libraryContent .lc-sub,
  #libraryContent .lc-live,
  #libraryContent .lc-meta-chip {
    color: #101828 !important;
    background: none !important;
    border-color: #cbd5e1 !important;
  }
  #libraryRegistry .dl-scroll {
    overflow: visible !important;
  }
  #libraryRegistry .dl-table-wrap {
    overflow: visible;
    box-shadow: none;
    border-color: #cbd5e1;
  }
  #libraryTable thead th {
    position: static;
    background: #eef1f7 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #libraryTable thead th.dl-sort::after {
    content: '';
  }
  #libraryTable tbody tr {
    page-break-inside: avoid;
  }
  #libraryTable .pp-pill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #libraryTable .lib-title {
    max-width: none;
  }
}

/* -- Inventory: the store, the loans, the requests and the movements ---------
   One screen with four views. The hero, the tiles and the filter bars come from
   the shared .lc-* and .dl-* systems; what lives here is the low-stock panel,
   the bulk bar and the cells that only a store has. */
#inventoryContent .sub-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#inventoryContent .sub-tab-btn > i {
  font-size: 10.5px;
  opacity: 0.75;
}
#inventoryContent .pp-tab-count {
  min-width: 20px;
  text-align: center;
}

/* -- Low stock: the store's own alarm, under the tiles -- */
.inv-lowstock {
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(220, 38, 38, 0.08);
  overflow: hidden;
}
.inv-lowstock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.55), rgba(255, 255, 255, 0));
  border-bottom: 1px solid #fee2e2;
}
.inv-lowstock-copy {
  min-width: 0;
}
.inv-lowstock-head .inv-lowstock-copy {
  display: flex;
  align-items: center;
  gap: 10px;
}
.inv-lowstock-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  font-size: 13px;
}
.inv-lowstock-copy h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: #7f1d1d;
  letter-spacing: -0.1px;
}
.inv-lowstock-copy p {
  margin: 1px 0 0;
  font-size: 10px;
  font-weight: 600;
  color: #b91c1c;
}
.inv-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff;
  color: #b91c1c;
  font-size: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.inv-icon-btn:hover {
  background: #fef2f2;
}
.inv-lowstock-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  padding: 12px 16px 14px;
}
.inv-lowstock-card {
  padding: 11px 12px;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  background: #fff;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.inv-lowstock-card:hover {
  border-color: #fecaca;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.1);
}
.inv-lowstock-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.inv-lowstock-name {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inv-lowstock-count {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 9.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.inv-lowstock-bar {
  height: 5px;
  margin-bottom: 9px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}
.inv-lowstock-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #f97316;
  transition: width 0.4s ease;
}
.inv-lowstock-card.is-low .inv-lowstock-bar span {
  background: #f59e0b;
}
.inv-lowstock-card.is-critical .inv-lowstock-bar span {
  background: #ef4444;
}
.inv-lowstock-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
/* The card is a white surface: the hero's white-on-purple button has to be
   re-inked or it disappears. */
.inv-lowstock-foot .lc-btn.ghost {
  padding: 4px 9px;
  font-size: 10.5px;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}
.inv-lowstock-foot .lc-btn.ghost:hover {
  color: #4710eb;
  border-color: rgba(71, 16, 235, 0.45);
  background: #f7f5ff;
}

/* -- The "only short" switch, inside a .dl-field -- */
.inv-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}
.inv-switch input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #4710eb;
  cursor: pointer;
}

/* -- Bulk selection bar -- */
.inv-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(71, 16, 235, 0.22);
  border-radius: 12px;
  background: #f7f5ff;
}
.inv-bulk-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  color: #2a0a8f;
}
.inv-bulk-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.inv-bulk-actions .lc-btn {
  padding: 5px 10px;
  font-size: 11px;
}
.inv-bulk-actions .lc-btn.ghost {
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}
.inv-bulk-actions .lc-btn.ghost:hover {
  color: #4710eb;
  border-color: rgba(71, 16, 235, 0.45);
}
.inv-bulk-actions .lc-btn.ghost.is-danger {
  color: #b91c1c;
}
.inv-bulk-actions .lc-btn.ghost.is-danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
}

/* -- The tick and the action columns -- */
#inventoryContent .inv-select-header,
#inventoryContent .inv-select-cell {
  width: 34px;
  padding-right: 0;
  text-align: center;
}
.inv-select-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.inv-select-all input,
.inv-item-check {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #4710eb;
  cursor: pointer;
}
/* A tier that may only read loses the column rather than a whole stack of
   empty cells under a header it cannot use. */
#invItemsTable:not(.has-select) .inv-select-header,
#invItemsTable:not(.has-select) .inv-select-cell {
  display: none;
}
#inventoryContent .inv-action-header,
#inventoryContent .inv-action-cell {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

/* -- Row states -- */
table.dl-table tr.is-clickable {
  cursor: pointer;
}
table.dl-table tr.is-selected td {
  background: rgba(71, 16, 235, 0.05);
}
table.dl-table tr.is-flagged td {
  background: #fffdf7;
}

/* -- Cells with more than one line -- */
.inv-item-name {
  display: block;
  max-width: 220px;
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inv-stock {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.inv-stock.is-short {
  color: #dc2626;
}
.inv-stock-unit {
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
}
.inv-store {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
}
.inv-value {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.inv-delta {
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.inv-delta.is-up {
  color: #047857;
}
.inv-delta.is-down {
  color: #b91c1c;
}
.inv-request-items {
  display: block;
  max-width: 280px;
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 720px) {
  #inventoryContent .lc-stat-val {
    font-size: 18px;
  }
  .inv-lowstock-head {
    padding: 10px 12px;
  }
  .inv-lowstock-list {
    grid-template-columns: 1fr;
    padding: 10px 12px 12px;
  }
  .inv-item-name {
    max-width: 150px;
  }
  .inv-request-items {
    max-width: 170px;
  }
  .inv-bulk-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* The section prints as a list: chrome off, one row per item, and the pills
   kept so a printed page still says what is short. */
@media print {
  #inventoryContent .lc-controls,
  #inventoryContent .lc-stats,
  #inventoryContent .dl-filters,
  #inventoryContent .sub-tab-nav,
  #inventoryContent .inv-bulk-bar,
  #inventoryContent .inv-lowstock,
  #inventoryContent .inv-action-cell,
  #inventoryContent .inv-action-header,
  #inventoryContent .inv-select-cell,
  #inventoryContent .inv-select-header,
  #inventoryContent .fm-count {
    display: none !important;
  }
  #inventoryContent .lc-hero {
    padding: 0 0 10px;
    border-radius: 0;
    background: #fff !important;
    box-shadow: none;
  }
  #inventoryContent .lc-hero::before,
  #inventoryContent .lc-hero::after {
    display: none;
  }
  #inventoryContent .lc-title,
  #inventoryContent .lc-sub,
  #inventoryContent .lc-live,
  #inventoryContent .lc-meta-chip {
    color: #101828 !important;
    background: none !important;
    border-color: #cbd5e1 !important;
  }
  #inventoryContent .dl-table-wrap {
    border-color: #cbd5e1;
    box-shadow: none;
    overflow: visible;
  }
  #inventoryContent .dl-scroll {
    overflow: visible !important;
  }
  #inventoryContent thead th {
    position: static;
    background: #eef1f7 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #inventoryContent thead th.dl-sort::after {
    content: '';
  }
  #inventoryContent tbody tr {
    page-break-inside: avoid;
  }
  #inventoryContent .pp-pill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #inventoryContent .inv-item-name,
  #inventoryContent .inv-request-items {
    max-width: none;
    white-space: normal;
  }
}
/* -- Sickbay: the Operations clinic ------------------------------------------
   One screen with two registers — the visits and the shelf they draw from. The
   hero, the tiles, the tabs and the tables all come from the shared .lc-* and
   .dl-* systems; what lives here is the stay column, the dose cell, the shelf
   state, the pager foot and the annotate dialog. */
#sickbayContent .sub-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#sickbayContent .sub-tab-btn > i {
  font-size: 10.5px;
  opacity: 0.75;
}
/* The archive badge counts what the server says is there, so it has to stay
   legible while its tab is the inactive one. */
#sickbayContent .pp-tab-count {
  min-width: 20px;
  text-align: center;
}

/* The foot under the register: the count on the left, the next page on the
   right. The button is the page, so it is re-inked for a white surface. */
.sb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.sb-foot .fm-count {
  margin: 0;
}
.sb-foot .lc-btn.ghost {
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}
.sb-foot .lc-btn.ghost:hover {
  color: #4710eb;
  background: #f7f5ff;
  border-color: rgba(71, 16, 235, 0.45);
}

/* The visit: the date owns the cell, the time and the length of the stay read
   underneath it. */
.sb-when {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}
/* A reason is free text and can be a sentence, so it wraps inside its column
   rather than pushing the severity pill off the edge. */
.sb-reason {
  display: block;
  max-width: 240px;
  font-size: 12px;
  line-height: 1.4;
  color: #334155;
}
.sb-action-cell {
  text-align: right;
  white-space: nowrap;
}
#sickbayTable .sb-action-header {
  width: 84px;
  text-align: right;
}

/* The shelf: the count carries the alarm when it is at or under the floor. */
.sb-item-name {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
}
.sb-stock {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f766e;
}
.sb-stock.is-short {
  color: #b91c1c;
}

/* -- The annotate dialog ----------------------------------------------------
   A small, focused dialog: a head that says what is happening, the record's
   name, the box, and the two buttons. */
.sb-dialog {
  padding: 24px 16px;
  overflow-y: auto;
  align-items: flex-start;
}
.sb-dialog-card {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  animation: lcFadeUp 0.22s ease both;
}
.sb-dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.sb-dialog-head h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #1e293b;
}
.sb-dialog-head h4 i {
  font-size: 13px;
  color: #4710eb;
}
.sb-dialog-x {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.sb-dialog-x:hover {
  background: #eef1f7;
  color: #0f172a;
}
.sb-dialog-body {
  padding: 16px 18px;
}
.sb-dialog-note {
  margin: 0 0 14px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #64748b;
}
.sb-dialog-note strong {
  color: #0f172a;
}
.sb-dialog-label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #64748b;
}
.sb-dialog-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.5;
  color: #0f172a;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sb-dialog-input:focus {
  border-color: #4710eb;
  box-shadow: 0 0 0 3px rgba(71, 16, 235, 0.12);
}
.sb-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}
/* The same trap every white surface hits: .lc-btn.ghost is white on
   translucent for the hero, and this foot is a white card. */
.sb-dialog-foot .lc-btn.ghost {
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}
.sb-dialog-foot .lc-btn.ghost:hover {
  color: #4710eb;
  background: #f7f5ff;
  border-color: rgba(71, 16, 235, 0.45);
}

@media (max-width: 720px) {
  #sickbayContent .lc-stat-val {
    font-size: 18px;
  }
  .sb-reason {
    max-width: 170px;
  }
  .sb-dialog {
    padding: 12px 8px;
  }
  .sb-foot {
    align-items: flex-start;
  }
}

/* A4 copy: the paper shows the register, not the furniture around it. */
@media print {
  #sickbayContent .lc-controls,
  #sickbayContent .lc-stats,
  #sickbayContent .dl-filters,
  #sickbayContent .sub-tab-nav,
  #sickbayContent .pp-acts,
  #sickbayContent .sb-action-cell,
  #sickbayContent .sb-action-header,
  #sickbayContent .sb-foot,
  #sickbayContent .sb-dialog {
    display: none !important;
  }
  #sickbayContent .lc-hero {
    padding: 0 0 10px;
    border-radius: 0;
    background: #fff !important;
    box-shadow: none;
  }
  #sickbayContent .lc-hero::before,
  #sickbayContent .lc-hero::after {
    display: none;
  }
  #sickbayContent .lc-title,
  #sickbayContent .lc-sub,
  #sickbayContent .lc-live,
  #sickbayContent .lc-meta-chip {
    color: #101828 !important;
    background: none !important;
    border-color: #cbd5e1 !important;
  }
  #sickbayContent .dl-table-wrap {
    border-color: #cbd5e1;
    box-shadow: none;
    overflow: visible;
  }
  #sickbayContent .dl-scroll {
    overflow: visible !important;
  }
  #sickbayContent thead th {
    position: static;
    background: #eef1f7 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #sickbayContent thead th.dl-sort::after {
    content: '';
  }
  #sickbayContent tbody tr {
    page-break-inside: avoid;
  }
  #sickbayContent .pp-pill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #sickbayContent .sb-reason {
    max-width: none;
  }
}

/* -- Madrasa: the dawn class, the competition and the scope ------------------
   The four headline tiles are the board's own filters, so the numbers and the
   roster can never disagree. The roster is a grid of expandable cards; the two
   registers below it are ordinary .dl-table lists; the scope is one panel. */
#madrasaContent .sub-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#madrasaContent .sub-tab-btn > i {
  font-size: 10.5px;
}
#madrasaContent .pp-tab-count {
  min-width: 20px;
}

/* ── The filter tiles ── */
#madrasaContent .lc-stat {
  border: 0;
  font: inherit;
  text-align: left;
  cursor: default;
}
#madrasaContent .lc-stat.is-clickable {
  cursor: pointer;
}
#madrasaContent .lc-stat.is-clickable:hover {
  transform: translateY(-1px);
}
#madrasaContent .lc-stat.is-on {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18), inset 0 0 0 3px rgba(255, 255, 255, 0.9);
}
#madrasaContent .lc-stat.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

/* ── Board toolbar ── */
.md-scope-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 32px;
}
.md-hint {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
}
.md-updated {
  display: inline-flex;
  align-items: center;
  height: 32px;
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

/* ── The roster: one card per child ── */
.md-roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
}
.md-roster-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 26px;
  border-radius: 14px;
  border: 1px dashed #d8deec;
  color: #94a3b8;
  font-size: 12.5px;
}
.md-roster-empty i {
  font-size: 14px;
}

.md-card {
  border: 1px solid #e6eaf3;
  border-left: 3px solid #e6eaf3;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.md-card:hover {
  border-color: #c9d2e6;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.07);
}
.md-card.is-ok {
  border-left-color: #16a34a;
}
.md-card.is-warn {
  border-left-color: #f59e0b;
}
.md-card.is-bad {
  border-left-color: #ef4444;
}
.md-card-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.md-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #cbd5e1;
}
.md-dot.is-ok {
  background: #16a34a;
}
.md-dot.is-warn {
  background: #f59e0b;
}
.md-dot.is-bad {
  background: #ef4444;
}
.md-card-who {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.md-card-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #101828;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.md-card-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.md-card-sub .pp-pill {
  font-size: 9px;
  padding: 1px 7px;
}
.md-card-class {
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
}
.md-card-count {
  flex: 0 0 auto;
  text-align: right;
  line-height: 1.15;
}
.md-card-count strong {
  font-size: 13px;
  font-weight: 800;
  color: #4710EB;
}
.md-card-of {
  margin-left: 2px;
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
}
.madrasah-card-chevron {
  flex: 0 0 auto;
  font-size: 11px;
  color: #cbd5e1;
  transition: transform 0.15s;
}
.md-bar {
  height: 4px;
  background: #f1f5f9;
}
.md-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4710EB, #7c5cff);
}
.madrasah-card-detail {
  border-top: 1px solid #f1f5f9;
  padding: 10px 13px 13px;
  background: #fbfbfe;
}
.md-card-note {
  margin-bottom: 8px;
  font-size: 11px;
  color: #64748b;
}
.madrasah-card-history {
  font-size: 11.5px;
  color: #64748b;
}
.madrasah-card-history th {
  font-size: 9.5px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* ── Foot lines under the lists ── */
.md-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 0 2px;
}
.md-foot [id$="Pager"] {
  margin: 0;
}
.md-foot-note {
  font-size: 11px;
  color: #94a3b8;
}

/* ── Table cells ── */
.md-action-header {
  width: 44px;
}
.md-action-cell {
  text-align: right;
  white-space: nowrap;
}
.md-chip {
  display: inline-block;
  margin: 1px 2px 1px 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef1f9;
  color: #3b4a63;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.md-muted {
  color: #94a3b8;
  font-size: 11.5px;
}
.md-num {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: #101828;
}
.md-cell-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #101828;
}
.md-cell-sub {
  font-size: 11px;
  color: #64748b;
  line-height: 1.5;
}
.md-act {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.md-act:hover {
  border-color: #c7d2fe;
  color: #4710EB;
  background: #f5f3ff;
}
.md-count-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #d5f2e3;
  background: #ecfdf5;
  color: #15803d;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.md-count-btn:hover {
  border-color: #15803d;
  background: #fff;
}
.md-count-btn i {
  font-size: 10px;
}

/* ── The contestants popover ── */
.md-pop {
  position: fixed;
  z-index: 4200;
  width: 240px;
  padding: 10px;
  text-align: left;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.16);
}
.md-pop-scroll {
  max-height: 220px;
  overflow-y: auto;
}
.md-pop-cat {
  margin-bottom: 4px;
  padding: 6px 0 4px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #64748b;
}
.md-pop-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  font-size: 11.5px;
  color: #334155;
}
.md-pop-age {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
}
.md-pop-empty {
  padding: 8px 0;
  font-size: 11.5px;
  color: #94a3b8;
}
.md-pop-foot {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}
.md-pop-foot .lc-btn {
  width: 100%;
  justify-content: center;
  padding: 7px 10px;
  font-size: 11px;
  color: #fff;
  background: #4710EB;
  box-shadow: none;
}

/* ── The scope panel ── */
.md-panel {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px;
  background: #fff;
  border: 1px solid #e6eaf3;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.05);
}
.md-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}
.md-panel-ico {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: #f2edff;
  color: #4710EB;
  font-size: 17px;
}
.md-panel-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #101828;
}
.md-panel-head p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
}
.md-scope-options {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}
.md-scope-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border: 1.5px solid #e6eaf3;
  border-radius: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.md-scope-option:hover {
  border-color: #c7d2fe;
  background: #fcfbff;
}
.md-scope-option.is-on {
  border-color: #4710EB;
  background: #faf8ff;
}
.md-scope-option input {
  width: 15px;
  height: 15px;
  margin: 3px 0 0;
  flex: 0 0 auto;
  accent-color: #4710EB;
}
.md-scope-ico {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #f2edff;
  color: #4710EB;
  font-size: 13px;
}
.md-scope-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.md-scope-name {
  font-size: 13px;
  font-weight: 800;
  color: #101828;
}
.md-scope-desc {
  font-size: 11.5px;
  line-height: 1.5;
  color: #64748b;
}
.md-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.md-panel-meta {
  font-size: 11.5px;
  color: #94a3b8;
}
.md-panel-foot .lc-btn {
  color: #fff;
  background: #4710EB;
  box-shadow: none;
}

/* ── Small screens ── */
@media (max-width: 720px) {
  #madrasaContent .lc-stat {
    padding: 12px 14px;
  }
  #madrasaContent .lc-stat-val {
    font-size: 22px;
  }
  .md-roster {
    grid-template-columns: 1fr;
  }
  .md-panel {
    padding: 14px;
  }
  .md-pop {
    width: 210px;
  }
  .md-foot-note {
    display: none;
  }
}

/* ── On paper ── */
@media print {
  #madrasaContent .lc-controls,
  #madrasaContent .lc-stats,
  #madrasaContent .sub-tab-nav,
  #madrasaContent .dl-filters,
  #madrasaContent .md-foot,
  #madrasaContent .md-action-cell,
  #madrasaContent .md-action-header,
  .md-pop {
    display: none !important;
  }
  #madrasaContent .lc-hero {
    padding: 0 0 8px;
    border-radius: 0;
    border-bottom: 2px solid #4710EB;
    background: none !important;
    box-shadow: none !important;
  }
  #madrasaContent .lc-title,
  #madrasaContent .lc-sub,
  #madrasaContent .lc-live,
  #madrasaContent .lc-meta-chip {
    color: #101828 !important;
    background: none !important;
    border-color: #cbd5e1 !important;
  }
  #madrasaContent .dl-table-wrap {
    overflow: visible;
    border-color: #cbd5e1;
    box-shadow: none;
  }
  #madrasaContent .dl-scroll {
    overflow: visible !important;
  }
  #madrasaContent thead th {
    position: static;
    background: #eef1f7 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #madrasaContent thead th.dl-sort::after {
    content: '';
  }
  #madrasaContent tbody tr {
    page-break-inside: avoid;
  }
  #madrasaContent .pp-pill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .md-roster {
    grid-template-columns: repeat(2, 1fr);
  }
  .md-card {
    break-inside: avoid;
  }
  .md-card-head {
    cursor: default;
  }
  .md-bar > span {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* -- Dining: the meal register -----------------------------------------------
   One screen, one register. The four tiles are the three sittings plus the
   day's total, and clicking one narrows the rows without another round trip,
   so the numbers and the register can never disagree. */
#diningContent .lc-stat {
  border: 0;
  font: inherit;
  text-align: left;
  cursor: default;
}
#diningContent .lc-stat.is-clickable {
  cursor: pointer;
}
#diningContent .lc-stat.is-clickable:hover {
  transform: translateY(-1px);
}
#diningContent .lc-stat.is-on {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18), inset 0 0 0 3px rgba(255, 255, 255, 0.9);
}

/* ── The meal chip ── */
.dn-meal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.dn-meal i {
  font-size: 10px;
  opacity: 0.9;
}
.dn-meal.is-breakfast {
  background: #fef3c7;
  color: #b45309;
}
.dn-meal.is-lunch {
  background: #d1fae5;
  color: #047857;
}
.dn-meal.is-dinner {
  background: #e0e7ff;
  color: #4338ca;
}
.dn-meal.is-plain {
  background: #f1f5f9;
  color: #475569;
}

/* ── The collected-at and the two attribution columns ── */
.dn-when {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
}
.dn-mode,
.dn-by {
  display: block;
  max-width: 180px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  white-space: normal;
}

/* ── Small screens ── */
@media (max-width: 720px) {
  #diningContent .lc-stat {
    padding: 12px 14px;
  }
  #diningContent .lc-stat-val {
    font-size: 22px;
  }
  .dn-mode,
  .dn-by {
    max-width: 120px;
  }
}

/* ── On paper ── */
@media print {
  #diningContent .lc-controls,
  #diningContent .lc-stats,
  #diningContent .dl-filters,
  #diningContent .md-foot {
    display: none !important;
  }
  #diningContent .lc-hero {
    padding: 0 0 8px;
    border-radius: 0;
    border-bottom: 2px solid #4710EB;
    background: none !important;
    box-shadow: none !important;
  }
  #diningContent .lc-title,
  #diningContent .lc-sub,
  #diningContent .lc-live,
  #diningContent .lc-meta-chip {
    color: #101828 !important;
    background: none !important;
    border-color: #cbd5e1 !important;
  }
  #diningContent .dl-table-wrap {
    overflow: visible;
    border-color: #cbd5e1;
    box-shadow: none;
  }
  #diningContent .dl-scroll {
    overflow: visible !important;
  }
  #diningContent thead th {
    position: static;
    background: #eef1f7 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #diningContent thead th.dl-sort::after {
    content: '';
  }
  #diningContent tbody tr {
    page-break-inside: avoid;
  }
  .dn-meal {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ============================================================
   Workflow (Operations) — redesigned pane
   Tiles wayfind, registers sort, chain cards breathe, print is A4.
   ============================================================ */

/* -- The four headline tiles jump between tabs, so they look like targets */
#workflowContent .lc-stats {
    margin-bottom: 16px;
}

#workflowContent .lc-stat.is-clickable {
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

#workflowContent .lc-stat.is-clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

/* -- Registers: taller viewport before the scroll, middle-aligned cells */
#workflowContent .dl-scroll {
    max-height: 62vh;
}

#workflowContent table.dl-table td {
    vertical-align: middle;
}

#workflowContent table.dl-table tr.wf-row-expired td {
    background: #fff7f7;
}

#workflowContent table.dl-table tr.wf-center-expand td {
    background: #f8fafc;
}

/* The My Tasks assignee breakdown carries its own padded list */
#workflowContent table.dl-table tr.wf-assignee-detail-row td {
    padding: 0;
    background: #f8fafc;
}

/* -- Recent activity rides under the deadlines register in one card */
#workflowContent .wf-activity-card {
    margin-top: 16px;
    padding: 14px 16px 8px;
}

#workflowContent .wf-activity-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #475569;
    padding-bottom: 8px;
}

#workflowContent .wf-activity-head i {
    color: #4710EB;
}

/* -- Narrow screens: tiles two-up, filters wrap */
@media (max-width: 720px) {
    #workflowContent .lc-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    #workflowContent .lc-stat .lc-stat-val {
        font-size: 22px;
    }

    #workflowContent .dl-filters .dl-fields {
        flex-wrap: wrap;
    }

    #workflowContent .dl-scroll {
        max-height: none;
    }
}

/* -- Print: the pane alone (the Print button opens the true A4 sheet) */
@media print {
    #workflowContent .lc-controls,
    #workflowContent .sub-tab-nav,
    #workflowContent .dl-filters,
    #workflowContent .lc-stats,
    #workflowContent .md-foot,
    #workflowContent .wf-row-tip,
    #workflowContent .wf-center-chevron {
        display: none !important;
    }

    #workflowContent .lc-hero {
        background: #fff !important;
        color: #0f172a !important;
        box-shadow: none !important;
        border-bottom: 2px solid #4710EB;
    }

    #workflowContent .lc-title,
    #workflowContent .lc-sub,
    #workflowContent .lc-live {
        color: #0f172a !important;
    }

    #workflowContent .dl-table-wrap,
    #workflowContent .dl-scroll {
        overflow: visible !important;
        box-shadow: none !important;
        max-height: none !important;
    }

    #workflowContent table.dl-table thead {
        display: table-header-group;
    }

    #workflowContent table.dl-table tr {
        page-break-inside: avoid;
    }

    #workflowContent .wf-badge {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
/* ── Section 15 — Administration: ID Cards ─────────────────────────────────
   The pane is a generator, not a register: two console panels sit under the
   counted tiles. Tiles are wayfinding (they jump between the single and bulk
   consoles), so they read as buttons. Printing an ID card itself is handled
   by the CR80 sheet in index.html; these rules only make the console pages
   tidy on A4. */

#idCardsContent .lc-stat.is-clickable {
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

#idCardsContent .lc-stat.is-clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
}

#idCardsContent .idc-view {
    margin-top: 20px;
}

#idCardsContent .idc-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

#idCardsContent .idc-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 15px 20px;
    border-bottom: 1px solid #eef2f7;
    background: #fbfcfe;
}

#idCardsContent .idc-panel-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.01em;
}

#idCardsContent .idc-panel-title i {
    color: #4710EB;
    margin-right: 8px;
    font-size: 12px;
}

#idCardsContent .idc-panel-note {
    font-size: 11px;
    color: #64748b;
}

#idCardsContent .idc-panel-body {
    padding: 20px;
    max-width: 720px;
}

#idCardsContent .idc-lookup-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

#idCardsContent .idc-lookup-row .form-control {
    flex: 1;
    min-width: 0;
}

#idCardsContent .idc-preview {
    margin-top: 22px;
    text-align: center;
}

#idCardsContent .idc-preview-title {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 800;
}

#idCardsContent .idc-preview-sides {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

#idCardsContent .idc-side-label {
    font-size: 9px;
    color: #64748b;
    margin-bottom: 6px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#idCardsContent .idc-preview-img {
    max-width: 100%;
    border-radius: var(--br-md);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.10);
    border: 1px solid #ddd;
}

#idCardsContent .idc-preview-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

#idCardsContent .idc-settings {
    margin-top: 26px;
    padding: 18px 20px;
    background: rgba(27, 94, 32, 0.05);
    border: 1px dashed var(--primary-green);
    border-radius: var(--br-md);
}

#idCardsContent .idc-settings-title {
    margin-bottom: 8px;
    color: var(--primary-green);
    font-size: 12.5px;
    font-weight: 800;
}

#idCardsContent .idc-settings-note {
    font-size: 10.5px;
    color: var(--dark-gray);
    margin-bottom: 15px;
    line-height: 1.55;
}

#idCardsContent .idc-progress {
    margin-top: 22px;
}

#idCardsContent .idc-progress-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 10px;
}

#idCardsContent .idc-progress-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary-green);
}

#idCardsContent .idc-progress-track {
    width: 100%;
    height: 8px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
}

#idCardsContent #bulkProgressBar {
    height: 100%;
    background: linear-gradient(90deg, #1b5e20, #2e7d32);
    border-radius: 999px;
    transition: width 0.3s ease;
}

@media (max-width: 720px) {
    #idCardsContent .lc-stats {
        grid-template-columns: 1fr 1fr;
    }

    #idCardsContent .lc-stat-val {
        font-size: 22px;
    }

    #idCardsContent .idc-lookup-row {
        flex-direction: column;
    }

    #idCardsContent .idc-panel-head {
        align-items: flex-start;
    }
}

@media print {
    #idCardsContent .lc-controls,
    #idCardsContent .sub-tab-nav,
    #idCardsContent .lc-stats,
    #idCardsContent .dl-filters,
    #idCardsContent .idc-settings button,
    #idCardsContent .idc-preview-actions {
        display: none !important;
    }

    #idCardsContent .lc-hero {
        background: #fff;
        border-bottom: 2px solid #4710EB;
        box-shadow: none;
        padding: 10px 0;
    }

    #idCardsContent .idc-panel {
        border: 1px solid #cbd5e1;
        box-shadow: none;
        page-break-inside: avoid;
        max-width: none;
    }

    #idCardsContent .idc-panel-body {
        max-width: none;
    }

    #idCardsContent .idc-preview-img {
        box-shadow: none;
    }
}
/* ── Section 16 — Administration: Notifications ────────────────────────────
   The pane is two rooms: a composer with a live phone preview, and a log that
   sorts and searches the page on screen while the server keeps the pages.
   Chips derive from the single NOTIF_AUDIENCES map in script.js — no inline
   colour dicts anymore. Print rules split by room: the composer prints as a
   draft sheet, the log prints via openAcademicPrint (landscape) so its own
   sheet wins and the on-screen table stays quiet. */

#notificationsContent .ntf-compose-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 20px;
    align-items: start;
    margin-top: 20px;
}

#notificationsContent .ntf-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

#notificationsContent .ntf-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 15px 20px;
    border-bottom: 1px solid #eef2f7;
    background: #fbfcfe;
}

#notificationsContent .ntf-card-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.01em;
}

#notificationsContent .ntf-card-title i {
    color: #4710EB;
    margin-right: 8px;
    font-size: 12px;
}

#notificationsContent .ntf-card-note {
    font-size: 11px;
    color: #64748b;
}

#notificationsContent .ntf-card-body {
    padding: 20px;
}

#notificationsContent .lc-stat.is-clickable {
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

#notificationsContent .lc-stat.is-clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
}

/* One chip vocabulary, audience and priority tones derived from data. */
#notificationsContent .ntf-chip {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    border: 1px solid transparent;
}

#notificationsContent .ntf-chip i {
    margin-right: 4px;
    font-size: 9.5px;
}

#notificationsContent .ntf-aud-violet { background: rgba(71, 16, 235, 0.06); color: #4710EB; border-color: rgba(71, 16, 235, 0.18); }
#notificationsContent .ntf-aud-orange { background: #fff7ed; color: #ea580c; border-color: #ffedd5; }
#notificationsContent .ntf-aud-green  { background: rgba(16, 185, 129, 0.06); color: #059669; border-color: rgba(16, 185, 129, 0.18); }
#notificationsContent .ntf-aud-blue   { background: #eff6ff; color: #2563eb; border-color: #dbeafe; }
#notificationsContent .ntf-aud-fuchsia { background: #fdf4ff; color: #a21caf; border-color: #fae8ff; }
#notificationsContent .ntf-aud-teal   { background: #f0fdfa; color: #0f766e; border-color: #ccfbf1; }
#notificationsContent .ntf-pri-high   { background: #fee2e2; color: #ef4444; border-color: #fecaca; }
#notificationsContent .ntf-pri-normal { background: #eff6ff; color: #3b82f6; border-color: #dbeafe; }
#notificationsContent .ntf-status     { background: rgba(71, 16, 235, 0.06); color: #4710EB; border-color: rgba(71, 16, 235, 0.18); }

#notificationsContent .dl-table .ntf-nowrap { white-space: nowrap; }

#notificationsContent .dl-table .ntf-title-cell {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    color: #0f172a;
}

#notificationsContent .dl-table .ntf-act { text-align: center; }

#notificationsContent .dl-table .ntf-act .lc-btn {
    padding: 5px 12px;
    font-size: 11px;
}

#notificationsContent .ntf-detail-badge {
    display: inline-block;
    width: fit-content;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

/* Detail modal — overlay flexes in; the card keeps the design-system shell. */
#notificationsContent .ntf-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#notificationsContent .ntf-modal-card {
    width: min(560px, 100%);
    max-height: 86vh;
    overflow: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}

#notificationsContent .ntf-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid #eef2f7;
    background: #fbfcfe;
    position: sticky;
    top: 0;
}

#notificationsContent .ntf-modal-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

#notificationsContent .ntf-modal-title i {
    color: #4710EB;
    margin-right: 8px;
    font-size: 12.5px;
}

#notificationsContent .ntf-modal-x {
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
}

#notificationsContent .ntf-modal-x:hover {
    background: #eef2f7;
    color: #0f172a;
}

#notificationsContent .ntf-modal-body {
    padding: 20px;
}

#notificationsContent .ntf-detail-grid {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px 14px;
    align-items: center;
    margin-bottom: 16px;
}

#notificationsContent .ntf-detail-grid strong {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

#notificationsContent .ntf-detail-grid span {
    font-size: 12.5px;
    color: #0f172a;
}

#notificationsContent .ntf-detail-msg-block {
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    margin-bottom: 14px;
}

#notificationsContent .ntf-detail-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

#notificationsContent .ntf-detail-message {
    font-size: 12.5px;
    line-height: 1.6;
    color: #334155;
    white-space: pre-wrap;
}

#notificationsContent .ntf-detail-url {
    font-size: 12px;
    color: #334155;
    margin-bottom: 14px;
    word-break: break-all;
}

#notificationsContent .ntf-detail-url strong {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

#notificationsContent .ntf-detail-recips {
    margin-bottom: 4px;
}

#notificationsContent .ntf-detail-recips > strong {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

#notificationsContent .ntf-detail-recips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#notificationsContent .ntf-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #eef2f7;
    background: #fbfcfe;
}

/* Pagination foot for the log. */
#notificationsContent .ntf-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

#notificationsContent .ntf-pager-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

#notificationsContent .ntf-pager-btn {
    min-width: 30px;
    padding: 6px 9px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
}

#notificationsContent .ntf-pager-btn:hover:not(:disabled) {
    border-color: #4710EB;
    color: #4710EB;
}

#notificationsContent .ntf-pager-btn.active,
#notificationsContent .ntf-pager-btn:disabled {
    background: #4710EB;
    border-color: #4710EB;
    color: #fff;
    cursor: default;
}

@media (max-width: 980px) {
    #notificationsContent .ntf-compose-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    #notificationsContent .lc-stats {
        grid-template-columns: 1fr 1fr;
    }

    #notificationsContent .lc-stat-val {
        font-size: 22px;
    }

    #notificationsContent .ntf-detail-grid {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    #notificationsContent .ntf-detail-grid strong {
        margin-top: 8px;
    }
}

@media print {
    #notificationsContent .lc-controls,
    #notificationsContent .sub-tab-nav,
    #notificationsContent .lc-stats,
    #notificationsContent .dl-filters,
    #notificationsContent .ntf-pagination,
    #notificationsContent .md-foot,
    #notificationsContent .ntf-act,
    #notificationsContent .ntf-modal {
        display: none !important;
    }

    #notificationsContent .lc-hero {
        background: #fff;
        border-bottom: 2px solid #4710EB;
        box-shadow: none;
        padding: 10px 0;
    }

    #notificationsContent .ntf-compose-grid {
        grid-template-columns: 1fr;
    }

    #notificationsContent .ntf-card,
    #notificationsContent .dl-table-wrap {
        border: 1px solid #cbd5e1;
        box-shadow: none;
        page-break-inside: avoid;
    }

    #notificationsContent .dl-table .ntf-title-cell {
        max-width: none;
        overflow: visible;
        white-space: normal;
    }
}
/* ── Section 17 — Administration: Audit Vault ──────────────────────────────
   A read-only, time-ordered log. The severity chip tone, the app tag and the
   IP/user cells are all derived from live data via the single AUDIT_SEVERITY
   ladder in script.js — no inline colour dicts. The pane scrolls to load more,
   so the sentinel stays but is restyled to the design system. Print renders
   through openAcademicPrint (landscape); these rules only quiet the shell when
   the on-screen table is printed directly. */

#auditContent .lc-stat.is-clickable {
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

#auditContent .lc-stat.is-clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
}

#auditContent .av-chip {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    border: 1px solid transparent;
}

#auditContent .av-info     { background: #eff6ff; color: #2563eb; border-color: #dbeafe; }
#auditContent .av-warn     { background: #fffbeb; color: #b45309; border-color: #fef3c7; }
#auditContent .av-error    { background: #fff1f2; color: #e11d48; border-color: #fecdd3; }
#auditContent .av-critical { background: #fee2e2; color: #7f1d1d; border-color: #fca5a5; font-weight: 800; }

#auditContent .dl-table .av-ts {
    white-space: nowrap;
    font-size: 11px;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

#auditContent .dl-table .av-app {
    display: inline-block;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.06em;
    color: #4710EB;
}

#auditContent .dl-table .av-user {
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
}

#auditContent .dl-table .av-action {
    font-weight: 700;
    color: #1e293b;
    font-size: 12px;
}

#auditContent .dl-table .av-detail {
    font-size: 10.5px;
    color: #64748b;
    margin-top: 2px;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#auditContent .dl-table .av-ip {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 10.5px;
    color: #64748b;
    white-space: nowrap;
}

/* Sentinel — the "keep scrolling to load more" affordance, restyled. */
#auditContent .av-sentinel {
    text-align: center;
    padding: 16px;
    border-top: 1px solid #f1f5f9;
}

#auditContent .av-sentinel-spin {
    width: 22px;
    height: 22px;
    border: 2.5px solid #e2e8f0;
    border-top-color: #4710EB;
    border-radius: 50%;
    display: inline-block;
    animation: teacherSpinnerRotate 0.8s linear infinite;
    vertical-align: middle;
}

#auditContent .av-sentinel-note {
    margin: 6px 0 0;
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.2px;
}

@media (max-width: 720px) {
    #auditContent .lc-stats {
        grid-template-columns: 1fr 1fr;
    }

    #auditContent .lc-stat-val {
        font-size: 22px;
    }
}

@media print {
    #auditContent .lc-controls,
    #auditContent .lc-stats,
    #auditContent .dl-filters,
    #auditContent .av-sentinel,
    #auditContent .md-foot {
        display: none !important;
    }

    #auditContent .lc-hero {
        background: #fff;
        border-bottom: 2px solid #4710EB;
        box-shadow: none;
        padding: 10px 0;
    }

    #auditContent .dl-table .av-detail,
    #auditContent .dl-table .av-user,
    #auditContent .dl-table .av-ip,
    #auditContent .dl-table .av-ts {
        max-width: none;
        overflow: visible;
        white-space: normal;
    }

    #auditContent .av-chip {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
/* ── Section 18 — Administration: Subscriptions & billing ──────────────────
   The billing page is deliberately NOT a .lc-stage pane: it is a full-surface
   SaaS page (its own .bil-* system — violet carries the brand, amber carries
   urgency) that replaces the app when the school is locked, and its signature
   semester rail has no equivalent in the admin design system. What the audit
   found here were the two genuine gaps versus the engagement's standards:
   dynamic server data (session labels, Paystack refs) must be escaped on the
   way into innerHTML — fixed in script.js at the rail, ledger and reserve
   dialog — and the shell had no print contract. These rules make the page
   print as a tidy A4 coverage statement: the rail, plans and ledger survive,
   every transactional control goes quiet. The page's own head styles stay
   untouched; this block only rides along for print and never overrides the
   screen look. */

@media print {
    .bil-shell {
        width: 100%;
        max-height: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        overflow: visible;
    }

    /* Login and app shells are display:none when billing is up, but their
       decoration can still paint — sweep the canvas clean. */
    .bg-decoration,
    .bil-bar-right,
    .bil-alert,
    .bil-strip,
    .bil-row-dl,
    .bil-foot {
        display: none !important;
    }

    .bil-bar {
        position: static;
        border-bottom: 2px solid #4710EB;
        padding: 0 0 10px;
    }

    .bil-mark {
        display: none;
    }

    .bil-who span {
        color: #0F172A;
    }

    /* The rail prints stacked and full-width — every semester legible,
       tones kept because the whole point of the sheet is coverage status. */
    .bil-railwrap {
        padding: 14px 0 0;
        page-break-inside: avoid;
    }

    .bil-rail {
        flex-direction: column;
        overflow: visible;
    }

    .bil-seg {
        flex: 0 0 auto;
        margin-bottom: 6px;
    }

    .bil-now-label,
    .bil-now-dot {
        display: none;
    }

    .bil-work {
        display: block;
        padding: 14px 0 0;
    }

    .bil-card {
        border: 1px solid #CBD5E1;
        box-shadow: none;
        margin-bottom: 12px;
        page-break-inside: avoid;
    }

    .bil-row {
        grid-template-columns: 90px 1fr auto;
    }

    .bil-seg,
    .bil-pill,
    .bil-plan-state,
    .bil-row {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
/* ── Section 19 — Administration: Backup & Restore ─────────────────────────
   A Super-Administrator snapshot trail on the card-based system: a hero with
   live chrome, four counted type tiles that also filter, and a sortable
   register. The chip tone, label and sort rank all come from the single
   BACKUP_TYPE ladder in script.js — no inline colour dicts. The destructive
   restore dialog is restyled on the same modal language as Notifications
   (bk-modal-*), tinted red to signal an irreversible action. Print renders
   through openAcademicPrint; these rules only quiet the shell. */

#backupContent .lc-stat.is-clickable {
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

#backupContent .lc-stat.is-clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
}

/* Type chips — tone derived from the ladder class, never inline. */
#backupContent .bk-chip {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    border: 1px solid transparent;
}

#backupContent .bk-latest { background: #f1edfe; color: #4710eb; border-color: #dcd3fb; }
#backupContent .bk-daily  { background: #ecfdf3; color: #15803d; border-color: #bbf7d0; }
#backupContent .bk-pre    { background: #fffbeb; color: #b45309; border-color: #fde68a; }
#backupContent .bk-other  { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }

#backupContent .dl-table .bk-file {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 11px;
    color: #475569;
    word-break: break-all;
}

#backupContent .dl-table .bk-when {
    white-space: nowrap;
    font-size: 11.5px;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

#backupContent .dl-table .bk-size {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    font-weight: 600;
    white-space: nowrap;
}

#backupContent .dl-table th.dl-num[data-sort="sizeBytes"] { text-align: right; }

#backupContent .dl-table .bk-actions {
    text-align: right;
    white-space: nowrap;
}

#backupContent .bk-restore {
    font-size: 11px;
    padding: 6px 11px;
}

/* Restore confirmation dialog (mirrors the Notifications modal shell). */
#backupContent .bk-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#backupContent .bk-modal-card {
    width: min(460px, 100%);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

#backupContent .bk-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid #fde2e2;
    background: #fff5f5;
}

#backupContent .bk-modal-title {
    font-size: 14px;
    font-weight: 800;
    color: #b91c1c;
}

#backupContent .bk-modal-title i {
    color: #dc2626;
    margin-right: 8px;
    font-size: 12.5px;
}

#backupContent .bk-modal-x {
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
}

#backupContent .bk-modal-x:hover {
    background: #fee2e2;
    color: #7f1d1d;
}

#backupContent .bk-modal-body { padding: 20px; }

#backupContent .bk-modal-desc {
    margin: 0 0 10px;
    font-size: 13px;
    color: #1e293b;
    line-height: 1.55;
}

#backupContent .bk-modal-desc code {
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 12px;
    word-break: break-all;
}

#backupContent .bk-modal-warn {
    margin: 0 0 14px;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.5;
    padding: 10px 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
}

#backupContent .bk-modal-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin: 4px 0 6px;
}

#backupContent .bk-modal-label strong { color: #b91c1c; }

#backupContent .bk-modal-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

#backupContent .bk-modal-input:focus {
    outline: 2px solid #4710EB;
    outline-offset: 1px;
    border-color: #4710EB;
}

#backupContent .bk-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #eef2f7;
    background: #fbfcfe;
}

#backupContent .lc-btn.bk-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

#backupContent .lc-btn.bk-danger:hover:not(:disabled) {
    background: #b91c1c;
    border-color: #b91c1c;
}

#backupContent .lc-btn.bk-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 720px) {
    #backupContent .lc-stats {
        grid-template-columns: 1fr 1fr;
    }

    #backupContent .lc-stat-val {
        font-size: 22px;
    }
}

@media print {
    #backupContent .lc-controls,
    #backupContent .lc-stats,
    #backupContent .dl-filters,
    #backupContent .md-foot,
    #backupContent .bk-modal {
        display: none !important;
    }

    #backupContent .lc-hero {
        background: #fff;
        border-bottom: 2px solid #4710EB;
        box-shadow: none;
        padding: 10px 0;
    }

    #backupContent .bk-chip {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ── Student pane · Subjects tab ────────────────────────────────────────────
   The list a pupil is meant to offer: the assigned subjects, the reason they
   are there, and (for an administrator) the same list as a tick sheet.
   Markup and behaviour: public/student-subjects.js. */
.ssum-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.ssum-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 10px;
    font-weight: 700;
    text-transform: capitalize;
}
.ssum-pill i {
    font-size: 9px;
    color: #64748b;
}
.ssum-pill.count {
    background: #ede9fe;
    color: #5b21b6;
    text-transform: none;
}
.ssum-source {
    margin: 0 0 12px;
    font-size: 11px;
    line-height: 1.6;
    color: #64748b;
}
.ssum-source.is-manual {
    color: #b45309;
}
.ssum-source i {
    margin-right: 4px;
}
.ssum-warn {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
}
.ssum-warn i {
    margin-top: 1px;
}
.ssum-warn.is-soft {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.ssum-warn.is-error {
    background: #fee2e2;
    color: #991b1b;
}
.ssum-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.ssum-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
}
.ssum-chip.is-pick {
    cursor: pointer;
}
.ssum-chip.is-pick:hover {
    border-color: #4710EB;
    background: #faf8ff;
}
.ssum-chip.is-pick input {
    accent-color: #4710EB;
    width: 15px;
    height: 15px;
    margin: 0;
}
.ssum-tag {
    padding: 1px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 8px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.ssum-tag.comp {
    background: #ffe4e6;
    color: #9f1239;
}
.ssum-tag.is-off {
    background: #fef3c7;
    color: #b45309;
}
.ssum-hint {
    margin: 0 0 12px;
    font-size: 11px;
    line-height: 1.6;
    color: #64748b;
}
.ssum-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
}
.ssum-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 26px 16px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}
.ssum-empty i {
    font-size: 20px;
    opacity: 0.45;
}

/* The roll-wide figures on the Subjects → Pupil subjects tab. */
.ssum-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.ssum-tile {
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #64748b;
}
.ssum-tile span {
    display: block;
    margin-bottom: 4px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
    color: #0f172a;
}
.ssum-tile.is-live {
    border-color: #a7f3d0;
    background: #ecfdf5;
}
.ssum-tile.is-live span {
    color: #047857;
}
.ssum-tile.is-warn {
    border-color: #fcd34d;
    background: #fffbeb;
}
.ssum-tile.is-warn span {
    color: #b45309;
}
.ssum-sample {
    margin: 0;
    padding: 12px 14px 12px 28px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 11px;
    line-height: 1.8;
    color: #475569;
    max-height: 320px;
    overflow-y: auto;
}
.ssum-sample strong {
    color: #0f172a;
}

/* ══════════════════════════════════════════════════════════════════════════════
   PUPIL SUBJECTS CURRICULUM PANEL (.sp-*)
   ══════════════════════════════════════════════════════════════════════════════ */
.sp-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 6px 0 24px;
}

/* ── Hero Banner ── */
.sp-hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, rgba(71, 16, 235, 0.05) 0%, rgba(99, 102, 241, 0.03) 100%);
    border: 1px solid rgba(71, 16, 235, 0.14);
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 4px 20px rgba(71, 16, 235, 0.04);
}
.sp-hero-left {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 720px;
}
.sp-hero-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4710EB 0%, #6366f1 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(71, 16, 235, 0.28);
}
.sp-hero-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.2px;
}
.sp-hero-desc {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.5;
}
.sp-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.sp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    outline: none;
}
.sp-btn-primary {
    background: linear-gradient(135deg, #4710EB 0%, #6366f1 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px rgba(71, 16, 235, 0.28);
}
.sp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(71, 16, 235, 0.38);
    filter: brightness(1.05);
}
.sp-btn-primary:active {
    transform: translateY(0);
}
.sp-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.sp-btn-secondary {
    background: #ffffff;
    color: #334155;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.sp-btn-secondary:hover {
    border-color: #4710EB;
    color: #4710EB;
    background: #f8fafc;
    transform: translateY(-1px);
}
.sp-btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── KPI Stat Cards ── */
.sp-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.sp-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.sp-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
}
.sp-stat-card.card-total::before { background: #3b82f6; }
.sp-stat-card.card-success::before { background: #10b981; }
.sp-stat-card.card-manual::before { background: #f59e0b; }
.sp-stat-card.card-warning::before { background: #ef4444; }

.sp-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}
.sp-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.sp-stat-card.card-total .sp-stat-icon { background: #eff6ff; color: #2563eb; }
.sp-stat-card.card-success .sp-stat-icon { background: #ecfdf5; color: #059669; }
.sp-stat-card.card-manual .sp-stat-icon { background: #fffbeb; color: #d97706; }
.sp-stat-card.card-warning .sp-stat-icon { background: #fef2f2; color: #dc2626; }

.sp-stat-num {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -0.5px;
}
.sp-stat-label {
    font-size: 11px;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
}
.sp-stat-sub {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* ── Directory Container ── */
.sp-directory-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}
.sp-directory-head {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: #fafbfc;
}
.sp-directory-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sp-directory-title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}
.sp-pill-count {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(71, 16, 235, 0.08);
    color: #4710EB;
    font-size: 11px;
    font-weight: 700;
}
.sp-filter-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.sp-tab-pill {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}
.sp-tab-pill:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.sp-tab-pill.active {
    background: #4710EB;
    color: #ffffff;
    border-color: #4710EB;
    box-shadow: 0 2px 8px rgba(71, 16, 235, 0.25);
}
.sp-search-box {
    position: relative;
    min-width: 260px;
    flex: 1;
    max-width: 360px;
}
.sp-search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 12px;
    pointer-events: none;
}
.sp-search-box input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 12px;
    background: #ffffff;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}
.sp-search-box input:focus {
    border-color: #4710EB;
    outline: none;
    box-shadow: 0 0 0 3px rgba(71, 16, 235, 0.12);
}

/* ── Pupil Table ── */
.sp-table-scroll {
    overflow-x: auto;
    max-height: 520px;
}
table.sp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
table.sp-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    border-bottom: 1.5px solid #e2e8f0;
    padding: 10px 16px;
    text-align: left;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #64748b;
    white-space: nowrap;
}
table.sp-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #334155;
}
table.sp-table tbody tr:hover td {
    background: #fbfcfe;
}

/* ── Pupil Cell ── */
.sp-pupil-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sp-pupil-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4710EB 0%, #7c3aed 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(71, 16, 235, 0.2);
}
.sp-pupil-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sp-pupil-id {
    font-family: monospace;
    font-size: 11.5px;
    font-weight: 700;
    color: #4710EB;
    background: rgba(71, 16, 235, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
    width: fit-content;
}
.sp-pupil-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 12.5px;
}

/* ── Class & Dept Pills ── */
.sp-class-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #1e293b;
    font-weight: 700;
    font-size: 11px;
}
.sp-dept-pill {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    background: #e0e7ff;
    color: #3730a3;
    font-weight: 700;
    font-size: 10.5px;
    margin-left: 4px;
}

/* ── Subjects Display ── */
.sp-subjects-cell {
    max-width: 480px;
}
.sp-subject-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}
.sp-chip {
    display: inline-flex;
    align-items: center;
    padding: 2.5px 7.5px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}
.sp-more-btn {
    border: none;
    background: #ede9fe;
    color: #5b21b6;
    padding: 2.5px 8px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.sp-more-btn:hover {
    background: #ddd6fe;
    color: #4c1d95;
}
.sp-extra-chips {
    display: none;
}
.sp-extra-chips.is-expanded {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* ── Status Badges ── */
.sp-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.sp-status-badge.is-rule {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.sp-status-badge.is-manual {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}
.sp-status-badge.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* ── Action Button ── */
.sp-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.sp-open-btn:hover {
    background: #4710EB;
    border-color: #4710EB;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(71, 16, 235, 0.25);
}

/* ── Success and Warning Banners ── */
.sp-alert-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 16px;
}
.sp-alert-banner.is-warn {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
.sp-alert-banner.is-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.sp-alert-banner i {
    font-size: 16px;
}

/* ── Beeque — AI issuer badge + hover tooltip ─────────────────────────────── */
.beeque-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 10px 2px 8px;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 800;
    font-size: 11.5px;
    line-height: 1.5;
    letter-spacing: .01em;
    color: #fff;
    vertical-align: middle;
    cursor: help;
    white-space: nowrap;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 55%, #0ea5e9 100%);
    border: 1px solid rgba(255, 255, 255, .35);
    box-shadow: 0 6px 16px -8px rgba(79, 70, 229, .75), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.beeque-badge > i {
    font-size: 10px;
    opacity: .95;
}

.beeque-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    transform: translateX(-50%) translateY(6px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    width: 250px;
    max-width: 70vw;
    padding: 12px 14px;
    border-radius: 14px;
    background: #0f172a;
    color: #e2e8f0;
    text-align: left;
    white-space: normal;
    border: 1px solid rgba(148, 163, 184, .28);
    box-shadow: 0 22px 44px -14px rgba(2, 6, 23, .75);
    font-weight: 500;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
    z-index: 99999;
}

.beeque-tip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #0f172a;
}

.beeque-tip-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 13.5px;
    color: #fff;
}

.beeque-tip-head > i {
    background: linear-gradient(135deg, #a78bfa, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 14px;
}

.beeque-tip-tag {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #c4b5fd;
    background: rgba(139, 92, 246, .16);
    border: 1px solid rgba(139, 92, 246, .35);
    padding: 2px 8px;
    border-radius: 999px;
}

.beeque-tip-body {
    font-size: 11.5px;
    color: #cbd5e1;
    font-weight: 500;
}

.beeque-badge:hover .beeque-tip,
.beeque-badge:focus-visible .beeque-tip,
.beeque-badge:focus .beeque-tip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ── Beeque verdict advisory strip (admin queries desk) ────────────────── */
.beeque-advice { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px; background: #f5f3ff; border: 1px solid #ddd6fe; font-size: 12px; color: #4c1d95; margin-left: 8px; max-width: 360px; text-align: left; vertical-align: middle; }
.beeque-advice-head { font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.beeque-advice-conf { display: inline-flex; align-items: center; gap: 6px; color: #6d28d9; }
.beeque-advice-bar { width: 60px; height: 6px; border-radius: 4px; background: #e9d5ff; overflow: hidden; display: inline-block; }
.beeque-advice-bar > span { display: block; height: 100%; background: linear-gradient(90deg, #7c3aed, #0ea5e9); }
.beeque-advice-body { width: 100%; color: #334155; }
.beeque-advice-note { width: 100%; font-size: 11px; font-style: italic; color: #64748b; }
.beeque-advice--pardon { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.beeque-advice--pardon .beeque-advice-head { color: #047857; }
.beeque-advice--extend { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.beeque-advice--extend .beeque-advice-head { color: #b45309; }
.beeque-advice--punish { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.beeque-advice--punish .beeque-advice-head { color: #b91c1c; }
.beeque-advice--off { background: #f8fafc; border-color: #e2e8f0; color: #475569; }
.beeque-advice--load { background: #f5f3ff; border-color: #ddd6fe; }
