:root {
  --teal: #0E7C7B; --teal-d: #0B6463; --teal-l: #E6F4F3; --teal-line: #A9D8D4;
  --bg: #F4F7FA; --card: #fff; --ink: #142030; --muted: #5B6B7D; --line: #E4E9EF; --line2: #D5DCE4; --soft: #EEF2F6;
  --red: #B42318; --red-l: #FDECEC; --red-line: #F3C5C0; --amber: #8A5300; --amber-l: #FFF4E0;
  --green: #146C43; --green-l: #E3F5EC; --blue: #2D5BB8; --blue-l: #EEF4FD; --violet: #5B3CC4; --violet-l: #F3EEFF;
  --slate: #44546A; --slate-l: #EEF2F6;
  --shadow: 0 8px 24px rgba(20, 32, 48, .10);
  --tab-h: 68px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
a { color: var(--teal-d); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.hide-desktop { display: flex; }
.hide-mobile { display: none !important; }
.sync-ind { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 4px; }
.sync-ind i { width: 8px; height: 8px; border-radius: 50%; background: #2BA36B; flex: none; }
.sync-ind.saving i { background: #E08A3C; } .sync-ind.offline { color: var(--red); } .sync-ind.offline i { background: #D92D20; } .sync-ind.local i { background: #9AA8B8; }
.main > .page > .page-scroll > .content > .sync-ind { justify-content: center; }

/* ---------- shell ---------- */
.app { display: flex; height: 100dvh; }
.sidebar { display: none; width: 252px; flex: none; background: #fff; border-right: 1px solid var(--line); padding: 20px 14px; flex-direction: column; gap: 2px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-weight: 700; font-size: 16px; }
.brand .logo { width: 36px; height: 36px; border-radius: 10px; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); font-weight: 500; }
.nav-link:hover { background: var(--soft); }
.nav-link.on { background: var(--teal-l); color: var(--teal-d); font-weight: 700; }
.nav-link .count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--soft); color: var(--slate); padding: 1px 8px; border-radius: 999px; }
.nav-link.on .count { background: #fff; }
.nav-link .count.alert { background: var(--red-l); color: var(--red); }
.side-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--bg); }
.user-card b { display: block; font-size: 13px; }
.user-card small { color: var(--muted); font-size: 12px; }

.main { flex: 1; min-width: 0; height: 100dvh; display: flex; flex-direction: column; position: relative; }
.page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.page-head { flex: none; background: #fff; border-bottom: 1px solid var(--line); padding: 14px 16px 12px; padding-top: max(14px, env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 12px; }
.head-row { display: flex; align-items: center; gap: 10px; }
.head-title { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.head-title h1 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.head-title .sub { font-size: 13px; color: var(--muted); white-space: nowrap; }
.head-actions { display: flex; gap: 8px; align-items: center; }
.page-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.content { padding: 16px 16px 96px; display: flex; flex-direction: column; gap: 14px; }
.cols { display: flex; flex-direction: column; gap: 14px; }
.cols > * { min-width: 0; }

.tabbar { flex: none; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: space-around; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
.tab .pill { width: 52px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; }
.tab.on { color: var(--teal-d); font-weight: 700; }
.tab.on .pill { background: var(--teal-l); }

.fab { position: absolute; right: 16px; bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); z-index: 5; height: 48px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--teal); color: #fff; font-weight: 600; align-items: center; gap: 8px; box-shadow: 0 6px 16px rgba(14, 124, 123, .4); }
.fab span { font-size: 14px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-d); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; } .btn-row > * { flex: 1; }
.icon-btn { width: 40px; height: 40px; flex: none; border-radius: 12px; border: 0; background: transparent; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--soft); }
.icon-btn.bordered { border: 1px solid var(--line2); background: #fff; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chip { flex: none; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; color: var(--slate); font-weight: 600; font-size: 13px; }
.chip.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.sheet .chips { flex-wrap: wrap; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--soft); }
.seg button { flex: 1; min-height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--slate); font-weight: 600; font-size: 13px; }
.seg button.on { background: #fff; color: var(--teal-d); box-shadow: 0 1px 3px rgba(20, 32, 48, .12); }

.fl { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--slate); }
.fi { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); }
textarea.fi { resize: vertical; }
.fi:focus { outline: 2px solid var(--teal); outline-offset: -1px; border-color: var(--teal); }
.hint { font-weight: 400; font-size: 12px; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); outline: 0; }
.upload { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 12px; border: 1.5px dashed var(--line2); color: var(--slate); font-weight: 600; cursor: pointer; }
.upload input { display: none; }
.err { color: var(--red); font-size: 13px; font-weight: 600; min-height: 0; }

