/* ==========================================================================
   CS2 Tournament Manager
   Aesthetic: tactical, angular, military HUD inspired.
   Palette: deep charcoal background, amber/orange primary accent, 
            signal cyan highlight, dim red for danger/live states.
   ========================================================================== */

:root {
    --bg-0: #07090d;
    --bg-1: #0d1117;
    --bg-2: #141a23;
    --bg-3: #1c2431;
    --line: #232b39;
    --line-bright: #38445a;

    --ink-0: #f4f6fb;
    --ink-1: #c8d0dd;
    --ink-2: #7c8597;
    --ink-3: #4c5466;

    --accent: #ff7a1a;          /* primary: tactical amber */
    --accent-soft: #ffb274;
    --accent-dim: #3a1f0a;

    --cyan: #3cc6ff;
    --cyan-dim: #0c2a3a;

    --danger: #ff3b4a;
    --danger-dim: #3a0d13;

    --gold: #f5d24b;

    --radius: 2px;
    --chamfer: 12px;

    --font-display: "Rajdhani", "Oswald", "Impact", system-ui, sans-serif;
    --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, Consolas, monospace;
}

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

html, body {
    background: var(--bg-0);
    color: var(--ink-1);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.01em;
}

body {
    background:
        radial-gradient(ellipse at top, rgba(255, 122, 26, 0.08), transparent 60%),
        radial-gradient(ellipse at bottom right, rgba(60, 198, 255, 0.05), transparent 55%),
        var(--bg-0);
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Scanline overlay for tactical feel */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.015) 0px,
            rgba(255, 255, 255, 0.015) 1px,
            transparent 1px,
            transparent 3px
        );
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: overlay;
}

/* Grid backdrop */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(56, 68, 90, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 68, 90, 0.07) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 90%);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

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

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink-0);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.1;
}

code, pre, .mono {
    font-family: var(--font-mono);
}

/* ---------- Layout ---------- */

.page {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    width: 100%;
    padding: 0 28px;
    margin: 0 auto;
}

main {
    flex: 1 0 auto;
    padding: 32px 0 64px;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 9, 13, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.site-header::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent) 20%,
        var(--cyan) 80%,
        transparent
    );
    opacity: 0.6;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 32px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--ink-0);
}

.brand-mark {
    width: 36px;
    height: 36px;
    position: relative;
    flex-shrink: 0;
}

.brand-mark svg {
    width: 100%;
    height: 100%;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.18em;
    color: var(--ink-0);
    text-transform: uppercase;
}

.brand-sub {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--ink-2);
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav a {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-2);
    padding: 10px 16px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.nav a:hover,
.nav a.active {
    color: var(--ink-0);
    border-color: var(--line-bright);
    background: var(--bg-2);
}

/* Live pulse badge in header */
.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--danger);
    border: 1px solid var(--danger);
    background: var(--danger-dim);
    animation: livePulse 1.6s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.live-pill::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--danger);
    animation: livePulseDot 1s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 74, 0.6); }
    50%      { box-shadow: 0 0 0 8px rgba(255, 59, 74, 0); }
}

@keyframes livePulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ---------- Hero ---------- */

.hero {
    padding: 48px 0 24px;
    position: relative;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    padding: 6px 0;
    border-top: 1px solid var(--accent);
    border-bottom: 1px solid var(--accent);
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.1s forwards;
}

.hero-tag::before,
.hero-tag::after {
    content: "//";
    color: var(--accent-soft);
    opacity: 0.5;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(44px, 7vw, 96px);
    line-height: 0.95;
    color: var(--ink-0);
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeInUp 0.7s ease 0.2s forwards;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.hero-title .accent {
    color: var(--accent);
    display: inline-block;
    position: relative;
}

.hero-title .accent::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8%;
    height: 8%;
    background: var(--accent);
    opacity: 0.15;
    z-index: -1;
}

.hero-sub {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink-2);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUp 0.7s ease 0.35s forwards;
}

.hero-meta {
    display: flex;
    gap: 28px;
    margin-top: 24px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.7s ease 0.45s forwards;
}

.hero-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-meta-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--ink-3);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.hero-meta-value {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink-0);
    font-size: 18px;
    text-transform: uppercase;
}

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

/* ---------- Live banner (on public page) ---------- */

