/* Admin console: clean light theme with brand accents. Colours, fonts, radii and motion come from tokens.css. */
@import url('/shared/tokens.css');

:root {
  --a-bg: #F4F6F9;
  --a-card: #FFFFFF;
  --a-line: #E3E7EE;
  --a-line-2: #D3D9E3;
  --a-text: #0E1A33;
  --a-text-2: #4A5672;      /* 7.4:1 on white */
  --a-text-3: #66718A;      /* 4.9:1 on white */
  --a-blue: var(--michelin-blue);
  --a-blue-soft: #EAF0FA;
  --a-navy: var(--michelin-dark-blue);
  --a-ok: #157A44;  --a-ok-soft: #E7F5EE;
  --a-bad: var(--porsche-red); --a-bad-soft: #FBECEC;
  --a-warn: #8A5A00; --a-warn-soft: #FFF6DB; --a-warn-line: #F1D58A;
  --a-gold: #8C6516; --a-gold-soft: #FBF3E1;   /* gold as text on white needs a darker shade for AA */
  --a-shadow: 0 1px 2px rgba(14, 26, 51, .06), 0 8px 24px -12px rgba(14, 26, 51, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--a-bg); color: var(--a-text); font-family: var(--font-body); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; color: var(--a-text); }
a { color: var(--a-blue); }
code { font-size: 12.5px; background: #EEF1F6; padding: 1px 6px; border-radius: 6px; }
.num, td, .v { font-variant-numeric: tabular-nums; }
.muted { color: var(--a-text-3); }
[hidden] { display: none !important; }
.ic { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.14em; }
:focus-visible { outline: 3px solid var(--michelin-yellow); outline-offset: 2px; box-shadow: 0 0 0 5px var(--a-navy); border-radius: 6px; }

/* ---------- buttons ---------- */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--a-line-2); background: #fff; color: var(--a-text);
  font: 600 14px/1 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--d-2) var(--ease-out), border-color var(--d-2) var(--ease-out), transform var(--d-1) var(--ease-out);
}
.btn:hover { background: #F6F8FB; border-color: #C3CBD8; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--a-blue); border-color: var(--a-blue); color: #fff; }
.btn.primary:hover { background: #1F4486; }
.btn.cta { background: var(--michelin-yellow); border-color: var(--michelin-yellow); color: var(--michelin-midnight); }
.btn.danger { color: var(--a-bad); border-color: #EBC4C3; }
.btn.danger:hover { background: var(--a-bad-soft); }
.btn.danger.solid { background: var(--a-bad); border-color: var(--a-bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--a-text-2); }
.btn.ghost:hover { background: #EDF0F5; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; height: 44px; }
.btn.on-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .22); }
.btn.on-dark:hover { background: rgba(255, 255, 255, .08); }
.btn .ic { font-size: 16px; }
.btn.icon { width: 32px; padding: 0; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(70% 60% at 30% 0%, rgba(39, 80, 155, .55), transparent 70%), linear-gradient(180deg, var(--michelin-dark-blue), var(--michelin-midnight)); }
.login-card { width: min(100%, 380px); padding: 40px 32px 32px; border-radius: var(--r-lg); background: #fff; box-shadow: 0 30px 60px -30px rgba(0, 6, 26, .6); text-align: center; }
.login-card h1 { margin: 16px 0 4px; font-size: 26px; }
.login-card p { margin: 0 0 24px; color: var(--a-text-3); }
.login-card .l { text-align: left; }
.login-card input { width: 100%; margin-bottom: 12px; }
.err { color: var(--a-bad); background: var(--a-bad-soft); border: 1px solid #EBC4C3; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; text-align: left; white-space: pre-line; font-size: 13.5px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; height: 60px; padding: 0 24px; background: var(--a-navy); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand b { font-family: var(--font-display); font-size: 16px; }
.brand .tag { font-size: 12px; color: rgba(255, 255, 255, .7); padding: 2px 8px; border-radius: 99px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.tabs { display: flex; gap: 4px; flex: 1; height: 100%; overflow-x: auto; }
.tabs a { position: relative; display: flex; align-items: center; padding: 0 14px; color: rgba(255, 255, 255, .78); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.tabs a:hover { color: #fff; }
.tabs a.on { color: #fff; }
.tabs a.on::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--michelin-yellow); }
.top-actions { display: flex; gap: 8px; }
.banner { padding: 10px 24px; font-size: 13.5px; display: flex; gap: 10px; align-items: center; }
.banner.warn { background: var(--a-warn-soft); color: var(--a-warn); border-bottom: 1px solid var(--a-warn-line); }

/* ---------- layout ---------- */
.view { max-width: 1320px; margin: 0 auto; padding: 32px 24px 64px; animation: view-in var(--d-3) var(--ease-out); }
@keyframes view-in { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: none; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h2 { margin: 0 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.page-head p { margin: 0; color: var(--a-text-3); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card { background: var(--a-card); border: 1px solid var(--a-line); border-radius: var(--r-md); box-shadow: var(--a-shadow); }
.card-pad { padding: 20px 24px; }
.card h3 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px 12px; }
.card-head h3 { margin: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
.divider { border: 0; border-top: 1px solid var(--a-line); margin: 20px 0; }

/* ---------- notices / states ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.notice .ic { font-size: 18px; margin-top: 1px; }
.notice.warn { background: var(--a-warn-soft); border-color: var(--a-warn-line); color: #5E3E00; }
.notice.warn .ic { color: var(--a-warn); }
.notice.bad { background: var(--a-bad-soft); border-color: #EBC4C3; color: #6B1715; }
.notice.ok { background: var(--a-ok-soft); border-color: #BFE3CE; color: #0F4F2D; }
.notice.info { background: var(--a-blue-soft); border-color: #CCD9F0; color: #173566; }
.notice b { font-weight: 700; }
.notice .grow { flex: 1; }
.state { display: grid; place-items: center; gap: 10px; padding: 56px 24px; text-align: center; color: var(--a-text-3); }
.state .ic { font-size: 28px; color: #9AA4B8; }
.state b { color: var(--a-text); font-size: 15px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--a-line-2); border-top-color: var(--a-blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { height: 14px; border-radius: 7px; background: #EDF0F5; }

/* ---------- stats ---------- */
.grid-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { padding: 18px 20px; }
.stat .k { font-size: 12.5px; font-weight: 600; color: var(--a-text-3); text-transform: uppercase; letter-spacing: .06em; }
.stat .v { font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: -0.02em; margin: 6px 0 2px; line-height: 1.1; }
.stat .v small { font-size: 15px; color: var(--a-text-3); font-weight: 600; }
.stat .s { font-size: 13px; color: var(--a-text-3); }
.stat.hero { background: linear-gradient(160deg, var(--a-navy), var(--michelin-midnight)); border-color: transparent; color: #fff; }
.stat.hero .k { color: rgba(255, 255, 255, .72); }
.stat.hero .v { color: #fff; }
.stat.hero .s { color: rgba(255, 255, 255, .72); }
.stat.hero .live { display: inline-flex; align-items: center; gap: 6px; }
.stat.hero .live i { width: 8px; height: 8px; border-radius: 50%; background: var(--michelin-yellow); }

/* ---------- tables ---------- */
.table-wrap { overflow: auto; max-height: 70vh; border-radius: 0 0 var(--r-md) var(--r-md); }
.card > .table-wrap:only-child { border-radius: var(--r-md); }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
thead th { position: sticky; top: 0; z-index: 1; background: #F7F9FC; text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--a-text-3); padding: 10px 14px; border-bottom: 1px solid var(--a-line); white-space: nowrap; }
tbody td { padding: 11px 14px; border-bottom: 1px solid #EEF1F5; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FAFBFD; }
td.r, th.r { text-align: right; }
.empty-row { text-align: center; color: var(--a-text-3); padding: 40px 16px !important; }
.pts-cell { white-space: nowrap; }
.pts-cell b { font-family: var(--font-display); font-weight: 800; font-size: 14.5px; }
.pts-cell span { color: var(--a-text-3); }
.pts-bar { display: block; width: 96px; height: 3px; border-radius: 2px; background: #E7EBF1; margin-top: 5px; overflow: hidden; }
.pts-bar i { display: block; height: 100%; background: var(--a-blue); }
.rank-b { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; font-weight: 700; font-size: 12.5px; background: #EEF1F6; color: var(--a-text-2); }
.rank-b.win { background: var(--porsche-gold-bright); color: var(--michelin-midnight); }
.place-b { display: inline-grid; place-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-weight: 700; font-size: 12.5px; background: var(--a-gold-soft); color: var(--a-gold); border: 1px solid #EBD7A8; }
.place-b.p1 { background: var(--porsche-gold-bright); color: var(--michelin-midnight); border-color: transparent; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 600; background: #EEF1F6; color: var(--a-text-2); white-space: nowrap; }
.pill.blue { background: var(--a-blue-soft); color: #1D3F7C; }
.pill.gold { background: var(--a-gold-soft); color: var(--a-gold); }
.pill.ok { background: var(--a-ok-soft); color: var(--a-ok); }
.pill.bad { background: var(--a-bad-soft); color: var(--a-bad); }
.pill.hard { background: #FBEDE4; color: #8A3A12; }
.pill.pts { background: var(--michelin-midnight); color: #fff; font-variant-numeric: tabular-nums; }

/* ---------- winners (dashboard) ---------- */
.winner-card { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #EEF1F5; }
.winner-card:last-of-type { border-bottom: 0; }
.winner-card .who { flex: 1; min-width: 0; }
.winner-card .who b { display: block; }
.winner-card .who span { font-size: 12.5px; color: var(--a-text-3); }
.link-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--a-line); margin-top: 8px; font-size: 13px; }
.link-row .ic { color: var(--a-text-3); font-size: 16px; }
.link-row a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; text-decoration: none; }
.link-row .note { font-size: 12px; color: var(--a-warn); }

/* ---------- questions ---------- */
.bank-bar { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 14px 20px; margin-bottom: 16px; }
.bank-bar .kv { display: flex; align-items: baseline; gap: 6px; color: var(--a-text-3); font-size: 13px; }
.bank-bar .kv b { color: var(--a-text); font-family: var(--font-display); font-size: 16px; font-weight: 800; }
.bank-bar .grow { flex: 1; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.q-list { display: grid; gap: 10px; }
.q-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 16px; padding: 16px 20px; align-items: start; }
.q-item.off { opacity: .55; }
.q-num { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--a-text-3); padding-top: 2px; }
.q-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.q-text { font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.q-opts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--a-text-2); }
.q-opts .ok { color: var(--a-ok); font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.q-acts { display: flex; align-items: center; gap: 8px; }
.check-result { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 4px; }
.check-result div { padding: 12px 14px; border-radius: 12px; background: #F7F9FC; border: 1px solid var(--a-line); }
.check-result b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.check-result span { font-size: 12px; color: var(--a-text-3); }
.dist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--a-text-2); }

/* ---------- forms ---------- */
input[type=text], input[type=password], input[type=number], input[type=search], input[type=datetime-local], select, textarea {
  height: 40px; padding: 0 12px; border: 1px solid var(--a-line-2); border-radius: 10px; background: #fff; color: var(--a-text);
  font: 400 14px/1.4 var(--font-body); transition: border-color var(--d-2) var(--ease-out), box-shadow var(--d-2) var(--ease-out);
}
textarea { height: auto; padding: 10px 12px; width: 100%; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--a-blue); box-shadow: 0 0 0 3px rgba(39, 80, 155, .18); }
input[type=color] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--a-line-2); border-radius: 8px; background: #fff; }
input[type=file] { font-size: 13px; }
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f input, .f select { width: 100%; }
.f.inline { flex-direction: row; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid #EEF1F5; }
.f.inline b { font-weight: 600; }
.l { font-weight: 600; font-size: 13px; color: var(--a-text-2); }
.h { font-size: 12.5px; color: var(--a-text-3); }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px 20px; margin-bottom: 8px; }
.fgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-all { grid-column: 1 / -1; }
.color-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .tr { position: relative; width: 40px; height: 24px; border-radius: 12px; background: #CBD2DE; flex: none; transition: background-color var(--d-2) var(--ease-out); }
.switch .tr::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform var(--d-2) var(--ease-out); }
.switch input:checked + .tr { background: var(--a-blue); }
.switch input:checked + .tr::after { transform: translateX(16px); }
.switch input:focus-visible + .tr { outline: 3px solid var(--michelin-yellow); outline-offset: 2px; }
.switch input:disabled + .tr { opacity: .5; }
.open-switch b { font-weight: 700; }
.open-switch.on b { color: var(--a-ok); }
.open-switch.off b { color: var(--a-bad); }
.radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--a-text-2); white-space: nowrap; }
.opt-row { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.opt-row b { color: var(--a-text-3); }
.drop { padding: 16px; border: 1.5px dashed var(--a-line-2); border-radius: 12px; margin-bottom: 10px; background: #FAFBFD; }

/* ---------- settings ---------- */
.settings { display: grid; gap: 20px; max-width: 980px; }
.set-sec h3 { margin: 0 0 2px; font-size: 17px; }
.set-sec > p { margin: 0 0 18px; color: var(--a-text-3); }
.logo-prev { width: 120px; height: 64px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(160deg, var(--a-navy), var(--michelin-midnight)); overflow: hidden; color: rgba(255, 255, 255, .7); font-size: 12px; }
.logo-prev img { max-width: 90%; max-height: 80%; object-fit: contain; }
.prize-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.prize-edit { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--a-line); border-radius: 14px; }
.prize-prev { aspect-ratio: 1; border-radius: 10px; background: #fff; border: 1px solid var(--a-line); display: grid; place-items: center; overflow: hidden; }
.prize-prev img { width: 85%; height: 85%; object-fit: contain; }
.save-bar { position: sticky; bottom: 16px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px 12px 20px; border-radius: 14px; background: var(--a-navy); color: #fff; box-shadow: 0 16px 40px -16px rgba(0, 12, 52, .6); }
.save-bar span { color: rgba(255, 255, 255, .78); font-size: 13.5px; }
.danger-zone { border-color: #EBC4C3; }
.band-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 4px 0 14px; }
.band-list div { padding: 10px 12px; border-radius: 10px; background: #F7F9FC; border: 1px solid var(--a-line); font-size: 12.5px; }
.band-list b { display: block; font-size: 13px; color: var(--a-text); }

/* ---------- winners page ---------- */
.round-list { display: grid; gap: 16px; }
.round-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--a-line); flex-wrap: wrap; }
.round-head .t { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.round-head .t b { font-family: var(--font-display); font-size: 16px; }
.round-empty { margin: 0; padding: 16px 20px; color: var(--a-text-3); }

/* ---------- modal + toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(0, 12, 52, .48); animation: fade var(--d-2) var(--ease-out); }
.modal { width: min(100%, 640px); max-height: calc(100vh - 48px); overflow: auto; padding: 24px; border-radius: var(--r-md); background: #fff; box-shadow: 0 30px 80px -20px rgba(0, 12, 52, .5); animation: pop var(--d-3) var(--ease-out); }
.modal h3 { margin: 0 0 12px; font-size: 19px; }
.modal p { color: var(--a-text-2); }
.m-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translate3d(0, 8px, 0) scale(.98); } }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px; background: var(--michelin-midnight); color: #fff; font-weight: 500; box-shadow: 0 16px 40px -16px rgba(0, 12, 52, .6); animation: toast-in var(--d-3) var(--ease-out); }
.toast .ic { color: #57D08F; font-size: 18px; }
.toast.bad { background: var(--a-bad); }
.toast.bad .ic { color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

@media (max-width: 1100px) {
  .two-col { grid-template-columns: 1fr; }
  .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .tabs { order: 3; flex-basis: 100%; height: 40px; }
  .band-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-stats, .prize-grid, .fgrid.three, .check-result { grid-template-columns: 1fr; }
  .view { padding: 20px 14px 48px; }
  .q-item { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .view, .modal, .toast, .modal-bg { animation: none; }
}

/* inputs that must keep their intrinsic width inside .f */
.f input[type=color] { width: 44px; flex: none; }
.f .color-row input[type=number] { flex: none; }
input[type=file] { color: var(--a-text-3); max-width: 100%; }
input[type=file]::file-selector-button {
  height: 32px; margin-right: 10px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--a-line-2); background: #fff; color: var(--a-text);
  font: 600 13px/1 var(--font-body); cursor: pointer;
}
input[type=file]::file-selector-button:hover { background: #F6F8FB; }

/* ==========================================================================
   v2 shell: left sidebar (Midnight Blue) + content. No logos or brand marks.
   ========================================================================== */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px; padding: 28px 16px 20px; background: var(--michelin-midnight); color: #fff; }
.side-brand { display: flex; flex-direction: column; gap: 4px; padding: 0 12px; }
.side-brand b { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; line-height: 1.15; }
.side-eyebrow { font-family: var(--font-display); font-weight: 600; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--porsche-gold-bright); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 10px; color: rgba(255, 255, 255, .74); text-decoration: none; font-weight: 600; font-size: 14.5px; transition: background-color var(--d-2) var(--ease-out), color var(--d-2) var(--ease-out); }
.side-nav a .ic { font-size: 19px; }
.side-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav a.on { background: rgba(39, 80, 155, .55); color: #fff; }
.side-nav a.on::before { content: ''; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--michelin-yellow); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); }
.side-foot .side-eyebrow { padding: 0 12px 6px; color: rgba(255, 255, 255, .56); }
.side-link { appearance: none; border: 0; background: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; color: rgba(255, 255, 255, .74); font: 500 14px/1 var(--font-body); text-decoration: none; text-align: left; }
.side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-link .ic { font-size: 15px; opacity: .7; }
.main { min-width: 0; }
.view { max-width: 1240px; padding: 36px 40px 72px; }
.login-eyebrow { font-family: var(--font-display); font-weight: 600; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--a-gold); }
.login-card h1 { margin-top: 10px; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }

/* dashboard */
.stat { padding: 20px 22px; }
.stat .v { font-size: 34px; }
.stat.hero .v { font-size: 40px; letter-spacing: -0.01em; }
.slots { display: grid; gap: 8px; }
.slots .winner-card { margin: 0; }
.winner-card.open { background: #F7F9FC; border-style: dashed; }
.winner-card.open .who b { color: var(--a-text-2); font-weight: 600; }
.settings { max-width: 980px; }
.save-bar { position: sticky; bottom: 16px; z-index: 5; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; }
  .side-nav { flex-direction: row; flex-wrap: wrap; flex: 1; }
  .side-nav a.on::before { display: none; }
  .side-foot { margin: 0; padding: 0; border: 0; flex-direction: row; }
  .side-foot .side-eyebrow { display: none; }
  .view { padding: 20px 16px 56px; }
}
.slots .winner-card { padding: 12px 14px; border: 1px solid var(--a-line); border-radius: 12px; }
.slots .winner-card.open { border-style: dashed; border-color: var(--a-line-2); }
td.nw { white-space: nowrap; }
td.contact small { display: block; font-size: 12px; color: var(--a-text-3); }
.login-card .l { display: block; margin-bottom: 6px; }
.two-col { grid-template-columns: minmax(0, 1fr) 360px; }
td.num, td b { white-space: nowrap; }
tbody td, thead th { padding-left: 12px; padding-right: 12px; }
.table-wrap { max-height: calc(100vh - 190px); }

/* winners page: 1st / 2nd / 3rd tiles per round */
.slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 4px 24px 24px; }
.slot-tile { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--a-line); border-radius: 14px; background: #fff; min-width: 0; }
.slot-tile.p1 { border-color: #E6CD92; background: linear-gradient(180deg, var(--a-gold-soft), #fff 70%); }
.slot-tile.open { border-style: dashed; border-color: var(--a-line-2); background: #F7F9FC; }
.slot-tile .st-top { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.slot-tile .st-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; line-height: 1.2; }
.slot-tile.open .st-name { color: var(--a-text-2); font-weight: 700; }
.slot-tile .st-pts { font-size: 15px; }
.slot-tile .st-meta { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--a-text-3); min-width: 0; max-width: 100%; }
.slot-tile .st-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-tile .btn { margin-top: 6px; }
@media (max-width: 1100px) { .slot-grid { grid-template-columns: 1fr; } }
