/* ==========================================================================
   Max International School — CMS Dashboard
   Built on the public site's design tokens so the panel feels like the school,
   not like a generic admin template.
   ========================================================================== */

:root {
    --navy: #0B2E59;
    --navy-dark: #071D3B;
    --navy-light: #1C6FB0;
    --orange: #F1791E;
    --orange-dark: #D9660F;
    --orange-soft: #FFF3E8;

    --ink: #152238;
    --muted: #5B6B85;
    --line: #E4E9F1;
    --bg: #F5F7FB;
    --surface: #FFFFFF;

    --green: #166534;
    --green-soft: #ECFDF5;
    --red: #B42318;
    --red-soft: #FEF2F2;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(11, 46, 89, .06);
    --shadow: 0 4px 16px -6px rgba(11, 46, 89, .18);
    --shadow-lg: 0 20px 48px -20px rgba(11, 46, 89, .35);

    --header-h: 68px;
    --sidebar-w: 248px;

    --font-head: 'Poppins', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--navy);
    margin: 0;
    line-height: 1.3;
}

.text-muted { color: var(--muted); }

[hidden] { display: none !important; }

/* ==========================================================================
   Login
   ========================================================================== */

.login-container {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 15% 15%, rgba(241, 121, 30, .12), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(28, 111, 176, .14), transparent 45%),
        var(--navy-dark);
}

.login-card {
    width: min(100%, 420px);
    background: var(--surface);
    border-radius: 18px;
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-header h1 {
    font-size: 22px;
    letter-spacing: -.02em;
}

.login-header p {
    margin: 6px 0 0;
    color: var(--orange);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* ==========================================================================
   Dashboard shell
   ========================================================================== */

.dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    height: var(--header-h);
    background: var(--navy-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.header-brand h1 {
    color: #fff;
    font-size: 17px;
    letter-spacing: -.01em;
}

.header-subtitle {
    display: block;
    font-size: 11px;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-email {
    font-size: 13px;
    color: rgba(255, 255, 255, .7);
    margin-right: 4px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-body {
    flex: 1;
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    align-items: start;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.dashboard-sidebar {
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: 20px 12px;
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    color: var(--navy);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: background .15s, color .15s;
    position: relative;
}

.nav-item:hover {
    background: #EEF4FB;
}

.nav-item.active {
    background: var(--navy);
    color: #fff;
    font-weight: 600;
}

.nav-item.active .nav-icon {
    filter: none;
}

.nav-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   Main area
   ========================================================================== */

.dashboard-main {
    padding: 30px 32px 60px;
    max-width: 1080px;
    width: 100%;
    min-width: 0;
}

.main-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.main-header h2 {
    font-size: 24px;
    letter-spacing: -.02em;
}

.main-header p {
    margin: 4px 0 0;
    font-size: 14px;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
    background: #FBFCFE;
}

.card-header h3 {
    font-size: 16px;
}

.card-body {
    padding: 22px;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group {
    margin-bottom: 16px;
    flex: 1;
    min-width: 0;
}

.form-group-narrow {
    flex: 0 0 150px;
}

label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--navy);
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--navy-light);
    box-shadow: 0 0 0 3px rgba(28, 111, 176, .14);
}

input::placeholder,
textarea::placeholder {
    color: #9AA8BD;
}

input[type="file"] {
    padding: 8px;
    font-size: 13px;
    cursor: pointer;
    background: #FBFCFE;
}

textarea {
    resize: vertical;
    min-height: 88px;
}

.field-hint {
    display: block;
    font-weight: 400;
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

.form-row {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 500;
    font-size: 14px;
    color: var(--ink);
    cursor: pointer;
    padding-top: 26px;
    margin: 0;
    white-space: nowrap;
}

.checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--orange);
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.file-preview {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    background: var(--orange-soft);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--navy);
}

.file-preview img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.file-preview .preview-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, opacity .15s;
    white-space: nowrap;
    text-decoration: none;
}

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

.btn-primary {
    background: var(--orange);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--orange-dark);
}

.btn-secondary {
    background: rgba(255, 255, 255, .12);
    color: #000000;
    border-color: rgb(0, 0, 0);
    padding: 8px 14px;
    font-size: 13px;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, .2);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border-color: var(--line);
    padding: 8px 14px;
    font-size: 13px;
}

.dashboard-header .btn-ghost {
    color: rgba(255, 255, 255, .8);
    border-color: rgba(255, 255, 255, .25);
}

.dashboard-header .btn-ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.btn-ghost:hover:not(:disabled) {
    background: #F1F5F9;
    color: var(--ink);
}

.btn-danger {
    background: var(--red-soft);
    color: var(--red);
    border-color: #FCA5A5;
}

