/* ===== VGR5 Tournament Engine — Light UI ===== */
:root {
    --bg: #f3f4f6;
    --bg-2: #ffffff;
    --panel: #ffffff;
    --panel-2: #f7f8fa;
    --border: #e6e8ec;
    --line: #eef0f3;
    --text: #1f2733;
    --muted: #6b7685;
    --primary: #8a1f3a;     /* burgundy */
    --primary-2: #6d1730;
    --green: #178a52;
    --red: #d2455a;
    --purple: #7c4dca;
    --yellow: #c98a00;
    --cream: #f4e7c9;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
    --shadow-lg: 0 8px 28px rgba(16,24,40,.10);
}
* { box-sizing: border-box; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
h1 { font-size: 1.7rem; margin: .2rem 0; color: #19222e; }
h2 { font-size: 1.2rem; margin: 1.2rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .5rem; color: #2b3543; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.strong { font-weight: 700; }
.hidden { display: none !important; }

/* Auth / login page */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #8a1f3a 0%, #4a1020 100%); padding: 20px; }
.auth-wrap { width: 100%; max-width: 400px; }
.auth-card { background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 34px 30px; }
.auth-brand { font-weight: 800; font-size: 1.2rem; color: #19222e; margin-bottom: 18px; }
.auth-card h1 { font-size: 1.5rem; margin: 0 0 4px; }
.auth-card .form { margin-top: 18px; }
.auth-back { display: inline-block; margin-top: 16px; color: var(--muted); font-size: .85rem; }
.auth-flash { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 10; min-width: 280px; text-align: center; }
code { background: #f1f3f6; padding: 1px 6px; border-radius: 5px; font-size: .85em; color: #b3325a; }

/* Topbar */
.topbar { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; box-shadow: var(--shadow); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { font-weight: 800; font-size: 1.18rem; color: #19222e; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--primary); }
.brand-sub { color: var(--muted); font-weight: 500; font-size: .85rem; }
.topnav a { margin-left: 20px; color: var(--muted); font-weight: 600; }
.topnav a:hover { color: var(--text); text-decoration: none; }
.nav-admin { color: var(--primary) !important; }
.nav-toggle { display: none; width: 42px; height: 40px; border: 1px solid var(--border); border-radius: 9px; background: #fff; cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: #333; border-radius: 2px; transition: .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Layout bits */
main.wrap { padding-top: 26px; padding-bottom: 60px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.section-title { border-left: 3px solid var(--primary); padding-left: 10px; margin-top: 28px; }
.footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; padding: 22px 0; }

/* Panels */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--shadow); }

/* Buttons */
.btn { display: inline-block; background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 9px; padding: 9px 15px; font-weight: 600; font-size: .9rem; cursor: pointer; transition: .15s; }
.btn:hover { border-color: #cdd2da; background: #fafbfc; text-decoration: none; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; background: #f1f3f5; }
.btn:disabled:hover, .btn[disabled]:hover { border-color: var(--border); background: #f1f3f5; }
.btn-primary { background: linear-gradient(180deg, var(--primary), var(--primary-2)); border-color: transparent; color: #fff; }
.btn-primary:hover { background: var(--primary-2); }
.btn-danger { color: var(--red); border-color: #f0c9d0; }
.btn-danger:hover { background: #fcecef; }
.btn-sm { padding: 5px 10px; font-size: .8rem; border-radius: 7px; }

/* Forms */
.form .field { margin-bottom: 14px; }
.form label { display: block; font-weight: 600; margin-bottom: 5px; font-size: .9rem; }
input, select, textarea { width: 100%; background: #fff; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 9px 11px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(138,31,58,.10); }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin: 6px 0; }
.check input { width: auto; }
.form-actions { margin-top: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2-side { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-2-side { grid-template-columns: 1fr; } }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: none; }
.table .num { text-align: center; }
.table .name { font-weight: 600; }
.standings th, .standings td { white-space: nowrap; }
.standings .rankpill { display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 6px; background: #f1f3f6; border: 1px solid var(--border); font-weight: 700; font-size: .82rem; }
.standings tr.qualified .rankpill { background: #e4f5ec; color: var(--green); border-color: #b8e6cd; }
.standings tr.qualified .name { color: #126e41; }

/* Badges + chips */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: .72rem; font-weight: 700; }
.badge-gray { background: #eef0f3; color: var(--muted); }
.badge-blue { background: #e7eefb; color: #2f63c4; }
.badge-green { background: #e4f5ec; color: var(--green); }
.badge-purple { background: #f0e9fb; color: var(--purple); }
.chip { display: inline-block; background: #f3f4f6; color: #4b5563; border: 1px solid var(--border); border-radius: 7px; padding: 2px 9px; font-size: .78rem; font-weight: 600; }

/* Flash */
.flash { padding: 11px 15px; border-radius: 9px; margin: 14px 0; font-weight: 500; }
.flash-success { background: #e4f5ec; color: #176c41; border: 1px solid #bfe7d1; }
.flash-error { background: #fcebee; color: #a02234; border: 1px solid #f3c6cf; }
.flash ul { margin: 6px 0 0; padding-left: 18px; }

/* Admin tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tab { padding: 10px 16px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Public segmented tabs (Groups / Knockout / Results) */
.pubtabs { display: inline-flex; background: #eceef2; border-radius: 12px; padding: 5px; gap: 4px; margin-bottom: 26px; }
.pubtab { padding: 9px 22px; border-radius: 9px; font-weight: 600; color: var(--muted); border: none; background: transparent; cursor: pointer; font-size: .92rem; }
.pubtab:hover { color: var(--text); text-decoration: none; }
.pubtab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }

/* Stats */
.stat { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.stat-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.stat-val { font-size: 1.15rem; font-weight: 700; }
.tiebreak-list { margin: 0; padding-left: 20px; }
.json { background: #1b2230; border: 1px solid #2a3346; border-radius: 10px; padding: 14px; overflow: auto; font-size: .82rem; color: #9fd8b4; }

/* Presets / radio cards */
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .preset-grid { grid-template-columns: 1fr 1fr; } }
.preset-card { display: flex; gap: 10px; align-items: center; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; cursor: pointer; transition: .15s; }
.preset-card:hover { border-color: #cdd2da; }
.preset-card input { width: auto; }
.preset-body { display: flex; flex-direction: column; }

.radio-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .radio-cards { grid-template-columns: 1fr; } }
.radio-card { display: flex; align-items: flex-start; gap: 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: .15s; }
.radio-card:hover { border-color: #cdd2da; }
.radio-card input { width: auto; margin-top: 3px; }
.radio-card span { display: flex; flex-direction: column; }
.radio-card:has(input:checked) { border-color: var(--primary); background: #fcf2f5; }
.radio-cards-stack { grid-template-columns: 1fr; }

/* Category pills */
.cat-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; }
.cat-pills-label { color: var(--muted); font-size: .82rem; font-weight: 600; }
.cat-pill { padding: 6px 14px; border-radius: 20px; background: var(--cream); border: 1px solid #e7d6ad; color: var(--primary); font-weight: 700; font-size: .85rem; }
.cat-pill:hover { text-decoration: none; filter: brightness(.98); }
.cat-pill.active { background: linear-gradient(180deg, var(--primary), var(--primary-2)); border-color: transparent; color: #fff; }

/* Category builder */
.cat-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.cat-row { display: flex; align-items: center; gap: 8px; }
.cat-row input[type=text] { flex: 1; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper input { width: 56px; text-align: center; }
.stepper .step-down { width: 30px; padding: 6px 0; background: #fff; border: 1px solid var(--border); border-radius: 7px; color: var(--text); cursor: pointer; font-weight: 700; }
.cat-del { width: 32px; padding: 6px 0; background: #fcecef; border: 1px solid #f0c9d0; border-radius: 7px; color: var(--red); cursor: pointer; }

/* Walkover */
.wo-form { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.wo-label { color: var(--muted); font-size: .74rem; font-weight: 700; }
.wo-btn { padding: 4px 9px; font-size: .8rem; line-height: 1; }
.wo-btn.wo-on { background: #fdf3da; border-color: var(--yellow); color: #9a6b00; }

/* Cards (public home) */
.hero { padding: 10px 0 20px; }
.hero h1 { font-size: 2rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.comp-card { display: block; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; color: var(--text); transition: .15s; box-shadow: var(--shadow); }
.comp-card:hover { border-color: var(--primary); transform: translateY(-2px); text-decoration: none; box-shadow: var(--shadow-lg); }
.comp-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.comp-card h3 { margin: 4px 0 6px; color: #19222e; }
.comp-card-foot { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }

/* Match rows */
.matchlist { display: flex; flex-direction: column; gap: 8px; }
.match { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.match-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; flex: 1; min-width: 220px; }
.team { font-weight: 600; }
.team-b { text-align: right; }
.team.win { color: var(--green); }
.match-score { background: #fff; border: 1px solid var(--border); border-radius: 7px; padding: 3px 10px; font-weight: 700; font-size: .85rem; white-space: nowrap; text-align: center; }
.match-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scalar-input, .sets-input { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.scalar-input input { width: 52px; text-align: center; }
.set-pair { display: inline-flex; gap: 2px; }
.set-pair input { width: 42px; text-align: center; padding: 6px 4px; }

/* Team-tie score entry */
.match-tie { flex-direction: column; align-items: stretch; }
.match-tie .match-form { flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; }
.tie-input { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.rubber { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rubber-label { display: inline-block; min-width: 30px; font-weight: 700; font-size: .78rem; color: var(--primary); background: var(--cream); border: 1px solid #e7d6ad; border-radius: 6px; padding: 3px 8px; text-align: center; }
.rubber .set-pair input { width: 38px; }

/* Wide match grid (used for team-tie input so rubbers have room) */
.matchlist-wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(500px, 1fr)); gap: 14px; }
.matchlist-wide .match { background: #fff; padding: 14px 16px; }
.matchlist-wide .match-teams { margin-bottom: 4px; }
.matchlist-wide .match-teams .team { font-size: .98rem; }
.matchlist-wide .rubber { gap: 8px; }
.matchlist-wide .rubber-label { min-width: 128px; text-align: left; padding: 6px 10px; font-size: .82rem; }
.matchlist-wide .set-pair { gap: 4px; }
.matchlist-wide .set-pair input { width: 50px; height: 38px; }
@media (max-width: 600px) { .matchlist-wide { grid-template-columns: 1fr; } .matchlist-wide .rubber-label { min-width: 100px; } }

/* Long inputs (sets / ties): one match per row, full width, stacked so the
   score inputs sit below the team names and wrap inside the card instead of
   overflowing past its right edge. */
.matchlist-full { grid-template-columns: 1fr; }
.match-col { flex-direction: column; align-items: stretch; }
.match-col .match-teams { width: 100%; }
.match-col .match-form { width: 100%; }
.match-col .sets-input { width: 100%; }

/* Postponed (ditunda) markers */
.badge-tunda { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 800; letter-spacing: .03em; color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.match-postponed { border-color: #fcd34d; background: #fffbeb; }
.postpone-form, .reset-form { display: inline-flex; }
.sched-row.postponed { background: #fffbeb; }
.tag-tunda { color: #92400e !important; background: #fef3c7 !important; border-color: #fcd34d !important; white-space: nowrap; }

/* Schedule Match modal */
.head-ico { color: var(--primary); }
.modal-overlay { position: fixed; inset: 0; background: rgba(17,24,39,.55); display: none; align-items: flex-start; justify-content: center; z-index: 50; padding: 40px 16px; overflow-y: auto; }
.modal-overlay.show { display: flex; }
.modal { background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; padding: 22px 24px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h3 { margin: 0; font-size: 1.2rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; width: auto; padding: 0 4px; }
.modal-close:hover { color: var(--text); }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn-primary { flex: 1; }

/* Empty states (composition / schedule not set) */
.empty-block { text-align: center; color: var(--muted); letter-spacing: .05em; font-weight: 600; padding: 70px 20px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }

/* Wide modal + composition / schedule editors */
.modal-wide { max-width: 560px; }
.comp-scroll { max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.comp-group { margin-bottom: 14px; }
.comp-group h4 { margin: 4px 0 8px; font-size: 1rem; color: var(--primary); }
.comp-slot { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 10px; margin-bottom: 7px; }
.comp-slot .slot-label { color: var(--muted); font-size: .78rem; font-weight: 600; background: #f1f3f6; border-radius: 6px; padding: 7px 8px; text-align: center; }
.sched-edit-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-bottom: 7px; }
.sched-edit-teams { font-weight: 600; font-size: .9rem; }
.sched-edit-row input { width: auto; }

/* 24-hour schedule input (date + HH + MM, locale-independent) */
.time-input { display: inline-flex; align-items: center; gap: 4px; }
.time-input .ti-date { width: auto; padding: 6px 8px; }
.time-input .ti-hm { width: 52px; text-align: center; padding: 6px 4px; }
.time-input .ti-colon { font-weight: 700; color: var(--muted); }

/* Bracket builder rows */
.bracket-row { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 8px; margin-bottom: 8px; }
.bracket-row select { width: 100%; }
.br-del { background: none; border: none; }

/* Group composition (drawing) */
.draw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.draw-group { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--panel-2); }
.draw-group-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 1.05rem; }
.slot-row { display: grid; grid-template-columns: 78px 1fr auto; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; margin-bottom: 7px; }
.slot-label { color: var(--muted); font-size: .78rem; font-weight: 600; background: #f1f3f6; border-radius: 6px; padding: 4px 8px; text-align: center; }
.slot-team { font-weight: 600; }
.slot-del { color: var(--red); font-weight: 700; padding: 0 6px; }
.slot-del:hover { text-decoration: none; }
.slot-add { display: flex; gap: 6px; margin-top: 8px; }
.slot-add select { flex: 1; }

/* Manual draw + schedule */
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; }
.match-add-grid { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.match-add-grid select, .match-add-grid input { width: auto; flex: 1; min-width: 130px; }
.vs-sep { color: var(--muted); font-weight: 700; font-size: .85rem; }
.match-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.meta-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meta-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sched-form { display: flex; align-items: center; gap: 6px; }
.sched-form input { width: auto; padding: 5px 8px; font-size: .82rem; }
.sched-ico { font-size: .95rem; }
.match-del { color: var(--red); font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.match-del:hover { background: #fcecef; text-decoration: none; }

hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.install-actions { display: flex; gap: 10px; margin: 14px 0; }

/* ===== Public group standings — one full-width section per group ===== */
.standings-head { display: flex; align-items: center; gap: 10px; margin: 26px 0 14px; }
.standings-head .ico { width: 30px; height: 30px; color: var(--primary); }
.standings-head h2 { margin: 0; font-size: 1.5rem; color: var(--primary); }
.standings-sub { color: #5a6b8c; margin: -6px 0 22px; }

.group-section { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.group-section .gtable { width: 100%; border-collapse: collapse; }
.group-section .gtable thead th { background: #fafbfc; color: var(--muted); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; padding: 16px 14px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.group-section .gtable thead th.group-name { text-align: left; font-size: 1.15rem; text-transform: none; letter-spacing: 0; color: #19222e; font-weight: 700; }
.group-section .gtable tbody td { padding: 14px 14px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.group-section .gtable tbody tr:last-child td { border-bottom: none; }
.group-section .gtable td.g-rank { width: 44px; color: var(--muted); font-weight: 700; }
.group-section .gtable td.g-name { text-align: left; font-weight: 600; color: #1f2733; }
.group-section .gtable td.g-pts { font-weight: 800; }
.group-section .gtable tbody tr.qualified td.g-name { color: #126e41; }
.group-section .gtable tbody tr.qualified td.g-rank { color: var(--green); }
.empty-state { padding: 22px; color: #5a6b8c; background: #fafbfc; border: 1px dashed var(--border); border-radius: 10px; margin: 0; }

/* Form / Kondisi pills */
.form-cell { display: inline-flex; gap: 3px; justify-content: center; }
.form-dot { width: 16px; height: 16px; border-radius: 4px; display: inline-block; font-size: 0; background: #e6e8ec; }
.form-dot.w { background: var(--green); }
.form-dot.l { background: var(--red); }
.form-dot.d { background: #c7ccd4; }
.form-dot.wo { background: var(--yellow); }
.form-dash { color: #c7ccd4; letter-spacing: 3px; }

/* ===== Knockout board (dark, Sudirman-style) ===== */
.koboard { background: #0e0e12; border-radius: 16px; padding: 0 0 28px; overflow-x: auto; box-shadow: var(--shadow); }
.korounds { display: flex; min-width: 760px; }
.korh { flex: 1; min-width: 240px; text-align: center; color: #d6d8de; font-weight: 700; letter-spacing: .02em; padding: 18px 0; }
.kobracket { display: flex; min-width: 760px; }
.koround { flex: 1; min-width: 240px; display: flex; flex-direction: column; justify-content: space-around; }
.komatch { position: relative; margin: 16px 28px; background: #17171c; border: 1px solid #26262e; border-radius: 9px; overflow: hidden; }
/* horizontal connector stubs reaching into the column gap */
.koround:not(:last-child) .komatch::after { content: ''; position: absolute; left: 100%; top: 50%; width: 28px; height: 2px; background: #34343d; }
.koround:not(:first-child) .komatch::before { content: ''; position: absolute; right: 100%; top: 50%; width: 28px; height: 2px; background: #34343d; }
.koteam { display: flex; align-items: center; gap: 10px; padding: 11px 14px; color: #e7e8ec; }
.koteam + .koteam { border-top: 1px solid #26262e; }
.koteam.win { background: #14241a; }
.koseed { color: #8b8d96; font-size: .72rem; font-weight: 700; width: 14px; text-align: center; }
.koav { width: 24px; height: 24px; border-radius: 50%; background: #2a2a33; color: #cfd1d8; font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.koteam.win .koav { background: #1d4a30; color: #7ef0ab; }
.konm { flex: 1; font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.koteam.win .konm { color: #fff; }
.kodot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }
.kosc { width: 22px; text-align: center; font-weight: 800; color: #b9bcc4; }
.koteam.win .kosc { color: #7ef0ab; }

.kothird { margin-top: 22px; }
.kothird-title { font-weight: 800; color: #a36a00; margin-bottom: 10px; font-size: 1.02rem; }
.koboard-mini { padding: 14px 0; }
.koboard-mini .koround { max-width: 320px; }

/* Bracket (legacy/admin) */
.bracket { display: flex; gap: 24px; overflow-x: auto; padding: 8px 2px 16px; }
.bracket-round { display: flex; flex-direction: column; justify-content: space-around; gap: 18px; min-width: 220px; }
.bracket-round-title { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; text-align: center; }
.bracket-match { background: #fff; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; box-shadow: var(--shadow); }
.bm-row { display: flex; justify-content: space-between; padding: 9px 12px; font-weight: 600; font-size: .88rem; }
.bm-row + .bm-row { border-top: 1px solid var(--line); }
.bm-row.win { background: #e9f6ef; color: #126e41; }
.bm-score { color: var(--muted); font-weight: 700; }
.bm-row.win .bm-score { color: var(--green); }

.group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }

/* Public schedule (Jadwal) */
.sched-date { font-weight: 700; color: var(--primary); margin: 20px 0 8px; font-size: .95rem; }
.sched-row { display: grid; grid-template-columns: 56px 1fr auto 1fr auto; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; box-shadow: var(--shadow); }
.sched-time { font-weight: 700; color: var(--text); font-size: .9rem; }
.sched-a { text-align: right; font-weight: 600; }
.sched-b { text-align: left; font-weight: 600; }
.sched-vs { color: var(--muted); font-size: .78rem; font-weight: 700; }
.sched-tag { font-size: .72rem; font-weight: 700; color: var(--muted); background: #f3f4f6; border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px; }
@media (max-width: 560px) { .sched-row { grid-template-columns: 48px 1fr auto 1fr; } .sched-tag { display: none; } }

/* Results list */
.results-list { display: flex; flex-direction: column; gap: 8px; }
.result-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; box-shadow: var(--shadow); }
.result-row .r-a { text-align: right; font-weight: 600; }
.result-row .r-b { text-align: left; font-weight: 600; }
.result-row .r-score { background: var(--primary); color: #fff; border-radius: 7px; padding: 4px 12px; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.result-row .r-a.win, .result-row .r-b.win { color: #126e41; }
.result-stage { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 8px; font-weight: 700; }

/* ===================== Responsive / mobile ===================== */
/* Horizontal scroll wrapper so wide tables never overflow their card */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll > table { min-width: max-content; }
.group-section .table-scroll { border-radius: 14px; }

@media (max-width: 720px) {
    .wrap { padding: 0 12px; }
    h1 { font-size: 1.4rem; }
    .hero h1 { font-size: 1.6rem; }

    /* Topbar: collapse nav into a hamburger dropdown */
    .topbar-inner { height: 60px; padding: 0 16px; flex-wrap: nowrap; gap: 8px; position: relative; }
    .brand { font-size: 1.05rem; }
    .brand-sub { display: none; }
    .nav-toggle { display: inline-flex; }
    .topnav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; border: 1px solid var(--border); border-top: none; border-radius: 0 0 12px 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 30; }
    .topnav.open { display: flex; }
    .topnav a { margin-left: 0; font-size: .95rem; padding: 12px 14px; border-radius: 8px; }
    .topnav a:hover { background: #f6f7f9; }

    /* Page heads stack */
    .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
    .page-head .row-actions { flex-wrap: wrap; }
    .row-actions .btn { flex: 1 1 auto; text-align: center; }

    /* Panels tighter */
    .panel { padding: 14px; }

    /* Grids collapse to one column */
    .grid-2, .grid-3, .grid-2-side, .card-grid, .group-grid,
    .draw-grid, .preset-grid, .radio-cards { grid-template-columns: 1fr !important; }

    /* Match cards stack their pieces */
    .match { flex-direction: column; align-items: stretch; gap: 8px; }
    .match-teams { min-width: 0; }
    .matchlist-wide { grid-template-columns: 1fr; }

    /* Tabs scroll horizontally instead of wrapping awkwardly */
    .tabs, .cat-pills { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tab, .cat-pill { white-space: nowrap; }
    .pubtabs { width: 100%; overflow-x: auto; }

    /* Modals fill the screen */
    .modal, .modal-wide { max-width: 100%; }
    .modal-overlay { padding: 16px 10px; }

    /* Public standings full-width section: keep table within scroll */
    .group-section .gtable { min-width: 480px; }
    .standings-head h2 { font-size: 1.25rem; }

    /* Knockout board scrolls (already) but tighten */
    .koround, .korh { min-width: 200px; }

    /* Schedule rows + 24h input wrap */
    .sched-row { grid-template-columns: 44px 1fr auto 1fr; }
    .time-input { flex-wrap: wrap; }
    .match-meta { flex-wrap: wrap; gap: 6px; }

    /* Stop any flex/grid child from forcing the panel wider than the screen */
    main.wrap { overflow-x: hidden; }
    .panel, .matchlist, .match, .match-form, .match-teams,
    .grid-2-side > div, .comp-group, .sched-edit-row { min-width: 0; max-width: 100%; }
    .sched-form, .match-form, .wo-form { flex-wrap: wrap; }
    .match-form .scalar-input, .match-form .sets-input { flex-wrap: wrap; }
    .time-input .ti-date { max-width: 150px; }
    .match-meta .sched-form { flex: 1 1 auto; }
}

@media (max-width: 420px) {
    .sched-row { grid-template-columns: 1fr; text-align: center; gap: 4px; }
    .sched-a, .sched-b { text-align: center; }
}

/* ===================== Public home hero + cards ===================== */
.brand-logo { height: 30px; width: 30px; border-radius: 7px; object-fit: cover; vertical-align: middle; margin-right: 2px; }
.brand { display: inline-flex; align-items: center; gap: 8px; }

.phero { position: relative; border-radius: 16px; overflow: hidden; margin: 6px 0 10px; min-height: 260px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(120deg, #8a1f3a 0%, #b5294b 45%, #6d1730 100%); box-shadow: var(--shadow-lg); }
.phero-img { background-size: cover; background-position: center; }
.phero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(120,20,40,.55), rgba(80,14,28,.65)); }
.phero-overlay { position: relative; z-index: 1; text-align: center; color: #fff; padding: 50px 24px; max-width: 720px; }
.phero-overlay h1 { color: #fff; font-size: 2.6rem; line-height: 1.12; margin: 0 0 14px; font-weight: 800; text-shadow: 0 2px 12px rgba(0,0,0,.3); }
.phero-overlay p { color: rgba(255,255,255,.92); font-size: 1.02rem; margin: 0; text-shadow: 0 1px 6px rgba(0,0,0,.3); }
@media (max-width: 720px) { .phero-overlay h1 { font-size: 1.7rem; } .phero { min-height: 200px; } .phero-overlay { padding: 34px 18px; } }

.comp-card { display: flex; flex-direction: column; }
.comp-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.comp-ico { width: 40px; height: 40px; border-radius: 10px; background: #fbe9ec; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.comp-arrow { color: var(--primary); font-weight: 800; font-size: 1.1rem; transition: transform .15s; }
.comp-card:hover .comp-arrow { transform: translateX(3px); }
.comp-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.comp-card-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); color: #4b5563; font-size: .82rem; font-weight: 600; }

/* ===== Home: announcement + schedule/result cards ===== */
.info-card { display: flex; gap: 12px; align-items: flex-start; background: #fff7ed; border: 1px solid #fcd9a8; border-left: 4px solid #f59e0b; border-radius: 12px; padding: 14px 16px; margin: 14px 0; box-shadow: var(--shadow); }
.info-ico { font-size: 1.2rem; line-height: 1.4; }
.info-body strong { display: block; color: #92400e; margin-bottom: 2px; }
.info-body p { margin: 0; color: #6b4a16; font-size: .92rem; }

.jempty { color: var(--muted); font-size: .9rem; text-align: center; padding: 18px 0; }

/* Sections 2 + 3 — two columns on desktop, stacked on mobile (Jadwal first) */
.home-two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 34px; }
.col-jadwal, .col-hasil { min-width: 0; }
.col-jadwal .section-title, .col-hasil .section-title { margin-top: 0; }
/* Mobile: no fixed-height inner scroll — let cards flow and the page scroll. */
@media (max-width: 899px) {
    .jadwal-list { max-height: none; overflow: visible; }
    .result-panel { max-height: none; overflow: visible; }
}
@media (min-width: 900px) {
    .home-two { grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); align-items: stretch; }
    /* Equal-height columns: fixed height, inner areas fill and scroll. */
    .col-jadwal, .col-hasil { display: flex; flex-direction: column; height: 680px; }
    .col-jadwal .section-title, .col-hasil .section-title { flex: 0 0 auto; }
    .jadwal-list { flex: 1 1 auto; min-height: 0; max-height: none; }
    .col-hasil .result-wrap { flex: 1 1 auto; min-height: 0; margin-bottom: 0; display: flex; flex-direction: column; }
    .col-hasil .result-tabs { flex: 0 0 auto; }
    .col-hasil .result-panel { flex: 1 1 auto; min-height: 0; max-height: none; }
}

/* Section 2 — Update Jadwal (dark panel, white cards, red on hover) */
.jadwal-list { display: flex; flex-direction: column; gap: 12px; max-height: 660px; overflow-y: auto; padding: 16px; background: #17191d; border-radius: 14px; }
.jadwal-list::-webkit-scrollbar { width: 8px; }
.jadwal-list::-webkit-scrollbar-thumb { background: #3a3f47; border-radius: 8px; }
.jl-date { font-size: .82rem; font-weight: 700; color: #e8eaed; padding: 8px 2px 2px; }
.jl-date:first-child { padding-top: 0; }
.jl-card { display: block; background: #fff; border: 1px solid #e6e8ec; border-radius: 12px; padding: 14px 16px; color: var(--text); transition: .15s; }
.jl-card:hover { background: #e11d2a; border-color: #e11d2a; text-decoration: none; }
.jl-card:hover .jl-name, .jl-card:hover .jl-team, .jl-card:hover .jl-time, .jl-card:hover .jl-time-sm { color: #fff; }
.jl-card:hover .jl-meta { color: rgba(255,255,255,.85); }
.jl-card:hover .jl-head { border-bottom-color: rgba(255,255,255,.28); }
.jl-card:hover .jl-ico { background: rgba(255,255,255,.22); }
.jl-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.jl-ico { width: 34px; height: 34px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: #fcf2f5; border-radius: 8px; font-size: 1rem; }
.jl-headtext { min-width: 0; }
.jl-name { font-weight: 800; font-size: .92rem; color: #19222e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jl-meta { font-size: .74rem; color: var(--muted); margin-top: 1px; }
.jl-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jl-teams { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.jl-team { font-weight: 700; font-size: .95rem; color: #1a1d21; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jl-time { font-size: 1.5rem; font-weight: 800; color: #1a1d21; white-space: nowrap; }
.jl-time-sm { font-size: 1rem; color: #b45309; }

/* Section 3 — Hasil Pertandingan (tabbed, dark rows) */
.result-wrap { padding: 16px; }
.result-tabs { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; background: #f1f3f5; padding: 6px; border-radius: 10px; margin-bottom: 14px; scrollbar-width: none; -ms-overflow-style: none; }
.result-tabs::-webkit-scrollbar { display: none; }
.rtab { flex: 0 0 auto; white-space: nowrap; border: none; background: transparent; padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: .85rem; color: var(--muted); cursor: pointer; }
.rtab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.result-panel { max-height: 640px; overflow-y: auto; padding-right: 4px; }
.result-panel.hidden { display: none; }
.rdate { font-weight: 700; font-size: .85rem; color: var(--muted); padding: 14px 2px 8px; }
.rrow { background: #1f2329; color: #fff; border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.rrow-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.rteam { font-weight: 700; font-size: .95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e8eaed; }
.rteam.ra { text-align: left; }
.rteam.rb { text-align: right; }
.rteam.rwin { color: #fff; }
.rscore { display: inline-flex; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 800; }
.rnum { color: #aab2bd; display: inline-flex; align-items: center; gap: 6px; }
.rnum.win { color: #fff; }
.rcolon { color: #8a929c; }
.wdot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; }
.wo-badge { background: #fff; color: var(--primary); font-size: .68rem; font-weight: 800; border-radius: 6px; padding: 2px 7px; }
.rmeta { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 9px; }
.rstage { color: #aeb6c0; font-size: .76rem; }
.cat-badge { background: #e11d2a; color: #fff; font-size: .72rem; font-weight: 700; border-radius: 6px; padding: 3px 10px; }
@media (max-width: 600px) {
    .rrow { padding: 12px 12px; }
    .rteam { font-size: .85rem; }
}

/* Settings banner preview */
.banner-preview { margin: 10px 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.banner-preview img { width: 100%; max-height: 220px; object-fit: cover; display: block; }

/* Footer redesign */
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; }
.footer-brand { color: #19222e; font-weight: 800; font-size: 1.05rem; }
.footer-brand:hover { text-decoration: none; }
.footer-nav a { color: var(--muted); margin-left: 22px; font-size: .9rem; }
.footer-nav a:first-child { margin-left: 0; }
.footer-copy { text-align: center; border-top: 1px solid var(--border); padding-top: 14px; color: var(--muted); font-size: .82rem; }
@media (max-width: 560px) { .footer-nav a { margin-left: 14px; } }

/* ===================== Result dropdown (per-game detail) ===================== */
.result-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 8px; overflow: hidden; }
.result-card .result-row { background: none; border: none; border-radius: 0; box-shadow: none; margin: 0; grid-template-columns: 1fr auto 1fr auto; }
.result-card.has-detail .result-row { cursor: pointer; }
.result-card.has-detail .result-row:hover { background: #fafbfc; }
.r-chevron { color: var(--muted); font-weight: 700; transition: transform .18s; justify-self: end; }
.result-card.open .r-chevron { transform: rotate(180deg); }
.r-score small { color: var(--yellow); font-weight: 700; }

.result-detail { border-top: 1px dashed var(--border); background: #fafbfc; padding: 6px 16px 10px; }
.rdetail-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rdetail-row:last-child { border-bottom: none; }
.rd-label { font-weight: 600; font-size: .85rem; color: #374151; }
.rd-sets { display: flex; gap: 10px; flex-wrap: wrap; }
.rd-set { background: #fff; border: 1px solid var(--border); border-radius: 7px; padding: 3px 10px; font-weight: 700; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.rd-set b { font-weight: 700; color: #6b7280; }
.rd-set b.w { color: var(--primary); }

.ko-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.ko-pair select { width: 100%; }

/* ===== Admin clickable knockout bracket (light) ===== */
.info-banner { background: #fff5e6; border: 1px solid #f3d9a8; color: #8a5a00; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-weight: 500; }
.koboard-admin { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 6px; }
.koboard-admin .koround-h { color: var(--muted); }
.koboard-admin .komatch { background: #fff; border: 1px solid var(--border); }
.koboard-admin .koteam { color: var(--text); }
.koboard-admin .koteam + .koteam { border-top: 1px solid var(--line); }
.koboard-admin .koteam.empty .konm { color: var(--muted); font-weight: 600; }
.koboard-admin .ko-click { cursor: pointer; transition: .15s; }
.koboard-admin .ko-click:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(138,31,58,.10); }
.koboard-admin .koround:not(:last-child) .komatch::after,
.koboard-admin .koround:not(:first-child) .komatch::before { background: #d7d9e0; }

/* GAME columns (badminton 42-point perorangan: each match = 2 score cells) */
.game-col { white-space: nowrap; text-align: center; }
.game-l { border-left: 2px solid var(--border); }
thead th.game-col { background: #fbe9ec; color: var(--primary); }

/* =========================================================================
   PUBLIC — Sporty broadcast layer (FIFA-style: bold, energetic, casual)
   Scoped to `body.pub` so admin/auth chrome stays untouched.
   Heavy condensed sport type · vibrant burgundy→red gradients · dark
   broadcast panels · scorebug match cards · punchy motion.
   ========================================================================= */
body.pub {
    --pbg: #eceef3;            /* cool arena light         */
    --psurface: #ffffff;
    --psurface-2: #f5f6f9;
    --pborder: #e3e6ec;
    --pline: #eef0f4;
    --ink: #10131a;           /* near-black cool          */
    --ink-2: #39404c;
    --muted: #6c7480;
    --accent: #c1123f;        /* vivid sport red          */
    --accent-2: #8a1f3a;      /* burgundy (brand)         */
    --accent-3: #ff3d6e;      /* hot-pink pop             */
    --accent-soft: #fdeaef;
    --grad: linear-gradient(120deg, #8a1f3a 0%, #c1123f 52%, #ff3d6e 100%);
    --grad-dark: linear-gradient(125deg, #17090f 0%, #4a1020 55%, #86173a 100%);
    --green: #12a150; --green-soft: #e6f7ee;
    --yellow: #d98400; --yellow-soft: #fff3d9;
    --dark: #0f1218;          /* broadcast panels         */
    --dark-2: #171b23;
    --dark-3: #20252f;
    --shadow: 0 2px 10px rgba(18,22,32,.06);
    --shadow-lg: 0 20px 44px rgba(138,31,58,.20);
    --shadow-red: 0 12px 30px rgba(193,18,63,.30);
    --display: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
    --cond: "Barlow Condensed", "Archivo", system-ui, sans-serif;
    --sans: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    background:
        radial-gradient(1100px 480px at 100% -6%, rgba(193,18,63,.06), transparent 60%),
        var(--pbg);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}
body.pub .wrap { max-width: 1220px; }
body.pub main.wrap { padding-top: 32px; padding-bottom: 90px; }
body.pub a:hover { text-decoration: none; }
body.pub ::selection { background: var(--accent); color: #fff; }

/* ----- Scroll-entry reveal (gated by .reveal-ready so it degrades w/o JS) ----- */
body.pub.reveal-ready [data-reveal] {
    opacity: 0; transform: translateY(18px);
    transition: opacity .5s cubic-bezier(.2,.7,.3,1), transform .5s cubic-bezier(.2,.7,.3,1);
    transition-delay: calc(var(--i, 0) * 65ms);
    will-change: opacity, transform;
}
body.pub.reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    body.pub.reveal-ready [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ----- Topbar / footer chrome ----- */
body.pub .topbar { background: rgba(255,255,255,.9); backdrop-filter: saturate(1.2) blur(12px); border-bottom: 1px solid var(--pborder); box-shadow: var(--shadow); }
body.pub .brand { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.01em; color: var(--ink); }
body.pub .brand-mark { color: var(--accent); }
body.pub .topnav a { font-family: var(--cond); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; font-size: .98rem; color: var(--muted); }
body.pub .topnav a:hover { color: var(--ink); }
body.pub .nav-admin { color: var(--accent) !important; }
body.pub .nav-toggle { background: var(--psurface); border-color: var(--pborder); }
body.pub .footer { border-top: 1px solid var(--pborder); background: var(--psurface); }
body.pub .footer-brand { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; color: var(--ink); }
body.pub .footer-nav a { font-family: var(--cond); text-transform: uppercase; letter-spacing: .04em; font-size: .95rem; color: var(--muted); }

/* ----- Headings ----- */
body.pub h1, body.pub h2, body.pub h3 { color: var(--ink); }
body.pub .section-title {
    font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: -.01em;
    font-size: 1.75rem; line-height: 1.05; border-left: none; padding-left: 0;
    margin: 50px 0 20px; display: flex; align-items: center; gap: 13px;
}
body.pub .section-title::before {
    content: ""; width: 7px; height: 27px; background: var(--grad);
    border-radius: 3px; transform: skewX(-11deg); flex: 0 0 auto;
}
body.pub .muted { color: var(--muted); }

/* ----- Hero (broadcast key art) ----- */
body.pub .phero {
    position: relative; border-radius: 22px; overflow: hidden; margin: 6px 0 30px;
    min-height: 340px; display: flex; align-items: flex-end; justify-content: flex-start;
    background: var(--grad-dark); box-shadow: var(--shadow-lg);
}
/* diagonal accent stripe sweeping across the art */
body.pub .phero::before {
    content: ""; position: absolute; top: -20%; right: -6%; width: 46%; height: 150%; z-index: 1;
    background: var(--grad); opacity: .9; transform: skewX(-13deg); transform-origin: top right;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%); mask-image: linear-gradient(90deg, transparent, #000 55%);
    pointer-events: none;
}
body.pub .phero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(15,8,12,.10) 0%, rgba(18,8,14,.52) 58%, rgba(120,20,45,.78) 100%); }
body.pub .phero-img { background-size: cover; background-position: center; }
body.pub .phero-img::before { opacity: .55; }
body.pub .phero-overlay { position: relative; z-index: 2; text-align: left; color: #fff; max-width: 780px; padding: 44px 48px; }
body.pub .phero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; font-family: var(--cond); font-weight: 700;
    font-size: .92rem; text-transform: uppercase; letter-spacing: .16em; color: #fff;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
    padding: 5px 12px; border-radius: 6px; margin-bottom: 16px; backdrop-filter: blur(4px);
}
body.pub .phero-overlay h1 {
    font-family: var(--display); font-weight: 900; font-style: italic; color: #fff; text-transform: uppercase;
    font-size: 3.3rem; line-height: .98; letter-spacing: -.015em; margin: 0 0 14px;
    text-shadow: 0 4px 24px rgba(0,0,0,.35); text-wrap: balance;
}
body.pub .phero-overlay p { color: rgba(255,255,255,.92); font-size: 1.08rem; margin: 0; max-width: 52ch; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
@media (max-width: 720px) {
    body.pub .phero { min-height: 280px; }
    body.pub .phero-overlay h1 { font-size: 2.1rem; }
    body.pub .phero-overlay, body.pub .phero-img .phero-overlay { padding: 30px 22px; }
    body.pub .section-title { font-size: 1.4rem; margin-top: 36px; }
}

/* ----- Announcement ----- */
body.pub .info-card { background: var(--psurface); border: 1px solid var(--pborder); border-left: 5px solid var(--accent); border-radius: 14px; box-shadow: var(--shadow); gap: 14px; }
body.pub .info-ico { color: var(--accent); display: inline-flex; }
body.pub .info-ico svg { width: 24px; height: 24px; }
body.pub .info-body strong { font-family: var(--cond); text-transform: uppercase; letter-spacing: .05em; font-size: 1.02rem; color: var(--accent-2); }
body.pub .info-body p { color: var(--ink-2); }

/* ----- Competition cards ----- */
body.pub .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
body.pub .comp-card {
    position: relative; background: var(--psurface); border: 1px solid var(--pborder); border-radius: 18px;
    padding: 22px; overflow: hidden; box-shadow: var(--shadow); color: var(--ink);
    transition: transform .26s cubic-bezier(.2,.7,.3,1), box-shadow .26s, border-color .26s;
}
body.pub .comp-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.2,.7,.3,1); }
body.pub .comp-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
body.pub .comp-card:hover::before { transform: scaleX(1); }
body.pub .comp-card-top { margin-bottom: 16px; }
body.pub .comp-ico { width: 54px; height: 54px; border-radius: 15px; background: var(--grad); color: #fff; font-size: 0; box-shadow: 0 8px 18px rgba(138,31,58,.28); }
body.pub .comp-ico .sico { width: 27px; height: 27px; }
body.pub .comp-arrow { color: var(--accent); transition: transform .24s cubic-bezier(.2,.7,.3,1); }
body.pub .comp-arrow svg { width: 22px; height: 22px; display: block; }
body.pub .comp-card:hover .comp-arrow { transform: translateX(5px); }
body.pub .comp-card h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.2rem; letter-spacing: -.01em; color: var(--ink); margin: 0 0 6px; }
body.pub .comp-card .muted.small { font-size: .9rem; line-height: 1.5; }
body.pub .comp-card-foot { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--pline); font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .86rem; color: var(--accent-2); }

/* ----- Home two-column rhythm ----- */
body.pub .home-two { margin-top: 44px; gap: 26px; }

/* ----- Jadwal (dark broadcast panel) ----- */
body.pub .jadwal-list { background: var(--dark); border-radius: 0; padding: 18px; gap: 12px; box-shadow: var(--shadow); }
body.pub .jadwal-list::-webkit-scrollbar-thumb { background: #3a4150; }
body.pub .jl-date { font-family: var(--cond); font-weight: 700; font-size: .98rem; text-transform: uppercase; letter-spacing: .06em; color: #fff; }
body.pub .jl-card { background: #fff; border: none; border-radius: 14px; transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s; }
body.pub .jl-card:hover { background: var(--grad); box-shadow: var(--shadow-red); transform: translateY(-3px); }
body.pub .jl-card:hover .jl-name, body.pub .jl-card:hover .jl-team, body.pub .jl-card:hover .jl-time, body.pub .jl-card:hover .jl-time-sm { color: #fff; }
body.pub .jl-card:hover .jl-meta { color: rgba(255,255,255,.85); }
body.pub .jl-card:hover .jl-head { border-bottom-color: rgba(255,255,255,.25); }
body.pub .jl-card:hover .jl-ico { background: rgba(255,255,255,.2); color: #fff; }
body.pub .jl-head { border-bottom: 1px solid var(--pline); }
body.pub .jl-ico { background: var(--accent-soft); color: var(--accent); }
body.pub .jl-ico .sico { width: 19px; height: 19px; }
body.pub .jl-name { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; font-size: 1rem; color: var(--ink); }
body.pub .jl-meta { font-size: .74rem; color: var(--muted); }
body.pub .jl-team { font-family: var(--sans); font-weight: 700; color: var(--ink); }
body.pub .jl-time { font-family: var(--cond); font-weight: 700; font-size: 1.7rem; color: var(--ink); font-variant-numeric: tabular-nums; }
body.pub .jl-time-sm { font-family: var(--cond); font-weight: 700; color: var(--yellow); }

/* ----- Upcoming Match (dark horizontal carousel) ----- */
body.pub { overflow-x: hidden; }             /* guard against full-bleed rounding overflow */
body.pub .um { margin-top: 50px; }
/* Dark panel bleeds edge-to-edge; inner content stays at container width. */
body.pub .um-shell {
    position: relative; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
    background: linear-gradient(160deg, #12151c 0%, #0f1218 58%, #170f16 100%);
    border-radius: 0; padding: 22px 0 24px; box-shadow: var(--shadow);
}
body.pub .um-shell::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(620px 240px at 12% -10%, rgba(193,18,63,.20), transparent 62%); }
body.pub .um-inner { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
body.pub .um-empty { color: rgba(255,255,255,.7); font-family: var(--cond); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; text-align: center; padding: 26px 4px; margin: 0; }

body.pub .um-cats { position: relative; z-index: 1; display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 18px; scrollbar-width: none; }
body.pub .um-cats::-webkit-scrollbar { display: none; }
body.pub .um-cat { position: relative; background: transparent; border: none; padding: 10px 14px; font-family: var(--cond); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: .98rem; color: rgba(255,255,255,.55); cursor: pointer; white-space: nowrap; transition: color .18s; }
body.pub .um-cat:hover { color: #fff; }
body.pub .um-cat::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--grad); transform: scaleX(0); transition: transform .26s cubic-bezier(.2,.7,.3,1); }
body.pub .um-cat.active { color: #fff; }
body.pub .um-cat.active::after { transform: scaleX(1); }

body.pub .um-viewport { position: relative; z-index: 1; }
body.pub .um-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 10px; scrollbar-width: none; }
body.pub .um-track::-webkit-scrollbar { display: none; }

body.pub .um-card {
    scroll-snap-align: start; flex: 0 0 238px; display: flex; flex-direction: column;
    background: #171b23; border: 1px solid #262c37; border-radius: 14px; padding: 16px;
    color: #fff; text-decoration: none; position: relative;
    transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s, border-color .22s;
}
body.pub .um-card.is-featured { background: linear-gradient(155deg, #8a1f3a 0%, #5d1228 100%); border-color: transparent; box-shadow: 0 16px 34px rgba(138,31,58,.4); }
/* hover → the whole card fills with the vivid red gradient */
body.pub .um-card:hover { background: var(--grad); border-color: transparent; transform: translateY(-4px); box-shadow: var(--shadow-red); text-decoration: none; }
body.pub .um-card:hover .um-when { color: rgba(255,255,255,.9); }
body.pub .um-card:hover .um-meta { color: rgba(255,255,255,.78); }
body.pub .um-card:hover .um-big-mo { color: rgba(255,255,255,.9); }
body.pub .um-card:hover .um-big-tag { color: #fff; }
body.pub .um-card:hover .um-logo { background: rgba(255,255,255,.22); }
body.pub .um-card:hover .um-go { background: rgba(255,255,255,.22); }
body.pub .um-card:hover .um-badge { background: rgba(255,255,255,.24); }
body.pub .um-card:hover .um-teams { border-top-color: rgba(255,255,255,.28); }

body.pub .um-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 13px; }
body.pub .um-logo { width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
body.pub .um-logo .sico { width: 24px; height: 24px; }
body.pub .um-card.is-featured .um-logo { background: rgba(255,255,255,.16); }
body.pub .um-go { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.12); display: none; align-items: center; justify-content: center; color: #fff; }
body.pub .um-go svg { width: 16px; height: 16px; }
body.pub .um-card.is-featured .um-go, body.pub .um-card:hover .um-go { display: inline-flex; }

body.pub .um-name { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.02rem; letter-spacing: -.01em; line-height: 1.15; color: #fff; }
body.pub .um-when { font-family: var(--cond); font-weight: 600; font-size: .82rem; color: rgba(255,255,255,.58); margin-top: 4px; }
body.pub .um-meta { font-size: .74rem; color: rgba(255,255,255,.42); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.pub .um-card.is-featured .um-when { color: rgba(255,255,255,.86); }
body.pub .um-card.is-featured .um-meta { color: rgba(255,255,255,.72); }

body.pub .um-big { margin: 16px 0 14px; display: flex; align-items: baseline; gap: 8px; min-height: 44px; }
body.pub .um-big-day { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 2.7rem; line-height: .85; color: #fff; font-variant-numeric: tabular-nums; }
body.pub .um-big-mo { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.5rem; color: rgba(255,255,255,.82); }
body.pub .um-big-tag { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 1.25rem; color: var(--accent-3); }
body.pub .um-card.is-featured .um-big-tag { color: #ffd3dd; }

body.pub .um-teams { margin-top: auto; display: flex; flex-direction: column; gap: 9px; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.1); }
body.pub .um-card.is-featured .um-teams { border-top-color: rgba(255,255,255,.2); }
body.pub .um-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
body.pub .um-badge { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-family: var(--cond); font-weight: 700; font-size: .72rem; background: rgba(255,255,255,.12); color: #fff; }
body.pub .um-card.is-featured .um-badge { background: rgba(255,255,255,.2); }
body.pub .um-tname { font-family: var(--sans); font-weight: 700; font-size: .92rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

body.pub .um-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(18,21,28,.86); backdrop-filter: blur(4px); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.4); transition: background .18s, border-color .18s, opacity .18s; }
body.pub .um-nav svg { width: 18px; height: 18px; }
body.pub .um-nav:hover { background: var(--accent); border-color: transparent; }
body.pub .um-nav:active { transform: translateY(-50%) scale(.94); }
body.pub .um-prev { left: -5px; }
body.pub .um-next { right: -5px; }
body.pub .um-nav.is-off { opacity: 0; pointer-events: none; }
@media (max-width: 560px) {
    body.pub .um-card { flex-basis: 80vw; }
    body.pub .um-nav { display: none; }
}

/* Hasil section — now full-width (reset the old two-column fixed height) */
body.pub .col-hasil { display: block; height: auto; }
/* Cap the result list height so it scrolls once matches pile up (per tab). */
body.pub .col-hasil .result-panel {
    max-height: min(600px, 72vh);
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: #c7ccd4 transparent;
}
body.pub .col-hasil .result-panel::-webkit-scrollbar { width: 8px; }
body.pub .col-hasil .result-panel::-webkit-scrollbar-thumb { background: #c7ccd4; border-radius: 8px; }
body.pub .col-hasil .result-panel::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ----- Hasil (tabbed scorebug rows on dark) ----- */
body.pub .result-wrap { border-radius: 0; }
body.pub .result-tabs { background: var(--psurface-2); padding: 6px; gap: 5px; border-radius: 12px; margin-bottom: 14px; }
body.pub .rtab { background: transparent; border-radius: 8px; padding: 9px 16px; font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .95rem; color: var(--muted); transition: color .18s, background .18s; }
body.pub .rtab:hover { color: var(--ink); }
body.pub .rtab.active { background: var(--grad); color: #fff; box-shadow: var(--shadow-red); }
body.pub .rdate { font-family: var(--cond); font-weight: 700; font-size: .92rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
body.pub .rrow { background: var(--dark-2); border: 1px solid #262c37; color: #fff; border-radius: 14px; animation: pubFade .34s cubic-bezier(.2,.7,.3,1); }
body.pub .rteam { font-family: var(--sans); font-weight: 600; color: #aeb6c2; }
body.pub .rteam.rwin { color: #fff; font-weight: 700; }
body.pub .rscore { font-family: var(--cond); font-weight: 700; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
body.pub .rnum { color: #8b93a1; }
body.pub .rnum.win { color: #fff; }
body.pub .rcolon { color: #59616f; }
body.pub .wdot { background: #12e07a; box-shadow: 0 0 10px rgba(18,224,122,.6); }
body.pub .wo-badge { background: #fff; color: var(--accent); }
body.pub .rstage { font-family: var(--cond); text-transform: uppercase; letter-spacing: .05em; color: #9aa2b0; font-size: .84rem; }
body.pub .cat-badge { background: var(--grad); color: #fff; font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }

/* ================= Competition detail page ================= */
body.pub .page-head h1 { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 2.3rem; letter-spacing: -.02em; line-height: 1.02; }
body.pub .page-head .muted { color: var(--muted); }
body.pub .back-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--cond); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .9rem; color: var(--muted); }
body.pub .back-link:hover { color: var(--accent); }
body.pub .back-link svg { width: 16px; height: 16px; }

/* Category pills */
body.pub .cat-pills-label { font-family: var(--cond); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
body.pub .cat-pill { background: var(--psurface); border: 1px solid var(--pborder); color: var(--ink); font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: .92rem; transition: transform .16s, box-shadow .16s, border-color .16s; }
body.pub .cat-pill:hover { filter: none; border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
body.pub .cat-pill.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--shadow-red); }

/* Segmented tabs → gradient pill */
body.pub .pubtabs { display: inline-flex; gap: 5px; background: var(--psurface-2); padding: 6px; border-radius: 14px; border: 1px solid var(--pborder); margin-bottom: 28px; }
body.pub .pubtab { border-radius: 9px; padding: 10px 22px; font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 1rem; color: var(--muted); transition: color .18s, background .18s, box-shadow .18s; }
body.pub .pubtab:hover { color: var(--ink); }
body.pub .pubtab.active { background: var(--grad); color: #fff; box-shadow: var(--shadow-red); }
body.pub .tab-panel:not(.hidden) { animation: pubFade .34s cubic-bezier(.2,.7,.3,1); }

/* Standings section heads */
body.pub .standings-head { margin: 44px 0 14px; }
body.pub .standings-head .ico { color: var(--accent); width: 28px; height: 28px; }
body.pub .standings-head h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.6rem; letter-spacing: -.01em; color: var(--ink); }
body.pub .standings-sub { color: var(--muted); }

/* Group tables */
body.pub .group-section { background: var(--psurface); border: 1px solid var(--pborder); border-radius: 16px; box-shadow: var(--shadow); }
body.pub .group-section .gtable thead th { background: var(--dark); color: #cfd4dd; font-family: var(--cond); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: none; }
body.pub .group-section .gtable thead th.group-name { font-family: var(--display); font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; color: #fff; text-transform: uppercase; }
body.pub .group-section .gtable tbody td { border-bottom: 1px solid var(--pline); font-variant-numeric: tabular-nums; }
body.pub .group-section .gtable td.g-name { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; font-size: 1rem; color: var(--ink); font-variant-numeric: normal; }
body.pub .group-section .gtable td.g-rank { font-family: var(--cond); font-weight: 700; color: var(--muted); }
body.pub .group-section .gtable td.g-pts { font-family: var(--cond); font-weight: 700; font-size: 1.05rem; color: var(--accent); }
body.pub .group-section .gtable tbody tr.qualified { background: linear-gradient(90deg, rgba(18,161,80,.08), transparent 60%); }
body.pub .group-section .gtable tbody tr.qualified td.g-name { color: var(--green); }
body.pub .group-section .gtable tbody tr.qualified td.g-rank { color: var(--green); }
body.pub thead th.game-col { background: var(--dark-3); color: #fff; font-family: var(--cond); }
body.pub .empty-state { background: var(--psurface-2); border: 1px dashed var(--pborder); color: var(--muted); border-radius: 12px; }

/* Form dots */
body.pub .form-dot { background: #dfe3ea; font-family: var(--cond); border-radius: 5px; }
body.pub .form-dot.w { background: var(--green); }
body.pub .form-dot.l { background: var(--accent); }
body.pub .form-dot.d { background: #c3c9d2; }
body.pub .form-dot.wo { background: var(--yellow); }

/* Schedule rows */
body.pub .sched-date { font-family: var(--cond); font-weight: 700; font-size: .98rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
body.pub .sched-row { background: var(--psurface); border: 1px solid var(--pborder); border-radius: 13px; box-shadow: var(--shadow); transition: border-color .16s, box-shadow .16s, transform .16s; }
body.pub .sched-row:hover { border-color: var(--accent); box-shadow: var(--shadow-red); transform: translateY(-2px); }
body.pub .sched-time { font-family: var(--cond); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; color: var(--accent); }
body.pub .sched-a, body.pub .sched-b { font-family: var(--sans); font-weight: 700; color: var(--ink); }
body.pub .sched-vs { font-family: var(--cond); font-weight: 700; text-transform: uppercase; color: var(--muted); }
body.pub .sched-tag { background: var(--psurface-2); border: 1px solid var(--pborder); color: var(--muted); font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; display: inline-flex; align-items: center; gap: 5px; }
body.pub .sched-tag.tag-tunda { background: var(--yellow-soft) !important; border-color: #f2dca0 !important; color: var(--yellow) !important; }
body.pub .sched-tag .tico { width: 13px; height: 13px; }
body.pub .sched-row.postponed { background: var(--yellow-soft); }

/* Results list + expandable detail */
body.pub .result-stage { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-size: .88rem; }
body.pub .result-card { background: var(--psurface); border: 1px solid var(--pborder); border-radius: 13px; box-shadow: var(--shadow); }
body.pub .result-card.has-detail .result-row:hover { background: var(--psurface-2); }
body.pub .result-row .r-a, body.pub .result-row .r-b { font-family: var(--sans); font-weight: 600; color: var(--muted); }
body.pub .result-row .r-a.win, body.pub .result-row .r-b.win { color: var(--ink); font-weight: 700; }
body.pub .result-row .r-score { background: var(--grad); color: #fff; font-family: var(--cond); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; border-radius: 8px; box-shadow: var(--shadow-red); }
body.pub .r-chevron { color: var(--muted); }
body.pub .result-detail { background: var(--psurface-2); border-top: 1px dashed var(--pborder); }
body.pub .rd-label { font-family: var(--cond); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); }
body.pub .rd-set { background: var(--psurface); border: 1px solid var(--pborder); color: var(--muted); font-family: var(--cond); font-weight: 700; font-variant-numeric: tabular-nums; }
body.pub .rd-set b { color: var(--muted); }
body.pub .rd-set b.w { color: var(--accent); }

/* Knockout board (dark broadcast bracket) */
body.pub .koboard { background: var(--dark); border-radius: 18px; box-shadow: var(--shadow); }
body.pub .korh { font-family: var(--cond); font-weight: 700; font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: #cfd4dd; }
body.pub .komatch { background: var(--dark-2); border: 1px solid #262c37; }
body.pub .koteam { color: #e7e9ee; }
body.pub .koteam + .koteam { border-top: 1px solid #262c37; }
body.pub .koteam.win { background: linear-gradient(90deg, rgba(193,18,63,.28), rgba(138,31,58,.12)); }
body.pub .koseed { font-family: var(--cond); font-weight: 700; color: #8b93a1; }
body.pub .koav { background: #2a303b; color: #cfd4dd; font-family: var(--cond); font-weight: 700; }
body.pub .koteam.win .koav { background: var(--grad); color: #fff; }
body.pub .konm { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #d5d9e0; }
body.pub .koteam.win .konm { color: #fff; }
body.pub .kodot { background: #12e07a; box-shadow: 0 0 10px rgba(18,224,122,.6); }
body.pub .kosc { font-family: var(--cond); font-weight: 700; font-variant-numeric: tabular-nums; color: #9aa2b0; }
body.pub .koteam.win .kosc { color: #fff; }
body.pub .koround:not(:last-child) .komatch::after,
body.pub .koround:not(:first-child) .komatch::before { background: #39404c; }
body.pub .kothird-title { font-family: var(--display); font-weight: 800; text-transform: uppercase; color: var(--ink); display: flex; align-items: center; gap: 8px; }
body.pub .kothird-title .tico { width: 21px; height: 21px; color: var(--accent); }

/* Status badges */
body.pub .badge { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .74rem; }
body.pub .badge-gray { background: var(--psurface-2); color: var(--muted); }
body.pub .badge-blue { background: #e5f0fb; color: #1f6cc4; }
body.pub .badge-green { background: var(--green-soft); color: var(--green); }
body.pub .badge-purple { background: var(--accent-soft); color: var(--accent); }

/* Focus ring + press feedback */
body.pub a:focus-visible, body.pub button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
body.pub .pubtab:active, body.pub .rtab:active, body.pub .cat-pill:active, body.pub .comp-card:active { transform: scale(.98); }

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

/* =========================================================================
   ADMIN — Sporty skin (light, keeps data-entry readability)
   Auto-applied to every admin* route via body.adm. Bold sport type,
   burgundy→red accents, gradient primary actions.
   ========================================================================= */
body.adm {
    --accent: #c1123f; --accent-2: #8a1f3a; --accent-3: #ff3d6e;
    --grad: linear-gradient(120deg, #8a1f3a 0%, #c1123f 55%, #ff3d6e 100%);
    --ink: #10131a; --muted: #6c7480; --dark: #0f1218;
    --display: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
    --cond: "Barlow Condensed", "Archivo", system-ui, sans-serif;
    --sans: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}
body.adm .wrap { max-width: 1220px; }

/* Chrome */
body.adm .topbar { box-shadow: var(--shadow); }
body.adm .brand { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.01em; color: var(--ink); }
body.adm .brand-mark { color: var(--accent); }
body.adm .topnav a { font-family: var(--cond); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; font-size: .98rem; }
body.adm .nav-admin { color: var(--accent) !important; }
body.adm .footer-brand { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; color: var(--ink); }
body.adm .footer-nav a { font-family: var(--cond); text-transform: uppercase; letter-spacing: .04em; }

/* Headings */
body.adm h1, body.adm h2, body.adm h3, body.adm h4 { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
body.adm .page-head h1 { text-transform: uppercase; font-style: italic; font-weight: 900; }
body.adm .section-title { border-left: none; padding-left: 0; text-transform: uppercase; font-weight: 800; display: flex; align-items: center; gap: 12px; }
body.adm .section-title::before { content: ""; width: 7px; height: 24px; background: var(--grad); border-radius: 3px; transform: skewX(-11deg); flex: 0 0 auto; }

/* Buttons */
body.adm .btn { font-family: var(--cond); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; font-size: .96rem; border-radius: 9px; transition: transform .14s, box-shadow .16s, background .16s, border-color .16s; }
body.adm .btn:active { transform: scale(.97); }
body.adm .btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(193,18,63,.25); }
body.adm .btn-primary:hover { background: var(--grad); filter: brightness(1.06); }
body.adm .btn-danger { color: var(--accent); border-color: #f0c9d0; }
body.adm .btn-danger:hover { background: #fcecef; }

/* Tabs */
body.adm .tab { font-family: var(--cond); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; font-size: 1.02rem; }
body.adm .tab.active { color: var(--accent); border-bottom-color: var(--accent); }
body.adm .pubtab { font-family: var(--cond); text-transform: uppercase; letter-spacing: .03em; font-weight: 700; }
body.adm .pubtab.active { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(193,18,63,.22); }

/* Badges + chips */
body.adm .badge { font-family: var(--cond); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
body.adm .chip { font-family: var(--cond); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
body.adm .badge-purple { background: #f6e4ea; color: var(--accent); }

/* Tables */
body.adm .table th, body.adm .gtable thead th { font-family: var(--cond); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; font-size: .8rem; }
body.adm .table td, body.adm .gtable tbody td { font-variant-numeric: tabular-nums; }
body.adm .table .name, body.adm .gtable td.g-name { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; font-size: .98rem; font-variant-numeric: normal; }
body.adm .standings .rankpill { font-family: var(--cond); font-weight: 700; }

/* Stats */
body.adm .stat-val { font-family: var(--cond); font-weight: 700; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
body.adm .stat-label { font-family: var(--cond); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }

/* Forms — accent focus + sporty labels */
body.adm .form label { font-family: var(--cond); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; font-size: .95rem; color: var(--ink); }
body.adm input:focus, body.adm select:focus, body.adm textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(193,18,63,.12); }
body.adm .radio-card:has(input:checked), body.adm .preset-card:has(input:checked) { border-color: var(--accent); background: #fcf1f4; }

/* Flash + focus ring */
body.adm a:focus-visible, body.adm button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
body.adm .flash-error { border-left: 4px solid var(--accent); }

/* Admin knockout board — sporty accent for winners */
body.adm .koboard-admin .ko-click:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(193,18,63,.12); }

/* Manual knockout bracket builder (Susun Bagan Manual modal) */
body.adm .mko-modal { max-width: 96vw; width: 1040px; }
body.adm .mko-rounds { display: flex; gap: 14px; overflow-x: auto; align-items: flex-start; padding: 8px 2px 14px; min-height: 110px; }
body.adm .mko-col { flex: 0 0 236px; background: #f6f7f9; border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
body.adm .mko-colhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink); }
body.adm .mko-match { background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 8px 9px; margin-bottom: 8px; box-shadow: var(--shadow); }
body.adm .mko-mhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
body.adm .mko-mlabel { font-family: var(--cond); font-weight: 700; font-size: .74rem; letter-spacing: .04em; color: var(--muted); }
body.adm .mko-del { background: none; border: none; color: var(--accent); font-size: 1.1rem; line-height: 1; padding: 0 4px; cursor: pointer; }
body.adm .mko-vs { text-align: center; font-family: var(--cond); font-weight: 700; font-size: .74rem; color: var(--muted); margin: 4px 0; }
body.adm .mko-match select { font-size: .9rem; padding: 6px 8px; min-width: 0; }
@media (max-width: 560px) { body.adm .mko-modal { width: 96vw; } body.adm .mko-col { flex-basis: 200px; } }
