/* GMR CUP 2 — PHP Event Edition
   Visual system: shadcn/ui component anatomy + Vercel/Geist restraint.
   Red and blue are semantic brand accents, not page-wide decoration. */
:root{
  color-scheme:light;
  --background:#ffffff;
  --foreground:#09090b;
  --card:#ffffff;
  --card-foreground:#09090b;
  --popover:#ffffff;
  --popover-foreground:#09090b;
  --primary:#18181b;
  --primary-foreground:#fafafa;
  --secondary:#f4f4f5;
  --secondary-foreground:#18181b;
  --muted:#f4f4f5;
  --muted-foreground:#71717a;
  --accent:#f4f4f5;
  --accent-foreground:#18181b;
  --destructive:#DE0816;
  --destructive-foreground:#ffffff;
  --border:#e4e4e7;
  --input:#e4e4e7;
  --ring:#0369D1;
  --brand-red:#DE0816;
  --brand-red-soft:#fff1f2;
  --brand-red-border:#fecdd3;
  --brand-blue:#0369D1;
  --brand-blue-soft:#eff6ff;
  --brand-blue-border:#bfdbfe;
  --success:#15803d;
  --success-soft:#f0fdf4;
  --success-border:#bbf7d0;
  --warning:#b45309;
  --warning-soft:#fffbeb;
  --warning-border:#fde68a;
  --canvas:#fafafa;
  --sidebar:#fafafa;
  --sidebar-foreground:#3f3f46;
  --sidebar-primary:#18181b;
  --sidebar-primary-foreground:#fafafa;
  --sidebar-accent:#f4f4f5;
  --sidebar-accent-foreground:#18181b;
  --sidebar-border:#e4e4e7;
  --radius:8px;
  --shadow-xs:0 1px 2px rgba(0,0,0,.035);
  --shadow-sm:0 1px 3px rgba(0,0,0,.045),0 1px 2px rgba(0,0,0,.025);
  --content:1480px;
  font-family:Geist,-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box}
html{background:var(--canvas);scroll-behavior:smooth}
body{margin:0;min-height:100vh;background:var(--canvas);color:var(--foreground);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:disabled,input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;opacity:.5}
svg{display:block;flex:none}
::selection{background:#dbeafe;color:#172554}

/* Brand — deliberately compact and neutral. */
.brand-logo{display:inline-flex;align-items:baseline;gap:.18rem;font-size:15px;font-weight:720;letter-spacing:-.025em;line-height:1}
.brand-logo-large{font-size:clamp(2rem,4vw,3.35rem);font-weight:760}
.brand-gmr{color:var(--brand-blue)}
.brand-cup{color:var(--foreground)}
.brand-two{color:var(--brand-red)}
.brand-emblem{position:relative;width:36px;height:36px;display:grid;place-items:center;overflow:hidden;border:1px solid var(--border);border-radius:8px;background:var(--background);box-shadow:var(--shadow-xs)}
.brand-emblem:before,.brand-emblem:after{content:"";position:absolute;top:0;bottom:0;width:2px}
.brand-emblem:before{left:0;background:var(--brand-blue)}
.brand-emblem:after{right:0;background:var(--brand-red)}
.brand-emblem strong{font-size:12px;font-weight:800;letter-spacing:-.04em;color:var(--foreground)}
.brand-emblem strong span{color:var(--brand-red)}

/* Shared shadcn-like surfaces. */
.panel,.metric-card,.match-card,.table-shell,.side-card,.console-card,.form-card,.participant-card{
  background:var(--card);color:var(--card-foreground);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-xs)
}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom:1px solid var(--border)}
.panel-head h2,.panel-head h3{margin:0;font-size:14px;font-weight:650;letter-spacing:-.01em}
.panel-head p{margin:3px 0 0;color:var(--muted-foreground);font-size:12px}
.panel-body{padding:18px}
.section-heading{display:flex;align-items:center;gap:9px;margin:0;font-size:14px;font-weight:650;letter-spacing:-.01em;text-transform:none}
.section-heading:before{content:"";width:7px;height:7px;border-radius:999px;background:var(--brand-red)}
.section-heading-blue:before{background:var(--brand-blue)}
.stack{display:flex;flex-direction:column;gap:14px;min-width:0}
.spread{display:flex;align-items:center;justify-content:space-between;gap:14px}
.form-actions{display:flex;gap:8px;flex-wrap:wrap}
.hr{height:1px;background:var(--border);margin:18px 0}
.small{font-size:12px}.muted{color:var(--muted-foreground)}
.empty-state,.empty-compact{padding:28px 18px;text-align:center;border:1px dashed var(--border);border-radius:var(--radius);color:var(--muted-foreground);background:var(--muted)}
.empty-compact{padding:13px;font-size:12px}

