:root{
  --bg:#f4ede9; --surface:#fff; --sunk:#f6efec;
  --line:#e7dbd5; --hair:#f0e6e1;
  --ink:#2a2028; --muted:#7a6a74; --faint:#a9999f;
  --plum:#8c3a5a; --deep:#3b1d33;
  --saude:#2f7a63; --docs:#4f53a3; --creche:#a86a16; --trab:#a83e5e; --pess:#2f6b93;
  --danger:#b03a2e;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}

/* cadeado próprio (ReisHub) */
.gv-gate{min-height:100vh;display:grid;place-items:center;padding:24px 16px}
.gv-card{width:100%;max-width:340px;background:var(--surface);border:1px solid var(--line);border-radius:22px;
  padding:28px 22px;text-align:center;box-shadow:0 10px 30px rgba(59,29,51,.08)}
.gv-ic{font-size:44px;line-height:1}
.gv-h{font-family:Fraunces,Georgia,serif;font-weight:600;font-size:28px;margin:10px 0 2px;color:var(--deep)}
.gv-sub{color:var(--muted);margin:6px 0 16px;font-size:14px}
#gvPin{width:100%;font:inherit;font-size:20px;letter-spacing:.3em;text-align:center;padding:12px;
  border:1px solid var(--line);border-radius:14px;background:var(--sunk);color:var(--ink)}
#gvPin:focus{outline:2px solid var(--plum);outline-offset:1px}
.gv-err{min-height:20px;color:var(--danger);font-size:13px;margin:8px 0}
.gv-btn{width:100%;font:inherit;font-weight:600;padding:12px;border:0;border-radius:14px;background:var(--plum);color:#fff;cursor:pointer}
.gv-btn:disabled{opacity:.6}
.gv-back{display:inline-block;margin-top:14px;color:var(--muted);font-size:13px;text-decoration:none}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font-family:Figtree,system-ui,-apple-system,sans-serif;
  font-size:15px;line-height:1.55;letter-spacing:-.005em;
  -webkit-font-smoothing:antialiased;
  background-image:
    radial-gradient(1100px 620px at 88% -10%,rgba(140,58,90,.10),transparent 62%),
    radial-gradient(880px 520px at -6% 8%,rgba(47,122,99,.09),transparent 60%),
    radial-gradient(760px 500px at 50% 108%,rgba(79,83,163,.07),transparent 62%);
  background-attachment:fixed;
}
body.locked{overflow:hidden}
.wrap{max-width:1560px;margin:0 auto;padding:0 clamp(16px,3.4vw,52px) 80px}
button{font:inherit;cursor:pointer;font-family:inherit}
:focus-visible{outline:2px solid var(--plum);outline-offset:2px;border-radius:8px}
h1,h2,h3{font-family:Fraunces,Georgia,serif;font-weight:500;letter-spacing:-.015em;margin:0}