.live-banner {
    margin: 32px 0;
    padding: 20px 24px;
    background:
        linear-gradient(135deg, rgba(255, 59, 74, 0.08), rgba(255, 59, 74, 0.02));
    border: 1px solid var(--danger);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    clip-path: polygon(
        0 0, calc(100% - 20px) 0, 100% 20px,
        100% 100%, 20px 100%, 0 calc(100% - 20px)
    );
    animation: fadeInUp 0.7s ease 0.5s both;
}

.live-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            135deg,
            transparent 0 20px,
            rgba(255, 59, 74, 0.03) 20px 22px
        );
    pointer-events: none;
    animation: scrollStripes 8s linear infinite;
}

@keyframes scrollStripes {
    from { transform: translateX(0); }
    to   { transform: translateX(-40px); }
}

.live-banner-info {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1;
}

.live-banner-teams {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--ink-0);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.live-banner-teams .vs {
    color: var(--ink-3);
    margin: 0 10px;
    font-size: 14px;
    letter-spacing: 0.3em;
}

.live-banner-score {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--danger);
    letter-spacing: 0.15em;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 12px 22px;
    border: 1px solid var(--line-bright);
    background: var(--bg-2);
    color: var(--ink-0);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-0);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-soft);
    color: var(--bg-0);
    border-color: var(--accent-soft);
    box-shadow: 0 0 20px rgba(255, 122, 26, 0.35);
}

.btn-ghost {
    background: transparent;
}

.btn-live {
    background: var(--danger);
    color: var(--ink-0);
    border-color: var(--danger);
    animation: liveBtnPulse 1.6s ease-in-out infinite;
}

.btn-live::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--ink-0);
    border-radius: 50%;
    animation: livePulseDot 0.8s ease-in-out infinite;
}

.btn-live:hover {
    background: #ff5866;
    border-color: #ff5866;
    color: var(--ink-0);
}

@keyframes liveBtnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 74, 0.6); }
    50%      { box-shadow: 0 0 0 10px rgba(255, 59, 74, 0); }
}

.btn-danger {
    background: transparent;
    border-color: var(--danger);
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger-dim);
    color: var(--danger);
    border-color: var(--danger);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 11px;
    letter-spacing: 0.15em;
}

/* ---------- Cards ---------- */

.panel {
    background: var(--bg-1);
    border: 1px solid var(--line);
    padding: 24px;
    position: relative;
}

.panel-title {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--ink-0);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-title::before {
    content: "";
    width: 14px;
    height: 14px;
    background: var(--accent);
    clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

/* ---------- Flash messages ---------- */

.flash-stack {
    position: fixed;
    top: 92px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

.flash {
    padding: 14px 18px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--line-bright);
    background: var(--bg-2);
    color: var(--ink-0);
    animation: flashIn 0.35s ease;
}

.flash.success {
    border-color: var(--accent);
    color: var(--accent);
    background: linear-gradient(135deg, var(--accent-dim), var(--bg-2));
}

.flash.error {
    border-color: var(--danger);
    color: var(--danger);
    background: linear-gradient(135deg, var(--danger-dim), var(--bg-2));
}

@keyframes flashIn {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   BRACKET
   ========================================================================== */

.bracket-wrap {
    margin-top: 24px;
    padding: 24px 0;
    position: relative;
}

.bracket-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 24px 12px 32px;
    scrollbar-color: var(--line-bright) var(--bg-1);
}

.bracket-scroll::-webkit-scrollbar {
    height: 10px;
}

.bracket-scroll::-webkit-scrollbar-track {
    background: var(--bg-1);
}

.bracket-scroll::-webkit-scrollbar-thumb {
    background: var(--line-bright);
}

.bracket {
    display: flex;
    align-items: stretch;
    gap: 56px;
    min-height: 600px;
    padding: 20px 0;
    width: fit-content;
    min-width: 100%;
}

.round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    min-width: 260px;
    position: relative;
    padding: 16px 0;
}

.round-header {
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.25em;
    color: var(--ink-3);
    text-transform: uppercase;
    padding-bottom: 16px;
}

.round-header span {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-0);
    border: 1px solid var(--line);
    color: var(--ink-2);
}

