/* ==========================================================
   Athlevia by SOLID — app styles
   Brand colours taken from the SOLID logo:
     navy  #151932 · blue #2B407F · teal #71D1D9
   Type: Plus Jakarta Sans (one family, tabular figures for data)
   ========================================================== */
:root{
  --bg:#FFFFFF; --surface:#FFFFFF; --surface-2:#F7F8FB; --sunk:#F1F3F8;
  --ink:#151932; --ink-2:#3D4466; --muted:#6E7491;
  --line:#E8EBF2; --line-2:#D5DAE5;
  --navy:#151932; --blue:#2B407F; --blue-2:#3A55A6; --blue-soft:#E8ECF7;
  --teal:#71D1D9; --teal-ink:#1D8C96; --teal-soft:#E3F6F8;
  --accent:var(--blue); --accent-ink:#FFFFFF; --accent-soft:var(--blue-soft);
  --ok:#14945F; --ok-soft:#E1F5EC;
  --warn:#C27A00; --warn-soft:#FFF3D9;
  --crit:#D93B3F; --crit-soft:#FDE7E7;
  --shadow-sm:0 1px 2px rgba(21,25,50,.05);
  --shadow:0 1px 2px rgba(21,25,50,.04), 0 6px 20px rgba(21,25,50,.06);
  --shadow-lg:0 10px 40px rgba(21,25,50,.16);
  --overlay:rgba(21,25,50,.45);
  --side-bg:#FFFFFF; --side-ink:#6E7491; --side-ink-strong:#151932;
  --font:"Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --display:var(--font); --ui:var(--font); --mono:var(--font); --body:var(--font);
  --r:16px; --r-sm:12px;
  --safe-b:env(safe-area-inset-bottom,0px);
  --safe-t:env(safe-area-inset-top,0px);
  --logo-blue:#2B407F;
  --on-blue:#FFFFFF;                       /* text/icons on a blue fill */
  --inverse:#151932; --on-inverse:#FFFFFF; /* toast & chart tooltip */
  --topbar-bg:rgba(255,255,255,.92);
  --nav-shadow:0 8px 30px rgba(21,25,50,.14);
}

/* ---------- dark theme (data-theme set by js/theme.js: follows the phone, or the user's choice) ---------- */
:root[data-theme="dark"]{
  --bg:#0E1120; --surface:#161A2E; --surface-2:#1C2138; --sunk:#222844;
  --ink:#E9EBF5; --ink-2:#C3C8DC; --muted:#8F96B3;
  --line:#2A3052; --line-2:#3A4268;
  --navy:#E9EBF5; --blue:#8EA6F0; --blue-2:#B0C1F5; --blue-soft:#232D52;
  --teal:#71D1D9; --teal-ink:#7FD8DF; --teal-soft:#15333B;
  --accent:var(--blue); --accent-ink:#0E1120; --accent-soft:var(--blue-soft);
  --ok:#43C98F; --ok-soft:#13332A;
  --warn:#F0B44A; --warn-soft:#3A2F14;
  --crit:#FF7477; --crit-soft:#3E1C21;
  --shadow-sm:0 1px 2px rgba(0,0,0,.35);
  --shadow:0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.35);
  --shadow-lg:0 10px 40px rgba(0,0,0,.55);
  --overlay:rgba(4,6,14,.66);
  --side-bg:#121628; --side-ink:#8F96B3; --side-ink-strong:#E9EBF5;
  --logo-blue:#8EA6F0;
  --on-blue:#0E1120;
  --inverse:#E9EBF5; --on-inverse:#151932;
  --topbar-bg:rgba(14,17,32,.88);
  --nav-shadow:0 8px 30px rgba(0,0,0,.5);
}

*{box-sizing:border-box}
html{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}
html,body{height:100%}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:var(--font); font-size:15px; line-height:1.5; font-feature-settings:"tnum" 0;
  -webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent;
}
h1,h2,h3{font-family:var(--font); font-weight:700; letter-spacing:-.02em; margin:0; text-wrap:balance}
p{margin:0}
a{color:inherit; text-decoration:none}
.lnk{color:var(--blue); font-weight:600}
code{font-family:ui-monospace,Menlo,Consolas,monospace; font-size:.88em; background:var(--sunk); padding:1px 5px; border-radius:5px}
button,input,select,textarea{font:inherit; color:inherit}
button{cursor:pointer}
:focus-visible{outline:2px solid var(--blue); outline-offset:2px; border-radius:6px}
.num{font-variant-numeric:tabular-nums}
.muted{color:var(--muted)}
.hide{display:none !important}

