/* CoachPulse v2 — You screen (profile / connections / settings / seasons) */

/* ── header ─────────────────────────────────── */
.yu-head { display:flex; align-items:center; gap:14px; margin:4px 0 16px; }
.yu-head-avatar {
    width:56px; height:56px; border-radius:50%; flex-shrink:0; overflow:hidden;
    background:linear-gradient(135deg,#2b6a5c,#0e3f36); border:1px solid rgba(0,212,170,0.35);
    color:#bdf7e9; font-size:17px; font-weight:700; display:flex; align-items:center; justify-content:center;
}
.yu-head-avatar img { width:100%; height:100%; object-fit:cover; }
.yu-head h2 { font-size:20px; font-weight:700; letter-spacing:-0.01em; }
.yu-head p { font-size:12.5px; color:var(--txt-2); margin-top:1px; }

/* ── collapsible section cards ──────────────── */
.yu-card { background:var(--card); border:1px solid var(--line); border-radius:18px; margin-bottom:10px; }
.yu-card summary {
    list-style:none; cursor:pointer; user-select:none;
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    padding:14px 16px; font-size:13.5px; font-weight:700;
}
.yu-card summary::-webkit-details-marker { display:none; }
.yu-card summary span { display:inline-flex; align-items:center; gap:8px; }
.yu-card summary svg:not(.yu-chev) { color:var(--txt-2); }
.yu-chev { color:var(--txt-3); flex-shrink:0; transition:transform 0.18s ease; }
.yu-card[open] > summary .yu-chev { transform:rotate(180deg); }
.yu-card-body { padding:2px 16px 16px; }
.yu-h3 { font-size:14px; font-weight:700; margin-bottom:10px; }
.yu-sub { font-size:11px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:var(--txt-3); margin:14px 0 6px; }

/* ── form bits ──────────────────────────────── */
.form-row-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
@media (max-width:560px) { .form-row-3 { grid-template-columns:1fr 1fr; } }
.yu-chipwrap { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:12px; }
.yu-chipwrap .chip-toggle { display:inline-flex; align-items:center; gap:6px; }
.yu-time { display:flex; align-items:center; gap:4px; }
.yu-time input { width:62px; text-align:center; padding:10px 4px; }
.yu-time b { color:var(--txt-3); }
button.linkish { background:none; border:none; color:var(--accent); font-size:inherit; font-weight:600; padding:0; cursor:pointer; }

/* stats grid (body & health) */
.yu-statgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:10px; margin-bottom:6px; }
.yu-stat label { display:block; font-size:10px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:var(--txt-3); margin-bottom:5px; }
.yu-stat .yu-ro { font-family:var(--disp); font-size:21px; font-weight:700; padding:6px 0; }
.yu-stat .yu-ro small { font-size:11px; font-weight:500; color:var(--txt-2); }
.yu-src { font-size:8.5px; font-weight:800; letter-spacing:0.06em; text-transform:uppercase; padding:2px 6px; border-radius:5px; margin-left:4px; vertical-align:middle; }
.yu-src.garmin { background:rgba(56,189,248,0.14); color:var(--blue); }
.yu-src.manual { background:var(--card-2); color:var(--txt-3); }
.yu-gref { font-size:11px; color:var(--txt-3); margin-top:4px; }
.yu-syncrow { display:flex; align-items:center; gap:10px; margin-bottom:14px; font-size:11.5px; }

/* repeatable rows */
.yu-injury {
    position:relative; background:var(--card-2); border:1px solid var(--line);
    border-radius:14px; padding:12px 12px 2px; margin-bottom:10px;
}
.yu-injury .yu-x { position:absolute; top:8px; right:8px; }
.yu-constraint {
    display:grid; grid-template-columns:110px 1fr 110px 34px; gap:8px; align-items:center;
    background:var(--card-2); border:1px solid var(--line); border-radius:12px;
    padding:10px; margin-bottom:8px;
}
@media (max-width:560px) { .yu-constraint { grid-template-columns:1fr 1fr; } .yu-constraint .ycn-rule { grid-column:1 / -1; } }
.yu-x {
    width:26px; height:26px; border-radius:50%; flex-shrink:0;
    background:var(--card); border:1px solid var(--line-2); color:var(--txt-3);
    font-size:11px; display:flex; align-items:center; justify-content:center;
}
.yu-x:hover { color:var(--red); border-color:rgba(248,113,113,0.4); }

/* schedule */
.yu-sched-day { display:flex; align-items:center; gap:10px; padding:7px 0; border-top:1px solid var(--line); }
.yu-sched-day:first-child { border-top:none; }
.yu-dayname { width:34px; flex-shrink:0; font-size:11px; font-weight:700; letter-spacing:0.06em; text-transform:uppercase; color:var(--txt-3); }
.yu-sched-day .chip-toggle { padding:7px 10px; }

/* race history */
.yu-race {
    display:flex; align-items:center; gap:12px; width:100%; text-align:left;
    background:var(--card-2); border:1px solid var(--line); border-radius:12px;
    padding:10px 12px; margin-bottom:8px; color:var(--txt); cursor:pointer; font-family:var(--ui);
}
.yu-race:hover { border-color:var(--line-2); }
.yu-race > svg { color:var(--txt-2); flex-shrink:0; }
.yu-race-info { flex:1; min-width:0; display:flex; flex-direction:column; }
.yu-race-info b { font-size:13.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.yu-race-info small { font-size:11.5px; color:var(--txt-3); margin-top:1px; }
.yu-race-res { font-family:var(--disp); font-size:16px; font-weight:700; flex-shrink:0; }

/* sticky save bar */
.yu-savebar {
    position:sticky; bottom:calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 10px); z-index:20;
    display:flex; align-items:center; gap:12px;
    background:rgba(23,23,23,0.96); border:1px solid var(--line-2); border-radius:14px;
    padding:10px 12px; margin-top:14px;
    backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
    box-shadow:0 8px 30px rgba(0,0,0,0.45);
}
.yu-savebar .form-status { flex:1; margin-top:0; min-height:0; }
@media (min-width:1024px) { .yu-savebar { bottom:18px; } }

