/* Same look as the Redline Tracker desktop app (client/RedlineTracker/Ui/ui.html) */
:root {
  --bg: #0c0c0e; --side: #111114; --panel: #16161a; --panel2: #1c1c21; --line: #26262d;
  --text: #ececef; --muted: #8a8a94; --dim: #5c5c66;
  --red: #e3242b; --red2: #ff3b42; --redglow: rgba(227, 36, 43, .45);
  --green: #2fd27a; --amber: #f5a623; --blue: #4aa3ff;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; }
.muted { color: var(--muted); }
.mt { margin-top: 14px; }
.grow { flex: 1; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100%; }
.shell.no-side { grid-template-columns: 1fr; }
.side { background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px;
  position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.mark { width: 34px; height: 26px; background: var(--red); clip-path: polygon(28% 0, 100% 0, 72% 100%, 0 100%); flex: none;
  filter: drop-shadow(0 0 8px var(--redglow)); display: inline-block; }
.brand b { display: block; font-size: 17px; letter-spacing: 3px; font-weight: 800; }
.brand small { display: block; color: var(--muted); font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; }
.menu-btn { display: none; background: none; border: 0; cursor: pointer; color: var(--text); padding: 6px; margin-left: auto; }
.menu-btn svg { width: 24px; height: 24px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--muted); font-weight: 600;
  position: relative; transition: background .15s, color .15s; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.active { background: linear-gradient(90deg, rgba(227,36,43,.18), rgba(227,36,43,.02)); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; background: var(--red);
  border-radius: 0 3px 3px 0; box-shadow: 0 0 10px var(--red); }
.nav svg { width: 18px; height: 18px; flex: none; }
.count { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; padding: 0 7px; border-radius: 9px; }
.me { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.me .row { display: flex; align-items: center; gap: 10px; }
.me .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .sub { color: var(--muted); font-size: 12px; }
.me .rk { color: var(--red2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-top: 8px; }
.me .rk:empty { display: none; }
.me .foot { display: flex; justify-content: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 14px; padding: 22px 32px 14px; flex-wrap: wrap; }
.top h1 { font-size: 22px; font-weight: 700; letter-spacing: .3px; }
.crumb { color: var(--muted); font-size: 13px; }
.top-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.page { padding: 4px 32px 40px; max-width: 1280px; width: 100%; }

.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--panel2); object-fit: cover; flex: none; display: inline-block; }

/* ---------- building blocks ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
.grid { display: grid; gap: 14px; }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.tile { padding: 16px 18px; position: relative; overflow: hidden; }
.tile .v { font-size: 28px; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile .v small { font-size: 14px; color: var(--muted); font-weight: 600; }
.tile .s { color: var(--muted); font-size: 12px; }
.tile::after { content: ""; position: absolute; right: -24px; top: -24px; width: 70px; height: 70px; border-radius: 50%;
  background: radial-gradient(circle, rgba(227,36,43,.2), transparent 70%); }
.two { display: grid; gap: 14px; grid-template-columns: 1.5fr 1fr; }
.two.wide { grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); }
.nowrap { white-space: nowrap; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; }
.link { color: var(--red2); font-weight: 600; font-size: 13px; }
.link:hover { text-decoration: underline; }
.empty { color: var(--muted); text-align: center; padding: 30px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.card .empty { border: 0; background: none; padding: 20px 8px; }

.hero { padding: 22px 24px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  background: radial-gradient(ellipse at 0% 0%, rgba(227,36,43,.15), transparent 55%), var(--panel); }
.hero .hi { font-size: 24px; font-weight: 800; }
.hero .grow { min-width: 220px; }
.ring { width: 78px; height: 78px; flex: none; }
.rankname { font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.bar { height: 8px; border-radius: 4px; background: #2a2a31; overflow: hidden; margin-top: 10px; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, #8a1217, var(--red2)); box-shadow: 0 0 10px var(--redglow); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 7px; background: var(--red); border: 1px solid var(--red);
  color: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.btn:hover { background: var(--red2); border-color: var(--red2); }
.btn.ghost { background: var(--panel2); border-color: var(--line); color: var(--text); }
.btn.ghost:hover { background: #222228; border-color: #3a3a44; }
.btn.small { padding: 4px 10px; font-size: 12px; }
select, .input { background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; color: var(--text); }
.input { width: 100%; padding: 9px 11px; margin-bottom: 10px; resize: vertical; }
select:focus, .input:focus { outline: none; border-color: var(--red); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { padding: 5px 12px; border-radius: 16px; border: 1px solid var(--line); background: none; color: var(--muted);
  font-weight: 600; font-size: 12.5px; cursor: pointer; }
.chips button:hover { color: var(--text); }
.chips button.on { background: var(--red); border-color: var(--red); color: #fff; }

.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 10px; white-space: nowrap;
  background: #26262c; color: var(--muted); text-transform: capitalize; }
.b-ok { background: rgba(47,210,122,.12); color: var(--green); }
.b-warn { background: rgba(245,166,35,.14); color: var(--amber); }
.b-bad { background: rgba(227,36,43,.15); color: var(--red2); }
.b-red { background: var(--red); color: #fff; }
.b-blue { background: rgba(74,163,255,.13); color: var(--blue); }

/* ---------- tables ---------- */
.table-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 8px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .m { color: var(--muted); font-size: 12px; }
tbody tr.rowlink { cursor: pointer; }
tbody tr:hover td { background: rgba(255,255,255,.025); }
tr.me td { background: rgba(227,36,43,.09); }
tr.me td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.who { display: flex; align-items: center; gap: 10px; }
.who .avatar { width: 26px; height: 26px; }
.pos { font-weight: 800; color: var(--muted); }
.you { font-size: 10px; font-weight: 800; background: var(--red); color: #fff; padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; }
.route { font-weight: 700; }
.route .arrow { color: var(--red2); margin: 0 6px; }

/* ---------- leaderboard podium ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end; }
.pod { text-align: center; padding: 18px 12px; display: block; }
.pod:hover { border-color: #3a3a44; }
.pod .avatar { width: 46px; height: 46px; margin-top: 10px; }
.pod .p { font-size: 13px; font-weight: 800; letter-spacing: 2px; color: var(--muted); }
.pod .nm { font-size: 17px; font-weight: 800; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod .km { font-size: 24px; font-weight: 800; margin-top: 4px; }
.pod .s { color: var(--muted); font-size: 12px; }
/* 1st gold, 2nd silver, 3rd bronze */
.pod.p1, .pos-1 { --medal: #f5c542; --medal-2: #b8860b; }
.pod.p2, .pos-2 { --medal: #d4dbe3; --medal-2: #8a96a3; }
.pod.p3, .pos-3 { --medal: #e0914f; --medal-2: #9a5a24; }
.pod.p1, .pod.p2, .pod.p3 {
  border-color: color-mix(in srgb, var(--medal) 55%, transparent);
  box-shadow: 0 0 26px color-mix(in srgb, var(--medal) 14%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--medal) 14%, transparent), var(--panel) 70%);
}
.pod.p1 { padding: 26px 12px; box-shadow: 0 0 36px color-mix(in srgb, var(--medal) 22%, transparent); }
.pod.p1:hover, .pod.p2:hover, .pod.p3:hover { border-color: var(--medal); }
.pod .p { display: flex; justify-content: center; align-items: center; gap: 7px; color: var(--medal, var(--muted)); text-transform: uppercase; }
.pod .avatar { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--medal, transparent); }
.pod.p1 .avatar { width: 56px; height: 56px; }
.pod .km, .pod .rk { color: var(--medal, #fff); }
.medal { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 12px; font-weight: 900; letter-spacing: 0; color: #17130a;
  background: radial-gradient(circle at 35% 30%, #fff8 0 18%, transparent 19%), linear-gradient(145deg, var(--medal), var(--medal-2));
  box-shadow: 0 2px 8px color-mix(in srgb, var(--medal) 35%, transparent); }
.pod.p1 .medal { width: 30px; height: 30px; font-size: 14px; }
.pos-1, .pos-2, .pos-3 { color: var(--medal); }

/* ---------- details ---------- */
dl.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 0; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
dl.details div { padding: 13px 18px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); margin: 0 -1px -1px 0; }
dl.details dt { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
dl.details dd { margin: 3px 0 0; font-weight: 600; }
dl.details a { color: var(--red2); }
.jobhero { padding: 22px 24px; background: radial-gradient(ellipse at 0% 0%, rgba(227,36,43,.14), transparent 55%), var(--panel); }
.jobroute { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin: 16px 0 6px; }
.city { font-size: 26px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.city.to { text-align: right; }
.track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #8a1217, var(--red2)); box-shadow: 0 0 12px var(--redglow); position: relative; }
.track::after { content: ""; position: absolute; right: -9px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  background: #fff; border: 4px solid var(--red); box-shadow: 0 0 0 4px rgba(227,36,43,.25), 0 0 16px var(--red); }
.track.cancelled { background: repeating-linear-gradient(90deg, #2a2a31 0 10px, #3a3a42 10px 20px); box-shadow: none; }
.track.cancelled::after { display: none; }
.ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.warnbox { border-color: rgba(245,166,35,.45); background: rgba(245,166,35,.07); }
.flags { margin: 8px 0 0; padding-left: 18px; color: var(--amber); }

.msg h3 { font-size: 16px; }
.msg p { white-space: pre-wrap; color: #cfcfd5; margin: 8px 0; }
.msg .m { color: var(--muted); font-size: 12px; }

.steps { margin: 12px 0 0; padding-left: 20px; color: #cfcfd5; }
.steps li { margin-bottom: 8px; }
.token { font-family: Consolas, monospace; background: #000; border: 1px dashed var(--red); padding: 12px; border-radius: 8px;
  word-break: break-all; margin: 10px 0; user-select: all; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(ellipse at 50% 0%, rgba(227,36,43,.18), transparent 60%), var(--bg); }
.login { width: 100%; max-width: 420px; text-align: center; padding: 38px 34px; border-top: 3px solid var(--red);
  box-shadow: 0 0 60px rgba(227,36,43,.12); }
.login .mark { width: 58px; height: 42px; margin-bottom: 18px; }
.login h1 { font-size: 22px; letter-spacing: 3px; font-weight: 800; }
.login .sub { color: var(--muted); font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; margin-top: 2px; }
.login p.muted { margin: 18px 0 22px; }
.discord { background: #5865f2; border-color: #5865f2; padding: 11px 20px; font-size: 14.5px; }
.discord:hover { background: #6d78f5; border-color: #6d78f5; }

/* ---------- small screens ---------- */
@media (max-width: 1000px) { .two { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; height: auto; padding: 10px 14px; z-index: 5; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .brand { padding: 0; }
  .menu-btn { display: block; }
  .side .nav, .side .grow, .side .me { display: none; }
  .side.open .nav { display: flex; width: 100%; margin-top: 10px; }
  .side.open .me { display: block; width: 100%; margin-top: 10px; }
  .nav a.active::before { display: none; }
  .top { padding: 18px 16px 10px; }
  .page { padding: 4px 16px 30px; }
  .hide-sm { display: none; }
  .podium { grid-template-columns: 1fr; }
  .pod.p1 { order: -1; }
  .city { font-size: 18px; }
}

/* ---------- printable job report (stays light for paper) ---------- */
.report { max-width: 760px; margin: 0 auto; background: #fff; color: #111; padding: 36px; border-radius: 10px; }
.report .muted { color: #666; }
.report h1 { font-size: 24px; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--red); padding-bottom: 16px; margin-bottom: 18px; }
.report-brand { display: flex; gap: 10px; align-items: center; font-weight: 800; letter-spacing: 1px; margin-bottom: 10px; }
.report-brand .mark { width: 28px; height: 20px; filter: none; }
.report-table { border: 1px solid #ddd; }
.report-table th { width: 200px; background: #f6f6f6; color: #555; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; }
.report-table th, .report-table td { border-bottom: 1px solid #e6e6e6; }
.report-table tr:hover td { background: none; }
.report .badge { border: 1px solid currentColor; }
.report a { color: var(--red); }
body.print-mode .side, body.print-mode .top { display: none !important; }
body.print-mode .shell { grid-template-columns: 1fr; }
@media print {
  body.print-mode { background: #fff; }
  body.print-mode .no-print { display: none !important; }
  body.print-mode .page { padding: 0; max-width: none; }
  body.print-mode .report { padding: 0; }
}

/* =====================================================================
   Public front page (#/home): company website for visitors
   ===================================================================== */
.site { min-height: 100vh; background: var(--bg); overflow-x: hidden; }
.site .wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(12,12,14,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 18px; height: 74px; }
.site-brand { display: flex; align-items: center; gap: 12px; }
.site-brand .mark { width: 40px; height: 30px; }
.site-brand b { display: block; font-size: 16px; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase; }
.site-brand small { display: block; font-size: 10.5px; letter-spacing: 2.4px; color: var(--red2); text-transform: uppercase; font-weight: 700; }
.site-nav { display: flex; gap: 4px; margin-left: 28px; }
.site-nav button { background: none; border: 0; color: var(--muted); font-weight: 600; padding: 8px 12px; border-radius: 7px; cursor: pointer; }
.site-nav button:hover { color: var(--text); background: var(--panel); }
.site-cta { display: flex; gap: 10px; margin-left: auto; }
.site-cta .btn { padding: 9px 16px; }
.site-menu { display: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 7px; cursor: pointer; margin-left: auto; }
.site-menu svg { width: 22px; height: 22px; display: block; }

.hero-x { position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse 60% 70% at 85% 30%, rgba(227,36,43,.28), transparent 70%),
              radial-gradient(ellipse 50% 60% at 0% 100%, rgba(227,36,43,.12), transparent 70%), #0a0a0c; }
.hero-x .wrap { position: relative; z-index: 2; padding-top: 110px; padding-bottom: 120px; }
.hero-art { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-art .watermark { position: absolute; right: -2%; top: 50%; transform: translateY(-58%) skewX(-12deg); font-size: clamp(120px, 19vw, 300px);
  font-weight: 900; letter-spacing: -6px; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.06); white-space: nowrap; }
.hero-art .stripes { position: absolute; right: 6%; top: 18%; display: flex; gap: 22px; transform: skewX(-24deg); }
.hero-art .stripes i { display: block; width: 46px; height: 330px; background: linear-gradient(180deg, var(--red2), rgba(227,36,43,.05));
  box-shadow: 0 0 40px rgba(227,36,43,.45); border-radius: 3px; animation: glow 4s ease-in-out infinite; }
.hero-art .stripes i:nth-child(2) { height: 270px; margin-top: 40px; opacity: .65; animation-delay: .6s; }
.hero-art .stripes i:nth-child(3) { height: 210px; margin-top: 80px; opacity: .35; animation-delay: 1.2s; }
@keyframes glow { 50% { filter: brightness(1.35); } }
.hero-art .road { position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 80px),
              repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 40px);
  transform: perspective(500px) rotateX(62deg); transform-origin: bottom; mask-image: linear-gradient(0deg, #000 10%, transparent 90%);
  -webkit-mask-image: linear-gradient(0deg, #000 10%, transparent 90%); }
.hero-art .streak { position: absolute; height: 2px; width: 240px; background: linear-gradient(90deg, transparent, var(--red2), transparent);
  box-shadow: 0 0 12px var(--red); opacity: 0; animation: streak 5s linear infinite; }
.hero-art .streak:nth-child(4) { top: 72%; animation-delay: 0s; }
.hero-art .streak:nth-child(5) { top: 82%; animation-delay: 1.7s; width: 340px; }
.hero-art .streak:nth-child(6) { top: 64%; animation-delay: 3.3s; width: 180px; }
@keyframes streak { 0% { left: -20%; opacity: 0; } 10% { opacity: 1; } 60% { opacity: 1; } 100% { left: 110%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-art .streak, .hero-art .stripes i { animation: none; } .hero-art .streak { display: none; } }
.eyebrow { color: var(--red2); font-size: 12px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; }
.hero-x h1 { font-size: clamp(44px, 7vw, 86px); line-height: .98; font-weight: 900; letter-spacing: -2px; margin: 18px 0 22px; }
.hero-x h1 span { color: var(--red2); text-shadow: 0 0 40px rgba(227,36,43,.45); display: block; }
.hero-x .lead { max-width: 520px; font-size: 18px; color: #c9c9d0; line-height: 1.55; }
.hero-x .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.btn.lg { padding: 13px 24px; font-size: 15.5px; border-radius: 9px; }
.hero-x .sub-link { display: inline-block; margin-top: 18px; color: var(--muted); font-weight: 600; }
.hero-x .sub-link:hover { color: var(--text); }

.strip { position: relative; z-index: 3; margin-top: -44px; }
.strip .card { display: flex; align-items: center; gap: 18px; padding: 18px 22px; background: rgba(22,22,26,.92); backdrop-filter: blur(8px);
  box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.strip .ic { width: 46px; height: 46px; border-radius: 10px; background: rgba(227,36,43,.14); color: var(--red2); display: flex; align-items: center; justify-content: center; flex: none; }
.strip .ic svg { width: 22px; height: 22px; }
.strip h3 { font-size: 16px; }

.sec { padding: 84px 0 0; }
.sec:last-of-type { padding-bottom: 90px; }
.sec-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.sec-title h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.5px; color: var(--text); text-transform: none; margin: 8px 0 0; }
.sec-title p { color: var(--muted); max-width: 520px; margin-top: 8px; }
.big-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.big-stats .card { padding: 24px; position: relative; overflow: hidden; }
.big-stats .card::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(227,36,43,.22), transparent 70%); }
.big-stats .n { font-size: clamp(28px, 3.2vw, 40px); font-weight: 900; margin-top: 8px; font-variant-numeric: tabular-nums; }
.big-stats .n small { font-size: 16px; color: var(--muted); font-weight: 700; }

.lb-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
.lb-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--line); }
.lb-row:first-child { border-top: 0; }
.lb-row .p { width: 34px; height: 34px; border-radius: 8px; background: var(--panel2); display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: var(--muted); flex: none; }
.lb-row:first-child .p { background: var(--red); color: #fff; box-shadow: 0 0 16px var(--redglow); }
.lb-row .avatar { width: 38px; height: 38px; }
.lb-row .nm { font-weight: 700; }
.lb-row .rk { color: var(--red2); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.lb-row .mi { margin-left: auto; font-weight: 800; font-size: 17px; white-space: nowrap; }
.fame { text-align: center; padding: 34px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-color: rgba(227,36,43,.5); box-shadow: 0 0 40px rgba(227,36,43,.12);
  background: radial-gradient(ellipse at 50% 0%, rgba(227,36,43,.25), transparent 65%), var(--panel); }
.fame .avatar { width: 84px; height: 84px; border: 3px solid var(--red); box-shadow: 0 0 24px var(--redglow); margin: 16px 0 12px; }
.fame .nm { font-size: 22px; font-weight: 900; }
.fame .mi { font-size: 30px; font-weight: 900; color: var(--red2); margin-top: 6px; }

.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.link-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; transition: border-color .15s, transform .15s; }
.link-card:hover { border-color: rgba(227,36,43,.6); transform: translateY(-2px); }
.link-card .ic { width: 44px; height: 44px; border-radius: 10px; background: var(--panel2); display: flex; align-items: center; justify-content: center;
  color: var(--red2); font-weight: 900; font-size: 15px; flex: none; }
.link-card .ic svg { width: 22px; height: 22px; }
.link-card b { display: block; }
.link-card span { color: var(--muted); font-size: 13px; }
.link-card .go { margin-left: auto; color: var(--muted); font-size: 18px; }
.link-card.primary { background: linear-gradient(135deg, rgba(227,36,43,.22), var(--panel) 70%); border-color: rgba(227,36,43,.5); }

.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feat { padding: 26px 22px; }
.feat .ic { width: 48px; height: 48px; border-radius: 12px; background: rgba(227,36,43,.13); color: var(--red2); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.feat .ic svg { width: 24px; height: 24px; }
.feat h3 { font-size: 17px; margin-bottom: 6px; }
.feat p { color: var(--muted); }

.steps-x { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.step-x { padding: 26px 22px; position: relative; }
.step-x::before { counter-increment: s; content: "0" counter(s); font-size: 44px; font-weight: 900; color: transparent;
  -webkit-text-stroke: 1.5px rgba(227,36,43,.7); display: block; line-height: 1; margin-bottom: 14px; }
.step-x h3 { font-size: 17px; margin-bottom: 6px; }
.step-x p { color: var(--muted); }

.cta-band { margin-top: 84px; padding: 54px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse 50% 120% at 50% 100%, rgba(227,36,43,.25), transparent 70%), #0a0a0c; text-align: center; }
.cta-band h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 900; color: var(--text); text-transform: none; letter-spacing: -.5px; margin: 0 0 10px; }
.cta-band p { color: var(--muted); margin-bottom: 26px; }

.site-foot { padding: 50px 0 30px; color: var(--muted); }
.site-foot .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 30px; }
.site-foot h4 { color: var(--text); font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; margin: 0 0 12px; }
.site-foot a, .site-foot button { display: block; color: var(--muted); padding: 3px 0; background: none; border: 0; cursor: pointer; text-align: left; font: inherit; }
.site-foot a:hover, .site-foot button:hover { color: var(--text); }
.site-foot .legal { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 20px; font-size: 12.5px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 15; width: 44px; height: 44px; border-radius: 10px; background: var(--panel);
  border: 1px solid var(--line); color: var(--text); cursor: pointer; font-size: 18px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { border-color: var(--red); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

@media (max-width: 980px) {
  .big-stats, .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .lb-grid { grid-template-columns: 1fr; }
  .steps-x { grid-template-columns: 1fr; }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
  .hero-art .stripes { opacity: .35; right: -10%; }
}
@media (max-width: 760px) {
  .site .wrap { padding: 0 18px; }
  .site-nav, .site-cta { display: none; }
  .site-menu { display: block; }
  .site-head.open .wrap { flex-wrap: wrap; height: auto; padding-top: 14px; padding-bottom: 14px; }
  .site-head.open .site-nav, .site-head.open .site-cta { display: flex; width: 100%; margin: 6px 0 0; flex-direction: column; }
  .site-head.open .site-cta .btn { justify-content: center; }
  .hero-x .wrap { padding-top: 70px; padding-bottom: 90px; }
  .big-stats, .feat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .big-stats .card { padding: 18px; }
  .strip .card { flex-wrap: wrap; }
  .site-foot .cols { grid-template-columns: 1fr; }
  .sec { padding-top: 64px; }
}
.site-foot a.site-brand { display: flex; }

/* ---------- logo image (uploaded by admins) ---------- */
.logo-img { height: 42px; width: auto; max-width: 120px; object-fit: contain; flex: none; display: block; }
.brand .logo-img { height: 40px; max-width: 64px; }
.login .logo-img { height: 84px; max-width: 220px; margin: 0 auto 16px; }
.report-brand .logo-img { height: 34px; }

/* ---------- public sub-pages ---------- */
.site-nav a { color: var(--muted); font-weight: 600; padding: 8px 12px; border-radius: 7px; }
.site-nav a:hover { color: var(--text); background: var(--panel); }
.site-nav a.on { color: #fff; background: rgba(227,36,43,.16); }
.page-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); padding: 70px 0 56px;
  background: radial-gradient(ellipse 50% 90% at 90% 0%, rgba(227,36,43,.24), transparent 70%), #0a0a0c; }
.page-hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 900; letter-spacing: -1px; margin: 12px 0 10px; }
.page-hero p { color: #c9c9d0; max-width: 620px; font-size: 16.5px; }
.page-hero .stripes { position: absolute; right: 6%; top: 50%; display: flex; gap: 14px; transform: translateY(-50%) skewX(-24deg); opacity: .8; }
.page-hero .stripes i { width: 26px; height: 150px; background: linear-gradient(180deg, var(--red2), rgba(227,36,43,.04)); box-shadow: 0 0 30px rgba(227,36,43,.4); border-radius: 3px; }
.page-hero .stripes i:nth-child(2) { height: 120px; margin-top: 20px; opacity: .6; }
.page-hero .stripes i:nth-child(3) { height: 90px; margin-top: 40px; opacity: .3; }
.site-main { padding: 40px 0 90px; }
.site-main .podium { margin-bottom: 14px; }

.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.partner { display: flex; flex-direction: column; padding: 24px; transition: border-color .15s, transform .15s; }
.partner:hover { border-color: rgba(227,36,43,.55); transform: translateY(-2px); }
.partner .plogo { height: 90px; display: flex; align-items: center; justify-content: center; background: #0e0e11; border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 18px; overflow: hidden; }
.partner .plogo img { max-height: 70px; max-width: 80%; object-fit: contain; }
.partner .plogo b { font-size: 30px; font-weight: 900; color: var(--red2); }
.partner h3 { font-size: 18px; }
.partner p { color: var(--muted); margin: 6px 0 16px; flex: 1; white-space: pre-wrap; }

.masonry { columns: 3 300px; column-gap: 14px; }
.shot { break-inside: avoid; margin-bottom: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--panel);
  cursor: zoom-in; display: block; width: 100%; padding: 0; text-align: left; color: inherit; }
.shot img { width: 100%; display: block; transition: transform .3s; }
.shot:hover img { transform: scale(1.03); }
.shot .cap { padding: 10px 14px; font-size: 13px; }
.shot .cap span { color: var(--muted); }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.9); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox .cap { color: #ddd; margin-top: 14px; text-align: center; }
.lightbox .x { position: absolute; top: 18px; right: 22px; font-size: 26px; background: none; border: 0; color: #fff; cursor: pointer; }

/* ---------- forms / management ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.field .input, .field select { margin: 0; width: 100%; }
.field.wide { grid-column: 1 / -1; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: none; border: 0; color: var(--muted); padding: 8px 14px; font-weight: 700; cursor: pointer; }
.seg button.on { background: var(--red); color: #fff; }
.seg button.on.minus { background: #6b1317; }
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabbar button { background: none; border: 0; color: var(--muted); font-weight: 700; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabbar button:hover { color: var(--text); }
.tabbar button.on { color: #fff; border-bottom-color: var(--red); }
.pos-val { color: var(--green); font-weight: 700; }
.neg-val { color: var(--red2); font-weight: 700; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.thumb { padding: 0; overflow: hidden; }
.thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #000; }
.thumb .b { padding: 12px 14px; }
.thumb .acts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.logo-box { width: 180px; height: 180px; border-radius: 14px; border: 1px dashed var(--line); background: #0a0a0c; display: flex; align-items: center; justify-content: center; }
.logo-box img { max-width: 150px; max-height: 150px; object-fit: contain; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 60; background: var(--panel2); border: 1px solid var(--line);
  border-left: 3px solid var(--green); padding: 12px 18px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.5); font-weight: 600; }
.toast.err { border-left-color: var(--red2); }
.err-text { color: var(--red2); font-size: 13px; }
.hero-logo { position: absolute; right: 5%; top: 50%; width: min(440px, 36vw); transform: translateY(-54%);
  filter: drop-shadow(0 0 50px rgba(227,36,43,.45)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-50%); } }
@media (prefers-reduced-motion: reduce) { .hero-logo { animation: none; } }
@media (max-width: 980px) { .hero-logo { opacity: .12; right: -10%; width: 62vw; filter: none; } }
.site-brand .logo-img { height: 50px; max-width: 50px; }
.site-foot .site-brand .logo-img { height: 64px; max-width: 64px; }
.hero-x .watermark { opacity: .7; }

/* ---------- Management → Roles ---------- */
.role-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.role-card p { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.5; }
.rc-head { display: flex; align-items: center; justify-content: space-between; }
.rc-head b { font-size: 15px; letter-spacing: .5px; text-transform: uppercase; }
.rc-n { font-size: 22px; font-weight: 800; }
.role-card.r-staff { border-top: 3px solid var(--red2); }
.role-card.r-admin { border-top: 3px solid var(--red); box-shadow: 0 0 24px rgba(227,36,43,.12); }
.role-card.r-driver { border-top: 3px solid #3a3a44; }
.role-seg button { padding: 5px 12px; font-size: 12.5px; }
.role-seg.locked { opacity: .55; }
.role-seg button:disabled { cursor: not-allowed; }
@media (max-width: 860px) { .role-cards { grid-template-columns: 1fr; } }

/* ---------- Race miles ---------- */
.b-race { background: rgba(245,166,35,.16); color: var(--amber); border: 1px solid rgba(245,166,35,.45); }
.racebox { border-color: rgba(245,166,35,.45); background: linear-gradient(90deg, rgba(245,166,35,.12), var(--panel) 60%); }
.racebox b { color: var(--amber); }
.racebox p { margin-top: 6px; color: #e8dcc6; font-size: 14px; }
.race-text { color: var(--amber); }

/* ---------- Company roles (CEO, ...) ---------- */
.title-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .4px; padding: 2px 9px; border-radius: 10px; white-space: nowrap;
  color: var(--tc); background: color-mix(in srgb, var(--tc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--tc) 50%, transparent);
  vertical-align: 1px; }
.who .title-badge, .hi .title-badge { margin-left: 6px; }
.roles-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; }
.cr-table td { padding: 9px 8px; }
.cr-form .field.wide { grid-column: 1 / -1; }
.swatches { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; background: var(--tc); cursor: pointer; padding: 0; }
.swatches button.on { border-color: #fff; box-shadow: 0 0 0 2px var(--tc); }
.swatches input[type=color] { width: 34px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
.role-pick { max-width: 260px; }
@media (max-width: 1250px) { .roles-top { grid-template-columns: 1fr; } }
.pod-title { margin: 4px 0 2px; }

/* ---------- management: driver jobs ---------- */
.mj-bar { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; }
.mj-bar .field { flex: 0 1 auto; }
.mj-bar .field:first-child { flex: 0 1 300px; min-width: 220px; }
.mj-bar .chips { flex-wrap: wrap; }
.mj-bar .chips button { white-space: nowrap; }
.mj-bar .field > span { display: block; margin-bottom: 6px; }
.mj-bar .field[hidden] { display: none; }
.mj-bar input[type=date] { width: 150px; }
.mj-who { display: flex; align-items: center; gap: 14px; }
@media (max-width: 860px) { .mj-bar .field:first-child { flex-basis: 100%; } }

/* ---------- apply page ---------- */
.apply-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.apply-card { padding: 26px; }
.apply-card h2 { font-size: 23px; margin: 0 0 8px; color: #fff; text-transform: none; letter-spacing: 0; font-weight: 800; }
.apply-card .btn.discord { margin-top: 18px; }
.apply-side h3 { font-size: 16px; margin-bottom: 12px; }
.ticks { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 24px; color: #cfcfd5; font-size: 14px; }
.ticks li::before { content: '✓'; position: absolute; left: 0; color: var(--red2); font-weight: 800; }
.apply-who { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.apply-card textarea.input { min-height: 80px; font: inherit; }
.apply-card .char-count { align-self: flex-end; font-size: 11.5px; }
.game-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.pick { display: flex; align-items: center; gap: 9px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); cursor: pointer; font-size: 14px; }
.pick:has(input:checked) { border-color: var(--red); background: color-mix(in srgb, var(--red) 12%, var(--panel2)); }
.pick input, .agree input { accent-color: var(--red); width: 16px; height: 16px; }
.field.agree { flex-direction: row; align-items: center; gap: 10px; cursor: pointer; }
.field.agree > span { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--text); }
.field.bad .input, .field.bad select, .field.bad .pick, .field.bad.agree > span { border-color: var(--red2); color: var(--red2); }
.apply-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.apply-state { text-align: center; padding: 40px 26px; }
.state-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; font-size: 24px; font-weight: 800; }
.state-ic.ok { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.state-ic.bad { background: color-mix(in srgb, var(--red) 18%, transparent); color: var(--red2); }
.state-ic.wait { background: var(--panel2); }
.apply-state .ctas { justify-content: center; display: flex; gap: 10px; flex-wrap: wrap; }
.apply-reply { margin-top: 16px; padding: 14px 16px; border-left: 3px solid var(--red); background: var(--panel2); border-radius: 0 8px 8px 0; text-align: left; }
.apply-reply p { margin: 6px 0 0; white-space: pre-wrap; }
@media (max-width: 900px) { .apply-grid { grid-template-columns: 1fr; } }

/* ---------- management: applications ---------- */
dl.kv-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 0; }
dl.kv-list dt { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
dl.kv-list dd { margin: 3px 0 0; font-weight: 600; overflow-wrap: anywhere; }
p.answer { margin: 0; white-space: pre-wrap; color: #dcdce2; line-height: 1.55; overflow-wrap: anywhere; }
.ap-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 6px; }
.btn.ghost.danger { color: var(--red2); border-color: rgba(227,36,43,.45); }
.btn.ghost.danger:hover { background: rgba(227,36,43,.12); }
#apps-count { background: var(--amber); color: #1b1305; }

/* ---------- role permissions ---------- */
.perm-head { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 6px; font-size: 12.5px; }
.perm-head .link { background: none; border: 0; padding: 0; cursor: pointer; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 16px; }
.perm-group .pg-name { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--dim); margin: 6px 0 4px; }
.perm { display: flex; gap: 9px; align-items: flex-start; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; cursor: pointer; background: var(--panel2); }
.perm.on { border-color: rgba(227,36,43,.55); background: rgba(227,36,43,.08); }
.perm.locked { opacity: .45; cursor: not-allowed; }
.perm input { margin-top: 3px; accent-color: var(--red); }
.perm b { display: block; font-size: 13px; font-weight: 600; }
.perm small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.perm-matrix { overflow-x: auto; }
.perm-matrix th.pm-role { text-align: center; white-space: nowrap; }
.perm-matrix td.pm-cell { text-align: center; }
.pm-yes { color: var(--green); font-weight: 700; }
.pm-no { color: var(--dim); }

/* ---------- events ---------- */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.ev-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.ev-card:hover { border-color: rgba(227,36,43,.5); transform: translateY(-2px); }
.ev-card.cancelled { opacity: .6; }
.ev-card.cancelled h3 { text-decoration: line-through; }
.ev-date { position: relative; width: 52px; text-align: center; background: var(--red); border-radius: 8px; padding: 5px 0 4px; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.ev-date b { display: block; font-size: 20px; line-height: 1; color: #fff; }
.ev-date span { display: block; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: #ffe1e2; }
.ev-game { position: absolute; right: 10px; top: 10px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 12px; background: rgba(0,0,0,.65); }
.ev-body { padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ev-body h3 { font-size: 16px; }
.ev-body .m { color: var(--muted); font-size: 12.5px; }
.ev-route { font-size: 13px; }
.ev-route .arrow { color: var(--red); margin: 0 4px; }
.ev-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; font-size: 12.5px; }
.rsvp { display: flex; gap: 6px; margin-top: 6px; }
.rsvp button { flex: 1; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--muted); cursor: pointer; font-weight: 600; font-size: 13px; }
.rsvp button:hover { color: var(--text); border-color: #3a3a44; }
.rsvp button[data-r=going].on { background: var(--green); border-color: var(--green); color: #06210f; }
.rsvp button[data-r=maybe].on { background: var(--amber); border-color: var(--amber); color: #2a1a00; }
.rsvp button.clear { flex: 0 0 auto; }
.rsvp button:disabled { opacity: .6; cursor: wait; }
.ev-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.ev-head .ev-date { flex: none; }
.ev-head h1 { font-size: 24px; }
.ev-head .m { color: var(--muted); font-size: 13px; }
.ev-detail { display: grid; grid-template-columns: minmax(240px, 400px) minmax(0, 1fr); gap: 22px; align-items: start; }
.ev-side { display: grid; gap: 14px; position: sticky; top: 16px; }
.ev-people-cols { margin-top: 4px; }
.ev-people { display: grid; gap: 8px; }
.ev-people .who { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.ev-people .who .title-badge { margin-left: 0; }
@media (max-width: 900px) { .ev-detail { grid-template-columns: 1fr; } .ev-side { position: static; max-width: 420px; } }
/* posters: portrait, never cropped (blurred copy fills the gaps) */
.ev-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.ev-poster { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #0b0b0d; border-bottom: 1px solid var(--line); }
.ev-poster-bg { position: absolute; inset: -20px; background: center / cover no-repeat; filter: blur(18px) brightness(.45); }
.ev-poster img { position: relative; width: 100%; height: 100%; object-fit: contain; display: block; }
.ev-poster .ev-game { z-index: 2; }
.ev-poster.big { aspect-ratio: auto; border: 1px solid var(--line); border-radius: 12px; cursor: zoom-in; }
.ev-poster.big img { height: auto; }
.ev-poster.big .ev-poster-bg { display: none; }
.ev-poster.blank { background: radial-gradient(ellipse at 50% 0%, rgba(227,36,43,.35), transparent 60%), linear-gradient(170deg, #1d0709, #0c0c0e 55%, #1a0608); display: flex; }
.ev-poster.blank.big { aspect-ratio: 3 / 4; cursor: default; }
.ev-poster.blank::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(227,36,43,.05) 22px 24px); }
.pb { position: relative; display: flex; flex-direction: column; justify-content: space-between; text-align: center; padding: 22px 16px 16px; width: 100%; gap: 10px; }
.pb-brand { font-weight: 900; letter-spacing: 4px; font-size: 15px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pb-brand .mark { width: 30px; height: 22px; }
.pb-brand small { font-size: 9px; letter-spacing: 3px; color: var(--muted); font-weight: 700; }
.pb-title { font-size: 24px; font-weight: 900; font-style: italic; text-transform: uppercase; line-height: 1.05; text-shadow: 0 0 18px var(--redglow); }
.pb-route { font-weight: 800; font-size: 15px; }
.pb-route i { color: var(--red2); font-style: normal; margin: 0 6px; }
.pb-date { border-top: 2px solid var(--red); border-bottom: 2px solid var(--red); padding: 8px 4px; background: rgba(0,0,0,.35); }
.pb-date b { display: block; font-size: 15px; font-style: italic; text-transform: uppercase; }
.pb-date span { display: block; font-size: 12.5px; color: var(--red2); font-weight: 700; margin-top: 2px; }
.pb-foot { font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ev-poster.blank.big .pb-title { font-size: 34px; }
.ev-poster.blank.big .pb-brand { font-size: 20px; }
.ev-poster.blank.big .pb-date b { font-size: 19px; }
.ev-poster-edit { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.ev-poster-prev { width: 150px; aspect-ratio: 3 / 4; border: 1px dashed var(--line); border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--panel2); color: var(--dim); font-size: 12px; }
.ev-poster-prev img { width: 100%; height: 100%; object-fit: contain; }
#ev-bremove { background: none; border: 0; padding: 0; margin-top: 6px; cursor: pointer; }
#events-count { background: var(--blue); }

/* driver numbers */
td.dnum { white-space: nowrap; }
td.dnum .dn { font-weight: 700; font-variant-numeric: tabular-nums; }
td.dnum .badge { margin-left: 4px; }
.icon-btn { background: none; border: 1px solid transparent; color: var(--muted); border-radius: 6px; padding: 1px 6px; margin-left: 4px; cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--line); background: var(--panel2); }
.dn-edit { display: flex; gap: 6px; align-items: center; }
.dn-edit .input { width: 130px; margin: 0; padding: 5px 8px; text-transform: uppercase; }
td.dnum .m { color: var(--muted); font-size: 11.5px; margin-top: 4px; white-space: normal; }
