:root{
  --bg:#070a12;
  --card:#0b1020;
  --card2:#0e1630;
  --text:#e8eefc;
  --muted:rgba(232,238,252,.72);
  --border:rgba(255,255,255,.10);
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --red:#e10600;         /* F1-ish red */
  --red2:#ff2a23;

  /* Make gutter zoom-safe + responsive (was fixed 34px) */
  --gutter: clamp(18px, 3vw, 34px);
}

*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  overflow-x:hidden; /* prevents tiny zoom-induced horizontal scroll */
}

/* Prevent images from forcing horizontal overflow */
img, svg{ max-width:100%; }

/* =========================
   Shared typography / utility
   ========================= */

.muted{ color: var(--muted); }
.small{ font-size: 12px; }
.table-wrap{ overflow-x:auto; }

/* =========================
   Buttons (CANONICAL)
   ========================= */

.btn{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 14px;
  padding: 11px 14px;
  cursor:pointer;
  font-weight: 750;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  line-height: 1;
  white-space: nowrap;
}

.btn:hover{ background: rgba(255,255,255,.09); }
.btn:disabled,
.btn[disabled]{ pointer-events:none; opacity:.55; cursor:not-allowed; }

.btn-lg{ padding: 12px 16px; border-radius: 16px; }
.btn-sm{ padding: 9px 12px; border-radius: 12px; font-size: 13px; }

/* Legacy alias used in older templates */
.btn-small{ padding: 8px 10px; border-radius: 10px; font-size: 13px; }

.btn-ghost{ background: rgba(255,255,255,.03); }

.btn-primary{
  border-color: rgba(225,6,0,.55);
  background: linear-gradient(135deg, var(--red) 0%, var(--red2) 55%, rgba(255,42,35,.85) 100%);
  box-shadow: 0 18px 40px rgba(225,6,0,.18);
}
.btn-primary:hover{ filter: brightness(1.05); }

.btn-outline{ background: transparent; }

.btn-danger-outline{
  background: transparent;
  border-color: rgba(225,6,0,.45);
}
.btn-danger-outline:hover{
  background: rgba(225,6,0,.10);
}

/* =========================
   Links
   ========================= */

.link{
  color: rgba(255,255,255,.86);
  text-decoration: none;
  font-weight: 650;
  opacity:.92;
}
.link:hover{ opacity:1; text-decoration: underline; }

/* =========================
   Page headings / cards grid
   ========================= */

.page-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin: 10px 0 18px;
}
.page-title{ margin:0; font-size:26px; letter-spacing:.2px; }
.page-actions{ display:flex; gap:10px; flex-wrap:wrap; }

.cards-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
}
@media (max-width: 980px){
  .cards-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .cards-grid{ grid-template-columns: 1fr; }
}

.cards-grid-2{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 640px){
  .cards-grid-2{ grid-template-columns: 1fr; }
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.card-title{ font-weight:800; font-size:16px; }
.card-sub{ margin-top:6px; font-size:13px; }

.pill{
  display:inline-flex;
  align-items:center;
  height:26px;
  padding:0 10px;
  border-radius:999px;
  font-weight:800;
  font-size:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
}

.card-actions{
  display:flex;
  gap:10px;
  margin-top: 12px;
}

.inline-form{ display:inline; margin:0; }

.empty{
  margin-top: 18px;
  padding: 18px;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
}
.empty-title{ font-weight:900; font-size:16px; }
.empty-actions{ display:flex; gap:10px; margin-top:12px; flex-wrap:wrap; }

/* =========================
   Tables
   ========================= */

.table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table th,
.table td{
  text-align:left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  vertical-align: middle;
}
.table thead th{
  font-size: 12px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 900;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.table tbody tr:hover td{
  background: rgba(255,255,255,.03);
}

.user-chip{
  display:flex;
  align-items:center;
  gap:10px;
}
.user-avatar{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
}
.user-name{ font-weight: 900; }

.pill-admin{
  border-color: rgba(225,6,0,.45);
  background: rgba(225,6,0,.10);
}

.leaderboard-table .col-rank{ width: 80px; }
.leaderboard-table .col-points{ width: 120px; text-align:right; }

.points-value{
  font-weight: 900;
  font-size: 16px;
  letter-spacing:.4px;
}

.rank-badge{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
}
.rank-1{ border-color: rgba(255,215,0,.6); background: rgba(255,215,0,.15); }
.rank-2{ border-color: rgba(192,192,192,.6); background: rgba(192,192,192,.15); }
.rank-3{ border-color: rgba(205,127,50,.6); background: rgba(205,127,50,.15); }
.rank-other{ opacity:.8; }

.leader-row.leader-first td{ font-weight: 900; }

/* =========================
   Forms (generic)
   ========================= */

.field{ display:grid; gap: 7px; }
.field__label{ font-size: 13px; color: var(--muted); }

.input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(10,14,28,.65);
  color: var(--text);
  outline:none;
}
.input:focus{
  border-color: rgba(225,6,0,.55);
  box-shadow: 0 0 0 4px rgba(225,6,0,.16);
}

.form-actions{
  margin-top: 14px;
  display:flex;
  justify-content: flex-end;
}

/* =========================
   Auth hero
   ========================= */

.auth-hero{
  min-height: 100vh;
  position:relative;
  overflow:hidden;
}

.auth-hero__bg{
  position:absolute;
  inset:0;
  background: transparent;
}

.auth-shell{
  position:relative;
  z-index:1;
  width: min(1100px, calc(100% - (var(--gutter) * 2)));
  margin:0 auto;
  padding: clamp(28px, 5vw, 54px) 0 clamp(26px, 4vw, 46px);
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap:22px;
  align-items:stretch;
}
@media (max-width: 900px){
  .auth-shell{ grid-template-columns:1fr; }
}

.auth-card, .side-card, .side-strip{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.auth-card{ padding: 26px; }
.auth-card__header{ margin-bottom: 18px; }

.auth-pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 8px 12px;
  border-radius: 999px;
  border:1px solid rgba(225,6,0,.35);
  background: rgba(225,6,0,.12);
  font-weight: 750;
  letter-spacing:.2px;
}

.auth-title{
  margin: 14px 0 6px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.8px;
}
.auth-sub{
  margin:0;
  color:var(--muted);
  max-width: 52ch;
}

.auth-form{ margin-top: 16px; display:grid; gap: 14px; }

.auth-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top: 2px;
}

