/* Speedway Manager 1.2 — Professional Edition: final UI refinement.
   Visual-only overrides; game mechanics, IDs and API remain unchanged. */
:root{--ui-bg:#091321;--ui-surface:#14243a;--ui-elevated:#1a304a;--ui-line:#344b65;--ui-gold:#f5bb4c;--ui-text:#eef4fc;--ui-muted:#aec0d5;color-scheme:dark}
html{scroll-behavior:smooth}body{background:radial-gradient(ellipse at 85% 0%,#1b3149 0,transparent 42%),var(--ui-bg);color:var(--ui-text);font-size:14px;line-height:1.55;-webkit-font-smoothing:antialiased}
.shell{align-items:stretch}.sidebar{background:linear-gradient(180deg,#0c192b,#0b1726 70%,#0d2034);border-right:1px solid #35475c;box-shadow:8px 0 32px #0002}.brand{padding:10px 12px 22px;border-bottom:1px solid #33465b}.brand b{color:var(--ui-gold)}.brand-logo{object-fit:contain;filter:drop-shadow(0 2px 12px #f5bb4c2b)}
#nav,#admin-nav{gap:5px}#nav button,#admin-nav button{display:flex;align-items:center;gap:12px;min-height:44px;border:1px solid transparent;border-radius:9px;color:#bdccdd;font-size:13px;letter-spacing:.005em;transition:background .16s,color .16s,border-color .16s}#nav button:hover,#admin-nav button:hover{background:#20344d;color:#fff}#nav button.active,#admin-nav button.active{background:linear-gradient(100deg,#f5bb4c,#e9a93b);color:#0b1727!important;border-color:#ffd481;box-shadow:0 5px 20px #0003;font-weight:800}#nav button.active .nav-icon,#admin-nav button.active .nav-icon{filter:none}.nav-icon{display:inline-flex;align-items:center;justify-content:center;min-width:23px;font-size:17px}.nav-label{min-width:0}
.shell>main{max-width:1600px;width:100%;padding:26px clamp(18px,3vw,48px);margin:0 auto}.shell main>header{background:linear-gradient(115deg,#16283f,#102035);border:1px solid #304761;border-radius:15px;padding:20px 24px;margin-bottom:22px;box-shadow:0 10px 28px #0002}h1{font-size:clamp(23px,2.2vw,33px);line-height:1.2;letter-spacing:-.035em}.eyebrow{font-size:10px;color:#f2c46b;letter-spacing:.15em}.header-right{flex-wrap:wrap}.chip{padding:9px 13px;border-radius:9px;background:#223750;border-color:#405672;color:#e6edf8}.avatar{box-shadow:0 0 0 3px #f5bb4c1f}
.cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.card,.panel{background:linear-gradient(155deg,#1a2e46,#132238);border:1px solid #32475f;border-radius:14px;box-shadow:0 8px 28px #0002;min-width:0}.card{padding:20px 22px}.panel{padding:22px 24px}.card:hover,.panel:hover{border-color:#6d6a60!important}.panel h2{font-size:16px;font-weight:800;letter-spacing:.01em;line-height:1.35}.metric{letter-spacing:-.035em;overflow-wrap:anywhere}.muted,.hint,.small{color:#b0c1d5!important}.hint{font-size:12px}.grid2{gap:16px}.row{min-width:0}.stack>*{min-width:0}
.tablewrap{border:1px solid #30455e;border-radius:10px;overflow:auto;scrollbar-color:#516987 #15243a}table{min-width:460px;border-collapse:separate;border-spacing:0}th{position:relative;white-space:nowrap;padding:12px 13px!important;background:#1e344d!important}td{padding:12px 13px!important;vertical-align:middle}tbody tr:nth-child(even) td{background:#ffffff03}tbody tr:hover td{background:#f5bb4c0b!important}td:first-child,th:first-child{padding-left:16px!important}.tag{display:inline-flex;align-items:center;gap:4px;font-weight:700;white-space:nowrap}.bar{max-width:100%}
button{touch-action:manipulation}button:disabled{filter:grayscale(.2);opacity:.5}.btn{min-height:40px;padding:10px 16px!important;line-height:1.3;white-space:normal}.btn:active{transform:translateY(1px)}.btn.secondary:hover{background:#344e6d!important}input,select,textarea{min-height:42px;max-width:100%;font-size:13px!important}input::placeholder,textarea::placeholder{color:#8ba0b8}.field label{font-size:12px;font-weight:700;color:#d2deec}.form-grid{gap:14px}.notice{line-height:1.65;font-size:12px!important}.results{scrollbar-color:#516987 #15243a}.heat-entry{border:1px solid #324b64;gap:12px}.score{letter-spacing:-.045em;font-variant-numeric:tabular-nums}.actions{align-items:center}
.auth{width:min(92vw,490px);margin:clamp(25px,6vh,80px) auto!important;padding:clamp(22px,4vw,38px)!important}.auth-logo{display:block;width:min(100%,340px);height:auto;margin:0 auto 12px;object-fit:contain}.auth h1{font-size:clamp(27px,4vw,38px);text-align:center}.auth-kicker{text-align:center;letter-spacing:.17em}.auth-subtitle{text-align:center;font-size:13px!important}.auth-actions{display:flex;gap:10px;flex-wrap:wrap}.auth-actions .btn{flex:1 1 160px}
.dash-intro{background-position:center 45%!important;min-height:205px!important}.dash-intro h2{max-width:730px}.dash-intro p{max-width:660px}.game-clock{border-radius:10px}.match-row:focus-visible{outline:2px solid var(--ui-gold);outline-offset:-2px}
:focus-visible{outline:2px solid #ffd06a!important;outline-offset:3px}::selection{background:#f5bb4c;color:#0a1421}
@media(max-width:1100px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.shell>main{padding:18px!important}.panel{padding:19px}.shell main>header{padding:16px}}
@media(max-width:700px){.sidebar{box-shadow:none!important}.brand{border-bottom:0;padding:5px 8px!important}#nav button,#admin-nav button{font-size:12px!important;min-height:42px!important;gap:7px}.shell main>header{border-radius:12px;margin-bottom:14px!important}.header-right{width:100%;gap:8px}.chip{font-size:11px;padding:7px 10px}.panel,.card{border-radius:12px}.dash-intro{min-height:160px!important}.actions .btn{flex:1 1 140px}.grid2{gap:12px}}
@media(max-width:480px){.cards{grid-template-columns:1fr!important}.shell>main{padding:10px!important}.shell main>header{padding:14px!important}.card,.panel{padding:15px!important}.score{font-size:34px!important}.auth-actions{flex-direction:column}.auth-actions .btn{flex-basis:auto}.form-grid{grid-template-columns:1fr}.row{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
