/* HOTEL HOÀNG GIA — giao diện xanh rêu / vàng (giống bản Lovable) */
:root {
  --bg: oklch(0.18 0.027 185);
  --fg: oklch(0.92 0.018 105);
  --card: oklch(0.25 0.033 175);
  --primary: oklch(0.78 0.115 85);
  --primary-fg: oklch(0.19 0.028 175);
  --secondary: oklch(0.30 0.035 165);
  --muted: oklch(0.29 0.033 170);
  --muted-fg: oklch(0.73 0.024 155);
  --border: oklch(0.36 0.026 170);
  --input: oklch(0.40 0.026 170);
  --destructive: oklch(0.58 0.22 27);
  --st-occupied: #8b5cf6;
  --st-maintenance: #3b82f6;
  --st-dirty: #94a3b8;
  --st-vacant: #22c55e;
  --st-overdue: #ef4444;
  --radius: 0.75rem;
  --font: "Be Vietnam Pro", ui-sans-serif, system-ui, sans-serif;
  --display: "Playfair Display", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.45 var(--font); }
a { color: var(--primary); }
.font-display { font-family: var(--display); }
.muted { color: var(--muted-fg); }
.small { font-size: 12px; }
.strong { font-weight: 600; color: var(--fg); }
h1, h2 { margin: 0 0 .5rem; }
h2 { font-size: 1.1rem; }

input, select, textarea {
  width: 100%; padding: .6rem .75rem; border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--input); background: var(--muted); color: var(--fg); font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
label { display: grid; gap: .3rem; font-size: 14px; font-weight: 500; }
.stack { display: grid; gap: .9rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1rem; border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border); background: var(--card); color: var(--fg); font: 600 14px var(--font); cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn-primary { background: var(--primary); color: var(--primary-fg); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-sm { padding: .35rem .7rem; font-size: 13px; }
.btn-block { width: 100%; }
.alert { border: 1px solid color-mix(in oklch, var(--destructive) 50%, transparent); background: color-mix(in oklch, var(--destructive) 12%, transparent);
  color: oklch(0.8 0.12 27); padding: .7rem .9rem; border-radius: var(--radius); font-size: 14px; margin: 0 0 1rem; }

/* đăng nhập */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: 2rem 1.5rem; text-align: center; }
.login-card form { text-align: left; margin-top: 1rem; }
.login-logo { width: 72px; height: auto; border-radius: 12px; }
.login-card h1 { color: var(--primary); font-size: 1.6rem; margin-top: .5rem; }

/* thanh trên */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; padding: .6rem 1rem;
  background: color-mix(in oklch, var(--bg) 92%, black); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--primary); text-decoration: none; font-size: 1.15rem; font-weight: 700; }
