/* === Base === */
:root {
    --bg: #0f0f0f;
    --bg-card: #1a1a1a;
    --bg-hover: #242424;
    --bg-overlay: rgba(0, 0, 0, 0.85);
    --text: #e0e0e0;
    --text-muted: #888;
    --text-dim: #555;
    --accent: #6c8cff;
    --accent-hover: #8aa4ff;
    --border: #2a2a2a;
    --btn-a: #4a7c59;
    --btn-a-hover: #5a9469;
    --btn-b: #7c4a6e;
    --btn-b-hover: #945a86;
    --btn-draw: #5a5a5a;
    --up: #4caf50;
    --down: #ef5350;
    --radius: 8px;
    --radius-lg: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

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

/* === Layout === */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* === Header === */
.home-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.home-header h1 { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.02em; }
.subtitle { color: var(--text-muted); margin: 0.25rem 0 1.25rem; }

.page-header { margin-bottom: 2rem; }
.page-header h1 { margin-top: 0.5rem; }
.back-link { font-size: 0.9rem; color: var(--text-muted); }
.back-link:hover { color: var(--text); }

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.btn:hover { background: var(--bg-hover); }
.btn-primary { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #000; }
.btn-secondary { background: transparent; }
.btn-ghost { background: transparent; border: none; color: var(--text-muted); padding: 0.4rem 0.8rem; }
.btn-ghost:hover { color: var(--text); }
.btn-large { padding: 0.8rem 2rem; font-size: 1.1rem; }
.btn-danger { background: transparent; border-color: #c53030; color: #c53030; }
.btn-danger:hover { background: #c53030; color: #fff; }

.btn-a { background: var(--btn-a); border-color: var(--btn-a); color: #fff; }
.btn-a:hover { background: var(--btn-a-hover); border-color: var(--btn-a-hover); color: #fff; }
.btn-b { background: var(--btn-b); border-color: var(--btn-b); color: #fff; }
.btn-b:hover { background: var(--btn-b-hover); border-color: var(--btn-b-hover); color: #fff; }
.btn-draw { background: var(--btn-draw); border-color: var(--btn-draw); color: #fff; }
.btn-draw:hover { opacity: 0.9; color: #fff; }

.matchup-actions {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
}
.btn-skip {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
}

/* === Tournament cards === */
.tournament-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.tournament-card {
    display: block;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.15s;
    color: var(--text);
}
.tournament-card:hover { background: var(--bg-hover); border-color: var(--text-dim); color: var(--text); }
.tournament-card h3 { margin-bottom: 0.25rem; }
.card-description { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.card-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.badge {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-binary { background: #2a3a2a; color: #7cb87c; }
.badge-granular { background: #3a2a3a; color: #b87cb8; }

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* === Detail page === */
.detail-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    flex: 1;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}
.stat-value { display: block; font-size: 1.5rem; font-weight: 700; }
.stat-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

.detail-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.detail-actions-primary {
    grid-column: 1 / -1;
}
.detail-actions .btn { width: 100%; text-align: center; display: flex; align-items: center; justify-content: center; }

.add-items-section { border-top: 1px solid var(--border); padding-top: 1.5rem; padding-bottom: 0.5rem; }
.add-items-section h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.form-inline { display: flex; gap: 0.75rem; align-items: center; }

/* Excluded items */
.excluded-section {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 2rem;
}
.excluded-section h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.excluded-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}
.excluded-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.excluded-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.excluded-name { font-size: 0.9rem; }
.btn-sm { font-size: 0.8rem; padding: 0.25rem 0.6rem; }

.danger-zone { border-top: 1px solid #c53030; padding-top: 1.5rem; margin-top: 2rem; padding-bottom: 2rem; }
.danger-zone h2 { font-size: 1.1rem; margin-bottom: 0.75rem; color: #c53030; }
.danger-actions { display: flex; flex-direction: column; gap: 1rem; }
.danger-actions form { display: flex; align-items: center; gap: 1rem; }
.danger-hint { color: var(--text-muted); font-size: 0.85rem; }

/* === Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-overlay.hidden { display: none; }
.modal-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    width: 100%;
    max-width: 480px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.modal-header h2 { margin: 0; font-size: 1.2rem; }

/* === Forms === */
.form { max-width: 600px; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 500; }
.optional { color: var(--text-muted); font-weight: 400; font-size: 0.85rem; }

input[type="text"], textarea, select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
}
input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}
textarea.mono { font-family: 'SF Mono', 'Menlo', 'Monaco', monospace; font-size: 0.85rem; }

input[type="file"] {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }
.form-hint code { background: var(--bg-hover); padding: 0.1rem 0.35rem; border-radius: 3px; font-size: 0.8rem; }
.form-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.form-actions { display: flex; gap: 0.75rem; }

.radio-group { display: flex; flex-direction: column; gap: 0.5rem; }
.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s;
}
.radio-label:hover { border-color: var(--text-dim); }
.radio-description { color: var(--text-muted); font-size: 0.85rem; margin-left: auto; }
.radio-group-inline { flex-direction: row; gap: 0.75rem; }
.radio-group-inline .radio-label { flex: none; }

/* === Data preview === */
.data-preview {
    margin-top: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    background: var(--bg-card);
}
.preview-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.preview-scroll {
    overflow-x: auto;
}
.data-preview .rankings-table {
    font-size: 0.8rem;
}
.data-preview .rankings-table td,
.data-preview .rankings-table th {
    padding: 0.3rem 0.6rem;
    white-space: nowrap;
}

/* === Matchup page === */
.matchup-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.matchup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.matchup-counter { color: var(--text-muted); font-size: 0.9rem; }
.convergence-badge { color: var(--text-muted); font-size: 0.9rem; background: var(--bg-card); padding: 0.2rem 0.6rem; border-radius: 4px; }

.matchup-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}
.matchup-body #matchup-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mini-leaderboard {
    width: 280px;
    flex-shrink: 0;
    border-left: 1px solid var(--border);
    padding: 1rem;
    overflow-y: auto;
    font-size: 0.8rem;
}
.mini-leaderboard h3 {
    font-size: 0.85rem;
    margin: 0 0 0.75rem 0;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.mini-leaderboard ol {
    list-style: none;
    margin: 0;
    padding: 0;
}
.lb-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0 0.25rem 0.5rem;
    border-bottom: 1px solid var(--border);
}
.lb-rank {
    color: var(--text-muted);
    width: 2rem;
    flex-shrink: 0;
}
.lb-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lb-score {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Leaderboard: highlight items in current matchup */
.lb-row.lb-match-a {
    background: rgba(70, 100, 180, 0.12);
    box-shadow: inset 2px 0 0 rgba(70, 100, 180, 0.5);
}
.lb-row.lb-match-a .lb-name { color: #fff; }
.lb-row.lb-match-b {
    background: rgba(180, 70, 70, 0.12);
    box-shadow: inset 2px 0 0 rgba(180, 70, 70, 0.5);
}
.lb-row.lb-match-b .lb-name { color: #fff; }

/* Leaderboard: rank movement indicators */
.lb-movement {
    font-size: 0.6rem;
    flex-shrink: 0;
    width: 1rem;
    text-align: center;
    animation: movement-fade-in 0.3s ease-out;
}
.lb-movement.moved-up { color: var(--up); }
.lb-movement.moved-down { color: var(--down); }
@keyframes movement-fade-in {
    from { opacity: 0; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
}

.matchup-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.matchup-cards {
    display: flex;
    flex: 1;
    min-height: 0;
}
.matchup-card {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.matchup-card.card-a {
    background: rgba(70, 100, 180, 0.08);
    border-right: 1px solid var(--border);
}
.matchup-card.card-b {
    background: rgba(180, 70, 70, 0.08);
}
.matchup-card { position: relative; }
.matchup-card h3 { font-size: 1.5rem; }
.matchup-card p { color: var(--text-muted); margin-top: 0.25rem; }
.matchup-card img { max-width: 100%; border-radius: var(--radius); }

/* Card menu (⋯ button) */
.card-menu {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
}
.card-a .card-menu { right: calc(0.75rem + 1px); }
.card-menu-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    line-height: 1;
    letter-spacing: 0.1em;
}
.card-menu-btn:hover { color: var(--text); background: var(--bg-hover); }
.card-menu-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.card-menu-dropdown.hidden { display: none; }
.card-menu-item {
    display: block;
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
}
.card-menu-item:hover { background: var(--bg-hover); }

.matchup-vs {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dim);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.matchup-cards { position: relative; }

.matchup-footer {
    flex-shrink: 0;
    padding: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.matchup-buttons { text-align: center; }

.btn-row {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}
.btn-row.binary .btn { min-width: 150px; }
.btn-row.granular .btn { min-width: 100px; font-size: 0.85rem; }
.label-mobile { display: none; }
.btn-row.granular .btn-strong { font-weight: 600; }

/* === Selection animations === */
@keyframes btn-flash {
    0% { filter: brightness(1); transform: scale(1); }
    50% { filter: brightness(1.5); transform: scale(1.06); }
    100% { filter: brightness(1.1); transform: scale(1); }
}
@keyframes card-flash-a {
    0% { background: rgba(70, 100, 180, 0.08); }
    50% { background: rgba(70, 100, 180, 0.28); }
    100% { background: rgba(70, 100, 180, 0.15); }
}
@keyframes card-flash-b {
    0% { background: rgba(180, 70, 70, 0.08); }
    50% { background: rgba(180, 70, 70, 0.28); }
    100% { background: rgba(180, 70, 70, 0.15); }
}
.btn.btn-selected {
    animation: btn-flash 0.25s ease-out;
}
.matchup-card.card-a.card-selected {
    animation: card-flash-a 0.25s ease-out forwards;
}
.matchup-card.card-b.card-selected {
    animation: card-flash-b 0.25s ease-out forwards;
}

/* === Stats overlay === */
.stats-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    overflow-y: auto;
    transition: opacity 0.2s;
}
.stats-overlay.hidden { display: none; }

.stats-overlay-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 900px;
    padding: 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.stats-header h2 { font-size: 1.3rem; }

/* === Stats tabs === */
.stats-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.tab {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* === Rankings table === */
.rankings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.rankings-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.rankings-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}
.rankings-table .rank { color: var(--text-muted); font-weight: 600; width: 3rem; }

/* === Metrics === */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.metric-card {
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: help;
}
.metric-value { display: block; font-size: 1.3rem; font-weight: 700; }
.metric-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

.convergence-card {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 1.5rem;
}
.convergence-value { font-size: 2rem; font-weight: 700; color: var(--accent); }
.convergence-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }
.convergence-card.muted { opacity: 0.6; }

.movers-list { margin-top: 0.75rem; }
.mover-row {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}
.mover-name { flex: 1; }
.mover-rank { color: var(--text-muted); margin-right: 1rem; font-size: 0.85rem; }
.mover-change { font-weight: 600; font-size: 0.9rem; }
.mover-change.up { color: var(--up); }
.mover-change.down { color: var(--down); }

/* === History tab === */
.history-table td { font-size: 0.85rem; }
.history-vs { color: var(--text-dim); text-align: center; width: 2rem; }
.history-result { font-weight: 600; font-size: 0.8rem; }
.history-result.result-a { color: #7cb8e0; }
.history-result.result-b { color: #e07cb8; }
.history-result.result-draw { color: var(--text-muted); }
.history-time { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }
.history-actions { width: 2rem; text-align: center; }
.btn-delete-matchup {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius);
    line-height: 1;
}
.btn-delete-matchup:hover { color: #c53030; background: rgba(197, 48, 48, 0.15); }

/* === Bump chart === */
#bump-chart {
    position: relative;
    width: 100%;
    min-height: 400px;
}
#bump-chart svg { width: 100%; }

.axis text { fill: var(--text-muted); font-size: 0.75rem; }
.axis line, .axis path { stroke: var(--border); }
.axis-label { fill: var(--text-muted); font-size: 0.8rem; }

.boundary-line {
    stroke: var(--accent);
    stroke-dasharray: 6, 4;
    stroke-width: 1;
    opacity: 0.5;
}
.boundary-label { fill: var(--accent); font-size: 0.75rem; opacity: 0.7; }

.line-label { font-size: 0.7rem; }

.chart-tooltip {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 10;
}

.bump-chart-controls {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.bump-chart-controls input[type="number"] {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    width: 64px;
    text-align: center;
}

.chart-empty, .chart-hint {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

.loading {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

/* === Login === */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 1.5rem;
}

.login-container h1 {
    font-size: 2rem;
    color: var(--text);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 280px;
}

.login-form input {
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 1rem;
}

.login-form button {
    padding: 0.6rem;
    border-radius: var(--radius);
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.login-form button:hover {
    background: var(--accent-hover);
}

.login-error {
    color: var(--down);
    font-size: 0.9rem;
    text-align: center;
}

/* === Responsive === */
@media (max-width: 768px) {
    /* Button label swap */
    .label-desktop { display: none; }
    .label-mobile { display: inline; }

    /* Matchup page */
    .matchup-cards { flex-direction: column; gap: 1rem; }
    .matchup-vs { display: none; }
    .btn-row.granular {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .btn-row.granular .btn-draw {
        grid-column: 1 / -1;
    }
    .mini-leaderboard { display: none; }

    /* Tournament detail page */
    .detail-stats { flex-wrap: wrap; }
    .detail-actions { grid-template-columns: repeat(2, 1fr); }

    /* Stats overlay */
    .stats-overlay { padding: 0; }
    .stats-overlay-content { max-width: 100%; border-radius: 0; max-height: 100vh; padding: 1rem; }
    .stats-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .tab { white-space: nowrap; flex-shrink: 0; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .rankings-table { font-size: 0.8rem; }
    .rankings-table th, .rankings-table td { padding: 0.4rem 0.5rem; }

    /* History table */
    .history-table .history-vs { display: none; }
    .history-table .history-time { display: none; }
    .history-table thead th:nth-child(2) { display: none; }
    .history-table thead th:nth-child(5) { display: none; }

    /* Modals */
    .modal-content { margin: 1rem; max-width: calc(100vw - 2rem); }

    /* Danger zone */
    .danger-actions form { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}
