/* Trọ Ổn — hướng thiết kế: "sổ thu tiền trọ + bảng hiệu CHO THUÊ PHÒNG"
   Màu lấy từ ảnh hẻm: lá cây rêu, tường vôi trắng, gạch đỏ sân, nắng chiều. */
:root {
  --lime: #F3EEE2;      /* trắng vôi — nền */
  --paper: #FBF8F1;     /* giấy sổ */
  --paper-2: #EFE9DB;
  --moss: #2E4634;      /* xanh rêu đậm — bảng hiệu */
  --moss-2: #3F5E45;
  --moss-ink: #E9E4D3;
  --sun: #E8AE2E;       /* vàng nắng — MÀU NHẤN DUY NHẤT cho hành động */
  --sun-2: #F2C25A;
  --brick: #B0532F;     /* gạch sân — chỉ cho nợ / lỗi */
  --ink: #1D241F;
  --ink-2: #47524A;
  --mute: #66706A;
  --line: rgba(46, 70, 52, .14);
  --ink-blue: #24408E;  /* mực bút bi trên phiếu thu */
  --st-rented: #5E8466;
  --st-expiring: #E2A93A;
  --st-debt: #C0603E;
  --st-vacant: #D5CDBA;
  --stage: #E8E2D3;
  --slab: #EDE7D8;
  --r: 10px;
  --r-s: 6px;
  --e: cubic-bezier(.2, .8, .2, 1);
  --f-d: "Bricolage Grotesque", "Be Vietnam Pro", system-ui, sans-serif;
  --f-b: "Be Vietnam Pro", system-ui, sans-serif;
  --f-m: "JetBrains Mono", ui-monospace, monospace;
  --sb-w: 264px;
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}
[data-theme="dark"] {
  --lime: #121712;
  --paper: #1A211B;
  --paper-2: #222B23;
  --moss: #0D120E;
  --moss-2: #1E2A20;
  --moss-ink: #DCD6C4;
  --sun: #F0BC48;
  --sun-2: #F6CF73;
  --brick: #E07C58;
  --ink: #ECE7DA;
  --ink-2: #C4C6BB;
  --mute: #9DA59A;
  --line: rgba(233, 228, 211, .1);
  --ink-blue: #9DB4F2;
  --st-rented: #6F9C78;
  --st-expiring: #E8B54A;
  --st-debt: #D9714D;
  --st-vacant: #3E463D;
  --stage: #171D17;
  --slab: #2C342C;
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 .9 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.locked { overflow: hidden; }
body { margin: 0; background: var(--lime) var(--tex); color: var(--ink); font: 400 16px/1.6 var(--f-b); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--f-d); font-weight: 700; letter-spacing: -.015em; line-height: 1.15; margin: 0; }
p { margin: 0; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 99; background: var(--sun); color: #1D241F; padding: 10px 16px; border-radius: var(--r-s); font-weight: 600; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--mute); }
.sm { font-size: 14px; }
.num, .mono { font-family: var(--f-m); font-feature-settings: "tnum"; letter-spacing: -.01em; }
.neg { color: var(--brick); }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- khung ---------- */
.app { display: flex; min-height: 100vh; }
.sb { position: fixed; inset: 0 auto 0 0; width: var(--sb-w); background: var(--moss); color: var(--moss-ink); display: flex; flex-direction: column; padding: 24px 16px 20px; overflow-y: auto; z-index: 20; background-image: var(--tex); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 0 8px 22px; }
.logo-img { width: 44px; height: 44px; border-radius: 11px; }
.brand b { font: 800 24px/1 var(--f-d); display: block; color: #F6F1E4; letter-spacing: -.02em; }
.brand small { font-size: 13px; opacity: .72; }
.sb-g { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; opacity: .55; padding: 14px 12px 6px; font-weight: 600; }
.sb-g.minor { padding-top: 22px; }
.sb-a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; min-height: 46px; border-radius: 8px; text-decoration: none; font-size: 15.5px; font-weight: 500; color: inherit; opacity: .86; transition: background .25s var(--e), opacity .2s; }
.sb-a:hover { background: rgba(255, 255, 255, .06); opacity: 1; }
.sb-a.on { background: var(--sun); color: #1D241F; opacity: 1; font-weight: 600; }
.sb-a em { margin-left: auto; font-style: normal; font: 600 13px var(--f-m); opacity: .8; }
.sb-a.on em { opacity: .7; }
.sb-foot { margin-top: auto; padding-top: 24px; }
.col { flex: 1; margin-left: var(--sb-w); min-width: 0; display: flex; flex-direction: column; }
.tb { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 16px; padding: 14px 40px; background: color-mix(in srgb, var(--lime) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tb-brand { display: none; }
.tb-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.me { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--moss); color: #F6F1E4; font: 700 14px var(--f-d); }
.main { padding: 16px 40px 80px; max-width: 1320px; width: 100%; outline: none; }
.main.enter { animation: enter .45s var(--e) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }

/* ---------- điều khiển ---------- */
.seg { display: inline-flex; background: var(--paper-2); border-radius: 9px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 8px 14px; min-height: 40px; border-radius: 6px; font-size: 15px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background .2s var(--e), color .2s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"], .seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.seg.wide { display: flex; } .seg.wide button { flex: 1; justify-content: center; }
.seg.lang button { padding: 8px 10px; }
.ib { width: 44px; height: 44px; border: 0; border-radius: 9px; background: transparent; display: grid; place-items: center; color: var(--ink-2); transition: background .2s, transform .15s var(--e); }
.ib:hover { background: var(--paper-2); color: var(--ink); }
.ib.on { color: var(--moss-2); background: var(--paper-2); }
[data-theme="dark"] .ib.on { color: var(--sun); }
.ib:active, .btn:active, .rcard:active, .kt:active { transform: scale(.97); }
.search { position: relative; flex: 1; max-width: 420px; display: flex; align-items: center; gap: 10px; background: var(--paper); border-radius: 10px; padding: 0 14px; min-height: 46px; color: var(--mute); }
.search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 15.5px; color: var(--ink); min-width: 0; }
.search:focus-within { box-shadow: 0 0 0 2px var(--sun); }
.sr-res { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--paper); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(20, 30, 20, .28); padding: 8px; z-index: 30; }
.sr-i { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.sr-i:hover, .sr-i.on { background: var(--paper-2); }
.sr-i img { width: 56px; height: 44px; object-fit: cover; border-radius: 6px; }
.sr-i span:first-of-type { flex: 1; display: flex; flex-direction: column; } .sr-i small { color: var(--mute); font-size: 13.5px; }
.sr-none { padding: 14px; color: var(--mute); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 9px; border: 0; font-weight: 600; font-size: 15.5px; text-decoration: none; transition: transform .15s var(--e), background .2s, box-shadow .2s; white-space: nowrap; }
.btn-acc { background: var(--sun); color: #1D241F; }
.btn-acc:hover { background: var(--sun-2); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-line:hover { background: var(--paper-2); }
.btn-clay { background: var(--brick); color: #fff; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14.5px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: progress; }
.lnk { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 8px 0; min-height: 40px; color: var(--moss-2); font-weight: 600; text-decoration: none; font-size: 15px; }
[data-theme="dark"] .lnk { color: var(--sun); }
.lnk:hover { text-decoration: underline; text-underline-offset: 4px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* nhãn kiểu bảng hiệu sơn tay */
.stamp { display: inline-flex; align-items: center; gap: 10px; font: 700 13px/1 var(--f-d); letter-spacing: .12em; text-transform: uppercase; color: var(--moss-2); margin-bottom: 14px; }
.stamp::before { content: ""; width: 22px; height: 3px; background: var(--sun); border-radius: 2px; }
[data-theme="dark"] .stamp { color: var(--sun); }

/* ---------- đầu trang ---------- */
.ph-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: 20px 0 32px; }
.ph-h h1 { font-size: clamp(30px, 3.4vw, 42px); font-weight: 800; }
.ph-h p.muted { margin-top: 8px; max-width: 60ch; font-size: 16px; }
.ph-a { display: flex; gap: 12px; flex-wrap: wrap; }
.crumb a { display: inline-flex; align-items: center; gap: 6px; color: var(--mute); text-decoration: none; font-size: 15px; padding: 8px 0; min-height: 44px; }
.crumb a:hover { color: var(--ink); }

/* ---------- thẻ ---------- */
.card { background: var(--paper); border-radius: 14px; padding: 28px; }
.card.flush { padding: 8px; }
.card h2 { font-size: 22px; }
.ch { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.ch p.muted { font-size: 15px; margin-top: 4px; }
[data-in] { opacity: 0; transform: translateY(16px); transition: opacity .55s var(--e), transform .55s var(--e); }
[data-in].in { opacity: 1; transform: none; }
.reveal { clip-path: inset(0 0 100% 0); transition: clip-path .9s var(--e) .1s; }
.in .reveal, .reveal.in { clip-path: inset(0 0 0 0); }

/* ---------- tổng quan ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: stretch; margin: 12px 0 32px; }
.hero-tx { padding: 24px 0; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { font-size: clamp(34px, 3.8vw, 48px); font-weight: 800; letter-spacing: -.025em; }
.big { display: flex; align-items: flex-end; gap: 16px; margin: 28px 0 32px; }
.big b { font: 800 clamp(56px, 6.4vw, 88px)/.9 var(--f-d); letter-spacing: -.04em; color: var(--moss); }
[data-theme="dark"] .big b { color: var(--ink); }
.big span { font-size: 17px; font-weight: 500; padding-bottom: 6px; display: flex; flex-direction: column; color: var(--ink-2); }
.big small { color: var(--mute); font-size: 15px; font-weight: 400; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-ph { position: relative; border-radius: 16px; overflow: hidden; min-height: 400px; background: var(--paper-2); }
.hero-ph img { position: absolute; inset: -6% 0; width: 100%; height: 112%; object-fit: cover; transform: scale(1.08); will-change: transform; }
.hero-ph .cap, .mt-ph figcaption { position: absolute; left: 16px; bottom: 16px; background: rgba(20, 26, 20, .72); color: #F3EEE2; font-size: 13.5px; padding: 6px 12px; border-radius: 6px; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 32px; }
.kpi { background: var(--paper); border-radius: 14px; padding: 26px 28px; }
.kl { font-size: 15px; color: var(--mute); font-weight: 500; }
.kv { margin: 6px 0 4px; }
.kv b { font: 700 40px/1.1 var(--f-d); letter-spacing: -.03em; }
.kv span { font-size: 18px; color: var(--mute); }
.kv.xl b { font-size: clamp(48px, 5vw, 64px); }
.ks { font-size: 14.5px; color: var(--mute); }

.dash-a { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; margin-bottom: 24px; }
.dash-b { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; margin-bottom: 24px; }
.todo-l { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.todo-l a { display: flex; align-items: center; gap: 16px; padding: 12px; margin: 0 -12px; border-radius: 10px; text-decoration: none; transition: background .2s; }
.todo-l a:hover { background: var(--paper-2); }
.todo-l img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.todo-l .tx { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.todo-l b { font-weight: 600; font-size: 16px; }
.todo-l small { color: var(--mute); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-l .ic { color: var(--mute); }
.bldgs { display: grid; gap: 16px; }
.bcard { position: relative; display: flex; gap: 18px; align-items: center; background: var(--paper); border-radius: 14px; padding: 12px; text-decoration: none; overflow: hidden; transform: perspective(800px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transition: transform .35s var(--e), opacity .3s; }
.bcard.dim { opacity: .55; }
.bc-ph { width: 128px; height: 96px; border-radius: 9px; overflow: hidden; flex: none; }
.bc-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--e); }
.bcard:hover .bc-ph img { transform: scale(1.06); }
.bc-tx { flex: 1; display: flex; flex-direction: column; gap: 4px; padding-right: 8px; }
.bc-tx b { font: 700 20px var(--f-d); }
.bc-tx small { color: var(--mute); font-size: 14.5px; }
.shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%); background-size: 250% 100%; background-position: calc(var(--gx, 0%) * -1 + 150%) 0; opacity: 0; transition: opacity .3s; }
.tilt:hover .shine { opacity: 1; }
.bar-o { height: 8px; border-radius: 4px; background: var(--paper-2); overflow: hidden; margin-top: 6px; }
.bar-o.big { height: 12px; border-radius: 6px; }
.bar-o i { display: block; height: 100%; background: var(--st-rented); border-radius: inherit; transition: width .9s var(--e); }
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.plist a, .plist .pl-i { display: flex; align-items: center; gap: 14px; padding: 10px; margin: 0 -10px; border-radius: 10px; text-decoration: none; }
.plist a:hover { background: var(--paper-2); }
.plist img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; flex: none; }
.plist span:not(.pill):not(.due):not(.num) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.plist b { font-weight: 600; } .plist small { color: var(--mute); font-size: 14px; }
.due { text-align: right; font: 600 16px var(--f-m); display: flex; flex-direction: column; }
.due small { font: 400 13.5px var(--f-b); color: var(--st-debt); }

/* biểu đồ */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .ax { font: 500 13px var(--f-b); fill: var(--mute); }
.chart .bl { font: 700 14px var(--f-m); fill: var(--ink); }
.chart .bar rect { fill: color-mix(in srgb, var(--st-rented) 40%, var(--paper-2)); transform-box: fill-box; transform-origin: bottom; animation: grow .7s var(--e) both; animation-delay: calc(var(--i) * 40ms); }
.chart .bar.cur rect { fill: var(--moss-2); }
[data-theme="dark"] .chart .bar.cur rect { fill: var(--sun); }
.chart .bar:hover rect { fill: var(--st-rented); }
@keyframes grow { from { transform: scaleY(0); } }
.lc .ll { fill: none; stroke: var(--moss-2); stroke-width: 3; stroke-linejoin: round; }
[data-theme="dark"] .lc .ll { stroke: var(--sun); }
.lc .la { fill: color-mix(in srgb, var(--st-rented) 14%, transparent); }
.lc .ld { fill: var(--sun); stroke: var(--paper); stroke-width: 3; }

/* trạng thái */
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.p-rented, .i-paid, .p-is-done { color: var(--st-rented); background: color-mix(in srgb, var(--st-rented) 14%, transparent); }
.p-expiring, .i-pending, .p-is-assigned { color: #8A5D00; background: color-mix(in srgb, var(--st-expiring) 22%, transparent); }
[data-theme="dark"] .p-expiring, [data-theme="dark"] .i-pending, [data-theme="dark"] .p-is-assigned { color: var(--st-expiring); }
.p-debt, .i-overdue, .p-is-new { color: var(--brick); background: color-mix(in srgb, var(--st-debt) 14%, transparent); }
.p-vacant, .i-draft { color: var(--mute); }
.p-vacant i { background: var(--st-vacant); box-shadow: inset 0 0 0 1.5px var(--mute); }
.i-sent { color: var(--ink-2); }
.k-rented { --k: var(--st-rented); } .k-expiring { --k: var(--st-expiring); } .k-debt { --k: var(--st-debt); } .k-vacant { --k: var(--st-vacant); }

/* ---------- sơ đồ toà ---------- */
.map-w { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr); gap: 24px; align-items: start; }
.stage3d { position: relative; height: min(680px, 74vh); min-height: 460px; border-radius: 16px; overflow: hidden; background: var(--stage); }
.stage3d .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .8s var(--e); }
.stage3d.ready .poster, .stage3d.ready .st-load { opacity: 0; pointer-events: none; }
.stage3d.no3d .st-load { display: none; }
.cv3d { position: absolute; inset: 0; width: 100% !important; height: 100% !important; touch-action: pan-y; cursor: grab; }
.st-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(20, 26, 20, .78); color: #F3EEE2; padding: 12px 18px; border-radius: 10px; display: flex; gap: 10px; align-items: center; font-size: 15px; transition: opacity .4s; }
.st-load span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: sp .7s linear infinite; }
.st-hint { position: absolute; left: 20px; top: 18px; display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); background: color-mix(in srgb, var(--paper) 86%, transparent); padding: 8px 12px; border-radius: 8px; }
.st-tip { position: absolute; transform: translate(-50%, calc(-100% - 14px)); background: var(--paper); padding: 10px 14px; border-radius: 10px; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .3); pointer-events: none; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; max-width: 240px; font-size: 15px; z-index: 2; }
.st-tip small { width: 100%; color: var(--mute); font-size: 14px; }
.legend3d { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.legend3d .lg { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--paper) 92%, transparent); font-size: 14.5px; font-weight: 500; transition: background .2s, transform .15s var(--e); }
.legend3d .lg i { width: 12px; height: 12px; border-radius: 3px; background: var(--k); }
.legend3d .lg b { font-family: var(--f-m); }
.legend3d .lg.on { background: var(--ink); color: var(--paper); }
.floor-p { background: var(--paper); border-radius: 16px; padding: 24px; }
.fl-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.fl-tabs button { border: 0; background: var(--paper-2); border-radius: 10px; padding: 8px 12px; min-width: 56px; min-height: 56px; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: background .2s, transform .15s var(--e); }
.fl-tabs button b { font: 700 18px var(--f-d); }
.fl-tabs button span { display: flex; gap: 3px; }
.fl-tabs button span i { width: 7px; height: 7px; border-radius: 2px; background: var(--k); }
.fl-tabs button[aria-selected="true"] { background: var(--moss); color: #F6F1E4; }
[data-theme="dark"] .fl-tabs button[aria-selected="true"] { background: var(--sun); color: #1D241F; }
.fl-h { font-size: 24px; display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.fl-h small { font: 500 15px var(--f-b); color: var(--mute); }
.fl-rooms { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rcard { border: 0; padding: 0; background: transparent; text-align: left; display: flex; flex-direction: column; gap: 10px; transition: opacity .3s, transform .15s var(--e); }
.rcard.dim { opacity: .35; }
.rcard .ph { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; }
.rcard .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--e); }
.rcard:hover .ph img { transform: scale(1.05); }
.tag { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 7px; background: var(--paper); padding: 4px 10px 4px 8px; border-radius: 6px; font: 700 15px var(--f-m); }
.tag i { width: 10px; height: 10px; border-radius: 50%; background: var(--k); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--line); }
.rcard .tx { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.rcard .tx b { font-weight: 600; font-size: 15.5px; }
.rcard .tx small { color: var(--mute); font-size: 13.5px; }

/* ngăn kéo / hộp thoại */
.ov { position: fixed; inset: 0; z-index: 50; display: flex; }
.ov-bg { position: absolute; inset: 0; background: rgba(15, 20, 15, .48); opacity: 0; transition: opacity .35s var(--e); }
.ov.on .ov-bg { opacity: 1; }
.ov-p { position: relative; background: var(--paper); display: flex; flex-direction: column; max-height: 100%; outline: none; }
.ov-modal { align-items: center; justify-content: center; padding: 24px; }
.ov-modal .ov-p { width: min(560px, 100%); max-height: calc(100vh - 48px); border-radius: 16px; transform: translateY(18px) scale(.98); opacity: 0; transition: transform .4s var(--e), opacity .3s; }
.ov-modal.wide .ov-p { width: min(980px, 100%); }
.ov-modal.on .ov-p { transform: none; opacity: 1; }
.ov-drawer { justify-content: flex-end; }
.ov-drawer .ov-p { width: min(520px, 100%); height: 100%; transform: translateX(100%); transition: transform .45s var(--e); }
.ov-drawer.on .ov-p { transform: none; }
.ov-h { display: flex; align-items: flex-start; gap: 12px; padding: 24px 28px 16px; }
.ov-t { flex: 1; } .ov-t h2 { font-size: 24px; } .ov-t p { color: var(--mute); font-size: 15px; margin-top: 4px; }
.ov-b { padding: 4px 28px 24px; overflow-y: auto; flex: 1; }
.ov-f { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 28px 24px; flex-wrap: wrap; }
.ov-b > p { margin-bottom: 14px; }
.rd-ph { position: relative; margin: 0 0 24px; border-radius: 12px; overflow: hidden; aspect-ratio: 16/10; }
.rd-ph img { width: 100%; height: 100%; object-fit: cover; }
.rd-ph .pill { position: absolute; left: 12px; top: 12px; background: var(--paper); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 24px; }
.facts dt { font-size: 13.5px; color: var(--mute); }
.facts dd { margin: 2px 0 0; font: 700 18px var(--f-d); }
.facts dd.sm { font: 500 15px var(--f-b); }
.facts dd small { font: 400 14px var(--f-b); color: var(--mute); }
.rd-s { padding: 20px 0; border-top: 1px solid var(--line); }
.rd-s h3 { font-size: 17px; margin-bottom: 12px; }
.rd-s.vac p { color: var(--ink-2); }
.person { display: flex; gap: 14px; align-items: center; }
.person > div { display: flex; flex-direction: column; } .person small { color: var(--mute); font-size: 14px; }
.av { width: 52px; height: 52px; border-radius: 50%; background: var(--moss); color: #F6F1E4; display: grid; place-items: center; font: 700 17px var(--f-d); flex: none; }
.av.sm { width: 30px; height: 30px; font-size: 12.5px; display: inline-grid; vertical-align: middle; margin-right: 6px; }
.rd-line { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; } .rd-line > span { flex: 1; }
.rd-line .ic { color: var(--mute); }
.warn { font-style: normal; color: #8A5D00; font-weight: 600; } [data-theme="dark"] .warn { color: var(--st-expiring); }
.mini-inv { list-style: none; margin: 0; padding: 0; }
.mini-inv button { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; padding: 12px 8px; margin: 0 -8px; border-radius: 8px; text-align: left; min-height: 52px; }
.mini-inv button:hover { background: var(--paper-2); }
.mini-inv span:first-child { flex: 1; }
.meters2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.meters2 p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } .meters2 b { font-size: 20px; } .meters2 small { width: 100%; color: var(--mute); font-size: 14px; }

/* hồ sơ phòng */
.room-g { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.gal { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gal figure { margin: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; }
.gal .g-main { grid-column: 1 / -1; aspect-ratio: 16/10; }
.gal img { width: 100%; height: 100%; object-fit: cover; }
.room-info .rd-s:first-of-type { border-top: 0; }

/* danh sách */
.toolbar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { border: 0; background: var(--paper); border-radius: 999px; padding: 0 16px; min-height: 44px; font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); transition: background .2s, color .2s; }
.chips button span { font: 600 13.5px var(--f-m); color: var(--mute); }
.chips button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.chips button[aria-selected="true"] span { color: inherit; opacity: .7; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--k); }
.tl-r { display: flex; gap: 12px; flex-wrap: wrap; }
.field-s { display: flex; align-items: center; gap: 8px; background: var(--paper); border-radius: 10px; padding: 0 14px; min-height: 46px; color: var(--mute); }
.field-s input { border: 0; background: transparent; outline: none; font-size: 15.5px; color: var(--ink); width: 220px; }
.field-s:focus-within, .sel:focus-within { box-shadow: 0 0 0 2px var(--sun); }
.sel select { appearance: none; border: 0; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366706A' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px; border-radius: 10px; padding: 0 40px 0 14px; min-height: 46px; font-size: 15.5px; outline: none; }
.rlist { list-style: none; margin: 0; padding: 0; }
.rrow { width: 100%; display: grid; grid-template-columns: 72px minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, .8fr) 140px; gap: 20px; align-items: center; padding: 12px 16px; min-height: 88px; border: 0; background: transparent; text-align: left; text-decoration: none; border-radius: 10px; transition: background .2s; }
.rrow:hover { background: var(--paper-2); }
.rlist li + li .rrow { position: relative; }
.rlist li + li { border-top: 1px solid var(--line); }
.rrow img { width: 72px; height: 60px; object-fit: cover; border-radius: 8px; }
.rrow span { display: flex; flex-direction: column; min-width: 0; }
.rrow b { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrow small { color: var(--mute); font-size: 14px; }
.rrow .c3 { text-align: right; align-items: flex-end; font-size: 16px; font-weight: 600; }
.rrow .c3 small { font-family: var(--f-b); font-weight: 400; }
.rrow .c4 { align-items: flex-end; }
.empty { display: flex; gap: 24px; align-items: center; padding: 24px; }
.empty img { width: 160px; height: 120px; object-fit: cover; border-radius: 10px; flex: none; }
.empty b { font: 700 19px var(--f-d); display: block; margin-bottom: 4px; } .empty p { color: var(--mute); }
.ctr { text-align: center; padding-bottom: 24px; }
.skel-list { display: grid; gap: 8px; padding: 8px; }
.skel { height: 76px; border-radius: 10px; background: linear-gradient(100deg, var(--paper-2) 30%, color-mix(in srgb, var(--paper-2) 50%, var(--paper)) 50%, var(--paper-2) 70%); background-size: 300% 100%; animation: sh 1.3s linear infinite; }
@keyframes sh { from { background-position: 100% 0; } to { background-position: -50% 0; } }

/* hợp đồng */
.notice { margin-bottom: 24px; padding: 20px 24px; background: color-mix(in srgb, var(--sun) 14%, var(--paper)); }
.ntc { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ntc + .ntc { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.ntc img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; }
.ntc > div:nth-child(2) { flex: 1; min-width: 200px; } .ntc b { font-size: 17px; }
.ntc-a { display: flex; gap: 10px; }
.paper { background: #FFFDF7; color: #23281F; border-radius: 4px; padding: 36px 40px; box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 12px 30px -18px rgba(40, 30, 10, .35); background-image: repeating-linear-gradient(transparent 0 31px, rgba(36, 64, 142, .07) 31px 32px); font-size: 15px; }
[data-theme="dark"] .paper { background-color: #EDE6D4; }
.doc h3 { text-align: center; text-transform: uppercase; font-size: 21px; letter-spacing: .02em; margin: 16px 0 4px; }
.doc-k { text-align: center; font-size: 13.5px; line-height: 1.5; }
.doc-no { text-align: center; font-family: var(--f-m); font-size: 13.5px; color: #66706A; margin-bottom: 20px; }
.doc p { margin-bottom: 8px; } .doc ol { padding-left: 20px; margin: 14px 0; } .doc li { margin-bottom: 8px; }
.sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; text-align: center; }
.sigs > div { display: flex; flex-direction: column; align-items: center; min-height: 110px; }
.sigs small { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.sigs img { max-height: 80px; margin-top: 6px; }
.sig-name { font: italic 600 30px/2.2 Georgia, "Times New Roman", serif; color: var(--ink-blue); }
[data-theme="dark"] .paper .sig-name { color: #24408E; }
.sig-wait { color: #8A5D00; margin-top: 30px; font-weight: 600; }
.doc-ft { text-align: center; font-size: 13px; color: #66706A; margin-top: 16px; }
.steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 24px; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--mute); font-weight: 500; padding-right: 16px; }
.steps li span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font: 700 14px var(--f-m); }
.steps li span .ic { width: 16px; height: 16px; }
.steps li.on { color: var(--ink); } .steps li.on span { background: var(--sun); color: #1D241F; }
.steps li.done span { background: var(--st-rented); color: #fff; }
.lab { font-weight: 600; margin: 8px 0 12px; display: flex; align-items: center; gap: 8px; }
.pick-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 20px; }
.prm { display: flex; gap: 12px; align-items: center; border: 0; background: var(--paper-2); border-radius: 10px; padding: 8px; text-align: left; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .2s; }
.prm img { width: 72px; height: 56px; border-radius: 7px; object-fit: cover; }
.prm span { display: flex; flex-direction: column; } .prm small { color: var(--mute); font-size: 13.5px; }
.prm.on { box-shadow: inset 0 0 0 2px var(--sun); background: var(--paper); }
.form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.fld > span { font-weight: 600; font-size: 14.5px; }
.fld input, .fld select, .fld textarea { border: 0; background: var(--paper-2); border-radius: 9px; padding: 11px 14px; min-height: 46px; font-size: 16px; outline: none; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .2s; width: 100%; }
.fld input:focus, .fld select:focus, .fld textarea:focus { box-shadow: inset 0 0 0 2px var(--sun); }
.fld [aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--brick); }
.err { color: var(--brick); font-weight: 600; font-size: 15px; margin-top: 4px; }
.sign-g { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.sign-g .paper { padding: 28px; font-size: 14px; max-height: 60vh; overflow: auto; }
#sigpad { width: 100%; height: auto; aspect-ratio: 56/22; background: #FFFDF7; border-radius: 10px; box-shadow: inset 0 0 0 2px var(--line); touch-action: none; cursor: crosshair; background-image: linear-gradient(transparent calc(100% - 46px), rgba(36, 64, 142, .25) calc(100% - 46px), rgba(36, 64, 142, .25) calc(100% - 44px), transparent calc(100% - 44px)); }
.sig-a { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 14px; }

/* chốt điện nước */
.mt-top { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 28px; align-items: center; background: var(--paper); border-radius: 16px; padding: 16px 28px 16px 16px; margin-bottom: 24px; }
.mt-ph { margin: 0; position: relative; height: 130px; border-radius: 10px; overflow: hidden; } .mt-ph img { width: 100%; height: 100%; object-fit: cover; }
.mt-top .big { margin: 0 0 12px; } .mt-top .big b { font-size: 56px; }
.mt-list { list-style: none; margin: 0; padding: 0; }
.mt-list li { display: grid; grid-template-columns: 64px minmax(140px, 1fr) minmax(170px, 1fr) minmax(150px, .9fr) minmax(170px, 1fr); gap: 18px; align-items: center; padding: 12px 16px; min-height: 84px; border-radius: 10px; transition: background .25s; }
.mt-list li + li { border-top: 1px solid var(--line); }
.mt-list li img { width: 64px; height: 56px; object-fit: cover; border-radius: 8px; }
.mt-r { display: flex; flex-direction: column; } .mt-r b { font-size: 16px; } .mt-r small { color: var(--mute); font-size: 14px; }
.mt-in { display: flex; align-items: center; gap: 8px; background: var(--paper-2); border-radius: 9px; padding: 0 10px; min-height: 48px; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .2s; }
.mt-in:focus-within { box-shadow: inset 0 0 0 2px var(--sun); }
.mt-in .ic { color: var(--mute); width: 18px; height: 18px; }
.mt-in .old { font: 500 14px var(--f-m); color: var(--mute); white-space: nowrap; }
.mt-in input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: 600 16px var(--f-m); padding: 10px 0; color: var(--ink-blue); }
.mt-in input[disabled] { color: var(--mute); }
.mt-in input[aria-invalid="true"] { color: var(--brick); }
.mt-amt { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.mt-amt b { font-size: 16px; } .mt-amt small { color: var(--mute); font-size: 13.5px; }
.mt-list li.ok .mt-amt b { color: var(--ink); }
.mt-list li.bad { background: color-mix(in srgb, var(--brick) 8%, transparent); } .mt-list li.bad .mt-amt b { color: var(--brick); font-family: var(--f-b); font-size: 14.5px; }
.mt-list li.warn .mt-amt small { color: #8A5D00; } [data-theme="dark"] .mt-list li.warn .mt-amt small { color: var(--st-expiring); }
.mt-foot { position: sticky; bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--moss); color: var(--moss-ink); padding: 14px 16px 14px 24px; border-radius: 14px; margin-top: 24px; flex-wrap: wrap; }
.mt-foot .muted { color: inherit; opacity: .8; }

/* hoá đơn */
.bill-sum { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; margin-bottom: 28px; }
.bs-main { background: var(--paper); border-radius: 16px; padding: 28px; }
.bs-main .kv b { font-size: clamp(44px, 4.6vw, 60px); }
.bs-side { display: grid; gap: 16px; }
.bs-od { background: var(--paper); border-radius: 14px; padding: 20px 24px; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; }
.bs-od b { font: 700 19px var(--f-d); } .bs-od > span { grid-row: 2; } .bs-od .btn { grid-row: 1 / 3; grid-column: 2; }
.inv-g { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.receipt { position: relative; padding: 30px 30px 40px; border-radius: 4px 4px 0 0; -webkit-mask: radial-gradient(circle 7px at 50% 100%, transparent 98%, #000) 0 0 / 18px 100% repeat-x; mask: radial-gradient(circle 7px at 50% 100%, transparent 98%, #000) 0 0 / 18px 100% repeat-x; }
.receipt header { text-align: center; border-bottom: 2px dashed rgba(35, 40, 31, .25); padding-bottom: 14px; margin-bottom: 14px; }
.rc-k { font: 700 13px var(--f-d); letter-spacing: .14em; text-transform: uppercase; color: #3F5E45; }
.receipt h3 { font-size: 22px; text-transform: uppercase; margin: 6px 0 2px; }
.rc-n { font: 500 13.5px var(--f-m); color: #66706A; }
.rc-to { margin-bottom: 10px; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: 9px 0; vertical-align: top; border-bottom: 1px dotted rgba(35, 40, 31, .25); }
.receipt td.num { text-align: right; color: #24408E; font-weight: 600; white-space: nowrap; padding-left: 12px; }
.receipt tfoot td { border: 0; padding-top: 14px; font: 700 17px var(--f-d); }
.receipt tfoot td.num { font: 700 20px var(--f-m); }
.receipt details { font-size: 13.5px; color: #47524A; margin-top: 4px; }
.receipt summary { cursor: pointer; color: #3F5E45; font-weight: 600; min-height: 28px; }
.receipt details ul { margin: 4px 0 0; padding-left: 18px; font-family: var(--f-m); font-size: 13px; }
.rc-due { margin-top: 8px; }
.rc-stamp { position: absolute; right: 22px; top: 64px; transform: rotate(-12deg); border: 3px solid #B0532F; color: #B0532F; padding: 4px 14px; border-radius: 8px; font: 800 22px var(--f-d); text-transform: uppercase; display: flex; flex-direction: column; align-items: center; line-height: 1.1; opacity: .85; }
.rc-stamp small { font: 600 13px var(--f-m); }
.zalo .lab .ic { color: #0068FF; }
.z-phone { background: var(--paper-2); border-radius: 14px; overflow: hidden; margin-bottom: 10px; }
.z-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #0068FF; color: #fff; font-weight: 600; }
.z-head .av { width: 34px; height: 34px; font-size: 13px; background: rgba(255, 255, 255, .2); }
.z-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.z-meta { font-size: 13px; color: var(--mute); align-self: center; }
.z-bub { width: 90%; border: 0; background: #D6E7FF; color: #102040; border-radius: 14px 14px 4px 14px; padding: 12px 14px; font-size: 15px; line-height: 1.5; resize: vertical; outline: none; }
.z-bub:focus { box-shadow: 0 0 0 2px var(--sun); }
.z-card { width: 90%; display: flex; gap: 10px; align-items: center; background: var(--paper); border-radius: 12px; padding: 8px; }
.z-card img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; } .z-card span { display: flex; flex-direction: column; } .z-card small { color: var(--mute); font-size: 13.5px; }
.paid-n { display: flex; flex-direction: column; gap: 14px; } .paid-n img { border-radius: 12px; aspect-ratio: 16/10; object-fit: cover; }

/* sự cố */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(280px, 1fr)); gap: 20px; align-items: start; }
.kcol { background: var(--paper-2); border-radius: 16px; padding: 16px; min-height: 300px; }
[data-theme="dark"] .kcol { background: var(--paper); }
.kcol h2 { font-size: 19px; padding: 4px 6px 14px; display: flex; align-items: center; gap: 10px; }
.kcol h2 span { font: 600 14px var(--f-m); background: var(--paper); border-radius: 999px; padding: 2px 10px; color: var(--mute); }
[data-theme="dark"] .kcol h2 span { background: var(--paper-2); }
.kdrop { display: grid; gap: 14px; min-height: 160px; border-radius: 12px; transition: background .2s, box-shadow .2s; }
.kdrop.over { background: color-mix(in srgb, var(--sun) 14%, transparent); box-shadow: inset 0 0 0 2px var(--sun); }
.kcard { background: var(--paper); border-radius: 12px; overflow: hidden; cursor: grab; transition: transform .25s var(--e), box-shadow .25s; }
[data-theme="dark"] .kcard { background: var(--paper-2); }
.kcard:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(0, 0, 0, .4); }
.kcard.drag { opacity: .5; transform: rotate(2deg); }
.kcard > img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.kc-b { padding: 16px 18px 18px; }
.kc-m { font-size: 13.5px; color: var(--mute); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cat { font-weight: 700; color: var(--ink-2); background: var(--paper-2); padding: 2px 8px; border-radius: 5px; }
[data-theme="dark"] .cat { background: var(--paper); }
.kc-b h3 { font-size: 17.5px; margin: 8px 0 6px; }
.kc-d { font-size: 14.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kc-f { font-size: 14px; color: var(--mute); margin: 12px 0; display: flex; align-items: center; flex-wrap: wrap; }
.kempty { text-align: center; color: var(--mute); padding: 8px; } .kempty img { border-radius: 10px; aspect-ratio: 16/9; object-fit: cover; opacity: .7; margin-bottom: 10px; filter: saturate(.6); }
.techs { display: grid; gap: 10px; margin-bottom: 18px; }
.tech { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--paper-2); cursor: pointer; box-shadow: inset 0 0 0 2px transparent; }
.tech:has(input:checked) { box-shadow: inset 0 0 0 2px var(--sun); background: var(--paper); }
.tech input { accent-color: var(--moss); width: 18px; height: 18px; }
.tech > span:last-child { display: flex; flex-direction: column; } .tech small { color: var(--mute); font-size: 13.5px; }
.pics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pic { cursor: pointer; border-radius: 9px; overflow: hidden; box-shadow: inset 0 0 0 3px transparent; position: relative; }
.pic input { position: absolute; opacity: 0; } .pic img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.pic:has(input:checked) { outline: 3px solid var(--sun); outline-offset: -3px; }
.pic:has(input:focus-visible) { outline: 3px solid var(--ink); }

/* dòng tiền */
.money-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: center; background: var(--paper); border-radius: 16px; padding: 16px 16px 16px 32px; margin-bottom: 24px; }
.money-hero figure { margin: 0; position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; }
.money-hero img { width: 100%; height: 100%; object-fit: cover; }
.money-hero figcaption { position: absolute; left: 12px; right: 12px; bottom: 12px; background: rgba(20, 26, 20, .72); color: #F3EEE2; font-size: 14px; padding: 8px 12px; border-radius: 8px; }
.bybar { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.bybar li { display: flex; gap: 16px; align-items: center; }
.bybar img { width: 72px; height: 60px; border-radius: 8px; object-fit: cover; }
.bybar li > div { flex: 1; } .bybar p { display: flex; justify-content: space-between; } .bybar small { color: var(--mute); font-size: 14px; }
.exp { list-style: none; padding: 0; margin: 0; }
.exp li { display: flex; align-items: center; gap: 14px; padding: 12px 0; min-height: 60px; }
.exp li + li { border-top: 1px solid var(--line); }
.exp li > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; } .exp small { color: var(--mute); font-size: 14px; }
.ecat { width: 42px; height: 42px; border-radius: 10px; background: var(--paper-2); display: grid; place-items: center; color: var(--ink-2); }

/* app người thuê */
.ten-w { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; align-items: center; padding: 16px 0 24px; }
.ten-copy h1 { font-size: clamp(34px, 3.6vw, 48px); font-weight: 800; letter-spacing: -.025em; }
.lede { font-size: 18px; color: var(--ink-2); margin: 18px 0 28px; max-width: 56ch; line-height: 1.65; }
.ten-pts { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 18px; }
.ten-pts li { display: flex; gap: 14px; } .ten-pts .ic { width: 26px; height: 26px; color: var(--moss-2); margin-top: 2px; }
[data-theme="dark"] .ten-pts .ic { color: var(--sun); }
.ten-pts span { display: flex; flex-direction: column; color: var(--ink-2); } .ten-pts b { color: var(--ink); font-size: 17px; }
.phone { position: relative; width: 400px; height: 820px; max-height: calc(100vh - 120px); min-height: 640px; background: #121612; border-radius: 52px; padding: 14px; box-shadow: 0 40px 80px -40px rgba(20, 30, 20, .55), inset 0 0 0 2px #2b302b; display: flex; flex-direction: column; }
.ph-notch { position: absolute; top: 24px; left: 50%; width: 110px; height: 30px; margin-left: -55px; background: #000; border-radius: 20px; z-index: 3; }
.ph-scr { flex: 1; background: var(--lime) var(--tex); border-radius: 40px 40px 0 0; overflow-y: auto; overflow-x: hidden; padding: 0 0 20px; scrollbar-width: none; }
.ph-scr.slide { animation: slide .4s var(--e); }
@keyframes slide { from { opacity: 0; transform: translateX(18px); } }
.ph-nav { display: flex; background: var(--paper); border-radius: 0 0 40px 40px; padding: 8px 12px 18px; }
.ph-nav button { flex: 1; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; color: var(--mute); padding: 6px 0; min-height: 52px; }
.ph-nav button[aria-current="page"] { color: var(--ink); font-weight: 600; }
.ph-nav button[aria-current="page"] .ic { color: var(--moss-2); } [data-theme="dark"] .ph-nav button[aria-current="page"] .ic { color: var(--sun); }
.ts-hero { position: relative; height: 230px; }
.ts-hero img { width: 100%; height: 100%; object-fit: cover; }
.ts-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(15, 20, 15, .78)); }
.ts-hero div { position: absolute; left: 20px; bottom: 36px; color: #fff; z-index: 1; }
.ts-hero small { font-size: 13.5px; opacity: .85; } .ts-hero h2 { font-size: 30px; font-weight: 800; }
.ts-bill { margin: -24px 16px 16px; position: relative; z-index: 2; width: calc(100% - 32px); border: 0; text-align: left; background: var(--paper); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .4); }
.ts-bill small { color: var(--mute); font-size: 14px; } .ts-bill b { font-size: 30px; font-weight: 700; }
.ts-bill span { font-weight: 600; color: var(--moss-2); font-size: 15px; }
.ts-bill.s-overdue span { color: var(--brick); } .ts-bill.s-pending span { color: #8A5D00; }
[data-theme="dark"] .ts-bill span { color: var(--sun); }
.ts-note { margin: 0 16px 16px; display: flex; gap: 12px; background: color-mix(in srgb, var(--sun) 16%, var(--paper)); border-radius: 14px; padding: 14px 16px; font-size: 14.5px; }
.ts-note b { display: block; } .ts-note .ic { color: #8A5D00; margin-top: 2px; }
.ts-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 16px 18px; }
.ts-tiles button { border: 0; padding: 0; background: var(--paper); border-radius: 12px; overflow: hidden; text-align: left; font-size: 13.5px; font-weight: 600; }
.ts-tiles img { aspect-ratio: 1; object-fit: cover; width: 100%; } .ts-tiles span { display: block; padding: 8px 10px 10px; }
.ts-lab { font-weight: 700; font-size: 15px; margin: 8px 16px 10px; }
.ts-form .ts-lab { margin: 8px 0 10px; }
.ts-iss { list-style: none; padding: 0; margin: 0 16px; display: grid; gap: 8px; }
.ts-iss li { display: flex; gap: 10px; align-items: center; background: var(--paper); border-radius: 12px; padding: 8px; }
.ts-iss img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.ts-iss span:nth-child(2) { flex: 1; display: flex; flex-direction: column; font-size: 14px; min-width: 0; } .ts-iss small { color: var(--mute); font-size: 13px; }
.ts-iss .pill { font-size: 13px; padding: 4px 8px; }
.ts-h { display: flex; align-items: center; gap: 4px; padding: 56px 12px 12px; position: sticky; top: 0; background: color-mix(in srgb, var(--lime) 92%, transparent); z-index: 2; backdrop-filter: blur(8px); }
.ts-h h2 { font-size: 21px; padding-left: 6px; }
.ts-pad { padding: 0 16px; }
.ts-pad .receipt { padding: 22px 18px 34px; font-size: 14px; }
.ts-pad .receipt h3 { font-size: 18px; }
.ts-act { padding: 16px; }
.ts-wait, .ts-warn, .ts-ok { margin: 14px 16px; display: flex; gap: 10px; background: var(--paper); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.ts-pad .ts-wait, .ts-pad .ts-warn, .ts-pad .ts-ok { margin: 14px 0; }
.ts-warn { color: #8A5D00; } [data-theme="dark"] .ts-warn { color: var(--st-expiring); }
.ts-ok { color: var(--st-rented); }
.ts-qr { padding: 0 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.qr-box { background: #fff; padding: 16px; border-radius: 16px; color: #14201A; width: 240px; }
.qr { width: 100%; height: auto; }
.qr-amt { font-size: 28px; font-weight: 700; }
.ts-qr dl { width: 100%; margin: 0; background: var(--paper); border-radius: 12px; padding: 6px 14px; text-align: left; }
.ts-qr dl div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; }
.ts-qr dl div + div { border-top: 1px solid var(--line); }
.ts-qr dt { color: var(--mute); } .ts-qr dd { margin: 0; font-weight: 600; text-align: right; }
.ts-done { padding: 64px 22px 20px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.ts-done img { width: 100%; border-radius: 16px; aspect-ratio: 4/3; object-fit: cover; }
.ts-done h2 { font-size: 26px; } .ts-done p { color: var(--ink-2); }
.ts-form { padding: 0 16px; }
.ts-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ts-chips button { border: 0; background: var(--paper); border-radius: 999px; padding: 0 14px; min-height: 44px; font-size: 14.5px; font-weight: 500; }
.ts-chips button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.ts-form .fld textarea, .ts-pad .fld input { background: var(--paper); }
.ts-photo { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.ts-photo img { width: 120px; height: 96px; border-radius: 10px; object-fit: cover; }
.ts-photo label { cursor: pointer; } .ts-photo label:focus-within { outline: 3px solid var(--sun); }
.ts-samples { display: flex; gap: 8px; margin-bottom: 16px; }
.ts-samples button { border: 0; padding: 0; border-radius: 8px; overflow: hidden; width: 52px; height: 52px; opacity: .7; }
.ts-samples button[aria-pressed="true"] { opacity: 1; outline: 3px solid var(--sun); outline-offset: -3px; }
.ts-samples img { width: 100%; height: 100%; object-fit: cover; }
.ts-rules { list-style: none; counter-reset: r; padding: 0 16px; margin: 0 0 16px; display: grid; gap: 10px; }
.ts-rules li { counter-increment: r; background: var(--paper); border-radius: 12px; padding: 14px 16px 14px 52px; position: relative; display: flex; flex-direction: column; font-size: 14.5px; }
.ts-rules li::before { content: counter(r); position: absolute; left: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--moss); color: #F6F1E4; display: grid; place-items: center; font: 700 13px var(--f-m); }
.ts-rules span { color: var(--ink-2); }
.ts-fig { margin: 0 16px; border-radius: 14px; overflow: hidden; background: var(--paper); }
.ts-fig figcaption { padding: 10px 14px; font-size: 14px; color: var(--ink-2); }
.ts-lease { display: flex; gap: 12px; background: var(--paper); border-radius: 14px; padding: 10px; align-items: center; margin-top: 4px; }
.ts-lease img { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; }
.ts-lease div { display: flex; flex-direction: column; font-size: 14px; } .ts-lease small { font-family: var(--f-m); color: var(--mute); font-size: 13px; } .ts-lease b { font-size: 15.5px; }
.ts-row { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: var(--paper); border-radius: 12px; padding: 0 14px; min-height: 52px; margin-top: 16px; font-weight: 600; }
.ts-row .ic:last-child { margin-left: auto; color: var(--mute); }
.ts-p { padding: 16px; }

/* thêm, cài đặt */
.more-g { display: grid; gap: 8px; margin-bottom: 32px; }
.more-a { display: flex; align-items: center; gap: 14px; background: var(--paper); border-radius: 12px; padding: 0 18px; min-height: 60px; text-decoration: none; font-weight: 500; font-size: 16px; }
.more-a em { font-style: normal; font: 600 13.5px var(--f-m); color: var(--mute); margin-left: auto; }
.more-a .chev { color: var(--mute); } .more-a em + .chev { margin-left: 8px; } .more-a span + .chev { margin-left: auto; }
.set-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; margin-bottom: 32px; }
.set-g h2 { margin-bottom: 18px; }
.set-r { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; flex-wrap: wrap; }
.set-r + .set-r { border-top: 1px solid var(--line); }
.rate { width: 100%; border-collapse: collapse; font-size: 15px; margin-bottom: 12px; }
.rate td { padding: 9px 0; border-bottom: 1px solid var(--line); } .rate td.num { text-align: right; }
.set-g .btn { margin-top: 14px; }

/* concept */
.concept { font-size: 13.5px; line-height: 1.55; }
.concept p + p { margin-top: 8px; }
.concept a { text-underline-offset: 3px; }
.cc-sb { color: var(--moss-ink); opacity: .82; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 18px; }
.cc-sb .muted { color: inherit; opacity: .75; }
.cc-sb .cc-l a { color: var(--sun); font-weight: 600; }
.cc-more { background: var(--paper); border-radius: 14px; padding: 22px 24px; font-size: 14.5px; }
.cc-more .cc-l a { font-weight: 600; color: var(--moss-2); }
[data-theme="dark"] .cc-more .cc-l a { color: var(--sun); }

/* toast */
#toasts { position: fixed; right: 24px; bottom: 24px; z-index: 80; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast { display: flex; gap: 12px; align-items: flex-start; background: var(--ink); color: var(--paper); padding: 14px 18px; border-radius: 12px; max-width: 420px; font-size: 15px; box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .5); transform: translateY(16px) scale(.96); opacity: 0; transition: transform .45s var(--e), opacity .3s; pointer-events: auto; }
.toast.on { transform: none; opacity: 1; }
.toast .ic { color: var(--sun); margin-top: 1px; }
.toast small { opacity: .7; }
.toast.bad .ic { color: #FF9C7A; }

/* thanh dưới (điện thoại) */
.tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .tb { padding: 14px 28px; } .main { padding: 12px 28px 80px; }
  .map-w { grid-template-columns: 1fr; }
  .stage3d { height: 560px; }
  .fl-rooms { grid-template-columns: repeat(4, 1fr); }
  .rrow { grid-template-columns: 72px minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, .9fr) 130px; }
}
@media (max-width: 1100px) {
  .kanban { grid-template-columns: repeat(3, minmax(260px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .kcol { scroll-snap-align: start; }
  .ten-w { grid-template-columns: 1fr 380px; gap: 40px; }
  .phone { width: 380px; }
  .mt-list li { grid-template-columns: 64px minmax(120px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr); }
  .mt-list li .mt-amt { grid-column: 2 / -1; flex-direction: row; gap: 12px; justify-content: flex-end; align-items: baseline; }
  .inv-g, .sign-g { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
  :root { --sb-w: 0px; }
  .sb { display: none; }
  .tb { padding: 10px 20px; gap: 10px; flex-wrap: wrap; }
  .tb-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
  .tb-brand .logo-img { width: 36px; height: 36px; border-radius: 9px; }
  .tb-brand b { font: 800 20px var(--f-d); }
  .tb .scope { order: 5; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tb .scope button { flex: 1; }
  .search { order: 4; max-width: none; flex-basis: 100%; display: none; }
  .me { display: none; }
  .main { padding: 8px 20px 120px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--paper); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -1px 0 var(--line); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; font-size: 13px; color: var(--mute); min-height: 56px; justify-content: center; border-radius: 10px; position: relative; }
  .tabbar a.on { color: var(--ink); font-weight: 600; }
  .tabbar a.on .ic { color: var(--moss-2); } [data-theme="dark"] .tabbar a.on .ic { color: var(--sun); }
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .hero-ph { min-height: 260px; order: -1; }
  .hero-tx { padding: 0; }
  .dash-a, .dash-b, .room-g, .bill-sum, .money-hero { grid-template-columns: 1fr; }
  .money-hero { padding: 24px; }
  .ten-w { grid-template-columns: 1fr; justify-items: center; }
  .ten-copy { justify-self: stretch; }
  #toasts { left: 16px; right: 16px; bottom: 88px; align-items: stretch; }
}
@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .tb-r .seg.lang button { padding: 6px 8px; min-height: 36px; }
  .ib { width: 42px; height: 42px; }
  .main { padding: 4px 16px 110px; }
  .ph-h { margin: 12px 0 24px; }
  .ph-a, .ph-a .btn { width: 100%; }
  .kpis { grid-template-columns: 1fr; gap: 12px; }
  .kpi { padding: 20px 22px; }
  .kv b { font-size: 34px; }
  .card { padding: 22px 20px; }
  .card.flush { padding: 4px; }
  .bc-ph { width: 96px; height: 80px; }
  .rrow { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "i a d" "i b s"; gap: 4px 14px; padding: 12px; }
  .rrow img { grid-area: i; width: 64px; height: 64px; }
  .rrow .c1 { grid-area: a; } .rrow .c2 { grid-area: b; } .rrow .c3 { grid-area: d; font-size: 15px; } .rrow .c4 { grid-area: s; }
  .rrow .c2 b { font-weight: 500; font-size: 14.5px; }
  .rrow .c3 small { display: none; }
  .field-s, .field-s input { width: 100%; } .tl-r, .tl-r > * { width: 100%; } .sel select { width: 100%; }
  .toolbar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .chips button { flex: none; }
  .stage3d { height: 440px; min-height: 0; }
  .st-hint { display: none; }
  .legend3d { left: 10px; right: 10px; bottom: 10px; gap: 6px; } .legend3d .lg { padding: 0 10px; font-size: 13.5px; min-height: 38px; }
  .floor-p { padding: 18px; }
  .fl-rooms { grid-template-columns: 1fr 1fr; }
  .mt-top { grid-template-columns: 1fr; padding: 16px; gap: 16px; } .mt-ph { height: 140px; }
  .mt-list li { grid-template-columns: 56px 1fr; gap: 10px 12px; padding: 14px 12px; }
  .mt-list li img { width: 56px; height: 56px; }
  .mt-list li .mt-in { grid-column: 1 / -1; }
  .mt-list li .mt-amt { grid-column: 1 / -1; }
  .mt-foot { bottom: 84px; padding: 12px 12px 12px 16px; } .mt-foot .btn { width: 100%; }
  .bs-od { grid-template-columns: 1fr; } .bs-od .btn { grid-row: auto; grid-column: auto; }
  .facts { grid-template-columns: 1fr 1fr; }
  .form2 { grid-template-columns: 1fr; gap: 0; }
  .ov-modal { padding: 0; align-items: flex-end; }
  .ov-modal .ov-p, .ov-modal.wide .ov-p { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; transform: translateY(40px); }
  .ov-h { padding: 20px 20px 12px; } .ov-b { padding: 4px 20px 20px; } .ov-f { padding: 12px 20px 20px; } .ov-f .btn { flex: 1; }
  .paper { padding: 24px 18px; }
  .receipt { padding: 22px 18px 34px; }
  .empty { flex-direction: column; align-items: flex-start; } .empty img { width: 100%; height: 150px; }
  .kanban { grid-template-columns: repeat(3, 86%); margin: 0 -16px; padding: 0 16px 8px; }
  .phone { width: 100%; max-width: 400px; height: 760px; border-radius: 40px; padding: 10px; }
  .ph-scr { border-radius: 32px 32px 0 0; } .ph-nav { border-radius: 0 0 32px 32px; }
  .lede { font-size: 16.5px; }
  .ntc-a, .ntc-a .btn { width: 100%; } .ntc-a .btn { flex: 1; }
  .pics { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 400px) {
  .tb-r .seg.lang { display: none; }
  .big b { font-size: 56px; }
}

/* giảm chuyển động */
html.calm *, html.calm *::before, html.calm *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; transition-delay: 0s !important; }
html.calm [data-in] { opacity: 1; transform: none; }
html.calm .reveal { clip-path: none; }
@media print {
  .sb, .tb, .tabbar, #toasts { display: none !important; }
  .col { margin: 0; }
}
.search kbd { font: 600 12.5px var(--f-m); color: var(--mute); background: var(--paper-2); padding: 3px 7px; border-radius: 5px; }
.rrow .pill, .plist .pill, .ts-iss .pill { flex-direction: row; flex: none; }
.receipt { background-image: none; }
@media (max-width: 720px) {
  .tb .scope button { padding: 8px 10px; font-size: 14.5px; }
  .mt-foot { position: static; }
  .rrow .c1 small, .rrow .c2 small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
[data-theme="dark"] .fl-tabs button[aria-selected="true"] span i { box-shadow: 0 0 0 1.5px #1D241F; }
