/* QLNT - giao diện "Sổ trọ": xanh mực + xanh ngọc, điểm nhấn màu xoài; responsive, ưu tiên điện thoại cho khách thuê */
:root {
  --ink: #10332e;          /* thanh menu, thẻ phòng */
  --ink-2: #174640;
  --primary: #0b7a68;      /* xanh ngọc */
  --primary-600: #096656;
  --primary-ink: #ffffff;
  --primary-soft: #e3f2ee;
  --mango: #f0a43a;        /* điểm nhấn: số tiền phải trả, mục đang chọn */
  --mango-soft: #fdf1dc;
  --bg: #f1f4f2;
  --surface: #ffffff;
  --surface-2: #f6f8f7;
  --border: #e1e7e4;
  --border-strong: #cbd5d1;
  --text: #1a2622;
  --muted: #5f6e69;
  --danger: #c23b2b;       --danger-soft: #fbeae7;
  --green: #18794e;  --green-soft: #e4f4ea;
  --blue: #2457c5;   --blue-soft: #e7eefc;
  --amber: #9a5b00;  --amber-soft: #fdf1dc;
  --red: #c23b2b;    --red-soft: #fbeae7;
  --gray: #56635f;   --gray-soft: #edf1ef;
  --sidebar: var(--ink);
  --sidebar-ink: #c9ddd8;
  --line: var(--border);
  --card: var(--surface);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(16, 51, 46, .04);
  --shadow-lift: 0 10px 30px -12px rgba(16, 51, 46, .25);
  --font: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --bottom-nav: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.ico { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid rgba(11, 122, 104, .35); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Khung ứng dụng (quản lý) ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 252px; background: var(--sidebar); color: var(--sidebar-ink);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; flex: none;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 16px; color: #fff; font-weight: 600; }
.brand img { border-radius: 9px; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-text strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.brand-text small { font-size: 12.5px; font-weight: 500; color: var(--mango); overflow: hidden; text-overflow: ellipsis; }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.nav-group { font-size: 12px; font-weight: 600; color: rgba(201, 221, 216, .55); padding: 14px 10px 6px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--sidebar-ink); margin-bottom: 1px; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav a.active { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; }
.nav a.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--mango); }
.nav a.active .ico { color: var(--mango); }
.sidebar-foot { padding: 12px 20px 16px; font-size: 12px; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar-foot > div { opacity: .55; }
.lic-chip { display: block; margin-bottom: 8px; padding: 7px 10px; border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 600; text-decoration: none; color: #d6efe8; background: rgba(255,255,255,.07); }
.lic-chip:hover { background: rgba(255,255,255,.13); text-decoration: none; }
.lic-chip.lic-warn { background: #b86a00; color: #fff; }
.lic-chip.lic-urgent, .lic-chip.lic-expired { background: #b42318; color: #fff; }
.sidebar-backdrop { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 28px;
  background: rgba(241, 244, 242, .86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
.page-title { font-size: 19px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn.menu-btn { display: none; }
.user-menu { display: flex; align-items: center; gap: 6px; }
.user-menu form { margin: 0; }
.user-chip { display: flex; align-items: center; gap: 9px; color: var(--text); padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid transparent; }
.user-chip:hover { background: var(--surface); border-color: var(--border); text-decoration: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--mango); display: grid; place-items: center; font-weight: 700; flex: none; }
.user-name { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; font-size: 13.5px; }
.user-name small { color: var(--muted); font-weight: 400; font-size: 12px; }
.icon-btn { background: none; border: 0; padding: 8px; border-radius: var(--radius-sm); color: var(--muted); cursor: pointer; display: inline-flex; position: relative; }
.icon-btn:hover { background: var(--surface); color: var(--text); }
.content { padding: 24px 28px 48px; max-width: 1360px; width: 100%; }

/* Thanh tab dưới đáy (điện thoại) */
.bottom-nav { display: none; }
.filter-toggle { display: none; width: 100%; align-items: center; justify-content: space-between; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; }
.filter-toggle .badge { margin-left: 6px; }
.filter-toggle::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-right: 4px; }
form.filters:not(.collapsed) .filter-toggle { margin-bottom: 4px; }
form.filters:not(.collapsed) .filter-toggle::after { transform: rotate(-135deg); }

/* ---------- Thẻ, lưới ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card.narrow { max-width: 560px; }
.card-title { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }
.grid-2 + .card, .grid-2 + section, .grid-3 + .card { margin-top: 18px; }
.stack > * + * { margin-top: 18px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat .value { font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stat.accent { background: var(--ink); border-color: var(--ink); color: #fff; }
.stat.accent .label, .stat.accent .sub { color: rgba(255,255,255,.7); }
.stat.accent .sub a { color: var(--mango); }

.bar { height: 10px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; display: flex; }
.bar > span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.bg-green { background: var(--green); } .bg-blue { background: var(--blue); }
.bg-amber { background: var(--mango); } .bg-red { background: var(--red); } .bg-gray { background: #9aa8a3; }

/* ---------- Toolbar, bộ lọc ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar h2 { font-size: 20px; margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 18px; }
.filters .field { margin: 0; min-width: 150px; }
.filters .field.grow { flex: 1; min-width: 220px; }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; line-height: 1.3; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); border-color: #b5c2bd; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn-accent { background: var(--mango); border-color: var(--mango); color: #2b1a00; }
.btn-accent:hover { background: #e3962a; border-color: #e3962a; }
.btn-danger { color: var(--danger); border-color: #efc2bb; }
.btn-danger:hover { background: var(--danger-soft); border-color: #e6a99f; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-lg { padding: 13px 20px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--primary); padding: 0; font: inherit; cursor: pointer; }
.btn-link.danger { color: var(--danger); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }

/* ---------- Biểu mẫu ---------- */
.form { display: block; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > span { font-weight: 600; font-size: 13.5px; }
.field small { color: var(--muted); font-size: 12.5px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=month],
input[type=search], input[type=url], input[type=file], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff;
  font: inherit; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input[type=file] { padding: 8px 10px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 122, 104, .18); }
input:disabled, select:disabled { background: var(--surface-2); color: var(--muted); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 17px; height: 17px; }
textarea { min-height: 90px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.form-section { font-size: 15px; color: var(--text); margin: 22px 0 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.form-section:first-child, form > h4.form-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.check { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 10px; cursor: pointer; }
.check input { margin-top: 2px; flex: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 16px; }
.input-error { border-color: var(--red) !important; }

/* ---------- Bảng ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
.table thead th:first-child { border-top-left-radius: var(--radius-sm); }
.table thead th:last-child { border-top-right-radius: var(--radius-sm); }
.table tbody tr:hover { background: #f9fbfa; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .empty { text-align: center; color: var(--muted); padding: 32px; }

.dl { display: grid; grid-template-columns: 170px 1fr; gap: 9px 16px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; word-break: break-word; }

/* ---------- Nhãn, thông báo ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.6; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-gray { background: var(--gray-soft); color: var(--gray); }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: var(--green-soft); color: #0f4d31; border-color: #bfe3cc; }
.alert-error { background: var(--red-soft); color: #7a1d12; border-color: #f2c4bd; }
.alert-warning { background: var(--amber-soft); color: #6b3f00; border-color: #f3d9a8; }
.alert-info { background: var(--primary-soft); color: #0b4a40; border-color: #bfe0d8; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

.empty-state { text-align: center; padding: 44px 20px; }
.error-code { font-size: 52px; font-weight: 800; color: var(--primary); letter-spacing: -.03em; }

.pager { display: flex; gap: 6px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.pager a, .pager span.current { min-width: 34px; padding: 6px 11px; border: 1px solid var(--border); border-radius: 8px; text-align: center; background: var(--surface); }
.pager span.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager-total { margin-left: 8px; color: var(--muted); font-size: 13px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 14px; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 600; margin-bottom: -1px; }
.tabs a.active { color: var(--text); border-color: var(--mango); }
.tabs a:hover { text-decoration: none; color: var(--text); }

/* ---------- Phòng dạng lưới ---------- */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.room-tile { display: block; border: 1px solid var(--border); border-top-width: 4px; border-radius: var(--radius-sm); padding: 9px 11px; color: var(--text); background: var(--surface); }
.room-tile:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow-lift); }
.room-tile strong { display: block; font-size: 16px; }
.room-tile small { color: var(--muted); }
.room-tile.st-vacant { border-top-color: var(--green); }
.room-tile.st-occupied { border-top-color: var(--blue); }
.room-tile.st-reserved { border-top-color: var(--mango); }
.room-tile.st-maintenance { border-top-color: var(--red); }
.floor-row { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.floor-row:last-child { border-bottom: 0; }
.floor-name { font-weight: 600; color: var(--muted); padding-top: 8px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery figure { margin: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.gallery img { width: 100%; height: 120px; object-fit: cover; display: block; }
.gallery figcaption { padding: 6px 8px; font-size: 12px; display: flex; justify-content: space-between; gap: 6px; align-items: center; }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.list-plain li:last-child { border-bottom: 0; }

/* ---------- Đăng nhập ---------- */
.auth-body { background: var(--bg); min-height: 100vh; }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-side { background: var(--ink); color: #e3efeb; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side .auth-brand strong { color: #fff; }
.auth-side .auth-brand span { color: var(--mango); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-wrap { width: 100%; max-width: 420px; }
.auth-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.auth-brand img { border-radius: 10px; }
.auth-brand strong { display: block; font-size: 17px; }
.auth-brand span { color: var(--muted); font-size: 13px; }
.auth-main .auth-brand { display: none; }
.auth-card { padding: 28px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); border-color: transparent; }
.auth-title { font-size: 24px; letter-spacing: -.02em; }
.auth-links { text-align: center; margin: 16px 0 0; }
.auth-card .btn-primary { padding: 12px 16px; font-size: 15.5px; }

/* 2.26 – trang đăng nhập sinh động: khẩu hiệu đổi lần lượt, bảng phòng, dùng thử + hotline */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.auth-side { gap: 32px; background: radial-gradient(120% 80% at 100% 100%, #1d5149 0%, rgba(29, 81, 73, 0) 60%), var(--ink); }
.auth-pitch { max-width: 520px; }
.auth-rotator { position: relative; height: 3.6em; margin: 0; font-size: clamp(28px, 2.6vw, 40px); line-height: 1.2; letter-spacing: -.02em; color: #fff; }
.auth-rotator span { position: absolute; inset: 0 auto auto 0; max-width: 17ch; opacity: 0; animation: authSlogan 16s infinite; animation-delay: calc(var(--i) * 4s); }
@keyframes authSlogan {
  0% { opacity: 0; transform: translateY(18px); }
  3%, 22% { opacity: 1; transform: none; }
  25%, 100% { opacity: 0; transform: translateY(-14px); }
}
.auth-ticks { display: flex; gap: 6px; margin: 14px 0 30px; }
.auth-ticks i { position: relative; width: 34px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.auth-ticks i::after { content: ''; position: absolute; inset: 0; background: var(--mango); transform: scaleX(0); transform-origin: left; animation: authTick 16s linear infinite; animation-delay: calc(var(--i) * 4s); }
@keyframes authTick { 0% { transform: scaleX(0); opacity: 1; } 25% { transform: scaleX(1); opacity: 1; } 25.01%, 100% { transform: scaleX(0); opacity: 0; } }

.auth-side > :not(.auth-scenes) { position: relative; z-index: 1; }
.auth-scenes { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.auth-scenes::after { content: ''; position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(16, 51, 46, .94) 0%, rgba(16, 51, 46, .78) 34%, rgba(16, 51, 46, .18) 72%, rgba(16, 51, 46, 0) 100%),
  linear-gradient(0deg, rgba(16, 51, 46, .92) 0%, rgba(16, 51, 46, 0) 32%),
  linear-gradient(180deg, rgba(16, 51, 46, .7) 0%, rgba(16, 51, 46, 0) 22%); }
.auth-scene { position: absolute; inset: 0; background-size: cover; background-position: 70% 100%; opacity: 0; animation: authScene 16s infinite; animation-delay: calc(var(--i) * 4s - .8s); }
.auth-scene:first-child { opacity: 1; }
@keyframes authScene {
  0% { opacity: 0; transform: scale(1.04); }
  5%, 25% { opacity: 1; }
  30%, 100% { opacity: 0; transform: scale(1); }
}
.auth-cta { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
.auth-trial, .auth-hotline { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 12px 18px; border-radius: 14px; text-decoration: none; line-height: 1.3; transition: transform .15s ease, background-color .15s ease; }
.auth-trial { background: var(--mango); color: #3b2300; }
.auth-trial strong { font-size: 16px; }
.auth-trial span { font-size: 13px; font-weight: 600; }
.auth-trial span::after { content: ' ›'; }
.auth-trial:hover { transform: translateY(-2px); background: #f5b452; text-decoration: none; }
.auth-hotline { border: 1.5px solid rgba(255, 255, 255, .22); color: #fff; }
.auth-hotline span { font-size: 12.5px; color: rgba(227, 239, 235, .75); }
.auth-hotline strong { font-size: 20px; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.auth-hotline:hover { border-color: var(--mango); text-decoration: none; }
.auth-trial:focus-visible, .auth-hotline:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.auth-ver { flex-basis: 100%; opacity: .5; margin-top: 6px; }

.auth-promo { display: none; }
.auth-hotline em { display: none; }
/* Điện thoại: phần giới thiệu thành dải xanh phía trên, khung đăng nhập nổi lên ngay dưới, dùng thử + hotline ở cuối */
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; min-height: 100vh; align-content: start; }
  .auth-side { display: flex; justify-content: flex-start; gap: 14px; padding: calc(18px + env(safe-area-inset-top)) 20px 78px; }
  .auth-side .auth-brand { margin: 0; }
  .auth-side .auth-brand img { width: 36px; height: 36px; }
  .auth-side .auth-brand strong { font-size: 16px; }
  .auth-side .auth-brand span { font-size: 12.5px; }
  .auth-rotator { font-size: 23px; height: 2.5em; }
  .auth-rotator span { max-width: 22ch; }
  .auth-ticks { margin: 4px 0 0; }
  .auth-ticks i { width: 26px; }
  .auth-side .auth-cta { display: none; }
  .auth-scene { background-position: 85% 100%; }
  .auth-scenes::after { background: linear-gradient(90deg, rgba(16, 51, 46, .9) 0%, rgba(16, 51, 46, .55) 60%, rgba(16, 51, 46, .25) 100%), linear-gradient(0deg, rgba(16, 51, 46, .85) 0%, rgba(16, 51, 46, 0) 45%); }
  .auth-main { display: block; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); margin-top: -58px; position: relative; z-index: 1; }
  .auth-main .auth-brand { display: none; }
  .auth-wrap { margin: 0 auto; }
  .auth-card { padding: 22px 20px; }
  .auth-title { font-size: 22px; }
  .auth-promo { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
  .auth-promo .auth-trial { flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 18px; }
  .auth-promo .auth-trial strong { font-size: 16px; }
  .auth-promo .auth-hotline { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; border-color: var(--border); background: var(--card); color: var(--ink); padding: 12px 14px 12px 18px; }
  .auth-promo .auth-hotline span { grid-column: 1; color: var(--muted); }
  .auth-promo .auth-hotline strong { grid-column: 1; font-size: 20px; }
  .auth-promo .auth-hotline em { display: flex; grid-column: 2; grid-row: 1 / span 2; align-items: center; justify-content: center; min-width: 64px; height: 44px; padding: 0 14px; border-radius: 12px; background: var(--ink); color: #fff; font-style: normal; font-weight: 700; }
  .auth-ver-m { text-align: center; color: var(--muted); opacity: .7; margin-top: 4px; }
}
@media (min-width: 901px) { .auth-ver-m { display: none; } }
@media (max-width: 380px) {
  .auth-rotator { font-size: 21px; }
  .auth-promo .auth-trial { flex-direction: column; align-items: flex-start; }
  .auth-promo .auth-hotline strong { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-rotator span { animation: none !important; }
  .auth-rotator span:first-child { opacity: 1; }
  .auth-scene { animation: none !important; }
  .auth-ticks { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  body { font-size: 15px; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .22s ease; z-index: 60; width: 280px; box-shadow: var(--shadow-lift); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 30, 27, .45); z-index: 55; }
  .icon-btn.menu-btn { display: inline-flex; }
  .topbar { padding: 10px 14px; }
  .page-title { font-size: 17px; }
  .content { padding: 16px 14px calc(var(--bottom-nav) + 28px); }
  .grid-2, .grid-3, .grid-side, .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { gap: 14px; }
  .span-2 { grid-column: auto; }
  .user-name { display: none; }
  .user-chip { padding: 2px; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 10px; }
  .floor-row { grid-template-columns: 1fr; gap: 4px; }
  .floor-name { padding-top: 0; }
  .filters .field { min-width: calc(50% - 5px); flex: 1; }
  .card { padding: 16px; margin-bottom: 14px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat .value { font-size: 19px; }
  .toolbar h2 { font-size: 18px; }
  .content > .toolbar:first-child > h2:only-of-type { display: none; } /* đã có tiêu đề trên thanh trên */
  .filter-toggle { display: flex; }
  form.filters.collapsed > :not(input[type=hidden]):not(.filter-toggle) { display: none; }
  .toolbar .actions { width: 100%; }
  .toolbar .actions .btn { flex: 1 1 auto; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
  .btn { padding: 10px 14px; }
  input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=month],
  input[type=search], input[type=url], select, textarea { font-size: 16px; padding: 11px 12px; } /* tránh iPhone tự phóng to */
  /* Bảng dạng thẻ trên điện thoại */
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tr { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 8px 12px; background: var(--surface); }
  .table.responsive tbody tr:hover { background: var(--surface); }
  .table.responsive td { border: 0; padding: 6px 0; text-align: right; overflow-wrap: anywhere; }
  .table.responsive td::before { content: attr(data-label); float: left; margin-right: 14px; color: var(--muted); font-weight: 500; text-align: left; }
  .table.responsive td::after { content: ''; display: table; clear: both; }
  .table.responsive td > div, .table.responsive td > .muted { display: block; }
  .table.responsive td:first-child { font-size: 15.5px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
  .table.responsive td .actions { justify-content: flex-end; }
  .table.responsive td.num { text-align: right; }
  .table.responsive td.empty::before { content: none; }
  .table.responsive td.empty { text-align: center; border-bottom: 0; }
  .table.responsive td:empty { display: none; }
  /* Thanh tab dưới đáy */
  .bottom-nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--bottom-nav) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted);
    font: 600 11px/1.1 var(--font); background: none; border: 0; padding: 6px 2px; position: relative; cursor: pointer; text-decoration: none; }
  .bottom-nav .ico { width: 23px; height: 23px; }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav a.active::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--mango); }
  .bottom-nav .nav-badge { position: absolute; top: 5px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; font-size: 10.5px; }
}

/* ---------- In ấn ---------- */
@media print {
  .sidebar, .topbar, .no-print, .sidebar-backdrop { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 0; padding: 0; }
}

/* ---------- Trợ lý AI ---------- */
.chat-log { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px 2px 10px; }
.msg { padding: 10px 14px; border-radius: 12px; max-width: 88%; line-height: 1.55; word-break: break-word; }
.msg-user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg-ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.chat-form textarea { min-height: 48px; }
.chart text { font-family: var(--font); }
tfoot td { background: var(--surface-2); }
.legend a { color: inherit; }

/* Hướng dẫn bắt đầu */
.setup-card { border-color: var(--primary); background: linear-gradient(var(--primary-soft), var(--surface) 90px); }
.setup-steps { list-style: none; margin: 8px 0 0; padding: 0; }
.setup-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.setup-steps li:first-child { border-top: 0; }
.setup-num { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: var(--gray-soft); color: var(--gray); }
.setup-steps li.done .setup-num { background: var(--green-soft); color: var(--green); }
.setup-steps li.next .setup-num { background: var(--primary); color: var(--primary-ink); }
.setup-steps li.done .setup-body strong { color: var(--muted); font-weight: 600; }
.setup-body { flex: 1; min-width: 0; }
.setup-steps .btn { flex: 0 0 auto; }
@media (max-width: 560px) { .setup-steps li { flex-wrap: wrap; } .setup-body { flex-basis: calc(100% - 40px); } .setup-steps .btn { margin-left: 40px; } }
.card.danger-zone { border-color: #f3c7b3; }
.roomgen-preview { background: var(--primary-soft); color: var(--primary); border-radius: 8px; padding: 8px 12px; margin: 4px 0 0; }
/* Nhập Excel */
.import-table tr.row-error td { background: var(--red-soft); }
.import-msg { margin: 0; padding-left: 16px; font-size: 13px; }
.import-msg.err { color: var(--red); }
.import-msg.warn { color: var(--amber); margin-top: 4px; }
.import-table.only-errors tr:not([data-error]) { display: none; }
/* Mã QR thanh toán */
.qr-box { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.qr-img { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 6px; line-height: 0; flex: 0 0 auto; }
.qr-img svg { display: block; max-width: 100%; height: auto; }
.qr-meta { flex: 1; min-width: 200px; }
.copy-row { display: flex; align-items: center; gap: 8px; }
.copy-row .btn { padding: 2px 8px; font-size: 12px; }
@media print { .qr-img { border: 0; } }

/* Bảng phân quyền */
.perm-matrix th.center, .perm-matrix td.center { text-align: center; }
.perm-matrix thead th { text-transform: none; letter-spacing: 0; white-space: nowrap; }
.perm-matrix .perm-group td { background: var(--surface-2); font-weight: 700; color: var(--text); }
.perm-matrix input[type=checkbox] { width: 18px; height: 18px; }
.perm-matrix tbody td:first-child { min-width: 260px; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.link-btn:hover { color: var(--primary); text-decoration: underline; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; z-index: 5; }
.perm-count { white-space: nowrap; }

/* Bản quyền phần mềm */
.lic-hero { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.lic-days { font-size: 44px; font-weight: 800; line-height: 1; }
.lic-days small { font-size: 16px; font-weight: 600; color: var(--muted); }
.lic-ok .lic-days, .lic-unlimited .lic-days { color: var(--primary); }
.lic-warn .lic-days { color: #b45309; }
.lic-urgent .lic-days, .lic-expired .lic-days { color: #b91c1c; }
.lic-bar { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.lic-bar span { display: block; height: 100%; background: var(--primary); }
.lic-warn .lic-bar span { background: #d97706; }
.lic-urgent .lic-bar span, .lic-expired .lic-bar span { background: #dc2626; }
.note-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-top: 8px; }

/* Nhật ký dễ đọc (2.13) */
.audit-changes { max-width: 520px; line-height: 1.55; word-break: break-word; }
.audit-tech { margin-top: 4px; }
.audit-tech summary { cursor: pointer; font-size: 12px; }
.audit-tech code { display: block; white-space: pre-wrap; font-size: 11px; background: var(--bg, #f6f7f9); padding: 6px 8px; border-radius: 6px; margin-top: 4px; max-height: 220px; overflow: auto; }

/* Chốt chỉ số theo phòng: điện và nước cùng dòng */
.meter-room-table th.mt-elec { background: #fff7e0; }
.meter-room-table th.mt-water { background: #e8f4fd; }
.meter-room-table .mt-gs { border-left: 2px solid var(--line, #e5e7eb); }
.meter-room-table td { vertical-align: top; }
@media (prefers-color-scheme: dark) { .meter-room-table th.mt-elec { background: rgba(245,158,11,.12); } .meter-room-table th.mt-water { background: rgba(59,130,246,.12); } }

/* Chọn nhanh kỳ tính (hóa đơn) */
.range-presets { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.range-presets .chip { display: inline-block; padding: 4px 10px; border: 1px solid var(--line, #e5e7eb); border-radius: 999px; color: inherit; text-decoration: none; background: var(--card, #fff); }
.range-presets .chip:hover { border-color: var(--primary, #0f766e); color: var(--primary, #0f766e); }
.range-presets .chip.active { background: var(--primary, #0f766e); border-color: var(--primary, #0f766e); color: #fff; }

/* Chọn cách tính điện nước trên hóa đơn (trang Điện nước) */
.bill-mode-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; align-items: stretch; }
.bill-mode-title { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.bill-opt { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line, #e5e7eb); border-radius: 10px; padding: 10px 12px; cursor: pointer; margin: 0; }
.bill-opt.on, .bill-opt:has(input:checked) { border-color: var(--primary, #0f766e); background: rgba(15, 118, 110, .06); }
.bill-opt input { margin-top: 3px; }
.bill-opt small { display: block; color: var(--muted, #6b7280); margin-top: 2px; font-weight: normal; }
.bill-mode-form > div:last-child { grid-column: 1 / -1; }
@media (max-width: 720px) { .bill-mode-form { grid-template-columns: 1fr; } }

/* Chi phí cố định hàng tháng */
.recurring-check { align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1.5px dashed var(--line, #e5e7eb); border-radius: 10px; margin: 4px 0 8px; }
.recurring-check:has(input:checked) { border-style: solid; border-color: var(--primary, #0f766e); background: rgba(15, 118, 110, .06); }
.recurring-check small { display: block; margin-top: 2px; font-weight: normal; }

/* Thông báo & phản hồi khách thuê (2.15) */
.nav a { position: relative; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.row-unread td { background: rgba(220, 38, 38, .04); }
.row-unread td:first-child { box-shadow: inset 3px 0 0 #dc2626; }
.announce-body { line-height: 1.65; white-space: normal; word-break: break-word; }
.chat { display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 85%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line, #e5e7eb); }
.chat-tenant { align-self: flex-start; background: var(--card, #fff); border-top-left-radius: 4px; }
.chat-staff { align-self: flex-end; background: rgba(15, 118, 110, .08); border-color: rgba(15, 118, 110, .25); border-top-right-radius: 4px; }
.chat-meta { font-size: 12px; color: var(--muted, #6b7280); margin-bottom: 4px; }
.chat-body { line-height: 1.55; word-break: break-word; }
.chat-img { display: block; max-width: 240px; max-height: 240px; border-radius: 8px; margin-top: 8px; object-fit: cover; }
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice-item { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line, #e5e7eb); color: inherit; text-decoration: none; }
.notice-item:hover { background: rgba(15, 118, 110, .04); }
.notice-item.unread { background: rgba(37, 99, 235, .05); }
.notice-item.unread .notice-title::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2563eb; margin-right: 8px; vertical-align: middle; }
.notice-item.important { border-left: 3px solid #dc2626; }
.notice-title { font-weight: 600; }
.notice-snippet { color: var(--muted, #6b7280); font-size: 13px; margin-top: 2px; }

/* =====================================================================
 * Trang khách thuê: thiết kế cho điện thoại trước
 * ===================================================================== */
body.tenant { background: var(--bg); }
.t-top { position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; padding-top: env(safe-area-inset-top); }
.t-top-in { max-width: 720px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; }
.t-brand { display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0; }
.t-brand:hover { text-decoration: none; }
.t-brand img { border-radius: 9px; flex: none; }
.t-brand span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.t-brand strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-brand small { color: var(--mango); font-size: 12px; font-weight: 500; }
.t-top-actions { display: flex; align-items: center; gap: 2px; }
.t-top-actions form { margin: 0; }
.t-top .icon-btn { color: rgba(255,255,255,.8); }
.t-top .icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.dot-badge { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--mango); color: #2b1a00; font: 700 10.5px/17px var(--font); text-align: center; font-style: normal; }
.t-tabs { display: none; }
.t-bell { display: none; }
.t-main { max-width: 720px; margin: 0 auto; padding: 16px 16px calc(var(--bottom-nav) + 32px); }
.t-main > .toolbar h2, .t-main h2 { font-size: 18px; }
.t-hello { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0 12px; }

/* Thẻ chìa khóa phòng: điểm nhấn của trang khách */
.keytag { position: relative; background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: 20px 20px 18px 64px; margin-bottom: 14px; overflow: hidden; }
.keytag::after { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; border: 28px solid rgba(240, 164, 58, .08); }
.kt-hole { position: absolute; left: 22px; top: 26px; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 3px rgba(240, 164, 58, .7); }
.kt-head { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline; }
.kt-label { grid-column: 1 / -1; color: rgba(255,255,255,.6); font-size: 13px; font-weight: 500; }
.kt-room { font-size: 52px; line-height: 1; font-weight: 800; letter-spacing: -.04em; color: var(--mango); font-variant-numeric: tabular-nums; }
.kt-place { color: rgba(255,255,255,.82); font-size: 14px; align-self: end; padding-bottom: 6px; }
.kt-due { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(255,255,255,.18); position: relative; z-index: 1; }
.kt-due > div { display: flex; flex-direction: column; line-height: 1.25; }
.kt-due span { color: rgba(255,255,255,.65); font-size: 13px; }
.kt-due strong { font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kt-due small { color: rgba(255,255,255,.65); font-size: 12.5px; margin-top: 2px; }
.kt-ok strong { font-size: 18px; color: #bfe8d9; }
.kt-note { margin: 12px 0 0; font-size: 13px; color: #ffe2b8; position: relative; z-index: 1; }
.keytag .btn-accent { box-shadow: 0 6px 18px -6px rgba(240, 164, 58, .7); }

/* Lối tắt */
.t-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.t-quick a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 12.5px; font-weight: 600; text-align: center; line-height: 1.2; }
.t-quick a:hover { text-decoration: none; border-color: var(--border-strong); }
.t-quick .ico { width: 24px; height: 24px; color: var(--primary); }
.t-quick .dot-badge { top: 6px; right: calc(50% - 22px); }

.t-banner { display: block; background: var(--mango-soft); color: #6b3f00; border: 1px solid #f3d9a8; border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 16px; }
.t-banner:hover { text-decoration: none; background: #fbe8c6; }
.t-section { margin-bottom: 20px; }
.t-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.t-section-head h2 { font-size: 17px; margin: 0; }
.t-section-head a { font-weight: 600; font-size: 13.5px; }
.t-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.t-pad { padding: 4px 16px; }
.t-empty { padding: 22px; text-align: center; color: var(--muted); }
.t-card.notice-list .notice-item:last-child { border-bottom: 0; }

/* Hóa đơn dạng thẻ */
.inv-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.inv-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.inv-card.due { border-left: 4px solid var(--mango); }
.inv-main { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.inv-main > div:first-child { display: flex; flex-direction: column; }
.inv-main strong { font-size: 15.5px; }
.inv-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.inv-amt strong { font-variant-numeric: tabular-nums; }
.inv-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 14px; }

/* Điện nước đã dùng */
.usage { padding: 4px 16px; }
.usage-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.usage-row:last-child { border-bottom: 0; }
.usage-month { font-weight: 600; }
.usage-val { min-width: 84px; text-align: right; font-weight: 600; }
.usage-e::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--mango); margin-right: 6px; vertical-align: 1px; }
.usage-w::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-right: 6px; vertical-align: 1px; }

.t-contract { padding: 0 16px; margin-bottom: 12px; }
.t-contract summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 0; cursor: pointer; font-weight: 600; list-style: none; }
.t-contract summary::-webkit-details-marker { display: none; }
.t-contract summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-left: 4px; flex: none; transition: transform .15s; }
.t-contract[open] summary::after { transform: rotate(-135deg); }
.t-contract[open] { padding-bottom: 14px; }
.t-contract h4 { margin: 16px 0 4px; font-size: 14px; }
.t-help { color: var(--muted); font-size: 13.5px; text-align: center; margin: 22px 0 0; }

/* Các trang khách khác dùng lại thẻ chuẩn, nhưng gọn hơn */
body.tenant .card { border-radius: var(--radius); }
body.tenant .grid-2, body.tenant .grid-side { grid-template-columns: 1fr; }
body.tenant .chat-msg { max-width: 90%; }

@media (min-width: 861px) {
  .t-tabs { display: flex; gap: 4px; max-width: 720px; margin: 0 auto; padding: 0 12px; }
  .t-tabs a { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 14px 12px; color: rgba(255,255,255,.7); font-weight: 600; border-bottom: 3px solid transparent; }
  .t-tabs a:hover { color: #fff; text-decoration: none; }
  .t-tabs a.active { color: #fff; border-color: var(--mango); }
  .t-tabs .nav-badge { position: static; margin-left: 2px; background: var(--mango); color: #2b1a00; }
  .t-bell { display: none; }
  .t-main { padding: 24px 16px 48px; }
  .bottom-nav.t-bottom { display: none; }
}
@media (max-width: 860px) {
  .bottom-nav.t-bottom .nav-badge { background: var(--mango); color: #2b1a00; }
}
@media (max-width: 380px) {
  .kt-room { font-size: 44px; }
  .keytag { padding-left: 56px; }
  .kt-hole { left: 18px; }
  .kt-due { flex-direction: column; align-items: stretch; }
  .kt-due .btn { width: 100%; }
}
@media (max-width: 860px) {
  body.tenant .form-actions .btn { flex: 1 1 auto; padding: 13px 16px; font-size: 16px; }
  body.tenant .card { padding: 16px; }
}

/* ===== 2.17: Phản ánh của khách thuê (ưu tiên điện thoại) ===== */
.badge-mango { background: var(--mango-soft); color: #7a4a00; }
.t-page-head h1 { font-size: 22px; letter-spacing: -.02em; margin: 2px 0 2px; }
.t-page-head p { margin: 0 0 14px; font-size: 14px; }
.t-back { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.fb-box { padding: 16px; margin-bottom: 12px; }
.fb-new { margin-bottom: 18px; overflow: visible; }
.fb-new > summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.fb-new > summary::-webkit-details-marker { display: none; }
.fb-new > summary span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.fb-new > summary small { color: var(--muted); font-size: 13px; }
.fb-new-plus { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--mango); color: #2b1a00; font: 700 26px/40px var(--font); text-align: center; transition: transform .15s; }
.fb-new[open] .fb-new-plus { transform: rotate(45deg); }
.fb-form { padding: 0 16px 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.fb-templates { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-chip { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 12px; font: 500 13.5px/1.2 var(--font); cursor: pointer; }
.fb-chip:hover { border-color: var(--primary); color: var(--primary); }
.fb-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.photo-pick { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; border: 2px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--primary); font-weight: 600; cursor: pointer; position: relative; }
.photo-pick:hover { border-color: var(--primary); }
.photo-pick .ico, .photo-pick-mini .ico { width: 24px; height: 24px; }
.photo-pick input, .photo-pick-mini input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.photo-pick-mini { position: relative; flex: none; color: var(--primary); }
.photo-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-preview:not(:empty) { margin-top: 10px; }
.photo-preview figure { position: relative; margin: 0; width: 76px; height: 76px; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.photo-preview button { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font: 700 15px/24px var(--font); cursor: pointer; padding: 0; }
.fb-urgent { background: var(--red-soft); border: 1px solid #f2c9c2; border-radius: var(--radius-sm); padding: 11px 12px; color: #7c2418; }
.fb-urgent input { width: 18px; height: 18px; accent-color: var(--red); }
.btn-block { width: 100%; justify-content: center; }
.fb-list { display: flex; flex-direction: column; gap: 10px; }
.fb-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.fb-card:hover { text-decoration: none; border-color: var(--border-strong); }
.fb-card.unread { border-left: 4px solid var(--mango); }
.fb-thumb { flex: none; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.fb-thumb-none { display: flex; align-items: center; justify-content: center; color: var(--primary); background: var(--primary-soft); }
.fb-thumb-none .ico { width: 24px; height: 24px; }
.fb-card-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fb-card-main strong { font-size: 15px; line-height: 1.35; }
.fb-card-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.t-rights { margin-top: 18px; padding: 0 16px; }
.t-rights summary { padding: 13px 0; cursor: pointer; font-weight: 600; color: var(--primary); }
.t-rights ul { margin: 0 0 14px; padding-left: 18px; color: var(--muted); font-size: 14px; }
.t-rights li { margin-bottom: 6px; }
.fb-head h1 { font-size: 20px; letter-spacing: -.015em; margin: 0 0 4px; line-height: 1.3; }
.fb-head p { margin: 0 0 6px; }
.fb-track { display: flex; list-style: none; margin: 14px 0 2px; padding: 0; counter-reset: s; }
.fb-track li { flex: 1; position: relative; text-align: center; font-size: 12.5px; color: var(--muted); padding-top: 22px; }
.fb-track li::before { content: ''; position: absolute; top: 4px; left: calc(50% - 7px); width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); z-index: 1; box-sizing: border-box; }
.fb-track li + li::after { content: ''; position: absolute; top: 10px; right: 50%; width: 100%; height: 2px; background: var(--border-strong); }
.fb-track li.done::before { background: var(--primary); border-color: var(--primary); }
.fb-track li.done + li::after, .fb-track li.now::after { background: var(--primary); }
.fb-track li.now::before { border-color: var(--mango); background: var(--mango); box-shadow: 0 0 0 4px var(--mango-soft); }
.fb-track li.now { color: var(--text); font-weight: 700; }
.fb-rated { margin: 12px 0 0; font-size: 14px; }
.stars-static { color: var(--mango); letter-spacing: 1px; }
.stars-static span { color: var(--border-strong); }
.fb-done { border: 1px solid #b9dccc; background: var(--green-soft); }
.fb-done h2 { margin: 0 0 4px; font-size: 17px; color: var(--green); }
.fb-chat { margin: 6px 0 12px; }
.chat-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chat-imgs .chat-img { margin-top: 0; width: 120px; height: 120px; max-width: none; }
.chat-imgs a:only-child .chat-img { width: auto; height: auto; max-width: 100%; max-height: 260px; }
.fb-compose { padding: 10px; margin-bottom: 12px; }
.fb-compose p { margin: 0 0 6px 4px; }
.fb-compose .photo-preview:not(:empty) { margin: 0 0 10px; }
.fb-compose-row { display: flex; gap: 8px; align-items: flex-end; }
.fb-compose-row textarea { flex: 1; min-height: 44px; max-height: 160px; resize: none; border-radius: 22px; padding: 11px 16px; }
.fb-compose-row .btn { border-radius: 22px; min-height: 44px; }
.fb-compose-row .icon-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--primary-soft); }
.fb-close-early summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.fb-close-early[open] summary { margin-bottom: 10px; }
.fb-close-form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.fb-close-form input[type=text] { width: 100%; }
.stars { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.stars legend { font-size: 13.5px; color: var(--muted); margin-bottom: 2px; width: 100%; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { font-size: 34px; line-height: 1; color: var(--border-strong); cursor: pointer; padding: 0 2px; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: var(--mango); }
.stars input:focus-visible + label { outline: 2px solid var(--primary); border-radius: 4px; }
/* Mời cài ứng dụng lên màn hình chính (trang web khách) */
.t-install { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; background: var(--primary-soft); border: 1px solid #bfe0d6; border-radius: var(--radius); color: var(--ink); }
.t-install:hover { text-decoration: none; border-color: var(--primary); }
.t-install img { flex: none; border-radius: 10px; }
.t-install span { display: flex; flex-direction: column; line-height: 1.3; }
.t-install small { color: var(--muted); }
@media (min-width: 861px) { .t-install { display: none; } }
/* Nhân viên: phản ánh khẩn cấp, đánh giá */
.fb-staff-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
@media (max-width: 860px) {
  .fb-form .form-grid { grid-template-columns: 1fr; }
  .fb-compose { position: sticky; bottom: calc(var(--bottom-nav) + 8px + env(safe-area-inset-bottom)); z-index: 5; box-shadow: var(--shadow-lift); }
}

/* Đăng ký: ô mật khẩu có nút Hiện/Ẩn */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--primary); font: 600 13.5px var(--font); padding: 8px 10px; cursor: pointer; border-radius: 8px; }
.pw-toggle:hover { background: var(--primary-soft); }
@media (max-width: 560px) { .reg-form .form-grid { grid-template-columns: 1fr; } }
.field > .pw-wrap { font-weight: 400; font-size: inherit; }
[hidden] { display: none !important; }

/* ===== Cập nhật trực tiếp ===== */
.live-stack { position: fixed; right: 16px; top: 72px; z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.live-toast { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 36px 12px 14px; background: var(--ink); color: #fff; border-radius: 12px;
  box-shadow: var(--shadow-lift); border-left: 4px solid var(--mango); animation: live-in .25s ease-out; transition: opacity .35s, transform .35s; }
.live-toast:hover { text-decoration: none; color: #fff; }
.live-toast strong { font-size: 14px; line-height: 1.35; }
.live-toast span { font-size: 13px; color: rgba(255,255,255,.78); line-height: 1.4; }
.live-toast.urgent { border-left-color: #ff6b57; }
.live-toast.out { opacity: 0; transform: translateX(16px); }
.live-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 16px; line-height: 26px; cursor: pointer; padding: 0; }
.chat-new { animation: live-glow 2.4s ease-out; }
.enable-notify { margin-left: 8px; }
@keyframes live-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes live-glow { 0% { box-shadow: 0 0 0 3px var(--mango); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 860px) { .live-stack { top: auto; bottom: calc(var(--bottom-nav) + 14px + env(safe-area-inset-bottom)); right: 12px; left: 12px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .live-toast, .chat-new { animation: none; } }

[data-sound-toggle][aria-pressed="false"] { opacity: .55; }
/* Tài khoản nhận tiền riêng của nhà / tòa */
.bank-own { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; background: var(--surface-2); }
.bank-own > summary { cursor: pointer; display: flex; flex-direction: column; gap: 2px; list-style: none; }
.bank-own > summary::-webkit-details-marker { display: none; }
.bank-own > summary strong { color: var(--primary); }
.bank-own[open] > summary { margin-bottom: 4px; }
.bank-own-act { margin-left: 8px; font-size: 12.5px; font-weight: 600; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 2px 10px; }
.bank-own[open] .bank-own-act { display: none; }

/* SePay */
.sepay-steps { margin: 0 0 12px; padding-left: 20px; line-height: 1.7; }
.sepay-steps li { margin-bottom: 6px; }
code.copyable { display: inline-block; max-width: 100%; overflow-wrap: anywhere; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 6px; padding: 2px 8px; cursor: copy; font-size: 13px; }
code.copyable:hover { border-color: var(--primary); }
.bank-assign { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.bank-assign input { width: 140px; min-height: 34px; }

/* ===== 2.24: Giao diện điện thoại cho trang quản lý chủ nhà ===== */
.more-sheet, .more-btn { display: none; }
@media (max-width: 860px) {
  /* Thanh thao tác: giữ nút chính, các nút phụ gom vào "Thêm thao tác" */
  .toolbar .actions.compact { flex-wrap: wrap; }
  .toolbar .actions.compact > .btn { flex: 1 1 auto; }
  .more-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto !important; }
  .more-btn .dots { font-size: 20px; line-height: 1; letter-spacing: 1px; }
  .more-btn .badge { margin: 0; }
  .more-sheet { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(10, 30, 27, .45); animation: mfade .18s ease-out; }
  .more-sheet[hidden] { display: none !important; }
  .more-panel { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: 20px 20px 0 0; padding: 8px 14px calc(14px + env(safe-area-inset-bottom));
    max-height: 80vh; overflow-y: auto; box-shadow: 0 -10px 40px -10px rgba(0,0,0,.35); animation: mup .24s cubic-bezier(.2,.8,.2,1); }
  .more-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 4px auto 10px; }
  .more-title { font-weight: 700; font-size: 15px; margin: 0 4px 6px; color: var(--muted); }
  .more-list { display: flex; flex-direction: column; }
  .more-list > .btn, .more-list > form .btn, .more-list > form button { display: flex; width: 100%; justify-content: flex-start; text-align: left; border: 0; border-bottom: 1px solid var(--border);
    border-radius: 0; background: none; box-shadow: none; padding: 15px 6px; font-size: 16px; color: var(--text); }
  .more-list > form { margin: 0; display: block; }
  .more-list > .btn:last-child, .more-list > form:last-child .btn { border-bottom: 0; }
  .more-list .btn-danger { color: var(--red) !important; }
  .more-close { display: block; width: 100%; margin-top: 8px; padding: 13px; border: 0; border-radius: 12px; background: var(--surface-2); font: 600 15px var(--font); color: var(--text); }
  @keyframes mup { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes mfade { from { opacity: 0; } to { opacity: 1; } }

  /* Bảng dạng thẻ: dòng đầu là tiêu đề thẻ, chạm cả thẻ để mở */
  .table.responsive td:first-child { text-align: left; font-weight: 600; font-size: 16px; }
  .table.responsive td:first-child::before { content: none; }
  .table.responsive td:first-child .muted, .table.responsive td:first-child .small { font-weight: 400; }
  .table.responsive tbody tr { box-shadow: 0 1px 2px rgba(16, 51, 46, .05); }
  .table.responsive tr.tap { position: relative; padding-right: 30px; cursor: pointer; }
  .table.responsive tr.tap::after { content: ''; position: absolute; right: 13px; top: 22px; width: 8px; height: 8px; border-right: 2px solid var(--border-strong); border-top: 2px solid var(--border-strong); transform: rotate(45deg); }
  .table.responsive tr.tap:active { background: var(--surface-2); }
  .table.responsive td .actions { flex-wrap: wrap; gap: 8px; }
  .table.responsive td:last-child:has(> .actions), .table.responsive td:last-child:has(> form) { text-align: left; }
  .table.responsive td input[type=text] { max-width: 140px !important; display: inline-block; }
  /* Dòng tổng cuối bảng */
  .table.responsive tfoot { display: block; margin-top: 2px; }
  .table.responsive tfoot tr { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; border: 0; border-top: 1px dashed var(--border-strong);
    border-radius: 0; margin: 0; padding: 10px 2px; background: transparent; box-shadow: none; }
  .table.responsive tfoot td, .table.responsive tfoot td:first-child { display: block; width: auto; padding: 0; margin: 0; border: 0; font-size: 15px; text-align: left; font-weight: inherit; }
  .table.responsive tfoot td.num, .table.responsive tfoot td:last-child { text-align: right; margin-left: auto; }
  .table.responsive tfoot td::before { content: none; }
  .table.responsive tfoot td { background: none !important; }
  .table.responsive tfoot td:empty { display: none; }

  /* Thanh trên gọn hơn */
  .topbar { gap: 6px; }
  .page-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .card-title { flex-wrap: wrap; gap: 8px; }
  /* Thiết lập ban đầu: ẩn các bước đã xong */
  .setup-steps li.done-step { display: none; }
  .setup-card.show-done .setup-steps li.done-step { display: flex; }
  .setup-more { display: block; margin: 4px 0 0; }
  /* Ô chạm dễ hơn */
  .btn-sm { padding: 8px 12px; min-height: 36px; }
  .tabs { scroll-snap-type: x proximity; }
  .tabs a { scroll-snap-align: start; padding-top: 12px; padding-bottom: 12px; }
  .pagination a, .pagination span { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
}
@media (min-width: 861px) { .setup-more { display: none; } }
@media (prefers-reduced-motion: reduce) { .more-sheet, .more-panel { animation: none; } }

/* ===== 2.25: Thao tác hợp đồng ===== */
.act-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.act-item { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); border-left: 4px solid var(--primary); }
.act-item:hover { text-decoration: none; border-color: var(--primary); background: var(--primary-soft); }
.act-item strong { font-size: 14.5px; }
.act-item small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.act-notice { border-left-color: var(--mango); }
.act-transfer, .act-assign { border-left-color: #3b82f6; }
.act-terminate { border-left-color: var(--red); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.act-side .dl { grid-template-columns: 110px 1fr; }
@media (max-width: 1100px) { .act-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .act-list { grid-template-columns: 1fr 1fr; gap: 8px; }
  .act-terminate { grid-column: 1 / -1; }
  .act-grid .act-side { order: -1; }
  .act-side .dl { grid-template-columns: 110px 1fr; gap: 4px 10px; }
  .act-side .dl dd { margin-bottom: 0; }
  .act-main .form-actions .btn { width: 100%; justify-content: center; }
}

/* 2.27 – nhà phát triển */
.dev-rate { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dev-rate > div { background: var(--mango-soft); border-radius: 12px; padding: 12px 14px; }
.dev-rate span { display: block; font-size: 12.5px; color: #7a4a00; }
.dev-rate strong { font-size: 28px; letter-spacing: -.02em; color: var(--ink); }
.dev-rate p { grid-column: 1 / -1; margin: 2px 0 0; }
.dev-app .sidebar { background: #1d2b3a; }

/* 2.28 – ghi nhận thanh toán nhiều hóa đơn một lần */
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid var(--border); margin-top: 4px; }
.bulk-bar .bulk-sum { font-size: 15px; }
.bulk-bar .bulk-sum strong { font-variant-numeric: tabular-nums; }
.check-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }
.bulk-line { display: flex; gap: 8px; align-items: flex-start; }
.bulk-line input[type=checkbox] { margin-top: 3px; flex: none; }
@media (max-width: 900px) {
  .bulk-bar { bottom: calc(var(--bottom-nav, 0px) + env(safe-area-inset-bottom)); padding: 10px 0; }
  .bulk-bar .btn { flex: 1 1 100%; }
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Con mắt hiện / ẩn mật khẩu */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap > input { width: 100%; padding-right: 46px !important; }
.pw-eye { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 40px; height: 40px; padding: 0; margin: 0;
  display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted, #5f6e69); cursor: pointer; }
.pw-eye:hover { color: var(--text, #1a2622); background: rgba(0, 0, 0, .05); }
.pw-eye:focus-visible { outline: 2px solid var(--primary, #0f7a5c); outline-offset: 1px; }
.pw-eye[aria-pressed="true"] { color: var(--primary, #0f7a5c); }
input[type=password]::-ms-reveal, input[type=password]::-ms-clear { display: none; }

/* 2.30 – phân quyền nhanh theo mục, quản lý tài khoản */
.perm-presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 14px; }
.perm-group { padding: 10px 12px 6px; border: 1px solid var(--border); border-radius: 10px; }
.perm-level { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin: 2px 0 8px; }
.perm-level button { border: 0; background: var(--surface); padding: 6px 10px; font: 500 13px var(--font); color: var(--muted); cursor: pointer; }
.perm-level button + button { border-left: 1px solid var(--border); }
.perm-level button.on { background: var(--primary); color: var(--primary-ink); }
.perm-level button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.team-list { list-style: none; margin: 0; padding: 0; }
.team-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.team-list li:first-child { border-top: 0; }

/* 2.32 – sửa chỉ số nhiều tháng */
.adj-table .adj-in { width: 120px; text-align: right; font-variant-numeric: tabular-nums; padding: 7px 9px; }
.adj-table .adj-in.changed { border-color: var(--amber, #d4a017); background: #fff8e6; font-weight: 700; }
@media (max-width: 760px) { .adj-table .adj-in { width: 100%; } }
.feat-check { align-items: flex-start; margin: 8px 0 12px; }
.feat-check input { margin-top: 3px; }
.deposit-settle { border: 1px solid var(--border); border-radius: 10px; padding: 4px 14px 12px; margin: 6px 0 12px; background: var(--surface-2, #f6f8f7); }
.deposit-sum { margin-top: 10px; font-size: 14px; line-height: 1.6; }

/* Đăng phòng trống (trang Tìm phòng) */
.lp-rooms { display: flex; flex-direction: column; gap: 12px; }
.lp-room-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; scroll-margin-top: 80px; }
.lp-room-row:target { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft, rgba(11,122,104,.15)); }
.lp-room-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-content: start; }
.lp-room-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 7px; display: block; }
.lp-ph-item { position: relative; margin: 0; }
.lp-ph-item:first-child { grid-column: 1 / -1; }
.lp-ph-item form { position: absolute; top: 4px; right: 4px; margin: 0; }
.lp-ph-del { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.62); color: #fff; font-size: 19px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lp-ph-del:hover, .lp-ph-del:focus-visible { background: #c62828; outline: none; }
.lp-room-photos { max-height: 420px; overflow-y: auto; }
.lp-room-nophoto { grid-column: 1 / -1; aspect-ratio: 4 / 3; display: grid; place-items: center; border-radius: 8px; color: var(--muted);
  background: repeating-linear-gradient(135deg, #f1f4f2 0 12px, #e8edea 12px 24px); font-size: 13px; }
.lp-room-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.lp-room-form { margin: 0; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
.lp-room-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.lp-room-upload label.btn { cursor: pointer; }
@media (max-width: 760px) {
  .lp-room-row { grid-template-columns: 1fr; }
  .form-grid-4 { grid-template-columns: 1fr 1fr; }
}
.lp-adm-map { height: 360px; border: 1px solid var(--border); }
.lp-swatches { border: 0; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 10px; }
.lp-swatches legend { margin-bottom: 6px; }
.lp-swatch { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.lp-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.lp-sw-box { width: 64px; height: 40px; border-radius: 10px; border: 2px solid transparent; display: flex; align-items: flex-end; justify-content: flex-end; gap: 3px; padding: 5px; box-shadow: 0 0 0 1px rgba(0,0,0,.08) inset; }
.lp-sw-box i { width: 12px; height: 12px; border-radius: 50%; display: block; box-shadow: 0 0 0 1.5px rgba(255,255,255,.8); }
.lp-swatch input:checked + .lp-sw-box { box-shadow: 0 0 0 3px var(--primary); }
.lp-swatch input:focus-visible + .lp-sw-box { outline: 3px solid var(--primary); outline-offset: 2px; }
.lp-colors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.lp-colors input[type=color] { height: 40px; padding: 2px; width: 100%; }
.lp-cur-imgs { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.lp-cur-imgs img { height: 56px; width: 110px; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 4px; }
.lp-cur-imgs img.sq { width: 56px; }
.lp-cur-imgs .check { flex-direction: column; align-items: flex-start; }
.lp-pub { display: inline; margin-left: auto; }
.lp-prev { background: var(--gray-soft, #f1f4f2); border-radius: 9px; padding: 8px 10px; margin: 0 0 10px; line-height: 1.5; }
.lp-auto .check { font-size: 15px; }
.rooms-lp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rooms-lp form { display: inline; margin: 0; }
.rooms-auto { display: flex; align-items: center; gap: 8px; margin: 0; }
.rq-review summary { cursor: pointer; color: var(--primary); margin-top: 6px; }
.rq-review .form { margin-top: 8px; min-width: 220px; }
