/* Components from the wireframes (pages 00 to 05). Tokens come from app.css. */
:root { --note: var(--warn); --note-soft: var(--warn-soft); }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 14px; height: 14px; stroke: currentColor; vertical-align: -2px; }
a { color: var(--accent); }
.h { font-size: 19px; font-weight: 700; margin: 0; text-wrap: balance; }
.sub { font-size: 13px; color: var(--muted); margin: 0; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; } .center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.titlerow { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.appbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 36px; }
.link { color: var(--accent); font-weight: 600; font-size: 14px; background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: none; }
.linkbtn { background: none; border: 0; color: var(--note); font-weight: 700; cursor: pointer; padding: 4px 0 4px 8px; }
.spacer { flex: 1; }
.btn.g { background: transparent; color: var(--accent); border-color: transparent; min-height: 40px; }
.btn.d { color: var(--note); border-color: transparent; background: transparent; min-height: 40px; }
.btn.dp { background: var(--note); color: var(--surface); border-color: var(--note); font-weight: 600; }
.btn.sm { min-height: 38px; font-size: 13.5px; padding: 0 12px; }
.btn.full { width: 100%; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .45; cursor: default; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.flag { color: var(--note); font-size: 12.5px; font-weight: 600; } .okc { color: var(--accent); font-size: 12.5px; font-weight: 600; }
.mutedc { color: var(--muted); font-size: 13px; }
.badge { align-self: flex-start; display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 10px; }

.grp { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 6px; }
.list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px 12px; font-size: 14px; border-top: 1px solid var(--line); width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; color: inherit; cursor: default; text-decoration: none; }
.li:first-child { border-top: 0; }
button.li, a.li { cursor: pointer; }
.li .lt { display: flex; gap: 10px; align-items: center; min-width: 0; }
.li .lt > span { display: flex; flex-direction: column; min-width: 0; }
.lt b { font-size: 14px; font-weight: 600; } .lt em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.chev { color: var(--muted); font-size: 18px; line-height: 1; }
.act { font-size: 13px; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 4px 12px; flex: none; background: none; cursor: pointer; min-height: 32px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 8px; }
.dot.w { background: var(--note); }

.field { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 10px 0; font-size: 14px; position: relative; min-height: 46px; }
.field > span { color: var(--muted); } .field b { font-weight: 600; text-align: right; }
.field > span em { display: block; font-style: normal; font-size: 11.5px; color: var(--note); font-weight: 600; }
.field .ph, .field b.ph { color: var(--muted); font-weight: 400; }
.field.indent { padding-left: 14px; font-size: 13.5px; }
.field.sel select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.field.inp input { border: 0; background: transparent; text-align: right; font-weight: 600; min-width: 0; flex: 1; font-size: 16px; padding: 4px 0; outline: none; }
.field.inp input::placeholder { color: var(--muted); font-weight: 400; }
.field.inp:focus-within, .field.sel:focus-within { background: var(--fill); border-radius: 8px; }
.field .suf { font-style: normal; color: var(--muted); font-size: 13px; }
.field.yel { background: var(--note-soft); border-radius: 8px; border-bottom: 0; padding-inline: 10px; margin-bottom: 4px; }
.field.tap { cursor: pointer; }
.okm { color: var(--accent); font-size: 12.5px; margin-left: 4px; }
.more { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); padding: 8px 0; background: none; border: 0; width: 100%; cursor: pointer; }