.check{
  display:flex; align-items:center; gap:10px;
  color: var(--muted);
  font-size: 13px;
}
.check input{ accent-color: var(--red2); }

.auth-foot{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  margin-top: 8px;
}

/* Right panel */
.auth-side{ display:grid; gap: 14px; }

.side-card{ padding: 18px; }
.side-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 12px;
}

.side-kicker{
  font-size: 12px;
  color: rgba(255,255,255,.75);
  letter-spacing:.16em;
  text-transform: uppercase;
}
.side-title{
  font-size: 20px;
  font-weight: 850;
  margin-top: 4px;
}
.side-badge{
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.80);
  flex: 0 0 auto;
}

.race-list{ display:grid; gap: 10px; margin-top: 10px; }
.race-item{
  display:grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(10,14,28,.50);
  min-width:0;
}
/* ===== Landing: Next Races (force single-row alignment) ===== */
.race-box{
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,.18);
}

.race-box .race-list{
  display: grid;
  gap: 0;
  margin-top: 0 !important;
}

.race-box .race-item{
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) max-content;
  gap: 14px;
  align-items: center;
  padding: 16px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.race-box .race-item + .race-item{
  border-top: 1px solid rgba(255,255,255,.10);
}

.race-box .race-date{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(225,6,0,.95);
  box-shadow: 0 10px 26px rgba(225,6,0,.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.race-box .race-day{
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.race-box .race-main{ min-width: 0; }

.race-box .race-name{
  font-weight: 850;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.race-box .race-sub{
  font-size: 12px;
  color: rgba(255,255,255,.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.race-box .race-time{
  justify-self: end;
  text-align: right;
  font-weight: 750;
  white-space: nowrap;
  font-size: 13px;
  color: rgba(255,255,255,.82);
}
.race-date{
  border-radius: 14px;
  border:1px solid rgba(225,6,0,.35);
  background: rgba(225,6,0,.10);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding: 8px 6px;
  line-height: 1.05;
}
.race-day{ font-size: 18px; font-weight: 900; }
.race-mon{ font-size: 12px; letter-spacing:.12em; text-transform: uppercase; color: rgba(255,255,255,.85); }

.race-main{ min-width:0; }
.race-name{
  font-weight: 850;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.race-meta{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

.chip{
  font-size: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.82);
}
.dot{ color: rgba(255,255,255,.25); }

.side-strip{
  padding: 16px 18px;
  border-radius: 22px;
  background:
    radial-gradient(600px 220px at 20% 0%, rgba(225,6,0,.18), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}
.strip-title{ font-weight: 900; font-size: 15px; margin-bottom: 6px; }

/* =========================
   Landing (goal-* classes)
   ========================= */

body.is-landing .page{ padding-top: 0; }
body.is-landing .page > .container{
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.is-landing .site-header{
  background: linear-gradient(
    180deg,
    rgba(0,0,0,.55) 0%,
    rgba(0,0,0,.28) 70%,
    rgba(0,0,0,.10) 100%
  );
  border-bottom-color: rgba(255,255,255,.08);
}

/* HERO */
.goal-hero{
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 0;
  box-shadow: none;
  min-height: clamp(420px, 55vh, 560px);
  background: var(--bg);
}

.goal-hero__bg{
  position: absolute;
  inset: 0;
  width: min(1280px, 100%);
  margin-inline: auto;
  overflow: hidden;
}

.goal-hero__bg img{
  display:block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
  filter: brightness(1.18) saturate(150%) contrast(115%);
  transform: scale(1.18);
  transform-origin: center;
}

@media (min-width: 700px){
  .goal-hero__bg img{ transform: scale(1.10); }
}
@media (min-width: 1000px){
  .goal-hero__bg img{ transform: scale(1.04); }
}
@media (min-width: 1280px){
  .goal-hero__bg img{ transform: scale(1.00); }
}

.goal-hero__shade{
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,
      rgba(7,10,18,.65) 0%,
      rgba(7,10,18,.45) 40%,
      rgba(7,10,18,.18) 68%,
      rgba(7,10,18,.04) 100%
    ),
    radial-gradient(900px 520px at 22% 42%, rgba(225,6,0,.18), transparent 65%);
}

.goal-hero__inner{
  width: min(1280px, calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
  padding-top: clamp(34px, 7vw, 78px);
  padding-bottom: clamp(16px, 3vw, 36px);
  padding-left: clamp(10px, 1.6vw, 24px);
  padding-right: clamp(10px, 1.6vw, 24px);
  display:flex;
  align-items:center;
}

.goal-hero__copy{
  position: relative;
  max-width: 560px;
  z-index: 3;
}

.goal-h1{
  margin:0;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -1.3px;
  text-transform: uppercase;
}

.goal-accent{
  color: var(--red2);
  text-shadow: 0 0 14px rgba(225,6,0,.35), 0 0 30px rgba(225,6,0,.18);
}

.goal-sub{
  margin: clamp(16px, 2.6vw, 28px) 0 0;
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 750;
  letter-spacing: .2px;
  color: rgba(255,255,255,.82);
}

.goal-cta{
  margin-top: clamp(18px, 3.2vw, 34px);
  gap: 14px;
}

.goal-cta .btn{
  padding: 14px 22px;
  font-size: 16px;
  border-radius: 10px;
  min-width: 170px;
  justify-content: center;
}

@media (max-width: 520px){
  .goal-cta .btn{
    width: 100%;
    min-width: 0;
  }
}

/* LOWER PANELS */
.goal-lower{
  width: min(1280px, 100%);
  margin: -80px auto 0;
  padding: 0 0 22px;
  position: relative;
  z-index: 5;
}

.goal-lower__inner{
  position: relative;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  background:
    linear-gradient(0deg, rgba(10,14,28,.85), rgba(10,14,28,.92)),
    url("/static/img/landing-hero.jpg") 80% 72% / 240% no-repeat;
  backdrop-filter: blur(14px);
}

.goal-lower__inner::after{
  content:"";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    135deg,
    rgba(255,255,255,.028) 0 1px,
    transparent 1px 14px
  );
  opacity: .9;
}

.goal-grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 0;
}

.goal-panel{
  padding: 16px 18px 18px;
  border-right: 1px solid rgba(255,255,255,.10);
  min-width:0;
}
.goal-panel:last-child{ border-right: 0; }

.goal-panel__row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  min-width:0;
}

.goal-panel__title{
  font-size: 25px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 18px;
  display:flex;
  align-items:center;
  gap:10px;
}

/* How it Works strip */
.goal-works{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 0;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(10,14,28,.35);
  margin-top: 30px;
}

.goal-work{
  padding: 18px 18px 16px;
  min-height: 150px;
  text-align: center;
  position: relative;
  min-width:0;
}

.goal-work:not(:last-child)::after{
  content:"";
  position:absolute;
  top: 22px;
  bottom: 22px;
  right: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(225,6,0,.00),
    rgba(225,6,0,.55),
    rgba(225,6,0,.00)
  );
  opacity: .95;
}

.goal-work__icon{
  width: 70px;
  height: 56px;
  border-radius: 14px;
  margin: 0 auto 14px;
  color: rgba(255,42,35,.95);
  background: rgba(225,6,0,.12);
  border: 1px solid rgba(225,6,0,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 16px 34px rgba(225,6,0,.18);
}

.goal-work__icon svg{ width: 32px; height: 32px; }

.goal-work__title{
  font-weight: 900;
  font-size: 18px;
  margin: 6px 0 8px;
}
.goal-work__sub{
  color: rgba(255,255,255,.70);
  font-size: 13px;
  line-height: 1.45;
  margin: 0 auto;
  max-width: 28ch;
}

@media (max-width: 900px){
  .goal-works{ grid-template-columns: 1fr; }
  .goal-work:not(:last-child){
    border-bottom: 1px solid rgba(255,255,255,.10);
  }
}

/* =========================
   Header — Canonical
   ========================= */

.site-header{
  padding: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(
    180deg,
    rgba(0,0,0,.78) 0%,
    rgba(0,0,0,.48) 60%,
    rgba(0,0,0,.30) 100%
  );
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 80;
}

.site-header .container{
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px var(--gutter);
  padding-left: calc(var(--gutter) - 28px);
  width: 100%;
}

.nav{
  display: grid;
  grid-template-columns: auto 1fr auto; /* brand | links | auth */
  align-items: center;
  gap: 18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none !important;
  min-width:0;
}

.brand-logo{
  width: 54px;
  height: 18px;
  display:inline-block;
  position: relative;
  transform: skewX(-18deg);
}

.brand-logo::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width: 28px;
  border-radius: 2px;
  background: linear-gradient(90deg, #e10600, #ff3b30);
}

.brand-logo::after{
  content:"";
  position:absolute;
  left: 30px;
  top: 2px;
  width: 16px;
  height: 12px;
  border-radius: 2px;
  background: rgba(225,6,0,.85);
  clip-path: polygon(0 0, 100% 50%, 0 100%, 25% 50%);
}

.brand-name{
  font-weight: 900;
  font-size: 19px;
  letter-spacing: .1px;
  color: rgba(255,255,255,.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links{
  display:flex;
  gap: 40px;
  align-items:center;
  justify-content: center;
  justify-self: center;
  flex-wrap: wrap;
}

.nav-link{
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .4px;
  color: rgba(255,255,255,.82);
  padding: 10px 0 14px;
  text-decoration:none !important;
  position: relative;
  transition: color .15s ease, transform .12s ease;
}

.nav-link:hover{
  color: rgba(255,255,255,.96);
  transform: translateY(-1px);
}

.nav-link.active,
.nav-link[aria-current="page"]{
  color: rgba(255,255,255,.96);
}

.nav-link.active::after,
.nav-link[aria-current="page"]::after{
  content:"";
  position:absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}

.nav-auth{
  display:flex;
  gap: 6px;
  align-items:center;
  padding: 5px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  flex: 0 0 auto;
  flex-wrap: wrap;
  margin-right: -33px;
}

.btn-nav{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.02);
  color: rgba(255,255,255,.92);
  padding: 7px 11px;
  border-radius: 9px;
  font-weight: 750;
  font-size: 13px;
  text-decoration:none !important;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  line-height: 1;
}

.btn-nav:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.18);
}

.btn-nav svg{
  width: 16px;
  height: 16px;
  opacity: .9;
}

@media (max-width: 760px){
  .site-header .container{ padding: 12px var(--gutter); }

  .nav{
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand auth"
      "links links";
    gap: 10px;
  }

  .brand{ grid-area: brand; }
  .nav-auth{ grid-area: auth; justify-content: flex-end; }

  .nav-links{
    grid-area: links;
    justify-content: space-between;
    gap: 10px;
  }
}

/* =========================
   Dashboard
   ========================= */

.dash{
  width: min(1280px, calc(100% - (var(--gutter) * 2)));
  margin: 24px auto 40px;
}

.dash-top{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 900px){
  .dash-top{ grid-template-columns: 1fr; }
}

.pin{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow:hidden;
}

.pin-wide{ margin-top: 14px; }

.pin-head{
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.pin-kicker{
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.70);
}

.pin-title{
  margin-top: 6px;
  font-size: 20px;
  font-weight: 900;
}

.pin-body{ padding: 16px 18px 18px; }

.kv{ display:grid; gap: 6px; margin-bottom: 14px; }
.kv:last-child{ margin-bottom: 0; }
.kv-label{ font-size: 12px; color: rgba(255,255,255,.70); }
.kv-value{ font-weight: 850; }

.pin-stats{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}
@media (max-width: 600px){
  .pin-stats{ grid-template-columns: 1fr; }
}

.stat{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(10,14,28,.40);
  border-radius: 14px;
  padding: 12px;
}
.stat-label{
  font-size: 12px;
  color: rgba(255,255,255,.70);
  margin-bottom: 8px;
}
.stat-value{
  font-size: 22px;
  font-weight: 950;
}

/* =========================
   Defaults pickers (dashboard)
   ========================= */

/* Top row: 2 columns */
.defaults-grid--top2{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:14px;
  align-items:start;
  margin-bottom:14px;
}

/* Bottom row: 3 columns */
.defaults-grid--bottom3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
  align-items:start;
}

/* Responsive wrap */
@media (max-width: 980px){
  .defaults-grid--top2{ grid-template-columns: 1fr; }
  .defaults-grid--bottom3{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px){
  .defaults-grid--bottom3{ grid-template-columns: 1fr; }
}

/* Selected rows (constructor + driver) */
.constructor-row,
.pick-row{
  width: 100%;
  min-height: 44px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  background: rgba(10,14,28,.40);
  border: 1px solid rgba(255,255,255,.10);
  display:flex;
  align-items:center;
  gap:12px;
  padding: 10px 12px;
  border-radius: 14px;
}

.constructor-row:hover,
.pick-row:hover{
  border-color: rgba(225,6,0,.35);
  background: rgba(225,6,0,.06);
}

.constructor-logo{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  padding: 6px;
  object-fit: contain;
}

.constructor-row:hover .constructor-logo{
  box-shadow: 0 0 12px rgba(225,6,0,.35);
}

.pick-row-logo{
  width:20px;
  height:20px;
  flex:0 0 20px;
  object-fit: contain;
  opacity: .95;
}

.constructor-name,
.pick-name{
  font-weight: 900;
  min-width: 0;
  flex:1;
  text-align:left;
}

/* Make set buttons match row width/height */
.pick-btn{
  width: 100%;
  min-height: 44px;
}

/* =========================
   Constructor dialog (dashboard)
   ========================= */

.ctor-dialog{
  width: min(840px, 94vw);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 0;
  background: rgba(12,16,32,.92);
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
  backdrop-filter: blur(14px);
}
.ctor-dialog::backdrop{ background: rgba(0,0,0,.62); }

.ctor-dialog__head{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.ctor-kicker{
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.70);
}

.ctor-title{
  margin-top: 6px;
  font-size: 18px;
  font-weight: 950;
}

.ctor-grid{
  padding: 16px;
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px){
  .ctor-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .ctor-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ctor-card{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 16px;
  padding: 14px 12px 12px;
  cursor: pointer;
  text-align: center;
  color: var(--text);
  display:flex;
  flex-direction: column;
  align-items:center;
  gap: 10px;
}

.ctor-card:hover{
  border-color: rgba(225,6,0,.35);
  background: rgba(225,6,0,.06);
}

.ctor-card__logo{
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.ctor-card__name{
  font-size: 13px;
  font-weight: 900;
  color: rgba(255,255,255,.88);
}

/* =========================
   Driver pick dialog (dashboard)
   ========================= */

.pick-dialog{
  width: min(720px, 94vw);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 0;
  background: rgba(12,16,32,.92);
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
  backdrop-filter: blur(14px);
}
.pick-dialog::backdrop{ background: rgba(0,0,0,.62); }

.pick-dialog__head{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.pick-kicker{
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.70);
}

.pick-title{
  margin-top: 6px;
  font-size: 18px;
  font-weight: 950;
}

.pick-list{
  padding: 14px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}
@media (max-width: 520px){
  .pick-list{ grid-template-columns: 1fr; }
}

.pick-item{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  color: rgba(255,255,255,.92);
  font-weight: 800;
  display:flex;
  align-items:center;
  gap:10px;
}

.pick-item:hover{
  border-color: rgba(225,6,0,.35);
  background: rgba(225,6,0,.06);
}

.pick-driver-name{
  flex: 1 1 auto;
  min-width: 0;
}

.pick-team-logo{
  width: 26px;
  height: 26px;
  object-fit: contain;
  opacity: .9;
}

.pick-item:hover .pick-team-logo{
  filter: drop-shadow(0 0 6px rgba(225,6,0,.35));
}

.pick-item.is-disabled{
  opacity:.40;
  pointer-events:none;
  filter: grayscale(1);
}
.pick-item.is-disabled::after{
  content:"Selected";
  margin-left:auto;
  font-size:12px;
  opacity:.85;
}

/* =========================
   Tips table sizing (if used elsewhere)
   ========================= */

.tips-table .col-round{ width: 90px; }
.tips-table .col-date{ width: 220px; }
.tips-table .col-locked{ width: 130px; }
.tips-table .col-action{ width: 140px; text-align:right; }

.round-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 42px;
  height: 34px;
  border-radius: 12px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
}

.location-name{ font-weight: 900; }

.pill-locked{
  border-color: rgba(225,6,0,.45);
  background: rgba(225,6,0,.10);
}

/* =========================
   Tips page (SCOPED)
   ========================= */

.tips-page .race-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  box-shadow:var(--shadow);
}

/* Header row */
.tips-page .tips-card-head{
  display:grid;
  grid-template-columns: 1fr auto 40px;
  align-items:center;
  gap:14px;
  padding:16px;
  cursor:pointer;
  user-select:none;
}

.tips-page .tips-head-title{
  font-size:16px;
  font-weight:900;
  letter-spacing:.2px;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width:0;
}

.tips-page .tips-head-meta{
  display:flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
}

.tips-page .tips-when{
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}

.tips-page .tips-chip{
  display:inline-flex;
  align-items:center;
  height:28px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  font-size:12px;
  font-weight:900;
  letter-spacing:.4px;
}
.tips-page .tips-chip.open{ border-color:rgba(34,197,94,.45); background:rgba(34,197,94,.10); }
.tips-page .tips-chip.locked{ border-color:rgba(225,6,0,.45); background:rgba(225,6,0,.10); }
.tips-page .tips-chip.saved{ border-color:rgba(34,197,94,.45); background:rgba(34,197,94,.10); }

.tips-page .tips-toggle{
  width:40px; height:40px; border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  display:grid; place-items:center;
}
.tips-page .tips-toggle svg{ width:18px; height:18px; transition:transform .18s ease; }

/* Expand/collapse */
.tips-page .race-details{
  display:none;
  border-top:1px solid var(--border);
  padding:16px;
}


.tips-page .race-card[data-open="false"] > .race-details{ display:none; }

.tips-page .race-card[data-open="true"] .tips-toggle svg{ transform:rotate(180deg); }
/* Main layout */
.tips-page .tips-details-grid{
  display:grid;
  grid-template-columns: 1.35fr .95fr;
  gap:14px;
  align-items:start;
}
@media (max-width:980px){
  .tips-page .tips-details-grid{ grid-template-columns:1fr; }
}

/* Panels */
.tips-page .tips-panel{
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,255,255,.02);
  overflow:hidden;
}
.tips-page .tips-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
}
.tips-page .tips-panel-title{
  margin:0;
  font-size:12px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:rgba(255,255,255,.78);
  font-weight:900;
}

/* Weekend header row */
.tips-page .tips-weekend-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:nowrap;
}
.tips-page .tips-weekend-inline{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
  min-width:0;
}
.tips-page .tips-weekend-item{ display:inline-flex; align-items:baseline; gap:6px; white-space:nowrap; }
.tips-page .tips-weekend-k,.tips-page .tips-weekend-v{ font-size:14px; font-weight:900; letter-spacing:.2px; }
.tips-page .tips-weekend-k{ color:var(--muted); font-weight:800; }
.tips-page .tips-weekend-v{ color:rgba(255,255,255,.92); }
.tips-page .tips-weekend-sep{ color:rgba(255,255,255,.25); font-weight:900; }

@media (max-width:720px){
  .tips-page .tips-weekend-row{ flex-wrap:wrap; align-items:flex-start; }
  .tips-page .tips-weekend-inline{ width:100%; justify-content:flex-start; }
}

/* Circuit panel */
.tips-page .tips-circuit-wrap{ padding:12px 14px 14px; }
.tips-page .tips-circuit-img{
  width:100%;
  height:auto;
  display:block;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.20);
}

/* Tips form labels */
.tips-page .field__label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
  font-weight:800;
}