/* ── connections ────────────────────────────── */
.yu-conn-head { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.yu-logo {
    width:40px; height:40px; border-radius:11px; flex-shrink:0;
    display:flex; align-items:center; justify-content:center; font-weight:800; font-size:16px;
}
.yu-logo.garmin { background:rgba(56,140,248,0.15); color:#6aa8ff; }
.yu-logo.strava { background:rgba(252,82,0,0.15); color:#fc6a2c; }
.yu-logo.tp { background:rgba(0,212,170,0.12); color:var(--accent); font-size:12.5px; }
.yu-conn-title { flex:1; min-width:0; }
.yu-conn-title h4 { font-size:14.5px; font-weight:700; }
.yu-acct { font-size:12px; color:var(--txt-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.yu-acct.ok { color:var(--green); }
.yu-acct.err { color:var(--red); }
.yu-acct.stale { color:var(--orange); }
.yu-badge { font-size:9.5px; font-weight:800; letter-spacing:0.06em; text-transform:uppercase; padding:4px 9px; border-radius:999px; flex-shrink:0; }
.yu-badge.ok { background:rgba(52,211,153,0.13); color:var(--green); }
.yu-badge.off { background:var(--card-2); color:var(--txt-3); }
.yu-badge.err { background:rgba(248,113,113,0.14); color:var(--red); }
.yu-badge.stale { background:rgba(251,146,60,0.14); color:var(--orange); }
.yu-desc { font-size:12.5px; color:var(--txt-2); line-height:1.55; margin-bottom:12px; }
.yu-alert { margin-bottom:12px; padding:10px 12px; font-size:12.5px; }
.yu-connstats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:12px; }
.yu-connstats > div { background:var(--card-2); border-radius:10px; padding:8px 10px; display:flex; flex-direction:column; min-width:0; }
.yu-connstats small { font-size:9.5px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:var(--txt-3); }
.yu-connstats b { font-size:12px; font-weight:600; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.yu-syncctl { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.yu-syncctl select, .yu-syncctl input[type="date"] { width:auto; padding:8px 10px; font-size:13px; }
.yu-syncctl .spacer { flex:1; }

/* progress bar */
.yu-prog-wrap { margin-bottom:12px; }
.yu-prog { height:8px; border-radius:99px; background:var(--card-2); overflow:hidden; }
.yu-prog i { display:block; height:100%; width:0; background:var(--accent); border-radius:99px; transition:width 0.5s ease; }
.yu-prog i.err { background:var(--red); }
.yu-prog-label { font-size:11.5px; color:var(--txt-3); margin-top:5px; }

/* strava webhook state */
.yu-webhook { display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--green); margin-bottom:6px; }
.yu-wdot { width:8px; height:8px; border-radius:50%; background:var(--green); box-shadow:0 0 8px rgba(52,211,153,0.7); flex-shrink:0; }

/* ── settings ───────────────────────────────── */
.yu-setrow { display:flex; align-items:center; gap:12px; padding:11px 0; border-top:1px solid var(--line); }
.yu-setrow:first-child, #ys-types .yu-setrow:first-child { border-top:none; }
#ys-types { padding-left:10px; }
.yu-setlabel { flex:1; min-width:0; }
.yu-setlabel b { font-size:13.5px; font-weight:600; display:block; }
.yu-setlabel small { font-size:11.5px; color:var(--txt-3); }
.yu-kv { display:flex; justify-content:space-between; align-items:center; gap:10px; font-size:13px; color:var(--txt-2); padding:9px 0; border-top:1px solid var(--line); }
.yu-kv:first-of-type { border-top:none; }
.yu-kv b { color:var(--txt); font-weight:600; text-align:right; }

/* toggle switch */
.yu-toggle { position:relative; width:46px; height:26px; flex-shrink:0; display:inline-block; }
.yu-toggle input { position:absolute; inset:0; width:100%; height:100%; opacity:0; margin:0; cursor:pointer; }
.yu-toggle .tk { position:absolute; inset:0; background:var(--card-2); border:1px solid var(--line-2); border-radius:999px; pointer-events:none; transition:background 0.15s, border-color 0.15s; }
.yu-toggle .tk::after {
    content:''; position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%;
    background:var(--txt-2); transition:transform 0.15s ease, background 0.15s;
}
.yu-toggle input:checked + .tk { background:var(--accent-dim); border-color:rgba(0,212,170,0.4); }
.yu-toggle input:checked + .tk::after { transform:translateX(20px); background:var(--accent); }
.yu-toggle input:disabled + .tk { opacity:0.45; }

/* ── seasons ────────────────────────────────── */
.yu-season { display:flex; align-items:center; gap:12px; }
.yu-dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; background:var(--txt-3); }
.yu-dot.active { background:var(--green); box-shadow:0 0 8px rgba(52,211,153,0.6); }
.yu-dot.upcoming { background:var(--blue); }
.yu-dot.completed { background:var(--txt-3); }
.yu-season-info { flex:1; min-width:0; display:flex; flex-direction:column; }
.yu-season-info b { font-size:14px; font-weight:600; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.yu-season-info small { margin-top:2px; font-size:11.5px; }
.yu-season-actions { display:flex; gap:6px; flex-shrink:0; }
@media (max-width:480px) {
    .yu-season { flex-wrap:wrap; }
    .yu-season-actions { width:100%; justify-content:flex-end; }
}
