:root{
  --primary:#2a78d6; --primary-dark:#1c5cab; --primary-soft:#e7f0fb;
  --surface:#fcfcfb; --page:#f9f9f7; --card:#ffffff;
  --ink:#0b0b0b; --ink-2:#52514e; --muted:#898781;
  --grid:#e1e0d9; --baseline:#c3c2b7; --border:rgba(11,11,11,.10);
  --good:#0ca30c; --good-text:#006300; --warning:#fab219; --serious:#ec835a; --critical:#d03b3b;
  --s1:#2a78d6; --s2:#eb6834; --s3:#1baf7a; --s4:#eda100;
  --radius:16px; --nav-h:64px;
}
/* redesign: tema claro único (handoff) */
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent}
:focus-visible{outline:2px solid var(--action, #33705F); outline-offset:2px; border-radius:8px}
html,body{margin:0; padding:0}
body{
  font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
  background:var(--page); color:var(--ink); font-size:16px; line-height:1.45;
  padding-bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px);
}
button{font-family:inherit; font-size:inherit; color:inherit; background:none; border:none; padding:0; cursor:pointer}
input,select,textarea{
  font-family:inherit; font-size:16px; color:var(--ink);
  background:var(--card); border:1px solid var(--border); border-radius:10px; padding:10px 12px; width:100%;
}
textarea{resize:vertical; min-height:70px}
label{display:block; font-size:13px; font-weight:600; color:var(--ink-2); margin:12px 0 4px}

/* ---------- App bar ---------- */
.appbar{
  position:sticky; top:0; z-index:20; background:var(--page);
  padding:calc(10px + env(safe-area-inset-top)) 16px 8px; display:flex; align-items:center; gap:12px;
  border-bottom:1px solid var(--border);
}
.avatar{
  width:42px; height:42px; border-radius:50%; background:var(--primary); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:20px; flex:none;
}
.appbar h1{font-size:20px; margin:0; line-height:1.1}
.appbar .sub{font-size:12px; color:var(--muted)}
.appbar .spacer{flex:1}
.chip-user{font-size:12px; color:var(--ink-2); background:var(--card); border:1px solid var(--border); border-radius:99px; padding:6px 12px}

/* ---------- Layout ---------- */
main{max-width:560px; margin:0 auto; padding:14px 14px 24px}
.screen{display:none}
.screen.active{display:block}
.card{
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius);
  padding:14px 16px; margin-bottom:12px;
}
.card h2{font-size:15px; margin:0 0 10px; display:flex; align-items:center; gap:8px}
.card h2 .more{margin-left:auto; font-size:13px; font-weight:600; color:var(--primary)}
.section-title{font-size:13px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; margin:18px 4px 8px}

