/* ============================================================
   QUẢN LÝ NHÀ TRỌ — STYLE
   Hệ thống thiết kế: minimalism chính xác, màu nhấn teal,
   số tiền dùng chữ số tabular. Hỗ trợ Dark Mode qua [data-theme].
   ============================================================ */

/* ---------- 1. BIẾN MÀU & TOKEN ---------- */
:root {
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Be Vietnam Pro", system-ui, sans-serif;

  /* Nền & bề mặt (Light) */
  --bg: #eef1ef;
  --surface: #ffffff;
  --surface-2: #f4f7f5;
  --border: #e4e9e5;
  --border-strong: #d3dbd6;

  /* Chữ */
  --text: #0d1712;
  --text-soft: #52625a;
  --text-mute: #8695 8d;
  --text-mute: #869089;

  /* Nhấn chính (emerald sâu - tài chính, tin cậy) */
  --accent: #0b7a5b;
  --accent-strong: #095c45;
  --accent-soft: #e0f1ea;
  --accent-ink: #063d2e;

  /* Nhấn phụ (vàng đồng - cao cấp) */
  --gold: #b0842f;
  --gold-soft: #f6efdd;

  /* Trạng thái */
  --success: #12805a;
  --success-soft: #e2f2ea;
  --warning: #b7791f;
  --warning-soft: #f8efdc;
  --danger: #c2410c;
  --danger-soft: #fbe9df;
  --danger-ink: #9a2f08;
  --info: #1d6fb8;
  --info-soft: #e5eff8;

  --shadow: 0 1px 2px rgba(13, 23, 18, .04), 0 12px 32px -8px rgba(13, 23, 18, .12);
  --shadow-sm: 0 1px 2px rgba(13, 23, 18, .05), 0 1px 3px rgba(13, 23, 18, .04);
  --shadow-lg: 0 24px 60px -16px rgba(13, 23, 18, .28);
  --radius: 16px;
  --radius-sm: 11px;
  --sidebar-w: 252px;
  --topbar-h: 64px;
}

[data-theme="dark"] {
  --bg: #0a1310;
  --surface: #101a16;
  --surface-2: #16221d;
  --border: #223029;
  --border-strong: #2c3c33;

  --text: #e9f0ec;
  --text-soft: #a3b2aa;
  --text-mute: #6d7d74;

  --accent: #2fce9f;
  --accent-strong: #23b088;
  --accent-soft: #10312635;
  --accent-soft: rgba(47, 206, 159, .14);
  --accent-ink: #8fe9cf;

  --gold: #e0b45c;
  --gold-soft: rgba(224, 180, 92, .12);

  --success: #34d399;
  --success-soft: rgba(52, 211, 153, .13);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, .13);
  --danger: #fb7a4b;
  --danger-soft: rgba(251, 122, 75, .14);
  --danger-ink: #ffb191;
  --info: #5aa9 f0;
  --info: #5aa9f0;
  --info-soft: rgba(90, 169, 240, .14);

  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 36px -8px rgba(0, 0, 0, .5);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, .6);
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ---------- 3. BỐ CỤC KHUNG ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
}
.brand__mark {
  width: 36px; height: 36px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff; border-radius: 11px; font-size: 18px;
  box-shadow: 0 2px 8px -2px var(--accent);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; overflow: hidden; }
.brand__text strong { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__text span { font-size: 11.5px; color: var(--text-mute); letter-spacing: .02em; }

.nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; flex: 1; }
.nav__item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-soft); font-weight: 500; font-size: 14.5px;
  transition: background .15s, color .15s;
}
.nav__item:hover { background: var(--surface-2); color: var(--text); }
.nav__item.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.nav__item.active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.nav__ico { width: 20px; text-align: center; font-size: 15px; }
.sidebar__foot { padding: 14px 20px; border-top: 1px solid var(--border); }
.sidebar__foot small { color: var(--text-mute); font-size: 11.5px; }

.overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .45);
  z-index: 35; backdrop-filter: blur(1px);
}

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column;
  min-width: 0;
}

.topbar {
  height: var(--topbar-h);
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 0 22px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar__title { font-size: 20px; flex: 1; }
.topbar__actions { display: flex; gap: 6px; }
.menu-btn { display: none; }

.content { padding: 24px 22px 60px; max-width: 1240px; width: 100%; }
.page { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 4. NÚT ---------- */
.icon-btn {
  width: 38px; height: 38px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft);
  border-radius: 10px; font-size: 16px; display: grid; place-items: center;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 11px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; background: var(--surface-2);
  color: var(--text); transition: filter .15s, background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { filter: brightness(.98); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: linear-gradient(150deg, var(--accent) 0%, var(--accent-strong) 100%); color: #fff; box-shadow: 0 2px 10px -3px var(--accent); }
.btn--primary:hover { filter: brightness(1.05); }
.btn--ghost { background: transparent; border-color: var(--border-strong); color: var(--text-soft); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn--block { width: 100%; justify-content: center; }

/* ---------- 5. HEADER TRANG & THANH CÔNG CỤ ---------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.page-head h2 { font-family: var(--font-display); letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; color: var(--text-soft); font-size: 14px; }

.toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 16px;
}
.toolbar .search { flex: 1; min-width: 180px; }
.toolbar .grow { flex: 1; }

/* ---------- 6. CARD & LƯỚI ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card--pad { padding: 20px; }

.grid { display: grid; gap: 16px; }
.grid--stats { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: box-shadow .18s, transform .18s;
}
.stat:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat__label { color: var(--text-soft); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat__value { font-family: var(--font-display); font-size: 27px; font-weight: 700; margin-top: 8px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat__sub { font-size: 12.5px; color: var(--text-mute); margin-top: 5px; }
.stat__bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.stat--income .stat__bar { background: var(--success); }
.stat--expense .stat__bar { background: var(--warning); }
.stat--debt .stat__bar { background: var(--danger); }

/* ---------- 7. FORM ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--text-mute); margin-top: 4px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; font-size: 14.5px; font-family: inherit;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { resize: vertical; min-height: 76px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row--3 { grid-template-columns: 1fr 1fr 1fr; }

/* ---------- 8. BẢNG ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 12px 14px; text-align: left; white-space: nowrap; }
table.data thead th {
  background: var(--surface-2); color: var(--text-soft);
  font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em;
  border-bottom: 1px solid var(--border); cursor: pointer; user-select: none;
}
table.data thead th.no-sort { cursor: default; }
table.data thead th .arrow { color: var(--accent); margin-left: 4px; }
table.data tbody tr { border-bottom: 1px solid var(--border); }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.right, table.data th.right { text-align: right; }
table.data .row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* Trạng thái rỗng */
.empty {
  text-align: center; padding: 46px 20px; color: var(--text-mute);
}
.empty__ico { font-size: 34px; opacity: .5; }
.empty p { margin: 10px 0 16px; }

/* ---------- 9. BADGE ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge--empty { background: var(--surface-2); color: var(--text-soft); border-color: var(--border); }
.badge--rented { background: var(--success-soft); color: var(--success); }
.badge--deposit { background: var(--info-soft); color: var(--info); }
.badge--repair { background: var(--warning-soft); color: var(--warning); }
.badge--paid { background: var(--success-soft); color: var(--success); }
.badge--partial { background: var(--warning-soft); color: var(--warning); }
.badge--unpaid { background: var(--danger-soft); color: var(--danger); }

/* ---------- 10. PHÂN TRANG ---------- */
.pager { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.pager button {
  min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-soft); font-weight: 600;
}
.pager button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager .info { color: var(--text-mute); font-size: 13px; margin: 0 6px; }

/* ---------- 11. MODAL ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
[hidden] { display: none !important; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10, 20, 26, .5); backdrop-filter: blur(2px); }
.modal__dialog {
  position: relative; width: 100%; max-width: 620px; max-height: 90vh;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  animation: pop .2s ease;
}
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(8px); } to { opacity: 1; transform: none; } }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal__head h2 { font-size: 17px; }
.modal__body { padding: 20px; overflow-y: auto; }
.modal__foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.modal--wide .modal__dialog { max-width: 820px; }

/* ---------- 12. HÓA ĐƠN (bản in) ---------- */
.invoice-doc { background: #fff; color: #16202a; padding: 28px; font-size: 13.5px; }
.invoice-doc h2 { font-size: 20px; margin-bottom: 4px; }
.invoice-doc .inv-head { display: flex; justify-content: space-between; border-bottom: 2px solid #0d9488; padding-bottom: 12px; margin-bottom: 16px; }
.invoice-doc table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.invoice-doc th, .invoice-doc td { border: 1px solid #d8dee4; padding: 8px 10px; text-align: left; }
.invoice-doc td.right, .invoice-doc th.right { text-align: right; }
.invoice-doc .total-row td { font-weight: 700; background: #f0faf8; }
.invoice-doc .muted { color: #5b6875; }

/* ---------- 13. TIỆN ÍCH ---------- */
.stack { display: flex; flex-direction: column; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--text-mute); }
.pos { color: var(--success); font-weight: 700; }
.neg { color: var(--danger); font-weight: 700; }
.tag { font-size: 12px; color: var(--text-mute); }
.section-title { font-size: 14px; font-weight: 700; color: var(--text-soft); margin: 4px 0 12px; text-transform: uppercase; letter-spacing: .04em; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--text-soft); }
.kv .v { font-weight: 600; }

/* ---------- 14. RESPONSIVE ---------- */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .app.nav-open .sidebar { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-btn { display: grid; }
  .form-row, .form-row--3 { grid-template-columns: 1fr; }
}
@media (min-width: 901px) { .overlay { display: none !important; } }
@media (max-width: 560px) {
  .content { padding: 16px 14px 50px; }
  .topbar { padding: 0 14px; }
  .stat__value { font-size: 22px; }
}

/* ---------- 15. IN ẤN ---------- */
@media print {
  .sidebar, .topbar, .modal__head, .modal__foot, .overlay { display: none !important; }
  body, .main, .content { background: #fff; margin: 0; padding: 0; }
  .modal, .modal__dialog { position: static; max-height: none; box-shadow: none; border: 0; }
  .modal__backdrop { display: none; }
}

/* Cuộn mượt & focus rõ ràng cho bàn phím */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===== Nâng cấp: dịch vụ, dòng hoá đơn, VietQR, đơn giá riêng ===== */
.form-row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row--2 { grid-template-columns: 1fr; } }

.check { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.details { border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; margin-bottom: 6px; background: var(--surface-2); }
.details > summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 6px 0; color: var(--accent-strong); }
.details[open] > summary { margin-bottom: 6px; }

.inv-line { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.inv-line:last-child { border-bottom: 0; }
.inv-line__title { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.inv-line__grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .inv-line__grid { grid-template-columns: 1fr 1fr; } }

.inv-pay { display: flex; gap: 16px; align-items: center; justify-content: space-between;
  margin-top: 16px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.inv-pay__info { font-size: 13.5px; line-height: 1.6; }
.inv-pay__qr { width: 140px; height: 140px; object-fit: contain; border-radius: 8px; background: #fff; }
@media print {
  .inv-pay { break-inside: avoid; }
}

/* ============================================================
   MẪU PHIẾU THU CAO CẤP (render ra ảnh — màu cố định)
   Bảng màu độc lập dark mode để ảnh luôn nhất quán.
   ============================================================ */
.rcpt {
  --r-ink: #0d1712; --r-soft: #56635b; --r-mute: #93a099;
  --r-emerald: #0b7a5b; --r-emerald-d: #084d3a; --r-gold: #a8792a;
  --r-line: #e7ece8; --r-line-d: #cdd6d0; --r-paper: #ffffff; --r-tint: #f5f8f6;
  width: 560px; box-sizing: border-box; background: #ffffff; color: #0d1712;
  font-family: "Be Vietnam Pro", system-ui, sans-serif; position: relative;
  border: 1px solid #e7ece8; border-radius: 20px; overflow: hidden;
}
.rcpt * { box-sizing: border-box; }
.rcpt__mono, .rcpt .num { font-family: "Space Grotesk", "Be Vietnam Pro", sans-serif; font-variant-numeric: tabular-nums; }

/* Dải màu trên cùng */
.rcpt__ribbon { height: 6px; background: linear-gradient(90deg, #0b7a5b 0%, #12a074 60%, #a8792a 100%); }

/* Header */
.rcpt__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 26px 30px 20px; }
.rcpt__brand { display: flex; gap: 13px; align-items: center; }
.rcpt__emblem {
  width: 50px; height: 50px; border-radius: 14px; flex: 0 0 auto;
  background: linear-gradient(150deg, #0b7a5b, #084d3a);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 24px; box-shadow: 0 6px 16px -6px #0b7a5b;
}
.rcpt__hostel { font-size: 20px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.rcpt__owner { font-size: 12.5px; color: #56635b; margin-top: 3px; }
.rcpt__doc { text-align: right; flex: 0 0 auto; }
.rcpt__doc-kicker { font-size: 11px; font-weight: 700; letter-spacing: .22em; color: #0b7a5b; text-transform: uppercase; }
.rcpt__doc-title { font-family: "Space Grotesk", sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin-top: 1px; }
.rcpt__doc-no { font-family: "Space Grotesk", sans-serif; font-size: 12.5px; color: #56635b; margin-top: 3px; letter-spacing: .02em; }
.rcpt__period { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px;
  background: #f5f8f6; border: 1px solid #cdd6d0; font-size: 12px; font-weight: 600; color: #0b7a5b; }

/* Thông tin đối tượng */
.rcpt__sec-label { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #0b7a5b; margin-bottom: 8px; }
.rcpt__party { margin: 16px 24px 0; padding: 14px 16px; background: #f2f7f4; border: 1px solid #e2ece7;
  border-left: 3px solid #0b7a5b; border-radius: 12px; }
.rcpt__party .rcpt__sec-label { margin-bottom: 5px; }
.rcpt__to-name { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.rcpt__to-sub { font-size: 13px; color: #56635b; margin-top: 2px; font-family: "Space Grotesk", sans-serif; }
.rcpt__lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #93a099; margin-bottom: 4px; }

.rcpt__items-wrap { margin: 20px 24px 0; }
.rcpt__items-wrap .rcpt__sec-label { margin: 0 6px 6px; }

/* Bảng khoản mục */
.rcpt__table { width: 100%; border-collapse: collapse; margin: 0; border: 1px solid #e7ece8; border-radius: 12px; overflow: hidden; }
.rcpt__table thead th { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: #56635b; text-align: left; padding: 11px 16px; background: #f2f7f4; border-bottom: 1px solid #e2ece7; }
.rcpt__table thead th:last-child { text-align: right; }
.rcpt__table tbody td { padding: 11px 16px; border-top: 1px solid #eef2f0; vertical-align: top; }
.rcpt__table tbody tr:first-child td { border-top: 0; }
.rcpt__table tbody tr:nth-child(even) td { background: #fbfcfb; }
.rcpt__it-name { font-size: 14px; font-weight: 600; }
.rcpt__it-detail { font-size: 12px; color: #93a099; margin-top: 2px; font-family: "Space Grotesk", sans-serif; }
.rcpt__it-amt { text-align: right; font-size: 14px; font-weight: 600; white-space: nowrap; }

/* Tổng kết */
.rcpt__sum { margin: 12px 24px 0; padding-top: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.rcpt__sum-row { display: flex; justify-content: space-between; width: 62%; min-width: 240px; font-size: 13.5px; color: #56635b; }
.rcpt__sum-row b { color: #0d1712; font-weight: 600; }
.rcpt__grand { display: flex; justify-content: space-between; align-items: center; width: 62%; min-width: 240px;
  margin-top: 6px; padding: 13px 16px; border-radius: 13px;
  background: linear-gradient(150deg, #0b7a5b, #084d3a); color: #fff; }
.rcpt__grand span { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .92; }
.rcpt__grand b { font-family: "Space Grotesk", sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }

/* Con dấu trạng thái */
.rcpt__stamp { position: absolute; top: 210px; left: 34px; transform: rotate(-11deg);
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 15px; letter-spacing: .08em;
  padding: 6px 14px; border-radius: 8px; border: 2.5px solid; text-transform: uppercase; opacity: .16; }
.rcpt__stamp.is-paid { color: #0b7a5b; border-color: #0b7a5b; }
.rcpt__stamp.is-partial { color: #a8792a; border-color: #a8792a; }
.rcpt__stamp.is-unpaid { color: #c2410c; border-color: #c2410c; }

/* Khối thanh toán + QR */
.rcpt__pay { display: flex; gap: 18px; align-items: center; margin: 18px 24px 0;
  padding: 16px; border: 1px solid #cdd6d0; border-radius: 16px; background: #f5f8f6; }
.rcpt__pay-info { flex: 1; }
.rcpt__pay-title { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #0b7a5b; margin-bottom: 6px; }
.rcpt__pay-bank { font-size: 15px; font-weight: 700; }
.rcpt__pay-acc { font-family: "Space Grotesk", sans-serif; font-size: 18px; font-weight: 700; letter-spacing: .04em; margin-top: 1px; }
.rcpt__pay-holder { font-size: 12.5px; color: #56635b; text-transform: uppercase; margin-top: 1px; }
.rcpt__pay-memo { font-size: 12.5px; color: #56635b; margin-top: 6px; }
.rcpt__pay-memo b { color: #0d1712; }
.rcpt__qrbox { flex: 0 0 auto; text-align: center; padding: 8px; background: #fff; border-radius: 12px; border: 1px solid #cdd6d0; }
.rcpt__qrbox img { width: 116px; height: 116px; display: block; }
.rcpt__qrbox span { display: block; font-size: 10px; color: #93a099; margin-top: 4px; letter-spacing: .02em; }

.rcpt__memo-note { font-size: 12.5px; color: #56635b; margin: 14px 24px 0; }
.rcpt__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 18px; padding: 16px 30px; border-top: 1px solid #e7ece8; background: #fbfcfb; }
.rcpt__foot-left { font-size: 12.5px; color: #a8792a; font-weight: 700; }
.rcpt__foot-thanks { font-size: 12.5px; font-weight: 600; color: #0b7a5b; }
.rcpt-preview { width: 100%; overflow: hidden; }

/* Dòng cộng/trừ khi trả phòng */
.co-line { display: grid; grid-template-columns: 1fr 138px 128px 36px; gap: 8px; margin-bottom: 8px; align-items: center; }
@media (max-width: 560px) { .co-line { grid-template-columns: 1fr 1fr; } .co-line .coDel { grid-column: 2; justify-self: end; } }

/* Công tắc miễn phí trong hoá đơn */
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-soft); font-weight: 500; cursor: pointer; white-space: nowrap; margin-left: auto; }
.switch input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.inv-line__title { display: flex; align-items: center; gap: 8px; }
.inv-line__flat { display: flex; align-items: flex-end; gap: 14px; }
.inv-line__flat .field { flex: 1; }
.inv-line.is-waived { opacity: .5; }
.inv-line.is-waived .switch { opacity: 1; }
.rcpt__free { color: #0b7a5b; font-weight: 700; font-size: 12.5px; }
