/* ReedBench – minimal baseline styles */
*, *::before, *::after { box-sizing: border-box; }

:root,
[data-theme="light"] {
    --bg: #fafaf8;
    --surface: #ffffff;
    --border: #e2e2e0;
    --text: #1a1a18;
    --text-muted: #6b6b68;
    --accent: #5b6e45;       /* reed green */
    --accent-hover: #48592f;
    --danger: #c0392b;
    --success: #2d7d46;
    --navbar-bg: #3d5228;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.09), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-accent: 0 4px 12px rgba(91,110,69,0.22);
}

[data-theme="dark"] {
    --bg: #1a1a18;
    --surface: #252523;
    --border: #3a3a38;
    --text: #e8e8e6;
    --text-muted: #9a9a97;
    --accent: #7a9460;       /* reed green — lighter for dark bg */
    --accent-hover: #91ad75;
    --danger: #e05c4b;
    --success: #4caf74;
    --navbar-bg: #2a3b1d;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.15);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.2);
    --shadow-accent: 0 4px 12px rgba(122,148,96,0.25);
    color-scheme: dark;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    margin: 0;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* ── Layout ──────────────────────────────────────────────────────────────── */

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: var(--navbar-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.brand-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.navbar-links { display: flex; gap: 1rem; align-items: center; }
.navbar-links a,
.navbar-links button {
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    transition: color 0.15s;
}
.navbar-links a:hover,
.navbar-links button:hover { color: #fff; }
.navbar .nav-active { color: #fff !important; font-weight: 600; }

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border);
}

/* ── Auth card ───────────────────────────────────────────────────────────── */

.auth-card {
    max-width: 420px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    border-top: 3px solid var(--accent);
    box-shadow: var(--shadow-md);
}
.auth-card h1 {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
}
.auth-links {
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */

.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.55rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    background: var(--surface);
    color: var(--text);
}
.form-group input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: transparent;
}
.form-group small {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 6px rgba(91,110,69,0.3);
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(91,110,69,0.35);
}
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #d5d5d0; }
.btn-full { width: 100%; text-align: center; margin-top: 0.5rem; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */

.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-error {
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    color: var(--danger);
}
.alert-success {
    background: #f0faf4;
    border: 1px solid #b7dfca;
    color: var(--success);
}
.alert-info {
    background: #f0f4fa;
    border: 1px solid #b7cadf;
    color: #1a3a5c;
}

/* ── Buttons (extended) ──────────────────────────────────────────────────── */

.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.875rem;
}
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a93226; color: #fff; }
.btn-link {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
}
.btn-link:hover { color: var(--accent-hover); }

/* ── Page header ─────────────────────────────────────────────────────────── */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}
.page-header h1 {
    margin: 0;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.action-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

/* ── Tabs ────────────────────────────────────────────────────────────────── */

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}
.tab {
    padding: 0.5rem 1.25rem;
    text-decoration: none;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-weight: 500;
    transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--text); }
.tab-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ── Filter bar ──────────────────────────────────────────────────────────── */

.filter-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.filter-bar input[type="search"],
.filter-bar select {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--surface);
    color: var(--text);
}
.filter-bar input[type="search"] { min-width: 200px; }

