:root{font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#0f1d2e;background:#f5f4f9;font-synthesis:none;--green:#001b33;--lime:#a78bfa;--muted:#5b6475;--border:#e3e1ec;--white:#fff}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}button,a,input,textarea,select{outline-offset:4px}button:focus-visible,a:focus-visible{outline:3px solid #6d28d9}button{min-height:44px;border:0;border-radius:10px;background:var(--green);color:white;padding:12px 19px;font-weight:650}button:hover{filter:brightness(1.08)}button.secondary{background:#eeebf7;color:var(--green)}button.ghost{background:transparent;color:var(--muted);padding:10px 12px}button.danger{background:#fff0ee;color:#9f3227}button.lime{background:var(--lime);color:var(--green)}input,textarea,select{width:100%;min-height:46px;border:1px solid #cfcde0;border-radius:9px;padding:11px;background:white;color:#0f1d2e}input:focus,textarea:focus{outline:2px solid #6d28d9;border-color:transparent}input[type=checkbox]{width:26px;height:26px;min-height:26px;accent-color:var(--green)}label{display:grid;gap:7px;font-size:.9rem;font-weight:600}p{line-height:1.6}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(2rem,4vw,3rem);letter-spacing:-.045em;margin-bottom:10px;line-height:1.1}h2{font-size:1.45rem;letter-spacing:-.025em}h3{font-size:1.13rem}small,.muted{color:var(--muted)}small{font-size:.85rem}.eyebrow{font-size:.75rem;font-weight:750;letter-spacing:.14em;text-transform:uppercase}.shell{display:grid;grid-template-columns:238px minmax(0,1fr);min-height:100vh}.sidebar{background:#fff;border-right:1px solid var(--border);padding:38px 22px;display:flex;flex-direction:column;gap:50px;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:11px;font-size:1.75rem;letter-spacing:-.055em;font-weight:750}.brand img{width:40px;height:40px}.nav{display:grid;gap:8px}.nav button{text-align:left;background:transparent;color:var(--muted);display:flex;gap:12px;align-items:center;font-weight:550}.nav button.active{background:#ede7fd;color:#4c1d95}.nav svg{width:21px;height:21px}.side-bottom{margin-top:auto;border-top:1px solid var(--border);padding-top:20px;display:grid;gap:10px}.personal{display:flex;align-items:center;gap:10px;font-size:.9rem}.avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#ede7fd;color:#5b21b6;font-weight:700}.main{max-width:1250px;width:100%;margin:auto;padding:32px 48px 64px;align-self:start}.topline{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--border);padding-bottom:25px;margin-bottom:38px;gap:16px;font-size:.875rem}.private{display:flex;align-items:center;gap:6px}.private svg{width:16px;height:16px}.pagehead{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:30px}.pagehead p{margin:0}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:32px}.stat{border:1px solid var(--border);border-radius:14px;padding:22px;background:white}.stat strong{display:block;font-size:2.2rem;margin-top:10px;letter-spacing:-.04em}.stat span{font-size:.875rem;color:var(--muted)}.feature{background:var(--green);color:white;border-radius:20px;padding:32px;display:flex;justify-content:space-between;align-items:center;gap:25px;margin-bottom:34px}.feature h2{font-size:1.8rem;margin:10px 0}.feature p{color:#c7cfe0;margin-bottom:20px;max-width:420px}.feature .eyebrow{color:var(--lime)}.feature-number{font-size:7rem;font-weight:750;color:#a78bfa;letter-spacing:-.06em;line-height:1}.feature-number small{display:block;color:#c7cfe0;font-size:.9rem;letter-spacing:0;text-align:center;margin-top:12px}.sectionhead{display:flex;justify-content:space-between;align-items:center;margin:28px 0 16px}.sectionhead h2{margin:0}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.card{background:white;border:1px solid var(--border);border-radius:16px;padding:25px;display:flex;flex-direction:column;gap:16px}.card h3{margin:0}.card-top{display:flex;align-items:center;justify-content:space-between;gap:14px}.badge{display:inline-grid;place-items:center;background:#ede7fd;border-radius:11px;min-width:44px;height:44px;padding:0 10px;font-weight:750;color:#5b21b6}.card ul{padding:0;list-style:none;margin:0;color:var(--muted);line-height:1.85}.card-footer{border-top:1px solid #ebe9f2;padding-top:16px;display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto}.card-footer button{font-size:.875rem}.empty{padding:46px 28px;border:1px dashed #cfcde0;border-radius:16px;text-align:center;background:#faf9fd}.empty p{color:var(--muted);max-width:390px;margin:12px auto 22px}.empty svg{width:36px;height:36px;color:#6d28d9}.rows{display:grid;gap:12px}.history-row{width:100%;text-align:left;display:flex;justify-content:space-between;align-items:center;gap:18px;background:white;color:#0f1d2e;border:1px solid var(--border);padding:20px 24px;border-radius:14px}.history-row small{display:block;font-weight:400;margin-top:6px}.history-row span:last-child{white-space:nowrap;font-size:.9rem}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.toolbar label{min-width:180px}.form{display:grid;gap:20px}.form h2{margin:0}.ex-editor{border:1px solid var(--border);padding:18px;border-radius:12px;display:grid;gap:14px}.field-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.inline{display:flex;align-items:center;justify-content:space-between;gap:12px}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:5px}.session-card{background:white;border:1px solid var(--border);padding:25px;border-radius:16px;margin:18px 0}.session-card h3{margin-bottom:8px}.set-grid{display:grid;grid-template-columns:50px 1fr 1fr 64px;align-items:center;gap:12px;padding:9px 0}.set-grid small{text-align:center}.set-grid input{text-align:center}.set-grid label{display:grid;place-items:center}.set-grid.done{background:#f1ecfd;border-radius:8px}.session-head{display:flex;justify-content:space-between;align-items:center;gap:16px}.session-head small{display:block}.session-summary{background:#ece6fb;padding:18px 22px;border-radius:12px;display:flex;justify-content:space-between;align-items:center;gap:12px;position:sticky;bottom:16px;box-shadow:0 4px 20px #001b3314}.progress-track{height:7px;background:#e2ddf3;border-radius:20px;overflow:hidden;margin-top:20px}.progress-track progress{width:100%;height:7px;display:block;accent-color:#6d28d9}.chart{display:flex;align-items:end;gap:8px;height:155px;border-bottom:1px solid var(--border);padding:10px 0}.bar-col{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:7px}.bar-col meter{width:100%;height:85px;writing-mode:vertical-lr;transform:rotate(180deg);accent-color:#6d28d9}.bar-col small{font-size:.75rem;white-space:nowrap}.evolution{margin-top:25px;background:white;border:1px solid var(--border);border-radius:16px;padding:26px}.evolution select{max-width:360px;margin:8px 0 20px}.auth{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.auth-story{background:var(--green);color:white;padding:60px;display:flex;flex-direction:column;justify-content:space-between}.auth-story .brand{color:var(--lime)}.auth-story h1{font-size:clamp(3rem,6vw,5.8rem);line-height:1;max-width:550px}.auth-story p{color:#b8c2d6;max-width:400px}.auth-story .eyebrow{color:var(--lime)}.auth-form{padding:40px;display:grid;place-items:center}.auth-form form{max-width:390px;width:100%}.auth-form h2{font-size:2rem;margin-bottom:10px}.auth-form p{color:var(--muted)}.error{color:#a63228;line-height:1.5}.note{font-size:.85rem;color:var(--muted);line-height:1.6}.loading{padding:50px;text-align:center}#toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);background:#0b1a2e;color:white;border-radius:10px;padding:14px 22px;box-shadow:0 5px 24px #0002;max-width:90vw;z-index:5;display:none}#toast.show{display:block}dialog{border:1px solid var(--border);border-radius:20px;max-width:640px;width:calc(100% - 28px);padding:28px;max-height:90vh;color:#0f1d2e}dialog::backdrop{background:#001b3388;backdrop-filter:blur(3px)}dialog .form-actions{position:sticky;bottom:-28px;padding:16px 0;background:white}.details{width:100%;border-collapse:collapse}.details th,.details td{text-align:left;padding:10px;border-bottom:1px solid var(--border)}.error-banner{padding:16px;border:1px solid #d58c84;background:#fff4f2;border-radius:10px;color:#912e25;margin-bottom:20px}.hidden{display:none!important}@media(min-width:1450px){.main{padding-top:40px}}@media(max-width:1000px){.shell{grid-template-columns:190px minmax(0,1fr)}.sidebar{padding:28px 14px}.main{padding:25px}.feature-number{font-size:5rem}.cards{grid-template-columns:1fr}.stat{padding:17px}}@media(max-width:700px){.shell{display:block}.sidebar{position:sticky;height:auto;padding:15px 18px;gap:16px;z-index:2;border-right:0;border-bottom:1px solid var(--border)}.brand{font-size:1.5rem}.brand img{width:32px;height:32px}.nav{display:flex;gap:5px}.nav button{padding:10px 12px;font-size:.9rem;flex:1;justify-content:center}.nav svg{width:18px}.side-bottom{display:none}.main{padding:20px 18px 36px}.topline{margin-bottom:26px;padding-bottom:18px;font-size:.8rem}.pagehead{align-items:flex-start;gap:12px}.pagehead button{padding:12px;font-size:.9rem;white-space:nowrap}h1{font-size:2.1rem}.stats{gap:8px;margin-bottom:20px}.stat{padding:14px 10px}.stat span{font-size:.75rem}.stat strong{font-size:1.7rem}.feature{padding:25px;gap:10px;border-radius:16px}.feature h2{font-size:1.5rem}.feature-number{display:none}.feature p{font-size:.9rem}.card{padding:20px}.auth{display:block}.auth-story{padding:26px;min-height:250px;gap:30px}.auth-story h1{font-size:2.6rem;margin-top:16px}.auth-story p,.auth-story>small{display:none}.auth-form{padding:32px 24px}.session-card{padding:18px 14px}.set-grid{grid-template-columns:30px 1fr 1fr 44px;gap:8px}.session-summary{bottom:10px;flex-wrap:wrap}.session-summary button{flex:1}.history-row{padding:18px 16px}.history-row span:last-child{font-size:.8rem}.toolbar{align-items:stretch}.toolbar button{flex:1}.evolution{padding:20px}.field-grid{gap:8px}dialog{padding:20px}dialog .form-actions{bottom:-20px}.personal-mobile{display:block}}
.stat strong{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.stat strong span{letter-spacing:0}.ex-editor+.ex-editor{margin-top:14px}

/* ===== Ritmo 2.0 ===== */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.nav button span{white-space:nowrap}
.sync{display:inline-flex;align-items:center;gap:7px;color:var(--muted)}
.sync::before{content:"";width:8px;height:8px;border-radius:50%;background:#2f9e6b}
.sync.busy::before{background:#d1a43a}
.sync.off{color:#8a5a14}.sync.off::before{background:#c0662b}
.notice{display:flex;justify-content:space-between;align-items:center;gap:20px;background:#fff8e6;border:1px solid #ecd58f;border-radius:14px;padding:20px 22px;margin-bottom:28px}
.notice p{margin:6px 0 0;color:#5f5122}.notice-actions{display:flex;gap:10px;flex-wrap:wrap}
.stat progress{width:100%;height:6px;margin-top:12px;display:block;accent-color:#6d28d9}
.head-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.card-tools{display:inline-flex;align-items:center;gap:2px}
.icon-btn{min-width:40px;padding:8px 10px!important;font-size:1rem}
.icon-btn svg{width:18px;height:18px;display:block}
.card-footer>span{display:inline-flex;gap:2px}
.empty-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
/* Calendário */
.calendar{background:white;border:1px solid var(--border);border-radius:16px;padding:22px 24px;margin-bottom:28px}
.calendar h2{margin:0;font-size:1.15rem}
.cal-wrap{display:flex;gap:8px;margin-top:16px;overflow-x:auto}
.cal-labels{display:grid;grid-template-rows:repeat(7,1fr);gap:4px}
.cal-labels small{font-size:.68rem;line-height:1;display:grid;place-items:center;height:100%}
.cal-grid{display:grid;grid-template-rows:repeat(7,auto);grid-auto-flow:column;gap:4px;flex:1}
.cal-day{min-height:0;width:100%;aspect-ratio:1;max-width:30px;padding:0;border-radius:5px;background:#e9e7f1;border:0}
.cal-day:hover{filter:none;outline:2px solid #a78bfa}
.cal-day.l1{background:#b49cf7}.cal-day.l2{background:#6d28d9}
.cal-day.future{background:transparent;border:1px dashed #ebe9f2}
/* Evolução */
.chart-controls{display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px;margin:14px 0 18px}
.evolution select{max-width:none;margin:0}
.chart-summary{display:flex;gap:28px;flex-wrap:wrap;margin-bottom:12px}
.chart-summary small{display:block;font-size:.78rem}.chart-summary strong{font-size:1.35rem;letter-spacing:-.02em}
.chart-summary .up{color:#1f7a4d}.chart-summary .down{color:#a63228}
.chart-scroll{overflow-x:auto;padding-bottom:4px}
.chart-scroll svg{display:block}
.chart-scroll .bar{fill:#c4b5fd}.chart-scroll .bar.best{fill:#6d28d9}
.chart-scroll .axis{stroke:#e3e1ec}
.chart-scroll .bar-val{font-size:12px;font-weight:700;fill:#0f1d2e}
.chart-scroll .bar-date{font-size:11px;fill:#5b6475}
/* Ajustes */
.panel{background:white;border:1px solid var(--border);border-radius:16px;padding:24px;margin-bottom:18px}
.panel h2{font-size:1.15rem;margin-bottom:14px}.panel p{margin-bottom:14px}
.settings-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:start}
.field{display:grid;gap:7px}.field-label{font-size:.9rem;font-weight:600}
.segmented{display:flex;background:#eeebf7;border-radius:10px;padding:3px;gap:3px}
.segmented button{flex:1;background:transparent;color:var(--muted);min-height:40px;padding:8px}
.segmented button.on{background:white;color:var(--green);box-shadow:0 1px 4px #001b331f}
/* Editor */
.field-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.cols-hint{display:flex;flex-wrap:wrap;gap:6px}
.cols-hint span{background:#eeebf7;border-radius:7px;padding:6px 10px;font-size:.85rem;font-weight:600;color:var(--green)}
.preview{display:grid;gap:10px;margin-top:4px}
.preview>div{border:1px solid var(--border);border-radius:10px;padding:12px 14px}
.preview small{display:block;margin-top:4px;line-height:1.5}
textarea#sheet{font-family:ui-monospace,Menlo,monospace;font-size:.85rem}
/* Sessão */
.ex-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
.ex-head h3{margin:0}
.ex-note{margin:8px 0 0;font-size:.9rem;color:#5b21b6}
.last{margin:10px 0 4px;font-size:.88rem;color:var(--muted);background:#f6f3fe;border-radius:9px;padding:9px 12px}
.last .hint{display:block;color:#5b21b6;font-weight:650;margin-top:4px}
.set-grid{grid-template-columns:50px 1fr 1fr 64px 44px}
.set-head{padding-bottom:0}
.note-btn{color:#9aa0b4}.note-btn.has{color:var(--green)}
.set-note{display:grid;grid-template-columns:120px 1fr;gap:10px;padding:4px 0 12px 62px}
.set-note label{font-size:.8rem}
.set-note-view{margin:-4px 0 6px 62px;font-size:.82rem;color:#5b21b6}
.details .note-row td{color:var(--muted);font-size:.85rem;padding-top:0}
/* Descanso */
.rest{position:fixed;left:50%;transform:translateX(-50%);bottom:18px;z-index:6;width:min(560px,calc(100% - 24px));background:var(--green);color:white;border-radius:16px;padding:14px 16px calc(14px + env(safe-area-inset-bottom,0px));display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;box-shadow:0 10px 30px #001b3355}
.rest small{color:#c7cfe0;display:block;font-size:.78rem}
.rest strong{font-size:1.7rem;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.rest-bar{width:100%;height:6px;accent-color:var(--lime)}
.rest-actions{display:flex;gap:4px}
.rest .ghost{color:white;padding:8px 10px;min-height:40px}
.rest.over{grid-template-columns:1fr auto;background:#4c1d95}
.rest.over strong{font-size:1.2rem;display:block}
body.resting .session-summary{bottom:104px}
body.resting .main{padding-bottom:140px}
#toast{z-index:7}
@media(max-width:1000px){.settings-grid{grid-template-columns:1fr 1fr}.chart-controls{grid-template-columns:1fr 1fr}.chart-controls label:first-child{grid-column:1/-1}}
@media(max-width:700px){
.nav button{flex-direction:column;gap:3px;padding:8px 4px;font-size:.75rem;min-height:52px}
.nav svg{width:20px;height:20px}
.topline{flex-wrap:wrap}
.pagehead{flex-wrap:wrap}.head-actions{width:100%;justify-content:stretch}.head-actions button{flex:1}
.stats{grid-template-columns:repeat(3,minmax(0,1fr))}
.stat strong span{font-size:.7rem}
.notice{flex-direction:column;align-items:stretch}.notice-actions button{flex:1}
.field-grid{grid-template-columns:1fr 1fr}
.settings-grid{grid-template-columns:1fr}
.calendar{padding:18px 14px}
.cal-day{max-width:none;border-radius:4px}
.cal-grid,.cal-labels{gap:3px}
.set-grid{grid-template-columns:28px 1fr 1fr 40px 36px;gap:6px}
.set-grid input[type=number]{padding:10px 4px}
.set-note{grid-template-columns:90px 1fr;padding-left:0}
.set-note-view{margin-left:34px}
.card-footer{flex-wrap:wrap}
.rest{grid-template-columns:auto 1fr;bottom:10px;gap:8px 12px}
.rest-bar{grid-column:1/-1;order:3}
.rest-actions{justify-self:end}
body.resting .session-summary{bottom:132px}
.chart-summary{gap:18px}
.details th,.details td{padding:8px 6px;font-size:.9rem}
}
/* Ajustes de celular: cronômetro e barra de conclusão compactos, aviso no topo durante o descanso */
#s-done{font-weight:650}
body.resting #toast{bottom:auto;top:16px}
@media(max-width:700px){
.session-summary{flex-wrap:nowrap;padding:10px 12px;gap:8px}
.session-summary>span{flex:1;font-size:.9rem}
.session-summary button{flex:none;padding:10px 14px}
.rest{grid-template-columns:1fr auto;padding:10px 14px calc(14px + env(safe-area-inset-bottom,0px));bottom:8px;gap:4px}
.rest strong{font-size:1.5rem}
.rest small{font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:42vw}
.rest-bar{position:absolute;left:14px;right:14px;bottom:7px;width:auto;height:4px}
.rest .ghost{padding:8px 8px}
body.resting .session-summary{bottom:96px}
body.resting .main{padding-bottom:120px}
}

/* ===== REGRA Fitness ===== */
:root{--lime:#6d28d9;--purple:#6d28d9;--accent-soft:#c4b5fd}
button.lime{background:var(--purple);color:#fff}
.feature .eyebrow,.auth-story .eyebrow{color:var(--accent-soft)}
.brand img{width:auto;height:46px;display:block}
.brand{gap:0}
.auth-story .brand img{height:64px}
.rest .lime{color:#fff}
@media(max-width:700px){.brand img{height:34px}.auth-story .brand img{height:48px}}
/* Logo: tamanho fixo na proporção do arquivo (560 × 170 ≈ 3,294 : 1).
   O Safari do iPhone esticava a imagem dentro do contêiner flexível; aqui ela não depende mais disso. */
.brand{display:block;line-height:0}
.brand img{display:block;flex:none;max-width:none;object-fit:contain;width:152px;height:46px}
.auth-story .brand img{width:211px;height:64px}
@media(max-width:700px){.brand img{width:112px;height:34px}.auth-story .brand img{width:158px;height:48px}}