.round:last-child .round-header span {
    color: var(--gold);
    border-color: var(--gold);
    background: linear-gradient(135deg, #3a2e0a, var(--bg-0));
}

/* Match cards */
.match {
    background: var(--bg-1);
    border: 1px solid var(--line);
    margin: 14px 0;
    position: relative;
    transition: all 0.25s ease;
    clip-path: polygon(
        0 0, calc(100% - 10px) 0, 100% 10px,
        100% 100%, 10px 100%, 0 calc(100% - 10px)
    );
    animation: matchReveal 0.5s ease both;
}

.match:hover {
    border-color: var(--line-bright);
    transform: translateX(2px);
    box-shadow: -4px 0 0 var(--accent);
}

.match.match-live {
    border-color: var(--danger);
    box-shadow:
        0 0 0 1px var(--danger),
        0 0 24px rgba(255, 59, 74, 0.3);
    animation: matchLive 2s ease-in-out infinite;
}

.match.match-completed {
    border-color: rgba(255, 122, 26, 0.3);
}

.match.match-final {
    border-color: var(--gold);
    box-shadow:
        0 0 0 1px var(--gold),
        0 0 32px rgba(245, 210, 75, 0.18);
}

.match.match-final.match-completed {
    background:
        linear-gradient(135deg, rgba(245, 210, 75, 0.06), var(--bg-1));
}

@keyframes matchReveal {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes matchLive {
    0%, 100% { box-shadow: 0 0 0 1px var(--danger), 0 0 20px rgba(255, 59, 74, 0.25); }
    50%      { box-shadow: 0 0 0 1px var(--danger), 0 0 32px rgba(255, 59, 74, 0.45); }
}

.match-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--ink-3);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.match-id {
    color: var(--ink-3);
}

.match-time {
    color: var(--ink-2);
}

.match-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--danger);
    font-weight: 700;
}

.match-live-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--danger);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--danger);
    animation: livePulseDot 1s ease-in-out infinite;
}

.match-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    position: relative;
    transition: background 0.2s ease;
}

.match-slot:last-of-type {
    border-bottom: none;
}

.match-slot.winner {
    background: linear-gradient(90deg, rgba(255, 122, 26, 0.08), transparent);
}

.match-slot.winner::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
}

.match-slot.loser {
    opacity: 0.48;
}

.match-slot.tbd {
    color: var(--ink-3);
}

.slot-team {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.slot-logo {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background: var(--bg-2);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.slot-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.slot-logo-placeholder {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--ink-3);
}

.slot-name {
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--ink-0);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slot-name.tbd-name {
    color: var(--ink-3);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
}

.slot-score {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 16px;
    color: var(--ink-0);
    padding: 2px 10px;
    min-width: 38px;
    text-align: center;
    background: var(--bg-2);
    border: 1px solid var(--line);
}

.match-slot.winner .slot-score {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
}

.match-footer {
    padding: 8px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: var(--bg-2);
    border-top: 1px solid var(--line);
}

.match-live-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-0);
    background: var(--danger);
    border: 1px solid var(--danger);
    cursor: pointer;
    transition: all 0.2s ease;
    animation: liveBtnPulse 1.6s ease-in-out infinite;
}

.match-live-btn::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--ink-0);
    border-radius: 50%;
}

.match-live-btn:hover {
    background: #ff5866;
    color: var(--ink-0);
    transform: scale(1.04);
}

/* Bracket connectors between matches */
.round:not(:last-child) .match::after {
    content: "";
    position: absolute;
    right: -28px;
    top: 50%;
    width: 28px;
    height: 1px;
    background: var(--line);
    z-index: 0;
}

/* Top of pair: draws a line downward joining its partner below */
.round:not(:last-child) .match-top::before {
    content: "";
    position: absolute;
    right: -28px;
    top: 50%;
    bottom: calc(-50% - 14px);
    width: 1px;
    background: var(--line);
    z-index: 0;
}

/* Bottom of pair: draws a line upward joining its partner above */
.round:not(:last-child) .match-bottom::before {
    content: "";
    position: absolute;
    right: -28px;
    top: calc(-50% - 14px);
    bottom: 50%;
    width: 1px;
    background: var(--line);
    z-index: 0;
}

/* ==========================================================================
   FORMS
   ========================================================================== */

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.form-row label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-2);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.form-input,
.form-select,
.form-textarea {
    background: var(--bg-0);
    border: 1px solid var(--line);
    color: var(--ink-0);
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 14px;
    width: 100%;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-1);
}

.form-input[type="file"] {
    padding: 8px 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-2);
}

.form-help {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-3);
    letter-spacing: 0.08em;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

