/* TVS TriUnity Challenge 2026 — dashboard styles.
   Brand: deep blue #144f92, jasper orange #f47c22 (spec §6). */
:root {
  --blue: #144f92;
  --blue-dark: #0e3a6e;
  --orange: #f47c22;
  --ink: #1a2433;
  --muted: #6b7a90;
  --bg: #eef2f7;
  --card: #ffffff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: var(--blue); }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(120deg, var(--blue-dark) 0%, var(--blue) 55%, #1f6fc4 100%);
  color: #fff;
  padding: 2.4rem 1.5rem;
  box-shadow: 0 6px 24px rgba(20, 79, 146, 0.35);
}
.hero-inner {
  max-width: 1650px; margin: 0 auto;   /* 1.5x the original 1100px (desktop only) */
  display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap;
}
.logomark {
  width: 84px; height: 84px; border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.hero-text { flex: 1; min-width: 240px; }
.kicker { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem;
  opacity: 0.85; margin: 0 0 0.3rem; }
.hero h1 { margin: 0; font-size: clamp(1.8rem, 4.5vw, 3rem); font-weight: 800; }
.hero h1 span { color: var(--orange); }
.tagline { margin: 0.4rem 0 0; opacity: 0.9; }
.login-btn {
  background: var(--orange); color: #fff; text-decoration: none; font-weight: 700;
  padding: 0.7rem 1.3rem; border-radius: 10px; white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.login-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* ===== Layout ===== */
/* Desktop content area widened 1.5x (1100px -> 1650px). On narrower screens this
   cap is never reached, so tablet/mobile keep full-width-minus-padding layout. */
.wrap { max-width: 1650px; margin: 0 auto; padding: 1.5rem; }
.panel {
  background: var(--card); border-radius: 16px; padding: 1.5rem 1.6rem;
  margin-bottom: 1.5rem; box-shadow: 0 8px 30px rgba(20, 79, 146, 0.08);
}
.panel h2 { margin: 0 0 1.1rem; color: var(--blue); font-size: 1.2rem; }
.panel h2 i { color: var(--orange); margin-right: 0.4rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }

/* ===== Stats strip ===== */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin: -3rem 0 1.5rem; }
.stat {
  background: var(--card); border-radius: 14px; padding: 1.1rem 0.8rem; text-align: center;
  box-shadow: 0 8px 24px rgba(20, 79, 146, 0.12);
}
.stat i { color: var(--blue); font-size: 1.3rem; }
.stat.accent i { color: var(--orange); }
.stat .num { display: block; font-size: 1.6rem; font-weight: 800; margin-top: 0.25rem; }
.stat .lbl { display: block; font-size: 0.75rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.05em; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); margin-top: 1rem; } }

/* ===== Podium ===== */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 1rem; }
.podium-col { flex: 1; max-width: 220px; text-align: center; }
.podium-card {
  background: linear-gradient(160deg, #fff, #f3f7fc); border: 1px solid #e3ebf5;
  border-radius: 14px 14px 0 0; padding: 1.1rem 0.8rem 1.4rem; position: relative;
}
.rank-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--blue); color: #fff; font-weight: 800; font-size: 0.8rem;
  width: 30px; height: 30px; line-height: 30px; border-radius: 50%;
}
.podium-card h3 { margin: 0.7rem 0 0.2rem; color: var(--blue); font-size: 1rem; }
.podium-score { font-size: 1.5rem; font-weight: 800; margin: 0.3rem 0 0; }
.podium-meta { font-size: 0.78rem; color: var(--muted); margin: 0.1rem 0 0; }
.podium-base {
  color: #fff; font-weight: 800; font-size: 1.4rem; border-radius: 0 0 8px 8px;
  display: flex; align-items: center; justify-content: center;
}
.place-1 .podium-base { background: var(--orange); height: 90px; }
.place-1 .rank-badge { background: var(--orange); }
.place-2 .podium-base { background: var(--blue); height: 62px; }
.place-3 .podium-base { background: #6f8db5; height: 44px; }

/* ===== Bars ===== */
.bars { list-style: none; padding: 0; margin: 0; }
.bars li { margin-bottom: 0.9rem; }
.bar-head { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 0.3rem; }
.bar-head strong { color: var(--blue); }
.bar-head .cap { color: var(--muted); font-weight: 600; font-size: 0.78rem; margin-left: 0.4rem; }
.bar-head .cap i { color: var(--orange); margin-right: 0.2rem; }
.bar-track { background: #e6ecf4; border-radius: 8px; height: 14px; overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, var(--blue), #2f7fd0);
  transition: width 0.6s ease;
}
.bars li:first-child .bar-fill { background: linear-gradient(90deg, var(--orange), #ffa459); }

/* ===== Leaderboard table ===== */
table.leaderboard { width: 100%; border-collapse: collapse; }
table.leaderboard th { text-align: left; font-size: 0.75rem; text-transform: uppercase;
  color: var(--muted); padding: 0.4rem 0.5rem; border-bottom: 2px solid #eef2f7; }
table.leaderboard td { padding: 0.5rem; border-bottom: 1px solid #f1f5fa; font-size: 0.92rem; }
table.leaderboard .rk { font-weight: 800; color: var(--blue); width: 2rem; }
table.leaderboard .score { font-weight: 700; text-align: right; }
table.leaderboard .sub { display: block; font-size: 0.74rem; color: var(--muted); }
table.leaderboard tr.gold td { background: #fff6ec; }
table.leaderboard tr.gold .rk { color: var(--orange); }

/* ===== Category champions ===== */
.champs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 700px) { .champs { grid-template-columns: 1fr; } }
.champ {
  text-align: center; padding: 1.3rem 1rem; border-radius: 14px; color: #fff;
  background: linear-gradient(155deg, var(--blue), var(--blue-dark));
}
.champ-run { background: linear-gradient(155deg, var(--orange), #d9641a); }
.champ i { font-size: 1.8rem; opacity: 0.9; }
.champ h4 { margin: 0.5rem 0 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; }
.champ-name { font-size: 1.1rem; font-weight: 700; margin: 0; }
.champ-name.muted { opacity: 0.75; font-weight: 500; font-size: 0.95rem; }
.champ-pts { margin: 0.2rem 0 0; opacity: 0.92; }

/* ===== Rules ===== */
.rules-meta { color: var(--muted); font-size: 0.9rem; }
.rules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0; }
@media (max-width: 820px) { .rules-grid { grid-template-columns: 1fr; } }
.rule-card { background: #f6f9fd; border: 1px solid #e6eef7; border-radius: 12px; padding: 1.1rem; }
.rule-card h4 { margin: 0 0 0.5rem; color: var(--blue); }
.rule-card h4 i { color: var(--orange); margin-right: 0.35rem; }
.rule-card ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.rule-card li { margin: 0.25rem 0; }
.rules-sub { color: var(--blue); margin-bottom: 0.3rem; }

/* ===== Activity feed ===== */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li {
  display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0.2rem;
  border-bottom: 1px solid #f1f5fa;
}
.feed-ico {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #eef3fa; color: var(--blue);
}
.feed-main { flex: 1; display: flex; flex-direction: column; }
.feed-sub { font-size: 0.78rem; color: var(--muted); }
.feed-pts { font-weight: 800; color: var(--orange); }
.feed-date { font-size: 0.78rem; color: var(--muted); width: 5.5rem; text-align: right; }
@media (max-width: 560px) { .feed-date { display: none; } }

/* ===== Footer ===== */
.foot { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 1rem 0 2rem; }
