:root {
  color-scheme: dark;
  --bg: #070d17;
  --panel: #101d30;
  --panel-2: #14243a;
  --line: rgba(255,255,255,.13);
  --text: #f7f9fc;
  --muted: #a9b6c9;
  --red: #e22735;
  --red-bright: #ff3b49;
  --cyan: #19c9f4;
  --yellow: #ffd83d;
  --green: #39d98a;
  --radius: 20px;
  --shadow: 0 24px 70px rgba(0,0,0,.36);
  --tv-margin-top: 0px;
  --tv-margin-bottom: 0px;
  --tv-margin-left: 0px;
  --tv-margin-right: 0px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }

.portal-body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 86% 5%, rgba(226,39,53,.13), transparent 28rem),
    radial-gradient(circle at 10% 46%, rgba(25,201,244,.07), transparent 32rem),
    var(--bg);
}

.portal-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 76px;
  padding: .9rem max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(7,13,23,.9);
  backdrop-filter: blur(18px);
}

.portal-brand { display: inline-flex; align-items: center; }
.portal-brand img { display: block; width: min(230px, 52vw); height: auto; }
.portal-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 1rem; color: var(--muted); font-size: .82rem; font-weight: 800; }
.portal-nav a { text-decoration: none; }
.portal-nav a:hover, .portal-nav a:focus-visible { color: #fff; }
.portal-nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-color: var(--cyan); text-decoration-thickness: 2px; text-underline-offset: .45rem; }

.portal-main { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 3.5rem 0 7rem; }
.portal-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.portal-hero.compact-hero { align-items: center; }
.portal-hero h1, .auth-card h1 { margin: 0; font-size: clamp(2.4rem, 6vw, 5rem); line-height: .98; letter-spacing: -.055em; }
.compact-hero h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.portal-eyebrow { margin: 0 0 .65rem; color: var(--cyan); font-size: .72rem; font-weight: 950; letter-spacing: .16em; }
.portal-lead { max-width: 720px; color: #c2ccda; font-size: 1.06rem; }

.access-card {
  display: grid;
  gap: .45rem;
  min-width: 260px;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.access-card.active { border-color: rgba(57,217,138,.5); }
.access-card.inactive { border-color: rgba(255,59,73,.55); }
.access-card small, .account-card p, .request-card p { color: var(--muted); }

.status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .36rem .62rem;
  border-radius: 999px;
  color: #fff;
  background: #4b5769;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.status-badge.active { color: #062515; background: var(--green); }
.status-badge.inactive { background: var(--red); }

.portal-alert {
  margin: 1rem 0;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(57,217,138,.38);
  border-radius: 13px;
  color: #caffdf;
  background: rgba(57,217,138,.1);
  font-weight: 750;
}
.portal-alert.error { border-color: rgba(255,59,73,.5); color: #ffd2d6; background: rgba(255,59,73,.1); }

.portal-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1.2rem; align-items: start; }
.portal-card, .account-card, .request-card, .activation-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(20,36,58,.96), rgba(10,20,34,.96));
  box-shadow: 0 20px 55px rgba(0,0,0,.2);
}
.portal-card { padding: clamp(1.3rem, 3vw, 2rem); }
.portal-card h2, .admin-section h2, .activation-box h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.3rem); letter-spacing: -.035em; }
.centered-card { max-width: 720px; margin: 4rem auto 0; text-align: center; }
.centered-card .portal-eyebrow, .centered-card .portal-button { margin-inline: auto; }
.centered-card p:not(.portal-eyebrow) { color: var(--muted); }

.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.event-list, .account-list, .request-list { display: grid; gap: .8rem; }
.event-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(0,0,0,.14); }
.event-row strong, .event-row span { display: block; }
.event-row span { margin-top: .2rem; color: var(--muted); font-size: .82rem; }
.empty-state { padding: 1.2rem; border: 1px dashed rgba(255,255,255,.15); border-radius: 14px; color: var(--muted); text-align: center; }

.portal-form { display: grid; gap: .9rem; }
.portal-form label { display: grid; gap: .38rem; color: #dbe3ee; font-size: .78rem; font-weight: 850; }
.portal-form input, .portal-form select, .activation-box input, .request-status-form select {
  width: 100%;
  min-height: 45px;
  padding: .7rem .8rem;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  color: #fff;
  background: #081220;
}
.portal-form input:focus-visible, .portal-form select:focus-visible, .activation-box input:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.form-grid-2 .wide-field { grid-column: 1 / -1; }

.portal-button, #wp-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 46px;
  padding: .75rem 1.05rem;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--red-bright), #a80f1d);
  box-shadow: 0 12px 28px rgba(226,39,53,.22);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.portal-button.secondary { border: 1px solid var(--line); background: rgba(255,255,255,.05); box-shadow: none; }