/* ---------- shell ---------- */
.app{display:grid; grid-template-columns:1fr; min-height:100%}
.side{display:none}
.col-main{min-width:0; display:flex; flex-direction:column}
.topbar{
  position:sticky; top:0; z-index:20;
  background:var(--topbar-bg);
  backdrop-filter:saturate(1.4) blur(14px); -webkit-backdrop-filter:saturate(1.4) blur(14px);
  padding:calc(12px + var(--safe-t)) 16px 12px; display:flex; align-items:center; gap:12px;
}
.brand{display:flex; align-items:center; gap:10px; min-width:0}
.brand-mark{width:34px; height:28px; flex:none}
.brand-text{min-width:0}
.brand-name{font-weight:800; font-size:17px; letter-spacing:-.02em; line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.brand-sub{font-size:12px; color:var(--muted); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.topbar .spacer{flex:1}
.tb-info{display:none; flex-direction:column; line-height:1.3}
.tb-info [data-today]{font-weight:700; font-size:15px; color:var(--ink)}
.tb-info .tb-mode{font-size:12px; color:var(--muted)}
.iconbtn{
  width:40px; height:40px; display:grid; place-items:center; border-radius:12px; flex:none;
  border:0; background:var(--surface); color:var(--ink-2); box-shadow:var(--shadow-sm);
}
.iconbtn:hover{color:var(--blue)}
.iconbtn svg{width:19px; height:19px}

main{padding:4px 16px calc(112px + var(--safe-b)); max-width:1280px; width:100%; margin:0 auto}

/* mobile bottom navigation: six equal tabs */
.bottomnav{
  position:fixed; left:12px; right:12px; bottom:calc(10px + var(--safe-b)); z-index:30;
  display:grid; grid-template-columns:repeat(6,1fr); align-items:center;
  background:var(--surface); border-radius:22px; padding:8px 6px;
  box-shadow:var(--nav-shadow), 0 0 0 1px var(--line);
}
.navbtn{
  display:flex; flex-direction:column; align-items:center; gap:3px; padding:6px 2px;
  background:none; border:0; color:var(--muted); font-size:11px; font-weight:600; border-radius:12px;
}
.navbtn svg{width:22px; height:22px}
.navbtn[aria-current="page"]{color:var(--blue)}
.bottomnav .navbtn{min-width:0}
.bottomnav .navbtn span{max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
/* active tab: soft pill behind the icon (Material-style indicator) */
.bottomnav .navbtn svg{box-sizing:content-box; padding:3px 14px; border-radius:999px; transition:background .15s}
.bottomnav .navbtn[aria-current="page"] svg{background:var(--blue-soft)}

/* tablet: slim navy rail */
@media (min-width:720px){
  .app{grid-template-columns:88px 1fr}
  .bottomnav{display:none}
  .side{
    display:flex; flex-direction:column; gap:6px; position:sticky; top:0; height:100vh; height:100dvh;
    overflow-y:auto; overscroll-behavior:contain; scrollbar-width:none;
    background:var(--side-bg); padding:calc(18px + var(--safe-t)) 10px calc(14px + var(--safe-b)); align-items:stretch; color:var(--side-ink); border-right:1px solid var(--line);
  }
  .side::-webkit-scrollbar{display:none}
  .side .brand{justify-content:center; margin-bottom:18px}
  .side .brand-logo{display:none}
  .side .brand-mark{display:block; width:40px; height:32px}
  .side .brand-text{display:none}
  .side .navbtn{padding:10px 4px; font-size:11px; color:var(--side-ink); border-radius:14px}
  .side .navbtn:hover{background:var(--surface-2); color:var(--ink)}
  .side .navbtn[aria-current="page"]{background:var(--blue-soft); color:var(--blue)}
  .side .grow{flex:1}
  /* tablet: rail shows the mark, top bar shows the app + club name; date & mode move to the right */
  .topbar .brand{display:flex}
  .topbar .brand-mark{display:none}
  .topbar .brand-name{font-size:19px}
  .topbar .brand-sub{font-size:12.5px}
  .tb-info{display:flex; order:3; align-items:flex-end; text-align:right}
  .topbar .spacer{order:2}
  .topbar .iconbtn.settings{display:none}
  main{padding:8px 28px 48px}
  .topbar{padding:18px 28px 14px}
}
/* desktop: labelled sidebar with full SOLID logo */
@media (min-width:1100px){
  .app{grid-template-columns:248px 1fr}
  .side{padding:26px 16px}
  .side .brand{flex-direction:column; align-items:flex-start; gap:10px; padding:0 10px; margin-bottom:28px}
  .side .brand-logo{display:block; width:124px; height:auto; color:var(--navy)}
  .side .brand-mark{display:none}
  .side .brand-text{display:block}
  .side .brand-name{color:var(--ink); font-size:12px; font-weight:700; letter-spacing:.14em; text-transform:uppercase}
  .side .brand-sub{color:var(--muted); font-size:12px}
  .side .navbtn{flex-direction:row; gap:12px; font-size:14.5px; font-weight:600; padding:11px 14px; justify-content:flex-start}
  .side .navbtn svg{width:20px; height:20px}
  .side .foot{display:block}
  .topbar .brand{display:none}
  .tb-info{order:0; align-items:flex-start; text-align:left}
  main{padding:8px 40px 56px}
  .topbar{padding:22px 40px 16px}
}
.side .foot{display:none; font-size:12px; color:var(--muted); padding:12px 14px; border-radius:12px; background:var(--surface-2); line-height:1.5}
.side .foot b{display:block; color:var(--ink); font-weight:600}

/* ---------- page header ---------- */
.ph{display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px 16px; margin:8px 0 18px}
.ph .t{flex:1 1 260px; min-width:0}
.eyebrow{font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--muted)}
.ph h1{font-size:clamp(26px,4vw,34px); line-height:1.12; margin-top:4px; font-weight:800; letter-spacing:-.03em}
.ph .sub{color:var(--muted); font-size:14px; margin-top:6px}
.actions{display:flex; gap:8px; flex-wrap:wrap}

/* hero (home) — plain, white */
.hero{margin:8px 0 18px}
.hero .eyebrow{color:var(--muted)}
.hero h1{font-size:clamp(26px,4vw,34px); font-weight:800; letter-spacing:-.03em; margin-top:4px}
.hero .hero-row{display:flex; flex-wrap:wrap; align-items:flex-end; gap:14px 24px; margin-top:16px}
.hero .big{font-size:44px; font-weight:800; letter-spacing:-.04em; line-height:1; font-variant-numeric:tabular-nums}
.hero .big small{font-size:18px; font-weight:600; color:var(--muted); letter-spacing:0}
.hero .lbl{font-size:13px; color:var(--muted); margin-top:4px}
.hero .zones{display:flex; gap:6px; flex-wrap:wrap}
.hero .zones span{display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; padding:5px 10px; border-radius:999px; background:var(--surface-2); color:var(--ink-2)}
.hero .zones i{width:8px; height:8px; border-radius:50%}
.hero .btn-hero{margin-left:auto; height:44px; padding:0 18px; border-radius:12px; display:inline-flex; align-items:center; gap:8px; background:var(--blue); color:var(--on-blue); font-weight:700; font-size:14.5px}
.hero .btn-hero svg{width:18px; height:18px}
@media (max-width:520px){ .hero .btn-hero{margin-left:0; width:100%; justify-content:center} }

/* ---------- buttons & inputs ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  height:42px; padding:0 18px; border-radius:12px; border:1px solid var(--line);
  background:var(--surface); color:var(--ink); font-weight:600; font-size:14px; white-space:nowrap;
  box-shadow:var(--shadow-sm); transition:transform .08s, background .15s;
}
.btn:hover{border-color:var(--line-2)}
.btn:active{transform:scale(.98)}
.btn svg{width:17px; height:17px}
.btn-p{background:var(--blue); border-color:var(--blue); color:var(--on-blue)}
.btn-p:hover{background:var(--blue-2); border-color:var(--blue-2)}
.btn-d{color:var(--crit); background:var(--crit-soft); border-color:transparent; box-shadow:none}
.btn-s{height:34px; padding:0 12px; font-size:13px; border-radius:10px}
.btn:disabled{opacity:.45; cursor:not-allowed; transform:none}

.field{display:flex; flex-direction:column; gap:6px; min-width:0}
.field > span{font-size:12.5px; font-weight:600; color:var(--ink-2)}
.inp, select.inp, textarea.inp{
  height:44px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2);
  padding:0 14px; width:100%; min-width:0; font-size:15px; transition:border-color .15s, background .15s;
}
textarea.inp{height:auto; padding:12px 14px; min-height:84px; resize:vertical}
.inp:focus{outline:0; border-color:var(--blue); background:var(--surface); box-shadow:0 0 0 4px color-mix(in srgb,var(--blue) 14%,transparent)}
.grid-f{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px}
.grid-f .span2{grid-column:span 2}
@media (max-width:420px){ .grid-f .span2{grid-column:span 1} }

.seg{display:inline-flex; background:var(--sunk); border-radius:12px; padding:4px; gap:2px; max-width:100%; overflow-x:auto}
.seg button{border:0; background:none; padding:8px 14px; border-radius:9px; font-size:13.5px; font-weight:600; color:var(--muted); white-space:nowrap}
.seg button[aria-pressed="true"]{background:var(--surface); color:var(--ink); box-shadow:var(--shadow-sm)}

.chips{display:flex; gap:8px; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; padding-bottom:2px}
.chips::-webkit-scrollbar{display:none}
.chip{border:1px solid var(--line); background:var(--surface); border-radius:999px; padding:7px 14px; font-size:13px; font-weight:600; color:var(--ink-2); white-space:nowrap}
.chip[aria-pressed="true"]{background:var(--blue); color:var(--on-blue); border-color:var(--blue)}

/* 1–5 and RPE pickers */
.scale{display:grid; grid-template-columns:repeat(5,1fr); gap:6px}
.scale button{
  height:42px; border:1px solid var(--line); background:var(--surface-2); border-radius:12px;
  font-size:15px; font-weight:700; color:var(--ink-2); font-variant-numeric:tabular-nums;
}
.scale button[aria-pressed="true"]{background:var(--blue); color:var(--on-blue); border-color:var(--blue); box-shadow:0 4px 12px color-mix(in srgb,var(--blue) 30%,transparent)}
.rpe{grid-template-columns:repeat(11,1fr); gap:4px}
.rpe button{height:38px; font-size:13px; padding:0; border-radius:10px}

/* ---------- surfaces ---------- */
.card{background:var(--surface); border-radius:var(--r); border:1px solid var(--line)}
.card-h{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 20px 0}
.card-h h2{font-size:16.5px; font-weight:700; letter-spacing:-.01em}
.card-h .lnk{font-size:13.5px; background:none; border:0; padding:0}
.card-b{padding:16px 20px 20px}
.stack{display:flex; flex-direction:column; gap:16px}
.cols{display:grid; grid-template-columns:1fr; gap:16px}
@media (min-width:960px){
  .cols-2{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr)}
  .cols-2e{grid-template-columns:1fr 1fr}
}

/* KPI tiles */
.kpis{display:grid; grid-template-columns:repeat(2,1fr); gap:12px}
@media (min-width:720px){ .kpis{grid-template-columns:repeat(4,1fr)} }
.kpi{background:var(--surface); border-radius:var(--r); padding:16px; min-width:0; border:1px solid var(--line); position:relative}
.kpi .ico{width:34px; height:34px; border-radius:10px; display:grid; place-items:center; margin-bottom:12px; background:var(--blue-soft); color:var(--blue)}
.kpi .ico svg{width:18px; height:18px}

.kpi .k{font-size:12.5px; font-weight:600; color:var(--muted)}
.kpi .v{font-weight:800; font-size:28px; letter-spacing:-.03em; line-height:1.1; margin-top:4px; font-variant-numeric:tabular-nums}
.kpi .v small{font-size:15px; font-weight:600; color:var(--muted); letter-spacing:0}
.kpi .d{font-size:12.5px; color:var(--muted); margin-top:4px}

/* pills */
.pill{display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:700; padding:3px 10px; border-radius:999px; white-space:nowrap; line-height:1.6; font-variant-numeric:tabular-nums}
.pill::before{content:""; width:6px; height:6px; border-radius:50%; background:currentColor}
.pill.plain::before{display:none}
.z-ok{background:var(--ok-soft); color:var(--ok)}
.z-warn{background:var(--warn-soft); color:var(--warn)}
.z-crit{background:var(--crit-soft); color:var(--crit)}
.z-none{background:var(--sunk); color:var(--muted)}
.z-blue{background:var(--blue-soft); color:var(--blue)}
.z-acc{background:var(--teal-soft); color:var(--teal-ink)}

/* readiness board: avatar rings */
.board{display:grid; grid-template-columns:repeat(auto-fill,minmax(88px,1fr)); gap:14px 8px}
.tile{display:flex; flex-direction:column; align-items:center; gap:6px; padding:4px 2px; text-align:center; border-radius:14px; min-width:0}
.tile:hover{background:var(--surface-2)}
.ring{position:relative; width:62px; height:62px}
.ring svg{width:62px; height:62px; transform:rotate(-90deg)}
.ring .trk{fill:none; stroke:var(--sunk); stroke-width:5}
.ring .val{fill:none; stroke-width:5; stroke-linecap:round}
.ring .c{position:absolute; inset:8px; border-radius:50%; display:grid; place-items:center; background:var(--blue-soft); color:var(--blue); font-weight:800; font-size:16px; letter-spacing:-.02em}
.ring.asing .c,.ring.heritage .c{background:var(--surface); box-shadow:inset 0 0 0 1.5px var(--blue)}
.tile .nm{font-size:12.5px; font-weight:600; max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.tile .sc{font-size:12px; font-weight:700; font-variant-numeric:tabular-nums}
.tile.ok .sc{color:var(--ok)} .tile.warn .sc{color:var(--warn)} .tile.crit .sc{color:var(--crit)} .tile.none .sc{color:var(--muted)}
.ring.ok .val{stroke:var(--ok)} .ring.warn .val{stroke:var(--warn)} .ring.crit .val{stroke:var(--crit)}

/* alerts */
.alerts{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px}
.alerts li{display:grid; grid-template-columns:auto 1fr; gap:12px; padding:10px; border-radius:12px; align-items:start}
.alerts li:hover{background:var(--surface-2)}
.alerts .ic{width:34px; height:34px; border-radius:10px; display:grid; place-items:center}
.alerts .ic svg{width:17px; height:17px}
.alerts .tx{font-size:14px; line-height:1.4}
.alerts .tx b{font-weight:700}
.alerts .tx small{display:block; color:var(--muted); font-size:12.5px; margin-top:2px}

/* rule rows */
.rules{display:flex; flex-direction:column}
.rule{display:grid; grid-template-columns:1fr auto; gap:6px 12px; padding:12px 0; border-top:1px solid var(--line); align-items:center}
.rule:first-child{border-top:0; padding-top:0}
.rule .l{font-size:14px; font-weight:600}
.rule .l small{display:block; color:var(--muted); font-size:12.5px; font-weight:500}

/* lists (squad) */
.list{display:flex; flex-direction:column; padding:6px}
.row{
  display:grid; grid-template-columns:44px minmax(0,1fr) auto; gap:12px; align-items:center;
  padding:10px 12px; border-radius:14px; color:inherit; background:none; border:0; text-align:left; width:100%;
}
.row:hover{background:var(--surface-2)}
.jersey{
  width:44px; height:44px; border-radius:50%; display:grid; place-items:center;
  font-weight:800; font-size:16px; letter-spacing:-.02em; background:var(--blue-soft); color:var(--blue);
}
.jersey.asing,.jersey.heritage{background:var(--surface); color:var(--blue); box-shadow:inset 0 0 0 1.5px var(--blue)}
.row .nm{font-weight:700; font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.row .mt{font-size:12.5px; color:var(--muted); display:flex; gap:4px 10px; flex-wrap:wrap; margin-top:2px}
.row .rt{display:flex; flex-direction:column; align-items:flex-end; gap:4px}
.row .extra{display:none}
@media (min-width:860px){
  .row{grid-template-columns:44px minmax(0,1.6fr) repeat(4,minmax(70px,.6fr)) auto}
  .row .extra{display:block; font-weight:700; font-size:14.5px; font-variant-numeric:tabular-nums}
  .row .extra small{display:block; font-weight:500; font-size:11.5px; color:var(--muted)}
  .row .rt{flex-direction:row; align-items:center}
  .list-h{display:grid !important}
}
.list-h{
  display:none; grid-template-columns:44px minmax(0,1.6fr) repeat(4,minmax(70px,.6fr)) auto; gap:12px;
  padding:14px 18px 6px; font-size:11.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted);
}

/* tables */
.tw{overflow-x:auto; -webkit-overflow-scrolling:touch}
table{width:100%; border-collapse:separate; border-spacing:0; font-size:14px}
th,td{padding:11px 14px; text-align:left; border-bottom:1px solid var(--line); white-space:nowrap}
th{font-size:11.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); background:var(--surface-2)}
th:first-child{border-top-left-radius:10px} th:last-child{border-top-right-radius:10px}
td.n,th.n{text-align:right; font-variant-numeric:tabular-nums}
td.n{font-weight:600}
tbody tr:last-child td{border-bottom:0}
tbody tr.click{cursor:pointer}
tbody tr.click:hover td{background:var(--surface-2)}
table input.inp{height:36px; padding:0 8px; font-size:14px; width:64px; text-align:right; border-radius:9px; font-variant-numeric:tabular-nums}

/* player header */
.phead{display:grid; grid-template-columns:auto 1fr; gap:14px 18px; align-items:center; background:var(--surface); border-radius:20px; padding:18px; border:1px solid var(--line)}
.phead .jersey{width:72px; height:72px; font-size:28px}
.phead h1{font-size:clamp(22px,4vw,30px); line-height:1.1; font-weight:800; letter-spacing:-.03em}
.phead .meta{display:flex; flex-wrap:wrap; gap:6px 14px; font-size:13px; color:var(--muted); margin-top:8px; align-items:center}
.phead .meta b{font-weight:700; color:var(--ink)}
.phead .actions{grid-column:1/-1}
@media (min-width:720px){ .phead{grid-template-columns:auto 1fr auto; padding:22px} .phead .actions{grid-column:auto} }

.tabs{display:flex; gap:4px; margin:18px 0 16px; overflow-x:auto; scrollbar-width:none; background:var(--surface-2); border:1px solid var(--line); padding:4px; border-radius:14px; width:max-content; max-width:100%}
.tabs::-webkit-scrollbar{display:none}
.tabs button{border:0; background:none; padding:9px 16px; font-size:14px; font-weight:600; color:var(--muted); border-radius:10px; white-space:nowrap}
.tabs button[aria-selected="true"]{background:var(--surface); color:var(--ink); box-shadow:var(--shadow-sm)}

/* readiness breakdown */
.bd{display:flex; flex-direction:column; gap:12px}
.bd-r{display:grid; grid-template-columns:120px 1fr 40px; gap:12px; align-items:center; font-size:13.5px; font-weight:500}
.bd-r .bar{height:10px; background:var(--sunk); border-radius:6px; overflow:hidden}
.bd-r .bar i{display:block; height:100%; background:var(--blue); border-radius:6px}
.bd-r .v{text-align:right; font-weight:700; font-variant-numeric:tabular-nums}

.bigscore{display:flex; align-items:center; gap:14px}
.bigscore .s{font-weight:800; font-size:56px; letter-spacing:-.05em; line-height:1}

/* metric pairs */
.mgrid{display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:12px}
.m{background:var(--surface-2); border-radius:12px; padding:12px 14px}
.m .k{font-size:12px; font-weight:600; color:var(--muted)}
.m .v{font-size:20px; font-weight:800; margin-top:4px; letter-spacing:-.02em; font-variant-numeric:tabular-nums}
.m .v small{font-size:12.5px; font-weight:500; color:var(--muted)}
.m .h{font-size:12px; color:var(--muted); margin-top:3px}

/* cap meter */
.meter{height:14px; border-radius:8px; background:var(--sunk); overflow:hidden; display:flex}
.meter i{display:block; height:100%; border-radius:8px}

/* charts */
.chart{position:relative}
.chart svg{display:block; width:100%; height:auto; overflow:visible}
.chart .grid line{stroke:var(--line); stroke-width:1; stroke-dasharray:3 4}
.chart .ax{font-family:var(--font); font-size:10px; font-weight:500; fill:var(--muted)}
.chart .bar{fill:var(--blue)}
.chart .bar.dim{fill:color-mix(in srgb,var(--blue) 40%,var(--surface))}
.chart .line{fill:none; stroke:var(--blue); stroke-width:2.5; stroke-linejoin:round; stroke-linecap:round}
.chart .line2{fill:none; stroke:var(--ink-2); stroke-width:1.5; stroke-dasharray:5 4}
.chart .area{fill:var(--blue); opacity:.08}
.chart .band-ok{fill:var(--ok); opacity:.07}
.chart .dot{fill:var(--blue); stroke:var(--surface); stroke-width:3}
.chart .hl{stroke:var(--ink-2); stroke-width:1; stroke-dasharray:2 3}
.chart .hit{fill:transparent}
.tip{
  position:absolute; pointer-events:none; z-index:5; background:var(--inverse); color:var(--on-inverse);
  font-size:12px; font-weight:600; padding:7px 10px; border-radius:9px; white-space:nowrap; box-shadow:var(--shadow-lg);
  transform:translate(-50%,calc(-100% - 10px)); opacity:0; transition:opacity .1s;
}
.tip.on{opacity:1}
.legend{display:flex; gap:16px; flex-wrap:wrap; font-size:12.5px; color:var(--muted); margin-top:10px; font-weight:500}
.legend span{display:inline-flex; align-items:center; gap:6px}
.legend i{display:inline-block; width:14px; height:3px; border-radius:2px; background:var(--blue)}
.legend i.b{background:none; border-top:2px dashed var(--ink-2); height:0}
.legend i.sq{width:10px; height:10px; border-radius:3px}

/* check-in accordion */
.acc{display:flex; flex-direction:column; padding:6px}
.acc-i{border-radius:14px}
.acc-i.open{background:var(--surface-2)}
.acc-h{width:100%; display:grid; grid-template-columns:44px minmax(0,1fr) auto 20px; gap:12px; align-items:center; padding:10px 12px; background:none; border:0; text-align:left; border-radius:14px}
.acc-h:hover{background:var(--surface-2)}
.acc-h .chev{width:20px; height:20px; color:var(--muted); transition:transform .15s}
.acc-i.open .acc-h .chev{transform:rotate(180deg)}
.acc-b{padding:4px 14px 16px; display:none}
.acc-i.open .acc-b{display:block}
.qs{display:grid; grid-template-columns:1fr; gap:14px}
@media (min-width:720px){ .qs{grid-template-columns:1fr 1fr} }
.q > span{display:flex; justify-content:space-between; font-size:13.5px; font-weight:600; margin-bottom:6px}
.q > span small{color:var(--muted); font-size:11.5px; font-weight:500}
.live{display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:16px; padding-top:14px; border-top:1px solid var(--line)}

/* empty & banners */
.empty{text-align:center; padding:44px 20px; color:var(--ink-2)}
.empty h2{font-size:20px; margin-bottom:8px}
.empty p{max-width:44ch; margin:0 auto 18px; font-size:14px; color:var(--muted)}
.banner{display:flex; gap:12px; align-items:center; padding:12px 14px; border-radius:12px; font-size:13.5px; background:var(--surface-2); border:1px solid var(--line); color:var(--ink-2); margin:4px 0 12px}
.banner b{color:var(--ink)}
.banner.warn{background:var(--warn-soft)}
.banner .x{margin-left:auto; width:32px; height:32px; box-shadow:none; background:transparent}

/* bottom sheet / dialog */
.sheet-bg{position:fixed; inset:0; background:var(--overlay); z-index:50; display:flex; align-items:flex-end; justify-content:center; animation:fade .15s ease-out}
.sheet{
  background:var(--surface); width:100%; max-height:92vh; overflow:auto; border-radius:24px 24px 0 0;
  padding:10px 20px calc(20px + var(--safe-b)); box-shadow:var(--shadow-lg); animation:up .2s ease-out;
}
.sheet::before{content:""; display:block; width:40px; height:5px; border-radius:3px; background:var(--line-2); margin:0 auto 14px}
.sheet-h{display:flex; align-items:center; gap:12px; margin-bottom:18px}
.sheet-h h2{font-size:20px; flex:1; font-weight:800}
.sheet-h .iconbtn{box-shadow:none; background:var(--sunk)}
.sheet-f{display:flex; gap:8px; justify-content:flex-end; margin-top:22px; flex-wrap:wrap}
.sheet-f .l{margin-right:auto}
@media (min-width:720px){
  .sheet-bg{align-items:center; padding:24px}
  .sheet{max-width:640px; border-radius:22px; padding:24px 26px}
  .sheet::before{display:none}
}
@keyframes up{from{transform:translateY(24px); opacity:.6}to{transform:none; opacity:1}}
@keyframes fade{from{opacity:0}to{opacity:1}}

.toast{
  position:fixed; left:50%; bottom:calc(104px + var(--safe-b)); transform:translateX(-50%) translateY(20px); z-index:60;
  background:var(--inverse); color:var(--on-inverse); padding:12px 18px; border-radius:14px; font-size:14px; font-weight:600;
  opacity:0; transition:opacity .2s, transform .2s; pointer-events:none; max-width:calc(100vw - 32px); box-shadow:var(--shadow-lg);
}
.toast.on{opacity:1; transform:translateX(-50%) translateY(0)}
@media (min-width:720px){ .toast{bottom:28px} }

.login{max-width:400px; margin:10vh auto 0; padding:0 16px}
.login .card{padding:26px}
.login .brand-logo{width:150px; height:auto; color:var(--ink); margin-bottom:22px}

@media (prefers-reduced-motion:reduce){*{transition:none !important; animation:none !important}}
@media (min-width:720px){ .hero .eyebrow{display:none} }

/* demo accounts on the login page */
.demo-box{margin-top:14px; padding:20px 22px}
.demo-list{display:flex; flex-direction:column; gap:8px}
.demo-acc{display:grid; grid-template-columns:40px minmax(0,1fr) 20px; align-items:center; gap:12px; width:100%; text-align:left;
  padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--ink); font:inherit; cursor:pointer;
  transition:border-color .15s, background .15s}
