:root {
  --bg: #0c1015;
  --surface: #141a22;
  --surface-2: #1a222d;
  --border: #283342;
  --text: #e8eef6;
  --muted: #93a3b8;
  --brass: #d5a74b;
  --crimson: #a83238;
  --green: #38b87c;
  --ua-blue: #1e62b5;
  --ua-gold: #f0c430;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at top right, #16202e 0%, var(--bg) 52%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

a { color: var(--brass); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #0f141b; padding: 2px 5px; border-radius: 4px; font-size: 0.9em; color: #f0cf85; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 18px; }

.topbar {
  background: rgba(14, 19, 26, 0.94);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(8px);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 12px 18px; flex-wrap: wrap;
}
.brand-group { display: flex; align-items: center; gap: 10px; }
.crest { width: 34px; height: 34px; color: var(--brass); }
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: 0.6px; }
.brand-name span { color: var(--brass); font-weight: 600; }
.brand-sub { font-size: 11px; color: var(--muted); }

.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-btn {
  background: transparent; color: var(--muted); border: 1px solid transparent;
  padding: 7px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.nav-btn:hover { color: var(--text); background: var(--surface-2); }
.nav-btn.active { color: #12151a; background: var(--brass); }
.nav-btn.aid-nav.active { background: linear-gradient(90deg, var(--ua-blue), #2a7be0); color: #fff; }

.controls { display: flex; align-items: center; gap: 8px; }
select, input {
  background: #0e1319; color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px; font-size: 13px;
}
.auth-chip {
  font-size: 12px; padding: 5px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
}

.main-wrap { padding: 20px 18px 42px; }
.hero-strip {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 18px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.stat-pill { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat-pill.right { margin-left: auto; font-weight: 500; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.live { background: var(--green); box-shadow: 0 0 8px var(--green); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.two-col.asymmetric { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 860px) { .two-col.asymmetric { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px;
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.card-head h2 { margin: 0; font-size: 16px; }
.muted { color: var(--muted); font-size: 13px; margin-top: 0; }

.tag {
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.tag.green { color: #9ff0c8; border-color: #246848; background: #10291e; }
.tag.gold { color: #f6dc9b; border-color: #6b5324; background: #261e0f; }
.tag.ua { color: #ffe885; border-color: var(--ua-blue); background: #102544; }

.room-list { display: flex; flex-direction: column; gap: 8px; }
.room-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
}
.room-title { font-weight: 700; font-size: 14px; }
.room-meta { font-size: 12px; color: var(--muted); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #222c38; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: var(--surface-2); }

.svg-ico { width: 26px; height: 26px; color: var(--brass); vertical-align: middle; }
.svg-lg { width: 48px; height: 48px; color: var(--brass); }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gal-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; display: flex; gap: 12px; align-items: center;
}
.gal-card h3 { margin: 0 0 4px; font-size: 14px; }
.gal-card p { margin: 0; font-size: 12px; color: var(--muted); }

.aid-hero { border-color: #244b82; background: linear-gradient(145deg, #111c2b, #141a22); }
.aid-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.metric { background: #0d141e; border: 1px solid #24344c; border-radius: 8px; padding: 10px 12px; }
.metric .k { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.metric .v { font-size: 20px; font-weight: 800; color: var(--ua-gold); }
.progress-track { height: 10px; background: #0c121a; border-radius: 999px; overflow: hidden; border: 1px solid #24344c; margin-bottom: 14px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--ua-blue), var(--ua-gold)); width: 0%; transition: width 0.4s ease; }
.aid-funds { display: flex; gap: 10px; flex-wrap: wrap; }

.btn, button.btn {
  display: inline-block; padding: 8px 14px; border-radius: 8px; font-size: 13px;
  font-weight: 600; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); cursor: pointer; text-decoration: none;
}
.btn.primary { background: var(--brass); color: #12151a; border-color: var(--brass); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.demo-box { margin-top: 14px; padding: 12px; border-radius: 8px; background: #10161e; border: 1px dashed var(--brass); }
.kv-box { padding: 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.tok-box { margin-top: 10px; padding: 10px; background: #0a0e13; border: 1px solid var(--green); border-radius: 6px; color: #9ff0c8; font-size: 12px; overflow-x: auto; }
.clean-list { margin: 0; padding-left: 18px; font-size: 13px; }
.clean-list li { margin-bottom: 8px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 10px; }
.consent-row { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text); cursor: pointer; }
.consent-row input { width: auto; margin-top: 3px; }
.tourn-list { display: flex; flex-direction: column; gap: 14px; }
.tourn-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.tourn-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.bracket-grid { display: flex; gap: 12px; overflow-x: auto; padding: 10px 0 4px; }
.round-col { min-width: 210px; flex: 1 0 210px; display: flex; flex-direction: column; gap: 8px; }
.round-title { font-size: 11px; text-transform: uppercase; color: var(--brass); letter-spacing: 0.6px; font-weight: 700; }
.match-card { background: #10151c; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.match-slot { display: flex; justify-content: space-between; gap: 6px; padding: 3px 0; }
.match-slot.win { color: #9ff0c8; font-weight: 700; }
.btn.sm { padding: 4px 8px; font-size: 11px; }
