/* ── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-0: #0f0f0f;
    --bg-1: #1a1a1a;
    --bg-2: #242424;
    --bg-3: #2d2d2d;
    --bg-4: #383838;

    --text-primary:   #e8e8e8;
    --text-secondary: #a0a0a0;
    --text-muted:     #666666;

    --accent-green:  #4ade80;
    --accent-green2: #166534;
    --accent-blue:   #60a5fa;
    --accent-red:    #f87171;
    --accent-orange: #fb923c;
    --accent-yellow: #facc15;

    --border: #333333;
    --border-light: #444444;

    --radius: 6px;
    --radius-lg: 10px;

    --shadow: 0 4px 16px rgba(0,0,0,0.5);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);

    --navbar-height: 60px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

html { font-size: 14px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-0);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ────────────────────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--navbar-height);
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 2rem;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-green);
    white-space: nowrap;
}

.nav-icon {
    width: 20px; height: 20px;
    stroke: var(--accent-green);
    fill: none;
    stroke-width: 1.5;
}

.navbar-links {
    display: flex;
    gap: 0.25rem;
    flex: 1;
}

.nav-link {
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--bg-3); color: var(--text-primary); text-decoration: none; }
.nav-link.active { background: var(--bg-3); color: var(--accent-green); }

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
}

.username {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ── Main content ──────────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.main-content.no-nav { padding-top: 0; }

.page-header {
    margin-bottom: 1.5rem;
}
.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}
.page-header p { color: var(--text-secondary); margin-top: 0.25rem; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

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

/* ── Login Page ────────────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at top, #1a2a1a 0%, var(--bg-0) 70%);
    padding: 1rem;
}

.login-card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: var(--shadow);
}

.login-logo { margin-bottom: 1rem; }
.login-icon { width: 80px; height: 80px; }

.login-card h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.login-note {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #5865F2;
    color: #fff;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    text-decoration: none;
}
.btn-discord:hover { background: #4752C4; transform: translateY(-1px); text-decoration: none; color: #fff; }
.btn-discord:active { transform: translateY(0); }

.discord-icon { width: 22px; height: 16px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary  { background: var(--accent-green2); color: var(--accent-green); border-color: var(--accent-green2); }
.btn-primary:hover  { background: #1a7a3c; text-decoration: none; color: var(--accent-green); }

.btn-ghost    { background: transparent; color: var(--text-secondary); border-color: var(--border-light); }
.btn-ghost:hover    { background: var(--bg-3); color: var(--text-primary); text-decoration: none; }

.btn-danger   { background: #7f1d1d; color: var(--accent-red); border-color: #7f1d1d; }
.btn-danger:hover   { background: #991b1b; text-decoration: none; color: var(--accent-red); }

.btn-sm  { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn-xs  { padding: 0.2rem 0.5rem; font-size: 0.75rem; }

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

/* ── Alerts ────────────────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error  { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: var(--accent-red); }
.alert-icon   { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.text-error   { color: var(--accent-red); }

/* ── Dashboard Stats ───────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; border-color: var(--border-light); }

.stat-icon { width: 44px; height: 44px; flex-shrink: 0; }
.stat-icon svg { width: 44px; height: 44px; }

.stat-card.stat-red    .stat-icon { color: var(--accent-red); }
.stat-card.stat-orange .stat-icon { color: var(--accent-orange); }
.stat-card.stat-yellow .stat-icon { color: var(--accent-yellow); }
.stat-card.stat-blue   .stat-icon { color: var(--accent-blue); }

.stat-label  { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-numbers { display: flex; align-items: baseline; gap: 0.5rem; margin-top: 0.25rem; }
.stat-total  { font-size: 1.75rem; font-weight: 700; color: var(--text-primary); line-height: 1; }
.stat-active { font-size: 0.8rem; color: var(--text-secondary); }

.recent-section h2 { font-size: 1.2rem; margin-bottom: 1rem; }

/* ── Tables ────────────────────────────────────────────────────────────── */
.table-wrapper {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--bg-2);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 0.875rem;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--bg-2); }
.table tbody tr.row-inactive td { opacity: 0.6; }