.demo-acc:hover{border-color:var(--accent); background:var(--surface-2)}
.demo-acc:disabled{opacity:.6; cursor:progress}
.demo-acc .jersey{width:40px; height:40px; font-size:16px}
.demo-t{display:flex; flex-direction:column; min-width:0; font-size:14px}
.demo-t .muted{font-size:12.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.demo-go{color:var(--ink-3, #8a90a6); display:flex}
.demo-go svg{transform:rotate(-90deg); width:18px; height:18px}
.login{padding-bottom:40px}

/* box score (tab Laga) */
.box table{width:max-content; min-width:100%}
.box th,.box td{padding:9px 10px}
.box .stk{position:sticky; left:0; z-index:1; background:var(--surface); box-shadow:1px 0 0 var(--line); min-width:150px; max-width:200px; overflow:hidden; text-overflow:ellipsis}
.box thead .stk{z-index:3; background:var(--surface-2)}
.box th.calc{color:var(--blue)}
.box td.calc{background:color-mix(in srgb,var(--blue) 6%,var(--surface))}
.box tr.tot td{background:var(--surface-2); font-weight:700; border-top:1px solid var(--line)}
.box tr.tot td.calc{background:color-mix(in srgb,var(--blue) 10%,var(--surface-2))}
.box input.inp{width:54px}
.box input.inp.bad,.rot-seg input.inp.bad{border-color:var(--crit); background:var(--crit-soft); color:var(--crit)}
.bx-msg{border-radius:12px; padding:10px 14px; font-size:13px; line-height:1.5}
.bx-msg + .bx-msg{margin-top:8px}
.bx-msg ul{margin:4px 0 0 18px}
.bx-msg.crit{background:var(--crit-soft); color:var(--crit)}
.bx-msg.warn{background:var(--warn-soft); color:var(--warn)}
.rot-seg{border:1px solid var(--line); border-radius:14px; padding:12px; display:grid; gap:10px}
.rot-h{display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px}
.rot-sc{display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--muted)}
.rot-sc input.inp{width:64px; height:36px; padding:0 8px; text-align:right}
.rot-seg .chips{display:flex; flex-wrap:wrap; gap:6px}

/* injury history (profil pemain → Cedera) */
.inj-dl{display:grid; gap:0; padding:4px 0}
.inj-r{display:grid; grid-template-columns:150px 1fr; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); font-size:14px; line-height:1.5}
.inj-r:last-child{border-bottom:0}
.inj-r > span{color:var(--muted); font-size:12.5px; font-weight:600}
@media (max-width:520px){ .inj-r{grid-template-columns:1fr; gap:2px} }

/* radar chart */
.radar svg{display:block; width:100%; max-width:420px; height:auto; margin:0 auto; overflow:visible}
.radar .rd-ring{fill:none; stroke:var(--line); stroke-width:1}
.radar .rd-ax{stroke:var(--line); stroke-width:1}
.radar .rd-l{font-size:10.5px; font-weight:600; fill:var(--ink-2)}
.radar .rd-s{stroke-width:2; fill-opacity:.14; stroke-linejoin:round}
.radar .rd-d{stroke:var(--surface); stroke-width:1.5}
.radar .rd0{stroke:var(--blue); fill:var(--blue)}
.radar .rd1{stroke:var(--teal-ink); fill:var(--teal-ink)}
.radar .rd2{stroke:var(--warn); fill:var(--warn)}
.radar circle.rd0,.radar circle.rd1,.radar circle.rd2{fill-opacity:1}
.legend .rdl0{background:var(--blue)} .legend .rdl1{background:var(--teal-ink)} .legend .rdl2{background:var(--warn)}
.chips.wrap{flex-wrap:wrap; overflow:visible}

/* compare table */
table.cmp td.best{color:var(--ok); font-weight:800}
table.cmp th.n{min-width:120px}
tr.grp td{background:var(--surface-2); font-size:11.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); padding-top:8px; padding-bottom:8px}