/* ── Model grid & cards ──────────────────────────────────────────────────── */

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.model-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.model-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}
.model-card-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}
.model-name {
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    color: var(--text);
}
.model-name:hover { color: var(--accent); }
.model-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}
.model-card-actions {
    margin-top: auto;
    padding-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */

.badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
}
.badge-warning { background: #fff3cd; color: #856404; }
.badge-public  { background: #d1f0dc; color: #1a6b37; }

/* ── Empty state ─────────────────────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    border: 2px dashed var(--border);
    border-radius: 12px;
}
.empty-state p { margin: 0 0 1rem; }

/* ── Model detail ────────────────────────────────────────────────────────── */

.model-detail {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.model-attribution {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.detail-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25rem 1.5rem;
    margin: 0;
}
.detail-list dt {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.detail-list dd {
    margin: 0;
    font-size: 0.875rem;
}
.model-description h3 {
    margin: 1rem 0 0.25rem;
    font-size: 1rem;
}
.model-description p { margin: 0; }

/* ── Profile table ───────────────────────────────────────────────────────── */

.profile-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 360px;
    font-size: 0.9rem;
}
.profile-table th {
    text-align: left;
    padding: 0.4rem 0.75rem;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.profile-table td {
    padding: 0.35rem 0.75rem;
    border-bottom: 1px solid var(--border);
}
.profile-table tbody tr:last-child td { border-bottom: none; }

/* ── Profile editor (form) ───────────────────────────────────────────────── */

.profile-editor {
    border-collapse: collapse;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}
.profile-editor th {
    text-align: left;
    padding: 0.3rem 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
}
.profile-editor td { padding: 0.2rem 0.4rem; }
.input-narrow { width: 90px; padding: 0.3rem 0.5rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.9rem; }

/* ── Forms (extended) ────────────────────────────────────────────────────── */

.form-group input[type="number"],
.form-group input[type="search"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    background: var(--surface);
    color: var(--text);
}
.form-group select:focus,
.form-group textarea:focus,
.form-group input[type="number"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.form-row .form-group { flex: 1; min-width: 160px; }
.form-group-inline { flex: 0 0 auto; display: flex; align-items: flex-end; padding-bottom: 1rem; }
.form-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-weight: normal; cursor: pointer; }
.required { color: var(--danger); }
.optional { color: var(--text-muted); font-size: 0.85em; font-weight: normal; }
.hint { font-size: 0.875rem; color: var(--text-muted); margin: 0 0 0.75rem; }

fieldset {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
legend {
    font-weight: 600;
    padding: 0 0.5rem;
    font-size: 1rem;
}

/* ── OIDC / auth extras ──────────────────────────────────────────────────── */

.oidc-buttons { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.btn-oidc {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-oidc:hover { background: var(--bg); color: var(--text); }
.oidc-icon { width: 18px; height: 18px; flex-shrink: 0; }
.divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Model show sections ─────────────────────────────────────────────────── */

.model-info,
.model-profile,
.model-geometry {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}
.model-info h2,
.model-profile h2,
.model-geometry h2 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}
.model-actions { padding-top: 0.5rem; }

/* ── Model report ────────────────────────────────────────────────────────── */

[x-cloak] { display: none !important; }

#model-report-section { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }

.report-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.report-link:hover { color: #dc3545; }

.model-report {
    margin-top: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: 6px;
    max-width: 480px;
}
.model-report h3 { margin: 0 0 0.75rem; font-size: 1rem; }
.model-report select,
.model-report textarea {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
}
.model-report textarea { resize: vertical; }

.report-thanks {
    font-size: 0.9rem;
    color: #1a6b37;
    background: #d1f0dc;
    border: 1px solid #a3d9b8;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    display: inline-block;
}

/* ── Reed list ───────────────────────────────────────────────────────────── */

.reed-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.reed-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.reed-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.reed-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.reed-card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.reed-card-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 0.75rem;
}

/* Status badge colours */
.badge-status-in_progress  { background: #d4edda; color: #155724; }
.badge-status-finished     { background: #cce5ff; color: #004085; }
.badge-status-retired      { background: #e2e3e5; color: #383d41; }
.badge-status-discarded    { background: #f8d7da; color: #721c24; }

/* ── Reed show ───────────────────────────────────────────────────────────── */

.reed-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .reed-detail {
        grid-template-columns: 280px 1fr;
        grid-template-rows: auto auto;
    }
    .reed-info          { grid-column: 1; grid-row: 1; }
    .reed-chart-section { grid-column: 2; grid-row: 1; }
    #sessions-panel     { grid-column: 1 / -1; grid-row: 2; }
}

.reed-info {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    align-self: start;
    box-shadow: var(--shadow-sm);
}
.reed-info h2 { margin: 0 0 0.75rem; font-size: 1.05rem; }

.reed-notes {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.95rem;
    line-height: 1.6;
}
.reed-notes > :first-child { margin-top: 0; }
.reed-notes > :last-child  { margin-bottom: 0; }

.reed-chart-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}
.reed-chart-section h2 { margin: 0 0 1rem; font-size: 1.05rem; }

.chart-wrap {
    position: relative;
    width: 100%;
    max-height: 320px;
}
.chart-wrap canvas { max-height: 320px; }

/* ── Session panel ───────────────────────────────────────────────────────── */

.session-add {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}
.session-add h2 { margin: 0 0 1rem; font-size: 1.05rem; }

.session-entry-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.session-entry-table th {
    text-align: left;
    padding: 0.4rem 0.6rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    white-space: nowrap;
}
.session-entry-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.input-narrow { width: 5.5rem; }

.session-history { display: flex; flex-direction: column; gap: 1rem; }
.session-history h2 { margin: 0 0 0.75rem; font-size: 1.05rem; }

.session-entry-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.session-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.session-label { font-size: 0.95rem; }

.session-measurements-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.session-measurements-table th {
    text-align: left;
    padding: 0.35rem 0.6rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}
.session-measurements-table td {
    padding: 0.3rem 0.6rem;
    border-bottom: 1px solid var(--border);
}
.session-measurements-table tr:last-child td { border-bottom: none; }

/* Deviation colouring */
.dev-ok    { color: var(--success, #2d6a4f); font-weight: 600; }
.dev-over  { color: var(--danger);  font-weight: 600; }
.dev-under { color: #b05000;        font-weight: 600; }

/* ── Prose (rendered Markdown) ───────────────────────────────────────────── */

.prose h1, .prose h2, .prose h3 { margin-top: 1em; }
.prose p  { margin: 0.5em 0; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose table { border-collapse: collapse; width: 100%; margin: 0.75em 0; }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.35rem 0.6rem; }
.prose th { background: var(--bg); font-weight: 600; }
.prose code { font-family: monospace; background: var(--bg); border-radius: 3px; padding: 0.1em 0.3em; font-size: 0.9em; }
.prose pre  { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 0.75rem 1rem; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }

/* ── Photos ──────────────────────────────────────────────────────────────── */

.tip-photo,
.reed-photo-img {
    display: block;
    max-width: 100%;
    max-height: 320px;
    border-radius: 6px;
    border: 1px solid var(--pico-muted-border-color);
    margin-top: 0.5rem;
    object-fit: contain;
}

.model-photo,
.reed-photo {
    margin-top: 1rem;
}

.photo-pending {
    margin-top: 0.75rem;
}

/* ── Account page ────────────────────────────────────────────────────────── */

.account-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 540px;
}

.account-section {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}
.account-section:last-child { border-bottom: none; }
.account-section h2 {
    margin: 0 0 1rem;
    font-size: 1.05rem;
}

.account-current-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

/* Linked identities list */
.identity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.identity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: 5px;
}
.identity-provider {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Active nav link */
.nav-active {
    font-weight: 600;
    text-decoration: none;
    color: var(--accent);
}

/* ── Admin pages ─────────────────────────────────────────────────────────── */

.admin-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2rem;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    min-width: 130px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s, box-shadow 0.2s, transform 0.1s;
}
a.stat-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card-alert  { border-color: #d9534f; background: #fff5f5; }
.stat-card-plain  { cursor: default; }
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}
.stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.admin-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Report cards */
.admin-report-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.admin-report-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.admin-report-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}
.admin-report-reason {
    font-weight: 600;
}
.admin-report-time {
    font-size: 0.8rem;
    color: #888;
}
.admin-report-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #555;
}
.admin-report-actions {
    display: flex;
    gap: 0.5rem;
}

/* Admin table */
.table-wrapper { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.admin-table th,
.admin-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}
.admin-table th { font-weight: 600; background: #f8f9fa; }
.admin-table-date { color: #888; font-size: 0.8rem; }

/* Admin badge */
.badge-admin {
    background: #6c3483;
    color: #fff;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Danger button */
.btn-danger {
    background: #d9534f;
    color: #fff;
    border: none;
}
.btn-danger:hover { background: #c9302c; }

/* ── Dark mode overrides ─────────────────────────────────────────────────── */
/* Hardcoded colors that don't reference CSS variables need explicit overrides. */

[data-theme="dark"] .btn-secondary:hover { background: #4a4a48; }

[data-theme="dark"] .alert-error   { background: #2d1515; border-color: #6b2020; }
[data-theme="dark"] .alert-success { background: #0f2a1a; border-color: #1f5a35; }
[data-theme="dark"] .alert-info    { background: #0f1e2d; border-color: #1f3f5a; color: #7fb3d9; }

[data-theme="dark"] .badge-warning { background: #3a2c00; color: #f5c842; }
[data-theme="dark"] .badge-public  { background: #0b2e18; color: #5fd48a; }

[data-theme="dark"] .badge-status-in_progress { background: #0b2e18; color: #5fd48a; }
[data-theme="dark"] .badge-status-finished    { background: #0c2340; color: #7fb3d9; }
[data-theme="dark"] .badge-status-retired     { background: #2e2e30; color: #b0b0b4; }
[data-theme="dark"] .badge-status-discarded   { background: #2d1515; color: #e08080; }

[data-theme="dark"] .identity-item   { background: var(--surface); }

[data-theme="dark"] .model-report                               { background: var(--surface); }
[data-theme="dark"] .model-report select,
[data-theme="dark"] .model-report textarea                      { background: var(--bg); color: var(--text); }
[data-theme="dark"] .report-thanks { background: #0b2e18; color: #5fd48a; border-color: #1f5a35; }

[data-theme="dark"] .stat-card                                  { background: var(--surface); }
[data-theme="dark"] .stat-card-alert                            { background: #2d1515; border-color: #8b2222; }
[data-theme="dark"] .stat-label                                 { color: var(--text-muted); }

[data-theme="dark"] .admin-report-card                          { background: var(--surface); }
[data-theme="dark"] .admin-report-time,
[data-theme="dark"] .admin-report-details                       { color: var(--text-muted); }

[data-theme="dark"] .admin-table th                             { background: var(--bg); }
[data-theme="dark"] .admin-table-date                           { color: var(--text-muted); }

[data-theme="dark"] .session-entry-table th,
[data-theme="dark"] .session-measurements-table th              { background: var(--bg); }
