:root {
  --bg: #fff7f2; --card: #ffffff; --ink: #3b2a25; --muted: #8a736b; --line: #f0e0d8;
  --accent: #e8724f; --accent-ink: #ffffff; --feed: #f6a96b; --sleep: #7f8fe0; --diaper: #6bbf9a; --danger: #d64545; --ok: #3a9d6e;
  --shadow: 0 2px 10px rgba(120, 70, 50, .08);
}
:root[data-theme="dark"] {
  --bg: #14110f; --card: #1f1a17; --ink: #e9ddd7; --muted: #9b8a82; --line: #332a25;
  --accent: #c8644a; --accent-ink: #1a0f0b; --feed: #b87a45; --sleep: #5a68ad; --diaper: #46866c; --danger: #cf6a6a; --ok: #5fb38a; --shadow: none;
}
:root[data-theme="dark"] .btn.big { filter: saturate(.8) brightness(.9); }
/* Ban đêm: nền gần đen, màu ấm dịu, không có mảng trắng chói; nút ghi to hơn để bấm một tay trong bóng tối */
:root[data-theme="night"] {
  --bg: #090403; --card: #140a08; --ink: #d4b3a3; --muted: #8b6c60; --line: #281813;
  --accent: #a8472f; --accent-ink: #fbe9e0; --feed: #86562d; --sleep: #3d4888; --diaper: #2d6049; --danger: #c05a5a; --ok: #3f8a66; --shadow: none;
}
:root[data-theme="night"] .btn.big { min-height: 132px; font-size: 1.25rem; color: #fbe9e0; filter: brightness(.8); }
:root[data-theme="night"] .btn.big .ico { font-size: 2.4rem; } :root[data-theme="night"] .btn.big.bottle { background: #7a5a2c; }
:root[data-theme="night"] .btn { min-height: 56px; } :root[data-theme="night"] .chip { min-height: 52px; }
:root[data-theme="night"] .banner { background: #2c2310; color: #d9c07a; }
:root[data-theme="night"] .alert.urgent { background: #331616; color: #e9b0b0; } :root[data-theme="night"] .alert.see_doctor { background: #33240f; color: #e6c28f; } :root[data-theme="night"] .alert.watch { background: #2c280c; color: #dccf80; }
:root[data-theme="night"] .sheet-bg { background: rgba(0, 0, 0, .7); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: env(safe-area-inset-bottom); }
.boot { padding: 4rem 1rem; text-align: center; color: var(--muted); }
.wrap { max-width: 520px; margin: 0 auto; padding: 12px 16px 96px; }
h1, h2, h3 { margin: 0 0 .5rem; } h1 { font-size: 1.4rem; } h2 { font-size: 1.1rem; } h3 { font-size: 1rem; color: var(--muted); font-weight: 600; }
.card { background: var(--card); border-radius: 16px; padding: 14px; margin: 12px 0; box-shadow: var(--shadow); }
.row { display: flex; gap: 10px; align-items: center; } .row.wrap-r { flex-wrap: wrap; } .grow { flex: 1; } .muted { color: var(--muted); font-size: .9rem; } .center { text-align: center; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; }
.top .name { font-size: 1.25rem; font-weight: 700; } .top .age { color: var(--muted); font-size: .9rem; }
.iconbtn { background: none; border: 0; font-size: 1.4rem; padding: 8px; color: var(--ink); cursor: pointer; min-width: 44px; min-height: 44px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
button { font: inherit; }
.btn { border: 0; border-radius: 14px; padding: 12px 16px; background: var(--line); color: var(--ink); cursor: pointer; min-height: 48px; font-weight: 600; }
.btn.primary { background: var(--accent); color: var(--accent-ink); } .btn.danger { background: transparent; color: var(--danger); } .btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.big { min-height: 104px; font-size: 1.1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #3b2a25; }
.btn.big .ico { font-size: 2rem; } .btn.big.feed { background: var(--feed); } .btn.big.sleep { background: var(--sleep); color: #fff; } .btn.big.diaper { background: var(--diaper); } .btn.big.bottle { background: #f2c27a; }
.btn:disabled { opacity: .5; } .btn.sm { min-height: 40px; padding: 8px 12px; border-radius: 10px; }
.timer { border: 2px solid var(--accent); } .timer .clock { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; } .stats b { display: block; font-size: 1.2rem; } .stats span { font-size: .75rem; color: var(--muted); }
.tl { list-style: none; padding: 0; margin: 0; } .tl li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; cursor: pointer; }
.tl .t { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 48px; } .tl .ico { font-size: 1.3rem; } .tl .who { font-size: .8rem; color: var(--muted); }
.field { display: block; margin: 10px 0; } .field span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; min-height: 48px; }
.tabs { display: flex; gap: 6px; margin: 8px 0 12px; } .tabs button { flex: 1; } .tabs .on { background: var(--accent); color: var(--accent-ink); }
.nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.nav button { flex: 1; background: none; border: 0; padding: 10px 0 8px; color: var(--muted); font-size: .75rem; cursor: pointer; } .nav button .ico { display: block; font-size: 1.4rem; } .nav .on { color: var(--accent); font-weight: 700; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); width: 100%; max-width: 520px; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 85vh; overflow: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; } .chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 10px 16px; min-height: 44px; cursor: pointer; } .chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; z-index: 30; display: flex; gap: 14px; align-items: center; max-width: 92vw; }
.toast button { background: none; border: 0; color: var(--feed); font-weight: 700; cursor: pointer; min-height: 32px; }
.banner { background: #fff0c9; color: #5a4300; padding: 8px 12px; border-radius: 10px; font-size: .9rem; margin: 8px 0; } :root[data-theme="dark"] .banner { background: #3b3216; color: #f0d98a; }
.err { color: var(--danger); font-size: .9rem; min-height: 1.2em; }
.badge { font-size: .75rem; background: var(--line); border-radius: 8px; padding: 2px 8px; }
.alert { border-radius: 14px; padding: 12px 14px; margin: 10px 0; border: 2px solid; } .alert b { display: block; margin-bottom: 2px; }
.alert.urgent { background: #fde8e8; border-color: var(--danger); color: #7a1f1f; } .alert.see_doctor { background: #fff0dc; border-color: #e59a3c; color: #6a3f06; } .alert.watch { background: #fff8d9; border-color: #d9bb3c; color: #5a4a00; }
:root[data-theme="dark"] .alert.urgent { background: #3a1c1c; color: #f1b9b9; } :root[data-theme="dark"] .alert.see_doctor { background: #3a2a14; color: #f0cc9a; } :root[data-theme="dark"] .alert.watch { background: #34300f; color: #ead98a; }
.alert .acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; } .alert a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.small-print { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.item { display: flex; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); } .item:last-child { border: 0; } .item .grow b { display: block; }
.item.late { background: rgba(214, 69, 69, .08); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.pill { font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); white-space: nowrap; } .pill.ok { background: rgba(58, 157, 110, .18); color: var(--ok); } .pill.bad { background: rgba(214, 69, 69, .15); color: var(--danger); } .pill.soon { background: rgba(232, 114, 79, .18); color: var(--accent); }
.menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .menu button { background: var(--card); border: 0; border-radius: 16px; padding: 18px 8px; box-shadow: var(--shadow); color: var(--ink); cursor: pointer; font-weight: 600; display: flex; flex-direction: column; gap: 6px; align-items: center; } .menu .ico { font-size: 1.8rem; }
.back { background: none; border: 0; color: var(--accent); font-weight: 700; padding: 8px 0; cursor: pointer; min-height: 44px; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--line); cursor: pointer; }
.chart { width: 100%; height: auto; display: block; } .chart text { fill: var(--muted); font-size: 9px; } .chart .grid { stroke: var(--line); stroke-width: .5; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .75rem; color: var(--muted); margin-top: 4px; } .legend i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-right: 4px; }
.big-btn-row { display: flex; gap: 8px; } .big-btn-row .btn { flex: 1; }
.dose { display: flex; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); } .dose .time { font-weight: 700; min-width: 52px; font-variant-numeric: tabular-nums; }
.btn.give { background: var(--ok); color: #fff; min-height: 52px; padding: 10px 14px; }
details summary { cursor: pointer; padding: 8px 0; font-weight: 600; }
.link { background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 6px 0; font: inherit; }
@media print { .nav, .back, .top, .noprint, .toast { display: none !important; } body { background: #fff; color: #000; } .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; } .wrap { padding-bottom: 0; max-width: none; } }
.stats { grid-template-columns: repeat(4, 1fr); }

.tl li { touch-action: pan-y; background: var(--card); }
.btn.big.suggest { outline: 3px solid var(--accent); outline-offset: -3px; }
.setup .bar { height: 6px; border-radius: 3px; background: var(--line); margin: 8px 0; overflow: hidden; } .setup .bar i { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.chip.habit { border-color: var(--accent); }
.note-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; } .note-chips .chip { min-height: 36px; padding: 6px 12px; font-size: .85rem; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; } .thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; cursor: pointer; background: var(--line); }

/* Nhắc việc */
.agenda .bar { height: 6px; border-radius: 3px; background: var(--line); margin: 8px 0; overflow: hidden; } .agenda .bar i { display: block; height: 100%; background: var(--ok); border-radius: 3px; transition: width .3s; }
.ag { display: flex; gap: 10px; align-items: center; padding: 10px 8px 10px 10px; margin: 6px 0; border-radius: 12px; background: var(--bg); border-left: 4px solid var(--line); cursor: pointer; }
.ag.late { border-left-color: var(--danger); background: rgba(214, 69, 69, .08); } .ag.soon { border-left-color: var(--accent); } .ag.ok { border-left-color: var(--ok); opacity: .75; } .ag.skip { opacity: .55; } .ag.info { border-left-color: var(--sleep); }
.ag-t { min-width: 46px; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .85rem; } .ag-i { font-size: 1.4rem; } .ag .grow b { display: block; }
.ag-late { color: var(--danger); font-size: .8rem; font-weight: 700; }
.ag-ok { min-width: 48px; min-height: 48px; border-radius: 50%; border: 0; background: var(--ok); color: #fff; font-size: 1.4rem; font-weight: 700; cursor: pointer; }
.ag-h { font-size: .8rem; font-weight: 700; color: var(--muted); margin: 10px 0 2px; text-transform: uppercase; letter-spacing: .03em; } .ag-h.late { color: var(--danger); }
.banner.ok { background: rgba(58, 157, 110, .18); color: var(--ok); }
.alarm { position: sticky; top: 0; z-index: 40; background: #d64545; color: #fff; padding: calc(10px + env(safe-area-inset-top)) 16px 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, .3); animation: pulse 1.6s ease-in-out infinite; max-width: 520px; margin: 0 auto; border-radius: 0 0 16px 16px; }
.alarm-h { font-weight: 800; margin-bottom: 6px; } .alarm-r { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .3); } .alarm .btn { min-height: 44px; } .alarm .btn:not(.give) { background: rgba(255, 255, 255, .25); color: #fff; }
@keyframes pulse { 50% { filter: brightness(1.12); } }
.btn.big-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; margin: 8px 0; text-align: left; padding: 14px 16px; min-height: 64px; }
/* Lịch */
.seg { display: flex; background: var(--line); border-radius: 12px; padding: 3px; margin: 4px 0 10px; } .seg button { flex: 1; border: 0; background: none; padding: 9px 0; border-radius: 10px; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 40px; } .seg .on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.cal-nav { margin: 4px 0 8px; } .cal-nav .iconbtn { font-size: 1.8rem; }
.tl .tl-h { display: flex; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); } .tl .tl-hl { min-width: 44px; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 10px; } .tl .tl-h.now .tl-hl { color: var(--danger); font-weight: 800; } .tl .tl-hb { flex: 1; min-width: 0; }
.tl .tl-gap { text-align: center; font-size: .72rem; color: var(--muted); padding: 6px 0; border-top: 1px dashed var(--line); opacity: .8; }
.tl-log { font-size: .8rem; color: var(--muted); padding: 4px 6px; } .tl-log span:first-child { font-variant-numeric: tabular-nums; }
.nowline { display: flex; align-items: center; gap: 8px; color: var(--danger); font-size: .75rem; font-weight: 800; margin: 4px 0; } .nowline::before, .nowline::after { content: ''; height: 2px; background: var(--danger); flex: 1; border-radius: 2px; } .nowline span { order: 0; } .nowline::before { flex: 0 0 14px; }
.wk.today { outline: 2px solid var(--accent); } .wk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wk-c { border: 0; border-radius: 999px; padding: 6px 10px; font-size: .78rem; background: var(--line); color: var(--ink); cursor: pointer; border-left: 3px solid var(--accent); } .wk-c.ok { border-left-color: var(--ok); opacity: .7; text-decoration: line-through; } .wk-c.late { border-left-color: var(--danger); background: rgba(214, 69, 69, .12); } .wk-c.skip { opacity: .5; } .wk-c.info { border-left-color: var(--sleep); }
.mg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; } .mg + .legend { margin-top: 12px; } .mg-h div { text-align: center; font-size: .72rem; color: var(--muted); font-weight: 700; padding: 4px 0; }
.mc { min-height: 62px; overflow: hidden; border: 0; border-radius: 10px; background: var(--bg); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 5px 2px 2px; cursor: pointer; position: relative; } .mc.out { opacity: .38; } .mc.today { outline: 2px solid var(--accent); } .mc.sel { background: var(--line); }
.mc-n { font-size: .85rem; font-weight: 700; } .mc-d { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin-top: 3px; max-width: 30px; } .mc-m { font-size: .6rem; color: var(--muted); }
.mc-d i, .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; } i.ok, .dot.ok { background: var(--ok); } i.late, .dot.late { background: var(--danger); } i.skip { background: var(--muted); } i.info { background: var(--sleep); } .legend .dot { margin-right: 4px; }
:root[data-theme="night"] .alarm { background: #8a2b2b; } :root[data-theme="night"] .ag { background: #0e0605; }

.legend i.dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }

/* ===== Giao diện v2: hiện đại, mềm, ưu tiên việc quan trọng ===== */
@font-face { font-family: "Be Vietnam Pro"; src: url("/fonts/BeVietnamPro-Regular.ttf") format("truetype"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("/fonts/BeVietnamPro-Bold.ttf") format("truetype"); font-weight: 600 800; font-display: swap; }
:root {
  --bg: #f7f3ef; --card: #ffffff; --ink: #2b211c; --muted: #85766e; --line: #eee6e0; --accent: #e4694a; --accent-2: #f39a73; --accent-ink: #fff;
  --feed: #ffb36b; --sleep: #7c8cf0; --diaper: #4fc3a1; --bottle: #f4c06a; --danger: #d8473f; --ok: #2fa36b;
  --feed-t: #fff1e2; --sleep-t: #eceffe; --diaper-t: #e3f7f0; --bottle-t: #fff5dc; --danger-t: #fdecea; --ok-t: #e4f6ec; --accent-t: #fdebe5;
  --shadow: 0 1px 2px rgba(60, 40, 30, .05), 0 10px 28px rgba(60, 40, 30, .07); --r: 22px;
}
:root[data-theme="dark"] { --bg: #151110; --card: #201a18; --ink: #efe4de; --muted: #a39088; --line: #332a26; --accent: #e07a5c; --accent-2: #c8644a; --accent-ink: #1a0f0b;
  --feed-t: rgba(255, 179, 107, .13); --sleep-t: rgba(124, 140, 240, .15); --diaper-t: rgba(79, 195, 161, .13); --bottle-t: rgba(244, 192, 106, .13); --danger-t: rgba(216, 71, 63, .16); --ok-t: rgba(47, 163, 107, .15); --accent-t: rgba(224, 122, 92, .15); }
:root[data-theme="night"] { --bg: #0a0504; --card: #150b09; --ink: #d9baab; --muted: #8f7064; --line: #2a1a15; --accent: #b4503a; --accent-2: #8f3d2b; --accent-ink: #fbe9e0;
  --feed-t: rgba(200, 130, 60, .12); --sleep-t: rgba(90, 100, 190, .16); --diaper-t: rgba(60, 150, 120, .12); --bottle-t: rgba(200, 150, 70, .12); --danger-t: rgba(190, 70, 60, .18); --ok-t: rgba(60, 150, 100, .14); --accent-t: rgba(180, 80, 58, .16); }
body { font-family: "Be Vietnam Pro", -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: -.005em; }
h1, h2, h3 { letter-spacing: -.015em; }
.wrap { padding-bottom: 120px; }
.card { border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.btn { border-radius: 16px; background: var(--line); transition: transform .12s, filter .12s; } .btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 6px 16px rgba(228, 105, 74, .28); }
:root[data-theme="night"] .btn.primary, :root[data-theme="dark"] .btn.primary { box-shadow: none; }
.chip { border-radius: 14px; } .chip.on { background: var(--accent-t); color: var(--accent); border-color: var(--accent); font-weight: 700; }
input, select, textarea { border-radius: 14px; background: var(--bg); } .sheet { border-radius: 28px 28px 0 0; } .sheet-bg { backdrop-filter: blur(3px); }
/* thanh điều hướng nổi, kính mờ */
.nav { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); max-width: 496px; margin: 0 auto; border: 0; border-radius: 26px; padding: 6px; background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 8px 32px rgba(40, 25, 15, .18); gap: 2px; }
.nav button { border-radius: 20px; padding: 8px 0 6px; font-size: .68rem; transition: background .2s, color .2s; } .nav button .ico { font-size: 1.35rem; filter: grayscale(.35); opacity: .8; }
.nav .on { background: var(--accent-t); color: var(--accent); } .nav .on .ico { filter: none; opacity: 1; }
.seg { border-radius: 16px; background: var(--line); } .seg .on { border-radius: 13px; color: var(--accent); }
/* đầu trang */
.top { padding: 10px 0 4px; } .hd { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar { width: 48px; height: 48px; border-radius: 18px; background: linear-gradient(135deg, var(--feed-t), var(--accent-t)); display: grid; place-items: center; font-size: 1.7rem; box-shadow: var(--shadow); flex: none; }
.hd .name { font-size: 1.3rem; font-weight: 800; line-height: 1.15; } .hd .age { color: var(--muted); font-size: .85rem; }
.iconbtn.soft { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); width: 46px; height: 46px; padding: 0; display: grid; place-items: center; }
/* dải trạng thái */
.chips-row { display: flex; gap: 8px; overflow-x: auto; margin: 10px -16px 4px; padding: 2px 16px 8px; scrollbar-width: none; } .chips-row::-webkit-scrollbar { display: none; }
.st { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: .8rem; font-weight: 600; white-space: nowrap; } .st i { font-style: normal; } .st small { color: var(--muted); font-weight: 400; }
/* thẻ "Tiếp theo" */
.hero { border-radius: 26px; padding: 18px; margin: 8px 0 12px; color: #fff; background: linear-gradient(135deg, #e4694a 0%, #f39a73 100%); box-shadow: 0 14px 34px rgba(228, 105, 74, .32); position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.hero.next { background: var(--card); color: var(--ink); box-shadow: var(--shadow); } .hero.next::after { background: var(--accent-t); } .hero.done { background: linear-gradient(135deg, var(--ok), #5cc795); }
:root[data-theme="night"] .hero { background: linear-gradient(135deg, #7a3326, #8f4a36); box-shadow: none; } :root[data-theme="night"] .hero.next { background: var(--card); }
.hero-k { font-size: .72rem; font-weight: 800; letter-spacing: .08em; opacity: .85; position: relative; z-index: 1; } .hero.next .hero-k { color: var(--accent); }
.hero-r { display: flex; align-items: center; gap: 14px; margin: 8px 0 12px; position: relative; z-index: 1; }
.hero-i { width: 54px; height: 54px; border-radius: 18px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-size: 1.9rem; flex: none; } .hero.next .hero-i { background: var(--accent-t); }
.hero-t { font-size: 1.25rem; font-weight: 800; line-height: 1.2; } .hero-s { font-size: .88rem; opacity: .9; margin-top: 2px; }
.hero-a { display: flex; gap: 8px; position: relative; z-index: 1; } .hero-a .btn { flex: 1; min-height: 50px; font-weight: 700; }
.hero-a .go { background: #fff; color: #c4452a; box-shadow: 0 6px 14px rgba(0, 0, 0, .12); } .hero.next .go { background: var(--ok); color: #fff; } .hero-a .ghost2 { background: rgba(255, 255, 255, .22); color: #fff; flex: 0 0 38%; } .hero.next .ghost2 { background: var(--line); color: var(--ink); }
.hero-m { margin-top: 10px; font-size: .8rem; opacity: .9; position: relative; z-index: 1; } .hero-m button { background: none; border: 0; color: inherit; text-decoration: underline; padding: 0; cursor: pointer; font: inherit; }
/* nút ghi nhanh dạng ô màu nhạt */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 10px; }
.tile { border: 0; border-radius: 24px; padding: 14px; text-align: left; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 10px; min-height: 124px; position: relative; font: inherit; box-shadow: var(--shadow); background: var(--card); transition: transform .12s; } .tile:active { transform: scale(.97); }
.tile .tc { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; }
.tile b { font-size: 1.05rem; display: block; } .tile small { color: var(--muted); font-size: .76rem; display: block; margin-top: 1px; }
.tile.feed { background: var(--feed-t); } .tile.feed .tc { background: var(--feed); } .tile.bottle { background: var(--bottle-t); } .tile.bottle .tc { background: var(--bottle); } .tile.sleep { background: var(--sleep-t); } .tile.sleep .tc { background: var(--sleep); } .tile.diaper { background: var(--diaper-t); } .tile.diaper .tc { background: var(--diaper); }
.tile.sleep.on { background: var(--sleep); color: #fff; } .tile.sleep.on small { color: rgba(255, 255, 255, .85); } .tile.sleep.on .tc { background: rgba(255, 255, 255, .25); }
.tile .sides { display: flex; gap: 6px; margin-top: auto; } .tile .sides button { flex: 1; border: 0; border-radius: 12px; padding: 9px 0; background: rgba(255, 255, 255, .75); color: var(--ink); font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; min-height: 40px; } .tile .sides .sg { outline: 2px solid var(--accent); }
:root[data-theme="night"] .tile .sides button, :root[data-theme="dark"] .tile .sides button { background: rgba(255, 255, 255, .1); color: var(--ink); } :root[data-theme="night"] .tile { min-height: 140px; }
.mini { display: flex; gap: 8px; margin-bottom: 10px; } .mini button { flex: 1; border: 0; border-radius: 16px; padding: 12px 4px; background: var(--card); box-shadow: var(--shadow); font: inherit; font-weight: 600; font-size: .85rem; color: var(--ink); cursor: pointer; min-height: 48px; }
.timerbox { display: flex; align-items: center; gap: 12px; border-radius: 24px; padding: 14px 16px; margin: 6px 0 10px; background: var(--card); box-shadow: var(--shadow); border: 2px solid var(--accent); } .timerbox .clock { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; } .timerbox.sl { border-color: var(--sleep); }
/* danh sách việc gọn */
.cg { margin-top: 6px; } .cg-h { font-size: .72rem; font-weight: 800; letter-spacing: .07em; color: var(--muted); text-transform: uppercase; margin: 10px 2px 4px; } .cg-h.late { color: var(--danger); }
.cr { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px solid var(--line); cursor: pointer; } .cr:first-of-type { border-top: 0; }
.cr .ct { min-width: 44px; font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); } .cr.late .ct { color: var(--danger); } .cr .ci { width: 34px; height: 34px; border-radius: 12px; background: var(--accent-t); display: grid; place-items: center; font-size: 1.1rem; flex: none; } .cr.late .ci { background: var(--danger-t); }
.cr .cm { flex: 1; min-width: 0; } .cr .cm b { display: block; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cr .cm span { font-size: .74rem; color: var(--muted); } .cr.late .cm span { color: var(--danger); font-weight: 600; }
.cr .ck { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); background: none; color: var(--ok); font-size: 1.1rem; font-weight: 800; cursor: pointer; flex: none; transition: all .15s; } .cr .ck:active, .cr .ck:hover { background: var(--ok); border-color: var(--ok); color: #fff; }
.cr.done { opacity: .6; } .cr.done .cm b { text-decoration: line-through; }
details > summary { list-style: none; } details > summary::-webkit-details-marker { display: none; } .more-sum { color: var(--accent); font-weight: 700; font-size: .85rem; padding: 8px 2px; cursor: pointer; }
/* một ngày của bé */
.daybar { width: 100%; height: auto; display: block; margin-top: 6px; } .daybar text { fill: var(--muted); font-size: 9px; }
.stats { grid-template-columns: repeat(4, 1fr); margin-top: 12px; } .stats > div { background: var(--bg); border-radius: 16px; padding: 10px 2px; } .stats b { font-size: 1.15rem; }
.tl li { border-bottom: 0; padding: 8px 0; } .tl .ico { width: 36px; height: 36px; border-radius: 12px; background: var(--accent-t); display: grid; place-items: center; font-size: 1.1rem; }
.alert { border-radius: 20px; } .banner { border-radius: 16px; }
/* lịch */
.wstrip { display: flex; gap: 6px; margin: 2px 0 10px; } .wd { flex: 1; border: 0; border-radius: 18px; padding: 8px 0 8px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; } .wd small { font-size: .65rem; color: var(--muted); font-weight: 700; } .wd b { font-size: 1.05rem; }
.wd.sel { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 8px 18px rgba(228, 105, 74, .3); } .wd.sel small { color: rgba(255, 255, 255, .85); } .wd.tdy:not(.sel) b { color: var(--accent); }
.wd .dd { display: flex; gap: 2px; height: 7px; margin-top: 2px; } .wd .dd i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); } .wd .dd i.late { background: var(--danger); } .wd .dd i.ok { background: var(--ok); } .wd.sel .dd i { background: #fff; opacity: .9; }
.ag { border-radius: 16px; } .tl-h { border-top-color: var(--line); }

.hero-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini button { white-space: nowrap; font-size: .8rem; padding: 12px 2px; }
.tl .tl-h { padding: 4px 0; } .tl .tl-hb .cr { border-top: 0; background: var(--bg); border-radius: 16px; margin: 4px 0; padding: 8px 10px; } .tl .tl-hb .cr.late { background: var(--danger-t); }
.card.tl { padding: 8px 14px; }

/* ===== Máy tính bảng (iPad Pro): thanh bên, 3 cột, chế độ đầu giường ===== */
.dimmer { position: fixed; inset: 0; background: #000; pointer-events: none; z-index: 60; opacity: 0; transition: opacity .5s; }
.minibars { width: 100%; height: auto; display: block; margin: 2px 0 8px; } .minibars text { fill: var(--muted); font-size: 9px; }
.vitals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .vt { background: var(--bg); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; cursor: pointer; } .vt small { color: var(--muted); font-size: .75rem; font-weight: 600; } .vt b { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.dash-hd { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.clockbox { text-align: center; } .bigclock { font-size: 3rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; } .bigdate { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.hd-btns { display: flex; gap: 8px; } .iconbtn.soft.on { background: var(--accent-t); outline: 2px solid var(--accent); }
.dash { display: grid; gap: 16px; align-items: start; }
@media (min-width: 820px) {
  html { font-size: 17px; } body { font-size: 1rem; }
  .wrap { max-width: none; padding: 16px 24px 24px 124px; }
  .wrap.tab-more > div:last-child, .wrap.tab-schedule > div:last-child, .wrap.tab-health > div:last-child, .wrap.tab-meds > div:last-child { max-width: 940px; margin-left: auto; margin-right: auto; }
  .nav { top: 16px; bottom: 16px; left: 16px; right: auto; width: 88px; max-width: none; margin: 0; flex-direction: column; justify-content: center; gap: 8px; padding: 8px 6px; border-radius: 30px; }
  .nav button { padding: 16px 0 12px; font-size: .72rem; } .nav button .ico { font-size: 1.7rem; }
  .toast { bottom: 28px; } .sheet { max-width: 640px; border-radius: 28px; margin-bottom: 4vh; } .sheet-bg { align-items: center; }
  .tile { min-height: 150px; padding: 18px; } .tile .tc { width: 54px; height: 54px; font-size: 1.9rem; } .tile b { font-size: 1.2rem; } .tile small { font-size: .85rem; }
  .cr .ck { width: 46px; height: 46px; } .cr { padding: 11px 6px; } .hero-t { font-size: 1.45rem; } .hero-a .btn { min-height: 58px; font-size: 1.05rem; } .btn { min-height: 52px; } .ag-ok { min-width: 56px; min-height: 56px; }
}
@media (min-width: 820px) and (orientation: landscape) {
  .wrap.tab-today { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; padding-bottom: 16px; }
  .today-dash { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .dash { flex: 1; min-height: 0; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr) minmax(0, .95fr); align-items: stretch; }
  .dcol { overflow-y: auto; min-height: 0; padding: 2px 6px 18px 2px; scrollbar-width: none; overscroll-behavior: contain; } .dcol::-webkit-scrollbar { display: none; }
  .dcol .card, .dcol .hero { margin-top: 0; } .dcol.a .tiles { margin-top: 0; }
  .chips-row { flex-wrap: wrap; overflow: visible; margin: 0 0 6px; padding: 0; }
}
@media (min-width: 820px) and (orientation: portrait) {
  .dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .dcol { min-width: 0; } .dcol.c { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; align-items: start; } .dcol.c .card:last-child { grid-column: 1 / -1; }
  .chips-row { flex-wrap: wrap; overflow: visible; margin: 0 0 6px; padding: 0; }
}
/* Chế độ đầu giường: ẩn thanh bên, chữ lớn hơn, nút to */
html.bedside .nav { display: none; } html.bedside .wrap { padding-left: 24px; }
@media (min-width: 820px) and (orientation: landscape) { html.bedside { font-size: 19px; } html.bedside .bigclock { font-size: 4rem; } }
html.bedside .tile { min-height: 168px; }

/* ===== Chăm sóc mẹ ===== */
:root { --mom: #b06ab3; --mom-t: #f6eaf7; --mom-2: #d98fc6; }
:root[data-theme="dark"] { --mom-t: rgba(176, 106, 179, .16); } :root[data-theme="night"] { --mom-t: rgba(150, 90, 150, .16); }
.momhero { border-radius: 26px; padding: 18px; margin: 4px 0 12px; color: #fff; background: linear-gradient(135deg, #a05cb0 0%, #e08ab7 100%); box-shadow: 0 14px 34px rgba(160, 92, 176, .3); }
.momhero .hero-k { opacity: .9; } .momhero .hero-t { margin: 4px 0; -webkit-line-clamp: unset; display: block; } .momhero .hero-s { opacity: .92; margin-top: 4px; } .momhero .ghost2 { background: rgba(255, 255, 255, .25); color: #fff; }
.bar.white { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .3); margin: 12px 0 6px; overflow: hidden; } .bar.white i { display: block; height: 100%; background: #fff; border-radius: 4px; }
:root[data-theme="night"] .momhero { background: linear-gradient(135deg, #5a3363, #7a4468); box-shadow: none; }
.mombanner { background: var(--mom-t); color: var(--mom); }
.momcard { background: var(--mom-t); } .momcard .cr { background: var(--card); border-radius: 14px; margin: 5px 0; padding: 7px 8px; border-top: 0; } .momcard.sleepnow { outline: 2px solid var(--sleep); background: var(--sleep-t); }
.momtag { font-style: normal; margin-right: 4px; } .cr .cm b { overflow: hidden; text-overflow: ellipsis; }
.hero.mom { background: linear-gradient(135deg, #a05cb0 0%, #e08ab7 100%); box-shadow: 0 14px 34px rgba(160, 92, 176, .3); } .hero.mom.next { background: var(--card); box-shadow: var(--shadow); } .hero.mom.next::after { background: var(--mom-t); } .hero.mom.next .hero-k { color: var(--mom); }
.card.checkin { border: 2px solid var(--mom-t); } .item.tpl.added { opacity: .55; } .item.late { background: var(--danger-t); border-radius: 14px; padding-left: 8px; }
.wrap.tab-mom > div:last-child { max-width: 760px; margin-left: auto; margin-right: auto; }
@media (max-width: 819px) { .nav button { font-size: .62rem; } }