.portal-button.small { min-height: 38px; padding: .55rem .8rem; font-size: .76rem; }
.text-button { padding: .2rem; border: 0; color: var(--muted); background: transparent; font-size: .76rem; font-weight: 850; text-decoration: underline; cursor: pointer; }
.text-button:hover { color: #fff; }

.module-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-top: 1.2rem; }
.module-grid article { display: grid; grid-template-columns: auto 1fr; gap: .7rem 1rem; padding: 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.module-grid article > span { color: var(--red-bright); font-family: "Segoe UI Symbol", sans-serif; font-variant-emoji: text; font-size: 1.8rem; }
.module-grid strong { display: block; }
.module-grid p { margin: .15rem 0 0; color: var(--muted); font-size: .82rem; }
.module-grid b { grid-column: 2; color: var(--cyan); font-size: .68rem; text-transform: uppercase; }

.admin-section { margin-top: 3rem; }
.admin-create-form { grid-template-columns: repeat(4,minmax(0,1fr)); margin-top: 1.3rem; }
.admin-create-form .portal-button { align-self: end; width: 100%; }
.account-card, .request-card { padding: 1.2rem; }
.account-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.account-card h3, .request-card h3 { margin: 0; font-size: 1.25rem; }
.account-card p, .request-card p { margin: .25rem 0 0; }
.account-form { grid-template-columns: repeat(6,minmax(0,1fr)); align-items: end; margin-top: 1rem; }
.account-form .account-meta { grid-column: 1 / -2; align-self: center; color: var(--muted); font-size: .78rem; }
.account-form .portal-button { width: 100%; }
.inline-action { margin-top: .6rem; text-align: right; }

.activation-box { display: grid; grid-template-columns: .7fr 1.3fr; gap: 1rem; align-items: center; margin: 1rem 0; padding: 1.2rem; border-color: rgba(255,216,61,.52); }
.activation-box p:not(.portal-eyebrow) { margin-bottom: 0; color: var(--muted); }
.request-card { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; }
.request-id { color: var(--cyan); font-size: .68rem; font-weight: 900; }
.request-status-form { display: flex; align-items: center; gap: .5rem; }
.request-status-form select { min-width: 130px; }

.auth-page { display: grid; place-items: center; padding: 2rem; }
.auth-shell { width: min(500px, 100%); }
.auth-shell > .portal-brand { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.auth-card { padding: clamp(1.5rem,5vw,2.4rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.auth-card h1 { font-size: clamp(2.2rem,8vw,3.8rem); }
.auth-card #loginform { display: grid; gap: .9rem; margin-top: 1.5rem; }
.auth-card #loginform p { margin: 0; }
.auth-card #loginform label { display: grid; gap: .38rem; color: #dbe3ee; font-size: .8rem; font-weight: 850; }
.auth-card #loginform input[type="text"], .auth-card #loginform input[type="password"] { width: 100%; min-height: 48px; padding: .75rem .85rem; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; color: #fff; background: #081220; }
.auth-card .login-remember label { display: flex !important; grid-auto-flow: column; justify-content: start; align-items: center; }
.auth-card .login-remember input { width: 18px; height: 18px; accent-color: var(--red); }
.auth-card #wp-submit { width: 100%; }
.auth-help, .auth-back { color: var(--muted); text-align: center; font-size: .82rem; }
.auth-back { margin-top: 1rem; }
.auth-shell:has(.auth-rider-choice) { width:min(650px,100%); }
.auth-page *, .auth-page *::before, .auth-page *::after { box-sizing:border-box; }
.auth-rider-choice { margin-bottom:1rem; border-color:rgba(255,220,68,.34); background:radial-gradient(circle at 100% 0,rgba(255,211,36,.12),transparent 45%),var(--panel); }
.auth-rider-choice h1 { font-size:clamp(2rem,7vw,3.4rem); }
.auth-rider-scan { display:flex; width:100%; margin-top:1.25rem; gap:.65rem; box-shadow:0 0 26px rgba(255,212,0,.35); }
.auth-rider-scan span { font-size:1.45rem; }
.auth-rider-password { display:block; margin-top:1rem; color:#d5d9df; text-align:center; font-size:.82rem; font-weight:800; }
.auth-organizer-card h1 { font-size:clamp(1.8rem,6vw,2.8rem); }
@media(max-width:520px){.auth-page{padding:1rem}.auth-card{padding:1.35rem}.auth-rider-choice h1{font-size:2.25rem;overflow-wrap:anywhere}.auth-rider-scan{padding-inline:.85rem;white-space:normal;text-align:center}.auth-rider-password{overflow-wrap:anywhere}.auth-shell>.portal-brand img{max-width:78vw;height:auto}}

/* Trackdays organizer workspace */
.wide-main { width: min(1460px, calc(100% - 40px)); }
.section-tabs {
  position: sticky;
  z-index: 10;
  top: 76px;
  display: flex;
  gap: .55rem;
  margin: 1rem 0 1.4rem;
  padding: .7rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7,13,23,.94);
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  backdrop-filter: blur(14px);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.28) transparent;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.section-tabs a {
  --tab-bg: #26364d;
  --tab-hover: #334765;
  --tab-glow: rgba(255,255,255,.16);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .62rem .9rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  color: #fff;
  background: var(--tab-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  font-size: .76rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.section-tabs .section-tab-configuration { --tab-bg: #0b5f8a; --tab-hover: #087bac; --tab-glow: rgba(25,201,244,.38); }
.section-tabs .section-tab-participants { --tab-bg: #16633f; --tab-hover: #1c7d50; --tab-glow: rgba(57,217,138,.34); }
.section-tabs .section-tab-groupes { --tab-bg: #633c9f; --tab-hover: #7a4fc1; --tab-glow: rgba(151,98,232,.38); }
.section-tabs .section-tab-sessions { --tab-bg: #8a4b08; --tab-hover: #a45b0d; --tab-glow: rgba(255,168,56,.36); }
.section-tabs .section-tab-chronometrage { --tab-bg: #9b2335; --tab-hover: #c52c43; --tab-glow: rgba(255,70,92,.4); }
.section-tabs .section-tab-connexions { --tab-bg: #8a3156; --tab-hover: #a63c67; --tab-glow: rgba(255,91,151,.34); }
.section-tabs a:hover { color: #fff; background: var(--tab-hover); box-shadow: 0 0 18px var(--tab-glow); transform: translateY(-1px); }
.section-tabs a:focus-visible { color: #fff; background: var(--tab-hover); outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 18px var(--tab-glow); }
.section-tabs a[aria-current="page"] { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.88), 0 0 20px var(--tab-glow); }
.section-card { margin-top: 1.2rem; scroll-margin-top: 150px; }
.section-card h3 { margin: 0 0 .8rem; font-size: 1.05rem; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; align-items: end; }
.compact-form { align-content: start; padding: 1rem; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(0,0,0,.14); }
.split-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.inline-form { grid-template-columns: minmax(150px,.35fr) minmax(180px,.5fr) auto; align-items: end; margin-top: 1rem; }
.portal-form textarea, .copy-row input, .integration-grid input, .connection-account-card input, .activation-card input, .session-list input, .session-list select {
  width: 100%; min-height: 43px; padding: .7rem .8rem; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; color: #fff; background: #081220;
}
.portal-form textarea { min-height: 150px; resize: vertical; }
.portal-form input[type="file"] { padding: .55rem; }
.portal-form input[type="checkbox"], .scope-grid input[type="checkbox"], .check-label input[type="checkbox"] { width: 18px; min-height: 18px; accent-color: var(--red-bright); }
.check-label { display: flex !important; flex-direction: row; align-items: center; align-self: center; padding-top: 1.4rem; }
.event-config-form { display: grid; gap: 1rem; }
.event-main-fields { align-items: start; }
.event-config-options { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(360px,1.2fr); gap: 1rem; align-items: stretch; }
.event-option-stack { display: grid; align-content: center; gap: .75rem; min-width: 0; margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.16); }
.event-option-stack legend { padding: 0 .35rem; color: var(--cyan); font-size: .72rem; font-weight: 950; letter-spacing: .065em; text-transform: uppercase; }
.event-option-stack .check-label, .event-tv-logo-upload .check-label { align-self: auto; padding-top: 0; }
.distribution-check-options { display:grid; gap:.5rem; margin-top:.15rem; padding-top:.8rem; border-top:1px solid var(--line); }
.distribution-check-options>strong { color:#d9dee7; font-size:.76rem; letter-spacing:.05em; text-transform:uppercase; }
.distribution-check-options>div { display:flex; align-items:center; flex-wrap:wrap; gap:.45rem 1rem; }
.distribution-check-options .check-label { display:inline-flex; align-items:center; gap:.38rem; font-size:.82rem; white-space:nowrap; }
.distribution-check-options .distribution-return-option { margin-top:.1rem; padding-top:.55rem; border-top:1px dashed rgba(255,255,255,.12); white-space:normal; }
.event-tv-logo-upload { display: grid; grid-template-columns: minmax(180px,.7fr) minmax(220px,1fr); gap: .8rem 1rem; align-items: center; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.16); }
.event-tv-logo-upload > div:first-child strong, .event-tv-logo-upload > div:first-child span { display: block; }
.event-tv-logo-upload > div:first-child span { margin-top: .3rem; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.event-tv-logo-preview { grid-row: span 2; display: grid; place-items: center; min-height: 105px; padding: .75rem; overflow: hidden; border: 1px dashed rgba(255,255,255,.2); border-radius: 12px; color: var(--muted); background: rgba(255,255,255,.04); text-align: center; }
.event-tv-logo-preview img { display: block; width: 100%; max-width: 260px; max-height: 100px; object-fit: contain; }
.event-tv-logo-upload label { min-width: 0; }
.event-status-help { margin: 0; }
.form-help { margin: .4rem 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.count-chip, .number-chip { display: inline-flex; align-items: center; width: fit-content; padding: .34rem .6rem; border: 1px solid rgba(25,201,244,.28); border-radius: 999px; color: #bcefff; background: rgba(25,201,244,.08); font-size: .7rem; font-weight: 900; }
.number-chip { min-width: 40px; justify-content: center; color: #07111d; border: 0; background: var(--yellow); }
.event-row-rich .status-badge { margin-bottom: .5rem; }
.event-actions { display: flex; align-items: center; gap: .7rem; }
.participant-table-wrap {
  width: 100%; max-height: 72vh; margin-top: 1rem; overflow: auto; border: 1px solid rgba(255,255,255,.11); border-radius: 14px; background: rgba(2,9,18,.34); scrollbar-gutter: stable; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
}
.participant-table-wrap:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.participant-table { width: 100%; min-width: 1302px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.participant-table th, .participant-table td { height: 48px; padding: 5px 7px; vertical-align: middle; white-space: nowrap; border-bottom: 1px solid rgba(255,255,255,.07); }
.participant-table thead th { position: sticky; top: 0; z-index: 3; color: #cdd8e8; background: #0c192b; font-size: .66rem; line-height: 1.15; text-align: left; text-transform: uppercase; letter-spacing: .055em; }
.participant-table tbody tr:nth-child(even) { background: rgba(255,255,255,.018); }
.participant-table tbody tr:hover { background: rgba(25,201,244,.055); }
.participant-table tbody tr:target { background: rgba(255,216,61,.09); box-shadow: inset 3px 0 0 var(--yellow); }
.participant-table tbody tr:last-child td { border-bottom: 0; }
.participant-table input, .participant-table select { width: 100%; height: 34px; min-height: 34px; padding: .3rem .45rem; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; color: #fff; background: #081220; font-size: .74rem; }
.participant-table input:focus-visible, .participant-table select:focus-visible, .participant-table .participant-row-save:focus-visible, .briefing-toggle:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.participant-row-form { display: contents; }
.participant-implicit-submit { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.participant-client-cell { text-align: center; }
.participant-pilot-cell, .participant-truncate-cell { overflow: hidden; text-overflow: ellipsis; }
.participant-pilot-cell { text-align: left; }
.participant-pilot-cell strong { font-size: .78rem; }
.participant-plain-value { color: #bcefff; font-size: .72rem; font-weight: 900; }
.participant-table .number-chip { display: block; min-width: 44px; max-width: 100%; margin-inline: auto; padding: .25rem .45rem; font-size: .65rem; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.participant-briefing-cell { text-align: center; }
.briefing-toggle { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; color: #fff; font-size: 1.05rem; line-height: 1; font-weight: 950; cursor: pointer; transition: filter .15s ease, transform .15s ease, box-shadow .15s ease; }
.briefing-toggle.is-valid { background: #178a4d; box-shadow: 0 0 0 2px rgba(57,217,138,.14); }
.briefing-toggle.is-missing { background: #b91c2b; box-shadow: 0 0 0 2px rgba(255,59,73,.14); }
.briefing-toggle:hover { filter: brightness(1.14); transform: scale(1.06); }
.briefing-toggle[aria-busy="true"] { opacity: .65; cursor: progress; transform: none; }
.participant-row-actions { display: flex; align-items: center; gap: .65rem; }
.participant-row-save { min-height: 34px; padding: .4rem .58rem; font-size: .67rem; }
.participant-times-link { flex: 0 0 auto; white-space: nowrap; font-size: .72rem; }
.participant-table-help { margin: .65rem 0 0; color: var(--muted); font-size: .72rem; }
.participant-col-client { width: 144px; }
.participant-col-pilot { width: 170px; }
.participant-col-briefing { width: 72px; }
.participant-col-group { width: 78px; }
.participant-col-category { width: 108px; }
.participant-col-vehicle { width: 126px; }
.participant-col-gender { width: 116px; }
.participant-col-transponder { width: 134px; }
.participant-col-pitlane { width: 104px; }
.participant-col-actions { width: 240px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.group-summary { display: flex; flex-wrap: wrap; gap: .55rem; }
.groups-page { padding-bottom: 118px; }
.groups-main { padding-bottom: 3rem; }
.group-settings-card { margin-top: 1.2rem; }
.group-settings-grid { display: grid; grid-template-columns: minmax(260px,1fr) repeat(2,minmax(180px,.34fr)); gap: .8rem; }
.field-title { margin: .25rem 0 .65rem; color: #dbe3ee; font-size: .78rem; font-weight: 850; }
.group-name-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .7rem; }
.group-settings-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.group-settings-actions .form-help { flex: 1 1 420px; }
.capacity-summary { margin: .1rem 0 0; padding: .72rem .85rem; border: 1px solid rgba(25,201,244,.22); border-radius: 10px; color: #c8ebf5; background: rgba(25,201,244,.06); font-size: .78rem; font-weight: 750; }
.capacity-summary.over-capacity { border-color: rgba(255,59,73,.5); color: #ffd0d4; background: rgba(255,59,73,.1); }
.autosave-state { display: inline-flex; align-items: center; min-height: 34px; padding: .42rem .7rem; border: 1px solid rgba(25,201,244,.3); border-radius: 999px; color: #bcefff; background: rgba(25,201,244,.08); font-size: .72rem; font-weight: 850; }
.autosave-state.saving { color: #fff0a8; border-color: rgba(255,216,61,.35); background: rgba(255,216,61,.08); }
.autosave-state.error { color: #ffc4c9; border-color: rgba(255,59,73,.45); background: rgba(255,59,73,.1); }
.gender-warning { margin: .1rem 0 0; }
.group-board-section { margin-top: 1.5rem; }
.group-board-section > .card-heading { padding-inline: .25rem; }
.group-board { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .65rem; align-items: start; }
.group-column { min-width: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: linear-gradient(155deg,rgba(20,36,58,.96),rgba(7,17,30,.98)); box-shadow: 0 16px 42px rgba(0,0,0,.18); }
.group-column.over-capacity { border-color: rgba(255,59,73,.72); box-shadow: 0 0 0 1px rgba(255,59,73,.18),0 16px 42px rgba(0,0,0,.22); }
.group-column.over-capacity > header { background: rgba(255,59,73,.13); }
.group-column > header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 54px; padding: .8rem 1rem; border-bottom: 1px solid rgba(255,255,255,.09); background: rgba(25,201,244,.055); }
.group-column > header strong { overflow-wrap: anywhere; }
.group-count { display: grid; place-items: center; flex: 0 0 auto; min-width: 48px; min-height: 30px; padding: .2rem .55rem; border-radius: 999px; color: #07111d; background: var(--cyan); font-size: .72rem; font-weight: 950; white-space: nowrap; }
.group-column.over-capacity .group-count { color: #fff; background: var(--red); }
.unassigned-column { border-style: dashed; }
.unassigned-column > header { background: rgba(255,216,61,.06); }
.unassigned-column .group-count { background: var(--yellow); }
.group-list { display: grid; gap: .55rem; min-height: 74px; padding: .65rem; }
.participant-tile { display: grid; gap: .7rem; padding: .8rem; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(2,9,18,.62); }
.participant-tile-main { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.participant-tile-main > div { min-width: 0; }
.participant-tile-main strong, .participant-tile-main small { display: block; }
.participant-tile-main strong { overflow-wrap: anywhere; }
.participant-tile-main small { margin-top: .2rem; color: var(--muted); font-size: .72rem; }
.participant-move-row { display: grid; grid-template-columns: 42px minmax(0,1fr) 42px; gap: .45rem; align-items: end; }
.participant-move-row label { display: grid; gap: .28rem; min-width: 0; color: var(--muted); font-size: .68rem; font-weight: 850; }
.participant-group-select { width: 100%; min-height: 46px; padding: .65rem .7rem; border: 1px solid rgba(25,201,244,.3); border-radius: 10px; color: #fff; background: #081220; font-weight: 800; }
.group-step { display: grid; place-items: center; width: 42px; height: 46px; padding: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; color: #fff; background: rgba(255,255,255,.06); font-size: 1.45rem; font-weight: 900; cursor: pointer; }
.group-step:hover, .group-step:focus-visible { color: #07111d; background: var(--yellow); }
.group-save-bar { position: fixed; z-index: 60; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 86px; padding: .8rem max(20px,calc((100vw - 1420px) / 2)) calc(.8rem + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,216,61,.4); background: rgba(5,12,22,.96); box-shadow: 0 -18px 45px rgba(0,0,0,.4); backdrop-filter: blur(16px); }
.group-save-bar > div { display: grid; gap: .2rem; }
.group-save-bar small { color: var(--muted); }
.group-save-bar small.error { color: #ff9da5; }
.group-save-bar small.success { color: #8dffbd; }
.group-save-bar .portal-button { flex: 0 0 auto; }
.session-list, .token-list { display: grid; gap: .65rem; margin-top: 1rem; }
.session-list article, .token-list article { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(0,0,0,.14); }
.session-list article > div, .token-list article > div { display: grid; gap: .35rem; }
.session-list form { display: flex; align-items: center; gap: .5rem; }
.session-schedule-note { margin: 1rem 0; padding: .9rem 1rem; border: 1px solid rgba(52,211,153,.32); border-left: 4px solid #34d399; border-radius: 12px; color: #d8fbe9; background: rgba(20,83,45,.2); line-height: 1.55; }
.session-item { align-items: flex-start !important; }
.session-item-summary { min-width: 190px; }
.session-item-summary small { color: var(--muted); line-height: 1.45; }
.session-badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.status-badge.automatic { color: #c9fff0; border-color: rgba(52,211,153,.55); background: rgba(16,185,129,.17); }
.status-badge.manual { color: #dce7f7; border-color: rgba(148,163,184,.4); background: rgba(71,85,105,.25); }
.session-edit-form { flex: 1 1 760px; display: grid !important; grid-template-columns: minmax(155px,1fr) repeat(3,minmax(145px,.8fr)) auto; align-items: end !important; }
.session-edit-form label { display: grid; gap: .35rem; color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.session-edit-form .portal-button { min-height: 43px; }
.token-list small { max-width: 720px; color: var(--muted); overflow-wrap: anywhere; }
.integration-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-bottom: 1rem; }
.integration-grid article { padding: 1rem; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(0,0,0,.14); }
.integration-grid p { color: var(--muted); }
.integration-grid small { display: block; margin-top: .55rem; color: var(--muted); line-height: 1.5; }
.security-note { margin: -.2rem 0 1rem; padding: .85rem 1rem; border-left: 3px solid var(--yellow); border-radius: 8px; color: #dbe5f2; background: rgba(255,216,61,.07); font-size: .82rem; line-height: 1.55; }
.platform-chip { display: inline-flex; align-items: center; padding: .42rem .72rem; border: 1px solid rgba(226,39,53,.55); border-radius: 999px; color: #fff; background: rgba(226,39,53,.15); font-size: .7rem; font-weight: 950; letter-spacing: .09em; }
.connection-account-card { display: grid; grid-template-columns: minmax(240px,.7fr) minmax(300px,1.3fr); gap: 1rem; align-items: center; margin-bottom: 1rem; padding: 1rem; border: 1px solid rgba(25,201,244,.22); border-radius: 14px; background: linear-gradient(135deg,rgba(25,201,244,.08),rgba(0,0,0,.13)); }
.connection-account-card h3, .connection-account-card p { margin: 0; }
.connection-account-card p:not(.portal-eyebrow) { margin-top: .35rem; color: var(--muted); font-size: .82rem; }
.activation-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.activation-card { display: grid; align-content: start; gap: .9rem; min-width: 0; padding: 1rem; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: linear-gradient(145deg,rgba(18,34,57,.92),rgba(6,17,31,.94)); }
.activation-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.activation-card > header > div { display: flex; gap: .75rem; min-width: 0; }
.activation-card h3, .activation-card p { margin: 0; }
.activation-card header p { margin-top: .25rem; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.activation-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border: 1px solid rgba(25,201,244,.34); border-radius: 10px; color: var(--cyan); background: rgba(25,201,244,.09); font-size: 1.15rem; }
.activation-secret { padding: .85rem; border: 1px solid rgba(255,216,61,.55); border-radius: 12px; background: rgba(255,216,61,.08); }
.activation-secret > p { margin: .25rem 0 .65rem; color: var(--muted); font-size: .76rem; }
.activation-state { min-height: 2.6rem; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.activation-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-top: auto; }
.activation-actions form { margin: 0; }
.pitcrew-pairing-panel,.pitcrew-device-panel{display:grid;gap:.7rem;padding:.85rem;border:1px solid rgba(255,216,61,.28);border-radius:13px;background:rgba(0,0,0,.16)}
.pitcrew-pairing-panel p,.pitcrew-device-panel p{color:var(--muted);font-size:.78rem;line-height:1.45}
.pitcrew-pairing-panel>form{margin:0}
.pitcrew-pairing-qr{display:flex;align-items:center;gap:1rem;padding:.8rem;border-radius:12px;background:#fff;color:#07101c}
.pitcrew-pairing-qr canvas{flex:0 0 150px;width:150px!important;height:150px!important;border-radius:8px}
.pitcrew-pairing-qr>div{display:grid;gap:.35rem}.pitcrew-pairing-qr span,.pitcrew-pairing-qr small{display:block;color:#34445a;font-size:.76rem}
.pitcrew-device-list{display:grid;gap:.55rem}.pitcrew-device-list>div{display:flex;align-items:center;justify-content:space-between;gap:.8rem;padding:.7rem;border:1px solid rgba(255,255,255,.09);border-radius:11px;background:rgba(5,14,25,.62)}
.pitcrew-device-list span{display:grid;gap:.2rem;min-width:0}.pitcrew-device-list small{color:var(--muted);font-size:.72rem}.pitcrew-device-list form{margin:0}
@media(max-width:700px){.pitcrew-pairing-qr{align-items:flex-start;flex-direction:column}.pitcrew-pairing-qr canvas{align-self:center}.pitcrew-device-list>div{align-items:flex-start;flex-direction:column}}
.timecollector-section { scroll-margin-top: 100px; }
.timecollector-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-top: 1rem; }
.timecollector-card { display: grid; align-content: start; gap: 1rem; min-width: 0; padding: 1.1rem; border: 1px solid rgba(25,201,244,.2); border-radius: 18px; background: linear-gradient(145deg,rgba(17,35,59,.96),rgba(5,15,28,.98)); box-shadow: 0 18px 46px rgba(0,0,0,.2); }
.timecollector-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.timecollector-card > header > div { display: flex; align-items: flex-start; gap: .75rem; min-width: 0; }
.timecollector-card h2, .timecollector-card h3, .timecollector-card p { margin: 0; }
.timecollector-card h2 { font-size: 1.08rem; }
.timecollector-card header p { margin-top: .28rem; color: var(--muted); font-size: .76rem; }
.timecollector-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid rgba(25,201,244,.4); border-radius: 11px; color: #06111d; background: var(--cyan); font-size: .7rem; font-weight: 950; letter-spacing: -.03em; box-shadow: 0 0 20px rgba(25,201,244,.16); }
.timecollector-form { gap: .75rem; }
.timecollector-form .form-pair { align-items: start; }
.pairing-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.pairing-fields label { display: grid; gap: .35rem; color: #dbe6f5; font-size: .72rem; font-weight: 850; }
.timecollector-meta { display: flex; flex-wrap: wrap; gap: .45rem; min-height: 1.8rem; }
.timecollector-meta span { display: inline-flex; align-items: center; padding: .3rem .55rem; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; color: var(--muted); background: rgba(0,0,0,.18); font-size: .67rem; font-weight: 800; }
.timecollector-meta span.warning { color: #fff0a8; border-color: rgba(255,216,61,.38); background: rgba(255,216,61,.08); }
.timecollector-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-top: .15rem; }
.timecollector-pair, .timecollector-revoke { margin: -.35rem 0 0; }
.narrow-main { width: min(860px,calc(100% - 40px)); }
.dashboard-actions { display: grid; justify-content: start; gap: .85rem; }
.dashboard-actions .portal-eyebrow { margin: 0; }
.collector-intro { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.collector-intro h2, .collector-intro p { margin: 0; }
.dashboard-action-buttons, .form-actions, .collector-secondary-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.dashboard-action-buttons { justify-content: flex-start; }
.form-actions { justify-content: flex-end; margin-top: .35rem; }
.account-profile-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.2rem; align-items: start; }
.account-profile-grid > .account-card { display: grid; align-content: start; gap: 1rem; min-width: 0; }
.account-profile-grid .account-card h2, .account-profile-grid .account-card h3 { margin: 0; }
.account-profile-grid .account-card > header { align-items: center; }
.account-details-card { grid-column: 1 / -1; }
.account-logo-card { grid-template-columns: 1fr; align-items: start; }
.account-logo-preview { display: grid; place-items: center; width: 100%; min-height: 150px; padding: 1rem; overflow: hidden; border: 1px dashed rgba(255,255,255,.2); border-radius: 14px; color: var(--muted); background: rgba(0,0,0,.2); text-align: center; }
.account-logo-preview img { display: block; width: 100%; max-width: 260px; max-height: 150px; object-fit: contain; }
.account-logo-preview.is-empty { background: rgba(25,201,244,.04); }
.account-logo-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.account-security-card { grid-column: 1 / -1; }
.account-security-card .portal-form { max-width: 760px; }
.organization-identity { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.organization-identity > div { min-width: 0; }
.organization-identity h1 { overflow-wrap: anywhere; }
.organization-logo { display: grid; place-items: center; flex: 0 0 auto; width: 92px; height: 72px; padding: .5rem; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 14px 32px rgba(0,0,0,.2); }
.organization-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.collector-overview .compact-empty { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.collector-overview .compact-empty p { margin: 0; }
.collector-summary-list { display: grid; gap: .65rem; }
.collector-summary-row { display: grid; grid-template-columns: minmax(210px,1.1fr) minmax(220px,1.25fr) minmax(120px,.55fr) auto; align-items: center; gap: 1rem; padding: .85rem; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(2,9,18,.48); }
.collector-summary-name { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.collector-summary-name > div, .collector-summary-route, .collector-summary-state { display: grid; gap: .22rem; min-width: 0; }
.collector-summary-name strong, .collector-summary-route strong { overflow-wrap: anywhere; }
.collector-summary-name small, .collector-summary-route span, .collector-summary-route small, .collector-summary-state small { color: var(--muted); font-size: .7rem; }
.collector-summary-state small.warning { color: #fff0a8; }
.collector-intro p:not(.portal-eyebrow) { margin-top: .4rem; color: var(--muted); line-height: 1.55; }
.limit-note { display: grid; gap: .25rem; max-width: 390px; padding: .75rem .9rem; border: 1px solid rgba(255,216,61,.3); border-radius: 12px; background: rgba(255,216,61,.07); }
.limit-note span { color: var(--muted); font-size: .76rem; line-height: 1.45; }
.empty-collector-card { display: grid; justify-items: center; gap: .65rem; padding-block: 2.4rem; text-align: center; }
.empty-collector-card h2, .empty-collector-card p { margin: 0; }
.empty-collector-card p { max-width: 600px; color: var(--muted); }
.dedicated-collector-grid { align-items: start; margin-top: 1.25rem; }
.dedicated-collector-grid .timecollector-card { scroll-margin-top: 95px; }
.collector-assignment-card { scroll-margin-top: 95px; }
.collector-assignment-card > .form-help { max-width: 1080px; margin: .35rem 0 1rem; line-height: 1.55; }
.collector-assignment-scroll { overflow-x: auto; border: 1px solid rgba(255,255,255,.11); border-radius: 16px; background: rgba(0,0,0,.2); }
.collector-assignment-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.collector-assignment-table th, .collector-assignment-table td { padding: .9rem 1rem; border-bottom: 1px solid rgba(255,255,255,.09); text-align: left; vertical-align: middle; }
.collector-assignment-table thead th { color: #fff; background: rgba(255,255,255,.045); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.collector-assignment-table thead th:not(:first-child), .collector-assignment-table td { width: 190px; text-align: center; }
.collector-assignment-table thead small { display: block; margin-top: .25rem; color: var(--muted); font-size: .62rem; font-weight: 700; text-transform: none; letter-spacing: 0; }
.collector-assignment-table tbody th strong, .collector-assignment-table tbody th span { display: block; }
.collector-assignment-table tbody th strong { color: #fff; font-size: .94rem; }
.collector-assignment-table tbody th span { margin-top: .25rem; color: var(--muted); font-size: .75rem; font-weight: 600; }
.collector-assignment-table tbody tr:last-child th, .collector-assignment-table tbody tr:last-child td { border-bottom: 0; }
.collector-assignment-table tbody tr:hover, .collector-assignment-table tbody tr.is-context-event { background: rgba(255,255,255,.035); }
.collector-assignment-table tbody tr.is-context-event th { box-shadow: inset 3px 0 0 var(--red,#ef3340); }
.collector-unassigned-row { background: rgba(255,255,255,.018); }
.collector-empty-row { padding: 1.5rem !important; color: var(--muted); text-align: center !important; }
.collector-route-check { display: inline-grid; justify-items: center; gap: .35rem; cursor: pointer; }
.collector-route-check input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.collector-route-check > span { position: relative; display: block; width: 52px; height: 29px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.08); transition: .18s ease; }
.collector-route-check > span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 19px; height: 19px; border-radius: 50%; background: #aeb6c2; box-shadow: 0 2px 7px rgba(0,0,0,.35); transition: .18s ease; }
.collector-route-check input:checked + span { border-color: rgba(239,51,64,.8); background: rgba(239,51,64,.32); box-shadow: 0 0 18px rgba(239,51,64,.18); }
.collector-route-check input:checked + span::after { left: 27px; background: #fff; }
.collector-route-check input:focus-visible + span { outline: 3px solid rgba(255,216,61,.5); outline-offset: 3px; }
.collector-route-check input:disabled + span { opacity: .45; cursor: not-allowed; }
.collector-route-check small { color: var(--muted); font-size: .66rem; font-weight: 800; }
.collector-assignment-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.collector-assignment-actions .field-help { margin: 0; }
.collector-assignment-actions .portal-button { flex: 0 0 auto; }
.collector-secondary-actions { justify-content: space-between; padding-top: .15rem; border-top: 1px solid rgba(255,255,255,.08); }
.collector-secondary-actions form { margin: 0; }
.field-help { display: block; margin-top: .28rem; color: var(--muted); font-size: .66rem; font-weight: 600; }
.factory-collector-link { display: inline-flex; margin-top: .65rem; }
.factory-add-card { display: grid; grid-template-columns: minmax(280px,1fr) minmax(320px,.85fr); gap: 1.2rem; align-items: end; }
.factory-add-card h2, .factory-add-card p { margin: 0; }
.factory-add-card p:not(.portal-eyebrow) { margin-top: .4rem; color: var(--muted); line-height: 1.5; }
.factory-add-form { grid-template-columns: minmax(190px,1fr) auto; align-items: end; }
.factory-collector-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-top: 1.25rem; }
.factory-collector-card { scroll-margin-top: 96px; }
.factory-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; margin: 0; }
.factory-details > div { min-width: 0; padding: .65rem .7rem; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(0,0,0,.16); }
.factory-details dt { color: var(--muted); font-size: .65rem; font-weight: 850; text-transform: uppercase; letter-spacing: .055em; }
.factory-details dd { margin: .28rem 0 0; overflow-wrap: anywhere; color: #fff; font-size: .76rem; font-weight: 800; }
.factory-rename-form { grid-template-columns: minmax(180px,1fr) auto; align-items: end; }
.factory-actions { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding-top: .7rem; border-top: 1px solid rgba(255,255,255,.08); }
.factory-actions form { margin: 0; }
.collector-route-list { display: grid; gap: .55rem; }
.collector-route-list > div { padding: .7rem .8rem; border: 1px solid rgba(25,201,244,.2); border-radius: 10px; background: rgba(25,201,244,.055); }
.collector-route-list strong, .collector-route-list span { display: block; }
.collector-route-list span { margin-top: .2rem; color: var(--muted); font-size: .72rem; }
.token-presets { display: grid; gap: .7rem; }
.token-preset { grid-template-columns: minmax(150px,1fr) minmax(150px,.8fr) auto; align-items: end; }
.token-preset > div { display: grid; gap: .25rem; align-self: center; }
.token-preset > div small { color: var(--muted); line-height: 1.4; }
.token-preset .portal-button { white-space: nowrap; }
code { padding: .12rem .28rem; border-radius: 4px; color: #c8f4ff; background: rgba(25,201,244,.09); }
.copy-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .55rem; align-items: center; }
.scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.scope-grid label { display: flex; flex-direction: row; align-items: center; gap: .45rem; }
.token-once { display: grid; grid-template-columns: .75fr 1.25fr; gap: 1rem; align-items: center; margin: 1rem 0; padding: 1.2rem; border: 1px solid rgba(255,216,61,.62); border-radius: var(--radius); background: linear-gradient(135deg,rgba(255,216,61,.12),rgba(226,39,53,.08)); }
.token-once h2, .token-once p { margin: 0; }
.token-once p:not(.portal-eyebrow) { margin-top: .4rem; color: var(--muted); }
.portal-button.yellow { color: #111827; background: linear-gradient(135deg,#ffe66a,#ffc400); box-shadow: 0 0 24px rgba(255,216,61,.24); }
.portal-button.danger { color: #fff; background: linear-gradient(135deg,#a5162c,#e22735); }
.text-button.danger { color: #ff9da5; }
.portal-button:disabled, input:disabled, select:disabled { opacity: .55; cursor: not-allowed; }

.timing-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.table-scroll { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th, .data-table td { padding: .8rem .85rem; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; vertical-align: top; }
.data-table th { position: sticky; top: 0; color: #cdd8e8; background: #0c192b; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.data-table td small { display: block; margin-top: .2rem; color: var(--muted); }
.time-value { font-variant-numeric: tabular-nums; font-weight: 950; }
.tv-body { background: #050a12; }
.tv-shell { width: min(1600px, calc(100% - 36px)); margin: 0 auto; padding: 1.5rem 0 4rem; }
.tv-header { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.tv-header h1 { margin: 0; font-size: clamp(2rem,5vw,4.8rem); }
.tv-table { font-size: clamp(.9rem,1.5vw,1.35rem); }
.tv-settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.tv-settings-grid .tv-passings-option, .tv-settings-grid .tv-settings-actions { grid-column: 1 / -1; }
.tv-passings-option { display: flex !important; flex-direction: row !important; align-items: center; min-height: 48px; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.18); }
.tv-settings-actions, .message-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.section-tab-messages { color: #06111d !important; border-color: rgba(255,216,61,.7) !important; background: linear-gradient(135deg,#ffe66a,#ffc400) !important; }
.messages-editor { display: grid; gap: 1.1rem; }
.messages-editor textarea { resize: vertical; min-height: 150px; }
.active-message-preview { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid rgba(255,216,61,.45); border-radius: 14px; background: rgba(255,216,61,.08); }
.active-message-preview p { margin: .45rem 0 0; white-space: pre-wrap; }
.active-message-preview form { margin: 0; }

.tv-display-body { min-height: 100vh; margin: 0; overflow: hidden; color: #f7f9fc; background: #040a14; font-family: Inter,Segoe UI,Arial,sans-serif; }
.tv-display-shell { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto minmax(0,1fr); gap: clamp(10px,1vw,18px); width: 100vw; height: 100vh; padding: calc(16px + var(--tv-margin-top)) calc(20px + var(--tv-margin-right)) calc(12px + var(--tv-margin-bottom)) calc(20px + var(--tv-margin-left)); box-sizing: border-box; }
.tv-display-header { display: grid; grid-template-columns: minmax(140px,.8fr) minmax(190px,1fr) minmax(190px,1fr) minmax(130px,.55fr) minmax(160px,.7fr); align-items: stretch; overflow: hidden; border: 1px solid #26415f; border-radius: 14px; background: linear-gradient(145deg,#102743,#09172a); box-shadow: 0 16px 44px rgba(0,0,0,.28); }
.tv-organization-logo { align-self: center; justify-self: start; width: min(230px,90%); height: 72px; padding: 10px 16px; object-fit: contain; box-sizing: border-box; }
.tv-session-block, .tv-status-block, .tv-countdown-block { display: grid; align-content: center; gap: 5px; padding: 12px 18px; border-left: 1px solid rgba(255,255,255,.12); }
.tv-session-block span, .tv-status-block span, .tv-countdown-block span { color: #8393a9; font-size: clamp(.7rem,1vw,.95rem); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.tv-session-block strong, .tv-status-block strong, .tv-countdown-block strong { color: #fff; font-size: clamp(1.05rem,1.8vw,1.65rem); line-height: 1.1; }
.tv-next-session-block small { justify-self: end; color: #aebbd0; font-size: clamp(.65rem,.85vw,.82rem); font-weight: 850; }
.tv-status-block { justify-items: center; }
.tv-status-block strong { display: inline-flex; align-items: center; justify-content: center; width: 52px; min-height: 42px; padding: 0; background: transparent; }
.tv-race-status-icon { position: relative; display: inline-block; flex: 0 0 auto; width: 42px; height: 30px; }
.tv-race-status-icon::before { content: ""; position: absolute; left: 2px; top: 2px; width: 4px; height: 27px; border-radius: 999px; background: rgba(255,255,255,.95); box-shadow: 0 1px 4px rgba(0,0,0,.65); }
.tv-race-status-icon::after { content: ""; position: absolute; left: 6px; top: 2px; width: 32px; height: 21px; border: 1px solid rgba(255,255,255,.92); border-radius: 2px 5px 5px 2px; background: #00a650; box-shadow: 0 1px 4px rgba(0,0,0,.65); transform-origin: left center; animation: tvRaceFlagWave 950ms ease-in-out infinite; }
.tv-race-status-icon-stop { width: 40px; height: 40px; }
.tv-race-status-icon-stop::before { left: 0; top: 0; width: 40px; height: 40px; border-radius: 0; background: #fff; clip-path: polygon(30% 0,70% 0,100% 30%,100% 70%,70% 100%,30% 100%,0 70%,0 30%); }
.tv-race-status-icon-stop::after { content: "STOP"; left: 3px; top: 3px; display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 0; background: #d8001d; clip-path: polygon(30% 0,70% 0,100% 30%,100% 70%,70% 100%,30% 100%,0 70%,0 30%); color: #fff; font-family: "Arial Black",Impact,sans-serif; font-size: 9px; font-style: normal; font-weight: 900; line-height: 1; text-shadow: 0 1px 1px #000; animation: none; }
@keyframes tvRaceFlagWave { 0%,100% { transform: skewY(0deg) scaleX(1); } 50% { transform: skewY(-9deg) scaleX(.94); } }
.tv-countdown-block strong { color: #ffdc44; font-variant-numeric: tabular-nums; font-size: clamp(1.3rem,2.4vw,2.2rem); }
.tv-results-panel { min-height: 0; overflow: hidden; border: 1px solid #263b58; border-radius: 14px; background: #071326; }
.tv-results-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: clamp(.74rem,1.1vw,1.08rem); }
.tv-results-table th, .tv-results-table td { height: clamp(34px,4.1vh,54px); padding: 0 clamp(6px,.75vw,13px); overflow: hidden; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.tv-results-table th { height: 40px; color: #9aaac0; background: #06101f; font-size: .72em; text-transform: uppercase; letter-spacing: .055em; }
.tv-results-table tr > :is(:nth-child(2), :nth-child(3), :nth-child(5), :nth-child(8)) { text-align: center; }
.tv-results-table :is(th,col):nth-child(1) { width: 5%; }.tv-results-table :is(th,col):nth-child(2) { width: 8%; }.tv-results-table :is(th,col):nth-child(3) { width: 5%; }.tv-results-table :is(th,col):nth-child(4) { width: 21%; }.tv-results-table :is(th,col):nth-child(5) { width: 13%; }.tv-results-table :is(th,col):nth-child(6) { width: 14%; }.tv-results-table :is(th,col):nth-child(7) { width: 14%; }.tv-results-table :is(th,col):nth-child(8) { width: 7%; }.tv-results-table :is(th,col):nth-child(9) { width: 13%; }
.tv-scroll-window { overflow: hidden; }
.tv-scroll-window[hidden] { display: none; }
.tv-results-panel td { height: var(--tv-row-height, clamp(34px,4.1vh,54px)); }
.tv-results-panel .tv-brand-logo { height: min(30px, calc(var(--tv-row-height, 40px) - 4px)); vertical-align: middle; }
.tv-results-panel .tv-brand-logo img { max-height: 100%; }
.tv-results-table tbody tr:nth-child(odd) { background: rgba(255,255,255,.025); }
.tv-results-table tbody tr:nth-child(even) { background: rgba(36,82,130,.12); }
.tv-results-table tbody tr.is-new-lap { animation: tvNewLapFlash 1.8s steps(12,end); }
@keyframes tvNewLapFlash { 0%,16.66%,33.33%,50%,66.66%,83.33% { background: rgba(255,219,45,.72); box-shadow: inset 0 0 24px rgba(255,222,58,.85); } 8.33%,25%,41.66%,58.33%,75%,91.66%,100% { background: rgba(36,82,130,.12); box-shadow: none; } }
.tv-time-cell { color: #ffe04e; font-variant-numeric: tabular-nums; font-weight: 950; }
.tv-progress-cell { font-variant-numeric: tabular-nums; font-weight: 950; }
.tv-progress-cell.is-up { color: #39e27d; }.tv-progress-cell.is-down { color: #ff5362; }.tv-progress-cell.is-stable { color: #667890; }
.tv-motorcycle-number-cell { color: #41d8ff; font-variant-numeric: tabular-nums; font-weight: 950; }
.tv-nation-cell { font-family: "Segoe UI Emoji","Apple Color Emoji",sans-serif; font-size: 1.35em; }
.tv-nation-flag { display: inline-block; width: 27px; height: 20px; border-radius: 2px; object-fit: cover; vertical-align: middle; box-shadow: 0 0 0 1px rgba(255,255,255,.32),0 2px 4px rgba(0,0,0,.4); }
.tv-pilot-cell { color: #fff; font-weight: 900; }
.tv-motorcycle-cell { overflow: visible !important; }
.tv-brand-logo { display: inline-flex; width: 72px; max-width: 100%; height: 30px; align-items: center; justify-content: center; color: #eef3fa; font-family: Arial Black,Impact,sans-serif; font-size: .72em; font-style: italic; font-weight: 950; text-transform: uppercase; }
.tv-brand-logo img { display: block; max-width: 66px; max-height: 27px; object-fit: contain; }
.tv-brand-fallback { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-best-lap-cell.is-medal { position: relative; color: #07111d; text-shadow: 0 1px rgba(255,255,255,.35); }
.tv-best-lap-cell.is-gold { background: linear-gradient(90deg,#9d7314,#f7d860 45%,#b88617); box-shadow: inset 4px 0 #fff1a6; }
.tv-best-lap-cell.is-silver { background: linear-gradient(90deg,#77818d,#e7edf2 45%,#8c97a2); box-shadow: inset 4px 0 #fff; }
.tv-best-lap-cell.is-bronze { background: linear-gradient(90deg,#78451f,#d8955e 45%,#87502d); box-shadow: inset 4px 0 #f4bf93; }
.tv-laps-cell { color: #fff; font-variant-numeric: tabular-nums; font-weight: 900; }
.tv-gap-cell { color: #ff6c75; font-variant-numeric: tabular-nums; font-weight: 950; }.tv-gap-cell.is-best { color: #36e47f; font-size: .78em; }
.tv-empty { margin: 4rem auto; color: #93a4bb; text-align: center; font-size: 1.3rem; }
.tv-info-strip { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,.85fr) minmax(170px,.32fr); gap: 8px; align-items: center; min-height: 70px; padding: 4px 8px; border-top: 1px solid #183454; border-bottom: 1px solid #183454; background: #05080d; }
.tv-info-message, .tv-best-time, .tv-best-regularity { display: flex; align-items: center; min-width: 0; height: 28px; padding: 0 10px; overflow: hidden; border: 1px solid; border-radius: 7px; background: #07101d; font-size: clamp(.66rem,.9vw,.92rem); font-weight: 900; white-space: nowrap; }
.tv-info-message { height: 62px; }
.tv-info-message { border-color: #d5bd00; color: #fff; }
.tv-info-message > strong { flex: 0 0 auto; margin-right: .4rem; color: #ffe127; }
.tv-info-marquee { min-width: 0; overflow: hidden; }
.tv-info-marquee span { display: inline-block; min-width: max-content; padding-left: 0; }
.tv-info-marquee span.is-scrolling { animation: tvInfoScroll 18s linear infinite; }
.tv-best-time { border-color: #8054df; color: #a957ff; }
.tv-performance-highlights { display: grid; min-width: 0; gap: 4px; }
.tv-best-regularity { border-color: #9f86dc; color: #d5c8ff; background: #102038; }
.tv-best-time strong, .tv-best-regularity strong { flex: 0 0 auto; margin-right: .4rem; }
.tv-best-time span, .tv-best-regularity span { overflow: hidden; text-overflow: ellipsis; }
.tv-eternytime-signature { display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
.tv-eternytime-signature img { display: block; width: min(190px,100%); max-height: 34px; object-fit: contain; }
.screen-reader-text { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
@keyframes tvInfoScroll { 0%,12% { transform: translateX(0); } 88%,100% { transform: translateX(calc(-100% + 10px)); } }
.tv-passings-panel { position: absolute; right: calc(24px + var(--tv-margin-right)); bottom: calc(42px + var(--tv-margin-bottom)); z-index: 4; width: min(420px,32vw); max-height: 46vh; padding: 14px; overflow: hidden; border: 1px solid rgba(40,207,244,.42); border-radius: 14px; background: rgba(4,14,28,.94); box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.tv-passings-panel h2 { margin: 0 0 .55rem; color: #28cff4; font-size: 1rem; text-transform: uppercase; }
.tv-passings-panel > div { display: grid; gap: .35rem; }
.tv-passings-panel > div > div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .55rem; border-radius: 8px; background: rgba(255,255,255,.045); }
.tv-passings-panel span { color: #ffe04e; font-variant-numeric: tabular-nums; font-weight: 900; }
.tv-message-popup { position: fixed; inset: 50% auto auto 50%; z-index: 20; width: min(720px,calc(100vw - 64px)); padding: clamp(28px,4vw,54px); transform: translate(-50%,-50%); border: 2px solid #ffe04e; border-radius: 22px; color: #fff; background: rgba(7,18,34,.98); box-shadow: 0 0 0 9999px rgba(0,0,0,.62),0 0 48px rgba(255,224,78,.36); }
.tv-message-popup p { margin: 0; white-space: pre-wrap; text-align: center; font-size: clamp(1.4rem,3vw,2.6rem); font-weight: 850; line-height: 1.35; }
.tv-message-popup button { position: absolute; top: 10px; right: 14px; border: 0; color: #a8b5c7; background: transparent; font-size: 2rem; cursor: pointer; }
.tv-orientation-portrait .tv-display-shell { max-width: 900px; margin: 0 auto; }
.tv-orientation-portrait .tv-display-header { grid-template-columns: 1fr 1fr; }
.tv-orientation-portrait .tv-organization-logo { grid-column: 1 / -1; }
.tv-orientation-portrait .tv-session-block:first-of-type { border-left: 0; }
.pilot-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; border-radius: 16px; overflow: hidden; background: var(--line); }
.pilot-summary article { padding: 1.1rem; background: var(--panel); }
.pilot-summary span { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.pilot-summary strong { display: block; margin-top: .35rem; font-size: 1.6rem; }
.participant-profile-actions { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.participant-profile-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; }
.participant-profile-field { min-width: 0; padding: .8rem .9rem; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(5,12,22,.42); }
.participant-profile-field dt { margin: 0 0 .3rem; color: var(--muted); font-size: .68rem; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.participant-profile-field dd { margin: 0; overflow-wrap: anywhere; color: var(--white); font-size: .88rem; line-height: 1.45; white-space: pre-wrap; }
.reference-times-table { min-width: 420px; }
.reference-times-table th:last-child, .reference-times-table td:last-child { width: 150px; text-align: left; }
.reference-time-value { color: var(--yellow); font-variant-numeric: tabular-nums; font-weight: 950; }
.pilot-section-stack { display: grid; gap: 1rem; }

@media (min-width: 1281px) {
  .group-column > header { min-height: 48px; padding:.65rem .75rem; }
  .group-count { min-width:42px; min-height:27px; padding:.15rem .4rem; font-size:.66rem; }
  .group-list { gap:.45rem; padding:.5rem; }
  .participant-tile { gap:.55rem; padding:.65rem; }
  .participant-tile-main { gap:.5rem; }
  .participant-tile-main strong { font-size:.82rem; }
  .participant-tile-main small { font-size:.65rem; }
  .participant-tile .number-chip { min-width:38px; padding:.22rem .38rem; font-size:.62rem; }
  .participant-move-row { grid-template-columns:36px minmax(0,1fr) 36px; gap:.3rem; }
  .participant-group-select { min-height:40px; padding:.5rem .55rem; font-size:.75rem; }
  .group-step { width:36px; height:40px; font-size:1.2rem; }
}

@media (max-width: 1280px) and (min-width: 981px) {
  .group-board { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

@media (max-width: 980px) {
  .portal-layout, .activation-box { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .admin-create-form { grid-template-columns: 1fr 1fr; }
  .account-form { grid-template-columns: 1fr 1fr; }
  .account-form .account-meta { grid-column: 1 / -1; }
  .request-card { grid-template-columns: 1fr auto; }
  .request-status-form { grid-column: 1 / -1; }
  .form-grid-3, .split-panels, .integration-grid, .token-once, .token-preset, .activation-grid, .connection-account-card, .timecollector-grid, .factory-add-card, .factory-collector-grid { grid-template-columns: 1fr; }
  .event-config-options, .event-tv-logo-upload { grid-template-columns: 1fr; }
  .event-tv-logo-preview { grid-row: auto; }
  .inline-form { grid-template-columns: 1fr 1fr; }
  .group-name-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .group-board { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .collector-summary-row { grid-template-columns: minmax(200px,1fr) minmax(220px,1fr) auto; }
  .collector-summary-row > .portal-button { grid-column: 1 / -1; justify-self: end; }
}

@media (max-width: 760px) {
  .account-profile-grid { grid-template-columns: 1fr; }
  .account-details-card, .account-security-card { grid-column: auto; }
  .account-logo-card { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-grid-2 .wide-field { grid-column: auto; }
}

@media screen and (max-width: 820px) {
  .section-tabs.event-section-tabs {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
    margin: .65rem 0 1rem;
    padding: .4rem;
    overflow: visible;
    scroll-snap-type: none;
  }
  .event-section-tabs .section-tab {
    min-width: 0;
    padding: .25rem;
    font-size: .75rem;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .portal-hero.event-overview-heading { gap: .35rem; margin-bottom: .65rem; }
  .event-overview-heading .portal-lead { margin: .4rem 0 0; }
  .event-overview-heading .access-card {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.4;
  }
  .event-overview-heading .access-card > * { font: inherit; }
  .event-overview-heading .access-card small::before { content: '·'; margin-right: .4rem; }
}

@media (max-width: 620px) {
  .portal-header { align-items: flex-start; padding-inline: 16px; }
  .portal-nav { display: grid; gap: .3rem; text-align: right; }
  .portal-main { width: min(100% - 28px,1240px); padding-top: 2.2rem; }
  .portal-hero { display: grid; align-items: start; }
  .access-card { min-width: 0; }
  .admin-create-form, .account-form, .form-pair { grid-template-columns: 1fr; }
  .event-row, .account-card > header { align-items: flex-start; }
  .request-card { grid-template-columns: 1fr; }
  .request-status-form { display: grid; }
  .wide-main { width: min(100% - 20px,1460px); }
  .section-tabs { top: 70px; margin-inline: -4px; }
  .inline-form, .scope-grid, .pilot-summary { grid-template-columns: 1fr; }
  .group-settings-grid, .group-name-grid, .group-board { grid-template-columns: 1fr; }
  .group-settings-actions { align-items: stretch; }
  .group-settings-actions .portal-button { width: 100%; }
  .group-board-section > .card-heading, .group-settings-card .card-heading { align-items: flex-start; flex-direction: column; }
  .participant-group-select, .group-step { min-height: 48px; }
  .group-save-bar { align-items: stretch; flex-direction: column; padding: .75rem 14px calc(.75rem + env(safe-area-inset-bottom)); }
  .group-save-bar .portal-button { width: 100%; }
  .groups-page { padding-bottom: 164px; }
  .event-actions, .session-list article, .token-list article, .tv-header { align-items: stretch; flex-direction: column; }
  .participant-table { min-width: 1302px; }
  .participant-table th, .participant-table td { height: 46px; padding: 4px 6px; }
  .participant-profile-grid { grid-template-columns: 1fr; }
  .session-list form, .copy-row, .pairing-fields { grid-template-columns: 1fr; display: grid; }
  .timecollector-card > header { align-items: flex-start; flex-direction: column; }
  .timecollector-actions { align-items: stretch; flex-direction: column; }
  .timecollector-actions .portal-button { width: 100%; }
  .collector-assignment-actions { align-items: stretch; flex-direction: column; }
  .collector-assignment-actions .portal-button { width: 100%; }
  .dashboard-actions, .collector-intro, .collector-overview .compact-empty { align-items: stretch; flex-direction: column; }
  .dashboard-action-buttons, .dashboard-action-buttons .portal-button, .collector-intro form, .collector-intro form .portal-button { width: 100%; }
  .organization-identity { align-items: flex-start; flex-direction: column; }
  .organization-logo { width: 100px; height: 78px; }
  .collector-summary-row { grid-template-columns: 1fr; align-items: stretch; }
  .collector-summary-row > .portal-button { justify-self: stretch; }
  .collector-secondary-actions { align-items: stretch; flex-direction: column; }
  .collector-secondary-actions .portal-button { width: 100%; }
  .factory-add-form, .factory-rename-form, .factory-details { grid-template-columns: 1fr; }
  .factory-actions { align-items: stretch; flex-direction: column; }
  .factory-actions .portal-button, .factory-actions form { width: 100%; }
  .narrow-main { width: min(100% - 28px,860px); }
  .tv-settings-grid { grid-template-columns: 1fr; }
  .tv-settings-grid .tv-passings-option, .tv-settings-grid .tv-settings-actions { grid-column: auto; }
  .tv-settings-actions, .message-actions, .active-message-preview { align-items: stretch; flex-direction: column; }
}

@media print {
  .portal-header, .portal-nav, .section-tabs, .no-print, .portal-button, .text-button { display: none !important; }
  :root { color-scheme: light; }
  body, .portal-body, .tv-body { color: #000; background: #fff !important; }
  .portal-main, .tv-shell { width: 100%; padding: 0; }
  .portal-card, .pilot-summary article, .data-table th, .participant-profile-field { color: #000; background: #fff; box-shadow: none; }
  .participant-profile-field dd { color: #000; }
  .data-table th, .data-table td, .portal-card { border-color: #bbb; }
  .participant-table-wrap { max-height: none; overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.participant-import-actions .inscriptions-import-heading { flex-wrap:wrap; margin-bottom:0; }
.inscriptions-import-heading .activation-actions { margin:0; }
.participant-import-actions .inscriptions-import-status { margin:0; overflow-wrap:anywhere; }
.participant-import-actions summary.portal-button,
.participant-import-actions details button[type="submit"] { background:#16633f; border-color:#37845d; color:white; }
.participant-import-actions form[enctype] button[type="submit"] { background:#0b5f8a; border-color:#3888ac; color:white; }
.participant-import-actions input[type="file"]::file-selector-button {
  background:#623c95; color:white; border:1px solid #926bb9; border-radius:.45rem;
  padding:.4rem .7rem; margin-right:.6rem; font:inherit; cursor:pointer;
}
.participant-import-actions .portal-button:hover,
.participant-import-actions input[type="file"]::file-selector-button:hover { filter:brightness(1.18); }
.participant-import-actions details .portal-form textarea {
  min-height: 2.4rem;
  height: 2.4rem;
  padding-block: .45rem;
  line-height: 1.35;
  resize: vertical;
}
.icon-button { display:inline-flex; align-items:center; gap:.48rem; }
.monochrome-emoji { display:inline-grid; place-items:center; font-family:"Segoe UI Symbol","Noto Sans Symbols 2",sans-serif; font-variant-emoji:text; color:currentColor; line-height:1; filter:grayscale(1); }
.portal-button.pitcrew-button { background:#1477cf; border-color:#3ea1f4; color:#fff; box-shadow:0 10px 24px rgba(20,119,207,.22); }
.portal-button.pitcrew-button:hover { background:#2089e4; }

.group-timing-reminder {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:0 0 22px;
  padding:16px 18px;
  border:2px solid #ff4058;
  border-radius:14px;
  background:linear-gradient(135deg,rgba(239,35,60,.18),rgba(110,5,22,.28));
  box-shadow:0 0 24px rgba(239,35,60,.15);
}
.group-timing-reminder strong {
  color:#ff6678;
  font-size:clamp(.95rem,1.35vw,1.1rem);
  line-height:1.5;
}
.group-timing-reminder .group-timing-reminder-button {
  flex:0 0 auto;
  background:#e92842;
  border-color:#ff6678;
  color:#fff;
  box-shadow:0 0 20px rgba(233,40,66,.28);
}
@media (max-width:760px) {
  .group-timing-reminder { align-items:stretch; flex-direction:column; }
  .group-timing-reminder .group-timing-reminder-button { width:100%; text-align:center; }
}

.tv-launch-row {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:14px 18px;
  margin:0 0 22px;
}
.tv-launch-button {
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  border:1px solid #fff0a0;
  box-shadow:0 0 0 2px rgba(255,216,61,.22),0 0 30px rgba(255,208,0,.48) !important;
  animation:tvLaunchGlow 1.35s ease-in-out infinite alternate;
}
.tv-launch-button .monochrome-emoji { font-size:1.25rem; }
.tv-launch-row > strong { color:#ffdc44; font-size:.9rem; line-height:1.4; }
@keyframes tvLaunchGlow {
  from { box-shadow:0 0 0 2px rgba(255,216,61,.18),0 0 16px rgba(255,208,0,.32); }
  to { box-shadow:0 0 0 3px rgba(255,240,160,.36),0 0 34px rgba(255,208,0,.7); }
}
@media (max-width:620px) {
  .tv-launch-row { align-items:stretch; flex-direction:column; }
  .tv-launch-button { justify-content:center; width:100%; text-align:center; }
  .tv-launch-row > strong { text-align:center; }
}