/* Badges mirror shadcn Badge variants. */
.status-badge{display:inline-flex;align-items:center;gap:6px;min-height:22px;padding:2px 8px;border-radius:999px;border:1px solid transparent;font-size:10px;font-weight:650;line-height:1.6;letter-spacing:0;white-space:nowrap}
.status-badge:before{content:"";width:6px;height:6px;border-radius:999px;background:currentColor}
.status-live{color:#b91c1c;background:var(--brand-red-soft);border-color:var(--brand-red-border)}
.status-blue{color:#1d4ed8;background:var(--brand-blue-soft);border-color:var(--brand-blue-border)}
.status-success{color:#166534;background:var(--success-soft);border-color:var(--success-border)}
.status-warning{color:#92400e;background:var(--warning-soft);border-color:var(--warning-border)}
.status-muted{color:#52525b;background:var(--muted);border-color:var(--border)}
.row-tag{display:inline-flex;margin-left:7px;padding:1px 6px;border-radius:999px;background:var(--muted);color:#52525b;border:1px solid var(--border);font-size:9px;font-weight:650}
.row-tag-blue{background:var(--brand-blue-soft);color:#1d4ed8;border-color:var(--brand-blue-border)}
.row-tag-red{background:var(--brand-red-soft);color:#b91c1c;border-color:var(--brand-red-border)}

/* Buttons match shadcn sizing and hierarchy. */
.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:36px;padding:0 13px;border:1px solid transparent;border-radius:6px;font-size:13px;font-weight:560;line-height:1;white-space:nowrap;transition:background-color .15s,border-color .15s,color .15s,box-shadow .15s}
.button:hover:not(:disabled){transform:none}
.button:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(3,105,209,.2)}
.button-primary{color:var(--primary-foreground);background:var(--primary)}
.button-primary:hover:not(:disabled){background:#27272a}
.button-red{color:#fff;background:var(--brand-red)}
.button-red:hover:not(:disabled){background:#b91c1c}
.button-blue{color:#fff;background:var(--brand-blue)}
.button-blue:hover:not(:disabled){background:#1d4ed8}
.button-secondary{color:var(--foreground);background:var(--background);border-color:var(--border);box-shadow:var(--shadow-xs)}
.button-secondary:hover:not(:disabled){background:var(--accent)}
.button-danger{color:var(--destructive-foreground);background:var(--destructive)}
.button-danger:hover:not(:disabled){background:#b91c1c}
.button-ghost{color:var(--muted-foreground);background:transparent}
.button-ghost:hover:not(:disabled){background:var(--accent);color:var(--accent-foreground)}
.button-small{height:32px;padding:0 11px;font-size:12px}
.button-block{width:100%}

/* Forms */
.form-grid{display:grid;gap:14px}.form-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.field{display:flex;flex-direction:column;gap:7px}
.field label{font-size:12px;font-weight:560;color:var(--foreground)}
.field small{font-size:11px;color:var(--muted-foreground)}
.input,.select,.textarea{width:100%;min-height:38px;border:1px solid var(--input);border-radius:6px;background:var(--background);color:var(--foreground);padding:8px 11px;outline:none;box-shadow:var(--shadow-xs)}
.textarea{min-height:88px;resize:vertical}
.input::placeholder,.textarea::placeholder{color:#a1a1aa}
.input:focus,.select:focus,.textarea:focus{border-color:var(--ring);box-shadow:0 0 0 3px rgba(3,105,209,.14)}
.input-score{min-height:62px;font-size:28px;font-weight:700;text-align:center;font-variant-numeric:tabular-nums}
.score-grid{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px}
.score-separator{font-weight:600;color:#a1a1aa}
.help-box,.warning-box,.danger-box{padding:12px 13px;border:1px solid;border-radius:6px;font-size:12px;line-height:1.55}
.help-box{border-color:var(--brand-blue-border);background:var(--brand-blue-soft);color:#1e40af}
.warning-box{border-color:var(--warning-border);background:var(--warning-soft);color:#92400e}
.danger-box{border-color:var(--brand-red-border);background:var(--brand-red-soft);color:#991b1b}

/* Public shell */
.public-body{background:var(--canvas)}
.public-header{position:sticky;top:0;z-index:30;background:rgba(255,255,255,.94);backdrop-filter:saturate(160%) blur(12px);border-bottom:1px solid var(--border)}
.public-header:before{display:none}
.public-header-inner{max-width:var(--content);margin:auto;padding:10px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:58px}
.public-brand{display:flex;align-items:center;gap:10px}
.public-brand-copy strong{display:block;font-size:13px;font-weight:650}
.public-brand-copy span{display:block;color:var(--muted-foreground);font-size:11px;margin-top:1px}
.public-actions{display:flex;align-items:center;gap:8px}
.public-shell{max-width:var(--content);margin:auto;padding:24px}
.public-nav{display:inline-flex;gap:3px;margin-bottom:18px;padding:3px;border:1px solid var(--border);border-radius:7px;background:var(--muted)}
.public-nav a{padding:6px 11px;border-radius:5px;font-size:12px;font-weight:560;color:var(--muted-foreground)}
.public-nav a:hover{color:var(--foreground)}
.public-nav a.active{background:var(--background);color:var(--foreground);box-shadow:var(--shadow-xs)}

/* Replaces the previous esports poster with a restrained dashboard overview. */
.event-hero{position:relative;overflow:hidden;min-height:0;border:1px solid var(--border);border-radius:var(--radius);background:var(--background);color:var(--foreground);box-shadow:var(--shadow-xs);isolation:auto}
.event-hero:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:linear-gradient(180deg,var(--brand-red) 0 50%,var(--brand-blue) 50%)}
.event-hero:after{display:none}
.hero-grid-lines{display:none}
.hero-content{min-height:0;padding:22px 24px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:16px;text-align:left}
.hero-trophy{width:38px;height:38px;display:grid;place-items:center;border:1px solid var(--border);border-radius:7px;background:var(--muted);color:var(--foreground)}
.hero-content h1{margin:0;font-size:24px;font-weight:700;letter-spacing:-.035em;line-height:1.1}
.hero-content h1 span:first-child{color:var(--foreground)}
.hero-content h1 span:last-child{color:var(--brand-red)}
.hero-content p{grid-column:2;margin:4px 0 0;color:var(--muted-foreground);font-size:12px;letter-spacing:0;text-transform:none;font-weight:400}
.hero-rule{grid-column:3;grid-row:1/3;display:flex;align-items:center;gap:0;margin:0;padding:5px 9px;border:1px solid var(--brand-blue-border);border-radius:999px;background:var(--brand-blue-soft);color:#1d4ed8;font-size:11px;font-weight:600}
.hero-rule:before,.hero-rule:after{display:none}

/* Metrics */
.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0 18px}
.metric-card{position:relative;display:block;padding:15px 16px;min-height:88px;overflow:hidden}.metric-card:before{content:"";position:absolute;inset:0 auto 0 0;width:2px;background:var(--border)}.metric-card.metric-red:before{background:var(--brand-red)}.metric-card.metric-blue:before{background:var(--brand-blue)}
.metric-icon{width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--border);border-radius:7px;color:var(--brand-blue);background:var(--background)}
.metric-red .metric-icon{color:var(--brand-red);background:var(--brand-red-soft);border-color:var(--brand-red-border)}
.metric-green .metric-icon{color:var(--success);background:var(--success-soft);border-color:var(--success-border)}
.metric-dark .metric-icon{color:var(--foreground);background:var(--muted);border-color:var(--border)}
.metric-label{margin:0;color:var(--muted-foreground);font-size:11px;font-weight:500;text-transform:none}
.metric-value{margin:1px 0;font-size:23px;font-weight:700;letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.metric-note{margin:0;color:var(--muted-foreground);font-size:11px}

.dashboard-layout,.admin-dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:14px;align-items:start}
.dashboard-main,.dashboard-rail{display:flex;flex-direction:column;gap:14px;min-width:0}
.dashboard-rail{position:sticky;top:76px}
.side-card{padding:16px}
.side-card h3{margin:0 0 13px;font-size:13px;font-weight:650;letter-spacing:-.01em;text-transform:none}
.progress-block{display:grid;grid-template-columns:74px 1fr;gap:13px;align-items:center}
.progress-ring{--progress:0deg;width:72px;height:72px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--brand-blue) var(--progress),var(--muted) 0);position:relative}
.progress-ring:after{content:"";position:absolute;inset:7px;border-radius:50%;background:var(--background)}
.progress-ring strong{position:relative;z-index:1;font-size:16px;font-weight:700}
.progress-copy strong{font-size:16px;font-weight:650;font-variant-numeric:tabular-nums}
.progress-copy p{margin:3px 0;color:var(--muted-foreground);font-size:11px}
.progress-bar{height:4px;margin-top:14px;border-radius:999px;background:var(--muted);overflow:hidden}
.progress-bar span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--brand-red),var(--brand-blue))}
.event-info{display:flex;flex-direction:column}
.event-info-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 0;border-bottom:1px solid var(--border);font-size:12px}
.event-info-row:last-child{border-bottom:0}
.event-info-row span{color:var(--muted-foreground)}
.event-info-row strong{font-weight:600;text-align:right}

/* Match and fixture components */
.playbox-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.match-card{display:flex;flex-direction:column;padding:13px;min-width:0;transition:border-color .15s,box-shadow .15s}
a.match-card:hover{border-color:#c7c7cc;box-shadow:var(--shadow-sm)}
.match-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:9px;padding-bottom:10px;border-bottom:1px solid var(--border)}
.match-card-head strong{display:block;font-size:11px;font-weight:650}
.match-card-head small{display:block;color:var(--muted-foreground);font-size:10px;margin-top:2px}
.match-station-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--brand-red);margin-right:6px}
.match-player-row{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:8px;padding:11px 0}
.player-avatar{width:30px;height:30px;display:grid;place-items:center;border:1px solid var(--brand-red-border);border-radius:999px;background:var(--brand-red-soft);color:#b91c1c;font-size:11px;font-weight:700}
.player-avatar-blue{border-color:var(--brand-blue-border);background:var(--brand-blue-soft);color:#1d4ed8}
.player-copy{min-width:0}
.player-copy strong,.player-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.player-copy strong{font-size:11px;font-weight:600}
.player-copy small{color:var(--muted-foreground);font-size:10px}
.match-score{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}
.score-red{color:var(--brand-red)}.score-blue{color:var(--brand-blue)}
.match-versus{display:flex;align-items:center;gap:8px;color:#a1a1aa;font-size:9px;font-weight:600}
.match-versus span{height:1px;flex:1;background:var(--border)}
.match-card-foot{display:flex;justify-content:space-between;gap:8px;margin-top:auto;padding-top:9px;border-top:1px solid var(--border);color:var(--muted-foreground);font-size:10px}
.match-card-foot span{display:flex;align-items:center;gap:4px}
.penalty-note{font-weight:600;color:var(--foreground)}
.recent-list,.upcoming-list{display:flex;flex-direction:column;gap:7px}
.recent-item{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;padding:9px 10px;border:1px solid var(--border);border-radius:6px;font-size:11px;background:var(--background)}
a.recent-item:hover{background:var(--accent)}
.recent-item strong:last-child{text-align:right}
.recent-score{font-size:14px;color:var(--foreground);font-weight:700;font-variant-numeric:tabular-nums}
.upcoming-row{display:grid;grid-template-columns:100px 1fr auto 1fr auto;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--border);font-size:12px}
.upcoming-row:last-child{border-bottom:0}
.upcoming-row .station{font-weight:600;color:var(--foreground)}
.upcoming-row .participant:last-of-type{text-align:right}

/* Tables and bracket */
.table-shell{overflow:hidden;min-width:0;max-width:100%}
.table-title-row{display:flex;justify-content:space-between;gap:18px;padding:16px 18px;border-bottom:1px solid var(--border)}
.table-title-row h3{margin:0;font-size:14px;font-weight:650}
.table-title-row p{margin:3px 0 0;color:var(--muted-foreground);font-size:11px}
.table-scroll{overflow-x:auto}
.data-table{width:100%;border-collapse:collapse;min-width:720px}
.data-table th{padding:10px 13px;border-bottom:1px solid var(--border);background:var(--muted);color:var(--muted-foreground);text-align:left;font-size:10px;font-weight:600;text-transform:none}
.data-table td{padding:11px 13px;border-bottom:1px solid var(--border);font-size:12px}
.data-table tbody tr:hover{background:#fafafa}
.data-table tbody tr:last-child td{border-bottom:0}
.standings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.bracket-board{display:grid;grid-template-columns:repeat(5,minmax(210px,1fr));gap:12px;overflow-x:auto;padding-bottom:4px}
.bracket-column{min-width:210px;display:flex;flex-direction:column;gap:8px}
.bracket-column-head{display:flex;justify-content:space-between;align-items:center;padding:0 2px 7px;border-bottom:1px solid var(--border)}
.bracket-column-head h3{margin:0;font-size:12px;font-weight:650}
.bracket-column-head span{color:var(--muted-foreground);font-size:11px}
.bracket-match{display:block;border:1px solid var(--border);border-radius:6px;background:var(--background);padding:9px;box-shadow:var(--shadow-xs)}
a.bracket-match:hover{background:var(--accent)}
.bracket-match-label,.bracket-team{display:flex;justify-content:space-between;gap:8px}
.bracket-match-label{margin-bottom:6px;font-size:9px;color:var(--muted-foreground)}
.bracket-team{padding:6px 7px;border-radius:5px;background:var(--muted);font-size:11px}
.bracket-team+.bracket-team{margin-top:4px}

/* Admin shell — actual shadcn Sidebar proportions and tokens. */
.admin-body{background:var(--background)}
.admin-shell{min-height:100vh;display:grid;grid-template-columns:232px minmax(0,1fr)}
.admin-sidebar{position:fixed;inset:0 auto 0 0;width:232px;z-index:40;display:flex;flex-direction:column;background:var(--sidebar);color:var(--sidebar-foreground);padding:12px;border-right:1px solid var(--sidebar-border)}
.sidebar-brand{display:flex;align-items:center;gap:10px;padding:4px 5px 13px;border-bottom:1px solid var(--sidebar-border)}
.sidebar-brand small{display:block;color:var(--muted-foreground);font-size:10px;margin-top:3px}
.sidebar-scroll{overflow:auto;padding:8px 0}
.sidebar-section{margin:14px 8px 5px;color:#a1a1aa;font-size:10px;font-weight:560;text-transform:none}
.sidebar-nav{display:flex;flex-direction:column;gap:2px}
.sidebar-nav a{position:relative;display:flex;align-items:center;gap:9px;min-height:35px;padding:7px 9px;border-radius:6px;color:var(--sidebar-foreground);font-size:12px;font-weight:520}
.sidebar-nav a:hover{background:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}
.sidebar-nav a.active{background:var(--sidebar-accent);color:var(--sidebar-accent-foreground);font-weight:620;box-shadow:inset 2px 0 var(--brand-blue)}
.sidebar-nav a.active:after{content:"";position:absolute;right:9px;width:5px;height:5px;border-radius:999px;background:var(--brand-red)}
.sidebar-status{margin-top:auto;padding:11px;border:1px solid var(--sidebar-border);border-radius:7px;background:var(--background)}
.sidebar-status p{margin:0;color:var(--muted-foreground);font-size:10px}
.sidebar-status strong{display:block;margin:4px 0;font-size:12px;font-weight:600}
.admin-main{grid-column:2;min-width:0;background:var(--background)}
.admin-topbar{position:sticky;top:0;z-index:30;min-height:58px;display:flex;align-items:center;justify-content:space-between;padding:9px 22px;background:rgba(255,255,255,.94);backdrop-filter:saturate(160%) blur(12px);border-bottom:1px solid var(--border)}
.topbar-title,.topbar-user{display:flex;align-items:center;gap:9px}
.topbar-title h1{margin:0;font-size:13px;font-weight:650}
.topbar-title p{margin:1px 0 0;color:var(--muted-foreground);font-size:10px}
.user-avatar{width:30px;height:30px;display:grid;place-items:center;border:1px solid var(--border);border-radius:999px;background:var(--muted);color:var(--foreground);font-size:11px;font-weight:650}
.user-copy strong,.user-copy span{display:block;font-size:10px}
.user-copy strong{font-weight:600}.user-copy span{color:var(--muted-foreground)}
.admin-content{padding:22px 24px 88px;max-width:var(--content);margin:auto}
.admin-page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}
.admin-page-head h2{margin:0;font-size:24px;font-weight:690;letter-spacing:-.035em;text-transform:none}
.admin-page-head p{margin:5px 0 0;color:var(--muted-foreground);font-size:12px}

/* Old hero class becomes a shadcn overview card; no poster treatment. */
.admin-hero{min-height:0;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;position:relative;background:var(--background);color:var(--foreground);box-shadow:var(--shadow-xs)}
.admin-hero:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:linear-gradient(180deg,var(--brand-red) 0 50%,var(--brand-blue) 50%)}
.admin-hero-content{position:relative;padding:20px 22px}
.admin-hero-content .brand-logo{font-size:18px}
.admin-hero-content h3{margin:12px 0 4px;font-size:20px;font-weight:680;letter-spacing:-.025em}
.admin-hero-content p{margin:0;color:var(--muted-foreground);font-size:12px}
.admin-hero-meta{display:flex;gap:7px;margin-top:15px;flex-wrap:wrap}
.admin-hero-meta span{padding:4px 8px;border:1px solid var(--border);border-radius:999px;background:var(--muted);color:var(--muted-foreground);font-size:10px}

/* Match console */
.match-console-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:14px}
.console-card{overflow:hidden}
.console-head{padding:16px 18px;background:var(--background);color:var(--foreground);border-bottom:1px solid var(--border)}
.console-head h3{margin:0;font-size:15px;font-weight:650}
.console-head p{margin:3px 0 0;color:var(--muted-foreground);font-size:11px}
.console-body{padding:18px}
.console-players{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px;padding:16px;border:1px solid var(--border);border-radius:7px;background:var(--muted)}
.console-player{text-align:center;min-width:0}
.console-player-avatar{width:46px;height:46px;margin:auto auto 8px;display:grid;place-items:center;border:1px solid var(--brand-red-border);border-radius:999px;font-size:16px;font-weight:700;background:var(--brand-red-soft);color:#b91c1c}
.console-player:last-child .console-player-avatar{border-color:var(--brand-blue-border);background:var(--brand-blue-soft);color:#1d4ed8}
.console-player h4{margin:0;font-size:13px}.console-player p{margin:2px 0;color:var(--muted-foreground);font-size:10px}
.console-vs{width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--border);border-radius:999px;background:var(--background);color:var(--muted-foreground);font-size:10px;font-weight:650}
.match-picker{position:sticky;top:74px}
.match-picker-list{display:flex;flex-direction:column;gap:6px;max-height:68vh;overflow:auto}
.match-picker-item{display:flex;justify-content:space-between;gap:10px;padding:9px 10px;border:1px solid var(--border);border-radius:6px;background:var(--background)}
.match-picker-item:hover{background:var(--accent)}
.match-picker-item.active{border-color:var(--brand-blue);background:var(--brand-blue-soft);box-shadow:none}
.match-picker-item strong,.match-picker-item small{display:block;font-size:10px}.match-picker-item small{color:var(--muted-foreground)}
.admin-section-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.participant-groups{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.participant-card{overflow:hidden}
.participant-card-head{padding:13px 14px;border-bottom:1px solid var(--border);background:var(--muted)}
.participant-card-head h3{margin:0;font-size:13px;font-weight:650}.participant-card-head p{margin:2px 0;color:var(--muted-foreground);font-size:10px}
.participant-row{display:grid;grid-template-columns:1fr 124px;align-items:center;gap:8px;padding:9px 11px;border-bottom:1px solid var(--border)}
.participant-row:last-child{border-bottom:0}.participant-row strong{font-size:11px;font-weight:560}.participant-row .select{min-height:32px;padding:5px 7px;font-size:10px}
.club-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.club-chip{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px;border:1px solid var(--border);border-radius:6px;background:var(--background)}
.club-chip strong,.club-chip small{display:block;font-size:10px}.club-chip small{color:var(--muted-foreground)}
.audit-list{display:flex;flex-direction:column;gap:0;max-height:520px;overflow:auto}
.audit-item{display:grid;grid-template-columns:7px 1fr auto;gap:10px;padding:10px 0;border-bottom:1px solid var(--border)}
.audit-dot{width:7px;height:7px;border-radius:50%;background:var(--brand-blue);margin-top:5px}
.audit-copy strong,.audit-copy p{display:block;margin:0;font-size:10px}.audit-copy strong{font-weight:600}.audit-copy p{color:var(--muted-foreground)}.audit-time{font-size:9px;color:#a1a1aa}
.mobile-nav{display:none}

/* Auth and setup — same component system, not a separate game theme. */
.auth-body{background:var(--canvas);color:var(--foreground)}
.auth-shell{min-height:100vh;display:grid;grid-template-columns:minmax(340px,.85fr) minmax(440px,1.15fr)}
.auth-visual{display:flex;align-items:center;justify-content:center;padding:44px;border-right:1px solid var(--border);background:var(--primary);color:var(--primary-foreground)}
.auth-visual-content{max-width:520px;text-align:left}
.auth-visual-content .brand-cup{color:#fff}
.auth-visual-content h1{margin:24px 0 8px;font-size:30px;font-weight:700;letter-spacing:-.04em;text-transform:none}
.auth-visual-content p{margin:0;color:#a1a1aa;font-size:13px;line-height:1.65}
.auth-proof{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:28px}
.auth-proof div{padding:12px;border:1px solid #3f3f46;border-radius:7px;background:#27272a}
.auth-proof strong,.auth-proof span{display:block}.auth-proof strong{font-size:18px;font-weight:650}.auth-proof span{margin-top:3px;color:#a1a1aa;font-size:10px}
.auth-panel{display:flex;align-items:center;justify-content:center;padding:36px;background:var(--background);color:var(--foreground)}
.auth-card{width:min(100%,430px)}
.auth-card h2{font-size:25px;font-weight:690;letter-spacing:-.035em;margin:22px 0 0}
.auth-card>p{color:var(--muted-foreground);font-size:12px;margin:6px 0 22px}
.auth-footer{text-align:center;color:var(--muted-foreground);font-size:10px}
.setup-steps{display:flex;gap:5px;margin:18px 0}.setup-steps span{height:3px;flex:1;border-radius:999px;background:var(--border)}.setup-steps span:first-child{background:var(--brand-red)}.setup-steps span:last-child{background:var(--brand-blue)}

/* Dialogs, toasts, flash */
.confirm-dialog{width:min(92vw,420px);border:1px solid var(--border);border-radius:8px;padding:0;background:var(--background);color:var(--foreground);box-shadow:0 24px 72px rgba(0,0,0,.18)}
.confirm-dialog::backdrop{background:rgba(9,9,11,.48)}
.confirm-dialog form{padding:22px}.confirm-dialog h3{margin:14px 0 5px;font-size:17px}.confirm-dialog p{margin:0 0 20px;color:var(--muted-foreground);font-size:12px;line-height:1.6}
.dialog-icon{width:38px;height:38px;display:grid;place-items:center;border:1px solid var(--brand-red-border);border-radius:7px;background:var(--brand-red-soft);color:var(--brand-red)}
.dialog-actions{display:flex;justify-content:flex-end;gap:8px}
.toast-region{position:fixed;right:18px;bottom:18px;z-index:100}
.toast{padding:11px 13px;border:1px solid #27272a;border-radius:7px;background:#18181b;color:#fff;box-shadow:0 12px 36px rgba(0,0,0,.16);font-size:12px}
.toast.success{border-left:3px solid #22c55e}.toast.error{border-left:3px solid var(--brand-red)}
.flash{display:flex;gap:9px;padding:11px 12px;border:1px solid;border-radius:7px;margin-bottom:14px;font-size:12px}.flash-success{border-color:var(--success-border);background:var(--success-soft);color:#166534}.flash-error{border-color:var(--brand-red-border);background:var(--brand-red-soft);color:#991b1b}

@media(max-width:1260px){
  .playbox-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .participant-groups{grid-template-columns:repeat(2,minmax(0,1fr))}
  .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:1080px){
  .dashboard-layout,.admin-dashboard-grid,.match-console-layout{grid-template-columns:1fr}
  .dashboard-rail,.match-picker{position:static}
  .auth-shell{grid-template-columns:minmax(320px,.8fr) minmax(420px,1.2fr)}
}
@media(max-width:820px){
  .admin-shell{display:block}.admin-sidebar{display:none}.admin-main{grid-column:auto}
  .admin-topbar{padding:9px 14px}.admin-content{padding:18px 14px 84px}
  .mobile-nav{position:fixed;left:10px;right:10px;bottom:10px;z-index:50;display:grid;grid-template-columns:repeat(5,1fr);padding:5px;border:1px solid var(--border);border-radius:9px;background:rgba(255,255,255,.96);box-shadow:0 10px 30px rgba(0,0,0,.12);backdrop-filter:blur(12px)}
  .mobile-nav a{display:flex;flex-direction:column;align-items:center;gap:3px;padding:7px 4px;border-radius:6px;color:var(--muted-foreground);font-size:8px}
  .mobile-nav a.active{background:var(--accent);color:var(--brand-blue);font-weight:600}
  .admin-section-grid,.standings-grid{grid-template-columns:1fr}
  .auth-shell{grid-template-columns:1fr}.auth-visual{display:none}
  .dashboard-rail{position:static}.public-header-inner,.public-shell{padding-left:14px;padding-right:14px}
}
@media(max-width:620px){
  .public-brand-copy span{display:none}.public-actions .status-badge{display:none}
  .hero-content{grid-template-columns:auto 1fr;padding:18px;gap:12px}.hero-rule{grid-column:1/3;grid-row:auto;width:max-content}.hero-content p{grid-column:2}
  .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.metric-card{padding:12px;min-height:78px}.metric-note{display:none}.metric-value{font-size:20px}
  .playbox-grid,.participant-groups,.club-grid{grid-template-columns:1fr}
  .form-grid-2{grid-template-columns:1fr}.console-players{grid-template-columns:1fr}.console-vs{margin:auto}
  .admin-page-head{align-items:flex-start;flex-direction:column}.admin-page-head h2{font-size:22px}.topbar-user .user-copy{display:none}
  .toast-region{left:12px;right:12px;bottom:78px}.upcoming-row{grid-template-columns:74px 1fr auto}.upcoming-row .versus{display:none}.upcoming-row .participant:last-of-type{text-align:left}
  .public-shell{padding-top:18px}.public-nav{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}.public-nav a{text-align:center}
}

/* V3 event-control additions: phase gates, stations and normalized tournament UX. */
.sidebar-label{margin:14px 9px 6px;color:#a1a1aa;font-size:9px;font-weight:650;letter-spacing:.08em}
.sidebar-link{position:relative;display:flex;align-items:center;gap:9px;min-height:35px;padding:7px 9px;border-radius:6px;color:var(--sidebar-foreground);font-size:12px;font-weight:520}
.sidebar-link:hover{background:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}
.sidebar-link.active{background:var(--sidebar-accent);color:var(--sidebar-accent-foreground);font-weight:620;box-shadow:inset 2px 0 var(--brand-blue)}
.sidebar-link.active:after{content:"";position:absolute;right:9px;width:5px;height:5px;border-radius:50%;background:var(--brand-red)}
.topbar-title strong,.topbar-title small,.user-copy strong,.user-copy small{display:block}.topbar-title strong{font-size:12px;font-weight:650}.topbar-title small,.user-copy small{font-size:10px;color:var(--muted-foreground)}.user-copy strong{font-size:10px;font-weight:600}
.phase-banner{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px;border:1px solid var(--border);border-radius:var(--radius);background:var(--background);box-shadow:var(--shadow-xs);position:relative;overflow:hidden}
.phase-banner:before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:linear-gradient(180deg,var(--brand-red) 0 50%,var(--brand-blue) 50%)}
.phase-banner small{font-size:9px;font-weight:700;color:var(--muted-foreground);letter-spacing:.08em}.phase-banner h3{margin:2px 0 3px;font-size:20px;letter-spacing:-.03em}.phase-banner p{margin:0;color:var(--muted-foreground);font-size:11px}.phase-progress{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.phase-progress span{padding:4px 8px;border:1px solid var(--border);border-radius:999px;background:var(--muted);font-size:9px;color:var(--muted-foreground)}
.station-card{min-width:0;border:1px solid var(--border);border-radius:7px;background:var(--background);padding:11px;box-shadow:var(--shadow-xs)}
.station-card-title{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:9px}.station-card-title strong,.station-card-title small{display:block}.station-card-title strong{font-size:11px}.station-card-title small{font-size:9px;color:var(--muted-foreground);margin-top:2px}.station-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--brand-red);margin-right:6px}
.station-card .match-card{border:0;border-top:1px solid var(--border);border-radius:0;padding:10px 0 0;box-shadow:none}.station-card .match-card-embedded .match-player-row{padding:9px 0}.station-card .match-card-embedded .match-card-foot{padding-top:8px}.station-next{display:block;border-top:1px solid var(--border);padding-top:10px}.station-next small{display:block;font-size:8px;font-weight:700;color:var(--brand-blue);letter-spacing:.06em}.station-next strong{display:block;margin-top:4px;font-size:11px}.station-next strong span{color:var(--muted-foreground);font-weight:500}.station-next p{margin:3px 0 0;font-size:9px;color:var(--muted-foreground)}
.gate-list{display:flex;flex-direction:column}.gate-list>div{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--border);font-size:11px}.gate-list>div:last-child{border-bottom:0}.gate-list span{color:var(--muted-foreground)}.gate-list strong{text-align:right;font-weight:650}
.side-card{padding:0}.side-card-body{padding:14px 16px}.recent-list{gap:0}.recent-row{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border);font-size:10px}.recent-row:last-child{border-bottom:0}.recent-row span strong,.recent-row span small{display:block}.recent-row span small{color:var(--muted-foreground);font-size:8px}.recent-row b{font-size:13px}.align-right{text-align:right}
.hero-kicker{grid-column:auto!important;margin:0!important;color:var(--brand-blue)!important;font-weight:650!important;font-size:10px!important}.hero-content{grid-template-columns:auto minmax(0,1fr) auto auto}.hero-content>div:nth-child(2) p:last-child{margin:4px 0 0;color:var(--muted-foreground);font-size:11px}.hero-rule{grid-column:auto;grid-row:auto;flex-direction:column;min-width:48px;border-radius:6px}.hero-rule span{font-size:8px}.hero-rule strong{font-size:14px}
.rules-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.prose{font-size:12px;color:var(--muted-foreground);line-height:1.65}.prose p{margin:0 0 10px}.prose p:last-child{margin-bottom:0}.public-footer{display:flex;justify-content:space-between;gap:12px;margin-top:24px;padding:18px 0 4px;border-top:1px solid var(--border);font-size:10px;color:var(--muted-foreground)}
.group-tabs{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:10px}.match-picker-item .status-badge{font-size:8px;padding:1px 5px}.match-picker-item .status-badge:before{width:4px;height:4px}
.admin-decision{border:1px solid var(--border);border-radius:7px;background:var(--background)}.admin-decision summary{cursor:pointer;padding:11px 13px;font-size:11px;font-weight:650;color:var(--muted-foreground)}.admin-decision[open] summary{border-bottom:1px solid var(--border);color:var(--foreground)}.admin-decision form{padding:13px}
.result-lock{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:13px;border:1px solid var(--success-border);border-radius:7px;background:var(--success-soft)}.result-lock strong{font-size:15px}.result-lock small{font-size:9px;color:#166534}
.review-grid{display:flex;flex-direction:column;gap:7px}.review-row{display:grid;grid-template-columns:minmax(180px,1fr) 130px minmax(220px,1.5fr) auto;gap:8px;align-items:center;padding:9px;border:1px solid var(--border);border-radius:6px}.review-row strong{font-size:10px}.review-row .input{min-height:34px;font-size:10px}
.reserve-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.reserve-card{padding:12px;border:1px solid var(--border);border-radius:6px;background:var(--muted)}.reserve-card span,.reserve-card strong{display:block}.reserve-card span{font-size:8px;color:var(--brand-red);font-weight:700;letter-spacing:.08em}.reserve-card strong{margin-top:4px;font-size:13px}
.slot-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.slot-card{display:flex;flex-direction:column;gap:4px;padding:10px;border:1px solid var(--border);border-radius:6px;background:var(--background)}.slot-card>span{font-size:8px;color:var(--brand-blue);font-weight:700}.slot-card>strong{font-size:11px}.slot-card>small{font-size:8px;color:var(--muted-foreground)}.slot-card form{margin-top:5px}.slot-card .input{min-height:31px;font-size:9px}
.pairing-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.pairing-list>div{padding:9px;border:1px solid var(--border);border-radius:6px}.pairing-list span,.pairing-list strong{display:block}.pairing-list span{font-size:8px;color:var(--muted-foreground)}.pairing-list strong{font-size:10px;margin-top:2px}
.manifest-grid{display:grid;gap:10px}.manifest-grid>div{display:grid;grid-template-columns:120px 1fr;gap:10px;align-items:start}.manifest-grid span{font-size:10px;color:var(--muted-foreground)}.manifest-grid code{font-size:9px;overflow-wrap:anywhere;padding:5px 7px;border:1px solid var(--border);border-radius:5px;background:var(--muted)}
.participant-row>span strong,.participant-row>span small{display:block}.participant-row>span small{font-size:8px;color:var(--muted-foreground);margin-top:2px}
.auth-card code,.help-box code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.92em}

@media(max-width:1080px){.slot-grid,.pairing-list{grid-template-columns:repeat(2,minmax(0,1fr))}.review-row{grid-template-columns:1fr 110px 1fr auto}}
@media(max-width:820px){.phase-banner{align-items:flex-start;flex-direction:column}.phase-progress{justify-content:flex-start}.rules-grid{grid-template-columns:1fr}.public-nav{width:100%;display:grid;grid-template-columns:repeat(4,1fr)}.public-nav a{text-align:center}.slot-grid,.pairing-list{grid-template-columns:repeat(2,minmax(0,1fr))}.review-row{grid-template-columns:1fr}.public-footer{flex-direction:column}.hero-content{grid-template-columns:auto 1fr}.hero-rule{display:none}}
@media(max-width:520px){.slot-grid,.pairing-list,.reserve-grid{grid-template-columns:1fr}.metric-grid{grid-template-columns:1fr 1fr}.metric-card{min-height:78px}.phase-banner h3{font-size:18px}.public-nav a{padding:6px 4px}.console-body{padding:14px}.match-picker-list{max-height:none}}

@media(max-width:620px){
  .standings-table{min-width:0;table-layout:auto}
  .standings-table th:nth-child(4),.standings-table td:nth-child(4),
  .standings-table th:nth-child(5),.standings-table td:nth-child(5),
  .standings-table th:nth-child(6),.standings-table td:nth-child(6){display:none}
  .standings-table th,.standings-table td{padding-left:8px;padding-right:8px;font-size:10px}
  .standings-table th:nth-child(2),.standings-table td:nth-child(2){min-width:112px}
  .rank5-table{min-width:0}.rank5-table th,.rank5-table td{padding-left:8px;padding-right:8px;font-size:10px}
  .table-title-row{align-items:flex-start}.table-title-row .status-badge{flex:none}
}


/* Audited incident recovery: compact, explicit, and not visually dominant. */
.subsection-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px}
.subsection-head strong,.subsection-head small{display:block}
.subsection-head strong{font-size:11px;font-weight:650}
.subsection-head small{margin-top:2px;color:var(--muted-foreground);font-size:9px;line-height:1.45}
.incident-list{display:flex;flex-direction:column;gap:7px}
.incident-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,auto);gap:10px;align-items:center;padding:9px 10px;border:1px solid var(--border);border-radius:6px;background:var(--muted)}
.incident-row>div strong,.incident-row>div small{display:block}
.incident-row>div strong{font-size:10px;font-weight:620}
.incident-row>div small{margin-top:2px;color:var(--muted-foreground);font-size:9px}
.inline-void-form{display:flex;align-items:center;gap:6px;min-width:0}
.input-compact{min-height:31px;padding:5px 8px;font-size:9px}
@media(max-width:620px){.incident-row{grid-template-columns:1fr}.inline-void-form{align-items:stretch;flex-direction:column}.inline-void-form .button{width:100%}}

/* V3.1 flexible pairing / catch-up controls */
.quick-pair-panel{margin-bottom:14px}
.quick-pair-form{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto;gap:10px;align-items:end}
.quick-vs{display:grid;place-items:center;height:38px;min-width:42px;font-size:11px;font-weight:800;color:var(--muted-foreground);letter-spacing:.08em}
.catchup-box{border:1px solid var(--border);border-radius:8px;background:var(--muted);overflow:hidden}
.catchup-box summary{cursor:pointer;list-style:none;padding:11px 13px;font-size:13px;font-weight:650;display:flex;align-items:center;justify-content:space-between;gap:8px}
.catchup-box summary::-webkit-details-marker{display:none}
.catchup-box summary:after{content:'+';font-size:16px;color:var(--muted-foreground)}
.catchup-box[open] summary:after{content:'−'}
.catchup-body{border-top:1px solid var(--border);padding:13px;background:var(--background)}
.catchup-body>p{margin:0 0 10px;color:var(--muted-foreground);font-size:12px;line-height:1.55}
@media(max-width:760px){.quick-pair-form{grid-template-columns:1fr}.quick-vs{height:auto;min-width:0;padding:0;text-align:left;display:block}.quick-pair-form .button{width:100%}}