/* deltas */
.dl{font-size:12px; font-weight:700; white-space:nowrap}
.dl.up{color:var(--ok)} .dl.dn{color:var(--crit)}

/* rapor form */
.rat-g{border:1px solid var(--line); border-radius:14px; padding:10px 12px; display:grid; gap:6px}
.rat-gh{font-size:11.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted)}
.rat-row{display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:14px}
.rat-row select.inp{width:76px; height:38px}

/* weekly plan */
.pweek{display:grid; grid-template-columns:1fr; gap:10px}
@media (min-width:640px){ .pweek{grid-template-columns:repeat(2,1fr)} }
@media (min-width:1100px){ .pweek{grid-template-columns:repeat(7,1fr)} }
.pday{border:1px solid var(--line); border-radius:14px; padding:10px; display:flex; flex-direction:column; gap:8px; min-width:0; background:var(--surface)}
.pday.today{border-color:var(--blue); box-shadow:0 0 0 2px color-mix(in srgb,var(--blue) 18%,transparent)}
.pday-h{display:flex; justify-content:space-between; align-items:baseline; gap:6px; font-size:13.5px}
.pday-h .muted{font-size:12px}
.pday-f{display:flex; justify-content:space-between; gap:6px; font-size:11.5px; color:var(--muted); border-top:1px dashed var(--line); padding-top:6px; margin-top:auto}
.pday-f b{color:var(--ink); font-variant-numeric:tabular-nums}
.psess{display:grid; gap:2px; text-align:left; border:0; border-left:3px solid var(--blue); background:var(--blue-soft); border-radius:8px; padding:7px 8px; font-size:12.5px; color:var(--ink); cursor:pointer; width:100%}
.psess .pt{font-weight:700}
.psess .pm{color:var(--ink-2); font-variant-numeric:tabular-nums}
.psess .pf{color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.psess.t-1{border-left-color:var(--warn); background:var(--warn-soft)}
.psess.t-2{border-left-color:var(--teal-ink); background:var(--teal-soft)}
.psess.t-3{border-left-color:var(--crit); background:var(--crit-soft)}
.psess.t-4{border-left-color:var(--ink-2); background:var(--sunk)}
.psess.t-5{border-left-color:var(--ok); background:var(--ok-soft)}

/* theme picker (Pengaturan → Tampilan) */
.seg-theme button{display:inline-flex; align-items:center; gap:7px}
.seg-theme svg{width:17px; height:17px}

/* short tablets (landscape): compact rail so Kontrak + Pengaturan stay on screen */
@media (min-width:720px) and (max-width:1099px) and (max-height:700px){
  .side{gap:2px; padding-top:calc(12px + var(--safe-t))}
  .side .brand{margin-bottom:8px}
  .side .brand-mark{width:34px; height:28px}
  .side .navbtn{padding:6px 4px; gap:2px}
  .side .navbtn svg{width:20px; height:20px}
}
@media (min-width:1100px) and (max-height:760px){
  .side{padding-top:18px}
  .side .brand{margin-bottom:14px}
  .side .navbtn{padding:8px 14px}
  .side .foot{display:none}
}
