/* FitnessMB PWA — stiluri (dark premium, identitate FitnessMB) */
:root {
    --bg: #0B0D10;
    --card: #15181D;
    --line: #262B33;
    --text: #F2F4F7;
    --mut: #9AA0A6;
    --brand: #e0343c;
    --brand-dark: #b32730;
    --ok: #2e7d32;
    --warn: #f9a825;
    --nav-h: 60px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}
[data-theme="light"] {
    --bg: #f4f5f7;
    --card: #ffffff;
    --line: #e2e4e8;
    --text: #17191d;
    --mut: #6b7076;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    min-height: 100vh;
    overflow-x: hidden;
}

#app { padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px); min-height: 100vh; min-height: 100dvh; } /* safe-top-ul sus îl aplică .top-bar (o singură dată) */

/* ── Bare ── */
.top-bar {
    position: sticky; top: 0; z-index: 50;
    padding: calc(var(--safe-top) + 8px) 16px 8px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.top-bar h1 { font-size: 1.2rem; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.brand .b { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: .9rem; }
.brand em { font-style: normal; color: var(--brand); }
.icon-btn { background: none; border: none; color: var(--mut); font-size: 1.15rem; padding: 0; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 12px; }

.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; justify-content: space-around; align-items: stretch;
    background: var(--card); border-top: 1px solid var(--line);
    padding-bottom: var(--safe-bottom);
    height: calc(var(--nav-h) + var(--safe-bottom));
}
.bottom-nav button {
    flex: 1; background: none; border: none; color: var(--mut);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: 10.5px; font-weight: 500; cursor: pointer; padding: 7px 0 3px;
    max-width: 110px; font-family: inherit;
}
.bottom-nav button .navic { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
.bottom-nav button.active { color: var(--brand); font-weight: 600; }

/* ── Componente ── */
.wrap { padding: 0 16px; max-width: 680px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.muted { color: var(--mut); }
.small { font-size: .85rem; }
.row-list > div { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.row-list > div:last-child { border-bottom: 0; }
.kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--mut); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.kpi .n { font-size: 1.4rem; font-weight: 800; }
.kpi .l { font-size: .76rem; color: var(--mut); }

/* ── Butoane ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; border: none; cursor: pointer; font-size: 16px; font-weight: 700; padding: 13px 16px; min-height: 48px; width: 100%; font-family: inherit; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:disabled { opacity: .45; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:disabled { opacity: .45; }
.btn-danger { background: transparent; border: 1px solid var(--brand); color: var(--brand); }
.btn-small { width: auto; min-height: 42px; padding: 9px 16px; font-size: 14px; }

/* ── Formulare ── */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: .78rem; color: var(--mut); margin-bottom: 4px; }
.field input, .field select {
    width: 100%; min-height: 48px; padding: 12px 14px; font-size: 16px;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--line); border-radius: 12px; font-family: inherit;
}
.seg { display: flex; gap: 8px; margin-bottom: 14px; }
.seg button {
    flex: 1; padding: 10px 6px; border-radius: 12px; cursor: pointer; font-family: inherit;
    background: var(--card); border: 2px solid var(--line); color: var(--text); font-size: .85rem; font-weight: 600;
}
.seg button.active { border-color: var(--brand); color: var(--brand); background: rgba(224,52,60,.06); }

/* ── Stări ── */
.state { text-align: center; padding: 40px 24px; color: var(--mut); }
.state .bi { font-size: 2rem; display: block; margin-bottom: 10px; opacity: .6; }
.alert { border-radius: 12px; padding: 10px 14px; font-size: .88rem; margin-bottom: 12px; }
.alert-error { background: rgba(224,52,60,.12); color: #ff8b91; border: 1px solid rgba(224,52,60,.3); }
.alert-ok { background: rgba(46,125,50,.12); color: #7fd08c; border: 1px solid rgba(46,125,50,.3); }
.alert-info { background: rgba(13,202,240,.1); color: #6fd3e8; border: 1px solid rgba(13,202,240,.25); }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.badge-ok { background: rgba(46,125,50,.18); color: #7fd08c; }
.badge-warn { background: rgba(249,168,37,.18); color: var(--warn); }
.badge-mut { background: rgba(154,160,166,.15); color: var(--mut); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; margin: 40px auto; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Login ── */
.login-hero { text-align: center; padding: 26px 0 20px; }
.login-hero .logo { width: 68px; height: 68px; border-radius: 20px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.5rem; font-weight: 800; }
.login-hero h2 { margin: 12px 0 4px; font-size: 1.4rem; }
.login-hero p { margin: 0; color: var(--mut); font-size: .9rem; }

/* ══════════ Faza 2 — ecrane reale ══════════ */
.tb-title { font-size: 1.05rem; }
.tb-actions { display: flex; align-items: center; gap: 2px; }
.top-bar h1 { flex: 1; }
.icon-btn { font-size: 1.25rem; line-height: 1; }

/* Hero dashboard */
.hero { min-height: 150px; border-radius: 16px; margin: 8px 14px 12px; background-size: cover; background-position: center 30%; display: flex; align-items: flex-end; border: 1px solid var(--line); }
.hero-plain { background: linear-gradient(135deg, var(--card), var(--bg)); }
.hero-in { padding: 14px 16px; }
.hero-kicker { margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.hero h2 { margin: 2px 0 2px; font-size: 1.45rem; letter-spacing: -.02em; color: #fff; }
.hero-sub { margin: 0; color: rgba(255,255,255,.75); font-size: .9rem; }
[data-theme="light"] .hero h2 { color: #fff; }
.hero-plain .hero-in { padding: 18px 16px; }
.hero-plain h2, .hero-plain .hero-sub { color: var(--text); }

/* Card antrenament activ/programat */
.wcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kicker { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mut); }
.wcard-title { margin: 6px 0 2px; font-size: 1.15rem; }
.pill { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; background: rgba(154,160,166,.15); color: var(--mut); white-space: nowrap; }
.pill-orange { background: rgba(249,168,37,.15); color: var(--warn); }
.bar { height: 8px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; margin: 10px 0 6px; }
.bar-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--brand), #ff6a70); transition: width .3s; }
.wcard .btn { margin-top: 8px; }

/* Titluri de secțiune */
.sec-title { margin: 16px 2px 8px; font-size: .95rem; font-weight: 800; display: flex; align-items: center; gap: 6px; }

/* Rând antrenament */
.wrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 44px; }
.wrow:last-child { border-bottom: 0; }
.wrow-main { flex: 1; min-width: 0; }
.wrow-title { font-weight: 700; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrow-sub { color: var(--mut); font-size: .8rem; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: rgba(224,52,60,.1); color: var(--brand); }
.badge.b-blue { background: rgba(13,110,253,.15); color: #7ab3ff; }
.badge.b-orange { background: rgba(249,168,37,.16); color: var(--warn); }
.badge.b-green { background: rgba(46,125,50,.18); color: #7fd08c; }
.pos { color: #7fd08c; } .neg { color: #ff8b91; }
.kpi .u { font-size: .8rem; font-weight: 600; color: var(--mut); }
.kpi .l .pos, .kpi .l .neg { font-weight: 600; }
.goal-title { text-transform: none; letter-spacing: 0; font-size: 1.02rem; margin: 0 0 8px; opacity: 1; }
.note-card { border-left: 3px solid var(--brand); }
.note-card p { margin: 4px 0; font-size: .95rem; }

/* Detalii antrenament */
.excard-top { display: flex; align-items: center; gap: 10px; }
.exnum { width: 26px; height: 26px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 800; flex: none; }
.eximg { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--bg); border: 1px solid var(--line); flex: none; cursor: pointer; }
.eximg-empty { display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; opacity: .5; }
.excard-main { min-width: 0; }
.excard-main h4 { margin: 0; font-size: .98rem; }
.excard-main p { margin: 2px 0 0; }
.excard .chips { margin-top: 8px; }
.excard details { margin-top: 6px; }
.excard summary { cursor: pointer; color: var(--brand); }
.excard details p { margin: 6px 0 0; }
.photo-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.photo-overlay img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Grafice */
.seg { margin-top: 4px; }
.chart { width: 100%; height: auto; margin-top: 6px; }
.chart-line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: rgba(224,52,60,.10); }
.chart-dot { fill: var(--brand); }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.chart-last { font-size: 1.3rem; font-weight: 800; }
.chart-axis { display: flex; justify-content: space-between; color: var(--mut); font-size: .7rem; margin-top: 2px; }
.pr-rank { width: 26px; height: 26px; border-radius: 50%; background: rgba(249,168,37,.14); color: var(--warn); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; flex: none; margin-right: 8px; }
.row-list > div { gap: 8px; }
.row-list > div .pr-rank { margin-right: 0; }
.kpis-4 { grid-template-columns: repeat(4, 1fr); }
.small-n { font-size: 1.05rem; }
.small-state { padding: 22px 16px; font-size: .88rem; }

/* Notificări */
.nrow { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: flex-start; min-height: 44px; }
.nrow:last-child { border-bottom: 0; }
.nicon { flex: none; margin-top: 2px; display: flex; }
.nrow-title { font-weight: 600; font-size: .95rem; }
.nrow.unread .nrow-title { font-weight: 800; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); flex: none; margin-top: 6px; }

/* Profil */
.prof-head { display: flex; gap: 14px; align-items: center; }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--brand); flex: none; }
.avatar-txt { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; font-weight: 800; font-size: 1.3rem; }
.prof-id h2 { margin: 0; font-size: 1.2rem; }
.prof-id p { margin: 2px 0; }

/* Toast (pull-to-refresh) */
.toast { position: fixed; top: calc(var(--safe-top) + 14px); left: 50%; transform: translate(-50%, -16px); background: var(--card); border: 1px solid var(--line); color: var(--text); font-size: .85rem; padding: 8px 16px; border-radius: 20px; opacity: 0; transition: all .25s; z-index: 300; box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ══════════ Faza 3 — execuție ══════════ */
.exec-prog .bar { margin: 8px 0 4px; }
.excard.current { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.freebanner { cursor: pointer; border-left: 3px solid var(--warn); }
.setrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 56px; }
.setrow:last-of-type { border-bottom: 0; }
.setrow.done { background: rgba(46,125,50,.06); border-radius: 10px; padding: 10px 8px; margin-top: 4px; }
.setnum { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; flex: none; }
.setrow.done .setnum { background: rgba(46,125,50,.18); border-color: transparent; color: #7fd08c; }
.setmain { flex: 1; min-width: 0; font-size: .95rem; }
.setactual { color: #7fd08c; font-size: .88rem; margin-top: 2px; }
.setinputs { display: flex; gap: 6px; margin-top: 6px; }
.setin { width: 92px; height: 50px; padding: 0 12px; font-size: 18px; font-weight: 600; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 12px; font-family: inherit; font-variant-numeric: tabular-nums; }
.checkbtn { width: 56px; height: 56px; border-radius: 16px; border: none; background: var(--brand); color: #fff; font-size: 1.6rem; font-weight: 800; cursor: pointer; flex: none; }
.checkbtn.busy { opacity: .45; }
.uncheck { background: transparent; border: 1px solid var(--line); color: var(--mut); border-radius: 10px; padding: 8px 12px; font-size: .78rem; cursor: pointer; flex: none; }

/* Overlay pauză (fullscreen, non-dismissable — doar butoanele) */
#restOverlay { position: fixed; inset: 0; z-index: 250; background: rgba(11,13,16,.96); display: flex; align-items: center; justify-content: center; }
[data-theme="light"] #restOverlay { background: rgba(11,13,16,.96); }
.restbox { text-align: center; color: #fff; padding: 24px; width: 100%; max-width: 340px; }
.restbox .kicker { color: var(--brand); }
#restNum { font-size: 5.4rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: 10px 0 22px; letter-spacing: -.02em; line-height: 1; }
.restbtns { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; }
.restbtns button { min-width: 108px; min-height: 54px; border-radius: 14px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 1.05rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.restbox .btn-ghost { border-color: rgba(255,255,255,.3); color: #fff; margin: 0 auto 12px; }

/* ══════════ Faza 3.1 — polish iPhone ══════════ */
/* Iconițe SVG inline (fără biblioteci) */
.ico { width: 20px; height: 20px; display: block; flex: 0 0 20px; }
.ico-sm { width: 17px; height: 17px; flex: 0 0 17px; }
.ico-lg { width: 22px; height: 22px; }
.sec-title .ico { color: var(--brand); }
.sec-title .ic-orange { color: var(--warn); }
.sec-title .ic-green { color: #2e9e46; }
.sec-title .ic-blue { color: #4d9fff; }
[data-theme="light"] .sec-title .ic-orange { color: #c77800; }
[data-theme="light"] .sec-title .ic-green { color: #1d7a30; }
[data-theme="light"] .sec-title .ic-blue { color: #0b6ddb; }

/* Focus vizibil (accesibilitate) */
.btn:focus-visible, .icon-btn:focus-visible, .bottom-nav button:focus-visible,
.checkbtn:focus-visible, .uncheck:focus-visible, .restbtns button:focus-visible,
#restSkip:focus-visible, .seg button:focus-visible {
    outline: 2px solid var(--brand); outline-offset: 2px;
}
.setin:focus, .field input:focus, .field select:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(224,52,60,.18);
}

/* Top-bar + bottom-nav centrate pe tablet/desktop (mobile-first păstrat) */
.top-bar { max-width: 712px; margin: 0 auto; }
@media (min-width: 720px) {
    .bottom-nav { left: 50%; transform: translateX(-50%); width: 680px; border-radius: 18px 18px 0 0; border: 1px solid var(--line); border-bottom: 0; }
}

/* Ierarhie ecran execuție: seria curentă evidentă */
.setrow { padding: 12px 0; }
.setrow.current { margin: 0 -8px; padding: 12px 8px; background: rgba(224,52,60,.05); border-radius: 12px; }
.setmain strong { font-size: 1.05rem; }
.setnum { width: 32px; height: 32px; font-size: .95rem; }
.excard.current { box-shadow: 0 0 0 1.5px var(--brand); }
.excard h4 { font-size: 1.08rem; }
.exec-prog .kicker { font-size: .8rem; letter-spacing: .08em; }
.wcard-title { font-size: 1.2rem; }
.wrow-title { font-size: 1rem; }

/* Rest overlay: totul în 844px, fără scroll */
.restbox { max-width: 380px; }
.restbox .muted { color: rgba(255,255,255,.65); }
#restSkip { min-height: 48px; }

/* Search input: 48px */
input[type="search"] { min-height: 48px; }

/* Uncheck (Anulează) confortabil */
.uncheck { min-height: 44px; min-width: 88px; }

/* Transitions subtile, GPU-friendly */
.card, .setin, .btn { transition: border-color .15s ease, box-shadow .15s ease; }

/* ══════════ Faza 3.3 — detaliu + rest popup ══════════ */
/* Detaliu: grilă compactă SET | REPS | KG */
.setgrid { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sg-head, .sg-row {
    display: grid; grid-template-columns: 56px 1fr 1fr;
    padding: 8px 12px; font-size: .9rem; align-items: center;
}
.sg-head { background: var(--bg); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); }
.sg-row { border-top: 1px solid var(--line); font-weight: 600; font-variant-numeric: tabular-nums; }
.sg-row span:first-child { color: var(--mut); font-weight: 700; }
.sg-row span:not(:first-child) { text-align: right; }
.sg-head span:not(:first-child) { text-align: right; }
.rest-line { display: flex; align-items: center; gap: 5px; margin-top: 8px; }
.rest-line .ico { flex: none; }
.meta-line { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.meta-line .ico { flex: none; }
.note-card-wrap { margin-top: 8px; padding: 8px 12px; border-left: 3px solid var(--brand); background: rgba(224,52,60,.05); border-radius: 8px; }
.note-card-wrap p { margin: 0; }

/* Rest popup: ierarhie PAUZĂ → cifre → bară → butoane; safe-area */
#restOverlay { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.rest-bar { max-width: 240px; margin: 0 auto 20px; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); }
.rest-bar .bar-fill, #restBarFill { background: #fff; transition: width .25s linear; }
.restbox .kicker { font-size: .85rem; letter-spacing: .18em; }

/* ══════════ Faza 3.4 — ecran execuție (carduri set structurate) ══════════ */
/* Imagine banner controlată: 16/9, nu dictează layoutul */
.exbanner { width: 100%; max-width: 100%; box-sizing: border-box; aspect-ratio: 16 / 9; max-height: 200px; border-radius: 12px; overflow: hidden; margin-top: 12px; background: var(--bg); border: 1px solid var(--line); }
.exbanner img { width: 100%; max-width: 100%; height: 100%; object-fit: contain; display: block; }
.exbanner-empty { display: flex; align-items: center; justify-content: center; color: var(--mut); }
.exbanner-empty .ico { width: 34px; height: 34px; opacity: .5; }

.excard-head { display: flex; align-items: flex-start; gap: 10px; }
.excard-head .excard-main { flex: 1; min-width: 0; }
.excard h4 { overflow-wrap: break-word; }
.setcard-top { min-width: 0; }
.setcard-top span { overflow-wrap: break-word; }
.now-pill { flex: none; font-size: .72rem; letter-spacing: .06em; margin-top: 2px; }

.sets-label { margin: 14px 0 8px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }

/* Set card: header SET N + țintă, corp kg/reps/✓ */
.setcard { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; background: var(--bg); }
.setcard.current { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.setcard.done { background: rgba(46,125,50,.06); border-color: rgba(46,125,50,.25); }
.setcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.setlabel { font-size: .82rem; font-weight: 800; letter-spacing: .05em; }
.setcard-facts { display: flex; align-items: stretch; gap: 10px; }
.fact { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; min-height: 48px; justify-content: center; box-sizing: border-box; }
.fact .fl { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); font-weight: 700; }
.fact strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.setcard.done .badge { display: inline-flex; align-items: center; gap: 4px; }
.setcard.done .badge .ico { width: 14px; height: 14px; }
.hidden-actual { display: none; }

/* Corp set pending: inputuri 1fr 1fr + buton */
.setcard-body { display: flex; gap: 10px; align-items: stretch; min-width: 0; }
.setinputs { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.setin { width: 100%; min-width: 0; height: 50px; padding: 0 12px; font-size: 18px; font-weight: 600; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 12px; font-family: inherit; font-variant-numeric: tabular-nums; box-sizing: border-box; }
.setin-empty { border-style: dashed; opacity: .35; }
.checkbtn { width: 56px; height: 56px; min-width: 56px; border-radius: 14px; border: none; background: var(--brand); color: #fff; cursor: pointer; flex: none; display: flex; align-items: center; justify-content: center; }
.checkbtn .ico { width: 26px; height: 26px; stroke-width: 2.6; }
.checkbtn.busy { opacity: .45; }
.uncheck { flex: none; min-height: 48px; min-width: 86px; max-width: 100%; background: transparent; border: 1px solid var(--line); color: var(--mut); border-radius: 10px; padding: 0 12px; font-size: .82rem; font-weight: 600; cursor: pointer; font-family: inherit; }

/* +1 serie și Adaugă exercițiu */
.addset { min-height: 46px; margin-top: 2px; }
#addExBtn { min-height: 52px; }
#finishBtn { margin-top: 18px; }

/* ══════════ Faza 4.2 — Clienți antrenor ══════════ */
.search-row { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 6px 0 12px; margin-bottom: 10px; min-height: 48px; }
.search-row .ico { color: var(--mut); flex: none; }
.search-row input { flex: 1; min-width: 0; border: none; background: transparent; color: var(--text); font-size: 16px; padding: 12px 0; font-family: inherit; }
.search-row input:focus { outline: none; }
.search-row .icon-btn { width: 40px; height: 40px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 4px; }
.pager .btn { min-width: 104px; }
.excard h4 { overflow-wrap: break-word; }

/* ══════════ Faza 4.3 — Profil client (antrenor) ══════════ */
.cp-head { display: flex; align-items: center; }
.cp-id h2 { margin: 0 0 2px; font-size: 1.25rem; overflow-wrap: break-word; }
.cp-id p { margin: 2px 0; }
.cp-latest { text-align: center; }
.cp-latest-n { font-size: 2.6rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cp-latest-n .u { font-size: 1.1rem; font-weight: 600; color: var(--mut); }
.cp-form { margin-top: 10px; }
.cp-note { width: 100%; min-height: 84px; padding: 12px 14px; font-size: 16px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 12px; font-family: inherit; resize: vertical; box-sizing: border-box; }
.cp-note:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(224,52,60,.18); }
.cp-head .badge { flex: none; }

/* ══════════ Faza 4.4 — gestionare antrenamente ══════════ */
.tb-thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; background: var(--bg); border: 1px solid var(--line); flex: none; }
.tb-thumb-empty { display: flex; align-items: center; justify-content: center; color: var(--mut); }
.tb-ops { display: flex; flex-direction: column; gap: 2px; flex: none; }
.tb-op { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; }
.tb-op:disabled { opacity: .3; }
.tb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.tb-f { margin-bottom: 0; }
.tb-f input { min-height: 48px; }
.cp-actions { display: flex; flex-direction: column; }
.picker-head { margin-bottom: 10px; }
#tbNotes { min-height: 60px; }

/* ══════════ Propunere instalare (mobil) ══════════ */
.install-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; font-size: .9rem; }
.install-card .ic-head { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 6px; }
.install-card .ic-head .ico { color: var(--brand); }
.install-card .ic-text { margin: 0 0 8px; overflow-wrap: break-word; }
.install-card .ic-steps { margin: 0 0 10px; padding-left: 20px; }
.install-card .ic-steps li { margin-bottom: 2px; }
.install-card .ic-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.install-card .ic-actions .btn { min-height: 44px; }
[data-theme="light"] .install-card { background: var(--card); }

/* ══════════ Faza 4.5 — atribuire ══════════ */
.assign-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.assign-row:last-child { border-bottom: 0; }
.assign-ops { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.assign-ops .as-date { min-height: 44px; padding: 0 10px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 15px; }
.assign-ops .uncheck { min-height: 44px; }

/* ══════════ 4.4 patch — grupuri picker ══════════ */
.pk-group { margin: 14px 2px 8px; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); border-left: 3px solid var(--brand); padding-left: 8px; }

/* ══════════ Patch free workout — confirmare finalizare ══════════ */
.confirm-overlay { position: fixed; inset: 0; z-index: 260; background: rgba(0,0,0,.75); display: flex; align-items: center; justify-content: center; padding: 24px; }
.confirm-box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; width: 100%; max-width: 340px; text-align: center; }
.confirm-title { font-size: 1.1rem; font-weight: 800; margin: 0 0 6px; }
.confirm-box .muted { margin: 0 0 16px; }
.confirm-btns { display: flex; gap: 10px; }
.confirm-btns .btn { flex: 1; min-height: 48px; margin: 0; }
