/* Sun Wukong / Monkey King — VS Tracker theme */
:root {
    /* Warm stone & night — mountain temple feel */
    --bg-dark: #0c0a08;
    --bg-panel: #16110d;
    --bg-card: #1e1712;
    --border: #4a3428;
    --border-gold: #8b6914;
    /* Imperial gold & crimson — crown & sash */
    --gold: #e8b84a;
    --gold-bright: #f5d078;
    --gold-dim: #9a7020;
    --crimson: #b8323a;
    --crimson-glow: rgba(184, 50, 58, 0.35);
    --text: #f4ebe0;
    --text-muted: #a89888;
    --success: #3d7a5c;
    --error: #c45c5c;
    --font-display: "Ma Shan Zheng", "ZCOOL XiaoWei", serif;
    --font-heading: "ZCOOL XiaoWei", "Ma Shan Zheng", serif;
    --font-body: "Noto Sans SC", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

.theme-wukong {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    margin: 0;
    line-height: 1.6;
    /* Mist + golden hour haze */
    background-image:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(232, 184, 74, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 80% 50% at 100% 50%, rgba(184, 50, 58, 0.08) 0%, transparent 45%),
        radial-gradient(ellipse 60% 40% at 0% 80%, rgba(74, 52, 40, 0.4) 0%, transparent 50%);
}

.site-header {
    background: linear-gradient(180deg, #1f1812 0%, var(--bg-panel) 100%);
    border-bottom: 2px solid var(--border);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.45),
        inset 0 -1px 0 rgba(232, 184, 74, 0.15);
    padding: 0.85rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.nav-user-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 220px;
    line-height: 1.3;
}

.badge-admin {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold-bright);
    background: rgba(184, 50, 58, 0.35);
    border: 1px solid var(--crimson);
    border-radius: 4px;
}
.badge-admin--sm {
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.badge-temp {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(232, 184, 74, 0.12);
    border: 1px solid rgba(232, 184, 74, 0.35);
    border-radius: 4px;
    vertical-align: middle;
}

/* VS weeks hub */
.vs-weeks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.vs-week-card__dates {
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--crimson);
    margin-bottom: 0.35rem;
}
.vs-week-card__title {
    margin: 0 0 1rem;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--gold);
    line-height: 1.35;
}
.vs-week-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Auth pages (login / register alliance) */
.auth-page .auth-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.auth-logo {
    margin-bottom: 1.5rem;
    text-align: center;
}
.auth-card {
    width: 100%;
    max-width: 420px;
}
.auth-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 400;
    margin: 0 0 1rem;
    color: var(--text);
}
.auth-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 1.25rem;
    line-height: 1.5;
}
.auth-footer-links {
    margin-top: 1.25rem;
    text-align: center;
}
.auth-footer-links a {
    color: var(--gold);
    text-decoration: none;
}
.auth-footer-links a:hover {
    color: var(--gold-bright);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.checkbox-label input {
    margin-top: 0.25rem;
}

/* Auth forms: username & password match full card width */
.auth-form input[type="text"],
.auth-form input[type="password"] {
    max-width: none;
}

.logo {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.logo-text {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 45%, var(--gold-dim) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 40px rgba(232, 184, 74, 0.25);
}
.logo-sub {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--crimson);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    font-weight: 400;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.75rem;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s, text-shadow 0.2s;
}
.nav-links a:hover {
    color: var(--gold);
    text-shadow: 0 0 12px rgba(232, 184, 74, 0.4);
}

.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.flash-messages {
    margin-bottom: 1.5rem;
}
.flash {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}
.flash-success {
    background: rgba(61, 122, 92, 0.22);
    color: #9ed4b4;
    border: 1px solid var(--success);
}
.flash-error {
    background: rgba(196, 92, 92, 0.2);
    color: #f0a8a8;
    border: 1px solid var(--error);
}

/* Cards — lacquered panel */
.card {
    background: linear-gradient(145deg, var(--bg-card) 0%, #18120e 100%);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.card h2 {
    margin: 0 0 1rem;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 0.08em;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}
th,
td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(74, 52, 40, 0.6);
}
th {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
}
tr:hover td {
    background: rgba(232, 184, 74, 0.04);
}

.rank {
    width: 3rem;
    text-align: center;
    font-weight: 700;
    font-family: var(--font-body);
    color: var(--gold-dim);
}
.rank-1 {
    color: #ffdf6e;
    text-shadow: 0 0 12px rgba(255, 223, 110, 0.35);
}
.rank-2 {
    color: #d4c4b0;
}
.rank-3 {
    color: #c9a06c;
}
.points {
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
    font-family: var(--font-body);
}
.points-num {
    color: var(--gold-bright);
}

/* Buttons — gold seal */
.btn {
    display: inline-block;
    padding: 0.5rem 1.1rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn-primary {
    background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 50%, var(--gold-dim) 100%);
    color: #1a1208;
    box-shadow: 0 2px 8px rgba(232, 184, 74, 0.35);
}
.btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(232, 184, 74, 0.45);
}
.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--gold-dim);
    color: var(--gold);
}
.btn-danger {
    background: transparent;
    color: #e88888;
    border: 1px solid var(--crimson);
}
.btn-danger:hover {
    background: var(--crimson-glow);
}
.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.82rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    max-width: 400px;
    padding: 0.6rem 0.85rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    box-sizing: border-box;
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold-dim);
    box-shadow: 0 0 0 2px rgba(232, 184, 74, 0.15);
}
textarea {
    min-height: 80px;
    resize: vertical;
}

