/*
 * Pastel palette, 60/30/10:
 *   60% dominant  -- --bg / --card-bg: near-white, lets the eye rest.
 *   30% secondary -- --secondary / --secondary-strong: soft pastel blue,
 *                    used purely to ORGANIZE (table headers, nested tree
 *                    levels), never for actions.
 *   10% accent    -- --primary: the one color that means "click here" --
 *                    every button/link/active-state in the app, and
 *                    nothing else, so it keeps standing out.
 */
:root {
    color-scheme: light;
    --bg: #F3F6FB;
    --card-bg: #ffffff;
    --text: #2C3648;
    --muted: #78849B;
    --border: #E3E9F3;

    --primary: #4A7FDB;
    --primary-hover: #3868C0;

    --secondary: #E4ECFA;
    --secondary-strong: #CBDCF2;
    --secondary-text: #3B5A82;

    --error-bg: #FCECEC;
    --error-text: #C0453D;
    --success-bg: #EAF7EF;
    --success-text: #2F8F52;
    --warning-bg: #FDF3E3;
    --warning-text: #B36B1E;
    --info-bg: #E9F1FC;
    --info-text: #3B6EA5;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Sarabun', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
}

button, input, select, textarea {
    font-family: inherit;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    /* Flat, calmer chrome instead of a bold gradient -- the app's one
       accent color (--primary) stays reserved for "click here" only. */
    background: var(--secondary-text);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.topbar .brand {
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.topbar .brand i { font-size: 1.35rem; }

.topbar nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu { position: relative; }

.user-menu > summary {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    transition: background 0.15s;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover { background: rgba(255, 255, 255, 0.15); }

.user-menu-caret { font-size: 0.7rem; opacity: 0.8; transition: transform 0.15s; }
.user-menu[open] .user-menu-caret { transform: rotate(180deg); }

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    padding: 0.4rem;
    z-index: 100;
}

.user-menu-dropdown a,
.user-menu-dropdown button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.5rem 0.7rem;
    border-radius: 6px;
    background: none;
    border: none;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
}
.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover { background: var(--bg); }
.user-menu-dropdown a i, .user-menu-dropdown button i { width: 1.1rem; text-align: center; color: var(--muted); }
.user-menu-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 0.3rem 0; }
.user-menu-dropdown form { margin: 0; }

.btn-topbar {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-topbar:hover { background: rgba(255, 255, 255, 0.28); }

.avatar {
    border-radius: 50%;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    flex-shrink: 0;
}

.avatar-sm { width: 28px; height: 28px; font-size: 0.85rem; }
.avatar-lg { width: 80px; height: 80px; font-size: 2rem; background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.avatar-placeholder { }

.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin: 1.25rem 0;
}
.login-divider::before, .login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}
.login-divider span { padding: 0 0.75rem; }

.inline-form { display: inline; }

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }

.breadcrumb-sep { font-size: 0.7rem; color: var(--muted); }

.breadcrumb-current { color: var(--text); font-weight: 600; }

/* Full-width on every page (the old 840px-capped narrow variant is gone --
   .content-wide is now just an alias kept so existing views that still
   set $contentWide don't need to change). Individual pages that want a
   narrower single form (e.g. login) cap it locally on their own .card. */
.content, .content-wide {
    max-width: calc(100% - 3rem);
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem 2rem;
}

form label {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--muted);
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text) !important;
}
.checkbox-label input[type="checkbox"] { width: auto; margin: 0; }

form input[type="text"],
form input[type="password"],
form input[type="number"],
form input[type="file"],
form input[type="datetime-local"],
form textarea,
form select {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.25rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

form .btn { margin-top: 1.25rem; }

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.form-row > div { flex: 1; min-width: 180px; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-header h1 { margin: 0; }

form textarea { resize: vertical; min-height: 4rem; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

/* The 30% secondary color at work: table headers get a soft fill purely
   to organize the data below them, never to signal an action. */
th {
    background: var(--secondary);
    color: var(--secondary-text);
    font-weight: 600;
}

button {
    margin-top: 1.25rem;
    padding: 0.5rem 1.25rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

button:hover { background: var(--primary-hover); }

.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info-text);
}

/* --- Collapsible term/course tree (views/teacher/exams/index.php) ---
   Each nesting level gets its own fill purely to show depth (60/30/10's
   secondary color at work) -- EXCEPT the innermost level, the actual
   exam table, which stays plain/white so the real content it holds
   doesn't compete with the navigation chrome around it. */
.tree-term { margin-top: 1rem; padding: 0; overflow: hidden; }
.tree-term > summary, .tree-course > summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
}
.tree-term > summary {
    font-size: 1.05rem;
    background: var(--secondary);
    color: var(--secondary-text);
}
.tree-term > summary::-webkit-details-marker,
.tree-course > summary::-webkit-details-marker { display: none; }
.tree-caret { font-size: 0.75rem; color: inherit; opacity: 0.7; transition: transform 0.15s; }
details[open] > summary .tree-caret { transform: rotate(90deg); }
.tree-count {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.6);
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
}
.tree-body { padding: 1rem 1.5rem; background: var(--card-bg); }
.tree-course {
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    background: var(--card-bg);
    overflow: hidden;
}
.tree-course > summary {
    padding: 0.75rem 1rem;
    font-weight: 500;
    background: var(--secondary-strong);
    color: var(--secondary-text);
}
.tree-table { width: 100%; background: var(--card-bg); }
.tree-table th, .tree-table td { padding: 0.6rem 1rem; }