.btn-danger:hover:not(:disabled) {
    background: var(--red);
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.btn-spinner {
    letter-spacing: 2px;
    animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: .35; }
    50% { opacity: 1; }
}

/* ==========================================================================
   Item list
   ========================================================================== */

.items-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}

.item-card:hover {
    border-color: #C7D6E8;
    box-shadow: var(--shadow-sm);
}

.item-thumb {
    width: 76px;
    height: 62px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: #EEF4FB;
    flex-shrink: 0;
}

.item-thumb-placeholder {
    width: 76px;
    height: 62px;
    border-radius: var(--radius-sm);
    background: #EEF4FB;
    display: grid;
    place-items: center;
    font-size: 24px;
    flex-shrink: 0;
}

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

.item-title {
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 4px;
    word-break: break-word;
}

.item-body {
    margin: 0 0 8px;
    font-size: 13.5px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Tags */

.tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .02em;
}

.tag-published {
    background: var(--green-soft);
    color: var(--green);
}

.tag-draft {
    background: #F1F5F9;
    color: var(--muted);
}

.tag-featured {
    background: var(--orange-soft);
    color: var(--orange-dark);
}

.tag-order {
    background: #EEF4FB;
    color: var(--navy-light);
}

.tag-link {
    background: #EEF4FB;
    color: var(--navy-light);
    text-decoration: none;
}

.tag-link:hover {
    background: #DDE9F6;
}

/* States */

.loading-state,
.empty-state {
    padding: 44px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.empty-state strong {
    display: block;
    color: var(--navy);
    font-family: var(--font-head);
    font-size: 15px;
    margin-bottom: 5px;
}

/* Inline delete confirmation */

.confirm-delete {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--red);
    font-weight: 500;
}

/* ==========================================================================
   Alerts & toasts
   ========================================================================== */

.alert {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    margin-bottom: 16px;
}

.alert-error {
    background: var(--red-soft);
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-success {
    background: var(--green-soft);
    color: var(--green);
    border: 1px solid #BBF7D0;
}

.toast-container {
    position: fixed;
    top: calc(var(--header-h) + 16px);
    right: 24px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    background: var(--navy);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toast-in .22s ease-out;
    pointer-events: auto;
    max-width: 360px;
}

.toast-success { background: #15803D; }
.toast-error { background: var(--red); }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 29, 59, .6);
    backdrop-filter: blur(2px);
}

.modal-dialog {
    position: relative;
    width: min(100%, 440px);
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: modal-in .2s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: none; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.modal-header h3 {
    font-size: 17px;
}

.modal-close {
    background: none;
    border: 0;
    font-size: 26px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 0 4px;
}

.modal-close:hover { color: var(--ink); }

.modal-body {
    padding: 22px;
}

/* ==========================================================================
   Disclosure module (tabbed screen)
   ========================================================================== */

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px;
    overflow-x: auto;
}

.tab {
    padding: 10px 16px;
    border: 0;
    background: none;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}

.tab:hover { color: var(--navy); }

.tab.active {
    color: var(--navy);
    border-bottom-color: var(--orange);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-family: var(--font-head);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid var(--line);
}

.data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: 0; }

.data-table input {
    padding: 7px 10px;
    font-size: 13.5px;
}

.table-scroll {
    overflow-x: auto;
    margin: 0 -22px;
    padding: 0 22px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
    .dashboard-body {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: sticky;
        top: var(--header-h);
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 10px 12px;
        z-index: 20;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 6px;
        scrollbar-width: thin;
    }

    .nav-item {
        flex-shrink: 0;
        padding: 9px 13px;
        font-size: 13.5px;
    }

    .dashboard-main {
        padding: 22px 16px 48px;
    }
}

