:root{color-scheme:dark;--bg:#10120f;--panel:#191c17;--raised:#22261e;--edge:#343a2f;--text:#f3f4ee;--muted:#b8c0af;--accent:#e5fc43;--dark:#171a09;font:16px/1.5 system-ui,sans-serif}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);min-height:100vh}
h1,h2,h3,p{margin:0} h1{font-size:clamp(2.1rem,5vw,3.6rem);line-height:1.06;letter-spacing:-.055em} h2{font-size:1.36rem;letter-spacing:-.025em} h3{font-size:1.07rem}
a{color:var(--accent);text-decoration:none} a:hover{text-decoration:underline}
button,input,select,textarea{font:inherit} button,.button{cursor:pointer}
button,.button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;gap:.45rem;padding:.55rem .9rem;border:1px solid var(--edge);border-radius:8px;background:var(--raised);color:var(--text);font-weight:650;text-decoration:none}
button:hover,.button:hover{border-color:var(--accent);text-decoration:none} button:disabled{opacity:.5;cursor:wait}
.primary{background:var(--accent);border-color:var(--accent);color:var(--dark)}
.quiet{background:transparent}.small{font-size:.88rem;min-height:38px;padding:.4rem .65rem}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
input,select,textarea{width:100%;min-width:0;border:1px solid var(--edge);border-radius:7px;background:var(--bg);color:var(--text);padding:.62rem .68rem;min-height:42px}
textarea{min-height:80px;resize:vertical} input[type=checkbox]{width:1.1rem;min-height:auto;accent-color:var(--accent)}
label{display:grid;gap:.25rem;font-size:.89rem;color:var(--muted);font-weight:600}
.check{display:flex;align-items:center;gap:.5rem;min-height:42px}
small,.muted{color:var(--muted)} small{font-size:.88rem} .accent{color:var(--accent)}
.skip{position:absolute;left:1rem;top:-5rem;background:var(--bg);padding:1rem;z-index:10}.skip:focus{top:1rem}
.top{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem clamp(1rem,4vw,3.5rem);border-bottom:1px solid var(--edge);background:#151713}
.brand{display:inline-flex;align-items:center;min-width:0}.brand img{display:block;width:clamp(118px,36vw,162px);max-width:100%;height:auto;border-radius:5px}
.shell{max-width:1440px;margin:auto;display:grid;grid-template-columns:224px minmax(0,1fr);min-height:calc(100vh - 73px)}
.sidebar{border-right:1px solid var(--edge);padding:1.5rem 1rem;display:flex;flex-direction:column;gap:.35rem}
.sidebar a{display:flex;align-items:center;min-height:44px;padding:.5rem .75rem;border-radius:8px;color:var(--muted);font-weight:650}
.sidebar a[aria-current=page]{color:var(--accent);background:#2b321a}.sidebar a:hover{background:var(--panel);text-decoration:none}
main{min-width:0}.content{padding:clamp(1rem,3vw,2.7rem);display:grid;gap:1.3rem;align-content:start}
.heading{display:flex;flex-wrap:wrap;gap:.85rem;align-items:end;justify-content:space-between}.heading p{margin-top:.45rem;color:var(--muted)}
.panel{background:var(--panel);border:1px solid var(--edge);border-radius:13px;padding:clamp(.85rem,2vw,1.35rem);min-width:0}
.stack{display:grid;gap:1rem}.compact{gap:.65rem}.row{display:flex;align-items:center;flex-wrap:wrap;gap:.55rem}.between{justify-content:space-between}.spread{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:.85rem}.pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}
.split{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:1rem;align-items:start}.list{display:grid;gap:.65rem}
.tile{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.65rem;border:1px solid var(--edge);border-radius:9px;padding:.75rem;background:var(--raised)}
.tag{font-size:.8rem;padding:.2rem .53rem;border:1px solid var(--edge);border-radius:20px;color:var(--muted);white-space:nowrap}.tag.live{color:var(--accent);border-color:#586122}
.day{border:1px solid var(--edge);border-radius:10px;padding:.85rem;display:grid;gap:.75rem}.exercise{border-radius:9px;background:var(--raised);padding:.85rem;display:grid;gap:.68rem}
.stat{font-size:2rem;line-height:1.1;letter-spacing:-.05em}.stats .panel{display:grid;gap:.4rem}
table{width:100%;border-collapse:collapse;text-align:left}th,td{padding:.45rem .35rem;border-bottom:1px solid var(--edge)} .scroll{overflow:auto}
.video{width:100%;max-height:420px;background:#0b0c0a;border-radius:8px}.set{display:grid;grid-template-columns:auto repeat(3,minmax(0,1fr));gap:.5rem;align-items:center}.set strong{min-width:1.5rem}
.auth{min-height:calc(100vh - 73px);display:grid;grid-template-columns:1fr 1fr;align-items:stretch}.auth-hero{background:linear-gradient(0deg,#10120fe8,#10120f15),url('/portal/brand.jpg') center/cover;display:flex;align-items:end;padding:clamp(1.5rem,5vw,5rem)}.auth-form{width:min(100%,510px);padding:1.3rem;align-self:center;justify-self:center}.auth-form h1{font-size:clamp(2rem,4vw,3rem)}
#notice{position:fixed;z-index:10;bottom:1rem;right:1rem;max-width:min(88vw,27rem)}#notice:empty{display:none}#notice div{border:1px solid var(--edge);border-left:4px solid var(--accent);background:var(--raised);border-radius:8px;padding:.8rem 1rem;box-shadow:0 10px 30px #0009}#notice .error{border-left-color:#ff8a81}
.chart{width:100%;height:auto;min-height:130px;display:block}.chart circle{fill:var(--accent)}.chart polyline{fill:none;stroke:var(--accent);stroke-width:3;vector-effect:non-scaling-stroke}.chart line{stroke:var(--edge);vector-effect:non-scaling-stroke}
dialog{width:min(650px,calc(100% - 1.4rem));max-height:90vh;background:var(--panel);color:var(--text);border:1px solid var(--edge);border-radius:13px;padding:1.1rem}dialog::backdrop{background:#000b}
@media(max-width:800px){.shell{display:block}.sidebar{border-right:0;border-bottom:1px solid var(--edge);overflow:auto;display:flex;flex-direction:row;padding:.55rem;white-space:nowrap}.split{grid-template-columns:1fr}.auth{grid-template-columns:1fr}.auth-hero{min-height:220px}.top{padding:.75rem 1rem}}
@media(max-width:450px){.top .identity{display:none}.pair{grid-template-columns:1fr}.set{gap:.3rem}.set input{padding:.5rem .3rem}.auth-hero{min-height:170px}}
.nav-count{margin-left:.45rem;background:var(--accent);color:var(--dark);border-radius:999px;padding:.1rem .35rem;font-size:.75rem;line-height:1.3}
.nav-count[hidden]{display:none}.inbox{grid-template-columns:minmax(185px,.65fr) minmax(0,1.35fr)}
.inbox-contact{color:var(--text);text-decoration:none}.inbox-contact[aria-current=true]{border-color:var(--accent)}
.messages-list{max-height:55vh;overflow:auto;align-content:start;padding:.15rem}
.message{background:var(--raised);border:1px solid var(--edge);padding:.62rem .8rem;border-radius:8px;width:fit-content;max-width:92%;overflow-wrap:anywhere}
.message.mine{justify-self:end;border-color:#546122}.message p{white-space:pre-wrap}
@media(max-width:800px){.inbox{grid-template-columns:1fr}}
.danger{color:#ffb0a8}.danger:hover{border-color:#ffb0a8}.phone-fields{grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr))}
.auth-error{color:#ffb0a8}

.auth{grid-template-columns:1fr}

.tag.warning{color:#ffe28a;border-color:#c1962d;background:#3b2d15}.tag.danger{color:#ffc0c0;border-color:#b65151;background:#421f22}

.space-logo-preview{object-fit:contain;flex-shrink:0;border:1px solid var(--edge);border-radius:.5rem;background:var(--panel)}

.report-charts figure{margin:0;min-width:0}.report-charts canvas{display:block;width:100%;max-width:420px;height:auto;border:1px solid var(--edge);border-radius:.5rem}

.mfa-qr{display:block;max-width:100%;height:auto;image-rendering:pixelated;background:#fff;border-radius:.35rem}

.plan-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(4.5rem, 1fr));
  gap: .5rem;
}
.plan-calendar button {
  min-width: 0;
  overflow-wrap: anywhere;
}
.plan-calendar button[aria-pressed="true"] {
  outline: 2px solid currentColor;
}
.plan-calendar small {
  display: block;
}
.plan-calendar > strong {
  text-align: center;
}
[data-drag-exercise] {
  cursor: grab;
}
[data-drag-exercise]:active {
  cursor: grabbing;
}
.calendar-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: .25rem;
}
.calendar-cell > button {
  display: block;
  width: 100%;
}
.calendar-cell > button > span {
  white-space: nowrap;
}
.calendar-cell ul {
  display: grid;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.calendar-cell li {
  padding: .375rem .5rem;
  border: 1px solid currentColor;
  border-radius: .375rem;
  overflow-wrap: anywhere;
  font-size: .85rem;
}
.day-drag {
  cursor: grab;
  text-align: center;
  font-size: .8rem;
  padding: .25rem;
  border-radius: .375rem;
  border: 1px dashed currentColor;
}
.day-drag:active {
  cursor: grabbing;
}
.plan-calendar:has(.client-calendar-day) {
  grid-template-columns: repeat(7, minmax(9rem, 1fr));
}
.client-calendar-day {
  padding: .5rem;
  border-inline-start: 1px solid var(--line, currentColor);
}
.client-calendar-day h3 {
  margin: 0;
  font-size: .95rem;
  overflow-wrap: anywhere;
}