.hint {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: -0.5rem;
}

/* --- Status badges (views/teacher/exports/index.php) --- */
.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.badge-muted { background: var(--bg); color: var(--muted); }
.badge-success { background: var(--success-bg); color: var(--success-text); }
.badge-error { background: var(--error-bg); color: var(--error-text); }
.badge-info { background: var(--info-bg); color: var(--info-text); }
.badge-warning { background: var(--warning-bg); color: var(--warning-text); }

/* --- Live password-requirements checklist (public/assets/js/password-strength.js) --- */
.password-requirements {
    list-style: none;
    padding: 0;
    margin: 0.4rem 0 1rem;
    display: grid;
    gap: 0.3rem;
}
.password-requirements li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}
.password-requirements li i { width: 1rem; text-align: center; }
.password-requirements li.req-met { color: var(--success-text); }

.password-match-ok { color: var(--success-text); }
.password-match-bad { color: var(--error-text); }

/* --- Admin master-data overview (views/admin/data/overview.php) --- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.stat-card {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.1rem 1.3rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.stat-card:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.stat-card i.stat-icon { font-size: 1.3rem; color: var(--primary); }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; margin: 0.4rem 0 0.1rem; }
.stat-card .stat-label { color: var(--muted); font-size: 0.9rem; }
.stat-card .stat-sub { color: var(--muted); font-size: 0.78rem; margin-top: 0.4rem; }

/* --- Thai Buddhist-era calendar picker (public/assets/js/thai-datepicker.js) --- */
.thai-datetime-input {
    cursor: pointer;
    background: var(--card-bg);
}

.thai-datepicker-popup {
    position: absolute;
    z-index: 1000;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 0.75rem;
    width: 260px;
    font-size: 0.9rem;
}

.tdp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.tdp-nav {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    /* Without this it inherits the sitewide `button { color: #fff }`
       rule -- invisible white-on-white against this popup's white
       background until :hover/.tdp-selected happened to set a color. */
    color: var(--text);
}

.tdp-nav:hover {
    background: var(--secondary);
}

.tdp-weekdays, .tdp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.tdp-weekdays span {
    font-size: 0.75rem;
    color: var(--muted);
    padding: 0.2rem 0;
}

.tdp-day {
    background: none;
    border: none;
    padding: 0.35rem 0;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text); /* see .tdp-nav's comment -- same fix, same reason */
}

.tdp-day:hover {
    background: var(--secondary);
}

