:root{color-scheme:dark;--bg: #0b1120;--panel: #111827;--border: #1f2937;--text: #f3f4f6;--muted: #9ca3af;--accent: #14b8a6}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text)}.container{max-width:1120px;margin:0 auto;padding:24px 18px 48px}.topbar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}.topbar h1{margin:0 0 4px;font-size:1.65rem}.topbar-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.muted{color:var(--muted);font-size:.88rem}.cap{text-transform:capitalize}.pill{padding:5px 10px;border-radius:999px;font-size:.8rem;font-weight:600;border:1px solid var(--border)}.pill-live{background:#14b8a626;color:#2dd4bf;border-color:#14b8a6}.pill-ok{background:#22c55e24;color:#4ade80}.pill-warn{background:#f59e0b29;color:#fbbf24;border-color:#f59e0b}.btn-primary{background:var(--accent);color:#042f2e;border:none;border-radius:8px;padding:8px 14px;font-weight:600;cursor:pointer}.btn-primary:hover{filter:brightness(1.08)}.btn-ghost{background:transparent;color:var(--muted);border:1px solid var(--border);border-radius:8px;padding:8px 12px;font-weight:600;cursor:pointer}.btn-ghost:hover{color:var(--text);border-color:var(--muted)}.auth-shell{min-height:100vh;display:flex;align-items:center;justify-content:center}.auth-card{width:100%;max-width:420px}.auth-form{display:flex;flex-direction:column;gap:12px;margin-top:14px}.auth-form input{background:#0f172a;color:var(--text);border:1px solid var(--border);border-radius:8px;padding:10px 12px;font-size:.95rem}.auth-err{color:#fb7185;font-size:.88rem;margin:10px 0 0}.toast{background:#14b8a62e;border:1px solid var(--accent);color:#99f6e4;padding:10px 14px;border-radius:10px;margin-bottom:16px}.tabs{display:flex;gap:8px;margin-bottom:18px;flex-wrap:wrap}.tab{background:var(--panel);color:var(--muted);border:1px solid var(--border);border-radius:10px;padding:9px 16px;font-weight:600;cursor:pointer}.tab.active{background:#1e293b;color:#fff;border-color:var(--accent)}.kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;margin-bottom:18px}.kpi{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:6px}.kpi span{color:var(--muted);font-size:.85rem}.kpi strong{font-size:1.85rem}.kpi strong small{font-size:.95rem;font-weight:500;color:var(--muted)}.card{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:18px;margin-bottom:18px}.card h2{margin:0 0 14px;font-size:1.15rem}.card h3{margin:0 0 10px;font-size:1rem}.svg-chart{width:100%;height:auto;background:#0f172a;border-radius:10px}.legend{display:flex;gap:16px;margin-top:10px;font-size:.85rem;color:var(--muted);flex-wrap:wrap}.legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:6px}.sync-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}.sync-card{background:#0f172a;border:1px solid var(--border);border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:4px}.sleep-list{display:flex;flex-direction:column;gap:12px}.sleep-row{display:flex;flex-direction:column;gap:6px}.sleep-meta{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:.9rem}.stage-bar{display:flex;height:18px;border-radius:8px;overflow:hidden;background:#1e293b}.two-col{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:18px}.vol-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid var(--border)}.workout-card{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;background:#0f172a;border-radius:10px;margin-bottom:10px}.workout-card p{margin:4px 0 0}.route-svg{width:110px;height:74px;background:#0b1120;border-radius:8px;flex-shrink:0}.inline-form{margin-top:18px;padding-top:14px;border-top:1px solid var(--border)}.form-row{display:flex;flex-wrap:wrap;gap:8px}.form-row input,.form-row select{background:#0f172a;color:var(--text);border:1px solid var(--border);border-radius:8px;padding:8px 10px;min-width:90px}.error-box{border-color:#f43f5e}