.id-cell      { color: var(--text-muted); font-family: var(--font-mono); width: 60px; }
.reason-cell  { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time-cell    { white-space: nowrap; color: var(--text-secondary); font-size: 0.8rem; }
.uuid-small   { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.mono         { font-family: var(--font-mono); font-size: 0.85rem; word-break: break-all; }
.empty-row    { text-align: center; color: var(--text-muted); padding: 2rem; }

.player-link  { color: var(--text-primary); font-weight: 500; }
.player-link:hover { color: var(--accent-green); text-decoration: none; }

.table-meta {
    margin: 0.75rem 0;
    font-size: 0.85rem;
}

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2em 0.6em;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-red    { background: rgba(248,113,113,0.15); color: var(--accent-red);    border: 1px solid rgba(248,113,113,0.3); }
.badge-orange { background: rgba(251,146,60,0.15);  color: var(--accent-orange); border: 1px solid rgba(251,146,60,0.3); }
.badge-yellow { background: rgba(250,204,21,0.15);  color: var(--accent-yellow); border: 1px solid rgba(250,204,21,0.3); }
.badge-blue   { background: rgba(96,165,250,0.15);  color: var(--accent-blue);   border: 1px solid rgba(96,165,250,0.3); }
.badge-green  { background: var(--accent-rgba);  color: var(--accent-green);  border: 1px solid color-mix(in srgb, var(--accent-green) 30%, transparent); }
.badge-gray   { background: rgba(100,100,100,0.15); color: var(--text-muted);    border: 1px solid rgba(100,100,100,0.3); }

.badge-lg { padding: 0.35em 0.9em; font-size: 0.85rem; }
.badge-xs { padding: 0.1em 0.4em; font-size: 0.7rem; }

/* ── Tabs ──────────────────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.tab {
    padding: 0.5rem 1rem;
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.15s;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    margin-bottom: -1px;
}
.tab:hover { color: var(--text-primary); text-decoration: none; }

.tab.active.tab-red    { color: var(--accent-red);    border-bottom-color: var(--accent-red);    background: rgba(248,113,113,0.06); }
.tab.active.tab-orange { color: var(--accent-orange); border-bottom-color: var(--accent-orange); background: rgba(251,146,60,0.06); }
.tab.active.tab-yellow { color: var(--accent-yellow); border-bottom-color: var(--accent-yellow); background: rgba(250,204,21,0.06); }
.tab.active.tab-blue   { color: var(--accent-blue);   border-bottom-color: var(--accent-blue);   background: rgba(96,165,250,0.06); }

/* ── Filters ───────────────────────────────────────────────────────────── */
.filter-form { margin-bottom: 1rem; }

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

.input {
    background: var(--bg-2);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
}
.input:focus { border-color: var(--accent-green); }
.filter-row .input { max-width: 360px; }

.textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: var(--text-secondary);
    white-space: nowrap;
}
.checkbox-label input[type="checkbox"] { accent-color: var(--accent-green); }

/* ── Pagination ────────────────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}
.pagination-info { color: var(--text-secondary); font-size: 0.875rem; }

/* ── Detail Page ───────────────────────────────────────────────────────── */
.detail-page { max-width: 1200px; }

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    transition: color 0.15s;
}
.back-link:hover { color: var(--text-primary); text-decoration: none; }

.detail-header {
    margin-bottom: 1.5rem;
}
.detail-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.detail-title h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

.detail-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1.5rem;
    align-items: start;
}

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

/* ── Info Card ─────────────────────────────────────────────────────────── */
.info-card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.info-card h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

.info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
}
.info-list dt {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    padding-top: 2px;
}
.info-list dd {
    color: var(--text-primary);
    font-size: 0.875rem;
    word-break: break-word;
}

/* ── History List ──────────────────────────────────────────────────────── */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    background: var(--bg-2);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.15s;
    flex-wrap: wrap;
}
.history-item:hover { background: var(--bg-3); border-color: var(--border-light); text-decoration: none; }

.history-item-current {
    background: color-mix(in srgb, var(--accent-green) 6%, transparent);
    border-color: color-mix(in srgb, var(--accent-green) 35%, transparent);
    cursor: default;
    font-weight: 500;
}

.history-item-inactive { opacity: 0.55; }

.history-reason { flex: 1; color: var(--text-secondary); font-size: 0.8rem; }
.history-date   { font-size: 0.75rem; white-space: nowrap; }

/* ── Evidence Panel ────────────────────────────────────────────────────── */
.evidence-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.evidence-header h2 { font-size: 1.2rem; font-weight: 600; }

.evidence-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.evidence-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
    background: var(--bg-1);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

.evidence-item {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.evidence-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.ev-avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
}
.ev-author { font-weight: 600; font-size: 0.85rem; }
.ev-date   { font-size: 0.75rem; margin-left: auto; }

.evidence-content { padding: 1rem; }

.ev-text {
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.ev-link {
    color: var(--accent-blue);
    word-break: break-all;
    font-size: 0.875rem;
}

.ev-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: var(--radius);
    cursor: pointer;
    display: block;
}
.ev-image:hover { opacity: 0.9; }

.ev-video {
    width: 100%;
    max-height: 400px;
    border-radius: var(--radius);
    background: #000;
}