/* ---------- cards & rows ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.card h2, .section-title { font-size: 15px; font-weight: 600; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.card-head span { font-size: 12px; color: var(--muted); }
.cards { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #EEF2F6; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 600; text-align: right; }
.kv.total span { color: var(--ink); font-weight: 700; font-size: 15px; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--ink); width: 100%; text-align: left; }
button.item:hover, a.item:hover { border-color: var(--teal-line); }
.item.alert { background: #FFF7F7; border-color: var(--red-line); }
.item .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.item .t1 { font-weight: 600; font-size: 15px; }
.item .t2 { font-size: 12.5px; color: var(--muted); }
.avatar { flex: none; border-radius: 50%; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--slate-l); color: var(--slate); }
.b-ok { background: var(--green-l); color: var(--green); } .b-warn { background: var(--amber-l); color: var(--amber); }
.b-bad { background: var(--red-l); color: var(--red); } .b-info { background: var(--blue-l); color: var(--blue); }
.b-violet { background: var(--violet-l); color: var(--violet); } .b-teal { background: var(--teal-l); color: var(--teal-d); }
.empty { padding: 28px 12px; text-align: center; color: var(--muted); }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.stat { padding: 10px 4px; border-radius: 12px; background: var(--bg); }
.stat b { display: block; font-size: 18px; font-weight: 700; } .stat small { font-size: 11px; color: var(--muted); }
.stat.warn { background: var(--amber-l); } .stat.warn b, .stat.warn small { color: var(--amber); }
.stat.bad { background: var(--red-l); } .stat.bad b, .stat.bad small { color: var(--red); }
.stat.ok { background: var(--green-l); } .stat.ok b, .stat.ok small { color: var(--green); }
.bar { height: 8px; border-radius: 4px; background: #FDE7C7; overflow: hidden; } .bar > span { display: block; height: 100%; background: var(--teal); border-radius: 4px; }

/* ---------- home ---------- */
.hero { flex: none; background: var(--teal); color: #fff; padding: 20px 20px 72px; padding-top: max(20px, env(safe-area-inset-top)); }
.hero-row { display: flex; align-items: center; gap: 12px; }
.hero .avatar { color: var(--teal-d); }
.hero small { display: block; font-size: 13px; color: #CDEBE8; } .hero b { font-size: 18px; font-weight: 700; }
.hero .grow { flex: 1; }
.bell { position: relative; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .16); color: #fff; display: flex; align-items: center; justify-content: center; }
.bell i { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: #FDB022; border: 2px solid var(--teal); }
.pull { margin-top: -56px; }
.hero-card { box-shadow: var(--shadow); border-radius: 20px; padding: 18px; gap: 14px; }
.big { display: flex; align-items: baseline; gap: 8px; } .big b { font-size: 30px; font-weight: 700; } .big span { color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 12px; font-weight: 600; text-align: center; }
.quick a:hover { border-color: var(--teal-line); }
.ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.ico.sm { width: 34px; height: 34px; border-radius: 10px; }
.tone-teal { background: var(--teal-l); color: var(--teal-d); } .tone-blue { background: var(--blue-l); color: var(--blue); }
.tone-amber { background: var(--amber-l); color: var(--amber); } .tone-red { background: var(--red-l); color: var(--red); }
.tone-violet { background: var(--violet-l); color: var(--violet); } .tone-slate { background: var(--slate-l); color: var(--slate); }
.activity { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #EEF2F6; align-items: center; } .activity:last-child { border-bottom: 0; }
.activity .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; } .activity b { font-size: 14px; } .activity small { color: var(--muted); font-size: 12px; } .activity time { font-size: 11px; color: var(--muted); }

/* ---------- beds ---------- */
.room { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.room-head { display: flex; justify-content: space-between; align-items: center; } .room-head h2 { font-size: 15px; } .room-head span { font-size: 12px; color: var(--muted); }
.bed { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; border: 1px solid #EEF2F6; background: #fff; text-align: left; width: 100%; }
.bed.vacant { background: #F8FAFC; border: 1px dashed #9AA8B8; }
.bed.sel { border: 2px solid var(--teal); padding: 9px; }
.bed .chip-l { flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--teal); color: #fff; }
.bed.vacant .chip-l { background: #fff; color: var(--slate); border: 1px solid var(--line2); }
.bed .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; } .bed .grow b { font-weight: 600; } .bed .grow small { color: var(--muted); font-size: 12px; }

/* ---------- reports / charts ---------- */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 8px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.chart .stackbar { width: 100%; max-width: 44px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 6px 6px 0 0; overflow: hidden; background: transparent; }
.chart .stackbar .c { background: var(--teal); } .chart .stackbar .p { background: #F6C77C; }
.chart small { font-size: 11px; color: var(--muted); }
.chart-x { display: flex; gap: 10px; text-align: center; } .chart-x span { flex: 1; font-size: 12px; color: var(--muted); }
.occ { display: flex; align-items: center; gap: 10px; padding: 5px 0; } .occ > span:first-child { width: 30px; font-size: 12px; color: var(--muted); } .occ > span:last-child { width: 44px; text-align: right; font-size: 12px; font-weight: 600; }
.occ .cells { flex: 1; display: flex; gap: 3px; } .occ .cells i { flex: 1; height: 16px; border-radius: 4px; background: #DCE3EB; } .occ .cells i.on { background: var(--teal); }
.split { display: flex; height: 12px; border-radius: 6px; overflow: hidden; } .split span { display: block; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; } .legend div { display: flex; align-items: center; gap: 6px; font-size: 12.5px; } .legend i { width: 10px; height: 10px; border-radius: 3px; } .legend em { margin-left: auto; font-style: normal; font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* ---------- misc components ---------- */
.profile { align-items: center; text-align: center; gap: 4px; padding: 20px 16px; }
.profile h1 { font-size: 20px; margin-top: 8px; }
.actions3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-top: 10px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.pick { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; text-align: left; }
.pick.on { border: 2px solid var(--teal); padding: 9px 11px; background: #F0F8F7; }
.pick b { font-size: 15px; } .pick small { color: var(--muted); font-size: 12px; }
.switch { width: 46px; height: 28px; flex: none; border-radius: 14px; border: 0; padding: 3px; background: #B8C3CF; display: flex; justify-content: flex-start; }
.switch[aria-checked=true] { background: var(--teal); justify-content: flex-end; }
.switch span { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.setting { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #EEF2F6; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.setting:last-child { border-bottom: 0; } .setting .grow { flex: 1; display: flex; flex-direction: column; } .setting small { color: var(--muted); font-size: 12px; }
.group-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }
.mod-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mod { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.mod small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.att { display: flex; align-items: center; gap: 10px; padding: 8px 0; } .att > span { flex: 1; font-weight: 600; }
.att .opts { display: flex; gap: 6px; } .att button { width: 40px; height: 36px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; color: var(--slate); font-weight: 700; }
.att button.P.on { background: var(--teal); border-color: var(--teal); color: #fff; } .att button.A.on { background: #D92D20; border-color: #D92D20; color: #fff; } .att button.L.on { background: #E08A3C; border-color: #E08A3C; color: #fff; }
.days { display: flex; gap: 6px; } .day { flex: 1; min-height: 52px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); }
.day b { font-size: 15px; color: var(--ink); } .day.on { background: var(--teal); border-color: var(--teal); color: #fff; } .day.on b { color: #fff; }
.meal { display: flex; flex-direction: column; gap: 8px; } .meal-top { display: flex; align-items: center; gap: 12px; } .meal-top .grow { flex: 1; display: flex; flex-direction: column; } .meal-top small { color: var(--muted); font-size: 12px; }
.meal .dish { font-size: 16px; font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 6px; } .stepper button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line2); background: #fff; font-weight: 700; }
.pinbtn { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line2); background: #fff; color: var(--slate); display: flex; align-items: center; justify-content: center; }
.pinbtn.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.notice { gap: 8px; } .notice.pinned { background: #F4FBFA; border-color: var(--teal-line); } .notice h2 { font-size: 16px; } .notice p { color: var(--slate); }
.notice .top { display: flex; align-items: center; gap: 8px; }
.pay-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.pay-row.od { background: #FFF5F4; border-color: var(--red-line); box-shadow: inset 4px 0 0 #D92D20; }
.pay-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; } .pay-row .amt { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-weight: 700; }
.pay-row.od .amt > b, .pay-row.od .grow small { color: var(--red); } .pay-row small { color: var(--muted); font-size: 12px; }
.receipt { border: 1px dashed var(--line2); border-radius: 14px; padding: 14px; background: #FAFBFC; }
.print-only { display: none; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(160deg, var(--teal) 0%, var(--teal-d) 100%); }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 24px; padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.login-card .logo { width: 52px; height: 52px; border-radius: 14px; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; }
.login-card h1 { font-size: 22px; } .pin { text-align: center; letter-spacing: .5em; font-size: 22px; }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(20, 32, 48, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.sheet { width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto; background: #fff; border-radius: 24px 24px 0 0; padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); animation: up .2s ease; display: flex; flex-direction: column; gap: 14px; }
.grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line2); align-self: center; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; } .sheet-head h2 { font-size: 18px; }
.update-bar { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); top: max(12px, env(safe-area-inset-top)); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px); padding: 8px 8px 8px 14px; border-radius: 14px; background: #142030; color: #fff; font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow); animation: up .2s ease; }
.update-bar svg { flex: none; color: #7FD6D2; }
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + 80px); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: #142030; color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); max-width: 90vw; animation: up .2s ease; }
.toast.t-err { background: var(--red); } .toast.out { opacity: 0; transition: opacity .25s; }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(24px); opacity: .6; } }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  .hide-desktop { display: none !important; }
  .hide-mobile { display: inline-flex !important; }
  .sidebar { display: flex; } .tabbar { display: none; }
  .page-head { background: transparent; border-bottom: 0; padding: 28px 40px 4px; gap: 16px; }
  .head-title h1 { font-size: 26px; }
  .content { padding: 16px 40px 40px; max-width: 1180px; width: 100%; margin: 0 auto; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
  .cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .hero { margin: 24px auto 0; border-radius: 24px; padding: 24px 28px 76px; max-width: 1100px; width: calc(100% - 80px); }
  .pull { margin-top: -56px; }
  .hero-card .big b { font-size: 36px; }
  .overlay { align-items: center; padding: 20px; }
  .sheet { border-radius: 20px; padding: 20px 24px 24px; max-width: 480px; } .grab { display: none; }
  #toasts { bottom: 28px; }
  .mod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fi, .btn { min-height: 42px; }
}
@media (min-width: 1280px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 380px) { .two { grid-template-columns: 1fr; } .quick { gap: 6px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- print (Reports → PDF) ---------- */
@media print {
  .sidebar, .tabbar, .fab, .update-bar, .head-actions, .chips, .seg, #toasts, #overlay, .no-print, .icon-btn { display: none !important; }
  body, .app, .main { height: auto; display: block; background: #fff; overflow: visible; }
  .page-scroll { overflow: visible; } .page-head { padding: 0 0 12px; }
  .card { break-inside: avoid; }
  .print-only { display: block; }
}