/* Page headers */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    margin: 0;
    color: var(--text);
    letter-spacing: 0.06em;
    text-shadow: 0 2px 20px rgba(232, 184, 74, 0.12);
}

/* Actions */
.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.actions-inline {
    display: inline-flex;
    gap: 0.5rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-family: var(--font-body);
}
.empty-state p {
    margin: 0.5rem 0;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-body);
    border-top: 1px solid rgba(74, 52, 40, 0.5);
    margin-top: 2rem;
}

/* Dashboard grid (legacy + home) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.page-dashboard {
    animation: dashboardFade 0.5s ease-out;
}

@keyframes dashboardFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* War banner — flanking monkey warriors (Sun Wukong theme), simple center title */
.dashboard-war-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.5rem, 3vw, 2rem);
    margin-bottom: 2rem;
    padding: 0.5rem 0 1rem;
    flex-wrap: wrap;
}

.dashboard-war-banner__intro {
    flex: 1 1 220px;
    text-align: center;
    min-width: 200px;
    max-width: 420px;
    order: 2;
}

.dashboard-war-banner__title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    font-weight: 400;
    margin: 0;
    color: var(--text);
    letter-spacing: 0.06em;
    text-shadow: 0 2px 24px rgba(232, 184, 74, 0.12);
}

.dashboard-war-banner__alliance {
    margin: 0.4rem 0 0;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-muted);
}

.dashboard-war-banner__monkey {
    flex: 0 0 auto;
    width: min(140px, 28vw);
    max-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.dashboard-war-banner__monkey--left {
    order: 1;
    animation: warMonkeyIdle 4.5s ease-in-out infinite;
}

.dashboard-war-banner__monkey--right {
    order: 3;
    animation: warMonkeyIdle 4.5s ease-in-out infinite 0.4s;
}

@keyframes warMonkeyIdle {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-4px) scale(1.02);
    }
}

.war-monkey-svg {
    width: 100%;
    height: auto;
    max-height: 180px;
    display: block;
    overflow: visible;
}

@media (max-width: 520px) {
    .dashboard-war-banner__monkey {
        width: min(100px, 32vw);
    }
    .dashboard-war-banner__intro {
        order: 0;
        flex-basis: 100%;
    }
    .dashboard-war-banner__monkey--left {
        order: 1;
    }
    .dashboard-war-banner__monkey--right {
        order: 2;
    }
}

/* Stat tiles */
.dashboard-grid--stats {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-bottom: 1.5rem;
}