.ev-filename {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

/* ── Evidence Form ─────────────────────────────────────────────────────── */
.evidence-form-card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}
.evidence-form-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.evidence-type-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.ev-tab {
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    background: var(--bg-2);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.15s;
}
.ev-tab:hover { color: var(--text-primary); border-color: var(--border-light); }
.ev-tab.active { background: var(--accent-green2); color: var(--accent-green); border-color: var(--accent-green2); }

.ev-panel { display: none; }
.ev-panel.active { display: block; }

/* ── Upload Zone ───────────────────────────────────────────────────────── */
.upload-zone {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-lg);
    position: relative;
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-green);
    background: color-mix(in srgb, var(--accent-green) 3%, transparent);
}

.upload-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.upload-zone-content svg {
    width: 36px; height: 36px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 1.5;
    margin-bottom: 0.25rem;
}

.file-input-hidden {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
}

.upload-preview {
    padding: 1rem;
    width: 100%;
}

.upload-preview img,
.upload-preview video {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius);
    display: block;
    margin-bottom: 0.5rem;
}

.upload-preview .preview-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ── Form actions ──────────────────────────────────────────────────────── */
.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.mt-1 { margin-top: 0.4rem; }

/* ── Modal ─────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal {
    background: var(--bg-2);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 380px;
    width: 100%;
    box-shadow: var(--shadow);
}

.modal h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.modal p  { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.25rem; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }

/* ── Misc utilities ────────────────────────────────────────────────────── */
.text-muted    { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.error-card { text-align: center; }
.error-code {
    font-size: 6rem;
    font-weight: 900;
    color: var(--bg-4);
    line-height: 1;
    margin-bottom: 0.5rem;
}
.error-card h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.error-card p  { color: var(--text-secondary); margin-bottom: 1.5rem; }

/* ── Profile Page ──────────────────────────────────────────────────────── */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 900px;
}
@media (max-width: 700px) { .profile-grid { grid-template-columns: 1fr; } }

.profile-discord {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
}

.profile-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.minecraft-linked {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-2);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 0.75rem;
}

.mc-head {
    width: 32px; height: 32px;
    image-rendering: pixelated;
    border-radius: 4px;
}

.profile-form { margin-top: 0.5rem; }

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.input-row {
    display: flex;
    gap: 0.5rem;
}
.input-row .input { flex: 1; }

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1rem 0;
}

.alert-success {
    background: color-mix(in srgb, var(--accent-green) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-green) 30%, transparent);
    color: var(--accent-green);
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    background: var(--bg-1);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    max-width: 500px;
    margin: 0 auto;
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-3);
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 0 0.4em;
    border-radius: 10px;
    min-width: 18px;
    margin-left: 0.3rem;
}

/* ── Guide Page ────────────────────────────────────────────────────────── */
.guide-page { max-width: 1100px; }

.guide-hero {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.guide-hero h1 { font-size: 1.8rem; margin-bottom: 0.4rem; }
.guide-hero p  { color: var(--text-secondary); font-size: 1rem; }

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
@media (max-width: 700px) { .guide-grid { grid-template-columns: 1fr; } }

.guide-card {
    display: flex;
    gap: 1.1rem;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    transition: border-color 0.15s;
}
.guide-card:hover { border-color: var(--border-light); }

.guide-step {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-green);
    color: #000;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.guide-card-body { flex: 1; }
.guide-card-body h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.guide-card-body p { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6; }

.guide-note {
    margin-top: 0.75rem;
    padding: 0.6rem 0.8rem;
    background: color-mix(in srgb, var(--accent-green) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-green) 25%, transparent);
    border-radius: var(--radius);
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}
.guide-note-icon { font-style: normal; color: var(--accent-green); flex-shrink: 0; }

.guide-steps-list, .guide-list {
    margin: 0.6rem 0 0 1.1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.9;
}

.guide-cta {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--accent-green);
    font-weight: 500;
}
.guide-cta:hover { text-decoration: underline; }

.guide-evidence-types {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.guide-ev-type {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.65rem 0.8rem;
    background: var(--bg-2);
    border-radius: var(--radius);
}
.guide-ev-icon { font-size: 1.2rem; flex-shrink: 0; line-height: 1.4; }
.guide-ev-type strong { font-size: 0.875rem; display: block; margin-bottom: 0.15rem; }
.guide-ev-type p { font-size: 0.78rem; color: var(--text-muted); margin: 0; }

.guide-ref {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
}
.guide-ref h2 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.guide-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.6rem;
}
.guide-ref-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-2);
    border-radius: var(--radius);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ── Loading spinner ───────────────────────────────────────────────────── */
.spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid var(--border-light);
    border-top-color: var(--accent-green);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar { padding: 0 1rem; gap: 1rem; }
    .navbar-links { display: none; }
    .main-content { padding: 1rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .filter-row .input { max-width: 100%; width: 100%; }
    .table th, .table td { padding: 0.6rem 0.75rem; }
    .reason-cell { max-width: 150px; }
}