@media (max-width: 680px) {
    .dashboard-header {
        height: auto;
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        position: static;
    }

    .dashboard-sidebar { top: 0; }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .user-email {
        flex-basis: 100%;
        max-width: none;
    }

    .toast-container {
        top: auto;
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .toast { max-width: none; }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group-narrow { flex-basis: auto; }

    .checkbox-label { padding-top: 0; margin-bottom: 16px; }

    .item-card {
        flex-direction: column;
    }

    .item-actions { width: 100%; }

    .item-actions .btn { flex: 1; }

    .card-body { padding: 16px; }

    .table-scroll { margin: 0 -16px; padding: 0 16px; }

    .login-card { padding: 30px 22px; }
}

/* ==========================================================================
   Mandatory Disclosure screen
   ========================================================================== */

.disclosure-screen {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---- academic session bar ---- */
.disclosure-session {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 20px;
    flex-wrap: wrap;
}

.disclosure-session label {
    white-space: nowrap;
    font-weight: 600;
    font-size: 14px;
    color: var(--navy);
}

.disclosure-session input {
    flex: 1;
    min-width: 160px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font: inherit;
    font-size: 14px;
    background: var(--bg);
}

.disclosure-session input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(11, 46, 89, .08);
}

/* ---- tabs ---- */
.disclosure-tabs {
    display: flex;
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.disclosure-tab {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.disclosure-tab:hover { color: var(--navy); background: var(--bg); }
.disclosure-tab.active { color: #fff; background: var(--navy); }

.tab-count {
    font-size: 12px;
    background: rgba(255,255,255,.25);
    color: inherit;
    padding: 1px 8px;
    border-radius: 20px;
    min-width: 22px;
    text-align: center;
}

.disclosure-tab:not(.active) .tab-count {
    background: var(--line);
    color: var(--muted);
}

/* ---- panel ---- */
.disclosure-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}

.disclosure-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.disclosure-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.disclosure-row input {
    flex: 1;
    min-width: 140px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font: inherit;
    font-size: 14px;
    background: var(--bg);
}

.disclosure-row input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(11, 46, 89, .08);
}

.disclosure-row .disc-remove {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 14px;
    padding: 6px 10px;
}

.disclosure-row .disc-remove:hover {
    color: var(--red);
    background: var(--red-soft);
}

.disclosure-add {
    align-self: flex-start;
    color: var(--navy-light);
    font-weight: 500;
    margin-top: 6px;
}

.disclosure-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

/* ---- row cards (B / C) ---- */
.dr-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dr-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
    transition: border-color .15s;
}

.dr-card:hover { border-color: var(--navy-light); }

.dr-card-body {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dr-card-body strong {
    font-size: 14px;
    color: var(--ink);
}

.dr-card-body span {
    font-size: 13px;
    color: var(--muted);
}

.dr-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---- row editor form ---- */
.dr-form {
    margin-top: 16px;
    border: 2px solid var(--navy-light);
}

/* ---- reorder buttons for disclosure rows and cards ---- */
.row-reorder-btns {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    flex-shrink: 0;
}

.row-reorder-btns .btn,
.dr-card-actions .dr-reorder-btn {
    padding: 3px 7px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    min-width: 26px !important;
    height: 28px !important;
    color: var(--navy) !important;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .15s ease;
}

.row-reorder-btns .btn:hover:not(:disabled),
.dr-card-actions .dr-reorder-btn:hover:not(:disabled) {
    background: var(--navy);
    color: #fff !important;
    border-color: var(--navy);
}

.row-reorder-btns .btn:disabled,
.dr-card-actions .dr-reorder-btn:disabled {
    opacity: 0.28 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* ---- sub-sections in disclosure panel ---- */
.disc-sub-header {
    margin: 28px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.disc-sub-header:first-child {
    margin-top: 0;
}
.disc-sub-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}
.disc-sub-desc {
    font-size: 12.5px;
    color: var(--muted);
    margin: 3px 0 0;
}

/* ---- results table in CMS ---- */
.disc-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}
.disc-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    min-width: 650px;
}
.disc-admin-table th {
    background: var(--bg);
    color: var(--navy);
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}
.disc-admin-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.disc-admin-table tr:last-child td {
    border-bottom: none;
}
.disc-admin-table input[type="text"] {
    width: 100%;
    padding: 6px 10px;
    font-size: 13.5px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-sizing: border-box;
}
.disc-admin-table input[type="text"]:focus {
    outline: none;
    border-color: var(--navy-light);
}
.disc-input-sno {
    width: 50px !important;
    text-align: center;
}

/* ---- responsive ---- */
@media (max-width: 900px) {
    .disclosure-session {
        flex-direction: column;
        align-items: stretch;
    }

    .disclosure-tabs {
        padding: 4px;
        gap: 2px;
    }

    .disclosure-tab {
        padding: 6px 12px;
        font-size: 13px;
        gap: 4px;
    }

    .dr-card {
        flex-direction: column;
        align-items: stretch;
    }

    .dr-card-actions {
        justify-content: flex-start;
    }
}

/* ==========================================================================
   Sidebar extras — divider between the new top-level screens and the
   page-content modules, plus the unread count bubble.
   ========================================================================== */

.nav-divider {
    height: 1px;
    margin: 9px 4px;
    border: 0;
    background: var(--line);
}

.nav-badge {
    margin-left: auto;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--orange);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
    line-height: 18px;
}

.nav-item.active .nav-badge {
    background: #fff;
    color: var(--navy);
}

/* Shared "segmented filter" look for the toolbars below. */
.btn-ghost.is-on {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

/* ==========================================================================
   Site Photos screen
   ========================================================================== */

.media-screen {
    display: block;
}

.media-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
}

.media-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.media-note {
    margin: 0;
    max-width: 420px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--muted);
}

.media-group {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 26px 0 12px;
    font-family: var(--font-head);
    font-size: 14px;
    color: var(--navy);
}