/* Pick rows */
.tips-page .pick-row{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  color:var(--text);
  cursor:pointer;
  text-align:left;
}
.tips-page .pick-row:hover{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.16); }
.tips-page .pick-row-logo{ width:22px; height:22px; object-fit:contain; }
.tips-page .pick-name{
  font-weight:900;
  letter-spacing:.2px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  min-width:0;
}

/* 2-row layout */
.tips-page .tip-row{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
  align-items:end;
  margin-top:6px;
}
.tips-page .tip-row-2{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap:12px;
  align-items:end;
  margin-top:12px;
}
.tips-page .tip-actions{
  display:flex;
  justify-content:flex-end;
  align-items:end;
  padding-bottom:2px;
}
@media (max-width:720px){
  .tips-page .tip-row,
  .tips-page .tip-row-2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tips-page .tip-actions{ grid-column:1 / -1; margin-top:6px; }
}
@media (max-width:520px){
  .tips-page .tip-row,
  .tips-page .tip-row-2{ grid-template-columns:1fr; }
  .tips-page .tip-actions{ justify-content:stretch; }
  .tips-page .tip-actions .btn{ width:100%; }
}

/* Dialogs scoped (won't affect other dialogs site-wide) */
.tips-page dialog{
  border:none;
  padding:0;
  border-radius:16px;
  background:var(--card);
  color:var(--text);
  box-shadow:var(--shadow);
  width:min(820px, 96vw);
}
.tips-page dialog::backdrop{ background:rgba(0,0,0,.6); }