.brand img { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.nav a { color: var(--muted-fg); text-decoration: none; padding: .35rem .7rem; border-radius: 999px; font-weight: 500; font-size: 14px; }
.nav a.active, .nav a:hover { background: var(--secondary); color: var(--fg); }
.me { margin-left: auto; display: flex; align-items: center; gap: .5rem; font-size: 13px; color: var(--muted-fg); }
.page { max-width: 1280px; margin: 0 auto; padding: 1rem .75rem 3rem; }

/* sơ đồ phòng */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.25rem; font-size: 14px; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--card); }
.chip-primary { border-color: color-mix(in oklch, var(--primary) 50%, transparent); background: color-mix(in oklch, var(--primary) 12%, transparent); color: var(--primary); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.st-vacant { background: var(--st-vacant); } .dot.st-occupied { background: var(--st-occupied); }
.dot.st-maintenance { background: var(--st-maintenance); } .dot.st-dirty { background: var(--st-dirty); } .dot.st-overdue { background: var(--st-overdue); }
#board section { margin-bottom: .5rem; }
.grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.tile { position: relative; display: flex; flex-direction: column; min-height: 7rem; padding: .75rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); font-size: 12px; cursor: pointer; }
.tile.st-occupied { background: color-mix(in oklch, var(--st-occupied) 42%, #150f26); border-color: color-mix(in oklch, var(--st-occupied) 62%, transparent); }
.tile.st-maintenance { background: color-mix(in oklch, var(--st-maintenance) 15%, var(--bg)); border-color: color-mix(in oklch, var(--st-maintenance) 40%, transparent); }
.tile.st-dirty { background: color-mix(in oklch, var(--st-dirty) 20%, var(--bg)); border-color: color-mix(in oklch, var(--st-dirty) 50%, transparent); }
.tile.overdue { border-color: var(--st-overdue); box-shadow: 0 0 0 2px var(--st-overdue); }
.tile-head { display: flex; align-items: center; justify-content: space-between; }
.code { font-size: 1.15rem; }
.guest { font-weight: 600; margin-top: .25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count { margin-top: .25rem; font: 600 14px var(--mono); }
.count.over { color: var(--st-overdue); }
.sum { font-weight: 600; }
.res { color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prices { margin: .5rem 0 0; padding-top: .4rem; border-top: 1px solid color-mix(in oklch, var(--border) 60%, transparent); display: grid; gap: 1px; font-size: 11px; }
.prices div { display: flex; justify-content: space-between; } .prices dt { color: var(--muted-fg); } .prices dd { margin: 0; font-weight: 600; }
.tag { border: 0; border-radius: 4px; padding: 1px 6px; font: 700 10px var(--font); vertical-align: middle; }
.tag-gold { background: var(--primary); color: var(--primary-fg); }
.tag-red { background: var(--st-overdue); color: #fff; cursor: pointer; }
.tile-actions { margin-top: auto; padding-top: .5rem; display: flex; gap: .25rem; flex-wrap: wrap; }
.mini { border: 0; border-radius: 6px; padding: .25rem .5rem; background: var(--card); color: var(--fg); font: 500 12px var(--font); cursor: pointer; box-shadow: 0 1px 2px rgb(0 0 0 / .3); }

/* thông báo nổi */
#toasts { position: fixed; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; z-index: 100; }
.toast { padding: .7rem 1rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); box-shadow: 0 6px 20px rgb(0 0 0 / .35); max-width: 360px; font-size: 14px; }
.toast.err { border-color: var(--destructive); }

/* hộp thoại */
body.noscroll { overflow: hidden; }
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .55); display: grid; place-items: start center; overflow-y: auto; padding: 2rem .5rem; }
.modal { width: 100%; max-width: 520px; background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); box-shadow: 0 20px 60px rgb(0 0 0 / .5); }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-head .x { background: none; border: 0; color: var(--muted-fg); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.modal-body { padding: 1rem 1.1rem 1.25rem; }
.modal-body h3 { font-size: .95rem; margin: 1.1rem 0 .5rem; color: var(--primary); }
.row { display: flex; align-items: center; } .row.wrap { flex-wrap: wrap; } .gap { gap: .5rem; } .grow { flex: 1; min-width: 0; } .mt { margin-top: .6rem; }
.grid2 { display: grid; gap: .6rem; grid-template-columns: 1fr; margin-top: .6rem; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.btn.active { background: var(--primary); color: var(--primary-fg); border-color: transparent; }
.btn:disabled { opacity: .6; cursor: default; }
.plans { display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--muted); }
.plan.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.stepper { display: flex; align-items: center; gap: .4rem; }
.stepper button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--fg); font-size: 18px; cursor: pointer; }
.stepper button:disabled { opacity: .4; }
.stepper span { min-width: 1.4rem; text-align: center; font-weight: 700; }
.quote, .box { margin-top: .7rem; padding: .7rem .8rem; border-radius: var(--radius); border: 1px solid var(--border); background: color-mix(in oklch, var(--bg) 60%, var(--card)); }
.kv { display: flex; justify-content: space-between; gap: .75rem; padding: .18rem 0; font-size: 14px; }
.kv.total { border-top: 1px solid var(--border); margin-top: .3rem; padding-top: .4rem; font-size: 15px; }
.kv.total b { color: var(--primary); }
.note-box { margin-top: .6rem; padding: .55rem .7rem; border-radius: var(--radius); border: 1px solid color-mix(in oklch, var(--primary) 45%, transparent); background: color-mix(in oklch, var(--primary) 10%, transparent); font-size: 13px; }
.id-preview { margin-top: .6rem; max-width: 220px; border-radius: 8px; border: 1px solid var(--border); }
.qr-video { width: 100%; border-radius: 10px; background: #000; }
.products { display: grid; gap: .45rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .6rem; }
@media (min-width: 560px) { .products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.prod { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .4rem .5rem; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; grid-column: span 2; }
@media (min-width: 560px) { .prod { grid-column: span 1; flex-direction: column; align-items: stretch; } }
.prod-btn { display: grid; gap: 2px; text-align: left; padding: .55rem .6rem; border-radius: 10px; border: 1px solid var(--border); background: var(--muted); color: var(--fg); font: 14px var(--font); cursor: pointer; }
.prod-btn:active { transform: scale(.98); }
.xbtn { border: 0; background: color-mix(in oklch, var(--destructive) 25%, transparent); color: #fff; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; line-height: 1; }
.tabs { display: flex; gap: .25rem; margin: .8rem 0 .2rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { border: 0; background: none; color: var(--muted-fg); padding: .5rem .8rem; font: 600 14px var(--font); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--primary); border-color: var(--primary); }
.stay-head { display: grid; gap: .3rem; font-size: 14px; }
.stay-head .count { margin-left: .4rem; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
details summary { cursor: pointer; font-weight: 600; }
.list { display: grid; gap: .35rem; margin-top: .6rem; }
.list-row { display: grid; grid-template-columns: 1.3fr .8fr 1.2fr 1fr .9fr; gap: .5rem; align-items: center; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--fg); text-decoration: none; font-size: 14px; }
.list-row b:last-child { text-align: right; }
@media (max-width: 640px) { .list-row { grid-template-columns: 1fr 1fr; } }
.grid-2col { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .grid-2col { grid-template-columns: 1fr 1fr; } }

/* phiếu 80mm */
.print-area { max-width: 80mm; margin: 1rem auto; background: #fff; color: #000; padding: 4mm; border-radius: 6px; }
.receipt { font: 12px/1.35 var(--font); }
.r-text.a-c { text-align: center; } .r-text.a-r { text-align: right; } .r-text.s-2 { font-size: 15px; } .r-text.s-3 { font-size: 19px; } .b { font-weight: 700; }
.r-hr { border-top: 2px solid #000; margin: 6px 0; } .r-gap { height: 6px; }
.r-kv { display: flex; gap: 4px; } .r-kv span:first-child { width: 4rem; flex-shrink: 0; }
.r-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.r-table th, .r-table td { border: 1px solid #000; padding: 2px 4px; }
.r-table td.c0 { text-align: left; } .r-table td.c1 { text-align: center; } .r-table td.c2 { text-align: right; }
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; left: 0; top: 0; width: 80mm; margin: 0; padding: 0; border-radius: 0; }
  @page { size: 80mm auto; margin: 2mm; }
}

[hidden] { display: none !important; }

/* ---------------------------------------------------------------- bảng, trang khách, quản trị (GĐ3-5) */
.mb { margin-bottom: .8rem; }
.mt { margin-top: 1rem; }
.grow { flex: 1 1 12rem; }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; color: var(--fg); }
.tbl th, .tbl td { padding: .45rem .55rem; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.tbl thead th { background: var(--secondary); color: var(--fg); font-weight: 600; position: sticky; top: 0; z-index: 1; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, .04); }
.tbl input { width: 8.5rem; }
.sheet td.ed { cursor: text; }
.sheet td.edited { background: rgba(201, 162, 74, .22); }
.sheet td.ed:focus { outline: 2px solid var(--primary); background: rgba(201, 162, 74, .12); }
.list-row { display: flex; justify-content: space-between; gap: .6rem; align-items: center; padding: .5rem .2rem; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .8rem; }
.tab { border: 1px solid var(--border); background: var(--muted); color: var(--fg); border-radius: 999px; padding: .35rem .8rem; font: inherit; font-size: .85rem; cursor: pointer; }
.tab.active { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
/* trang ảnh khách: nền sáng, chữ tối */
body.guest { background: #f6f2e9; color: #24301f; }
.guest-head { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; background: #1f3b2c; color: #f7f3ea; flex-wrap: wrap; }
.guest-head img { width: 54px; height: 54px; border-radius: 12px; background: #fff; padding: 4px; flex: 0 0 auto; }
.guest-head > div { flex: 1 1 16rem; }
.guest-head h1 { margin: 0; font-size: 1.3rem; color: #f7f3ea; }
.guest-head .muted { color: #cfd8cd; }
.guest-head .btn { flex: 0 0 auto; }
.guest-head .btn-primary { background: #c9a24a; color: #23180a; border-color: #c9a24a; font-weight: 600; }
.guest-main { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.guest-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.room-card { background: #fff; color: #24301f; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 10px rgba(31, 59, 44, .08); display: flex; flex-direction: column; }
.room-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.room-body { padding: .7rem .8rem .9rem; display: flex; flex-direction: column; gap: .5rem; }
.room-body h3 { margin: 0; font-size: 1.05rem; color: #1f3b2c; }
.room-body .muted { color: #6d7a68; }
.room-prices { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .6rem; font-size: .85rem; }
.room-prices div { display: flex; justify-content: space-between; gap: .4rem; border-bottom: 1px dotted #e8e0d0; padding-bottom: .15rem; }
.room-prices b { color: #8a6b22; }
.room-body .btn { background: #1f3b2c; color: #f7f3ea; border-color: #1f3b2c; }
.guest-main .list-row { border-bottom: 1px dashed #d9d0bd; }
.guest-main .chip { background: #fff; color: #24301f; border: 1px solid #e2d9c6; }
.guest-main .chip-primary { background: #fff4d6; color: #6b4f10; border-color: #e2c882; }
.tier-head { margin: 1.4rem 0 .6rem; font-size: 1.1rem; color: #1f3b2c; }

/* ---------------------------------------------------------------- header 2 tầng (giống Lovable) */
.app-header { position: sticky; top: 0; z-index: 30; background: oklch(0.21 0.028 172); border-bottom: 1px solid var(--border); }
.hdr-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .55rem 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--fg); }
.brand img { width: 46px; height: 46px; border-radius: 0; background: none; padding: 0; object-fit: cover; }
.brand-text b { display: block; font-size: 1.12rem; color: var(--primary); letter-spacing: .02em; line-height: 1.1; }
.brand-text i { font-style: normal; font-size: .6rem; letter-spacing: .18em; color: var(--muted-fg); }
.hdr-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.hdr-btn { display: inline-flex; align-items: center; gap: .45rem; background: oklch(0.16 0.02 170); border: 1px solid var(--border); color: var(--fg); border-radius: .85rem; padding: .55rem .95rem; font: inherit; font-size: .88rem; cursor: pointer; }
.hdr-btn:hover { border-color: var(--primary); }
.hdr-btn.sm { padding: .32rem .7rem; font-size: .8rem; border-radius: 999px; }
.hdr-btn.danger { color: #ff9a9a; border-color: rgba(255, 90, 90, .35); }
.hdr-group { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--border); border-radius: .85rem; padding: .22rem .35rem; }
.hdr-label { display: inline-flex; align-items: center; gap: .35rem; color: var(--primary); font-size: .85rem; padding: 0 .35rem; }
.hdr-nav { display: flex; align-items: center; gap: .25rem; padding: 0 .9rem .5rem; overflow-x: auto; scrollbar-width: none; }
.hdr-nav::-webkit-scrollbar { display: none; }
.role-chip { font-family: var(--display); font-size: 1.02rem; margin-right: .55rem; white-space: nowrap; color: var(--fg); }
.nav-item { display: inline-flex; align-items: center; gap: .38rem; padding: .42rem .75rem; border-radius: .65rem; color: var(--muted-fg); text-decoration: none; white-space: nowrap; font-size: .88rem; }
.nav-item:hover { color: var(--fg); }
.nav-item.active { background: var(--secondary); color: var(--fg); }
.nav-spacer { flex: 1; }
.who { color: var(--muted-fg); font-size: .82rem; margin-right: .35rem; white-space: nowrap; }
.logout { display: inline-flex; padding: .3rem; color: var(--muted-fg); border-radius: .5rem; }
.logout:hover { color: var(--primary); }
.ico { width: 17px; height: 17px; flex: 0 0 auto; }
.page { max-width: 1180px; margin: 0 auto; padding: 1rem; }

/* thẻ / khối nội dung */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 1rem 1.15rem; }
.panel h1, .panel h2 { margin: 0 0 .5rem; }
.cards-2 { display: grid; gap: 1rem; }
@media (min-width: 900px) { .cards-2 { grid-template-columns: 1fr 1fr; } }
.stat-row { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: .8rem 0; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: .9rem 1.1rem; }
.stat-card span { display: block; color: var(--muted-fg); font-size: .85rem; }
.stat-card b { display: block; font-size: 1.7rem; font-weight: 700; margin-top: .2rem; }
.kv-line { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; padding: .3rem 0;
  font-size: .95rem; line-height: 1.35; }
.kv-line > span { flex: 1 1 auto; min-width: 0; }
.kv-line b { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-size: .95rem; font-weight: 700; white-space: nowrap; }
.kv-line.kv-strong { font-size: 1rem; }
.kv-line.kv-strong b { font-size: 1rem; }
.kv-sub { font-size: .78rem; color: var(--muted-fg); margin: -.15rem 0 .35rem; line-height: 1.3; }
.narrow { max-width: 760px; margin: 0 auto; }
.search { width: 100%; padding: .7rem .9rem; border-radius: 12px; border: 1px solid var(--input); background: var(--muted); color: var(--fg); margin: .6rem 0 1rem; }
.tabs-bar { display: flex; gap: .3rem; flex-wrap: wrap; background: oklch(0.22 0.03 172); border: 1px solid var(--border); border-radius: 999px; padding: .3rem; margin-bottom: .9rem; }
.tabs-bar .tab { border: 0; background: transparent; border-radius: 999px; padding: .45rem .95rem; color: var(--muted-fg); }
.tabs-bar .tab.active { background: var(--primary); color: var(--primary-fg); font-weight: 600; }

/* ---------------------------------------------------------------- thẻ phòng đúng bản Lovable */
.tile { min-height: 7rem; }
.tile-ov { position: absolute; inset: 0; border-radius: inherit; border: 0; background: transparent; padding: 0; cursor: pointer; }
.tile-ov:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.tile-head > span { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.badge { display: inline-flex; align-items: center; border: 0; border-radius: 4px; padding: 1px 5px; font: 700 10px var(--font); line-height: 1.4; white-space: nowrap; }
.badge-hold { background: var(--primary); color: var(--primary-fg); }
.badge-over { background: var(--st-overdue); color: #fff; cursor: pointer; }
.guest-name { margin-top: .25rem; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .tile-plan { margin-top: .1rem; font-size: 12px; color: var(--muted-fg); }
.tile .count { margin-top: .25rem; font: 600 14px var(--mono); font-variant-numeric: tabular-nums; }
.tile .count.over { color: var(--st-overdue); }
.tile .sum { font-size: 12px; font-weight: 600; }
.res-lines { margin-top: .25rem; }
.res-lines .res { font-size: 11px; color: var(--primary); white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.tile-actions { display: flex; align-items: center; gap: .25rem; margin-top: auto; padding-top: .5rem; }
.tile-actions .mini { display: inline-flex; align-items: center; gap: .25rem; }
.icon-btn { opacity: 0; transition: opacity .15s ease; border: 0; background: transparent; color: var(--muted-fg); padding: .15rem .2rem; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1; }
.tile:hover .icon-btn, .icon-btn:focus-visible { opacity: 1; }

/* ---------------------------------------------------------------- khớp số đo với bản Lovable */
.page { max-width: 1280px; padding: .45rem .75rem; }
.hdr-top { padding: .75rem .75rem; }
.brand img { width: 62px; height: 62px; border-radius: 0; padding: 0; background: none; object-fit: cover; }
.brand-text b { font-size: 1.35rem; }
.hdr-btn { padding: .95rem 1.1rem; font-size: .95rem; border-radius: .9rem; }
.hdr-btn.sm { padding: .32rem .72rem; font-size: .82rem; height: 32px; }
.hdr-group { padding: .35rem .5rem; border-radius: .9rem; gap: .5rem; }
.hdr-label { font-size: .95rem; }
.hdr-nav { padding: 0 .75rem .55rem; gap: .3rem; }
.nav-item { padding: .5rem .8rem; font-size: .92rem; border-radius: .7rem; }
.role-chip { font-size: 1.05rem; margin-right: .8rem; }
.chips { gap: .6rem; }
.chip { height: 22px; font-size: .78rem; padding: 0 .55rem; gap: .3rem; }
#board section h2 { display: none; }
#board section + section { margin-top: .5rem; }
.tile { padding: .75rem; }
.prices { line-height: 1.3; }
.tile .count { line-height: 1.35; }
.hdr-top { padding: .65rem .75rem; }
.hdr-btn { padding: 1.15rem .95rem; gap: .4rem; }
.hdr-btn.sm { padding: .32rem .7rem; }
.prices { line-height: 1.42; }
.page { padding: 1rem .75rem; }
.hdr-group { min-width: 343px; }
.hdr-label { flex: 1 1 auto; }
#counts { margin-bottom: .6rem; }
/* hàng nav canh giữa theo khung 1280 giống bản gốc; hàng tiêu đề full-width */
.hdr-top { padding: .65rem 1.5rem; }
.hdr-nav { max-width: 1280px; margin: 0 auto; padding: .5rem .75rem .55rem; }
.nav-item { padding: .5rem .72rem; }

/* ---------------------------------------------------------------- hộp thoại nhận phòng (bố cục Lovable) */
.plans-grid { display: grid; gap: .5rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 560px) { .plans-grid { grid-template-columns: repeat(4, 1fr); } }
.plan-card { border: 1px solid var(--border); border-radius: 12px; padding: .5rem; display: flex; flex-direction: column; gap: .35rem; }
.plan-card.on { border-color: var(--primary); background: color-mix(in oklch, var(--primary) 12%, transparent); }
.plan-name { border: 0; background: transparent; color: var(--fg); text-align: left; padding: .2rem; border-radius: 8px; cursor: pointer; display: block; width: 100%; }
.plan-name:hover { background: color-mix(in oklch, var(--muted) 60%, transparent); }
.plan-name b { display: block; font-size: .88rem; font-weight: 600; }
.plan-name span { display: block; font-size: .75rem; color: var(--muted-fg); }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: .25rem; }
.stepper button { width: 2rem; height: 2rem; border-radius: 8px; border: 1px solid var(--input); background: transparent; color: var(--fg); font-size: 1rem; line-height: 1; cursor: pointer; }
.stepper button:disabled { opacity: .45; cursor: default; }
.stepper span { min-width: 1.6rem; text-align: center; font-weight: 600; }
.stepper span.zero { color: var(--muted-fg); font-weight: 400; }
.chosen-box { margin-top: .5rem; border: 1px solid var(--primary); background: color-mix(in oklch, var(--primary) 18%, transparent); border-radius: 12px; padding: .5rem .65rem; font-size: .88rem; font-weight: 600; }
.quote-box { margin-top: .6rem; border-radius: 12px; padding: .75rem; font-size: .88rem; background: var(--muted); }
.quote-bad { border-radius: 12px; padding: .1rem; color: #ff9a9a; font-weight: 500; }
.quote-line b { font-weight: 700; }
.quote-parts { margin: .4rem 0 0; padding-left: 1.1rem; color: var(--muted-fg); font-size: .8rem; }
.prepay { margin-top: .45rem; border-radius: 8px; padding: .3rem .5rem; font-weight: 700; }
.prepay.soon { border: 1px solid var(--primary); background: color-mix(in oklch, var(--primary) 22%, transparent); }
.ok-box { margin-top: .5rem; border: 1px solid var(--st-vacant); background: color-mix(in oklch, var(--st-vacant) 15%, transparent); border-radius: 12px; padding: .5rem .65rem; font-size: .88rem; font-weight: 600; }
.hint-box { margin-top: .5rem; border: 1px solid var(--primary); background: color-mix(in oklch, var(--primary) 15%, transparent); border-radius: 12px; padding: .6rem .7rem; font-size: .88rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.id-box { margin-top: .7rem; border: 1px dashed var(--border); border-radius: 12px; padding: .6rem .7rem; display: flex; align-items: center; gap: .6rem; }
.id-box img { width: 128px; height: 80px; border-radius: 10px; object-fit: cover; }
.id-thumb { width: 128px; height: 80px; border-radius: 10px; background: var(--muted); display: grid; place-items: center; color: var(--muted-fg); font-size: 1.2rem; }
.linkish { border: 0; background: transparent; color: var(--primary); font-size: .78rem; padding: .15rem 0; cursor: pointer; text-decoration: underline; }
.grid2 .span2 { grid-column: 1 / -1; }
.grid2 .hidden-cell { display: none; }
@media (min-width: 560px) { .grid2 .hidden-cell { display: block; } }
.order-box { margin-top: .6rem; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.order-head { width: 100%; display: flex; align-items: center; gap: .45rem; padding: .7rem .8rem; background: transparent; border: 0; color: var(--fg); font: 600 .9rem var(--font); text-align: left; cursor: pointer; }
.order-head [data-caret] { margin-left: auto; transition: transform .15s; }
.order-box .products { border-top: 1px solid var(--border); padding: .6rem; }
.btn.danger { background: var(--st-overdue); border-color: var(--st-overdue); color: #fff; }

/* ---------------------------------------------------------------- hộp thoại phòng có khách */
.stay-title-row { display: flex; align-items: center; gap: .6rem; justify-content: space-between; }
.stay-title { margin: 0; font-size: 1.05rem; }
.danger-box { margin-top: .6rem; border: 1px solid color-mix(in oklch, var(--st-overdue) 55%, transparent); background: color-mix(in oklch, var(--st-overdue) 12%, transparent); border-radius: 12px; padding: .65rem .75rem; display: grid; gap: .5rem; font-size: .88rem; }
.btn.sm-danger { }
.info-box { margin-top: .6rem; display: grid; gap: .35rem; grid-template-columns: 1fr 1fr; background: var(--muted); border-radius: 12px; padding: .7rem .8rem; font-size: .88rem; }
.info-box > div:first-child { grid-column: 1 / -1; }
@media (min-width: 560px) { .info-box > div:first-child { grid-column: auto; } }
.chip-btn { border: 1px solid var(--primary); color: var(--primary); background: transparent; border-radius: 6px; padding: .1rem .45rem; font-size: .75rem; cursor: pointer; }
.dep-box { grid-column: 1 / -1; border: 1px solid var(--border); background: var(--card); border-radius: 10px; padding: .55rem .6rem; }
.card-panel { margin-top: .6rem; border: 1px solid var(--border); border-radius: 12px; padding: .6rem .7rem; display: grid; gap: .45rem; }
.card-head { display: flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .9rem; }
.stay-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; background: var(--muted); border-radius: 12px; padding: .25rem; margin-top: .8rem; }
@media (min-width: 620px) { .stay-tabs { grid-template-columns: repeat(5, 1fr); } }
.stay-tabs .tab { border: 0; background: transparent; border-radius: 9px; padding: .45rem .3rem; color: var(--muted-fg); font-size: .82rem; }
.stay-tabs .tab.active { background: var(--card); color: var(--fg); font-weight: 600; }
.stay-receipt { border: 1px solid var(--border); border-radius: 12px; padding: .7rem .8rem; font-size: .88rem; }
.rc-row { display: flex; justify-content: space-between; gap: .6rem; padding: .18rem 0; align-items: center; }
.rc-row b { font-variant-numeric: tabular-nums; }
.rc-row.total { border-top: 1px dashed var(--border); margin-top: .3rem; padding-top: .45rem; font-weight: 700; }

/* ---------------------------------------------------------------- bảng ngày (Lovable) */
.big-num { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.tbl.sheet2 { font-size: .82rem; }
.tbl.sheet2 th, .tbl.sheet2 td { padding: .28rem .45rem; white-space: nowrap; }
.tbl.sheet2 thead tr.sub th { font-size: .72rem; color: var(--muted-fg); font-weight: 500; }
.tbl.sheet2 td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl.sheet2 tr.sum td { font-weight: 700; border-top: 1px solid var(--border); background: color-mix(in oklch, var(--muted) 60%, transparent); }
.tbl.sheet2 td.edited { background: color-mix(in oklch, var(--primary) 22%, transparent); }
.tbl.sheet2 td.b { font-weight: 600; }

/* ---------------------------------------------------------------- đặt phòng (2 cột) */
.reserve-grid { display: grid; gap: 1.5rem; max-width: 1040px; margin: 0 auto; }
@media (min-width: 900px) { .reserve-grid { grid-template-columns: 1fr 1fr; } }
.reserve-grid .panel { display: grid; gap: .5rem; align-content: start; }
.hold-card { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--border); border-radius: 12px; padding: .7rem .8rem; cursor: pointer; }
.hold-card.on { border-color: var(--primary); background: color-mix(in oklch, var(--primary) 18%, transparent); }
.hold-card.off { opacity: .55; cursor: default; }
.hold-card span b { display: block; font-size: .9rem; }
.hold-card span i { display: block; font-style: normal; font-size: .78rem; color: var(--muted-fg); }
.hold-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; border: 1px solid var(--primary); background: color-mix(in oklch, var(--primary) 10%, transparent); border-radius: 12px; padding: .65rem .8rem; margin-bottom: .6rem; }
.res-card { border: 1px solid var(--border); background: var(--card); border-radius: 12px; padding: .7rem .8rem; margin-bottom: .6rem; }
.res-card.expired { opacity: .8; border-style: dashed; }

/* ---------------------------------------------------------------- điện thoại: không tràn viền */
@media (max-width: 640px) {
  .hdr-top { padding: .55rem .6rem; gap: .45rem; }
  .brand img { width: 48px; height: 48px; border-radius: 12px; }
  .brand-text b { font-size: 1.05rem; }
  .brand-text i { font-size: .55rem; letter-spacing: .14em; }
  /* Thu chi + Thẻ từ nằm cùng một hàng, cuộn ngang (giống bản gốc) */
  .hdr-actions { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: .15rem; scrollbar-width: none; }
  .hdr-actions::-webkit-scrollbar { display: none; }
  .hdr-btn { padding: .55rem .8rem; font-size: .85rem; }
  .hdr-btn.sm { padding: .28rem .6rem; font-size: .78rem; height: 30px; }
  .hdr-group { min-width: 0; padding: .25rem .4rem; gap: .35rem; }
  .hdr-label { font-size: .85rem; }
  .hdr-nav { padding: .35rem .6rem .45rem; gap: .2rem; }
  .role-chip { font-size: .95rem; margin-right: .4rem; }
  .nav-item { padding: .4rem .6rem; font-size: .84rem; }
  .page { padding: .6rem; }
  .chips { gap: .4rem; }
  .chip { font-size: .8rem; height: 27px; padding: .1rem .6rem; }
  .tile { padding: .6rem; }
  .modal { width: calc(100vw - 16px) !important; max-width: calc(100vw - 16px); }
  .modal-body { padding: .7rem; }
  .campaign, .stats, .cards-2, .reserve-grid { gap: .7rem; }
  .stat-card b { font-size: 1.35rem; }
  .big-num { font-size: 1.35rem; }
  .table-wrap { border-radius: 10px; }
}
@media (max-width: 640px) {
  .tabs-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-radius: 14px; }
  .tabs-bar::-webkit-scrollbar { display: none; }
  .tabs-bar .tab { white-space: nowrap; flex: 0 0 auto; }
  .stay-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
  .stay-tabs::-webkit-scrollbar { display: none; }
  .stay-tabs .tab { flex: 0 0 auto; white-space: nowrap; }
  .plans-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reserve-grid .panel { padding: .8rem; }
  .info-box { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
}
/* Grid item không được phình theo nội dung bảng (nguyên nhân tràn ngang trên điện thoại) */
.cards-2 > *, .reserve-grid > *, .grid > *, .stat-row > *, .page > *, #page-root > *, .panel > * { min-width: 0; }
.table-wrap { max-width: 100%; }
table.tbl { max-width: none; }
@media (max-width: 640px) {
  .stay-tabs { flex-wrap: nowrap !important; }
  .stay-tabs .tab { padding: .45rem .5rem; }
  .card-head { flex-wrap: wrap; row-gap: .25rem; }
  .card-head .muted { white-space: nowrap; }
  .danger-box .row { flex-wrap: wrap; }
  .info-box { gap: .25rem; }
}

/* Nút hành động & badge phải nằm TRÊN lớp phủ bấm-cả-thẻ, nếu không bấm sẽ trúng overlay */
.tile-actions, .tile .badge, .tile .badge-over, .tile .icon-btn { position: relative; z-index: 10; }

/* Thanh nút trang hoá đơn: 3 nút cùng 1 hàng trên điện thoại */
.inv-bar { display: flex; align-items: center; gap: .4rem; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: none; }
.inv-bar::-webkit-scrollbar { display: none; }
.inv-bar .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 480px) {
  .inv-bar { gap: .3rem; }
  .inv-bar .btn { padding: .45rem .6rem; font-size: .78rem; }
}
.inv-bar .btn { display: inline-flex; align-items: center; justify-content: center; height: 32px; }

/* Form thêm món: gọn 1–2 hàng trên điện thoại */
.np-form { display: grid; gap: .45rem; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.np-form [data-np-name] { grid-column: span 3; }
.np-form [data-np-unit] { grid-column: span 3; }
.np-form [data-np-price] { grid-column: span 2; }
.np-form [data-np-stock] { grid-column: span 2; }
.np-form [data-p-add] { grid-column: span 2; width: 100%; }
@media (min-width: 641px) {
  .np-form { grid-template-columns: minmax(0, 2fr) 8rem 9rem 6rem auto; }
  .np-form > * { grid-column: auto; }
}

/* ---------------------------------------------------------------- hàng nút / form xếp gọn, không rớt hàng lẻ */
.row { row-gap: .45rem; }
@media (max-width: 640px) {
  /* form 2 cột đều nhau: 2 ô mỗi hàng, nút nằm cùng hàng cuối */
  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
  .form-grid > .wide { grid-column: 1 / -1; }
  /* nhóm nút hành động trong hộp thoại phòng */
  .act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
  .act-grid > .full { grid-column: 1 / -1; }
  .card-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
  .card-actions .btn { width: 100%; padding: .5rem .3rem; font-size: .78rem; }
}
@media (max-width: 640px) {
  /* form thu thêm cọc: tiền cọc 1 hàng, 2 nút nhanh cùng hàng, hình thức 2 nút cùng hàng */
  .dep-row { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
  .dep-row > input { grid-column: 1 / -1; }
  .dep-row > .btn { width: 100%; }
  .dep-row > .grow, .dep-row > .spacer { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .card-actions .btn { white-space: nowrap; font-size: .74rem; padding: .5rem .2rem; }
}

/* Hàng chọn ngày của Bảng ngày: luôn 1 hàng, không rớt nút */
.day-nav { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .4rem; align-items: center; }
.day-nav .btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; height: 36px; }
.day-nav input[type="date"] { width: 100%; min-width: 0; }
@media (max-width: 420px) {
  .day-nav .lbl { display: none; }
  .day-nav .btn { padding: .4rem .55rem; font-size: .9rem; }
}
.day-nav input[type="date"] { height: 36px; padding: .2rem .5rem; }

/* Sửa hoá đơn: ô chọn món + SL nằm cùng 1 hàng */
.item-add { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem; gap: .45rem; align-items: center; }
.item-add select, .item-add input { width: 100%; min-width: 0; }
.item-add select, .item-add input { height: 40px; padding: .3rem .6rem; }

/* Tab Dịch vụ trong hộp thoại phòng: món xếp 2 cột, không chiếm cả hàng */
.products.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
@media (min-width: 560px) { .products.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.products.compact .prod { grid-column: span 1; padding: 0; border: 0; background: transparent; display: block; }
.products.compact .prod-btn { width: 100%; padding: .5rem .55rem; font-size: .82rem; }
.products.compact .prod-btn b { font-size: .86rem; }
.products.compact .prod-btn span { font-size: .78rem; color: var(--muted-fg); display: block; }

/* Nút Nhận phòng nhanh trên thẻ phòng (hiện khi rê chuột, cạnh nút Bảo trì) */
.icon-btn.quick-in { font-size: 11px; font-weight: 600; letter-spacing: .01em; padding: .18rem .45rem;
  border: 1px solid var(--border); background: var(--card); color: var(--primary); white-space: nowrap; }
.icon-btn.quick-in:hover { background: var(--primary); color: #12211a; }
@media (hover: none) { .tile .icon-btn { opacity: 1; } }   /* máy cảm ứng không có hover: luôn hiện */

/* Giữ Bảo trì + Nhận phòng trên CÙNG một hàng, không rớt dòng */
.tile-actions { flex-wrap: nowrap; overflow: hidden; }
.tile-actions .icon-btn { flex: 0 0 auto; }
.icon-btn.quick-in { font-size: 10px; padding: .12rem .3rem; }
.icon-btn.quick-in { flex: 1 1 auto; min-width: 0; padding: .12rem .22rem; text-overflow: ellipsis; }

/* Dòng "Đã cọc" trên thẻ phòng */
.tile .depo { font-size: 11.5px; font-weight: 600; color: var(--primary); margin-top: .05rem; }
.tile .depo.none { color: var(--muted-fg); font-weight: 400; }
.tile .depo { font-size: 11px; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }

/* Lịch sử cấp thẻ: mặc định thu gọn, bấm mới mở */
.hist-box { margin-top: .6rem; border-top: 1px solid var(--border); padding-top: .4rem; }
.hist-box > summary { cursor: pointer; font-weight: 600; font-size: .95rem; padding: .25rem 0; list-style: none; }
.hist-box > summary::-webkit-details-marker { display: none; }
.hist-box > summary::before { content: "▸ "; }
.hist-box[open] > summary::before { content: "▾ "; }

/* Bảng thông tin thẻ — góc phải dưới */
#card-pop.card-pop { position: fixed; right: 1rem; bottom: 1rem; z-index: 120; min-width: 250px; max-width: 330px;
  background: #14332b; color: #eef1e6; border: 1px solid rgba(217,178,95,.55); border-radius: 12px;
  padding: .6rem .75rem .55rem; box-shadow: 0 10px 28px rgb(0 0 0 / .5); }
#card-pop.card-pop.ok { border-color: rgba(120,200,140,.65); }
#card-pop.card-pop.err { border-color: rgba(225,95,95,.75); }
#card-pop h4 { margin: 0 .0 .35rem; font-size: .95rem; color: #d9b25f; padding-right: 1.4rem; }
#card-pop .cp-row { display: flex; justify-content: space-between; gap: .7rem; font-size: .85rem; line-height: 1.35; }
#card-pop .cp-row span { color: #9fb0a8; }
#card-pop .cp-row b { color: #f0e2b8; white-space: nowrap; }
#card-pop .cp-x { position: absolute; top: .3rem; right: .35rem; border: 0; background: transparent;
  color: #9fb0a8; font-size: 1.1rem; line-height: 1; cursor: pointer; }

/* Điện thoại: 5 chip trạng thái nằm chung 1 hàng (PC giữ nguyên, có thể xuống dòng) */
@media (max-width: 640px) {
  #counts { flex-wrap: nowrap; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
  #counts::-webkit-scrollbar { display: none; }
  #counts .chip { font-size: .66rem; height: 20px; padding: 0 .34rem; gap: .18rem; white-space: nowrap; flex: 0 0 auto; }
  #counts .chip .dot { width: 7px; height: 7px; }
}

/* So sánh gói trong hộp thoại nhận phòng */
.compare-box { border: 1px solid var(--border); border-radius: 10px; padding: .5rem .6rem; margin: .45rem 0; background: rgba(255,255,255,.02); }
.cmp-list { display: grid; gap: .3rem; margin-top: .35rem; }
.cmp-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; width: 100%;
  border: 1px solid var(--border); background: var(--card); color: var(--fg);
  border-radius: 8px; padding: .38rem .55rem; font-size: .86rem; cursor: pointer; text-align: left; }
.cmp-row b { color: var(--primary); white-space: nowrap; }
.cmp-row.best { border-color: color-mix(in oklch, var(--primary) 60%, transparent); background: color-mix(in oklch, var(--primary) 10%, transparent); }
.cmp-row:active { transform: scale(.995); }

/* Dấu ★ ở gói rẻ nhất */
.plan-star { font-style: normal; color: var(--primary); font-size: .95rem; }
.plan-card.best { border-color: color-mix(in oklch, var(--primary) 55%, transparent); }

/* Khách tự đặt qua web — khối trong trang Đặt phòng */
.web-list { display: grid; gap: .5rem; }
.web-row { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: .5rem; background: var(--card); }
.web-proof { width: 86px; height: 86px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }
.web-proof.empty { display: flex; align-items: center; justify-content: center; font-size: .7rem; color: var(--muted-fg); text-align: center; }

/* Khối đặt web: không được tràn ngang trên màn hẹp */
[data-web-block] { max-width: 100%; min-width: 0; overflow: hidden; }
.web-list { min-width: 0; }
.web-row { min-width: 0; }
.web-row > .grow { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }

/* Khối đặt web trong cột phải */
[data-web-block] { margin: 0 0 .8rem; }
[data-web-block] .web-row.cxl { opacity: .55; }
[data-web-block] .web-row { align-items: center; }
/* Nút menu Đặt phòng nhấp nháy đỏ khi có đơn web mới */
.nav-item.has-web { position: relative; color: #ff8a7a !important; animation: webBlink 1.1s infinite; }
.nav-item.has-web::after { content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%;
  background: #ff4d4d; box-shadow: 0 0 6px #ff4d4d; }
@keyframes webBlink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Ghi chú phòng (tủ lạnh, giường đôi…) cạnh số phòng */
.tile-note { font-style: normal; font-size: 10px; color: var(--muted-fg); margin-left: .35rem; font-weight: 500; white-space: nowrap; }
@media (max-width: 640px) { .tile-note { font-size: 9px; } }

/* Ghi chú phòng gọn trong hàng đầu thẻ, không đẩy chấm trạng thái */
.tile-head { gap: .3rem; }
.tile-head > span { min-width: 0; overflow: hidden; display: flex; align-items: baseline; gap: .3rem; }
.tile-head .tile-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tile-head .dot { flex: 0 0 auto; }

/* Chấm trạng thái ra khỏi luồng → ghi chú có trọn chỗ trên cùng hàng */
.tile-head { position: relative; padding-right: 12px; }
.tile-head .dot { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.tile-head > span { width: 100%; }
.tile-head .tile-note { font-size: 9px; }

/* Vừa đủ chỗ cho ghi chú 2 chữ trên cùng hàng */
.tile-head { padding-right: 10px; }
.tile-head .tile-note { font-size: 8px; margin-left: .2rem; letter-spacing: -.1px; }

/* Thu số phòng lại một chút ở thẻ có ghi chú, để ghi chú hiện đủ chữ */
.tile:has(.tile-note) .code { font-size: 15px; }
.tile-head .tile-note { font-size: 8.5px; }
.tile-head { padding-right: 13px; }

/* Thẻ có ghi chú: thu số phòng nhỏ hơn để ghi chú hiện đủ chữ */
.tile:has(.tile-note) .code { font-size: 14px; }
.tile-head .tile-note { font-size: 8px; letter-spacing: 0; }

/* Ô chọn ngày trong Quản trị: giữ bề rộng đều khi chưa chọn */
input[type="date"][data-from], input[type="date"][data-to] { min-width: 9.5rem; }

/* Nút "Thu tiền ngay" khi gọi món */
.products + .rc-row, .rc-row .muted.small { white-space: nowrap; }

/* Dịch vụ: 2 cột — chưa trả / đã trả tiền ngay */
.order2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; align-items: start; }
.order-col { border: 1px solid var(--border); border-radius: 10px; padding: .6rem .65rem; background: rgba(255,255,255,.02); min-width: 0; }
.order-col.paid { border-color: color-mix(in oklch, var(--primary) 55%, transparent); background: rgba(217,178,95,.06); }
.order-col h4 { margin: .1rem 0 .45rem; font-size: .92rem; display: flex; gap: .35rem; align-items: baseline; flex-wrap: wrap; }
.order-col h4.mt { margin-top: .6rem; }
.order-col .gold { color: var(--primary); }
.order-col .products.compact { grid-template-columns: 1fr; }
@media (max-width: 720px) { .order2 { grid-template-columns: 1fr; } }

/* Món + bộ đếm nằm chung 1 hàng (kể cả màn rộng) */
@media (min-width: 560px) { .prod { flex-direction: row; align-items: center; } }
.prod > span { min-width: 0; flex: 1 1 auto; }
.prod .stepper { flex: 0 0 auto; }

/* Trong cột chọn món: mỗi món 1 hàng, tên bên trái — bộ đếm bên phải */
.order-col .products { grid-template-columns: 1fr; margin-top: .35rem; }
.order-col .products .prod { grid-column: span 1; }

/* Bảng ngày kiểu Excel: kẻ ô dọc + ngang, ghim cột Phòng và Gói khi kéo ngang */
/* Cột Phòng hẹp vừa đủ; cột Gói rộng tới hết chữ "Ngày và đêm" rồi tự xuống dòng */
.tbl.sheet2 tr > :nth-child(1) { width: 3rem; min-width: 3rem; max-width: 3rem; text-align: center; padding-left: .2rem; padding-right: .2rem; }
.tbl.sheet2 tr > :nth-child(2) { left: 3rem; width: 7.4rem; min-width: 7.4rem; max-width: 7.4rem; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
.tbl.sheet2 { border-collapse: separate; border-spacing: 0; --grid: color-mix(in oklch, var(--border) 55%, var(--fg) 45%); }
.tbl.sheet2 th, .tbl.sheet2 td { border-right: 1px solid var(--grid); border-bottom: 1px solid var(--grid); }
.tbl.sheet2 tr > :first-child { border-left: 1px solid var(--grid); }
.tbl.sheet2 thead tr:first-child th { border-top: 1px solid var(--grid); }
.tbl.sheet2 tr > :nth-child(1), .tbl.sheet2 tr > :nth-child(2) { position: sticky; z-index: 2; background: var(--card); }
.tbl.sheet2 tr > :nth-child(1) { left: 0; width: 3rem; min-width: 3rem; max-width: 3rem; box-sizing: border-box; }
.tbl.sheet2 tr > :nth-child(2) { border-right: 2px solid var(--grid); }
.tbl.sheet2 thead tr > :nth-child(1), .tbl.sheet2 thead tr > :nth-child(2) { background: var(--secondary); z-index: 4; }
.tbl.sheet2 tbody tr:hover > :nth-child(1), .tbl.sheet2 tbody tr:hover > :nth-child(2) { background: color-mix(in oklch, var(--card) 92%, white); }
.tbl.sheet2 td.edited { background: color-mix(in oklch, var(--primary) 22%, var(--card)); }
.tbl.sheet2 tr.sum > td { background: color-mix(in oklch, var(--muted) 60%, var(--card)); }
.tbl.sheet2 tr.sum > :nth-child(1), .tbl.sheet2 tr.sum > :nth-child(2) { background: color-mix(in oklch, var(--muted) 60%, var(--card)); }

/* Đặt phòng: thanh khách đặt trong 24h, nhãn trên ô phòng, lịch phòng */
.today-res { border: 1px solid var(--primary); background: color-mix(in oklch, var(--primary) 10%, var(--card)); border-radius: 14px; padding: .7rem .85rem; margin-bottom: 1rem; display: grid; gap: .35rem; }
.today-row { display: flex; gap: .55rem; align-items: center; font-size: 13px; padding: .3rem .1rem; border-top: 1px dashed var(--border); flex-wrap: wrap; }
.today-row .t { font-variant-numeric: tabular-nums; min-width: 6.5rem; }
.today-row.due .st { color: #4ade80; } .today-row.soon .st { color: var(--primary); } .today-row.noshow { color: #f8a; }
.res.res-soon { background: color-mix(in oklch, var(--primary) 22%, transparent); border-radius: 6px; padding: 1px 4px; font-weight: 600; white-space: normal; }
.res.res-noshow { color: #f8a; font-weight: 600; white-space: normal; }
.cal-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.cal { position: relative; font-size: 12px; }
.cal-row { display: flex; border-bottom: 1px solid color-mix(in oklch, var(--border) 60%, transparent); height: 34px; position: relative; }
.cal-head { position: sticky; top: 0; z-index: 3; background: var(--secondary); height: 38px; }
.cal-room { position: sticky; left: 0; z-index: 2; width: 54px; min-width: 54px; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--card); border-right: 2px solid var(--border); }
.cal-head .cal-room { background: var(--secondary); }
.cal-day { width: 64px; min-width: 64px; border-right: 1px solid color-mix(in oklch, var(--border) 60%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.cal-day.today { background: color-mix(in oklch, var(--primary) 14%, transparent); }
.cal-day.wk { color: #f9a8a8; }
.cal-bar { position: absolute; top: 4px; height: 26px; border-radius: 6px; padding: 0 6px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; font-size: 11px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px rgb(0 0 0 / .35); }
.cal-bar.res { background: oklch(0.62 0.12 75); color: #1b1300; }
.cal-bar.stay { background: oklch(0.55 0.13 160); color: #fff; }
.cal-bar.noshow { background: oklch(0.6 0.16 15); color: #fff; }
.cal-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #ef4444; z-index: 1; pointer-events: none; }
.res-card.due { border-color: #4ade80; } .res-card.soon { border-color: var(--primary); } .res-card.noshow { border-color: #f87171; background: color-mix(in oklch, #f87171 8%, var(--card)); }
.res-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }

.reserve-grid.cal-first > section:last-child { order: -1; }
@media (min-width: 900px) { .reserve-grid.cal-first { grid-template-columns: 1fr; } }

.tile-head .amen { display: block; font-size: 9.5px; line-height: 1.15; font-style: normal; font-weight: 600; color: var(--primary); opacity: .95; white-space: normal; margin-top: 1px; }

/* Tiện nghi trên ô phòng: cùng hàng với số phòng, không xuống dòng */
.tile-head > span { flex-wrap: nowrap; }
.tile-head .amen { display: inline-block; font-size: 9.5px; line-height: 1.1; font-style: normal; font-weight: 700;
  color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; min-width: 0; flex: 0 1 auto; }
.tile-head .code { flex: 0 0 auto; }

/* Dòng tiền cuối hoá đơn: phải thu = đỏ nháy, hoàn lại khách = xanh lá nháy */
@keyframes hgBlink { 0%, 100% { opacity: 1 } 50% { opacity: .34 } }
.due-pay, .due-pay span, .due-pay b { color: #ff5766 !important; animation: hgBlink 1.15s ease-in-out infinite; }
.due-refund, .due-refund span, .due-refund b { color: #4ade80 !important; animation: hgBlink 1.15s ease-in-out infinite; }

/* Chọn món trong hộp thoại phòng: ô nhỏ vừa tên + giá, xếp nhiều ô một hàng */
.products.compact { display: flex; flex-wrap: wrap; gap: .34rem; }
.products.compact .prod { flex: 0 0 auto; display: block; padding: 0; border: 0; background: transparent; }
.products.compact .prod-btn { display: flex; flex-direction: column; gap: 0; padding: .28rem .5rem; border-radius: 8px; font-size: 12.5px; line-height: 1.25; }
.products.compact .prod-btn b { font-weight: 700; }
.products.compact .prod-btn span { font-size: .72rem; opacity: .82; font-weight: 500; }




/* ---- Giao chủ: tên + huy hiệu một hàng, cụm chọn ngày xuống dòng dưới ---- */
.day-head { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.day-head .day-top { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.day-head .day-title { margin: 0; white-space: nowrap; font-size: 1.5rem; }
.day-head .day-nav { display: flex; align-items: center; gap: .4rem; flex-wrap: nowrap; margin: 0; }
.day-head .day-nav input[type="date"],
.day-head .day-pick { width: 10rem; min-width: 10rem; flex: 0 0 auto; }
.day-head .day-nav .btn { flex: 0 0 auto; }
@media (max-width: 560px) { .day-head .day-title { font-size: 1.25rem; } }

/* Bảng lịch sử giao chủ: thu gọn để đủ cột nút thao tác trên màn 1366 */
.cards-2 .tbl { font-size: .84rem; }
.cards-2 .tbl th, .cards-2 .tbl td { padding: .35rem .45rem; }
.cards-2 .tbl .btn-sm { padding: .2rem .45rem; font-size: .78rem; }

/* Gọi món trong hộp nhận phòng: hàng gọn, nhiều món một hàng */
.products .prod { padding: .26rem .45rem; font-size: 12.5px; gap: .35rem; border-radius: 8px; }
.products .prod > span { display: flex; align-items: baseline; gap: .3rem; min-width: 0; }
.products .prod > span i { font-style: normal; font-size: .72rem; opacity: .8; }
.products .prod .stepper { gap: .18rem; }
.products .prod .stepper button { width: 24px; height: 24px; font-size: 14px; border-radius: 6px; }
.products .prod .stepper span { min-width: 1.15rem; font-size: 12.5px; }
@media (min-width: 760px) { .products { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }

/* Gọi món: ô nhỏ vừa tên + giá, bấm vào ô là thêm 1 (giống tab Dịch vụ) */
.order2 .products { display: flex; flex-wrap: wrap; gap: .4rem; }
.order2 .prod.pchip { flex: 0 0 auto; display: block; padding: 0; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: transparent; }
.order2 .prod.pchip.on { border-color: var(--primary); }
.order2 .prod-tap { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: .32rem .55rem; border: 0; background: transparent; color: var(--fg); font: inherit; cursor: pointer; text-align: left; }
.order2 .prod-tap b { font-size: 12.5px; font-weight: 700; }
.order2 .prod-tap span { font-size: .72rem; opacity: .85; }
.order2 .stepper.mini { justify-content: center; gap: .25rem; padding: 0 .3rem .28rem; }
.order2 .stepper.mini button { width: 20px; height: 20px; font-size: 12px; border-radius: 6px; }
.order2 .stepper.mini span { min-width: 1rem; font-size: 12px; }


/* Trang Hoá đơn: các cột thẳng hàng, không co giãn theo độ dài chữ */
.list-row.hd-row { display: grid; grid-template-columns: 9.8rem 5.8rem minmax(0,2.6fr) 7.2rem 6.6rem;
  gap: .6rem; align-items: center; justify-content: initial; flex-wrap: nowrap; border-bottom: 1px dashed var(--border); }
.list-row.hd-row .hd-guest { white-space: normal; overflow-wrap: anywhere; line-height: 1.22; font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-row.hd-row .hd-at { text-align: left; font-variant-numeric: tabular-nums; }
.list-row.hd-row .hd-sum { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 820px) {
  .list-row.hd-row { grid-template-columns: 1fr auto; row-gap: .15rem; }
  .list-row.hd-row .hd-guest { grid-column: 1 / -1; }
}

/* ---- Bảng ngày (sheet-clean): kẻ ô kiểu Excel + ghim cột Phòng, cột Gói rộng để đỡ xuống dòng ---- */
.tbl.sheet-clean { border-collapse: separate; border-spacing: 0; font-size: .82rem; table-layout: fixed; width: auto; min-width: 66rem; }
.tbl.sheet-clean th, .tbl.sheet-clean td { padding: .3rem .45rem; border-right: 1px solid color-mix(in oklch, var(--border) 70%, var(--fg) 16%);
  border-bottom: 1px solid color-mix(in oklch, var(--border) 80%, var(--fg) 8%); vertical-align: top; }
.tbl.sheet-clean thead th { background: var(--card); font-size: .72rem; font-weight: 600; color: var(--muted-fg);
  white-space: normal !important; line-height: 1.15; overflow-wrap: anywhere; }
.tbl.sheet-clean tr > :last-child { border-right: 0; }
.tbl.sheet-clean td.num, .tbl.sheet-clean th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.tbl.sheet-clean tr > :nth-child(1) { width: 5.6rem; }   /* Phòng */
.tbl.sheet-clean tr > :nth-child(2) { width: 9.5rem; }   /* Gói viết tắt + số lượng + tiền */
.tbl.sheet-clean tr > :nth-child(3) { width: 6.6rem; }   /* Vào */
.tbl.sheet-clean tr > :nth-child(4) { width: 6.6rem; }   /* Ra */
.tbl.sheet-clean tr > :nth-child(5) { width: 8.6rem; }   /* Phụ thu giờ */
.tbl.sheet-clean tr > :nth-child(6),
.tbl.sheet-clean tr > :nth-child(7) { width: 5.6rem; }   /* Cọc TM / CK */
.tbl.sheet-clean tr > :nth-child(8),
.tbl.sheet-clean tr > :nth-child(8),
.tbl.sheet-clean tr > :nth-child(9),
.tbl.sheet-clean tr > :nth-child(10),
.tbl.sheet-clean tr > :nth-child(11),
.tbl.sheet-clean tr > :nth-child(12),
.tbl.sheet-clean tr > :nth-child(13),
.tbl.sheet-clean tr > :nth-child(14) { width: 5.2rem; }
.tbl.sheet-clean tbody td:nth-child(n+6) .detail { font-size: .64rem; color: var(--muted-fg); line-height: 1.1; }

.tbl.sheet-clean td.wrap, .tbl.sheet-clean td.wrap div { white-space: normal; overflow-wrap: anywhere; line-height: 1.22; }
.tbl.sheet-clean td.wrap .detail { font-size: .72rem; color: var(--muted-fg); margin-top: .1rem; }

/* Ghim cột Phòng khi kéo ngang */
.tbl.sheet-clean tr > :nth-child(1) { position: sticky; left: 0; z-index: 5; background: var(--card); }
.tbl.sheet-clean tbody tr > :nth-child(1) { background: var(--bg); }
.tbl.sheet-clean thead tr > :nth-child(1) { z-index: 3; }
.tbl.sheet-clean tfoot tr > :nth-child(1) { background: var(--card); }
.tbl.sheet-clean tr > :nth-child(1) { box-shadow: 1px 0 0 color-mix(in oklch, var(--border) 70%, var(--fg) 16%); }

/* Dòng tổng: đậm, nền nhạt, chữ số canh phải */
.tbl.sheet-clean tfoot td { background: color-mix(in oklch, var(--muted) 55%, transparent); font-weight: 600; }
.tbl.sheet-clean tfoot tr.sum-grand td { font-weight: 800; border-top: 1px solid var(--border); }
/* tag gọn 1 dòng */
.tbl.sheet-clean .tag { font-size: .62rem; padding: .04rem .3rem; display: inline-block; white-space: nowrap; line-height: 1.1; max-width: 100%; }
.tbl.sheet-clean .rm-link, .tbl.sheet-clean tbody b { font-size: .88rem; }

.tbl.sheet-clean td { white-space: normal; }
.tbl.sheet-clean td small, .tbl.sheet-clean td .tag { white-space: normal; }

/* Điện thoại: thu gọn để thấy được nhiều cột hơn, vẫn cuộn ngang với cột Phòng ghim */
@media (max-width: 640px) {
  .tbl.sheet-clean { min-width: 62rem; font-size: .76rem; }
  .tbl.sheet-clean tr > :nth-child(1) { width: 5.4rem; }
  .tbl.sheet-clean tr > :nth-child(2) { width: 8.2rem; }
  .tbl.sheet-clean tr > :nth-child(3),
  .tbl.sheet-clean tr > :nth-child(4) { width: 6rem; }
  .tbl.sheet-clean tr > :nth-child(5) { width: 7.4rem; }
  .tbl.sheet-clean tr > :nth-child(6),
  .tbl.sheet-clean tr > :nth-child(7) { width: 5rem; }
  .tbl.sheet-clean tr > :nth-child(n+8) { width: 4.6rem; }
}

/* Dòng tổng (tfoot): không ghim cột, để chữ không đè lên số khi kéo ngang */
.tbl.sheet-clean tfoot td { position: static !important; left: auto !important; box-shadow: none !important; }
.tbl.sheet-clean tfoot td[colspan] { white-space: normal; }

/* Dòng tổng trên điện thoại: số tiền nhỏ lại cho khỏi dính nhau */
.tbl.sheet-clean tfoot td { padding-left: .3rem; padding-right: .3rem; }
.tbl.sheet-clean tfoot td.hi-num, .tbl.sheet-clean tfoot td.num { font-size: .95em; }
@media (max-width: 640px) { .tbl.sheet-clean tfoot td.num { font-size: .78rem; } }
.tbl.sheet-clean tfoot td { font-size: .84rem !important; letter-spacing: -.01em; }
@media (max-width: 640px) { .tbl.sheet-clean tfoot td { font-size: .74rem !important; } }

/* POS: nhóm món Nước / Bánh trong khối gọi món */
.prod-h { display: flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 700; color: var(--muted-fg);
  margin: .45rem 0 .25rem; letter-spacing: .02em; }
.prod-wrap { display: flex; flex-wrap: wrap; gap: .28rem; }
.btn-xs { padding: .1rem .45rem; font-size: .68rem; line-height: 1.2; }
.prod.pchip.out { opacity: .45; }
.prod.pchip .stock { font-style: normal; font-size: .6rem; opacity: .75; }
.prod.pchip .stock.zero { color: #f87171; opacity: 1; font-weight: 700; }
.stock-list { display: grid; gap: .25rem; max-height: 55vh; overflow: auto; }
.stock-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.stock-row input { width: 5rem; text-align: right; }

/* Popup chọn bánh: 2 món 1 hàng, có + và - chọn số lượng */
.cake-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; max-height: 58vh; overflow: auto; }
.cake-row { display: flex; align-items: center; justify-content: space-between; gap: .35rem; border: 1px solid var(--border); border-radius: 10px; padding: .35rem .5rem; background: var(--card); min-width: 0; }
.cake-row.on { border-color: var(--primary); }
.cake-name { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; padding: 0; }
.cake-name b { font-size: .85rem; line-height: 1.2; word-break: break-word; }
.cake-name span { font-size: .72rem; color: var(--muted-fg); }
.cake-name .zero { color: #f87171; font-weight: 700; }
.cake-row .stepper { flex-shrink: 0; }
.cake-row .stepper span { min-width: 1.4rem; text-align: center; font-weight: 700; }


/* Bảng ngày: thu hẹp cột cho vừa màn hình máy tính, không phải kéo ngang */
.tbl.sheet-clean { min-width: 0 !important; width: 100% !important; font-size: .78rem; }
.tbl.sheet-clean tr > :nth-child(1) { width: 4.6rem !important; }
.tbl.sheet-clean tr > :nth-child(2) { width: 5.2rem !important; }
.tbl.sheet-clean tr > :nth-child(3), .tbl.sheet-clean tr > :nth-child(4) { width: 3.6rem !important; }
.tbl.sheet-clean tr > :nth-child(5) { width: 6rem !important; }
.tbl.sheet-clean tr > :nth-child(6), .tbl.sheet-clean tr > :nth-child(7) { width: 5rem !important; }
.tbl.sheet-clean tr > :nth-child(n+8) { width: 4.4rem !important; }
.tbl.sheet-clean th, .tbl.sheet-clean td { padding: .35rem .3rem; }
.tbl.sheet-clean td:nth-child(3), .tbl.sheet-clean td:nth-child(4) { white-space: normal !important; line-height: 1.2; font-size: .74rem; }
@media (max-width: 900px) { .tbl.sheet-clean { min-width: 56rem !important; width: auto !important; } }

/* Bảng ngày: ép vừa màn hình ~1280px */
.tbl.sheet-clean tr > :nth-child(5) { width: 5rem !important; }
.tbl.sheet-clean tr > :nth-child(6), .tbl.sheet-clean tr > :nth-child(7) { width: 4.4rem !important; }
.tbl.sheet-clean tr > :nth-child(n+8) { width: 3.9rem !important; }
.tbl.sheet-clean td.num, .tbl.sheet-clean th.num { padding-left: .2rem; padding-right: .3rem; }
.tbl.sheet-clean td, .tbl.sheet-clean th { font-size: .76rem; }
.tbl.sheet-clean td .detail { font-size: .6rem; }

/* Bảng ngày: canh giữa tất cả chữ và số */
.tbl.sheet-clean th, .tbl.sheet-clean td,
.tbl.sheet-clean th.num, .tbl.sheet-clean td.num,
.tbl.sheet-clean td.wrap, .tbl.sheet-clean td.small { text-align: center !important; vertical-align: middle; }
.tbl.sheet-clean td .detail, .tbl.sheet-clean td .tag, .tbl.sheet-clean td .muted { text-align: center; }
.tbl.sheet-clean tbody tr > :nth-child(1) div { text-align: center; }