.media-group span {
    padding: 2px 8px;
    border-radius: 999px;
    background: #EEF4FB;
    color: var(--navy-light);
    font-size: 11.5px;
    font-weight: 700;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.media-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Hidden on the site, so the card reads as switched off. Scoped to the picture
   rather than the whole thumb so the "Hidden" badge over it stays legible. */
.media-card.is-hidden .media-thumb img,
.media-card.is-hidden .media-thumb-missing {
    opacity: .4;
    filter: grayscale(1);
}

.media-thumb {
    aspect-ratio: 3 / 2;
    background: var(--bg);
    position: relative;
}

/* Reads over the thumbnail itself, so a hidden photo is obvious while scanning
   the grid rather than only from the tag under the title. */
.media-hidden-flag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(17, 24, 39, .82);
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-thumb-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--red);
    font-size: 13px;
    font-weight: 600;
}

.media-info {
    padding: 12px 14px 0;
}

.media-info h5 {
    margin: 0 0 4px;
    font-family: var(--font-head);
    font-size: 14px;
    color: var(--navy);
}

.media-path {
    display: block;
    font-size: 11px;
    color: var(--muted);
    word-break: break-all;
}

.media-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 9px 0 7px;
    font-size: 11.5px;
    color: var(--muted);
}

.media-warn {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--red-soft);
    color: var(--red);
    font-weight: 600;
}

.media-pages {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.media-page {
    padding: 2px 8px;
    border-radius: 999px;
    background: #EEF4FB;
    color: var(--navy-light);
    font-size: 11px;
    font-weight: 600;
}

.media-page-none {
    background: #F1F5F9;
    color: var(--muted);
}

.media-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px 14px 14px;
    margin-top: auto;
}

/* The Replace control is a <label> wrapping a hidden file input, so it needs
   the button's pointer affordances spelled out. */
.media-upload {
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    opacity: 1;
}

.media-upload.is-busy {
    pointer-events: none;
    opacity: .6;
}

/* ==========================================================================
   Enquiries screen
   ========================================================================== */

.enquiry-screen {
    display: block;
}

.enquiry-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.enquiry-filters {
    display: flex;
    gap: 6px;
}

.enquiry-search {
    flex: 1 1 240px;
    min-width: 180px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 13.5px;
    color: var(--ink);
}

.enquiry-search:focus {
    outline: none;
    border-color: var(--navy-light);
    box-shadow: 0 0 0 3px rgba(28, 111, 176, .12);
}

.enquiry-tools {
    display: flex;
    gap: 7px;
}

.enquiry-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.enquiry-card {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

/* An orange edge is enough to pick unread messages out of the list. */
.enquiry-card.is-unread {
    border-left: 3px solid var(--orange);
    background: #FFFCF9;
}

.enquiry-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.enquiry-head h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 2px;
    font-family: var(--font-head);
    font-size: 15px;
    color: var(--navy);
}

.enquiry-when {
    font-size: 12px;
    color: var(--muted);
}

.enquiry-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 10px 0;
    font-size: 13px;
}

.enquiry-contact a {
    color: var(--navy-light);
    text-decoration: none;
    font-weight: 500;
}

.enquiry-contact a:hover {
    text-decoration: underline;
}

.enquiry-message {
    margin: 0 0 12px;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ink);
    white-space: pre-line;
}

.enquiry-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

@media (max-width: 900px) {
    .media-toolbar,
    .enquiry-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .media-grid {
        grid-template-columns: 1fr;
    }

    .enquiry-head {
        flex-direction: column;
    }
}

/* ==========================================================================
   Fee Structure CMS Screen
   ========================================================================== */

.fee-admin-screen {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.fee-admin-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.fee-admin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.fee-admin-card-head h3 {
    font-size: 17px;
    color: var(--navy);
    margin: 0;
}

.fee-admin-card-head p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.fee-table-wrap {
    overflow-x: auto;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.fee-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.fee-admin-table th {
    background: var(--bg);
    color: var(--navy);
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.fee-admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    vertical-align: middle;
}

.fee-admin-table tr:last-child td {
    border-bottom: none;
}

.fee-admin-table tr:hover td {
    background: #fafcff;
}

.fee-row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.fee-modal-form {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-bottom: 20px;
}

.fee-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr auto;
    gap: 12px;
    align-items: flex-end;
}

@media(max-width: 860px) {
    .fee-form-row {
        grid-template-columns: 1fr;
    }
}

.fee-pdf-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}

.fee-pdf-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fee-pdf-info .pdf-icon {
    font-size: 26px;
}

.fee-pdf-info strong {
    display: block;
    color: var(--navy);
    font-size: 14px;
}

.fee-pdf-info span {
    font-size: 12.5px;
    color: var(--muted);
}