.tips-page .ctor-dialog__head,
.tips-page .pick-dialog__head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:14px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
}

.tips-page .ctor-kicker,
.tips-page .pick-kicker{
  font-size:11px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:rgba(255,255,255,.72);
  font-weight:900;
}

.tips-page .ctor-title,
.tips-page .pick-title{ font-size:16px; font-weight:900; margin-top:2px; }

.tips-page .ctor-grid{
  padding:10px 14px 14px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
}
@media (max-width:640px){
  .tips-page .ctor-grid{ grid-template-columns:1fr; }
}

.tips-page .ctor-card{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  color:var(--text);
  cursor:pointer;
  text-align:left;
}
.tips-page .ctor-card:hover{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.16); }
.tips-page .ctor-card__logo{ width:26px; height:26px; object-fit:contain; }
.tips-page .ctor-card__name{ font-weight:900; letter-spacing:.2px; }

.tips-page .pick-list{ padding:10px 14px 14px; display:grid; gap:8px; }

.tips-page .pick-item{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  color:var(--text);
  cursor:pointer;
  text-align:left;
}
.tips-page .pick-item:hover{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.16); }
.tips-page .pick-item.is-disabled{ opacity:.45; cursor:not-allowed; }

.tips-page .pick-team-logo{ width:22px; height:22px; object-fit:contain; }
.tips-page .pick-driver-name{ font-weight:900; letter-spacing:.2px; }

