:root{--navy:#111827;--navy-2:#182235;--ink:#172033;--muted:#6b7280;--line:#e5e9f0;--surface:#fff;--surface-subtle:#f8fafc;--canvas:var(--lh-bg, #f5f7fb);--blue:var(--lh-primary, #4263eb);--blue-soft:var(--lh-primary-soft, #edf2ff);--green:#16845b;--green-soft:#e9f8f1;--amber:#b76b08;--amber-soft:#fff5df;--red:#c13b4b;--red-soft:#fff0f1;--violet:#7950d7;--violet-soft:#f2edff;--cyan:#16869a;--cyan-soft:#e7f7fa;--radius:14px;--shadow:0 1px 2px rgba(16,24,40,.04),0 8px 24px rgba(16,24,40,.035)}
/* style.css predates the --lh-* token system and is loaded on every app page
   before theme-dark.css; its local vars never varied with data-theme, so
   dark mode inherited light-calibrated text/surface colors (e.g. --ink at
   ~1.1:1 against the dark canvas). Route them through the already
   WCAG-AA-checked --lh-* dark tokens instead of inventing a new palette. */
:root[data-theme="dark"]{--ink:var(--lh-text);--muted:var(--lh-text-muted);--surface:var(--lh-surface);--surface-subtle:var(--lh-surface-subtle);--line:var(--lh-border);--green:var(--lh-success);--green-soft:var(--lh-success-soft);--amber:var(--lh-warning);--amber-soft:var(--lh-warning-soft);--red:var(--lh-danger);--red-soft:var(--lh-danger-soft);--violet:#c39cf5;--violet-soft:#2b2148;--cyan:var(--lh-info);--cyan-soft:var(--lh-info-soft)}
:root[data-theme="dark"] a:hover,:root[data-theme="dark"] .link-button:hover,:root[data-theme="dark"] .button-link:hover{color:#b3c2ff}
*{box-sizing:border-box}
/* !important needed: component classes like .empty-state set display:flex,
   and author styles always beat the user-agent [hidden]{display:none} rule
   regardless of specificity, so without this the hidden attribute is ignored. */
[hidden]{display:none!important}
html{font-size:16px}
body{margin:0;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--canvas);color:var(--ink);line-height:1.5}
a{color:var(--blue);text-decoration:none}a:hover{color:#2f4fc7}
.app-shell{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100vh}
.sidebar{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;padding:25px 18px;background:var(--navy);color:#fff}
.brand{display:flex;align-items:center;gap:12px;padding:0 9px 26px;color:#fff}.brand:hover{color:#fff}.brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:linear-gradient(145deg,#6c84ff,#3655dd);font-size:18px;font-weight:800;box-shadow:0 7px 20px rgba(64,91,220,.35)}
.brand strong,.brand small,.sidebar-foot strong,.sidebar-foot small{display:block}.brand strong{font-size:17px;letter-spacing:-.02em}.brand small,.sidebar-foot small{color:#8e9aae;font-size:11px;margin-top:1px}
.side-nav{display:flex;flex-direction:column;gap:5px}.nav-label{padding:12px 12px 6px;color:#93a0b8;font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.side-nav a{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:9px;color:#aeb8c8;font-size:14px;font-weight:600;transition:.15s}.side-nav a:hover{background:rgba(255,255,255,.06);color:#fff}.side-nav a.active{background:#26334a;color:#fff;box-shadow:inset 3px 0 #6e86ff}.nav-icon{width:20px;text-align:center;font-size:18px;font-weight:400}
.sidebar-foot{display:flex;align-items:center;gap:10px;margin-top:auto;padding:16px 10px 2px;border-top:1px solid rgba(255,255,255,.08);font-size:12px}.sidebar-foot strong{font-size:12px}.status-dot{width:8px;height:8px;border-radius:50%;background:#35c98b;box-shadow:0 0 0 4px rgba(53,201,139,.12)}
.app-main{min-width:0}.topbar{height:70px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(24px,4vw,52px);border-bottom:1px solid var(--line);background:rgba(255,255,255,.92);backdrop-filter:blur(10px)}.topbar>div:first-child{display:flex;align-items:baseline;gap:9px}.topbar .eyebrow{margin:0}.topbar strong{font-size:14px}.topbar-actions{display:flex;align-items:center;gap:16px}.topbar-date{color:var(--muted);font-size:13px}.icon-button{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--navy);color:#fff;font-size:10px;font-weight:800}.icon-button:hover{color:#fff}
.content{width:100%;max-width:1540px;margin:0 auto;padding:40px clamp(24px,4vw,52px) 60px}.page-header{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:30px}.page-header h1{margin:3px 0 3px;font-size:32px;line-height:1.2;letter-spacing:-.035em}.page-header p{margin:0}.eyebrow{display:block;margin-bottom:3px;color:#8992a3;font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.muted{color:var(--muted)}
.button,.danger-button,button{display:inline-flex;align-items:center;justify-content:center;gap:7px;width:auto;margin:0;padding:10px 15px;border:0;border-radius:9px;background:var(--blue);color:#fff;font:inherit;font-size:13px;font-weight:700;line-height:1.2;cursor:pointer;box-shadow:0 2px 5px rgba(66,99,235,.18)}.button:hover,button:hover{background:#3453d1;color:#fff}.button.secondary{background:var(--surface-subtle);color:var(--ink);box-shadow:none}.button.ghost{border:1px solid var(--line);background:var(--surface);color:var(--muted);box-shadow:none}.button.small{padding:7px 10px;font-size:12px}.danger-button{background:#b93b48}.link-button{padding:0;background:transparent;color:var(--blue);font-weight:600;box-shadow:none}.link-button:hover{background:transparent;color:#294ac8}.link-button.danger{color:var(--red)}
.metric-grid{display:grid;grid-template-columns:repeat(6,minmax(145px,1fr));gap:14px;margin-bottom:20px}.metric-card{display:flex;align-items:flex-start;gap:13px;min-width:0;padding:19px 17px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}.metric-icon,.list-avatar{display:grid;flex:0 0 auto;place-items:center;width:36px;height:36px;border-radius:10px;background:var(--blue-soft);color:var(--blue);font-weight:800}.metric-icon.violet,.list-avatar.violet{background:var(--violet-soft);color:var(--violet)}.metric-icon.amber,.list-avatar.amber{background:var(--amber-soft);color:var(--amber)}.metric-icon.red{background:var(--red-soft);color:var(--red)}.metric-icon.green,.list-avatar.green{background:var(--green-soft);color:var(--green)}.metric-icon.cyan{background:var(--cyan-soft);color:var(--cyan)}.metric-card>div{min-width:0}.metric-label{display:block;color:var(--muted);font-size:11px;font-weight:650;white-space:nowrap}.metric-card strong{display:block;margin:1px 0 -2px;font-size:25px;line-height:1.2;letter-spacing:-.04em}.metric-card strong em{font-size:11px;font-style:normal;font-weight:700;color:var(--muted)}.metric-card small{color:#99a1af;font-size:10px;white-space:nowrap}
.grid,.dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.card{min-width:0;margin:0;padding:22px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}.content>.card,.content>.grid{margin-top:20px}.dashboard-grid .card{min-height:272px}.card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:17px}.card-header h2,.card h2{margin:0;font-size:15px;letter-spacing:-.015em}.card-header p{margin:3px 0 0;color:#929aaa;font-size:11px}.card-header>a{font-size:11px;font-weight:700}.table-card{padding:0;overflow:hidden}.table-card>.card-header{padding:20px 22px 0}
.item-list{list-style:none;margin:0;padding:0}.item-list li{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.item-list li:last-child{border-bottom:0}.list-avatar{width:34px;height:34px;border-radius:9px;font-size:14px}.list-primary{display:block;min-width:0;flex:1;color:var(--ink);font-size:12px;font-weight:700;overflow-wrap:anywhere}.list-primary small,.table-identity small{display:block;margin-top:1px;color:#929aaa;font-size:10px;font-weight:500}.list-value{color:var(--muted);font-size:11px;font-weight:650;white-space:nowrap}
.empty-state{display:flex;min-height:190px;align-items:center;justify-content:center;flex-direction:column;padding:26px;text-align:center;color:var(--muted)}.empty-state.compact{min-height:180px;padding:15px}.empty-state.large{min-height:360px}.empty-state h3{margin:11px 0 3px;color:var(--ink);font-size:14px}.empty-state p{max-width:430px;margin:0 0 15px;font-size:12px}.empty-icon{display:grid;place-items:center;width:45px;height:45px;border-radius:13px;background:var(--blue-soft);color:var(--blue);font-size:20px;font-weight:800}.empty-icon.success{background:var(--green-soft);color:var(--green)}
.table-wrap{width:100%;overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:12px}th,td{padding:13px 16px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle;white-space:nowrap}th{background:var(--surface-subtle);color:var(--muted);font-size:9px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:var(--surface-subtle)}.table-identity{display:flex;align-items:center;gap:10px;color:var(--ink)}.table-identity>span:last-child{display:block}.table-identity strong{font-size:12px}.row-actions,.form-actions,.page-heading{display:flex;align-items:center;gap:10px}.page-heading{justify-content:space-between}.inline-form,.bike-form{padding:0;border:0;background:transparent}.inline-form button{width:auto}.badge,.status{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:999px;background:var(--surface-subtle);color:var(--muted);font-size:9px;font-weight:800;text-transform:capitalize}.badge i{width:5px;height:5px;border-radius:50%;background:currentColor}.badge.active,.badge.installed,.badge.stock,.status.active,.status.installed,.status.stock,.status.ok{background:var(--green-soft);color:var(--green)}.badge.due,.status.due{background:var(--red-soft);color:var(--red)}.badge.warning,.status.warning{background:var(--amber-soft);color:var(--amber)}.badge.archived,.badge.sold,.badge.removed,.badge.disabled,.status.archived,.status.sold,.status.removed,.status.disabled,.status.unknown{background:var(--surface-subtle);color:var(--muted)}
.back{display:inline-block;margin-bottom:14px;color:var(--muted);font-size:12px;font-weight:700}.big{font-size:36px;color:var(--blue)}.details{display:grid;grid-template-columns:minmax(110px,1fr) 2fr;gap:10px 16px}.details dt{color:#8b94a4;font-size:12px}.details dd{margin:0;font-size:12px;overflow-wrap:anywhere}.mini-card{margin-top:16px;padding:16px;border:1px solid var(--line);border-radius:11px;background:var(--surface-subtle)}.actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}
form:not(.inline-form):not(.bike-form){padding:16px;border:1px solid var(--line);border-radius:11px;background:var(--surface-subtle)}input,select,textarea{width:100%;margin-top:8px;padding:10px 11px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit;font-size:13px}input:focus,select:focus,textarea:focus{outline:3px solid rgba(66,99,235,.12);border-color:#8196ed}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}.form-field{display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:12px;font-weight:650}.form-field-wide{grid-column:1/-1}.form-field input,.form-field select,.form-field textarea{margin:0}.check-field{display:flex;align-items:center;gap:10px;min-height:44px;font-size:12px}.check-field input{width:auto;margin:0}.form-actions{justify-content:flex-end;margin-top:22px}.form-errors{margin-top:20px;padding:16px 20px;border:1px solid #efb7bc;border-radius:11px;background:var(--red-soft);color:var(--red)}.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}
@media(max-width:1180px){.metric-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.app-shell{display:block}.sidebar{position:static;width:100%;height:auto;padding:14px 16px}.brand{padding:0 4px 13px}.brand small,.sidebar-foot,.nav-label{display:none}.side-nav{flex-direction:row;overflow-x:auto;padding-bottom:2px}.side-nav a{flex:0 0 auto;padding:8px 10px}.side-nav a.active{box-shadow:inset 0 -2px #6e86ff}.topbar{display:none}.content{padding:25px 16px 45px}.page-header{align-items:flex-start;flex-direction:column}.page-header h1{font-size:28px}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.grid,.dashboard-grid{grid-template-columns:1fr}.details{grid-template-columns:1fr}.page-heading,.form-actions{align-items:stretch;flex-direction:column}.card{padding:18px}.table-card{padding:0}}
@media(max-width:430px){.metric-grid{grid-template-columns:1fr}.nav-icon{display:none}.topbar-date{display:none}}

/* Cycling shell uses scoped names so core page styles cannot collapse its layout. */
.cycling-shell{display:flex;min-height:100vh;background:var(--canvas)}
.cycling-sidebar{position:sticky;top:0;display:flex;flex:0 0 260px;width:260px;height:100vh;flex-direction:column;overflow-y:auto;padding:25px 18px;background:var(--navy);color:#fff}
.cycling-sidebar .side-nav{display:flex;flex-direction:column;gap:5px}
.cycling-sidebar .side-nav a{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:9px;color:#b8c1d0;font-size:14px;font-weight:650}
.cycling-sidebar .side-nav a:hover{background:rgba(255,255,255,.07);color:#fff}
.cycling-sidebar .side-nav a.active{background:#26334a;color:#fff;box-shadow:inset 3px 0 #6e86ff}
.cycling-sidebar .nav-icon{display:grid;width:27px;height:23px;place-items:center;border:1px solid rgba(255,255,255,.15);border-radius:6px;color:#c9d2e2;font-size:9px;font-weight:800;letter-spacing:.04em}
.cycling-main{flex:1;min-width:0;min-height:100vh;background:var(--canvas)}
.cycling-topbar{position:sticky;top:0;z-index:10;display:flex;height:70px;align-items:center;justify-content:space-between;padding:0 clamp(24px,4vw,52px);border-bottom:1px solid var(--line);background:rgba(255,255,255,.96)}
.cycling-topbar>div:first-child{display:flex;align-items:baseline;gap:9px}.cycling-topbar .eyebrow{margin:0}.cycling-topbar strong{font-size:14px}
.cycling-content{width:100%;max-width:1480px;margin:0 auto;padding:40px clamp(24px,4vw,52px) 64px}
.cycling-content>.card,.cycling-content>.grid{margin-top:20px}
.stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:22px}
.stat-card{display:flex;min-width:0;align-items:flex-start;gap:14px;padding:20px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
.stat-marker{display:grid;flex:0 0 38px;width:38px;height:38px;place-items:center;border-radius:10px;background:var(--blue-soft);color:var(--blue);font-size:10px;font-weight:850;letter-spacing:.05em}
.stat-marker.violet{background:var(--violet-soft);color:var(--violet)}.stat-marker.amber{background:var(--amber-soft);color:var(--amber)}.stat-marker.red{background:var(--red-soft);color:var(--red)}.stat-marker.green{background:var(--green-soft);color:var(--green)}.stat-marker.cyan{background:var(--cyan-soft);color:var(--cyan)}
.stat-card>div{min-width:0}.stat-label{display:block;color:var(--muted);font-size:12px;font-weight:650}.stat-card strong{display:block;margin:2px 0;font-size:27px;line-height:1.15;letter-spacing:-.04em}.stat-card strong em{color:var(--muted);font-size:11px;font-style:normal}.stat-card small{display:block;color:#939cab;font-size:10px}
@media(max-width:1050px){.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.cycling-shell{flex-direction:column}.cycling-sidebar{position:relative;width:100%;height:auto;min-height:auto;flex-basis:auto;padding:14px 16px}.cycling-sidebar .brand{padding-bottom:12px}.cycling-sidebar .side-nav{flex-direction:row;overflow-x:auto}.cycling-sidebar .side-nav a{flex:0 0 auto}.cycling-sidebar .side-nav a.active{box-shadow:inset 0 -2px #6e86ff}.cycling-topbar{display:none}.cycling-content{padding:26px 16px 48px}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.stat-grid{grid-template-columns:1fr}}

/* Equipment management */
.type-badge{display:inline-flex;padding:4px 8px;border:1px solid var(--line);border-radius:7px;background:var(--surface-subtle);color:var(--muted);font-size:10px;font-weight:750;white-space:nowrap}
.source-document{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--line)}.source-document div:first-child{display:grid;gap:4px}.source-document small{color:var(--muted)}.document-inline{margin-top:14px}.document-inline object{display:block;width:100%;height:min(70vh,760px);min-height:420px;border:1px solid var(--line);background:var(--surface-subtle)}
.progress-cell{display:flex;align-items:center;gap:8px;min-width:130px}.progress-cell small{min-width:38px;color:var(--muted);font-size:10px;text-align:right}
.progress-track{height:7px;flex:1;overflow:hidden;border-radius:999px;background:var(--surface-subtle)}.progress-track span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#4f70e8,#7d91e9)}.progress-track.large{width:100%;height:9px;margin-bottom:16px}.progress-track.lifetime span{background:linear-gradient(90deg,#15936a,#42b98c)}
.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.usage-value{display:flex;align-items:baseline;gap:6px;margin:8px 0 22px}.usage-value strong{font-size:34px;letter-spacing:-.04em}.usage-value span{color:var(--muted);font-size:12px}.progress-label{display:flex;justify-content:space-between;margin:12px 0 6px;color:var(--muted);font-size:11px}.progress-label strong{color:var(--ink)}
.timeline{list-style:none;margin:0;padding:0}.timeline li{position:relative;display:flex;gap:13px;padding:0 0 18px}.timeline li>span{width:9px;height:9px;margin-top:5px;border:2px solid var(--surface);border-radius:50%;background:var(--blue);box-shadow:0 0 0 2px #aebcf5}.timeline li:not(:last-child)>span:after{position:absolute;top:15px;bottom:2px;left:4px;width:1px;background:var(--line);content:""}.timeline strong,.timeline small{display:block;font-size:12px}.timeline small{color:var(--muted);font-size:10px}.timeline p{margin:4px 0 0;color:var(--muted);font-size:11px;white-space:pre-line}.field-help{margin:16px 0 0;color:var(--muted);font-size:11px}.lifecycle-card{max-width:860px}
@media(max-width:900px){.detail-grid{grid-template-columns:1fr}}
.table-actions{margin-top:6px;font-size:10px}.table-actions a,.table-actions button{font-size:10px}

/* Shared application shell and home dashboard */
.app-shell{display:flex;min-height:100vh;background:var(--canvas)}
.app-sidebar{position:sticky;top:0;display:flex;flex:0 0 260px;width:260px;height:100vh;flex-direction:column;overflow-y:auto;padding:25px 18px;background:var(--navy);color:#fff}
.app-nav{display:flex;flex-direction:column;gap:5px}.app-nav a{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:9px;color:#b8c1d0;font-size:14px;font-weight:650}.app-nav a:hover{background:rgba(255,255,255,.07);color:#fff}.app-nav a.active{background:#26334a;color:#fff;box-shadow:inset 3px 0 #6e86ff}.app-nav .nav-icon{display:grid;width:27px;height:23px;place-items:center;border:1px solid rgba(255,255,255,.15);border-radius:6px;color:#c9d2e2;font-size:9px;font-weight:800;letter-spacing:.04em}
.app-main{flex:1;min-width:0;min-height:100vh;background:var(--canvas)}
.app-topbar{position:sticky;top:0;z-index:10;display:flex;height:70px;align-items:center;justify-content:space-between;padding:0 clamp(24px,4vw,52px);border-bottom:1px solid var(--line);background:rgba(255,255,255,.96)}.app-topbar>div:first-child{display:flex;align-items:baseline;gap:9px}.app-topbar .eyebrow{margin:0}.app-topbar strong{font-size:14px}
.app-content{width:100%;max-width:1480px;margin:0 auto;padding:40px clamp(24px,4vw,52px) 64px}.home-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.home-section{margin-top:34px}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:14px}.section-heading h2{margin:0;font-size:18px;letter-spacing:-.02em}.section-count{color:var(--muted);font-size:11px;font-weight:700}
.module-grid,.asset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.module-card{display:flex;align-items:center;gap:16px;color:var(--ink)}.module-card:hover,.asset-card:hover{border-color:#bac6ef;color:var(--ink);transform:translateY(-1px)}.module-mark{display:grid;flex:0 0 48px;width:48px;height:48px;place-items:center;border-radius:13px;background:var(--blue-soft);color:var(--blue);font-size:11px;font-weight:850}.module-card h3,.asset-card h3,.mini-card h3{margin:0;font-size:14px}.module-card p{margin:3px 0 9px;color:var(--muted);font-size:11px}.module-action{margin-left:auto;color:var(--blue);font-size:11px;font-weight:750}
.asset-card{color:var(--ink);transition:.15s}.asset-card-head,.mini-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.asset-card h3{margin:16px 0 12px}.asset-card dl{display:grid;grid-template-columns:auto 1fr;gap:5px 12px;margin:0;font-size:11px}.asset-card dt{color:var(--muted)}.asset-card dd{margin:0;text-align:right}.mini-card-heading{align-items:center}.mini-card-heading p{margin:2px 0 0;color:var(--muted);font-size:10px}.mini-card-heading>strong{font-size:13px}.data-table{width:100%}
@media(max-width:1050px){.module-grid,.asset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.app-shell{flex-direction:column}.app-sidebar{position:relative;width:100%;height:auto;flex-basis:auto;padding:14px 16px}.app-sidebar .brand{padding-bottom:12px}.app-nav{flex-direction:row;overflow-x:auto}.app-nav .nav-label,.app-sidebar .sidebar-foot{display:none}.app-nav a{flex:0 0 auto}.app-main{min-height:auto}.app-topbar{display:none}.app-content{padding:26px 16px 48px}.home-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.module-grid,.asset-grid{grid-template-columns:1fr}}
@media(max-width:480px){.home-stat-grid{grid-template-columns:1fr}}

/* Accessibility and typography foundation */
:root{
  --font-size-base:16px;
  --spacing-unit:8px;
  --control-height:46px;
  --border-radius:14px;
  --focus-ring:0 0 0 3px rgba(66,99,235,.28);
  --radius:var(--border-radius);
  --muted:#5f6878;
  --shadow:0 1px 2px rgba(16,24,40,.05),0 10px 28px rgba(16,24,40,.06);
}
html{font-size:var(--font-size-base)}
body{font-size:var(--font-size-base);line-height:1.55;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
.development-auth-banner{position:relative;z-index:20;padding:14px clamp(18px,3vw,48px);border-block:2px solid #7a271a;background:#b42318;color:#fff;font-weight:850;letter-spacing:.01em;text-align:center;box-shadow:0 4px 14px rgba(122,39,26,.28)}
a,button,input,select,textarea{transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease,color .15s ease,transform .15s ease}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid #7890ed;outline-offset:3px;box-shadow:var(--focus-ring)}

.app-sidebar,.cycling-sidebar{flex-basis:280px;width:280px;padding:calc(var(--spacing-unit)*4) calc(var(--spacing-unit)*2.5);font-size:16px}
.brand{gap:14px;padding:0 10px 30px}.brand-mark{width:44px;height:44px;font-size:20px}.brand strong{font-size:20px}.brand small,.sidebar-foot small{font-size:13px}.sidebar-foot{font-size:14px}
.app-nav,.cycling-sidebar .side-nav{gap:7px}.app-nav a,.cycling-sidebar .side-nav a{min-height:48px;padding:11px 13px;border-radius:10px;font-size:16px;line-height:1.35}.app-nav a.active,.cycling-sidebar .side-nav a.active{background:#2a3851;box-shadow:inset 4px 0 #8296f4}.app-nav .nav-icon,.cycling-sidebar .nav-icon{width:30px;height:28px;font-size:10px}.nav-label{padding:16px 13px 7px;font-size:12px;color:#8793a7}

.app-topbar,.cycling-topbar{height:76px;padding-inline:clamp(28px,3vw,56px)}.app-topbar strong,.cycling-topbar strong{font-size:16px}.topbar-date{font-size:15px}.icon-button{width:42px;height:42px;font-size:12px}
.app-content,.cycling-content{max-width:1800px;padding:48px clamp(28px,3vw,64px) 72px}.page-header{gap:28px;margin-bottom:36px}.page-header h1{margin:5px 0;font-size:clamp(32px,2.2vw,36px);line-height:1.2}.page-header p{font-size:16px}.eyebrow{margin-bottom:5px;font-size:12px}.home-section{margin-top:42px}.section-heading{margin-bottom:18px}.section-heading h2{font-size:22px}.section-count{font-size:14px}

.card{padding:28px;border-radius:var(--border-radius);box-shadow:var(--shadow)}.grid,.dashboard-grid,.detail-grid{gap:24px}.dashboard-grid .card{min-height:300px}.card-header{gap:20px;margin-bottom:22px}.card-header h2,.card h2{font-size:21px;line-height:1.3}.card-header p{margin-top:5px;font-size:14px}.card-header>a{font-size:15px}.table-card{padding:0}.table-card>.card-header{padding:26px 28px 0}.mini-card{margin-top:20px;padding:20px;border-radius:12px}.module-grid,.asset-grid{gap:22px}.module-card h3,.asset-card h3,.mini-card h3{font-size:19px}.module-card p{font-size:15px}.module-action{font-size:15px}.asset-card dl{font-size:15px}

.stat-grid{gap:20px;margin-bottom:28px}.stat-card{gap:18px;padding:26px;border-radius:var(--border-radius);box-shadow:var(--shadow)}.stat-marker{flex-basis:46px;width:46px;height:46px;font-size:12px}.stat-label{font-size:15px}.stat-card strong{margin:4px 0;font-size:36px}.stat-card strong em{font-size:15px}.stat-card small{font-size:14px;line-height:1.4}

.button,.danger-button,button{min-height:var(--control-height);padding:11px 20px;border-radius:10px;font-size:16px;line-height:1.25}.button:hover,.danger-button:hover,button:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(42,66,165,.2)}.button:active,.danger-button:active,button:active{transform:translateY(0)}.button.small{min-height:40px;padding:8px 14px;font-size:14px}.link-button{min-height:40px;padding:7px 4px;box-shadow:none}.link-button:hover{transform:none;box-shadow:none}

input,select,textarea{min-height:var(--control-height);margin-top:10px;padding:10px 13px;border-color:var(--line);border-radius:10px;font-size:16px;line-height:1.4}textarea{min-height:128px;resize:vertical}input:hover,select:hover,textarea:hover{border-color:#9ca9be}input:focus,select:focus,textarea:focus{border-color:#5f78dc;outline:3px solid rgba(66,99,235,.18)}input:disabled,select:disabled,textarea:disabled{background:var(--surface-subtle);color:var(--muted);cursor:not-allowed;opacity:1}.form-grid{grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:24px}.form-field{gap:8px;font-size:16px;font-weight:650}.check-field{min-height:var(--control-height);gap:12px;font-size:16px}.check-field input{width:21px;height:21px;min-height:21px;margin:0;accent-color:var(--blue)}.form-actions{gap:14px;margin-top:28px}.form-errors{font-size:16px}.field-help{font-size:14px}

.table-wrap{border-radius:0 0 var(--border-radius) var(--border-radius)}table,.data-table{font-size:15px;line-height:1.45}th,td{height:56px;padding:14px 18px;vertical-align:middle}th{position:sticky;top:0;z-index:2;background:var(--surface-subtle);color:var(--muted);font-size:13px;letter-spacing:.055em}tbody tr:nth-child(even){background:var(--surface-subtle)}tbody tr:hover{background:var(--surface-subtle)}.table-identity strong{font-size:16px}.table-identity small{font-size:14px}.table-actions{gap:12px;margin-top:9px;font-size:14px}.table-actions a,.table-actions button{font-size:14px}

.badge,.status{min-height:28px;padding:5px 10px;font-size:13px}.type-badge{min-height:30px;align-items:center;padding:5px 10px;font-size:13px}.item-list li{gap:16px;min-height:64px;padding:15px 0}.list-avatar{width:42px;height:42px;font-size:13px}.list-primary{font-size:16px}.list-primary small,.table-identity small{margin-top:3px;font-size:14px}.list-value{font-size:15px}.details{gap:14px 20px}.details dt,.details dd{font-size:15px}

.empty-state{min-height:260px;padding:36px;font-size:16px}.empty-state.compact{min-height:220px;padding:28px}.empty-state.large{min-height:420px}.empty-state h3{margin:16px 0 7px;font-size:21px}.empty-state p{max-width:540px;margin-bottom:22px;font-size:16px;line-height:1.55}.empty-icon{width:56px;height:56px;border-radius:16px;font-size:16px}

@media(min-width:1920px){.app-content,.cycling-content{max-width:1920px;padding-inline:72px}.stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.app-sidebar,.cycling-sidebar{position:relative;width:100%;height:auto;flex-basis:auto;padding:16px}.app-content,.cycling-content{padding:30px 18px 52px}.app-nav a,.cycling-sidebar .side-nav a{min-height:46px;font-size:15px}.card{padding:22px}.table-card{padding:0}.page-header{gap:18px;margin-bottom:28px}.page-header h1{font-size:30px}.stat-grid{gap:14px}.form-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
.badge.info{background:var(--blue-soft);color:var(--blue)}.badge.critical{background:var(--red-soft);color:var(--red)}
.advanced-fields{padding:14px 16px;border:1px solid var(--line);border-radius:var(--border-radius);background:var(--surface-subtle)}.advanced-fields summary{cursor:pointer;font-weight:750}.advanced-fields[open] summary{margin-bottom:16px}
.bike-photo-card{display:grid;grid-template-columns:minmax(320px,1.5fr) minmax(280px,1fr);gap:28px;align-items:center}.bike-photo-preview{display:grid;min-height:320px;overflow:hidden;place-items:center;border-radius:var(--border-radius);background:var(--surface-subtle)}.bike-photo-preview img{display:block;width:100%;height:100%;max-height:520px;object-fit:contain}.bike-photo-placeholder{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;color:var(--muted);text-align:center}.bike-photo-placeholder span{display:grid;width:64px;height:64px;place-items:center;border-radius:18px;background:var(--blue-soft);color:var(--blue);font-weight:850}.bike-photo-placeholder strong{color:var(--ink);font-size:20px}.bike-photo-actions{display:flex;align-items:stretch;flex-direction:column;gap:16px}.bike-photo-actions h2,.bike-photo-actions p{margin:0}.bike-image-upload{display:flex;align-items:stretch;flex-direction:column;gap:12px}.image-dropzone{position:relative;display:flex;min-height:120px;align-items:center;justify-content:center;overflow:hidden;padding:20px;border:2px dashed #aeb9ca;border-radius:var(--border-radius);background:var(--surface-subtle);color:var(--blue);font-weight:750;text-align:center;cursor:pointer}.image-dropzone:hover,.image-dropzone:focus-within{border-color:var(--blue);background:var(--blue-soft)}.image-dropzone input{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;opacity:0;cursor:pointer}.asset-card-media{display:grid;width:calc(100% + 56px);height:240px;margin:-28px -28px 22px;overflow:hidden;place-items:center;border-bottom:1px solid var(--line);border-radius:var(--border-radius) var(--border-radius) 0 0;background:var(--surface-subtle)}.asset-card-image{display:block;width:100%;height:100%;padding:12px;object-fit:contain;object-position:center}.asset-card-placeholder{display:grid;width:100%;height:100%;place-items:center;background:linear-gradient(145deg,var(--blue-soft),var(--surface-subtle));color:var(--muted);font-size:24px;font-weight:850}
@media(max-width:900px){.bike-photo-card{grid-template-columns:1fr}.bike-photo-preview{min-height:240px}}
.bike-tabs{display:flex;gap:8px;margin:0 0 22px;overflow-x:auto;border-bottom:1px solid var(--line)}.bike-tabs a{display:flex;align-items:center;min-height:42px;padding:0 12px;border-bottom:2px solid transparent;color:var(--muted);font-size:14px;font-weight:750;white-space:nowrap}.bike-tabs a.active{border-color:var(--blue);color:var(--ink)}.list-avatar.image{display:block;object-fit:cover;background:var(--surface-subtle)}.table-identity .list-avatar.image{width:42px;height:42px}
@media(max-width:760px){.asset-card-media{width:calc(100% + 44px);height:210px;margin:-22px -22px 20px}}
.document-preview{display:grid;min-height:260px;place-items:center;background:var(--surface-subtle)}.document-preview img{display:block;max-width:100%;max-height:620px;object-fit:contain}
.fit-import-card{display:grid;grid-template-columns:minmax(240px,1fr) minmax(420px,2fr);gap:28px;align-items:center;margin-bottom:24px}.fit-import-card h2,.fit-import-card p{margin:0}.fit-import-form{display:grid;grid-template-columns:minmax(160px,.7fr) minmax(240px,1.5fr) auto;gap:14px;align-items:end}.fit-import-form .image-dropzone{min-height:76px}.import-report{margin-bottom:24px}@media(max-width:900px){.fit-import-card,.fit-import-form{grid-template-columns:1fr}}
.fit-support{display:flex;gap:12px;margin-top:14px!important;font-size:14px}.fit-support span{color:var(--muted)}.fit-import-card small{display:block;margin-top:8px;color:var(--muted)}.first-ride-card{display:flex;align-items:center;gap:18px;margin-bottom:24px;padding-block:20px}.first-ride-card div{flex:1}.first-ride-card h2,.first-ride-card p{margin:0}.first-ride-card .empty-icon{flex:0 0 auto}.ride-stat-grid{margin-bottom:24px}@media(max-width:760px){.first-ride-card{align-items:flex-start;flex-direction:column}}
.integration-strip{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px;padding-block:18px}.integration-strip h2,.integration-strip p{margin:0}.integration-card .form-actions{align-items:center}.integration-card .field-help{max-width:620px}@media(max-width:760px){.integration-strip{align-items:flex-start;flex-direction:column}}
.account-tabs{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:20px}@media(max-width:760px){.account-tabs{gap:8px}.account-tabs .button{flex:1 1 auto}}
/* The active tab reuses .button (solid --blue fill, white text) since it's
   the only "current page" indicator in the codebase built on the generic
   button style rather than a border accent like .bike-tabs a.active - that
   solid fill reads as a stray light panel against the dark canvas. Match
   the .bike-tabs convention: accent border only, fill stays level with the
   inactive tabs beside it. */
.account-tabs a[aria-current="page"]{background:var(--surface-subtle);color:var(--ink);border-left:3px solid var(--blue);box-shadow:none}
.performance-kpis{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:24px}.performance-kpis .stat-card strong{font-size:28px}.no-data{color:var(--muted);font-size:16px!important;font-weight:650}.performance-highlights{margin-bottom:24px}.highlight-value{display:block;margin:12px 0 4px;font-size:34px;letter-spacing:-.04em}.weekly-comparison{margin-bottom:32px}.trend-change{font-weight:750}.trend-change.positive{color:var(--green)}.trend-change.negative{color:var(--red)}.analytics-trends{display:grid;gap:20px;margin-bottom:32px}.analytics-trends .section-heading{margin-bottom:0}.trend-card{padding:0}.trend-card .card-header{padding:22px 24px}.trend-volume{display:grid;min-width:160px;gap:7px}.zone-summary{margin-bottom:24px}.zone-group+.zone-group{margin-top:28px}.zone-group h3{margin:0 0 14px}.zone-row{display:grid;grid-template-columns:minmax(130px,.8fr) minmax(180px,2fr) 90px 60px;gap:14px;align-items:center;padding:9px 0}.zone-row strong,.zone-row small{text-align:right}.zone-row small{color:var(--muted)}@media(max-width:1100px){.performance-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.performance-kpis{grid-template-columns:1fr}.zone-row{grid-template-columns:1fr}.zone-row strong,.zone-row small{text-align:left}}
.catalog-filters{display:grid;grid-template-columns:2fr repeat(4,minmax(150px,1fr));gap:18px;align-items:end;margin-bottom:24px}.catalog-filters .form-actions{justify-content:flex-start;margin:0}.catalog-image-card{display:grid;min-height:300px;place-items:center}.catalog-image{display:block;max-width:100%;max-height:420px;object-fit:contain;border-radius:10px}.pagination{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 22px;border-top:1px solid var(--line);color:var(--muted);font-size:14px}.button-link{min-height:0;padding:0;background:transparent;color:var(--blue);box-shadow:none}.button-link:hover{background:transparent;color:#2f4fc7;box-shadow:none;transform:none}
@media(max-width:1200px){.catalog-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog-filters .form-field-wide{grid-column:1/-1}}
@media(max-width:760px){.catalog-filters{grid-template-columns:1fr}.pagination{align-items:stretch;flex-direction:column}.catalog-image-card{min-height:220px}}
.lh-spinner{display:inline-block;width:30px;height:30px;margin-bottom:14px;border:3px solid var(--line);border-top-color:var(--blue);border-radius:50%;animation:lh-spin .7s linear infinite}@keyframes lh-spin{to{transform:rotate(360deg)}}
#coach-error .button{margin-top:14px}#coach-result .notice{margin-top:20px}
.debug-log-panel .row-actions{margin:0 0 10px}.debug-log{max-height:280px;margin:0;padding:12px;overflow-y:auto;border:1px solid var(--line);border-radius:9px;background:var(--surface-subtle);color:var(--ink);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;line-height:1.5;white-space:pre-wrap;word-break:break-word}
.sim-ride-list{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}.sim-ride-list li{margin:0}.sim-ride-list button{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:2px;padding:12px 16px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);font:inherit;text-align:left;cursor:pointer;box-shadow:none}.sim-ride-list button:hover{border-color:var(--blue);background:var(--blue-soft)}.sim-ride-list button strong{font-size:13px}.sim-ride-list button small{color:var(--muted);font-size:12px}.sim-upload-actions{justify-content:flex-start;align-items:center}
.sim-playback-progress-bar{display:block;width:100%;margin-top:8px;height:8px;accent-color:var(--blue)}
