:root {
  --gold: #d4b483;
  --gold-2: #f0d7a8;
  --ice-2: #6ec8ff;
  --v32-nav: 248px;
}

html, body {
  background:
    linear-gradient(180deg, rgba(7, 9, 13, 0.88), rgba(7, 9, 13, 0.94)),
    url("/tournament/assets/v32/bg_dashboard_dark.png") center / cover no-repeat fixed;
}

#app { padding: 0; min-height: 100vh; }

.v32-app {
  display: grid;
  grid-template-columns: var(--v32-nav) 1fr;
  min-height: 100vh;
}

.v32-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  background: rgba(10, 13, 18, 0.88);
  border-right: 1px solid rgba(212, 180, 131, 0.18);
  overflow: auto;
}

.v32-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.v32-brand img { width: 36px; height: 36px; object-fit: contain; }
.v32-brand b { display: block; font-size: 14px; letter-spacing: 0.08em; color: var(--gold-2); }
.v32-brand span { display: block; font-size: 11px; color: var(--muted); }

.v32-nav button {
  display: block;
  width: 100%;
  text-align: left;
  min-height: 44px;
  margin: 6px 0;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 0 12px;
}
.v32-nav button.on {
  border-color: rgba(212, 180, 131, 0.45);
  background: linear-gradient(90deg, rgba(212, 180, 131, 0.16), rgba(110, 200, 255, 0.08));
  color: var(--gold-2);
  box-shadow: 0 0 18px rgba(212, 180, 131, 0.12);
}
.v32-guide {
  margin-top: 28px;
  padding: 12px;
  border: 1px dashed rgba(212, 180, 131, 0.28);
  border-radius: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.v32-main { min-width: 0; }
.v32-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(40, 51, 65, 0.9);
  background: rgba(7, 9, 13, 0.55);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.v32-top .meta { color: var(--muted); font-size: 13px; }
.v32-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  margin-right: 6px; background: #5a6573;
}
.v32-dot.on { background: #43e6b1; box-shadow: 0 0 8px #43e6b1; }
.v32-dot.warn { background: #e6b866; }
.v32-body { padding: 20px 22px 48px; max-width: 1440px; }

.hero-band {
  border-radius: 22px;
  overflow: hidden;
  min-height: 168px;
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.82), rgba(7, 9, 13, 0.35)),
    url("/tournament/assets/v32/bg_console_hero.png") right center / cover no-repeat;
  border: 1px solid rgba(212, 180, 131, 0.22);
  padding: 28px 32px;
  margin-bottom: 18px;
}
.hero-band h1 { font-size: 28px; margin: 0 0 8px; }
.hero-band p { margin: 0; color: var(--muted); max-width: 560px; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat-card {
  background: rgba(16, 21, 29, 0.86);
  border: 1px solid rgba(212, 180, 131, 0.16);
  border-radius: 16px;
  padding: 14px 16px;
}
.stat-card b { display: block; font-size: 26px; margin-top: 6px; color: var(--gold-2); }
.stat-card span { color: var(--muted); font-size: 12px; }

.wizard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.step {
  background: rgba(16, 21, 29, 0.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  min-height: 210px;
}
.step.on { border-color: var(--gold); box-shadow: 0 0 24px rgba(212, 180, 131, 0.12); }
.step .idx { color: var(--gold); font-size: 12px; letter-spacing: 0.12em; }
.step h3 { margin: 8px 0 10px; font-size: 16px; }
.step select, .step input { margin-top: 8px; }

.tpl-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 22px;
}
.tpl-card {
  position: relative;
  min-height: 168px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(212, 180, 131, 0.2);
  text-align: left;
  padding: 18px;
  color: #fff;
  background-size: cover;
  background-position: center;
}
.tpl-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,9,13,.25), rgba(7,9,13,.82));
}
.tpl-card > * { position: relative; z-index: 1; }
.tpl-card.daily { background-image: url("/tournament/assets/v32/bg_template_daily.png"); }
.tpl-card.monthly { background-image: url("/tournament/assets/v32/bg_template_month.png"); }
.tpl-card.ranking { background-image: url("/tournament/assets/v32/bg_template_rank.png"); }
.tpl-card.custom { background-image: url("/tournament/assets/v32/bg_dashboard_dark.png"); }
.tpl-card.on { outline: 2px solid var(--gold); }

.event-table { width: 100%; border-collapse: collapse; }
.event-table th, .event-table td {
  text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 13px;
}
.event-table th { color: var(--muted); font-weight: 500; }
.badge {
  display: inline-block; min-height: 24px; padding: 0 8px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 12px; line-height: 24px;
}
.badge.run { color: var(--ok); border-color: #1f6b56; }
.badge.wait { color: var(--gold-2); border-color: rgba(212,180,131,.4); }
.badge.done { color: var(--muted); }

.term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.stage {
  background:
    linear-gradient(180deg, rgba(7,9,13,.72), rgba(7,9,13,.88)),
    url("/tournament/assets/v32/bg_timer_stage.png") center / cover no-repeat;
  border-radius: 22px;
  border: 1px solid rgba(110, 200, 255, 0.18);
  padding: 22px;
}
.stage .clock { text-shadow: 0 0 28px rgba(110, 200, 255, 0.35); }
.ctrl-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 14px;
}
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(420px, 100%);
  background: #10151d; border-left: 1px solid var(--line); padding: 18px; overflow: auto; z-index: 20;
}

.voice-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.switch-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }

.btn.gold {
  background: linear-gradient(180deg, #e8c994, #b8904e);
  color: #1a140c; border-color: #d4b483; font-weight: 600;
}

@media (max-width: 1200px) {
  .stat-row, .wizard, .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctrl-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .v32-app { grid-template-columns: 1fr; }
  .v32-nav { position: relative; height: auto; display: flex; flex-wrap: wrap; gap: 8px; }
  .v32-nav button { width: auto; }
  .v32-brand { width: 100%; margin-bottom: 8px; }
}
@media (max-width: 720px) {
  .stat-row, .wizard, .tpl-grid, .voice-groups { grid-template-columns: 1fr; }
}