/* Tips header times */
.tips-page .tips-head-times{
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  margin-left: 6px;
  white-space: nowrap;
}

/* Make header responsive and stable */
.tips-page .tips-card-head{
  display: grid;
  grid-template-columns: minmax(0,1fr) auto 40px;
  align-items: center;
  gap: 14px;
}

.tips-page .tips-head-title{
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tips-page .tips-head-times{
  letter-spacing: .2px;
}

.tips-page .tips-panel-title{
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 950;
}

/* Tips form rows */
.tips-page .tip-row{
  display:grid;
  gap:12px;
  align-items:end;
  margin-top:12px;
}

/* Row 1: single column */
.tips-page .tip-row--one{
  grid-template-columns: 1fr;
}

/* Rows 2/3: two columns */
.tips-page .tip-row--two{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Save row */
.tips-page .tip-actions--row{
  display:flex;
  justify-content:flex-end;
  margin-top:14px;
}

/* Make "Set ..." buttons match row width */
.tips-page .pick-btn{ width:100%; }

/* Responsive */
@media (max-width: 720px){
  .tips-page .tip-row--two{ grid-template-columns: 1fr; }
  .tips-page .tip-actions--row{ justify-content:stretch; }
  .tips-page .tip-actions--row .btn{ width:100%; }
}
select.select{
  color: var(--text);
  background-color: rgba(0,0,0,.22);
}

select.select option{
  color: #111; /* keep readable in native menu */
}

.team-badge{
  width:20px;
  height:20px;
  object-fit:contain;
}
/* =========================
   Tips — Upcoming group wrapper styling
   (Different bg to round cards, heading unchanged)
   ========================= */

.tips-page .race-card.upcoming-group{
  /* darker / different tone than normal cards */
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
  border-color: rgba(255,255,255,.14);
}

/* optional: make the group header feel slightly distinct without changing text styling */
.tips-page .race-card.upcoming-group > .tips-card-head{
  background: rgba(255,255,255,.03);
}

/* Keep the nested upcoming ROUND cards looking like normal cards */
.tips-page .race-card.upcoming-group .race-card{
  background: var(--card);
  border-color: var(--border);
}
.tips-page .race-card.previous-group{
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
  border-color: rgba(255,255,255,.14);
}

.tips-page .race-card.previous-group > .tips-card-head{
  background: rgba(255,255,255,.03);
}


/* ================================
   Leaderboard table polish
================================ */

/* faint horizontal row lines */
.leaderboard-table tbody tr{
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* remove last row line */
.leaderboard-table tbody tr:last-child{
  border-bottom: none;
}

/* vertical column separators */
.leaderboard-table th:not(:last-child),
.leaderboard-table td:not(:last-child){
  border-right: 1px solid rgba(255,255,255,.06);
}

/* center ALL cells by default */
.leaderboard-table th,
.leaderboard-table td{
  text-align: center;
  vertical-align: middle;
}

/* EXCEPTION: Display Name column left aligned */
.leaderboard-table th:nth-child(2),
.leaderboard-table td:nth-child(2){
  text-align: left;
}

/* tighten rank text look */
.rank-text{
  font-weight: 600;
  color: var(--text);
}
.leaderboard-table tbody tr:hover{
  background: rgba(255,255,255,.03);
}
/* =================================
   Leaderboard column sizing
================================= */

/* let browser respect our widths */
.leaderboard-table{
  table-layout: fixed;
  width: 100%;
}

/* Rank column — tight */
.leaderboard-table .col-rank{
  width: 70px;
  white-space: nowrap;
}

/* Last Round column */
.leaderboard-table th:nth-child(3),
.leaderboard-table td:nth-child(3){
  width: 130px;
  white-space: nowrap;
}

/* Total column */
.leaderboard-table th:nth-child(4),
.leaderboard-table td:nth-child(4){
  width: 130px;
  white-space: nowrap;
}

/* Display name column takes remaining space but not excessive */
.leaderboard-table th:nth-child(2),
.leaderboard-table td:nth-child(2){
  width: auto;
}

/* tighten user chip spacing */
.user-chip{
  display: flex;
  align-items: center;
  gap: 10px;
}

/* prevent name from stretching layout */
.user-name{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px; /* tweak if needed */
}
.card{
  max-width: 980px;   /* 👈 adjust to taste */
  margin: 0 auto;
}
.leaderboard-table .col-center{
  text-align: center;
}
.signed-in-chip{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border:1px solid var(--border);
  border-radius:999px;
  background:rgba(255,255,255,.04);
  box-shadow:0 10px 28px rgba(0,0,0,.22);
}

.signed-in-logo{
  width:22px;
  height:22px;
  object-fit:contain;
  flex:0 0 22px;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.35));
}

.signed-in-name{
  font-weight:800;
  letter-spacing:.2px;
  line-height:1;
  white-space:nowrap;
}
.signed-in-row{
  display:flex;
  align-items:center;
  gap:10px;
}

/* The name text (clean, broadcast style) */
.signed-in-text{
  font-weight:800;
  letter-spacing:.2px;
}

/* Circular team badge on the RIGHT */
.signed-in-team{
  width:28px;
  height:28px;
  border-radius:50%;
  background:rgba(255,255,255,.06);
  border:1px solid var(--border);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex:0 0 28px;
}

.signed-in-team img{
  width:18px;
  height:18px;
  object-fit:contain;
}
/* make the team badge feel clickable */
.signed-in-team{
  cursor: pointer;
  border: 0;
  padding: 0;
  background: transparent;
}

.signed-in-team:hover{
  transform: translateY(-1px);
}

.signed-in-team:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(225,6,0,.18);
  border-radius: 999px;
}
.signed-in-team{
  cursor:pointer;
  border:0;
  background:transparent;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.signed-in-team img{
  width:28px;
  height:28px;
  object-fit:contain;
}

.signed-in-team:hover{
  transform:translateY(-1px);
}

.signed-in-team:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(225,6,0,.18);
  border-radius:999px;
}
.league-topline {
  display: flex;
  align-items: center;
}
.league-name{
  font-size:18px;
  font-weight:750;
  letter-spacing:.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:min(520px, 62vw);
}