/* Login screen */
.login-screen {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: var(--bg-1);
    border: 1px solid var(--line);
    padding: 40px 36px;
    clip-path: polygon(
        0 0, calc(100% - 16px) 0, 100% 16px,
        100% 100%, 16px 100%, 0 calc(100% - 16px)
    );
    position: relative;
}

.login-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.login-title {
    font-family: var(--font-display);
    font-size: 32px;
    color: var(--ink-0);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.login-sub {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-3);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 32px;
}

/* ==========================================================================
   ADMIN
   ========================================================================== */

.admin-header {
    padding: 32px 0 20px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 32px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-title {
    font-family: var(--font-display);
    font-size: 44px;
    color: var(--ink-0);
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.admin-breadcrumb {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-3);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.admin-breadcrumb a {
    color: var(--ink-2);
}

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

/* Stat tiles */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.stat-tile {
    background: var(--bg-1);
    border: 1px solid var(--line);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-tile:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.stat-tile::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
    opacity: 0.6;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-3);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    color: var(--ink-0);
    line-height: 1;
}

.stat-value.accent { color: var(--accent); }
.stat-value.cyan { color: var(--cyan); }
.stat-value.danger { color: var(--danger); }

/* Lists and tables */
.list {
    background: var(--bg-1);
    border: 1px solid var(--line);
}

.list-row {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    transition: background 0.15s ease;
}

.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--bg-2); }

.list-logo {
    width: 44px;
    height: 44px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.list-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.list-logo-placeholder {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-3);
    font-weight: 700;
}

.list-main {
    flex: 1;
    min-width: 0;
}

.list-title {
    font-family: var(--font-display);
    font-size: 17px;
    color: var(--ink-0);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.list-sub {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-3);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 2px;
}

.list-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Team picker */
.team-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    max-height: 480px;
    overflow-y: auto;
    padding: 8px;
    background: var(--bg-0);
    border: 1px solid var(--line);
}

.team-pick {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
}

.team-pick:hover {
    border-color: var(--line-bright);
}

.team-pick input[type="checkbox"] {
    display: none;
}

.team-pick.selected {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--accent-dim), var(--bg-2));
}

.team-pick.selected .team-pick-order {
    opacity: 1;
}

.team-pick-logo {
    width: 32px;
    height: 32px;
    background: var(--bg-1);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.team-pick-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-pick-name {
    flex: 1;
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--ink-0);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-pick-order {
    opacity: 0;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    color: var(--accent);
    background: var(--bg-0);
    border: 1px solid var(--accent);
    padding: 2px 8px;
    min-width: 28px;
    text-align: center;
    transition: opacity 0.15s ease;
}

.picker-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-2);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.picker-status .count {
    color: var(--accent);
    font-weight: 700;
}

/* Tournament card grid */
.tour-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.tour-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    padding: 22px;
    transition: all 0.25s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 180px;
}

.tour-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.tour-card-name {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--ink-0);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.tour-card-meta {
    display: flex;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-2);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.tour-card-meta span::before {
    content: "//";
    color: var(--ink-3);
    margin-right: 6px;
}

.tour-card-status {
    position: absolute;
    top: 16px;
    right: 16px;
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 4px 8px;
    border: 1px solid var(--line-bright);
    color: var(--ink-2);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.tour-card-status.status-active {
    color: var(--accent);
    border-color: var(--accent);
}

.tour-card-status.status-completed {
    color: var(--cyan);
    border-color: var(--cyan);
}

.tour-card-status.status-featured {
    color: var(--gold);
    border-color: var(--gold);
}

.tour-card-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

/* Tournament switcher on public page */
.tour-switcher {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.tour-switcher a {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 6px 12px;
    border: 1px solid var(--line);
    color: var(--ink-2);
    transition: all 0.15s ease;
}

.tour-switcher a.active,
.tour-switcher a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

/* Empty state */
.empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--ink-3);
    font-family: var(--font-mono);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 13px;
}

.empty-title {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--ink-2);
    margin-bottom: 10px;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 28px 0;
    margin-top: 64px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-3);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* Responsive tweaks */
@media (max-width: 900px) {
    .admin-title { font-size: 32px; }
    .hero-title { font-size: 48px; }
    .header-inner { height: 64px; }
    .nav a { padding: 8px 10px; }
    .brand-sub { display: none; }
}

@media (max-width: 600px) {
    .nav { gap: 0; }
    .nav a { padding: 8px 8px; font-size: 10px; }
    .hero-meta { gap: 16px; }
}
