:root {
  --bg: #1b2140;
  --bg2: #151a33;
  --sidebar: #141933;
  --panel: #252b4d;
  --panel2: #2a3158;
  --line: #343c68;
  --text: #eef1ff;
  --muted: #8b93b5;
  --accent: #ff7a2a;
  --accent-2: #ff9d4d;
  --accent-soft: rgba(255, 122, 42, .16);
  --lime: #ff7a2a;
  --lime-dim: #d86218;
  --cyan: #7aa8f7;
  --gold: #ffb347;
  --red: #ff6b81;
  --ok: #3dd68c;
  --pink: #ff5da2;
  --shadow: 0 16px 40px rgba(6, 8, 20, .35);
  --radius: 22px;
  --font: "Plus Jakarta Sans", "Manrope", system-ui, sans-serif;
  --display: "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }
body { background: var(--bg); }
a { color: var(--accent-2); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 92px 1fr;
  background: var(--bg);
}
.app-shell.no-side { grid-template-columns: 1fr; }

.sidebar {
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 10px 16px;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side-logo {
  width: 42px; height: 42px; margin-bottom: 18px;
  display: grid; place-items: center;
}
.side-logo img { width: 34px; height: 34px; }
.side-nav { display: flex; flex-direction: column; gap: 8px; width: 100%; align-items: center; }
.side-link {
  width: 58px; min-height: 58px;
  border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  color: #9aa3c7;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .02em;
  text-align: center;
  line-height: 1.05;
  padding: 8px 4px;
}
.side-link svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.side-link.active {
  width: 72px;
  background: linear-gradient(180deg, #ff9a45, #ff7319);
  color: #fff;
  box-shadow: 0 10px 22px rgba(255, 122, 42, .35);
  border-radius: 18px;
}
.side-link:hover:not(.active) { background: #1d2444; color: #fff; }
.side-foot { margin-top: auto; display: flex; gap: 6px; }
.side-foot button {
  width: 28px; height: 28px; border-radius: 8px;
  border: 0; background: #1e2444; color: #8b93b5;
}

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 28px 8px;
}
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.search {
  margin-left: auto;
  background: #20264a;
  border: 1px solid #323a66;
  border-radius: 999px;
  padding: 9px 14px;
  display: flex; align-items: center; gap: 8px;
  min-width: 210px; color: var(--muted);
}
.search input { border: 0; background: transparent; outline: none; width: 100%; color: var(--text); }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  border: 1px solid #323a66; background: #20264a; color: #c5cbe6;
  display: grid; place-items: center;
}
.avatars { display: flex; align-items: center; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #1b2140;
  border: 2px solid #1b2140; margin-left: -8px;
}

.tabs {
  display: flex; gap: 22px; padding: 6px 28px 14px;
  border-bottom: 1px solid transparent;
}
.tabs a {
  color: var(--muted); font-weight: 700; font-size: 14px; padding-bottom: 8px;
  border-bottom: 2px solid transparent;
}
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

.wrap { width: 100%; margin: 0; padding: 8px 22px 40px; }
.page { animation: rise .25s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 36px; align-items: center; padding: 20px 6px 12px; }
.kicker { color: var(--accent-2); letter-spacing: .16em; font-size: 11px; font-weight: 800; text-transform: uppercase; }
h1, h2, h3 { margin: 8px 0; }
h1 { font-family: var(--display); font-size: clamp(40px, 6vw, 72px); line-height: .94; letter-spacing: -.03em; font-weight: 800; }
.lead { color: var(--muted); font-size: 17px; max-width: 52ch; line-height: 1.55; }
.cta-row { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.btn {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13px;
}
.btn:hover { border-color: #4a5480; }
.btn.primary {
  background: linear-gradient(180deg, #ff9a45, #ff7319);
  color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(255, 122, 42, .28);
}
.btn.ghost { background: transparent; }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.chip { border: 1px solid transparent; background: transparent; color: var(--muted); padding: 7px 11px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.chip.on { color: #fff; background: linear-gradient(180deg, #ff9a45, #ff7319); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.04);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; font-size: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.more { font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(180deg, #ff9a45, #ff7319); border: 0; border-radius: 999px; padding: 5px 10px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; color: var(--muted); }
.mono { font-family: var(--mono); }

.score { font-family: var(--display); font-size: 34px; letter-spacing: -1px; line-height: 1; font-weight: 800; }
.score.sm { font-size: 24px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.pill.live { background: rgba(255, 122, 42, .16); color: var(--accent-2); }
.pill.ok { background: rgba(61, 214, 140, .12); color: var(--ok); }
.pill.warn { background: rgba(255, 179, 71, .14); color: var(--gold); }
.pill.dim { background: #1d2444; color: var(--muted); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid rgba(255,255,255,.05); }
th { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
tr:hover td { background: rgba(255,255,255,.02); }
.right { text-align: right; }
.pos { font-family: var(--mono); font-size: 11px; color: var(--cyan); font-weight: 500; }

.form { display: grid; gap: 10px; }
label { font-size: 12px; color: var(--muted); font-weight: 600; display: grid; gap: 6px; }
input, select, textarea {
  background: #1a2040; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(255, 122, 42, .35); border-color: var(--accent); }
select[multiple] { min-height: 140px; }
.err { color: var(--red); font-size: 13px; }

.match { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.teamname { font-weight: 800; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.vs { color: var(--muted); font-size: 12px; letter-spacing: .2em; }

.slot-row { display: grid; grid-template-columns: 64px 1fr 72px 90px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.slot-key { font-family: var(--mono); font-size: 12px; color: var(--gold); }
.wizard { display: grid; grid-template-columns: 220px 1fr; gap: 22px; }
.steps { display: grid; gap: 6px; }
.steps button { text-align: left; }
.stepper { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 16px; }
.step {
  display: flex; align-items: center; gap: 8px;
  background: #1d2444; border: 0; color: var(--muted);
  border-radius: 999px; padding: 8px 14px 8px 8px; font-weight: 700; font-size: 13px;
}
.step i {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: #2a3158; font-style: normal; font-size: 12px;
}
.step.on { color: #fff; background: #2a3158; }
.step.on i { background: linear-gradient(180deg, #ff9a45, #ff7319); }
.step.done i { background: var(--ok); color: #102010; }
.wizard-card h3 { margin-top: 0; }
.wiz-nav { display: flex; justify-content: space-between; margin-top: 18px; }
.team-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 10px; margin: 12px 0; }
.team-pick {
  background: #1d2444; border: 1px solid transparent; border-radius: 16px;
  padding: 14px 8px; color: var(--text); display: grid; place-items: center; gap: 2px;
}
.team-pick b { font-size: 22px; }
.team-pick span { font-size: 11px; color: var(--muted); }
.team-pick.on {
  border-color: transparent;
  background: linear-gradient(180deg, #ff9a45, #ff7319);
  box-shadow: 0 8px 18px rgba(255, 122, 42, .28);
}
.team-pick.on span { color: rgba(255,255,255,.85); }
.invite-row {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.05);
}
.invite-row .seat { font-size: 12px; font-weight: 800; color: var(--gold); }
.invite-row.locked input { opacity: .7; }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.review-grid > div { background: #1d2444; border-radius: 14px; padding: 10px 12px; }
.review-grid b { display: block; margin-top: 4px; }
.authbox { max-width: 420px; margin: 36px auto; }
.hero-card { padding: 22px; }
.stat { font-family: var(--display); font-size: 28px; font-weight: 800; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: 1.4fr .8fr; gap: 16px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toast { position: fixed; right: 16px; bottom: 16px; background: #2a3158; border: 1px solid var(--line); padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow); z-index: 40; }
.footer { display: none; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* Dashboard matching system-example.png */
.dash { display: grid; gap: 14px; }
.dash-top {
  display: grid;
  grid-template-columns: 1.12fr 1.12fr .86fr 1fr .96fr;
  gap: 14px;
}
.dash-mid {
  display: grid;
  grid-template-columns: 1.45fr .72fr 1.15fr;
  gap: 14px;
}
.dash-bot {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 14px;
}
.metric { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 5px 0; }
.metric b { font-variant-numeric: tabular-nums; font-weight: 700; }
.track { height: 7px; background: #1a2040; border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.track > span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #ff7319, #ffb056);
  box-shadow: 0 0 10px rgba(255, 122, 42, .45);
}
.track-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.donut-wrap { display: grid; place-items: center; min-height: 168px; position: relative; }
.donut {
  width: 148px; height: 148px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(#ff9a45 var(--p), #1a2040 0);
  filter: drop-shadow(0 0 12px rgba(255, 122, 42, .35));
}
.donut::after {
  content: ""; width: 96px; height: 96px; border-radius: 50%; background: var(--panel);
}
.donut-label {
  position: absolute; text-align: center; font-weight: 800; font-size: 26px; letter-spacing: -.04em;
}
.donut-label small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.stand-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.stand-row:last-child { border-bottom: 0; }
.stand-row .pts { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.live-line { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; font-size: 13px; }
.player-chip {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  background: #1d2444; border-radius: 12px; padding: 8px 10px;
}
.cap-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 16px; }
.radio { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 4px 0; }
.radio i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #5a6490; display: inline-block; }
.radio.on { color: var(--text); }
.radio.on i { border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--accent); }
.big-cta {
  display: block; width: 100%; text-align: center; margin-top: 16px;
  background: linear-gradient(180deg, #ff9a45, #ff7319);
  color: #fff; border: 0; border-radius: 14px; padding: 14px 12px; font-weight: 800; font-size: 16px;
  box-shadow: 0 10px 22px rgba(255, 122, 42, .28);
}
.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding: 8px 4px 0; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar span {
  width: 100%; border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #ffb056, #ff7319);
  box-shadow: 0 8px 16px rgba(255, 122, 42, .22);
}
.bar.alt span { background: linear-gradient(180deg, #7aa8f7, #4d74c9); box-shadow: none; }
.bar em { font-style: normal; font-size: 10px; color: var(--muted); font-weight: 700; }
.ring2 { width: 168px; height: 168px; }
.menu-dots { color: var(--muted); letter-spacing: 2px; font-weight: 800; }

@media (max-width: 1200px) {
  .dash-top, .dash-mid, .dash-bot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; height: auto; flex-direction: row; width: 100%; overflow: auto; padding: 10px; }
  .side-nav { flex-direction: row; }
  .side-foot { display: none; }
  .hero, .split, .wizard, .grid-3, .grid-2, .dash-top, .dash-mid, .dash-bot, .cap-grid, .review-grid { grid-template-columns: 1fr; }
  .invite-row { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; padding: 14px 14px 4px; }
  .search { margin-left: 0; min-width: 140px; width: 100%; }
  .slot-row { grid-template-columns: 48px 1fr 56px; }
  .score { font-size: 28px; }
  .wrap { padding: 8px 12px 32px; }
}