.stat-tile {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    padding: 1.35rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: linear-gradient(160deg, rgba(30, 23, 18, 0.95) 0%, rgba(18, 14, 10, 0.98) 100%);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.stat-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
    border-color: rgba(232, 184, 74, 0.25);
}
.stat-tile--members .stat-tile__icon {
    color: var(--gold);
    background: rgba(232, 184, 74, 0.1);
}
.stat-tile--events .stat-tile__icon {
    color: var(--crimson);
    background: rgba(184, 50, 58, 0.15);
}

.stat-tile__icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(232, 184, 74, 0.2);
}
.stat-tile__svg {
    width: 32px;
    height: 32px;
}

.stat-tile__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.stat-tile__value {
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1;
    color: var(--gold-bright);
    letter-spacing: 0.06em;
}
.stat-tile__label {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Main dashboard split */
.dashboard-grid--main {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: start;
}

.card--elevated {
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.38);
}

.dashboard-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(74, 52, 40, 0.6);
}
.dashboard-card__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 0.06em;
}
.dashboard-card__link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: none !important;
    transition: color 0.2s;
}
.dashboard-card__link:hover {
    color: var(--gold);
}

.dashboard-grid--modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.dashboard-card__mode-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 0.5rem;
    line-height: 1.45;
}
.dashboard-card__mode-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* Desert Storm / Marshalls Guard folder board */
.game-folder-create {
    margin-bottom: 1.25rem;
}
.game-folder-create-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.game-folder-create-input {
    min-width: 200px;
    max-width: 100%;
    flex: 1 1 200px;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}
.game-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    align-items: start;
}
.game-board__column {
    background: rgba(12, 10, 8, 0.35);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    min-height: 100px;
}
.game-board__column-head {
    margin-bottom: 0.65rem;
}
.game-board__folder-title {
    font-size: 1rem;
    margin: 0 0 0.25rem;
    font-family: var(--font-display);
    color: var(--gold);
    letter-spacing: 0.04em;
}
.game-board__hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}
.game-board__folder-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.35rem;
}
.game-folder-rename-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}
.game-folder-rename-input {
    flex: 1 1 140px;
    min-width: 120px;
    padding: 0.3rem 0.45rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 0.85rem;
}
.game-folder__list {
    list-style: none;
    margin: 0;
    padding: 0;
    min-height: 40px;
}
.game-event-card {
    margin-bottom: 0.45rem;
}
.game-board--admin .game-event-card {
    cursor: grab;
}
.game-board--admin .game-event-card:active {
    cursor: grabbing;
}
.game-event-card__link {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.6rem 0.7rem;
    border-radius: 8px;
    background: rgba(232, 184, 74, 0.06);
    border: 1px solid rgba(232, 184, 74, 0.18);
    text-decoration: none;
    border-bottom: none !important;
    transition: background 0.15s, border-color 0.15s;
}
.game-event-card__link:hover {
    background: rgba(232, 184, 74, 0.1);
    border-color: rgba(232, 184, 74, 0.35);
}
.game-event-card__name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}
.game-event-card__dates {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.game-board__add-event {
    margin-top: 0.65rem;
    width: 100%;
    text-align: center;
}
.game-board__column--unfiled {
    border-style: dashed;
    opacity: 0.95;
}

.event-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.event-list__item {
    margin-bottom: 0.5rem;
}
.event-list__item:last-child {
    margin-bottom: 0;
}
.event-list__link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(12, 10, 8, 0.35);
    text-decoration: none;
    border-bottom: none !important;
    transition: background 0.2s, border-color 0.2s;
}
.event-list__link:hover {
    background: rgba(232, 184, 74, 0.06);
    border-color: rgba(232, 184, 74, 0.2);
}
.event-list__name {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
}
.event-list__dates {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dashboard-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--text-muted);
}
.dashboard-empty__hint {
    font-size: 0.9rem;
    margin: 0.5rem 0 0;
}

