:root {
  --bg: #080b14;
  --panel: #111827;
  --panel-2: #172033;
  --text: #f5f7fb;
  --muted: #9aa6bd;
  --line: #293247;
  --accent: #65d7ff;
  --accent-2: #b2ff7e;
  --danger: #ff6b6b;
  --success: #57d68d;
  --warning: #ffd166;
  --shadow: 0 18px 48px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  background:
    radial-gradient(circle at 15% 10%, rgba(101, 215, 255, .16), transparent 28rem),
    radial-gradient(circle at 85% 5%, rgba(178, 255, 126, .10), transparent 24rem),
    linear-gradient(180deg, #080b14 0%, #0b1020 100%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { color: var(--accent-2); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: .8rem 1.2rem;
  background: rgba(8, 11, 20, .86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: .8rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand small { display: block; color: var(--muted); font-size: .74rem; font-weight: 500; }
.logo { width: 46px; height: 46px; object-fit: contain; }
nav { display: flex; gap: .45rem; flex-wrap: wrap; justify-content: flex-end; }
nav a {
  color: var(--text);
  padding: .45rem .65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .92rem;
}
nav a:hover { border-color: var(--line); background: rgba(255,255,255,.05); text-decoration: none; }

.container { width: min(1200px, calc(100% - 2rem)); margin: 1.4rem auto 3rem; }
.footer { width: min(1200px, calc(100% - 2rem)); margin: 2rem auto; color: var(--muted); font-size: .85rem; }

.hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 2rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(23,32,51,.94), rgba(17,24,39,.86));
  box-shadow: var(--shadow);
}
.hero h1 { margin: 0 0 .4rem; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.02; }
.hero p { margin: 0; color: var(--muted); font-size: 1.08rem; max-width: 65ch; }
.hero-badge {
  flex: 0 0 auto;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(101, 215, 255, .35);
  border-radius: 18px;
  color: var(--accent-2);
  background: rgba(101, 215, 255, .08);
  font-weight: 800;
  text-align: center;
}

.card {
  margin: 1rem 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(17,24,39,.9);
  box-shadow: var(--shadow);
}
.card h1, .card h2, .card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; margin: 1rem 0; }
.stat {
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17,24,39,.9);
}
.stat strong { display: block; font-size: 2rem; line-height: 1; color: var(--accent); }
.stat span { color: var(--muted); }

.form-stack { display: grid; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: end; }
.form-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
label { display: grid; gap: .4rem; color: var(--text); font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b1020;
  color: var(--text);
  padding: .75rem .85rem;
  font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(101, 215, 255, .45); border-color: var(--accent); }
input.num { max-width: 6rem; }
.check { display: inline-flex; align-items: center; grid-auto-flow: column; width: auto; gap: .35rem; }
.check input { width: auto; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 0;
  border-radius: 12px;
  padding: .78rem 1rem;
  color: #06101a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .button:hover { filter: brightness(1.05); text-decoration: none; }
.secondary { color: var(--text); background: var(--panel-2); border: 1px solid var(--line); }
.danger { color: #fff !important; background: var(--danger) !important; }
.small { padding: .45rem .6rem; font-size: .86rem; border-radius: 10px; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: .35rem .7rem;
  margin: .15rem .3rem .15rem 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(178, 255, 126, .08);
  font-weight: 800;
}
.muted, .hint { color: var(--muted); }
.hint { font-size: .92rem; }
.alert { padding: .85rem 1rem; margin: .8rem 0; border-radius: 14px; font-weight: 800; }
.alert.success { color: #06140c; background: var(--success); }
.alert.danger { color: #fff; background: var(--danger); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: .72rem .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); background: rgba(255,255,255,.03); font-size: .84rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.actions form { margin: 0; }
.inline-form { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin: .2rem 0; }
.inline-form input { width: 13rem; }
.inline-form select { width: 13rem; }

.award-card h2 { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.award-card .desc { color: var(--muted); margin-top: -.4rem; }
.rank { font-weight: 900; color: var(--accent); }
.veto-row { opacity: .55; text-decoration: line-through; }
.veto-label { color: #fff; background: var(--danger); border-radius: 999px; padding: .15rem .45rem; font-size: .75rem; font-weight: 900; }
.empty-state { padding: 1rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }

@media (max-width: 880px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  nav { justify-content: flex-start; }
  .hero { flex-direction: column; align-items: flex-start; }
  .grid.two, .results-grid, .stats { grid-template-columns: 1fr; }
  .form-grid, .form-grid.compact { grid-template-columns: 1fr; }
}