.league-admin-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-size:12px;
  font-weight:800;
  letter-spacing:.35px;
  text-transform:uppercase;
}
.league-left{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.pending-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(245,158,11,.30);
  background:rgba(245,158,11,.10);
  color:var(--text);
  font-size:12px;
  font-weight:800;
  letter-spacing:.25px;
}

.pending-chip .pending-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 6px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-size:12px;
  font-weight:900;
}
/* Red glow ONLY behind the input block */

.pin-glow::before{
  content:"";
  position:absolute;
  inset: -40px -40px -40px -40px;
  background:
    radial-gradient(520px 220px at 50% 35%, rgba(225,6,0,.22), transparent 60%),
    radial-gradient(420px 190px at 65% 55%, rgba(255,42,35,.14), transparent 62%);
  filter: blur(6px);
  opacity: .95;
  pointer-events: none;
  z-index: 0;
}

/* Keep the actual fields above the glow */
.pin-glow > *{
  position: relative;
  z-index: 1;
}
/* ========================================
   Red glow behind ENTIRE login card
   ======================================== */

.auth-card--pin-glow{
  position: relative;
  overflow: hidden;
}

/* glow layer */
.auth-card--pin-glow::before{
  content:"";
  position:absolute;
  inset:-80px;
  background:
    radial-gradient(700px 260px at 50% 15%, rgba(225,6,0,.22), transparent 60%),
    radial-gradient(520px 240px at 50% 65%, rgba(255,42,35,.16), transparent 65%);
  filter: blur(10px);
  opacity:.95;
  pointer-events:none;
  z-index:0;
}