/* Step list */
.step-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}
.step-list__item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(74, 52, 40, 0.45);
    align-items: flex-start;
}
.step-list__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.step-list__num {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--gold-bright);
    background: linear-gradient(145deg, rgba(184, 50, 58, 0.35) 0%, rgba(30, 23, 18, 0.9) 100%);
    border: 1px solid rgba(232, 184, 74, 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.step-list__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.step-list__text strong {
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
}
.step-list__text a {
    border-bottom-width: 1px;
}

/* Score form */
.score-form {
    background: rgba(22, 17, 13, 0.8);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    margin-top: 1.5rem;
    border-left: 3px solid var(--crimson);
}
.score-form h3 {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--gold);
}
.score-form-grid {
    display: grid;
    grid-template-columns: 1fr 120px 1fr auto;
    gap: 1rem;
    align-items: end;
}
@media (max-width: 640px) {
    .score-form-grid {
        grid-template-columns: 1fr;
    }
    .logo-text {
        font-size: 1.65rem;
    }
    .page-header h1 {
        font-size: 1.6rem;
    }
}

/* Screenshot OCR import */
.import-help-list {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.import-help-note {
    margin: 1rem 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.import-help-note code {
    font-size: 0.78rem;
    color: var(--gold-dim);
    word-break: break-all;
}

.import-drop-form {
    margin-bottom: 1.5rem;
}
.import-dropzone {
    position: relative;
    padding: 2rem 1.5rem;
    text-align: center;
    border: 2px dashed rgba(232, 184, 74, 0.35);
    border-radius: 12px;
    background: rgba(12, 10, 8, 0.5);
    transition: border-color 0.2s, background 0.2s;
}
.import-dropzone--active {
    border-color: var(--gold);
    background: rgba(232, 184, 74, 0.06);
}
.import-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}
.import-dropzone-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    padding: 1rem;
}
.import-dropzone-icon {
    font-size: 2rem;
    opacity: 0.7;
}
.import-dropzone-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--gold);
}
.import-dropzone-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.import-file-list {
    margin: 1rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    word-break: break-all;
}
.import-scan-btn {
    margin-top: 0.5rem;
}

.import-preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}
.import-preview-table th,
.import-preview-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.import-preview-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}
.import-row--unmatched {
    background: rgba(184, 50, 58, 0.08);
}
.import-name-input {
    min-width: 10rem;
    max-width: 100%;
    width: 100%;
}
.import-points-input {
    width: 7rem;
    max-width: 100%;
}
.import-member-cell {
    min-width: 200px;
}
.import-member-select {
    max-width: 220px;
    width: 100%;
}
.import-row-actions {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
}
.import-row-actions .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}
.import-add-row-wrap {
    margin-top: 0.75rem;
}
.import-row--manual {
    background: rgba(59, 130, 246, 0.06);
}
.import-matched {
    color: var(--success);
    font-weight: 600;
}
.import-unmatched-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
    max-width: 260px;
}
.import-temp-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.import-or {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.import-apply-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.import-ocr-debug {
    margin-top: 1rem;
}
.import-ocr-debug summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.import-ocr-pre {
    margin: 1rem 0 0;
    padding: 1rem;
    font-size: 0.75rem;
    line-height: 1.45;
    overflow: auto;
    max-height: 320px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-word;
}

.table-wrap {
    overflow-x: auto;
}

/* Event leaderboard inline edit */
.event-lb-table .lb-name-input {
    width: 100%;
    max-width: 16rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}
.event-lb-table .lb-notes-input {
    width: 100%;
    min-width: 6rem;
    max-width: 14rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Global leaderboard inline rename (admin) */
.lb-inline-rename {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.lb-inline-rename .lb-name-input {
    flex: 1 1 140px;
    min-width: 120px;
    max-width: 220px;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}
.global-lb-table td {
    vertical-align: middle;
}

/* Merge members */
.merge-members-form .merge-select {
    width: 100%;
    max-width: 420px;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}
.merge-warning {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(184, 50, 58, 0.1);
    border: 1px solid rgba(184, 50, 58, 0.25);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Links inside content */
.main-content a:not(.btn):not(.logo) {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(232, 184, 74, 0.35);
    transition: color 0.2s, border-color 0.2s;
}
.main-content a:not(.btn):not(.logo):hover {
    color: var(--gold-bright);
    border-bottom-color: var(--gold-bright);
}

/* Table links: keep clean (no underline bar) */
.main-content table a {
    border-bottom: none;
}