.choice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface); width: 100%; text-align: left; cursor: pointer; }
.choice:focus-visible { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice b { display: block; font-size: 14.5px; } .choice span span { font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; background: var(--surface); cursor: pointer; min-height: 32px; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip .n { color: var(--muted); margin-left: 2px; } .chip.on .n { color: inherit; opacity: .8; }
.search { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--fill); }
.search input { border: 0; background: transparent; flex: 1; min-height: 40px; font-size: 16px; outline: none; }
.search .ic { width: 16px; height: 16px; stroke: var(--muted); }

.sum { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); text-decoration: none; color: inherit; }
.sumt { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; } .sumt span { color: var(--muted); } .sumt b { font-variant-numeric: tabular-nums; }
.bar2 { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; } .bar2 i { display: block; height: 100%; background: var(--accent); }
.hero-card { background: var(--fill); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.hero-card b { font-size: 17px; } .hero-card span { font-size: 13px; color: var(--muted); } .hero-card .btn { margin-top: 6px; }
.emptyst { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 36px 8px; }
.emptyst .ic { width: 40px; height: 40px; } .emptyst b { font-size: 16px; } .emptyst span { font-size: 13.5px; color: var(--muted); }
.banner2 { display: flex; justify-content: space-between; align-items: center; background: var(--note-soft); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; }
.ask { background: var(--fill); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.warnline { color: var(--note); font-size: 12.5px; font-weight: 600; }
.sk { height: 10px; border-radius: 5px; background: var(--fill); } .sk.w60 { width: 60%; } .sk.w35 { width: 35%; } .sk.w20 { width: 20%; }
@media (prefers-reduced-motion: no-preference) { .sk { animation: skp 1.2s ease-in-out infinite; } @keyframes skp { 50% { opacity: .5; } } }
.steps { display: flex; gap: 4px; } .steps i { width: 22px; height: 4px; border-radius: 2px; background: var(--line); } .steps i.on { background: var(--accent); }
.stepper { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.preview { font-size: 12.5px; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; padding: 8px; font-variant-numeric: tabular-nums; word-break: break-word; }
.crop { min-height: 64px; max-height: 220px; border-radius: 8px; border: 1px dashed var(--line); background: var(--fill); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); overflow: hidden; }
.crop img { max-width: 100%; max-height: 220px; display: block; }
.promise { display: flex; gap: 10px; align-items: center; background: var(--fill); border-radius: 12px; padding: 12px; font-size: 13.5px; }
.feats { display: flex; flex-direction: column; gap: 14px; padding: 4px 0; }
.feat { display: flex; gap: 12px; align-items: flex-start; } .feat b { display: block; font-size: 14.5px; } .feat div span { font-size: 13px; color: var(--muted); }
.hero { font-size: 26px; font-weight: 700; line-height: 1.25; margin: 6px 0 0; text-wrap: balance; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tile { aspect-ratio: 3 / 4; border-radius: 6px; border: 1px solid var(--line); background: var(--fill); display: flex; align-items: flex-end; justify-content: center; font-size: 11px; color: var(--muted); padding-bottom: 4px; overflow: hidden; position: relative; cursor: pointer; user-select: none; -webkit-user-select: none; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.blur { background: repeating-linear-gradient(45deg, var(--fill) 0 4px, var(--line) 4px 8px); color: var(--ink); font-weight: 600; align-items: center; text-align: center; padding: 4px; touch-action: none; }
.tile.blur img { filter: blur(14px); } .tile.blur.show img { filter: none; }
.tile.blur span { position: relative; }
.calc { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-variant-numeric: tabular-nums; }
.calc > div { display: flex; justify-content: space-between; gap: 8px; align-items: center; } .calc span { color: var(--muted); }
.calc .tot { border-top: 1px solid var(--line); padding-top: 10px; font-weight: 700; font-size: 15px; } .calc .tot span { color: var(--ink); }

/* bottom sheet */
.sheet-wrap { position: fixed; inset: 0; height: 100vh; height: 100dvh; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 88vh; max-height: calc(100dvh - 48px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: var(--bg); color: var(--ink); border-radius: 20px 20px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); align-self: center; }
.sheet-body { display: flex; flex-direction: column; gap: 12px; }
@media (prefers-reduced-motion: no-preference) { .sheet { animation: slideup .18s ease-out; } @keyframes slideup { from { transform: translateY(24px); opacity: .6; } } }
.toast2 { display: flex; justify-content: space-between; gap: 12px; background: var(--ink); color: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; }

/* landing */
.lp { padding: 8px 0 32px; }
.lp .appbar b { font-size: 16px; }
.tabs[hidden], [hidden] { display: none !important; }

.rec { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); text-align: left; width: 100%; cursor: pointer; color: inherit; }
.rt { display: flex; justify-content: space-between; gap: 8px; font-size: 14.5px; } .rt span { color: var(--muted); font-size: 13px; }
.rm { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.paste { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--surface); font-size: 16px; resize: vertical; }
.sheet > .h { margin-top: 2px; }
#app[data-gate] .top { display: none; }
.sync-inline { font-size: 12px; color: var(--muted); text-align: right; } .sync-inline.warn { color: var(--note); font-weight: 600; }
#app[data-inline-sync] .top .sync { display: none; }
.act.ghost { border-color: transparent; }
.li.fold { color: var(--muted); }
#view.locked { opacity: .5; pointer-events: none; user-select: none; }
#lockbar { position: sticky; top: 52px; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 16px; padding: 10px 12px; border-radius: 12px; background: var(--note-soft); font-size: 14px; }
.btn-file { position: relative; overflow: hidden; cursor: pointer; }
.btn-file input.file-in { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 100px; }
.btn-file:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
label.link.btn-file { display: inline-block; overflow: visible; }
label.act.btn-file { display: inline-flex; align-items: center; }
label.choice.btn-file { display: flex; }
.hsw { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hbtn { background: none; border: 0; padding: 8px 0; min-height: 44px; text-align: left; min-width: 0; flex: 1; cursor: pointer; color: inherit; }
.hn { display: flex; align-items: baseline; gap: 6px; font-size: 19px; font-weight: 700; min-width: 0; }
.hn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .hn i { font-style: normal; color: var(--accent); font-size: 18px; font-weight: 700; flex: none; }
.hs { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hsw > .link { flex: none; white-space: nowrap; }
.radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: inline-block; } .radio.on { border-color: var(--accent); background: radial-gradient(var(--accent) 45%, transparent 50%); }
.rowbtn { display: flex; gap: 10px; align-items: center; background: none; border: 0; padding: 0; text-align: left; color: inherit; cursor: pointer; flex: 1; min-width: 0; font: inherit; }
.rowbtn > span:last-child { display: flex; flex-direction: column; min-width: 0; } .rowbtn > span.lt { flex-direction: row; gap: 10px; align-items: center; } .rowbtn b { font-size: 14px; } .rowbtn em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.hintline { font-size: 12px; color: var(--muted); margin: -4px 0 0; }
.li .lt em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62vw; }
.box { width: 20px; height: 20px; border: 2px solid var(--line); border-radius: 5px; flex: none; display: inline-block; background: var(--surface); position: relative; }
.box.on { background: var(--accent); border-color: var(--accent); } .box.on::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.box.part { border-color: var(--accent); } .box.part::after { content: ""; position: absolute; left: 3px; top: 7px; width: 10px; height: 2px; background: var(--accent); }
.cnt { display: inline-flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; } .cnt button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 18px; cursor: pointer; color: var(--ink); }
.a4wrap { display: flex; justify-content: center; } .a4c { max-width: 100%; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.big { display: flex; justify-content: center; } .lblc { border: 1px dashed var(--line); background: #fff; max-width: 100%; }
.dimline { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
button.chev { background: none; border: 0; cursor: pointer; padding: 8px; font-size: 20px; }
.prog { display: flex; flex-direction: column; gap: 6px; } .prog .sumt b { font-size: 15px; } .prog .left b { color: var(--ink); }
.photo { position: relative; border-radius: 12px; overflow: hidden; background: var(--fill); max-height: 36vh; display: flex; justify-content: center; } .photo img { max-width: 100%; max-height: 36vh; object-fit: contain; display: block; } .photo.sm { max-height: 20vh; } .photo.sm img { max-height: 20vh; }
.photo .tag { position: absolute; left: 8px; top: 8px; background: var(--ink); color: var(--bg); border-radius: 6px; padding: 2px 8px; font-weight: 700; font-size: 13px; z-index: 1; }
.reading { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .reading > span { color: var(--muted); } .reading b, .bign { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; background: none; border: 0; color: inherit; padding: 0; cursor: pointer; }
.num { font-size: 26px; font-weight: 700; width: 9ch; text-align: right; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--surface); color: var(--ink); font-variant-numeric: tabular-nums; }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .pick button { border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; background: var(--surface); font-size: 22px; font-weight: 700; display: flex; flex-direction: column; align-items: center; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; } .pick button span { font-size: 12px; font-weight: 400; color: var(--muted); } .pick button.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.addl { background: none; border: 0; color: var(--accent); font-weight: 600; text-align: left; padding: 6px 0; cursor: pointer; font-size: 14px; }
.crop.dial { min-height: 70px; background: #000; } .crop.dial img { max-height: 120px; }
.thumb { width: 34px; height: 34px; border-radius: 6px; background: var(--fill); border: 1px solid var(--line); flex: none; overflow: hidden; } .thumb img { width: 100%; height: 100%; object-fit: cover; }
.vsteps { display: flex; flex-direction: column; gap: 6px; }
.vs { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.vs[role="button"] { cursor: pointer; } .vs > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; } .vs b { font-size: 14.5px; } .vs em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.vs .n { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--muted); flex: none; }
.vs.done .n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .vs.cur { background: var(--fill); border-color: var(--accent); } .vs.cur .n { border-color: var(--accent); color: var(--accent); } .vs.off { opacity: .55; }
.qrbox { display: flex; gap: 12px; align-items: center; font-size: 12.5px; color: var(--muted); } .qrbox canvas { width: 96px; height: 96px; border: 1px solid var(--line); border-radius: 6px; background: #fff; flex: none; }
.sub2 { font-size: 12px; color: var(--muted); margin-top: -4px; } .rgt { font-variant-numeric: tabular-nums; font-weight: 600; }

.sheet .list + .btn[data-add] { flex: none; min-height: 44px; }

/* page 11 and 09 */
pre.code { background: var(--fill); border-radius: 12px; padding: 12px; font: 12.5px/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; margin: 0; }
.promise-line { margin: 0; font-size: 15px; }
.quote { background: var(--fill); border-radius: 12px; padding: 12px; } .quote p { margin: 0; } .quote p + p { margin-top: 6px; }
.field.tap { cursor: pointer; }

/* page 10 (tenant) */
.tbrand { padding: 14px 16px 0; font-weight: 700; color: var(--muted); font-size: 14px; }
.lbl { margin: 0; font-weight: 600; font-size: 14px; }
.cat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .cat .chip { min-height: 52px; justify-content: center; text-align: center; }
.ta { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: inherit; background: var(--bg); color: var(--ink); resize: vertical; min-height: 84px; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .photos .thumb { position: relative; width: 64px; height: 64px; }
.photos .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; } .photos .rm { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 12px; border: 0; background: var(--ink); color: var(--bg); }
.addph { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; color: var(--muted); min-height: 44px; }
.track { display: flex; flex-direction: column; margin: 4px 0; } .tk { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0 10px 22px; position: relative; border-left: 2px solid var(--line); margin-left: 8px; }
.tk::before { content: ""; position: absolute; left: -7px; top: 14px; width: 12px; height: 12px; border-radius: 6px; background: var(--line); } .tk.on { border-color: var(--accent); } .tk.on::before { background: var(--accent); } .tk.off b { color: var(--muted); font-weight: 500; } .tk .d { color: var(--muted); font-size: 13px; }

.wk { display: grid; grid-template-columns: 64px 1fr 1fr 1fr; gap: 6px; align-items: stretch; }
.wk .wh { text-align: center; font-size: 13px; color: var(--muted); font-weight: 500; }
.wk .wd { min-height: 36px; text-align: left; background: none; border: 0; padding: 0 4px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.wk .wc { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); cursor: pointer; padding: 0; }
.wk .wc.on { background: var(--accent); border-color: var(--accent); }
.sumline { margin: 0; font-size: 13.5px; color: var(--muted); }

/* page 12 */
.seg { display: flex; gap: 4px; background: var(--fill); border-radius: 12px; padding: 3px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 10px; min-height: 36px; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--bg); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.when { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; } .when.due { color: var(--warn, #c2570c); font-weight: 600; }
.cal { min-width: 44px; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }

/* page 13 */
.head1 { margin: 0; font-size: 20px; font-weight: 700; } .head1.sm { font-size: 16px; }
.chart { width: 100%; max-width: 380px; height: auto; display: block; margin: 0 auto; } .chart.ghost { opacity: .5; }
.leg { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); } .leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hb { display: flex; flex-direction: column; gap: 8px; } .hr { display: grid; grid-template-columns: 84px 1fr 46px; gap: 8px; align-items: center; font-size: 13px; } .hr b { text-align: right; font-variant-numeric: tabular-nums; }
.hr .tr { height: 12px; background: var(--fill); border-radius: 6px; overflow: hidden; display: block; } .hr .tr i { display: block; height: 100%; border-radius: 6px; }
.mt { margin: 6px 0 0; font-size: 13px; font-weight: 600; }
.tiles4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .tiles4 .tile, .tiles3 .tile { aspect-ratio: auto; background: var(--fill); border: 0; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; font-size: 14px; color: var(--ink); overflow: visible; user-select: auto; -webkit-user-select: auto; } .tiles4 .tile b, .tiles3 .tile b { font-size: 20px; } .tiles4 .tile span, .tiles3 .tile span { font-size: 12.5px; color: var(--muted); }
.stack2 { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--muted); }
.lim { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); } .trk { flex: 1; height: 14px; background: var(--fill); border-radius: 7px; overflow: hidden; } .trk i { display: block; height: 100%; background: var(--accent); }
.tbl { font-size: 12.5px; color: var(--muted); }

/* page 14 */
.field.col { flex-direction: column; align-items: stretch; gap: 6px; } .field.col input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; background: var(--bg); color: var(--ink); }
.cp { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l b" "v b"; gap: 2px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; align-items: center; }
.cp .cpl { grid-area: l; font-size: 12.5px; color: var(--muted); } .cp .cpl .warn { color: #c2570c; } .cp .cpv { grid-area: v; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpb { grid-area: b; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--accent); background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; } .cpb.done { background: var(--fill); border-color: var(--line); color: var(--muted); } .cpb:disabled { opacity: .4; }
.diff { display: flex; justify-content: space-between; background: var(--fill); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.vs2 { display: flex; flex-direction: column; gap: 14px; } .lbl2 { margin: 0 0 6px; font-weight: 600; font-size: 14px; }

/* page 15 */
.card2 { display: flex; gap: 12px; align-items: center; } .card2 b { display: block; } .card2 span { color: var(--muted); font-size: 13px; }
.ic180 { width: 44px; height: 44px; border-radius: 10px; background: #1d5c46 url(/icon-180.png) center/cover; flex: none; }
.brw { display: flex; align-items: center; justify-content: space-between; background: var(--fill); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.brw .ring { width: 22px; height: 22px; border-radius: 11px; border: 2px solid var(--accent); }
.instcard { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }

/* page 16 */
.pv { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; } .pv.no { border-style: dashed; }
.pv .t { font-size: 15px; } .pv .r { margin: 0; font-size: 13.5px; color: var(--muted); }
.kchips { display: flex; flex-wrap: wrap; gap: 6px; } .kchip { background: var(--fill); border-radius: 8px; padding: 4px 9px; font-size: 13px; } .pv.no .kchip { text-decoration: line-through; color: var(--muted); }
.tiles3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .tiles3 .tile { text-align: left; border: 0; font: inherit; cursor: pointer; color: inherit; } .tiles3 .tile:disabled { cursor: default; } .tiles3 .tile.on { outline: 2px solid var(--accent); }
button.hr { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; width: 100%; cursor: pointer; }

/* page 17, 18 */
.reading.y b { color: #c2570c; } .photo .tag.w { background: #c2570c; color: #fff; }
.st { margin-left: auto; border: 0; background: var(--fill); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.st.ok { background: var(--accent); color: #fff; } .st.no { background: #fbe3d0; color: #c2570c; font-weight: 600; }

/* page 20, 21 */
.list > .field { padding-left: 12px; padding-right: 12px; }
.tier { display: grid; grid-template-columns: minmax(84px, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr) auto; gap: 6px; align-items: center; font-size: 13.5px; }
.tier > span { color: var(--muted); }
.tier input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font: inherit; font-size: 16px; background: var(--surface); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.tier i { display: none; }
.tier .rm { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px 6px; }
.tier .u { position: relative; display: block; } .tier .u::after { content: attr(data-u); position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); pointer-events: none; } .tier .u input { padding-right: 46px; }
.msg { margin: 0; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; color: var(--muted); }
.srcl { background: none; border: 0; padding: 2px 0; font: inherit; font-size: 12.5px; color: var(--muted); text-align: left; cursor: pointer; align-self: flex-start; } .srcl b { color: var(--ink); font-weight: 600; } .srcl.no { color: var(--note); }
.choice.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice .ic { width: 22px; height: 22px; flex: none; color: var(--accent); margin-top: 1px; }

/* page 22 */
.strike { text-decoration: line-through; color: var(--muted); }
.swrow { width: 100%; background: none; border: 1px solid var(--line); border-radius: 12px; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.sw { width: 40px; height: 24px; border-radius: 12px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.sw.on { background: var(--accent); } .sw.on::after { left: 19px; }

/* page 23 */
.warnm { color: var(--note); font-weight: 600; }

/* page 24 */
.cb { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line); flex: none; background: var(--surface); }
.cb.on { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--surface); }
/* page 28 */
.imp .li > button.lt { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; flex: 1; cursor: pointer; }
.imp .li[aria-disabled="true"] { opacity: .6; }
.imp .li > .link { flex: none; }
/* page 29 */
.res .li .lt em { white-space: normal; max-width: none; }
.res .li > b { flex: none; }

/* ---------- v47 look (approved direction 21/11): cards with a soft shadow, filled state colours, bigger money, 48px main buttons ----------
   Same classes as before, so every page changes together. Tokens: app.css (--ok-soft, --err, --err-soft, --line-soft, --shadow). */
.list, .sum, .card, .rec, .choice, .vs, .cp, .instcard, .pv, .swrow, .hero-card { border-color: var(--line-soft); border-radius: 16px; box-shadow: var(--shadow); }
.list { background: var(--surface); }
.list .li { border-top-color: var(--line-soft); }
.li { padding: 13px 14px; min-height: 56px; }
.lt b, .rowbtn b { font-size: 15px; }
.li .lt > svg.ic, .rowbtn > svg.ic { width: 38px; height: 38px; padding: 9px; border-radius: 12px; background: var(--ok-soft); stroke: var(--accent); }
.hero-card { background: var(--ok-soft); border: 0; }
.sum { padding: 14px 16px; gap: 8px; }
.sumt b { font-size: 16px; }
.bar2 { height: 8px; border-radius: 4px; }
.btn { border-radius: 12px; font-weight: 600; border-color: transparent; background: var(--fill); }
.btn.primary { min-height: 50px; font-size: 16px; box-shadow: 0 2px 6px rgba(29, 92, 70, .22); }
.btn.g, .btn.d { background: transparent; box-shadow: none; }
.btn.sm { min-height: 40px; border-radius: 10px; }
.btn.sm.primary { min-height: 40px; font-size: 14px; }
.act { border: 0; background: var(--ok-soft); color: var(--accent); min-height: 36px; padding: 6px 14px; font-size: 13.5px; }
.act.ghost { background: transparent; }
.chip { min-height: 36px; padding: 6px 14px; font-weight: 500; }
.grp { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 10px; }
.flag { background: var(--warn-soft); border-radius: 999px; padding: 3px 10px; }
.okc { background: var(--ok-soft); border-radius: 999px; padding: 3px 10px; }
.banner, .banner2 { border-radius: 14px; }
.sheet { border-radius: 24px 24px 0 0; padding-top: 12px; }
.sheet > .h { font-size: 20px; }
.tabs a[aria-current="page"] svg { background: var(--ok-soft); border-radius: 999px; padding: 3px 14px; width: 52px; height: 30px; }
.tabs a svg { padding: 3px 14px; width: 52px; height: 30px; }
.search { border-radius: 12px; background: var(--surface); border-color: var(--line-soft); box-shadow: var(--shadow); }
.cpb { border: 0; background: var(--ok-soft); }
.vs.cur { background: var(--surface); border: 2px solid var(--accent); }
.vs .n { width: 30px; height: 30px; }
.vs.done .n { background: var(--accent); }
.vs > span:nth-child(2) { gap: 2px; }

/* Việc 28c v2: one row per room with two buttons */
.li.two { flex-direction: column; align-items: stretch; gap: 10px; }
.li.two .lt em { white-space: normal; max-width: none; }
.twob { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-left: 48px; }

/* Phòng 28a v2: the card on top */
.topcard { border: 1.5px dashed var(--accent); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.topcard .hsw b { font-size: 15px; } .topcard > span { font-size: 13px; color: var(--muted); } .topcard .link { padding: 0 0 0 8px; }

/* 28b v2: tick = own button, text = edit, rooms = chips */
.imp2 { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-soft); }
.imp2:first-child { border-top: 0; }
.imp2 .r { display: flex; gap: 10px; align-items: flex-start; }
.imp2.off .tx, .imp2.off .thumb { opacity: .6; }
.cbx { width: 44px; height: 52px; margin: -4px 0 -4px -10px; display: flex; align-items: flex-start; justify-content: center; padding-top: 4px; background: none; border: 0; cursor: pointer; flex: none; }
.cbx .cb { width: 22px; height: 22px; }
.imp2 .tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.imp2 .tx b { font-size: 14.5px; } .imp2 .tx em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.imp2 .tx em.t2 { color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thumb.big { width: 56px; height: 56px; border-radius: 10px; }
.pickr { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 34px; }
.tag2 { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--ok-soft); border-radius: 999px; padding: 1px 8px; margin-left: 4px; white-space: nowrap; vertical-align: 1px; }

/* 28d v2 */
.pricec { background: var(--ok-soft); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.pricec b { font-size: 15px; font-variant-numeric: tabular-nums; } .pricec > span { font-size: 12.5px; color: var(--muted); } .pricec .link { padding: 0 0 0 8px; flex: none; }
.btn.done { color: var(--muted); }

/* 29a v2 */
.card0 { border-radius: 16px; padding: 14px 16px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 4px; }
.card0.on { border: 2px solid var(--accent); }
.card0 .hsw b { font-size: 15.5px; } .card0 > span { font-size: 13px; color: var(--muted); }
.vs.off { opacity: .6; }
.vs .n.nb { cursor: pointer; background: var(--surface); font: inherit; font-weight: 700; font-size: 13px; }
.vs.done .n.nb { background: var(--accent); color: var(--accent-ink); }
.vs .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.calm { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; background: var(--warn-soft); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; }
.calm b { font-size: 13px; }
.errc { display: flex; flex-direction: column; gap: 4px; background: var(--err-soft); border-radius: 14px; padding: 12px 14px; font-size: 13px; }
.errc b { color: var(--err); font-size: 14px; } .errc .act { align-self: flex-start; margin-top: 4px; background: var(--surface); }

/* 29b, 29c v2 */
.li > .rowbtn { min-height: 44px; }
.amt { background: var(--ok-soft); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.amt b { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; } .amt span { font-size: 13px; color: var(--muted); }
.li.swl { border: 0; padding-inline: 0; }
.msg { white-space: normal; color: var(--ink); background: var(--surface); }

/* 29d v2: numbers above the chart */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.kpi { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; } .kpi span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.vsteps .vs { align-items: flex-start; }

/* ---------- v48 polish (21/11): header with a logo and the Drive state as a pill, icons on the main buttons, an info colour, one card per item on Việc and Thu tiền ---------- */
.top { padding-bottom: 10px; }
.top .brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 34px; height: 34px; border-radius: 11px; background: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 2px 6px rgba(29, 92, 70, .25); }
.logo svg { width: 19px; height: 19px; fill: none; stroke: var(--accent-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topr { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sync > span:first-child { background: var(--ok-soft); color: var(--accent); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.sync.warn > span:first-child { background: var(--warn-soft); color: var(--warn); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ok-soft); color: var(--accent); font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; text-decoration: none; flex: none; }
.avatar[hidden] { display: none; }
.appbar .hintline { margin: 0; background: var(--info-soft); color: var(--info); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.promise { background: var(--info-soft); }
.sum .sumt:first-child b { font-size: 20px; }
.hero-card b { font-size: 19px; }

/* one card per item */
.list.cards { background: none; border: 0; box-shadow: none; overflow: visible; display: flex; flex-direction: column; gap: 10px; }
.list.cards > .li, .list.cards > button.li { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; box-shadow: var(--shadow); }

/* room picture in the Phòng list */
.thumb.rth { width: 46px; height: 46px; border-radius: 12px; border: 0; }

/* icons on buttons (drawn with a mask, colour follows the text) */
.ib::before, .cpb[data-copy]::before, .btn[data-copy]::before, .cpb[data-save]::before, [data-saveimp]::before, [data-zalo]::before, .act[data-remind]::before,
[data-undo-pay]::before, [data-undo-hand]::before, [data-pull]::before, .twob [data-act]::before, [data-act="saved"]::before, [data-act="paid"]::before, .topcard [data-act="import"]::before, [data-act="price"]::before {
  content: ""; display: inline-block; width: 17px; height: 17px; margin-right: 6px; vertical-align: -3px; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; flex: none; }
.cpb[data-copy]::before, .btn[data-copy]::before { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='9' y='9' width='11' height='11' rx='2'/><path d='M5 15V5a2 2 0 0 1 2-2h8'/></svg>"); }
.cpb[data-save]::before, [data-saveimp]::before { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 4v11M7 10l5 5 5-5M5 20h14'/></svg>"); }
[data-zalo]::before { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 12l16-8-6 16-3-6z'/></svg>"); }
.act[data-remind]::before { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 16V11a6 6 0 0 1 12 0v5l2 2H4z'/><path d='M10 20h4'/></svg>"); }
[data-undo-pay]::before, [data-undo-hand]::before { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 6L4 11l5 5'/><path d='M4 11h11a5 5 0 0 1 0 10h-3'/></svg>"); }
[data-pull]::before { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 12a8 8 0 1 1-2.3-5.7M20 4v5h-5'/></svg>"); }
.twob [data-act="contract"]::before, .twob [data-act="hd"]::before { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='5' width='16' height='16' rx='2'/><path d='M8 3v4M16 3v4M4 10h16'/></svg>"); }
.twob [data-act="relist"]::before { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 10v4h3l7 4V6l-7 4z'/><path d='M18 9a4 4 0 0 1 0 6'/></svg>"); }
[data-act="saved"]::before, [data-act="paid"]::before { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12l5 5 9-10'/></svg>"); }
.topcard [data-act="import"]::before { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='18' height='14' rx='2'/><circle cx='9' cy='10' r='2'/><path d='M21 16l-5-5-8 8'/></svg>"); }
[data-act="price"]::before { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 20h4L19 9l-4-4L4 16z'/></svg>"); }
.sync-inline { background: var(--ok-soft); color: var(--accent); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.sync-inline.warn { background: var(--warn-soft); color: var(--warn); }
.sync button { white-space: nowrap; }
.top .brand { flex: 1 1 auto; } .topr { flex: none; }
.thumb.rth.ph { background: var(--ok-soft); display: flex; align-items: center; justify-content: center; }
.li .lt > .thumb.rth.ph svg.ic { width: 22px; height: 22px; padding: 0; background: none; }
.cp + .photos { margin-top: -4px; } .photos .thumb { width: 72px; height: 72px; border-radius: 12px; border: 0; padding: 0; overflow: hidden; }
.hlinks { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
/* 33-1 Bàn giao */
.twoa { display: inline-flex; gap: 8px; align-items: center; flex: none; }
.photos .thumb .tag2 { position: absolute; left: 4px; bottom: 4px; margin: 0; font-size: 10.5px; padding: 0 6px; background: var(--surface); }

/* Wireframe 31 · Xóa hết, làm lại (05/12/2026) */
.wimp { color: var(--ink); } .wimp div { display: flex; gap: 8px; align-items: baseline; } .wimp div::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--note); flex: none; transform: translateY(-1px); }
.wsw { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; }
.wsw .lt { min-width: 0; } .wsw .sw { min-width: 40px; }
.wbar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; } .wbar i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.stepmo { display: inline-flex; gap: 14px; } .stepmo .link { font-size: 20px; line-height: 1; padding: 4px 8px; }
.bigamt { font-size: 30px; font-weight: 700; margin: 2px 0; font-variant-numeric: tabular-nums; }