/* ---------- Home ---------- */
.greeting{margin:2px 4px 14px}
.greeting .day{font-size:13px; color:var(--muted)}
.greeting .big{font-size:22px; font-weight:700}
.alertbar{
  display:flex; gap:10px; align-items:flex-start; background:var(--card);
  border:1px solid var(--critical); border-radius:var(--radius); padding:12px 14px; margin-bottom:12px;
}
.alertbar .ic{font-size:20px; line-height:1}
.alertbar b{color:var(--critical)}
.medrow{display:flex; align-items:center; gap:12px; padding:10px 0; border-top:1px solid var(--grid)}
.medrow:first-of-type{border-top:none}
.medrow .t{font-variant-numeric:tabular-nums; font-weight:700; width:52px; flex:none}
.medrow .info{flex:1; min-width:0}
.medrow .name{font-weight:600}
.medrow .dose{font-size:13px; color:var(--ink-2)}
.medrow .st{font-size:12px; color:var(--muted)}
.btn-check{
  flex:none; width:44px; height:44px; border-radius:50%; border:2px solid var(--baseline);
  display:flex; align-items:center; justify-content:center; font-size:20px; color:var(--muted);
}
.btn-check.done{background:var(--good); border-color:var(--good); color:#fff}
.btn-check.late{border-color:var(--warning)}
.medrow.done .name,.medrow.done .t{color:var(--muted); text-decoration:line-through}
.pill{font-size:11px; font-weight:700; border-radius:99px; padding:2px 8px; display:inline-block}
.pill.late{background:var(--warning); color:#4a3200}
.pill.ok{background:var(--good); color:#fff}
.pill.next{background:var(--primary); color:#fff}
.sumline{font-size:13px; color:var(--ink-2); margin-top:5px}
.medrow.next{background:var(--primary-soft); border-radius:12px; padding-left:10px; padding-right:6px; border-top-color:transparent}
.donetoggle{display:block; width:100%; text-align:left; font-size:13px; font-weight:600; color:var(--good-text); padding:10px 0 2px; border-top:1px solid var(--grid); margin-top:4px}
.alldone{display:flex; align-items:center; gap:10px; padding:8px 0 2px; font-weight:600; color:var(--good-text)}

.water-wrap{display:flex; align-items:center; gap:14px}
.water-info{flex:1}
.water-bar{height:14px; background:var(--grid); border-radius:99px; overflow:hidden; margin-top:6px}
.water-fill{height:100%; background:var(--s1); border-radius:99px; transition:width .3s}
.water-num{font-size:13px; color:var(--ink-2); margin-top:4px}
.btn-water{
  flex:none; background:var(--primary-soft); color:var(--primary); font-weight:700;
  border-radius:12px; padding:12px 14px; font-size:14px;
}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.stat{background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:12px 14px}
.stat .lbl{font-size:12px; color:var(--muted)}
.stat .val{font-size:20px; font-weight:700; margin-top:2px}
.stat .when{font-size:11px; color:var(--muted); margin-top:2px}

/* ---------- Timeline ---------- */
.filters{display:flex; gap:8px; overflow-x:auto; padding:2px 2px 10px; scrollbar-width:none}
.filters::-webkit-scrollbar{display:none}
.fchip{
  flex:none; font-size:13px; font-weight:600; color:var(--ink-2);
  background:var(--card); border:1px solid var(--border); border-radius:99px; padding:7px 14px;
}
.fchip.on{background:var(--primary); border-color:var(--primary); color:#fff}
.day-head{font-size:13px; font-weight:700; color:var(--muted); margin:16px 4px 8px}
.entry{
  display:flex; gap:12px; background:var(--card); border:1px solid var(--border);
  border-radius:var(--radius); padding:12px 14px; margin-bottom:8px;
}
.entry .ic{
  flex:none; width:38px; height:38px; border-radius:12px; background:var(--primary-soft);
  display:flex; align-items:center; justify-content:center; font-size:18px;
}
.entry.tipo-intercorrencia .ic{background:#fbe9e7}
@media (prefers-color-scheme: dark){ .entry.tipo-intercorrencia .ic{background:#3a2320} }
.entry .body{flex:1; min-width:0}
.entry .top{display:flex; align-items:baseline; gap:8px}
.entry .title{font-weight:600; font-size:14px}
.entry .time{margin-left:auto; font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; flex:none}
.entry .desc{font-size:13px; color:var(--ink-2); margin-top:2px; white-space:pre-wrap}
.entry .who{font-size:11px; color:var(--muted); margin-top:4px}
.entry .del{font-size:11px; color:var(--muted); margin-top:4px; text-decoration:underline}
.empty{color:var(--muted); text-align:center; padding:30px 10px; font-size:14px}

/* ---------- Health ---------- */
.chart-card h2 .cur{margin-left:auto; font-size:13px; font-weight:600; color:var(--ink-2)}
.chart{width:100%; display:block}
.legend{display:flex; gap:14px; margin-top:6px; flex-wrap:wrap}
.legend span{display:flex; align-items:center; gap:6px; font-size:12px; color:var(--ink-2)}
.legend i{width:10px; height:10px; border-radius:3px; display:inline-block}
.range-row{display:flex; gap:8px; margin-bottom:12px}
.tooltip{
  position:fixed; z-index:60; background:var(--ink); color:var(--page);
  font-size:12px; border-radius:8px; padding:6px 10px; pointer-events:none; display:none;
  font-variant-numeric:tabular-nums;
}

/* ---------- Sheets / modals ---------- */
.overlay{position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:40; display:none}
.overlay.open{display:block}
.sheet{
  position:fixed; left:0; right:0; bottom:0; z-index:50; background:var(--page);
  border-radius:20px 20px 0 0; padding:10px 18px calc(20px + env(safe-area-inset-bottom));
  transform:translateY(105%); transition:transform .25s ease; max-height:88vh; overflow-y:auto;
}
.sheet.open{transform:translateY(0)}
.sheet .handle{width:40px; height:4px; border-radius:2px; background:var(--baseline); margin:4px auto 12px}
.sheet h3{margin:0 0 6px; font-size:18px}
.sheet .sub{font-size:13px; color:var(--muted); margin-bottom:10px}
.reg-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-top:8px}
.reg-btn{
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius);
  padding:16px 12px; text-align:center; font-weight:600; font-size:14px;
}
.reg-btn .em{display:block; font-size:26px; margin-bottom:6px}
.reg-btn.alerta{border-color:var(--critical)}
.chips{display:flex; flex-wrap:wrap; gap:8px; margin-top:4px}
.chips .c{
  font-size:14px; background:var(--card); border:1px solid var(--border);
  border-radius:99px; padding:8px 14px;
}
.chips .c.on{background:var(--primary); border-color:var(--primary); color:#fff; font-weight:600}
.row2{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.row3{display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px}
.btn-primary{
  display:block; width:100%; background:var(--primary); color:#fff; font-weight:700;
  border-radius:12px; padding:14px; font-size:16px; margin-top:18px; text-align:center;
}
.btn-ghost{
  display:block; width:100%; color:var(--primary); font-weight:600;
  border-radius:12px; padding:12px; font-size:14px; margin-top:6px; text-align:center;
}
.btn-danger-ghost{color:var(--critical)}

/* ---------- Bottom nav ---------- */
nav{
  position:fixed; left:0; right:0; bottom:0; z-index:30; height:calc(var(--nav-h) + env(safe-area-inset-bottom));
  background:var(--card); border-top:1px solid var(--border);
  display:flex; align-items:flex-start; justify-content:space-around; padding:6px 4px env(safe-area-inset-bottom);
}
nav .tab{flex:1; text-align:center; font-size:11px; color:var(--muted); font-weight:600}
nav .tab .em{display:block; font-size:21px; margin-bottom:1px; filter:grayscale(1); opacity:.55}
nav .tab.on{color:var(--primary)}
nav .tab.on .em{filter:none; opacity:1}
.fab{
  flex:none; width:56px; height:56px; margin-top:-24px; border-radius:50%;
  background:var(--primary); color:#fff; font-size:30px; font-weight:400;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 14px rgba(42,120,214,.45);
}

/* ---------- Mais / listas ---------- */
.list-item{display:flex; align-items:center; gap:12px; padding:13px 2px; border-top:1px solid var(--grid)}
.list-item:first-child{border-top:none}
.list-item .em{font-size:20px; flex:none}
.list-item .tx{flex:1}
.list-item .tx .s{display:block; font-size:12px; color:var(--muted)}
.list-item .arr{color:var(--muted)}
.badge-ex{font-size:10px; font-weight:700; color:var(--ink-2); background:var(--grid); border-radius:6px; padding:1px 6px; vertical-align:middle}
.badge-conf{font-size:10px; font-weight:700; color:#4a3200; background:var(--warning); border-radius:6px; padding:1px 6px; vertical-align:middle}
.entry img.ph{max-width:100%; max-height:150px; border-radius:10px; margin-top:6px; display:block}
.alertbar.info{border-color:var(--s1)}
.alertbar.info b{color:var(--primary)}

/* ---------- Report / print ---------- */
#reportOut{display:none}
#reportOut.show{display:block}
.rep{background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:18px; margin-top:12px}
.rep h3{margin:0 0 2px}
.rep .period{font-size:13px; color:var(--muted); margin-bottom:12px}
.rep h4{font-size:14px; margin:14px 0 4px; color:var(--primary-dark)}
.rep p, .rep li{font-size:14px; margin:2px 0}
.rep ul{margin:4px 0; padding-left:20px}
@media print{
  body *{visibility:hidden}
  #reportOut, #reportOut *{visibility:visible}
  #reportOut{position:absolute; top:0; left:0; width:100%}
  .rep{border:none}
  .no-print{display:none !important}
}
.toast{
  position:fixed; bottom:calc(var(--nav-h) + 20px); left:50%; transform:translateX(-50%);
  background:var(--ink); color:var(--page); font-size:14px; font-weight:600;
  border-radius:99px; padding:10px 20px; z-index:70; opacity:0; transition:opacity .25s; pointer-events:none;
  white-space:nowrap;
}
.toast.show{opacity:1}
#loginScreen, #waitScreen{
  position:fixed; inset:0; z-index:100; background:var(--page);
  display:none; align-items:center; justify-content:center; padding:24px;
}
#loginScreen.show, #waitScreen.show{display:flex}
body.role-cuidador .admin-only{display:none !important}
.login-card{width:100%; max-width:380px; background:var(--card); border:1px solid var(--border); border-radius:20px; padding:26px 22px}
.syncdot{display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--baseline); margin-right:4px; vertical-align:middle}
.syncdot.on{background:var(--good)}
.syncdot.err{background:var(--warning)}

/* ================= REDESIGN (handoff) ================= */
:root{
  --canvas:#F6F4F1; --canvas-alt:#FBFAF8; --surface:#FFFFFF; --sunken:#F1EEE9; --sunken-2:#EDEAE5;
  --ink:#23201D; --ink-2:#4A443E; --ink-3:#615B54; --ink-4:#736D65; --ink-5:#8A837B; --ink-6:#C9C3BA;
  --hairline:rgba(35,32,29,.07); --border:rgba(35,32,29,.10);
  --action:#33705F; --action-hover:#2A5C4E; --action-soft:#E7F0EC; --action-soft-2:#EEF3F0;
  --attention:#C4761F; --attention-ink:#8A5A22; --attention-soft:#FDF6EC; --attention-tint:#F6E4CC;
  --water:#3D6E9E; --water-soft:#E8EFF6; --water-soft-2:#F1F5F9;
  --meal:#8A5A3B; --meal-soft:#F4EDE6; --sleep:#4B4A7A; --sleep-soft:#ECEBF4;
  --mood:#A0603E; --mood-soft:#F3EDE7; --diastolic:#B98A5E; --danger-text:#A0522D;
  /* mapeamento dos tokens antigos */
  --primary:var(--action); --primary-dark:var(--action-hover); --primary-soft:var(--action-soft-2);
  --page:var(--canvas); --card:var(--surface);
  --muted:var(--ink-4); --grid:var(--sunken); --baseline:var(--ink-6);
  --good:var(--action); --good-text:var(--action);
  --warning:var(--attention); --critical:var(--danger-text);
  --s1:var(--water); --s2:var(--diastolic); --s3:var(--sleep); --s4:var(--attention);
  --radius:20px; --nav-h:64px;
}
body{font-family:'Figtree',system-ui,sans-serif; background:var(--canvas); color:var(--ink)}
body.role-cuidador{--nav-h:126px}
.serif{font-family:'Newsreader',Georgia,serif}
input,select,textarea{border-radius:14px; border-color:var(--border)}
label{color:var(--ink-3)}
.appbar{background:var(--canvas); border-bottom:none; padding-bottom:4px}
.appbar h1{font-weight:600}
.appbar .sub{color:var(--ink-4)}
.avatar{background:var(--action); font-family:'Newsreader',serif; font-weight:500}
.chip-user{background:var(--surface); border:1px solid var(--border); border-radius:99px; padding:7px 14px; font-weight:500; color:var(--ink-2); box-shadow:0 1px 2px rgba(35,32,29,.05)}
.card{border-radius:20px; border:1px solid var(--border); box-shadow:0 1px 2px rgba(35,32,29,.05)}
.card h2{font-size:16.5px; font-weight:600}
.section-title,.sec-label{font-size:11.5px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-5); margin:20px 4px 9px}
.btn-primary{border-radius:99px; height:52px; padding:0 20px; display:flex; align-items:center; justify-content:center; background:var(--action); box-shadow:0 8px 18px -10px rgba(51,112,95,.7)}
.btn-primary:active{background:var(--action-hover)}
.btn-ghost{color:var(--action)}
.btn-danger-ghost{color:var(--danger-text)}
.fchip{height:44px; display:flex; align-items:center; border-radius:99px; font-weight:500; color:var(--ink-3); background:var(--surface); border:1px solid var(--border)}
.fchip.on{background:var(--ink); border-color:var(--ink); color:#fff}
.chips .c{height:44px; display:flex; align-items:center; border-radius:99px; background:var(--surface); border:1px solid var(--border)}
.chips .c.on{background:var(--action); border-color:var(--action)}
.sheet{border-radius:26px 26px 0 0; background:var(--canvas)}
.sheet .handle{background:#DCD7CF; width:38px}
.sheet h3{font-size:19px; font-weight:600}
.overlay{background:rgba(35,32,29,.28)}
nav{display:block; height:auto; padding:0 0 env(safe-area-inset-bottom); border-top:1px solid var(--hairline); box-shadow:0 -1px 0 rgba(35,32,29,.03)}
.nav-tabs{width:100%; padding:6px 8px 8px}
.nav-tabs .tab{flex:1; text-align:center; padding:6px 2px}
nav .tab{font-size:12.5px; color:var(--ink-5)}
nav .tab.on{color:var(--action); font-weight:600}
.nav-cta{display:block; margin:10px 16px 6px; width:calc(100% - 32px); height:52px; border-radius:99px; background:var(--action); color:#fff; font-weight:600; font-size:16px; box-shadow:0 8px 18px -10px rgba(51,112,95,.7)}
.nav-tabs{display:flex; justify-content:space-around; align-items:center; padding:2px 8px}
/* ícones */
.ic-svg{display:inline-flex; align-items:center; justify-content:center}
.ic-svg svg{width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round}
.entry .ic{background:var(--sunken); color:var(--ink-3); border-radius:12px}
.entry .ic svg{width:19px; height:19px; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round}
.entry{border-radius:18px}
.entry.tipo-intercorrencia .ic{background:var(--attention-tint); color:var(--attention)}
/* HOJE cuidadora */
.hero-line{font-family:'Newsreader',serif; font-size:27px; line-height:1.2; color:var(--ink); margin:14px 2px 8px}
.attn-line{display:flex; gap:8px; align-items:baseline; color:var(--attention-ink); font-size:14.5px; font-weight:500; margin:0 2px 4px}
.attn-line .dot{width:7px; height:7px; border-radius:50%; background:var(--attention); flex:none; transform:translateY(-1px)}
.agora-card{background:var(--surface); border-radius:18px; border:1px solid var(--border); box-shadow:0 8px 22px -18px rgba(35,32,29,.4); overflow:hidden; margin-bottom:6px}
.agora-row{display:flex; align-items:center; gap:13px; padding:15px 16px}
.agora-row + .agora-row{border-top:1px solid var(--hairline)}
.agora-row.attn{background:var(--attention-soft)}
.tintbox{width:42px; height:42px; border-radius:13px; flex:none; display:flex; align-items:center; justify-content:center}
.tintbox svg{width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round}
.agora-tit{font-weight:600; font-size:17px; color:var(--ink)}
.agora-sub{font-size:13.5px; color:var(--ink-4); margin-top:2px}
.agora-row.attn .agora-sub{color:var(--attention-ink)}
.chk48{width:48px; height:48px; border-radius:50%; border:2px solid var(--action); color:var(--action); flex:none; display:flex; align-items:center; justify-content:center; margin-left:auto}
.chk48:active{background:var(--action-soft-2)}
.chk48 svg{width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round}
.wbar{height:6px; border-radius:99px; background:var(--sunken-2); overflow:hidden; flex:1; min-width:60px}
.wbar i{display:block; height:100%; background:var(--water); border-radius:99px; transition:width .25s ease-out}
.w200{margin-left:auto; height:44px; padding:0 16px; border-radius:99px; background:var(--water-soft-2); color:var(--water); font-weight:600; flex:none}
.later-card{background:var(--surface); border-radius:18px; border:1px solid var(--border); box-shadow:0 1px 2px rgba(35,32,29,.05); overflow:hidden}
.later-row{display:flex; align-items:center; gap:14px; padding:15px 16px; width:100%; text-align:left}
.later-row + .later-row{border-top:1px solid var(--hairline); }
.later-row .lh{width:42px; flex:none; font-weight:600; font-size:13px; color:var(--ink-4); font-variant-numeric:tabular-nums}
.later-row .lt{flex:1; font-weight:500; font-size:16px; color:var(--ink-2)}
.later-row .chev{color:var(--ink-6); flex:none}
.done-band{display:flex; align-items:center; gap:10px; width:100%; text-align:left; background:var(--action-soft-2); border-radius:14px; padding:13px 16px; color:var(--action); font-weight:600; font-size:15px; margin-top:14px}
.done-band svg{width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex:none}
.done-band .cv{margin-left:auto}
/* HOJE familiar */
.fam-hero{background:var(--surface); border-radius:24px; border:1px solid var(--border); box-shadow:0 14px 34px -26px rgba(35,32,29,.5); padding:24px 22px; margin-top:8px}
.fam-frase{font-family:'Newsreader',serif; font-size:29px; line-height:1.18; color:var(--ink)}
.fam-sub{font-size:14.5px; color:var(--ink-3); margin-top:10px; line-height:1.45}
.fam-top{display:flex; gap:16px; align-items:flex-start}
.ring-wrap{flex:none; position:relative; width:66px; height:66px}
.ring-wrap .rc{position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center}
.ring-num{font-weight:600; font-size:17px; color:var(--ink)}
.ring-lbl{font-size:10px; font-weight:600; letter-spacing:.08em; color:var(--ink-5)}
.fam-row{display:flex; gap:12px; align-items:center; padding:13px 0}
.fam-row + .fam-row{border-top:1px solid var(--hairline)}
.fam-rows{margin-top:16px; border-top:1px solid var(--hairline)}
.tint34{width:34px; height:34px; border-radius:11px; flex:none; display:flex; align-items:center; justify-content:center}
.tint34 svg{width:17px; height:17px; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round}
.fam-rt{font-weight:600; font-size:15.5px; color:var(--ink)}
.fam-rs{font-size:13px; color:var(--ink-4); margin-top:1px}
.fam-actions{display:flex; gap:10px; margin-top:18px}
.btn-outline{flex:1; height:52px; border-radius:99px; border:1.5px solid var(--action); color:var(--action); font-weight:600; font-size:16px; background:var(--surface)}
.btn-cam{width:48px; height:48px; border-radius:50%; border:1px solid var(--border); color:var(--ink-3); flex:none; display:flex; align-items:center; justify-content:center; align-self:center}
.btn-cam svg{width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.6}
.pend-band{display:flex; align-items:center; gap:10px; background:var(--attention-soft); border-radius:16px; padding:14px 16px; margin-top:14px}
.pend-band .dot{width:8px; height:8px; border-radius:50%; background:var(--attention); flex:none}
.pend-band .tx{flex:1; color:var(--attention-ink); font-weight:500; font-size:14.5px; line-height:1.35}
.pend-band .act{color:var(--attention); font-weight:600; flex:none}
.pend-note{font-size:13px; color:var(--ink-4); margin:9px 6px 0}
.momentos{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:10px}
.momento img{width:100%; height:112px; object-fit:cover; border-radius:14px; display:block}
.momento .leg{font-size:13px; color:var(--ink-3); margin-top:6px}
.mom-head{display:flex; align-items:baseline}
.mom-head .vt{margin-left:auto; color:var(--action); font-weight:600; font-size:14px}
/* registrar (1d) */
.reg-grid{gap:10px}
.reg-btn{border-radius:16px; padding:14px 12px 12px; text-align:left; display:flex; flex-direction:column; gap:6px; border:1px solid var(--border); background:var(--surface)}
.reg-btn .rtint{width:38px; height:38px; border-radius:12px; display:flex; align-items:center; justify-content:center}
.reg-btn .rtint svg{width:19px; height:19px; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round}
.reg-btn .rtit{font-weight:600; font-size:15.5px; color:var(--ink)}
.reg-btn .rsub{font-size:12.5px; font-weight:500}
.reg-nota{display:block; width:100%; text-align:center; padding:14px 0 2px; color:var(--ink-3); font-size:14px}
.reg-nota b{color:var(--ink-2)}
.medrow.next{background:var(--action-soft-2)}
.pill.next{background:var(--action)}
.pill.late{background:var(--attention-tint); color:var(--attention-ink)}
.login-card{border-radius:24px}
#loginScreen h2{font-family:'Newsreader',serif; font-weight:500; font-size:28px}
.list-item .em svg{width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round}
.list-item .em{color:var(--ink-3)}
.alertbar{border-radius:16px}
.tint-water{background:var(--water-soft); color:var(--water)}
.tint-meal{background:var(--meal-soft); color:var(--meal)}
.tint-sleep{background:var(--sleep-soft); color:var(--sleep)}
.tint-mood{background:var(--mood-soft); color:var(--mood)}
.tint-attn{background:var(--attention-tint); color:var(--attention)}
.tint-action{background:var(--action-soft); color:var(--action)}
.tint-sunken{background:var(--sunken); color:var(--ink-3)}
/* histórico / dias anteriores */
.scr-title{font-weight:600; font-size:20px; margin:6px 2px 2px}
.scr-sub{color:var(--ink-4); font-size:14px; margin:0 2px 12px}
.day-card{background:var(--surface); border:1px solid var(--border); border-radius:18px; box-shadow:0 1px 2px rgba(35,32,29,.05); overflow:hidden; margin-bottom:14px}
.dhead{background:var(--canvas-alt); padding:16px 18px 14px; border-bottom:1px solid var(--hairline)}
.dtit{font-weight:600; font-size:16.5px}
.dcount{float:right; color:var(--ink-4); font-size:13.5px; font-weight:400}
.dsum{font-family:'Newsreader',serif; color:var(--ink-3); font-size:15px; line-height:1.45; margin-top:6px}
.drow{display:flex; align-items:center; gap:12px; width:100%; text-align:left; padding:15px 18px}
.drow + .drow{border-top:1px solid var(--hairline)}
.drow .dh{width:38px; flex:none; font-weight:600; font-size:12.5px; color:var(--ink-5); font-variant-numeric:tabular-nums}
.drow .dt{flex:1; font-weight:500; font-size:15px; color:var(--ink)}
.drow .dthumb{width:22px; height:22px; border-radius:6px; object-fit:cover; flex:none}
.fam-day{background:var(--surface); border:1px solid var(--border); border-radius:20px; box-shadow:0 1px 2px rgba(35,32,29,.05); padding:18px; margin-bottom:14px}
.fd-top{display:flex; align-items:baseline}
.fd-tit{font-weight:600; font-size:16.5px}
.fd-rel{margin-left:auto; color:var(--ink-4); font-size:13.5px}
.fd-sum{font-family:'Newsreader',serif; font-size:18px; line-height:1.4; color:var(--ink-2); margin-top:8px}
.fd-more{display:flex; align-items:center; width:100%; margin-top:14px; padding:10px 0 2px; border-top:1px solid var(--hairline); font-weight:600; font-size:14px; color:var(--action); text-align:left}
.fd-more .cv{margin-left:auto; display:flex; transition:transform .2s}
.fd-more .cv svg{width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round}
.fd-more.open .cv{transform:rotate(180deg)}
.fd-det{margin:8px -18px -14px; border-top:1px solid var(--hairline)}
.fd-det .drow{padding:13px 18px}
.rot-row{display:flex; align-items:center; gap:12px; padding:11px 16px}
.rot-row + .rot-row{border-top:1px solid var(--hairline)}
.rot-row input[type=time]{width:auto; margin:0; padding:7px 10px; font-size:14px; flex:none}
.rot-row .rt{flex:1; font-weight:500; font-size:15px; color:var(--ink)}
.rot-row .rdel{color:var(--critical); font-weight:600; font-size:13.5px; padding:6px 2px; flex:none}
.conv-cod{font-family:'Newsreader',Georgia,serif; font-size:38px; letter-spacing:.14em; text-align:center; background:var(--action-soft); color:var(--action); border-radius:16px; padding:16px 10px; margin-bottom:14px; font-variant-numeric:tabular-nums}
.fx-line{display:flex; gap:10px; padding:9px 0; border-top:1px solid var(--hairline); align-items:flex-start}
.fx-line:first-of-type{border-top:none}
.fx-line .lbdot{width:6px; height:6px; border-radius:50%; background:var(--action); flex:none; margin-top:8px}
.fx-line .lt{font-weight:600; font-size:14.5px; color:var(--ink)}
.fx-line .ld{font-size:13.5px; color:var(--ink-3); margin-top:2px; line-height:1.45}
.linkbtn{font-size:12px; font-weight:700; color:var(--primary); padding:4px 2px}
.linkbtn.danger{color:var(--critical)}
.rot-done-toggle{display:flex; align-items:center; gap:10px; width:100%; padding:13px 18px; font-weight:600; font-size:14px; color:var(--action); border-top:1px solid var(--hairline); text-align:left}
.rot-done-toggle svg{width:19px; height:19px; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round}
.rot-done-toggle .cv{margin-left:auto; display:flex; transition:transform .2s}
.rot-done-toggle[aria-expanded="true"] .cv{transform:rotate(180deg)}
.rot-done-list .later-row{opacity:.75}
.tl-ctrl{display:flex; gap:10px; margin:0 0 12px; flex-wrap:wrap}
.tl-ctrl input[type=search]{flex:1; margin:0; min-width:0}
.tl-ctrl input[type=date]{width:150px; flex:none; margin:0}
.per-sep{font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--ink-5); padding:10px 18px 2px}
.per-sep + .drow{border-top:none}
.tl-hit{font-size:13.5px; color:var(--ink-3); margin:2px 2px 10px}
.trend{display:inline-flex; margin-left:8px; vertical-align:middle}
.trend svg{width:16px; height:16px; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; fill:none}
.trend.up svg{stroke:var(--action)}
.trend.down svg{stroke:var(--attention-ink)}
.trend.flat svg{stroke:var(--ink-5)}
.res-note{font-size:11.5px; color:var(--ink-5); padding:9px 2px 2px}
.prox-card{display:flex; align-items:center; gap:12px; width:100%; background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:14px 16px; margin-bottom:4px}
.prox-card .chev{margin-left:auto; color:var(--ink-5)}
.prox-card .chev svg{width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:1.8}
.paper.compact .p-sec{margin-bottom:12px}
.paper.compact .p-txt, .paper.compact .p-v{font-size:13.5px}
.paper.compact .p-lbl{margin-bottom:3px}
@media print{ .paper.compact{font-size:12px} }
.lightbox{position:fixed; inset:0; z-index:200; background:rgba(15,13,11,.94); display:none; align-items:center; justify-content:center; padding:14px}
.lightbox.show{display:flex}
.lightbox img{max-width:100%; max-height:100%; border-radius:12px; object-fit:contain}
.lightbox .lb-close{position:absolute; top:calc(14px + env(safe-area-inset-top)); right:16px; width:42px; height:42px; border-radius:50%; background:rgba(255,255,255,.14); color:#fff; font-size:26px; line-height:1; display:flex; align-items:center; justify-content:center}
.momento img, .det-photos img, .entry .ph{cursor:pointer}
.tour{position:fixed; inset:0; z-index:150; display:none}
.tour.show{display:block}
.tour.intro-mode{background:rgba(23,20,17,.58); display:flex; align-items:center; justify-content:center; padding:24px}
.tour-intro{background:var(--surface,#fff); border-radius:24px; box-shadow:0 12px 40px rgba(0,0,0,.30); padding:30px 24px 18px; max-width:340px; width:100%; text-align:center}
.tour-intro .ti-avatar{width:62px; height:62px; border-radius:50%; background:var(--action); color:#fff; font-family:'Newsreader',Georgia,serif; font-size:30px; display:inline-flex; align-items:center; justify-content:center; margin-bottom:14px}
.tour-intro h3{font-family:'Newsreader',Georgia,serif; font-size:23px; font-weight:500; margin:0 0 8px; color:var(--ink)}
.tour-intro p{font-size:15px; line-height:1.55; color:var(--ink-2); margin:0 0 18px}
.tour-intro .ti-later{display:block; width:100%; margin-top:8px; padding:10px; font-size:14px; font-weight:600; color:var(--ink-4)}
.tour-hl{position:absolute; border-radius:18px; box-shadow:0 0 0 9999px rgba(23,20,17,.58), 0 0 0 3px rgba(246,244,241,.9); transition:top .4s ease, left .4s ease, width .4s ease, height .4s ease; pointer-events:none}
.tour-tip{position:absolute; left:16px; right:16px; max-width:400px; margin:0 auto; background:var(--surface,#fff); border-radius:18px; padding:15px 17px 13px; box-shadow:0 10px 34px rgba(0,0,0,.28); transition:top .4s ease}
.tour-tip .tt-step{font-size:11.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--action); margin-bottom:5px}
.tour-tip .tt-t{font-family:'Newsreader',Georgia,serif; font-size:20px; font-weight:500; color:var(--ink); margin-bottom:4px}
.tour-tip .tt-x{font-size:14.5px; line-height:1.5; color:var(--ink-2)}
.tour-tip .tt-row{display:flex; align-items:center; margin-top:12px; gap:10px}
.tour-tip .tt-skip{font-size:14px; font-weight:600; color:var(--ink-4); padding:8px 4px}
.tour-tip .tt-next{margin-left:auto; background:var(--action); color:#fff; font-weight:700; font-size:15px; border-radius:99px; padding:10px 22px}
.statchips{display:flex; gap:8px; flex-wrap:wrap; margin-top:12px}
.statchip{height:30px; display:flex; align-items:center; padding:0 12px; border-radius:99px; font-weight:600; font-size:13px}
.thumbrow{display:flex; gap:10px; margin-top:12px}
.thumbrow img{width:80px; height:80px; border-radius:12px; object-fit:cover}
.thumbmore{width:80px; height:80px; border-radius:12px; background:var(--sunken); color:var(--ink-4); display:flex; align-items:center; justify-content:center; font-weight:600}
.loadmore{display:block; width:100%; text-align:center; color:var(--ink-4); font-size:15px; padding:8px 0 16px}
.det-title{font-weight:600; font-size:19px}
.det-meta{color:var(--ink-4); font-size:13.5px; margin:4px 0 10px}
.det-photos{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:8px 0}
.det-photos img{width:100%; height:130px; object-fit:cover; border-radius:14px}
.det-obs{font-size:15px; color:var(--ink-2); line-height:1.55; margin-top:6px}
/* saúde (1f) */
.hd-row{display:flex; align-items:center; justify-content:space-between; margin:6px 2px 14px; gap:12px}
.hd-row .btn-primary{width:auto; flex:none}
.seg{display:flex; background:var(--sunken-2); border-radius:99px; padding:3px}
.seg button{padding:7px 14px; border-radius:99px; font-weight:600; font-size:13.5px; color:var(--ink-4)}
.seg button.on{background:#fff; color:var(--ink); box-shadow:0 1px 2px rgba(35,32,29,.12)}
.hh-card{background:var(--surface); border:1px solid var(--border); border-radius:20px; box-shadow:0 1px 2px rgba(35,32,29,.05); padding:20px; margin-bottom:14px}
.hh-lbl{font-weight:600; font-size:15.5px; color:var(--ink-2)}
.hh-when{float:right; color:var(--ink-4); font-size:13px; text-align:right; line-height:1.3}
.hh-val{font-weight:600; font-size:31px; letter-spacing:-.01em; margin-top:4px}
.hh-tag{font-size:14px; font-weight:600; margin-left:8px}
.hh-legend{display:flex; gap:16px; color:var(--ink-4); font-size:13px; margin-top:10px; align-items:center}
.hh-legend .dash{display:inline-block; width:9px; height:2.5px; border-radius:2px; margin-right:6px; vertical-align:middle}
.hh-legend .n{margin-left:auto}
.mgrid{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:14px}
.mtile{background:var(--surface); border:1px solid var(--border); border-radius:18px; box-shadow:0 1px 2px rgba(35,32,29,.05); padding:16px}
.mtile .ml{font-weight:600; font-size:13.5px; color:var(--ink-2)}
.mtile .mv{font-weight:600; font-size:24px; margin-top:6px}
.mtile .mv small{font-weight:500; font-size:14px; color:var(--ink-5); margin-left:3px}
.mtile .md{font-size:11.5px; font-weight:500; color:var(--ink-4); margin-top:2px}
.mtile .md.attn{color:var(--attention-ink)}
.mtile svg{margin-top:10px; display:block}
.consult-band{display:flex; align-items:center; gap:12px; width:100%; text-align:left; background:var(--action-soft-2); border-radius:16px; padding:16px; color:var(--action); font-weight:600; font-size:15.5px}
.consult-band .cb-chev{margin-left:auto}
.consult-band svg{width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex:none}
/* relatório (1g) */
.paper{background:#fff; border-radius:6px; box-shadow:0 10px 24px -14px rgba(35,32,29,.5); padding:24px 22px; margin-bottom:14px}
.paper h3{font-family:'Newsreader',serif; font-weight:500; font-size:23px; margin:0}
.p-id{font-weight:600; font-size:15px; margin-top:8px}
.p-meta{color:var(--ink-4); font-size:13px; margin-top:2px}
.p-rule{height:1px; background:var(--ink); margin:16px 0 0}
.p-sec{padding:16px 0; border-bottom:1px solid var(--hairline)}
.p-sec:last-child{border-bottom:none; padding-bottom:4px}
.p-lbl{font-size:11.5px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-5); margin-bottom:8px}
.p-txt{font-size:15px; line-height:1.55; color:var(--ink-2)}
.p-grid{display:grid; grid-template-columns:1fr 1fr; gap:14px}
.p-k{font-size:11.5px; color:var(--ink-4)}
.p-v{font-weight:600; font-size:16px; margin-top:2px}
.p-s{font-size:11.5px; color:var(--ink-4); margin-top:2px}
.p-band{display:flex; gap:8px; align-items:baseline; background:var(--attention-soft); border-radius:12px; padding:10px 12px; color:var(--attention-ink); font-size:14px; margin-top:12px}
.p-band .dot{width:7px; height:7px; border-radius:50%; background:var(--attention); flex:none; transform:translateY(-1px)}
.p-final{color:var(--ink-3); font-size:14.5px; line-height:1.55}
.p-cap{font-size:11px; color:var(--ink-5); margin:0 0 8px}
.rep-actions{display:flex; gap:10px; align-items:center}
.btn-print{width:52px; height:52px; border-radius:50%; background:var(--surface); border:1px solid var(--border); color:var(--ink-2); flex:none}
/* medicações (2b) */
.med-card{background:var(--surface); border:1px solid var(--border); border-radius:18px; box-shadow:0 1px 2px rgba(35,32,29,.05); overflow:hidden; margin-bottom:14px}
.med-row{display:flex; align-items:center; gap:14px; width:100%; text-align:left; padding:16px}
.med-row + .med-row{border-top:1px solid var(--hairline)}
.med-row .mn{font-weight:600; font-size:17px}
.med-row .ms{font-size:13.5px; color:var(--ink-4); margin-top:2px}
.pend-card{background:var(--surface); border:1px solid var(--border); border-radius:18px; box-shadow:0 1px 2px rgba(35,32,29,.05); padding:18px; margin-bottom:14px}
.pend-tit{display:flex; align-items:baseline; gap:9px; font-weight:600; font-size:16.5px}
.pend-tit .dot{width:8px; height:8px; border-radius:50%; background:var(--attention); flex:none; transform:translateY(-1px)}
.pend-exp{color:var(--ink-3); font-size:14px; line-height:1.5; margin:8px 0 12px}
.pend-chips{display:flex; flex-wrap:wrap; gap:9px}
.pend-chips button{height:44px; padding:0 18px; border-radius:99px; background:var(--sunken); font-weight:500; font-size:15px; color:var(--ink-2)}
.mcfg-card{background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:16px 18px; margin-top:12px}
.dose-seg{display:grid; grid-template-columns:repeat(4,1fr); gap:9px}
.dose-seg button{height:52px; border-radius:14px; border:1px solid var(--border); background:var(--surface); font-weight:600; font-size:15.5px; color:var(--ink-3)}
.dose-seg button.on{border:2px solid var(--action); background:var(--action-soft-2); color:var(--action)}
.hora-chips{display:flex; flex-wrap:wrap; gap:9px}
.hora-chips .hchip{height:44px; padding:0 18px; border-radius:99px; background:var(--action); color:#fff; font-weight:600; font-size:15.5px}
.hora-chips .hadd{height:44px; padding:0 20px; border-radius:99px; border:1.5px dashed var(--ink-6); color:var(--ink-4); font-weight:500}
.toggle-row{display:flex; align-items:center; justify-content:space-between; border-top:1px solid var(--hairline); margin-top:14px; padding-top:14px; font-weight:500; font-size:16px}
.toggle{width:46px; height:28px; border-radius:99px; background:var(--sunken-2); position:relative; transition:background .15s}
.toggle i{position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(35,32,29,.2); transition:left .15s}
.toggle.on{background:var(--action)}
.toggle.on i{left:21px}
/* ficha clínica (4a) */
.fx-card{background:var(--surface); border:1px solid var(--border); border-radius:20px; box-shadow:0 1px 2px rgba(35,32,29,.05); padding:18px; margin-bottom:14px}
.fx-ident{display:flex; gap:14px; align-items:center; padding-bottom:14px; border-bottom:1px solid var(--hairline); margin-bottom:14px}
.fx-ident .nm{font-weight:600; font-size:18px}
.fx-ident .ag{color:var(--ink-4); font-size:13.5px; margin-top:2px}
.fx-grid{display:grid; grid-template-columns:1fr 1fr; gap:14px}
.fx-k{font-size:11.5px; color:var(--ink-4)}
.fx-v{font-weight:600; font-size:16px; margin-top:2px}
.fx-amber{background:var(--attention-soft); border:1px solid rgba(196,118,31,.25); border-radius:20px; padding:18px; margin-bottom:14px}
.fx-amber .p-lbl{color:var(--attention)}
.fx-care{padding:12px 0; border-bottom:1px solid rgba(196,118,31,.18)}
.fx-care:last-of-type{border-bottom:none}
.fx-care .ct{font-weight:600; font-size:15.5px}
.fx-care .cb{font-size:14px; color:var(--ink-2); line-height:1.5; margin-top:3px}
.fx-amber .note{font-size:13px; color:var(--attention-ink); margin-top:10px; line-height:1.45}
.fx-diag{display:flex; gap:12px; padding:12px 0; border-bottom:1px solid var(--hairline)}
.fx-diag:last-child{border-bottom:none}
.fx-diag .dd{width:52px; flex:none; font-weight:600; font-size:12.5px; color:var(--ink-4); line-height:1.3}
.fx-diag .dn{font-weight:600; font-size:15.5px}
.fx-diag .dx{font-size:13.5px; color:var(--ink-4); margin-top:2px; line-height:1.4}
.fx-two{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:14px}
.fx-tile{background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:16px}
.fx-tile .tv{font-weight:600; font-size:15.5px; margin-top:6px; line-height:1.35}
.fx-tile .ts{font-size:12.5px; color:var(--ink-4); margin-top:4px}
.fx-tile .okrow{display:flex; gap:8px; align-items:center; color:var(--action); font-weight:600; margin-top:6px}
.fx-tile .okrow svg{width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round}
.fx-team{display:flex; gap:12px; align-items:center; padding:11px 0; border-bottom:1px solid var(--hairline)}
.fx-team:last-child{border-bottom:none}
.fx-team .av{width:34px; height:34px; border-radius:50%; background:var(--action-soft); color:var(--action); font-weight:600; font-size:13px; display:flex; align-items:center; justify-content:center; flex:none}
.fx-team .tn{font-weight:600; font-size:15px}
.fx-team .td{font-size:13px; color:var(--ink-4); margin-top:1px}
.fx-cont{display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--hairline)}
.fx-cont:last-child{border-bottom:none}
.fx-cont .cn{font-weight:600; font-size:15.5px}
.fx-cont .cd{font-size:13.5px; color:var(--ink-4); margin-top:2px}
.fx-call{margin-left:auto; width:44px; height:44px; border-radius:50%; background:var(--action-soft); color:var(--action); display:flex; align-items:center; justify-content:center; flex:none}
.fx-call svg{width:19px; height:19px; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round}
.verlink{margin-left:auto; color:var(--action); font-weight:600; font-size:14px}
/* vitais com teclado (2c) */
.vbig{display:flex; align-items:baseline; justify-content:center; gap:10px; font-weight:600; font-size:44px; letter-spacing:-.02em}
.vbig .sep{color:var(--ink-6); font-weight:400}
.vbig button[data-f]{min-width:74px; text-align:center; border-bottom:3px solid transparent; padding-bottom:2px; font:inherit; color:inherit}
.vbig button.act{border-bottom-color:var(--action)}
.vbig small{font-size:14px; color:var(--ink-5); font-weight:500}
.vsec{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:14px}
.vsec button{background:var(--canvas); border-radius:13px; padding:12px 14px; text-align:left; border:2px solid transparent}
.vsec button.act{border-color:var(--action)}
.vsec .k{font-size:13px; color:var(--ink-4)}
.vsec .v{font-weight:600; font-size:20px; margin-top:2px}
.vsec .v small{font-size:12.5px; color:var(--ink-5); font-weight:500}
.vtime{display:flex; align-items:center; gap:8px; border-top:1px solid var(--hairline); margin-top:14px; padding-top:12px; color:var(--action); font-weight:600; font-size:14.5px}
.kp{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:14px}
.kp button{height:54px; border-radius:14px; background:var(--surface); border:1px solid var(--border); font-weight:600; font-size:20px}
.kp .kdel{background:var(--sunken-2); font-size:14px; color:var(--ink-3); border:none}
.kp .kok{background:var(--action); color:#fff; border:none}
.stepper{display:flex; align-items:center; gap:14px; margin-top:6px}
.stepper button{width:38px; height:38px; border-radius:50%; border:1px solid var(--border); background:var(--surface); font-size:20px; font-weight:600; color:var(--ink-2)}
.chips.sleepy .c.on{background:var(--sleep); border-color:var(--sleep)}
.chips.moody .c.on{background:var(--mood); border-color:var(--mood)}
/* aviso contextual (4b) */
.ctx-aviso{display:flex; gap:9px; align-items:baseline; background:var(--attention-soft); border-radius:14px; padding:12px 14px; color:var(--attention-ink); font-size:14px; line-height:1.45; margin-top:10px}
.ctx-aviso .dot{width:7px; height:7px; border-radius:50%; background:var(--attention); flex:none; transform:translateY(-1px)}
/* pessoas (3d) */
.role-pick{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:4px}
.role-pick button{padding:13px 14px; border-radius:14px; border:1px solid var(--border); background:var(--surface); text-align:left}
.role-pick button b{display:block; font-size:15px}
.role-pick button small{display:block; font-size:12px; color:var(--ink-4); margin-top:4px; line-height:1.4}
.role-pick button.on{border:2px solid var(--action); background:var(--action-soft-2); padding:12px 13px}
.roletag{height:28px; padding:0 12px; border-radius:99px; font-size:12.5px; font-weight:600; display:inline-flex; align-items:center; vertical-align:middle}
.roletag.fam{background:var(--meal-soft); color:var(--meal)}
.roletag.cui{background:var(--action-soft); color:var(--action)}
.pes-row{display:flex; gap:12px; padding:14px 0; border-bottom:1px solid var(--hairline)}
.pes-row:last-child{border-bottom:none}
.pes-av{width:40px; height:40px; border-radius:50%; background:var(--action-soft); color:var(--action); font-weight:600; display:flex; align-items:center; justify-content:center; flex:none}
/* folha de emergência (4c) */
.emerg{position:fixed; inset:0; z-index:120; background:var(--ink); display:none; overflow-y:auto; padding:22px 18px calc(24px + env(safe-area-inset-bottom))}
.emerg.show{display:block}
.em-top{display:flex; align-items:flex-start; margin-bottom:16px}
.em-lbl{color:var(--attention); font-weight:600; font-size:12px; letter-spacing:.12em; text-transform:uppercase; line-height:1.5}
.em-x{margin-left:auto; width:44px; height:44px; border-radius:50%; background:rgba(255,255,255,.12); color:#fff; font-size:22px}
.em-sheet{background:#fff; border-radius:20px; padding:24px 20px}
.em-nome{font-weight:600; font-size:26px}
.em-sub{font-weight:500; font-size:16px; color:var(--ink-3); margin-top:4px}
.em-rule{height:2px; background:var(--ink); margin:16px 0 0}
.em-sec{padding:14px 0; border-bottom:1px solid var(--hairline)}
.em-sec:last-child{border-bottom:none}
.em-sec .lbl{font-size:11.5px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-5); margin-bottom:6px}
.em-sec .lbl.warn{color:var(--attention)}
.em-sec .big{font-weight:600; font-size:20px}
.em-sec .txt{font-size:16px; line-height:1.5; color:var(--ink-2)}
.em-av{display:flex; align-items:center; padding:7px 0}
.em-av .n{font-weight:600; font-size:16px}
.em-av .t{font-size:14px; color:var(--ink-4); margin-top:1px}
.em-call{height:44px; padding:0 18px; border-radius:99px; background:var(--sunken); font-weight:600; color:var(--ink); display:flex; align-items:center; text-decoration:none}
.em-call.solid{background:var(--ink); color:#fff}
.em-acts{margin-left:auto; display:flex; gap:8px; flex:none}
.em-wa{height:44px; padding:0 16px; border-radius:99px; background:var(--action-soft); color:var(--action); font-weight:600; display:flex; align-items:center; text-decoration:none}
.em-av .t a{color:inherit; text-decoration:underline; text-underline-offset:2px}
.em-foot{font-size:13.5px; color:var(--ink-4); line-height:1.5}
.em-actions{display:flex; gap:10px; margin-top:16px}
.em-actions button{flex:1; height:52px; border-radius:99px; background:rgba(255,255,255,.12); color:#fff; font-weight:600; font-size:15.5px}
.em-dark{display:flex; align-items:center; gap:12px; width:100%; text-align:left; background:var(--ink); color:#fff; border-radius:18px; padding:17px 18px; font-weight:600; font-size:15.5px; margin-bottom:14px}
.em-dark .s{display:block; font-weight:400; font-size:13px; color:rgba(255,255,255,.6); margin-top:2px}
.em-dark .chev{margin-left:auto; color:rgba(255,255,255,.6)}
/* refinamento UX: resumo do dia + atenção */
.resumo{margin:2px 2px 0}
.res-row{display:flex; align-items:baseline; padding:10px 2px; border-bottom:1px solid var(--hairline)}
.res-row:last-child{border-bottom:none}
.res-k{color:var(--ink-3); font-size:14.5px}
.res-v{margin-left:auto; font-weight:600; font-size:15px; font-variant-numeric:tabular-nums}
.res-v small{font-weight:400; color:var(--ink-4); font-size:13px}
.att-item{display:flex; gap:10px; align-items:baseline; padding:10px 2px; border-bottom:1px solid var(--hairline)}
.att-item:last-child{border-bottom:none}
.att-item .dot{width:7px; height:7px; border-radius:50%; background:var(--attention); flex:none; transform:translateY(-1px)}
.att-item .tx{flex:1; font-size:14.5px; color:var(--ink-2); line-height:1.45}
.att-item .act{color:var(--attention); font-weight:600; font-size:14px; flex:none}
.later-row .actlbl{color:var(--ink-4); font-weight:600; font-size:13.5px; flex:none}
.later-row.done .lt{color:var(--ink-4)}
.later-row .tick{color:var(--action); flex:none; display:inline-flex}
.later-row .tick svg{width:19px; height:19px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round}
.later-row .latelbl{color:var(--attention-ink); font-weight:600; font-size:13px; flex:none}
.agua-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:8px}
.agua-grid button{height:56px; border-radius:14px; background:var(--surface); border:1px solid var(--border); font-weight:600; font-size:19px; color:var(--water)}
.agua-grid button small{font-size:12px; font-weight:500; color:var(--ink-5); margin-left:3px}
.plantao-band{display:flex; gap:12px; align-items:center; width:100%; text-align:left; background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:15px 16px; margin:10px 0 2px; box-shadow:0 1px 2px rgba(35,32,29,.05)}
.plantao-band .tx{font-family:'Newsreader',serif; font-size:17px; color:var(--ink-2); flex:1; line-height:1.35}
.plantao-band .chev{color:var(--ink-6); flex:none}
.comece{display:flex; align-items:center; gap:8px; color:var(--action); font-size:11.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; margin:14px 2px 0}
.comece .pdot{width:7px; height:7px; border-radius:50%; background:var(--action); animation:pulseDot 1.6s ease-in-out infinite}
.plantao-band.destaque{border:1.5px solid var(--action); animation:pulseBand 2.4s ease-in-out infinite}
.plantao-band.destaque .chev{color:var(--action)}
@keyframes pulseBand{0%,100%{box-shadow:0 0 0 0 rgba(51,112,95,.28)}55%{box-shadow:0 0 0 9px rgba(51,112,95,0)}}
@keyframes pulseDot{0%,100%{opacity:1}50%{opacity:.35}}
@media (prefers-reduced-motion: reduce){.plantao-band.destaque,.comece .pdot{animation:none}}
/* detalhe de métrica */
.met-stats{display:flex; gap:22px; margin:12px 0 4px}
.met-stats > div{flex:1}
.met-k{font-size:11.5px; color:var(--ink-4)}
.met-v{font-weight:600; font-size:19px; margin-top:2px; font-variant-numeric:tabular-nums}
.met-v small{font-size:12px; color:var(--ink-5); font-weight:500}
.met-row{display:flex; align-items:baseline; gap:12px; width:100%; text-align:left; padding:11px 2px; border-bottom:1px solid var(--hairline)}
.met-row:last-child{border-bottom:none}
.met-row .md1{width:88px; flex:none; font-size:13px; color:var(--ink-4); font-variant-numeric:tabular-nums}
.met-row .md2{font-weight:600; font-size:15.5px; font-variant-numeric:tabular-nums}
.met-row .md3{margin-left:auto; font-size:12.5px; color:var(--ink-5)}
.hh-card[onclick], .mtile[onclick]{cursor:pointer}
@media print{
  body.emergprint *{visibility:hidden}
  body.emergprint #emergScreen, body.emergprint #emergScreen *{visibility:visible}
  body.emergprint #emergScreen{position:absolute; inset:0; background:#fff}
  body.emergprint .no-print{display:none !important}
}