/* ─────── faixa de estado ─────── */
.band{
  display:grid;grid-template-columns:auto 1fr auto;gap:0 clamp(20px,2.6vw,42px);
  align-items:center;border-radius:22px;padding:22px clamp(20px,2.4vw,34px);
  margin:clamp(18px,2.4vw,30px) 0 0;color:#fdf6f2;
  background:linear-gradient(112deg,#331829 0%,#5f2545 42%,#98395f 76%,#b95a76 100%);
  box-shadow:0 18px 44px -22px rgba(59,29,51,.75);
}
.bweek{display:flex;align-items:baseline;gap:12px;padding-right:clamp(18px,2vw,32px);
  border-right:1px solid rgba(255,255,255,.18)}
.bnum{font-family:Fraunces,Georgia,serif;font-size:clamp(42px,5vw,60px);line-height:.8;
  font-weight:500;font-variation-settings:'SOFT' 22,'WONK' 1}
.bweek .bl{font-size:12px;color:rgba(253,246,242,.6);line-height:1.4;white-space:nowrap}
.bweek .bl b{display:block;color:rgba(253,246,242,.92);font-weight:600;font-size:12.5px}

.brail{min-width:0}
.rail{display:flex;gap:6px;align-items:center}
.seg{flex:1;height:10px;border-radius:99px;background:rgba(255,255,255,.17);position:relative}
.seg i{display:block;height:100%;border-radius:99px;width:0;position:relative;
  transition:width 1.2s cubic-bezier(.4,0,.2,1)}
.seg.s1{color:#7fd8b6} .seg.s2{color:#9aa0f0} .seg.s3{color:#ffc9a3}
.seg.s1 i{background:linear-gradient(90deg,#4fbf95,#7fd8b6)}
.seg.s2 i{background:linear-gradient(90deg,#6d75dd,#9aa0f0)}
.seg.s3 i{background:linear-gradient(90deg,#f09a72,#ffc9a3)}
.seg.live i::after{content:'';position:absolute;right:-6px;top:50%;
  transform:translateY(-50%);width:14px;height:14px;border-radius:50%;
  background:currentColor;box-shadow:0 0 0 4px rgba(255,255,255,.22),0 0 16px currentColor}
.rlabs{display:flex;gap:6px;margin-top:10px;font-size:11px;
  color:rgba(253,246,242,.55);font-weight:600}
.rlabs span{flex:1}
.rlabs span:nth-child(2){text-align:center}
.rlabs span:nth-child(3){text-align:right}

.bright{display:flex;align-items:center;gap:clamp(18px,2.2vw,34px);
  padding-left:clamp(18px,2vw,32px);border-left:1px solid rgba(255,255,255,.18)}
.bnext{background:none;border:0;padding:0;text-align:left;max-width:270px;color:inherit}
.bnext .k{font-size:11px;color:rgba(253,246,242,.55);font-weight:600}
.bnext b{display:block;font-weight:600;font-size:14.5px;line-height:1.3;margin-top:2px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bnext .s{font-size:12px;color:rgba(253,246,242,.68)}
.bnext:hover b{color:#ffd9c4}
.bdpp{text-align:right;white-space:nowrap}
.bdpp .pct{font-family:Fraunces,Georgia,serif;font-size:30px;font-weight:500;
  display:block;line-height:1}
.bdpp .s{font-size:11.5px;color:rgba(253,246,242,.66)}

/* ─────── tabs ─────── */
.tabs{display:inline-flex;background:rgba(255,255,255,.62);border-radius:99px;padding:4px;
  margin:clamp(18px,2.2vw,28px) 0 18px;gap:2px;box-shadow:0 1px 3px rgba(42,32,40,.06)}
.tabs button{background:none;border:0;border-radius:99px;padding:8px 22px;
  font-size:14px;font-weight:600;color:var(--muted)}
.tabs button:hover{color:var(--ink)}
.tabs button.on{background:var(--plum);color:#fff;box-shadow:0 2px 8px -2px rgba(140,58,90,.5)}
.page{display:none}.page.on{display:block}

/* ─────── controlos ─────── */
.ctl{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 16px}
.nav{display:flex;align-items:center;gap:2px}
.nav button{background:none;border:0;color:var(--faint);width:32px;height:32px;
  border-radius:9px;padding:0;font-size:18px;line-height:1}
.nav button:hover{color:var(--plum);background:rgba(255,255,255,.7)}
.monthname{font-family:Fraunces,Georgia,serif;font-size:clamp(21px,2.1vw,26px);
  font-weight:500;min-width:175px;padding:0 10px}
.monthname i{font-style:normal;color:var(--faint)}
.ghost{background:rgba(255,255,255,.66);border:1px solid var(--line);color:var(--muted);
  padding:6px 15px;border-radius:99px;font-size:13px;font-weight:500}
.ghost:hover{color:var(--ink);border-color:var(--faint);background:#fff}
.solid{border:0;border-radius:99px;padding:8px 18px;font-weight:600;font-size:13.5px;
  background:var(--plum);color:#fff;box-shadow:0 2px 10px -3px rgba(140,58,90,.55)}
.solid:hover{background:var(--deep)}
.spacer{flex:1}
.chips{display:flex;flex-wrap:wrap;gap:5px}
.chip{border:0;background:rgba(255,255,255,.55);color:var(--muted);padding:6px 13px;
  border-radius:99px;font-size:12.5px;font-weight:600}
.chip:hover{color:var(--ink);background:#fff}
.chip.on{background:var(--ink);color:#fff}
.chip.on[data-f="Saúde"]{background:var(--saude)}
.chip.on[data-f="Documentos"]{background:var(--docs)}
.chip.on[data-f="Creche"]{background:var(--creche)}
.chip.on[data-f="Trabalho"]{background:var(--trab)}
.chip.on[data-f="Pessoal"]{background:var(--pess)}

.main{display:grid;grid-template-columns:minmax(0,1fr) clamp(238px,20vw,330px);
  gap:clamp(20px,2.4vw,36px);align-items:start}

/* ─────── calendário ─────── */
.cal{border-radius:20px;overflow:hidden;background:var(--surface);
  box-shadow:0 2px 4px rgba(42,32,40,.04),0 18px 40px -28px rgba(59,29,51,.42)}
.dow,.week{display:grid;grid-template-columns:44px repeat(7,minmax(0,1fr))}
.dow{background:linear-gradient(180deg,#fbf6f4,#f7efec)}
.dow span{padding:13px 6px 11px;font-size:11px;color:var(--muted);text-align:center;
  font-weight:700;letter-spacing:.03em}
.dow span:first-child{font-size:0}
.week{border-top:1px solid var(--hair)}
.gut{display:flex;align-items:flex-start;justify-content:center;padding-top:11px;
  font-size:11px;font-weight:700;font-variant-numeric:tabular-nums}
.gut.t1{background:#e8f3ee;color:var(--saude)}
.gut.t2{background:#ecedf8;color:var(--docs)}
.gut.t3{background:#f9ebf0;color:var(--plum)}
.week.now .gut{box-shadow:inset 3px 0 0 currentColor}
.week.now .day{background:#fffaf8}
.day{border-left:1px solid var(--hair);min-width:0;overflow:hidden;min-height:clamp(96px,9.4vh,132px);
  padding:8px 7px 9px;display:flex;flex-direction:column;gap:3px;cursor:pointer;
  transition:background .12s}
.day:hover{background:var(--sunk)}
.dnum{font-size:12.5px;color:var(--muted);padding:1px 3px;font-weight:600;
  font-variant-numeric:tabular-nums}
.day.out{background:#faf6f4}.day.out .dnum{color:#d8cbc9}
.day.today{background:#fdf1f4}
.day.today .dnum{background:var(--plum);color:#fff;border-radius:99px;
  width:22px;height:22px;display:grid;place-items:center;padding:0;
  box-shadow:0 2px 6px -1px rgba(140,58,90,.5)}
.pill{max-width:100%;min-width:0;border-radius:7px;padding:3px 8px;font-size:11.5px;line-height:1.3;font-weight:600;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;
  border-left:3px solid currentColor}
.pill.done{opacity:.36;text-decoration:line-through}
.pill.Saúde{color:var(--saude);background:#e2f1eb}
.pill.Documentos{color:var(--docs);background:#e7e8f7}
.pill.Creche{color:var(--creche);background:#f8eddb}
.pill.Trabalho{color:var(--trab);background:#f9e7ec}
.pill.Pessoal{color:var(--pess);background:#e4eff6}
.more{font-size:10.5px;color:var(--faint);padding-left:5px;font-weight:600}
.dots{display:none;gap:3px;flex-wrap:wrap;padding-left:4px}
.dot{width:6px;height:6px;border-radius:50%;display:block}
.dot.Saúde{background:var(--saude)}.dot.Documentos{background:var(--docs)}
.dot.Creche{background:var(--creche)}.dot.Trabalho{background:var(--trab)}
.dot.Pessoal{background:var(--pess)}.dot.done{opacity:.3}

.foot{display:flex;flex-wrap:wrap;gap:9px 18px;align-items:center;
  margin-top:15px;font-size:12px;color:var(--muted);font-weight:500}
.leg{display:flex;align-items:center;gap:6px}
.leg i{width:9px;height:9px;border-radius:3px;display:block}

/* ─────── ideias ─────── */
.side{position:sticky;top:16px}
.sidehd{display:flex;align-items:center;justify-content:space-between;margin:0 0 13px;gap:8px}
.sidehd h2{font-size:20px}
.sidehd button{border:0;background:var(--plum);color:#fff;border-radius:99px;
  padding:5px 13px;font-size:12px;font-weight:600}
.sidehd button:hover{background:var(--deep)}
.notes{display:flex;flex-direction:column;gap:11px;max-height:calc(100vh - 140px);
  overflow-y:auto;padding:2px 4px 12px}
.note{border:0;text-align:left;font:inherit;color:var(--ink);cursor:pointer;
  border-radius:4px 4px 12px 4px;padding:14px 15px;display:block;width:100%;
  box-shadow:0 2px 6px -1px rgba(42,32,40,.16);transition:transform .18s,box-shadow .18s}
.note:nth-child(3n){transform:rotate(-.8deg)}
.note:nth-child(3n+2){transform:rotate(.7deg)}
.note:hover{transform:rotate(0) translateY(-3px);box-shadow:0 10px 22px -6px rgba(42,32,40,.28)}
.note.Saúde{background:linear-gradient(160deg,#c9e9dc,#b6e0cf)}
.note.Documentos{background:linear-gradient(160deg,#d7d9f3,#c6c9ee)}
.note.Creche{background:linear-gradient(160deg,#f7e4bd,#f2d79f)}
.note.Trabalho{background:linear-gradient(160deg,#f5d6de,#eec4cf)}
.note.Pessoal{background:linear-gradient(160deg,#cfe3ef,#bcd7e8)}
.note b{display:block;font-weight:700;font-size:13.5px;line-height:1.35}
.note span{display:block;font-size:11px;color:rgba(42,32,40,.55);margin-top:5px;font-weight:600}
.note.done b{text-decoration:line-through}.note.done{opacity:.5}
.sideempty{border:1px dashed var(--line);border-radius:14px;padding:24px 14px;
  text-align:center;color:var(--faint);font-size:13px;background:rgba(255,255,255,.5)}

/* ─────── registos ─────── */
.sechd{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  gap:10px;margin:0 0 14px}
.sechd h2{font-size:clamp(20px,2vw,24px);color:var(--deep)}
.sechd p{margin:0;font-size:13px;color:var(--muted);flex:1 1 100%}
.box{background:var(--surface);border-radius:20px;padding:clamp(18px,2vw,26px);
  box-shadow:0 2px 4px rgba(42,32,40,.04),0 16px 36px -28px rgba(59,29,51,.4);
  margin-bottom:32px}

.ficha{display:grid;grid-template-columns:repeat(auto-fit,minmax(255px,1fr));gap:4px 32px}
.fl{display:flex;gap:11px;align-items:flex-start;padding:8px 0;font-size:13.5px;
  color:var(--muted);line-height:1.5}
.fl i{width:8px;height:8px;border-radius:50%;flex:none;margin-top:7px}
.fl b{color:var(--ink);font-weight:600}
.ok{background:var(--saude);box-shadow:0 0 0 3px rgba(47,122,99,.15)}
.att{background:var(--creche);box-shadow:0 0 0 3px rgba(168,106,22,.16)}

.wstats{display:flex;flex-wrap:wrap;gap:clamp(20px,3vw,44px);margin-bottom:18px}
.wstat .k{font-size:11.5px;color:var(--faint);font-weight:600}
.wstat .v{font-family:Fraunces,Georgia,serif;font-size:28px;font-weight:500;
  line-height:1.15;color:var(--plum)}
.wstat .v small{font-family:Figtree,sans-serif;font-size:13px;color:var(--muted);font-weight:500}
.wlist{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}
.wtag{background:#f9eef2;border-radius:99px;padding:5px 10px 5px 14px;font-size:12.5px;
  color:var(--plum);display:flex;align-items:center;gap:8px;font-weight:600}
.wtag b{color:var(--deep);font-weight:700}
.wtag button{background:none;border:0;color:rgba(140,58,90,.5);padding:0 2px;
  font-size:12px;line-height:1}
.wtag button:hover{color:var(--danger)}
.emptybox{border:1px dashed var(--line);border-radius:14px;padding:32px 16px;
  text-align:center;color:var(--faint);font-size:13.5px;background:rgba(255,255,255,.5)}

#recs{display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr));
  gap:13px;align-items:start}
.rec{background:var(--surface);border-radius:18px;overflow:hidden;
  box-shadow:0 2px 4px rgba(42,32,40,.04),0 14px 32px -26px rgba(59,29,51,.4);
  transition:box-shadow .18s,transform .18s}
.rec:hover{box-shadow:0 6px 20px -8px rgba(59,29,51,.3);transform:translateY(-1px)}
.rec.open{grid-column:1/-1}
.rechd{display:flex;gap:15px;align-items:center;padding:17px 19px;width:100%;
  background:none;border:0;text-align:left;font:inherit;color:inherit}
.kind{flex:none;width:40px;height:40px;border-radius:13px;display:grid;place-items:center;
  font-size:17px;color:#fff;font-weight:700}
.kind.exame{background:linear-gradient(145deg,#3d9a7d,#2f7a63)}
.kind.ecografia{background:linear-gradient(145deg,#6a6fc4,#4f53a3)}
.kind.consulta{background:linear-gradient(145deg,#4187b3,#2f6b93)}
.kind.outro{background:linear-gradient(145deg,#b5a3ab,#8e7c85)}
.recmain{flex:1;min-width:0}
.recmain b{display:block;font-weight:600;font-size:15px;line-height:1.3}
.recmain span{display:block;font-size:12.5px;color:var(--muted);margin-top:3px}
.chev2{color:var(--faint);flex:none;font-size:17px;transition:transform .2s}
.rec.open .chev2{transform:rotate(90deg)}
.recbody{padding:0 19px 19px;display:none;font-size:14px;color:var(--muted);line-height:1.65}
.rec.open .recbody{display:block}
.shots{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 4px}
.shot{width:116px;height:116px;border-radius:13px;overflow:hidden;border:1px solid var(--line);
  background:var(--sunk);padding:0;position:relative}
.shot img{width:100%;height:100%;object-fit:cover;display:block}
.shot .rm{position:absolute;top:5px;right:5px;background:rgba(255,255,255,.94);
  border:0;border-radius:50%;width:22px;height:22px;font-size:11px;line-height:1;
  color:var(--muted);padding:0;display:grid;place-items:center}
.shot .rm:hover{color:var(--danger)}
.addshot{width:116px;height:116px;border-radius:13px;border:1px dashed var(--line);
  background:none;color:var(--faint);font-size:12px;display:grid;place-items:center;
  font-weight:600}
.addshot:hover{border-color:var(--plum);color:var(--plum)}
.recacts{display:flex;gap:8px;padding-top:12px;flex-wrap:wrap}

/* prosa */
.prose h4{color:var(--deep);font-size:12.5px;margin:18px 0 7px;font-weight:700;
  font-family:Figtree,sans-serif;letter-spacing:0}
.prose h4:first-child{margin-top:0}
.prose p{margin:0 0 10px}.prose ul{margin:0 0 10px;padding-left:18px}
.prose li{margin-bottom:5px}.prose a{color:var(--pess);font-weight:600}
.prose strong{color:var(--ink);font-weight:600}
.prose .callout{border-left:3px solid var(--creche);padding:4px 0 4px 13px;
  color:var(--creche);margin:0 0 12px;font-weight:500;background:#fdf7ec;
  border-radius:0 8px 8px 0;padding-right:10px}

/* ─────── painel ─────── */
.ov{position:fixed;inset:0;background:rgba(59,29,51,.4);backdrop-filter:blur(3px);
  opacity:0;visibility:hidden;transition:opacity .24s;z-index:40}
.ov.on{opacity:1;visibility:visible}
.panel{position:fixed;top:0;right:0;height:100%;width:min(500px,100%);z-index:50;
  background:var(--surface);box-shadow:-14px 0 50px -14px rgba(59,29,51,.4);
  transform:translateX(102%);transition:transform .3s cubic-bezier(.32,.72,0,1);
  display:flex;flex-direction:column;visibility:hidden}
.panel.on{transform:translateX(0);visibility:visible}
.pwrap{flex:1;overflow-y:auto;padding:26px 28px 46px;-webkit-overflow-scrolling:touch}
.ptop{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:20px}
.phead{font-family:Fraunces,Georgia,serif;font-size:26px;font-weight:500;
  line-height:1.14;color:var(--deep)}
.phead small{display:block;font-family:Figtree,sans-serif;font-size:12.5px;
  color:var(--plum);margin-top:7px;font-weight:600}
.x{background:none;border:1px solid var(--line);color:var(--muted);
  width:33px;height:33px;border-radius:50%;font-size:14px;padding:0;flex:none;line-height:1}
.x:hover{color:var(--plum);border-color:var(--plum)}
.ev{border:1px solid var(--line);border-radius:15px;margin-bottom:10px;overflow:hidden}
.ev.done{opacity:.55}
.evhead{display:flex;gap:12px;align-items:flex-start;padding:14px 15px}
.tick{flex:none;width:23px;height:23px;border-radius:8px;margin-top:1px;
  border:1.5px solid var(--faint);background:none;display:grid;place-items:center;padding:0}
.tick:hover{border-color:var(--saude)}
.ev.done .tick{background:var(--saude);border-color:var(--saude)}
.tick svg{width:12px;height:12px;stroke:#fff;stroke-width:3;fill:none;
  stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity .18s;pointer-events:none}
.ev.done .tick svg{opacity:1}
.evopen{flex:1;background:none;border:0;padding:0;text-align:left;color:inherit;font:inherit}
.evt{font-weight:600;font-size:14.5px;line-height:1.35;display:block}
.evc{font-size:11.5px;font-weight:700;margin-top:4px;display:inline-block}
.evc.Saúde{color:var(--saude)}.evc.Documentos{color:var(--docs)}
.evc.Creche{color:var(--creche)}.evc.Trabalho{color:var(--trab)}.evc.Pessoal{color:var(--pess)}
.chev{color:var(--faint);flex:none;font-size:16px;transition:transform .2s;pointer-events:none}
.ev.open .chev{transform:rotate(90deg)}
.pbody{padding:0 16px 16px;font-size:14px;color:var(--muted);line-height:1.65;display:none}
.ev.open .pbody{display:block}
.evacts{gap:8px;padding:0 16px 15px;display:none;flex-wrap:wrap}
.ev.open .evacts{display:flex}
.evacts button,.recacts button{flex:1 1 30%;border-radius:99px;padding:8px 10px;
  font-size:12.5px;font-weight:600;border:1px solid var(--line);background:none;color:var(--muted)}
.evacts button:hover,.recacts button:hover{color:var(--plum);border-color:var(--plum)}
.evacts .del:hover,.recacts .del:hover{color:var(--danger);border-color:var(--danger)}
.addday{width:100%;margin-top:8px;border-radius:13px;padding:13px;font-size:13.5px;
  font-weight:600;border:1px dashed var(--line);background:none;color:var(--muted)}
.addday:hover{color:var(--plum);border-color:var(--plum)}
.noev{color:var(--faint);font-size:14px;margin:0 0 8px}

/* ─────── formulários ─────── */
.form{position:fixed;z-index:60;left:50%;top:50%;transform:translate(-50%,-46%) scale(.985);
  width:min(500px,calc(100% - 28px));max-height:88vh;overflow-y:auto;
  background:var(--surface);border-radius:22px;padding:28px;
  box-shadow:0 24px 70px -18px rgba(59,29,51,.5);
  opacity:0;visibility:hidden;transition:opacity .2s,transform .2s}
.form.on{opacity:1;visibility:visible;transform:translate(-50%,-50%) scale(1)}
.form h2{font-size:24px;margin:0 0 20px;color:var(--deep)}
label{display:block;font-size:12.5px;color:var(--muted);margin:0 0 6px;font-weight:600}
input,select,textarea{width:100%;font:inherit;font-family:inherit;font-size:14.5px;
  color:var(--ink);background:var(--sunk);border:1px solid var(--line);border-radius:12px;
  padding:11px 14px;margin-bottom:6px}
textarea{min-height:150px;resize:vertical;line-height:1.6;font-size:13.5px;margin-bottom:14px}
select{margin-bottom:14px}
input:focus,select:focus,textarea:focus{border-color:var(--plum);outline:none;background:#fff;
  box-shadow:0 0 0 3px rgba(140,58,90,.12)}
.sub{font-size:11.5px;color:var(--faint);margin:0 0 14px}
.hint{font-size:11.5px;color:var(--faint);margin:0 0 18px}
.frow{display:flex;gap:12px}.frow>div{flex:1;min-width:0}
.facts{display:flex;gap:10px;justify-content:flex-end}
.btn{border-radius:99px;padding:10px 22px;font-size:14px;font-weight:600;
  border:1px solid var(--line);background:none;color:var(--muted)}
.btn:hover{color:var(--ink);border-color:var(--faint)}
.btn.primary{background:var(--plum);border-color:var(--plum);color:#fff;
  box-shadow:0 3px 12px -3px rgba(140,58,90,.55)}
.btn.primary:hover{background:var(--deep);border-color:var(--deep)}

.lb{position:fixed;inset:0;z-index:70;background:rgba(40,18,33,.93);display:none;
  align-items:center;justify-content:center;padding:26px}
.lb.on{display:flex}
.lb img{max-width:100%;max-height:100%;border-radius:12px;
  box-shadow:0 20px 60px -20px rgba(0,0,0,.7)}
.lb button{position:absolute;top:20px;right:20px;background:rgba(255,255,255,.92);
  border:0;border-radius:50%;width:38px;height:38px;font-size:15px}

.tools{margin-top:38px;padding-top:24px;border-top:1px solid var(--line);
  display:flex;flex-wrap:wrap;gap:9px;align-items:center}
.tools p{width:100%;margin:12px 0 0;font-size:12px;color:var(--faint);line-height:1.6}
.warn{background:#fbe6e3;color:#8f3227;border-radius:14px;padding:14px 18px;
  font-size:13px;margin:14px 0 0;display:none;font-weight:600}
.warn.on{display:block}
.wdet{font-weight:500;font-size:11.5px;color:#a8574c;margin-top:5px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;word-break:break-word}
.wacts{display:flex;gap:8px;margin-top:11px;flex-wrap:wrap}
.wacts button{border:1px solid #e0b3ad;background:rgba(255,255,255,.7);color:#8f3227;
  border-radius:99px;padding:5px 14px;font-size:12px;font-weight:700}
.wacts button:hover{background:#fff}
.okline{background:#e6f1ec;color:#25614c;border-radius:14px;padding:11px 16px;
  font-size:12.5px;margin:14px 0 0;font-weight:600;display:none}
.okline.on{display:block}

.esum{display:flex;flex-wrap:wrap;gap:16px 34px;align-items:center;margin-bottom:20px}
.ebar{flex:1 1 240px;min-width:190px}
.ebartrack{height:10px;border-radius:99px;background:#eadfda;overflow:hidden}
.ebarfill{height:100%;border-radius:99px;width:0;
  background:linear-gradient(90deg,#3d9a7d,#6a6fc4,#b95a76);
  transition:width 1s cubic-bezier(.4,0,.2,1)}
.esub{display:flex;justify-content:space-between;gap:12px;font-size:11.5px;
  color:var(--faint);margin-top:8px;font-weight:600}
.efilters{display:flex;flex-wrap:wrap;gap:5px}
.ecat{background:var(--surface);border-radius:20px;margin-bottom:14px;overflow:hidden;
  box-shadow:0 2px 4px rgba(42,32,40,.04),0 14px 32px -26px rgba(59,29,51,.4)}
.ecathd{display:flex;align-items:center;gap:12px;padding:15px 20px;
  border-bottom:1px solid var(--hair);background:linear-gradient(180deg,#fdfaf9,#fbf6f4)}
.ecathd h3{font-size:17px;flex:1;color:var(--deep)}
.ecount{font-size:11.5px;color:var(--muted);font-weight:700;background:var(--sunk);
  padding:4px 11px;border-radius:99px}
.eadd{border:0;background:none;color:var(--plum);font-size:12.5px;font-weight:700;
  padding:5px 11px;border-radius:99px}
.eadd:hover{background:#f9eef2}
.enx{display:flex;align-items:center;gap:12px;padding:12px 20px;
  border-bottom:1px solid var(--hair)}
.enx:last-child{border-bottom:0}
.enx:hover{background:#fdfaf9}
.enx.done{opacity:.5}
.estar{border:0;background:none;color:#dfd3d7;font-size:16px;padding:0 2px;
  line-height:1;flex:none}
.estar.on{color:#dda63f}
.estar:hover{color:#dda63f}
.etick{flex:none;width:22px;height:22px;border-radius:7px;border:1.5px solid var(--faint);
  background:none;display:grid;place-items:center;padding:0}
.etick:hover{border-color:var(--saude)}
.enx.done .etick{background:var(--saude);border-color:var(--saude)}
.etick svg{width:11px;height:11px;stroke:#fff;stroke-width:3;fill:none;
  stroke-linecap:round;stroke-linejoin:round;opacity:0;pointer-events:none}
.enx.done .etick svg{opacity:1}
.eopen{flex:1;min-width:0;background:none;border:0;text-align:left;font:inherit;
  color:inherit;padding:0}
.eopen b{display:block;font-weight:500;font-size:14.5px;line-height:1.35}
.enx.done .eopen b{text-decoration:line-through}
.ebadges{display:flex;flex-wrap:wrap;gap:5px 7px;margin-top:5px}
.bdg{font-size:10.5px;font-weight:700;padding:2px 9px;border-radius:99px;
  background:var(--sunk);color:var(--muted)}
.bdg.gift{background:#f2ecf9;color:#6a4b96}
.bdg.due{background:#e6f1ec;color:var(--saude)}
.bdg.due.soon{background:#fbf0d9;color:var(--creche)}
.bdg.due.late{background:#fae3e0;color:var(--danger)}
.bdg.cal{background:#e7e8f7;color:var(--docs)}
.bdg.lk{background:#e3eef6;color:var(--pess)}
.edel{border:0;background:none;color:#d9ccd0;font-size:13px;padding:5px 7px;
  flex:none;border-radius:9px}
.edel:hover{color:var(--danger);background:#fae3e0}
.echk{display:flex;align-items:center;gap:10px;margin:2px 0 16px;font-size:13.5px;
  color:var(--muted);cursor:pointer;font-weight:500}
.echk input{width:auto;margin:0;accent-color:var(--plum)}
.btn.danger{background:var(--danger);border-color:var(--danger);color:#fff;
  box-shadow:0 3px 12px -3px rgba(176,58,46,.55)}
.btn.danger:hover{background:#8f2d23;border-color:#8f2d23;color:#fff}
.cmsg{margin:0 0 24px;color:var(--muted);font-size:14.5px;line-height:1.6}
.cmsg b{color:var(--ink);font-weight:600}
.toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,16px);z-index:80;
  background:var(--deep);color:#fdf6f2;padding:12px 22px;border-radius:99px;
  font-size:13.5px;font-weight:600;box-shadow:0 12px 34px -8px rgba(59,29,51,.65);
  opacity:0;visibility:hidden;transition:opacity .22s,transform .22s;max-width:90vw;
  text-align:center}
.toast.on{opacity:1;visibility:visible;transform:translate(-50%,0)}
@media(max-width:1000px){
  .band{grid-template-columns:auto 1fr;gap:16px 24px}
  .bright{grid-column:1/-1;padding-left:0;border-left:0;
    border-top:1px solid rgba(255,255,255,.18);padding-top:15px;justify-content:space-between}
  .bnext{max-width:none;flex:1}
  .main{grid-template-columns:minmax(0,1fr)}
  .side{position:static;margin-top:10px}
  .notes{flex-direction:row;flex-wrap:wrap;max-height:none;overflow:visible}
  .note{flex:1 1 190px;width:auto}
  #recs{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:700px){
  .band{padding:18px;gap:14px 16px;grid-template-columns:auto 1fr;border-radius:18px}
  .bweek{padding-right:16px}
  .day{min-height:62px;padding:5px 3px 6px}
  .pill,.more{display:none}
  .dots{display:flex}
  .dow,.week{grid-template-columns:28px repeat(7,minmax(0,1fr))}
  .gut{font-size:10px;padding-top:9px}
  .dow span{font-size:10px;padding:11px 2px 9px}
  .monthname{min-width:0;padding:0 6px}
  .frow{flex-direction:column;gap:0}
  .tabs button{padding:8px 18px}
}
@media(max-width:620px){
  .panel{top:auto;bottom:0;right:0;left:0;width:100%;height:88%;
    border-radius:22px 22px 0 0;transform:translateY(102%)}
  .panel.on{transform:translateY(0)}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* ─────── peso: gráfico do ganho (drawGain em app.js) ─────── */
.gwrap{margin:6px 0 4px}
.ghead{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;margin-bottom:4px}
.ghead b{font-family:Fraunces,Georgia,serif;font-weight:600;font-size:17px;color:var(--deep)}
.ghead span{font-size:12.5px;color:var(--muted)}
.gplot{position:relative;min-height:230px}
.gsvg{display:block;width:100%;height:auto;overflow:visible;touch-action:pan-y;-webkit-user-select:none;user-select:none}
.gsvg .gg{stroke:var(--hair);stroke-width:1}
.gsvg .g0{stroke:var(--line);stroke-width:1.3}
.gsvg .gtri{stroke:var(--line);stroke-width:1;stroke-dasharray:3 4}
.gsvg .gt{fill:var(--muted);font:500 11px Figtree,system-ui,sans-serif}
.gsvg .gfaint{fill:var(--faint)}
.gsvg .garea{fill:rgba(140,58,90,.08)}
.gsvg .gline{fill:none;stroke:var(--plum);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.gsvg .gp{fill:var(--plum);stroke:var(--surface);stroke-width:2}
.gsvg .glab{fill:var(--ink);font:600 12.5px Figtree,system-ui,sans-serif}
.gsvg .gx{stroke:var(--muted);stroke-width:1;stroke-dasharray:2 3}
.gsvg .gph{fill:none;stroke:var(--plum);stroke-width:2}
.gsvg .ghit{fill:transparent;cursor:crosshair}
.gtip{position:absolute;z-index:2;pointer-events:none;background:var(--deep);color:#fff;font-size:12.5px;
  line-height:1.4;padding:7px 10px;border-radius:10px;white-space:nowrap;box-shadow:0 6px 18px rgba(59,29,51,.2)}
.gtip b{font-weight:600}
.gtip span{color:rgba(255,255,255,.72)}
.ghint{margin:4px 0 0;font-size:12.5px;color:var(--muted)}
.fl strong{color:var(--ink);font-weight:600}