.tdp-day.tdp-selected {
    background: var(--primary, #2563eb);
    color: #fff;
}

.tdp-day.tdp-empty {
    cursor: default;
}

.tdp-time {
    margin-top: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tdp-time select {
    padding: 0.2rem;
}

.tdp-actions {
    margin-top: 0.6rem;
    display: flex;
    justify-content: space-between;
}

/* --- Question/option image thumbnail + zoom lightbox (question-editor.js) --- */
.img-zoom-wrap {
    position: relative;
    display: inline-block;
    cursor: zoom-in;
    line-height: 0;
}

.img-zoom-wrap img {
    max-width: 160px;
    max-height: 90px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid var(--border, #d1d5db);
    display: block;
}

.img-zoom-badge {
    position: absolute;
    right: 4px;
    bottom: 4px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    pointer-events: none;
}

.img-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    cursor: zoom-out;
}

/* Without this, `overlay.hidden = true` (JS) has NO visible effect: an
   author-stylesheet `display` always beats the UA stylesheet's
   `[hidden] { display: none }` regardless of specificity, so the class
   rule above was permanently winning and the overlay could never
   actually be dismissed by clicking it. */
.img-lightbox-overlay[hidden] {
    display: none;
}

.img-lightbox-overlay img {
    max-width: min(1440px, 95vw);
    max-height: min(900px, 95vh);
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.img-lightbox-close {
    position: absolute;
    top: 16px;
    right: 24px;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

/* --- Exam question preview modal (views/teacher/exams/index.php, public/assets/js/exam-preview.js) --- */
.exam-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    padding: 2rem;
}

/* See .img-lightbox-overlay[hidden] above for why this override is
   necessary -- an author-stylesheet `display` always beats the UA
   stylesheet's `[hidden] { display: none }` regardless of specificity. */
.exam-preview-overlay[hidden] {
    display: none;
}

.exam-preview-modal {
    background: var(--card-bg);
    border-radius: 8px;
    max-width: 900px;
    width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.exam-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.exam-preview-header h2 { margin: 0; font-size: 1.1rem; }

.exam-preview-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    flex-shrink: 0;
}
.exam-preview-close:hover { color: var(--text); }

.exam-preview-body {
    padding: 1.5rem;
    overflow-y: auto;
}

/* --- Image before/after-text position choice (question-editor.js) --- */
.img-position-overlay {
    position: fixed;
    inset: 0;
    background: rgba(44, 54, 72, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2100;
}

.img-position-box {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    text-align: center;
    max-width: 320px;
}

.img-position-box p { margin: 0 0 1rem; color: var(--text); }
.img-position-box .btn-group { justify-content: center; }

/* --- Quill question/option editor (views/teacher/questions/form.php) --- */
.editor-container { margin-top: 0.5rem; }
.editor-body { min-height: 6rem; background: #fff; }

.option-row {
    margin-top: 1.25rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
}

.option-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.option-row-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.95rem;
    color: var(--text);
}

.secondary-btn,
.remove-option-btn {
    margin-top: 0;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
}

.remove-option-btn {
    color: var(--error-text);
    border-color: var(--error-text);
}

.link-btn {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    color: var(--primary);
    font-size: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.remove-option-btn:hover { background: var(--error-bg); }

#add-option-btn {
    color: var(--primary);
    border-color: var(--primary);
    margin-top: 1rem;
}

#add-option-btn:hover { background: var(--secondary); }

/* --- Read-only rendering of stored question/option HTML --- */
.rich-content img { max-width: 100%; border-radius: 4px; }
.rich-content pre.ql-syntax { padding: 0.75rem; border-radius: 6px; overflow-x: auto; }

.question-card {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 1rem;
}

.question-card .question-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.option-preview {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.35rem 0;
}

.option-preview.is-correct { color: var(--success-text); font-weight: 600; }

/* --- Help disclosures (CSV-import AI prompt, code/formula guide) --- */
.help-box {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
}

.help-box summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary);
}

.help-box p, .help-box ul { margin: 0.75rem 0 0; }
.help-box ul { padding-left: 1.5rem; }
.help-box code {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    font-size: 0.9em;
}

.prompt-box {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    resize: vertical;
}

/* --- Student exam-taking (views/student/exams/take.php) --- */
.exam-timer-bar {
    position: sticky;
    top: 1rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

#timer-display { font-size: 1.1rem; color: var(--primary); }
#violation-display { color: var(--error-text); font-size: 0.9rem; }

.exam-progress-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
}
.exam-progress-track {
    flex: 1;
    height: 10px;
    background: var(--secondary);
    border-radius: 999px;
    overflow: hidden;
}
.exam-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.25s ease;
}
#exam-progress-text {
    font-size: 0.85rem;
    color: var(--muted);
    white-space: nowrap;
}

.answer-option {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    margin-top: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}

.answer-option:hover { background: var(--bg); }
.answer-option input[type="radio"] { margin-top: 0.3rem; }

.history-row td { padding: 0; background: var(--bg); }
.history-row table { margin: 0.5rem; width: calc(100% - 1rem); }

.history-detail-table { width: 100%; background: var(--bg); }
.history-detail-table th, .history-detail-table td { padding: 0.4rem 0.75rem; font-size: 0.9rem; }

.question-nav-btns { margin-top: 1.25rem; display: flex; justify-content: flex-end; }

#review-list { list-style: none; padding: 0; margin-top: 1rem; }
.review-item {
    padding: 0.6rem 0.75rem;
    margin-top: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.review-item.answered { color: var(--muted); background: var(--bg); }
.review-item.unanswered { border-color: var(--error-text); }
.review-item.unanswered .link-btn { text-decoration: none; font-weight: 600; }

/* --- Icon buttons (<a>/<button> styled alike, used for every nav action) --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    margin-top: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.4;
}

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

.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg); }

.btn-danger { background: transparent; border-color: var(--error-text); color: var(--error-text); }
.btn-danger:hover { background: var(--error-bg); }

.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.85rem; }

.btn-group { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* --- DataTables (jquery.dataTables) -- align its chrome with our Sarabun/card look --- */
.dataTables_wrapper { font-family: inherit; margin-top: 1rem; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    margin-left: 0.4rem;
}
table.dataTable thead th { border-bottom: 2px solid var(--border); }
table.dataTable tbody tr.dtrg-group td {
    background: var(--secondary);
    font-weight: 600;
    color: var(--secondary-text);
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
    border-radius: 4px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 4px;
}

/* --- Roster tables (ID separated into its own first column) --- */
.id-col { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; }