/* keep card content above glow */
.auth-card--pin-glow > *{
  position: relative;
  z-index: 1;
}
/* Highlight "Next race" with F1 red border */
.race-card.is-next{
  border:1px solid rgba(225,6,0,.85);
  box-shadow:
    0 18px 60px rgba(0,0,0,.45),
    0 0 0 1px rgba(225,6,0,.35),
    0 0 28px rgba(225,6,0,.18);
}

/* Optional: slightly brighter border when expanded */
.race-card.is-next[data-open="true"]{
  border-color: rgba(225,6,0,.95);
  box-shadow:
    0 18px 60px rgba(0,0,0,.45),
    0 0 0 1px rgba(225,6,0,.45),
    0 0 34px rgba(225,6,0,.22);
}
.pin-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.pin-gear{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  color:var(--text);
  cursor:pointer;
}
.pin-gear:hover{ background:rgba(255,255,255,.06); }
.pin-gear svg{ width:18px; height:18px; fill:currentColor; opacity:.9; }

.settings-dialog{
  width:min(680px, calc(100vw - 28px));
  border:none;
  border-radius:18px;
  padding:0;
  background:var(--card);
  color:var(--text);
  box-shadow:var(--shadow);
}
.settings-dialog::backdrop{
  background:rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
}

.settings-dialog__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 16px 12px;
  border-bottom:1px solid var(--border);
}

