/* SportOne: midnight blue and lime. Metrics retain their semantic colors. */
:root {
  --accent:#456700; --bg:#edf2fa; --card:#fff; --raised:#f4f7fc;
  --text:#142843; --muted:#4f6481; --sep:#ced9e8; --fill:#e1ebd4;
  --bar:#f6f9fdf5; --on-accent:#fff; --brand-lime:#c8ff31;
  --card-shadow:0 4px 18px #0b244307;
}
:root[data-theme="dark"] {
  --accent:#c8ff31; --bg:#07172e; --card:#102642; --raised:#183450;
  --text:#f3f7ff; --muted:#b0c0d8; --sep:#2b4261; --fill:#203c45;
  --bar:#102642f5; --on-accent:#172100; --card-shadow:none;
  --purple:#c2a2ff; --red:#ff91a1; --blue:#83bcff; --orange:#ffc07b;
}
body{font-size:16px}h1{font-size:clamp(27px,3vw,34px)}h2{font-size:21px}h3{font-size:17px}
:root[data-theme="dark"] h1,:root[data-theme="dark"] .brand{color:#d9ff79}.home-activity-head h3{color:var(--accent)}
.card{padding:20px;border-radius:16px}.small{font-size:14px}
header.top{gap:12px;min-height:78px;padding-top:14px;padding-bottom:14px;flex-wrap:nowrap}
.brand{font-size:21px;letter-spacing:-.6px}.brand-mark{width:38px;height:38px}
#profile-shortcut{order:10;border:1px solid var(--sep);border-radius:999px;gap:9px;padding:5px 13px 5px 5px;max-width:220px;min-height:44px;background:var(--card);color:var(--text);font-weight:600}
.profile-avatar{width:34px;height:34px;border-radius:50%;object-fit:cover;display:grid;place-items:center;background:var(--fill);color:var(--accent);font-size:13px;flex:none}
.profile-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:145px}
#logout{display:none!important}#admin-access{order:8}#notifications{order:6}#quick-add{order:4}#quick-sync{order:5}#theme-toggle{order:3}
.section-chips{display:flex!important;gap:6px;flex-wrap:wrap;margin:0 0 22px}.chip{min-height:44px}
.section-chips .chip[aria-pressed="true"]{background:var(--accent);color:var(--on-accent)}
.strength-form,.strength-library{max-width:820px;margin-inline:auto;width:100%;min-width:0;box-sizing:border-box}
.strength-search{background:var(--card);color:var(--text);border:1px solid var(--sep);border-radius:14px;min-height:48px;width:100%;box-sizing:border-box}
.strength-search:focus{outline:2px solid var(--accent);outline-offset:2px}
.strength-form fieldset{min-width:0;margin-block:16px}.strength-form summary,.strength-filter summary{cursor:pointer;padding-block:14px}
.strength-blocks{padding-left:24px}.strength-blocks>li{padding:12px 0;border-bottom:1px solid var(--sep)}
.strength-library .card{overflow-wrap:anywhere}.strength-filter .section-chips{margin-top:8px}
.nav-submenu{display:none}.app-nav [aria-current]{background:var(--fill);color:var(--accent)}
.home-content{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;grid-auto-flow:row;align-items:stretch}
.home-widget{height:auto;align-self:stretch}.home-widget>.card{height:100%}
.home-content .summary-tile{min-height:145px;padding:18px;display:flex;flex-direction:column;align-items:flex-start}
.home-content .summary-tile b{font-size:clamp(26px,3vw,36px);font-weight:650;line-height:1.15}
.home-content .summary-secondary{margin-top:auto;padding-top:12px;line-height:1.6}
.home-content .widget-small .summary-tile{min-height:145px}.home-content .widget-medium .summary-tile{min-height:180px}
.home-content .widget-large .summary-tile{min-height:210px}
.home-content h2{margin:0 0 14px}.home-content .card{margin-bottom:0}
.home-activity-head{border-top:4px solid var(--accent)}.home-activity-head .measures{gap:18px 32px;margin:16px 0}
.home-activity-head dd{font-size:26px;letter-spacing:-.7px}.home-activity-head dt{font-size:13px}
.home-activity-head h3{font-size:20px}.dashboard-subtitle{margin:-8px 0 22px;color:var(--muted)}
.profile-sections{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:22px}
.profile-section-body{min-width:0}.profile-identity{display:flex;align-items:center;gap:16px;margin-bottom:22px;flex-wrap:wrap}
.profile-identity>.profile-avatar{width:76px;height:76px;font-size:24px}
.identity-form{display:grid;gap:14px;max-width:620px}.identity-form .field{margin:0}
.data-group-grid{display:grid;gap:16px}.data-group-grid>section{margin:0}
.data-group-grid .summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));background:none;gap:10px}
.data-group-grid .summary-tile{border-radius:12px;background:var(--raised)}
.personal-data-groups{display:grid;gap:16px;margin-bottom:16px}.personal-data-groups fieldset{border:1px solid var(--sep);border-radius:12px;padding:16px;margin:0;min-width:0}
.personal-data-groups legend{font-weight:600;padding:0 6px}.personal-data-groups .field{min-width:0}
.admin-section-body{display:grid;gap:16px}.admin-section-body>.card{margin:0}
.admin-section-body>.tiles{margin:0}.admin-section-body>.titlebar h2{margin:0}
.admin-hero{margin-bottom:24px}.admin-hero p{color:var(--muted);margin:6px 0 0}
.bike-overview{display:flex;flex-direction:column;gap:18px}.bike-overview>div{width:100%}
.bike-overview .bike{width:100%;max-width:560px;height:auto;max-height:230px;margin:0 auto}
.bike-picture{width:100%;height:240px;object-fit:contain;border-radius:12px;background:var(--raised);display:block}
.bike-picture-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.bike-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:16px}
.bike-menu button{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:50px;background:var(--raised);color:var(--text);text-align:left;font-size:14px}
.bike-menu button span:last-child{color:var(--accent)}.bike-overview .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.bike-summary .summary-grid{--summary-gap:10px;gap:var(--summary-gap);background:none}.bike-summary .summary-tile{border-radius:12px;background:var(--raised)}
.bikehead{gap:12px;flex-wrap:wrap}.bikehead h3{min-width:0;overflow-wrap:anywhere}
.report-actions{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:1000px){.has-navigation #quick-add,.has-navigation #quick-sync,.has-navigation #admin-access{display:none!important}}
@media(min-width:1000px){.home-content{grid-template-columns:repeat(4,minmax(0,1fr))}.bike-rows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}.bike-rows>.widget{margin:0}.bike-rows>.widget.open{grid-column:1/-1}.data-group-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:639px){.has-navigation header.top{gap:7px;min-height:65px}.has-navigation header.top>.mark,.has-navigation header.top>.brand{display:block}.has-navigation header.top>.brand{font-size:18px}.has-navigation header.top #theme-toggle{display:inline-flex}.brand-mark{width:30px;height:30px}#quick-add,#quick-sync{display:none!important}#profile-shortcut{padding-right:6px;max-width:120px;min-width:44px}.profile-label{max-width:65px;font-size:12px}.profile-avatar{width:30px;height:30px}.has-navigation header.top .grow{min-width:0}.card{padding:16px}.summary-tile{min-width:0}.summary-title{white-space:normal}.home-content{gap:12px}.home-content .summary-tile{padding:14px;min-height:140px}.home-content .summary-tile b{font-size:27px}.bike-picture{height:180px}.profile-identity>.profile-avatar{width:60px;height:60px}.section-chips{gap:5px}.section-chips button{font-size:13px;padding:9px 11px}}
@media(max-width:370px){.profile-label{display:none}.has-navigation header.top>.brand{font-size:16px}header.top{gap:5px}.has-navigation header.top #theme-toggle{display:none}}
/* Foreground notices use the current theme and stay within the safe area. */
.live-notice { position:fixed; z-index:1200; top:max(12px,env(safe-area-inset-top)); left:50%; transform:translateX(-50%); width:min(440px,calc(100% - 24px)); display:flex; align-items:center; gap:8px; box-shadow:0 8px 24px #0004; }
.live-notice button:first-child { flex:1; text-align:left; }
.notice-highlight { outline:2px solid var(--accent); outline-offset:3px; scroll-margin-top:90px; }

/* Shared session editor: colours identify steps in both themes. */
.workout-step-list { display:grid; gap:10px; min-width:0; }
.workout-step { border-left:5px solid var(--step-color); margin:0; padding:12px; }
[data-kind="warmup"] { --step-color:#cf9518; }
[data-kind="interval"] { --step-color:#297bd1; }
[data-kind="recovery"] { --step-color:#33a971; }
[data-kind="rest"] { --step-color:#7b8c9d; }
[data-kind="cooldown"] { --step-color:#9967c7; }
[data-kind="other"] { --step-color:#bb738f; }
[data-kind="repeat"] { --step-color:#82909e; }
.workout-step-tools { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.workout-menu summary { font-size:24px; cursor:pointer; padding:0 12px; }
.workout-drag { cursor:grab; padding:8px; }
.workout-step-line { display:grid; grid-template-columns:repeat(auto-fit,minmax(135px,1fr)); gap:8px; }
.workout-step .field { min-width:0; }
.workout-step input,.workout-step select { width:100%; min-width:0; }
.workout-step input[type="checkbox"] { width:auto; }
.workout-timeline { display:flex; height:24px; overflow:hidden; border-radius:6px; margin:10px 0; }
.workout-timeline span { background:var(--step-color); }
.workout-summary { margin-bottom:12px; }
@media(max-width:600px) { .workout-step-line { grid-template-columns:repeat(2,minmax(0,1fr)); } .workout-step { padding:8px; } .workout-drag { display:none; } }

/* Leaflet puts its zoom controls and the OpenStreetMap credit at z-index 1000, the same as the fixed .app-nav, and
   they were painted over the bottom bar (Rutas at 390 px, Marketing). Each map keeps them inside its own stack. */
.leaflet-container{isolation:isolate}