.settings-body{ padding:14px 16px 16px; }

.settings-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.settings-label{ font-weight:850; letter-spacing:.2px; }
.settings-help{ margin-top:4px; font-size:13px; color:var(--muted); }

.settings-row__right{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.settings-select{
  min-width:240px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  outline:none;
  line-height:1.2;
}

.settings-select:focus{
  border-color: rgba(225,6,0,.55);
  box-shadow: 0 0 0 3px rgba(225,6,0,.18);
}
.settings-select option{
  background:#0b1020;   /* your --card */
  color:#e8eefc;        /* your --text */
}
/* =========================
   Flat broadcast status tags
   ========================= */

.tips-status{
  display:inline-flex;
  align-items:center;
  height:26px;
  padding:0 10px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,.18);
  background:transparent;
  font-size:12px;
  font-weight:800;
  letter-spacing:.35px;
  color:rgba(255,255,255,.85);
}

/* Default tips — subtle neutral */
.tips-status.default{
  border-color:rgba(255,255,255,.22);
  color:rgba(255,255,255,.88);
}

/* Open — light green accent but NOT bubble */
.tips-status.open{
  border-color:rgba(34,197,94,.45);
  color:rgba(34,197,94,.95);
}

/* Locked */
.tips-status.locked{
  border-color:rgba(225,6,0,.45);
  color:rgba(255,255,255,.85);
}

/* Manual tips */
.tips-status.saved{
  border-color:rgba(34,197,94,.45);
  color:rgba(34,197,94,.95);
}
/* Center the stats labels + values */
.pin-stats{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pin-stats .stat{
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;   /* centers value horizontally */
  justify-content:center;
}

.pin-stats .stat-label{
  width:100%;
  text-align:center;
}

.pin-stats .stat-value{
  width:100%;
  text-align:center;
}
/* Header: keep everything on the left now */
.admin-card-head{
  justify-content:flex-start; /* instead of space-between */
}

/* Auto-accept styling inside the title row */
.auto-accept-form{ display:inline; }

.auto-accept-label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  margin-left:8px; /* spacing after the count pills */
}

.auto-accept-text{
  font-size:13px;
  color:var(--muted);
}
.auto-accept-form{
  display:inline-flex;
  align-items:center;
}

.auto-accept-label{
  display:inline-flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
  white-space:nowrap;        /* 🔥 keeps text + checkbox together */
}
.section-title{
  margin:18px 0 10px;
  font-size:13px;
  font-weight:900;
  letter-spacing:.35px;
  text-transform:uppercase;
  color:var(--muted);
}