/* ═══════════════════════════════════════════════════════════════════════════════════════════
   NHÀ SÀN CHO THUÊ THEO CHỖ (VVR) — CSS cấp module, khai tay ở App.razor kèm ?v=
   spec docs/Projects/Vuon Vua/Nha san/SPEC-THUC-THI-NHA-SAN.md §7.7

   ⚠️ Mọi class có gốc .ns- — ⛔ đặt tên trùng Bootstrap (.btn-close · .modal · .row · .badge ·
      .alert · .card · .toast · .form-control).
   ⚠️ Rule lo HÌNH ⛔ dùng shorthand border / background / font — shorthand RESET mọi thành phần
      con, và `border: 2px solid` đặt luôn `border-color: currentColor`, thắng rule màu ở
      specificity thấp hơn.
   ⚠️ ⛔ vạch màu ở CẠNH TRÁI của thẻ hay hộp (chủ dự án chốt 18/09) — hộp nhắc = nền nhạt + viền
      ĐỦ 4 cạnh cùng tông; thẻ KPI = vạch 3px ở ĐỈNH.
   ═══════════════════════════════════════════════════════════════════════════════════════════ */

/* Token gốc — site cấu hình được, UiStatusCatalog.Ns phát đè ở :root SAU file này.
   ⚠️ Giá trị ở đây là MẶC ĐỊNH: site chưa cấu hình thì token không được phát ⇒ CSS gốc còn nguyên. */
:root {
    --ns-clean: #d2d8df;      --ns-clean-bg: #f3f4f7;
    --ns-tentative: #6f9be8;  --ns-tentative-bg: #ecf2fc;
    --ns-confirmed: #2e6da4;  --ns-confirmed-bg: #e4ecf3;
    --ns-checkedin: #69bf91;  --ns-checkedin-bg: #ecf7f1;
    --ns-payment: #8e5bb5;    --ns-payment-bg: #f0eaf5;
    --ns-checkedout: #78808c; --ns-checkedout-bg: #eef0f2;
    --ns-noshow: #8d6e63;     --ns-noshow-bg: #f0eceb;
    --ns-dirty: #d63a2e;      --ns-dirty-bg: #fae5e4;
}

.ns-page {
    --bg: var(--ez-bg, #fafafa);
    --surface: #ffffff;
    --ink: #2b241e;
    --ink-soft: #4a4137;
    --ink-mute: #7a6f61;
    --line: #ece6dc;
    --line-strong: #e6e0d6;
    --mod: #d98a12;             /* màu module POS — chấm, dấu ◆, viền chip đang chọn */
    --primary: #1f5138;         /* nút chính POS: xanh rêu */
    --radius-card: 11px;
    --radius-ctl: 9px;

    background-color: var(--bg);
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    min-height: 100%;
    padding: 14px 16px 28px;
}

/* ── Tiêu đề ─────────────────────────────────────────────────────────────────────────────── */

.ns-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ns-title { font-size: 19px; font-weight: 600; line-height: 1.25; display: flex; align-items: center; gap: 7px; }
.ns-title .dia { color: var(--mod); font-size: 13px; }
.ns-sub { font-size: 11.5px; color: var(--ink-mute); margin-top: 2px; }
.ns-head-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.ns-daynav { display: inline-flex; align-items: center; gap: 2px; }
.ns-daynav .lbl { font-size: 12.5px; font-weight: 600; padding: 0 8px; min-width: 128px; text-align: center; }
/* Ô ngày GHÉP LIỀN (Lịch chỗ) — CÙNG khuôn .ns-seg ngay cạnh: một viền, bo góc chung, cao 36px, ⛔ viền nút mặc định. */
.ns-daynav.joined { gap: 0; border-style: solid; border-width: 1px; border-color: var(--line-strong);
    border-radius: var(--radius-ctl); overflow: hidden; background-color: var(--surface); }
.ns-daynav.joined button { border-width: 0; background-color: var(--surface); color: var(--ink); min-height: 36px;
    padding: 0 11px; font-family: inherit; cursor: pointer; }
.ns-daynav.joined button:hover { background-color: #faf6ee; }
.ns-daynav.joined button:focus-visible { outline: 2px solid color-mix(in srgb, var(--mod) 45%, transparent); outline-offset: -2px; }
.ns-daynav.joined .nav { font-size: 17px; line-height: 1; color: var(--ink-soft); padding: 0 12px; }
.ns-daynav.joined .lbl { font-size: 12.5px; font-weight: 600; min-width: 150px; }

.ns-btn {
    border-style: solid; border-width: 1px; border-color: var(--line-strong);
    background-color: var(--surface); color: var(--ink);
    border-radius: var(--radius-ctl); padding: 8px 13px; font-size: 12.5px; font-weight: 500;
    min-height: 38px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.ns-btn:hover { border-color: #cfc6b8; }
.ns-btn.primary { background-color: var(--primary); border-color: var(--primary); color: #fff; }
.ns-btn.primary:hover { background-color: #1a4530; }
.ns-btn.danger { color: #b3261e; border-color: #e5c4c1; }
.ns-btn.danger:hover { background-color: #fbeceb; }
.ns-btn.sm { padding: 5px 10px; min-height: 32px; font-size: 11.5px; }
.ns-btn:disabled { opacity: .5; cursor: not-allowed; }

.ns-inp {
    border-style: solid; border-width: 1px; border-color: var(--line-strong);
    background-color: var(--surface); border-radius: var(--radius-ctl);
    padding: 8px 10px; font-size: 13px; min-height: 38px; width: 100%;
}
.ns-inp:focus { outline: 2px solid color-mix(in srgb, var(--mod) 45%, transparent); outline-offset: -1px; }

/* ── KPI: vạch 3px ở ĐỈNH (⛔ cạnh trái) ─────────────────────────────────────────────────── */

.ns-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 12px; }
.ns-kpi {
    position: relative; background-color: var(--surface);
    border-style: solid; border-width: 1px; border-color: var(--line-strong);
    border-radius: var(--radius-card); padding: 11px 13px 10px; overflow: hidden;
}
.ns-kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background-color: var(--k, var(--mod)); }
.ns-kpi .cap { display: flex; align-items: center; gap: 6px; font-size: 9.5px; letter-spacing: .06em;
    text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.ns-kpi .ico { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 11px;
    background-color: color-mix(in srgb, var(--k, var(--mod)) 14%, #fff); color: var(--k, var(--mod)); }
.ns-kpi .val { font-size: 25px; font-weight: 700; line-height: 1.1; margin-top: 5px; color: var(--k, var(--ink)); }
.ns-kpi .val .unit { font-size: 12px; font-weight: 500; color: var(--ink-mute); margin-left: 3px; }
.ns-kpi .foot { font-size: 10.5px; color: var(--ink-mute); margin-top: 3px; }

/* ── Dải chip lọc — XUỐNG DÒNG, ⛔ cuộn ngang ────────────────────────────────────────────── */

.ns-chips { display: flex; flex-wrap: wrap; gap: 6px; row-gap: 6px; align-items: center; margin-bottom: 12px; }
.ns-chip {
    display: inline-flex; align-items: center; gap: 6px;
    border-style: solid; border-width: 1px; border-color: var(--line-strong);
    background-color: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 11.5px; min-height: 30px;
}
.ns-chip .dot { width: 8px; height: 8px; border-radius: 50%; background-color: var(--c, var(--ink-mute)); }
.ns-chip .n { font-weight: 600; color: var(--ink-soft); }
.ns-chip.on { border-color: var(--mod); box-shadow: 0 0 0 2px color-mix(in srgb, var(--mod) 24%, transparent); }
.ns-chip.zero { opacity: .55; }
.ns-chips .sep { width: 1px; height: 18px; background-color: var(--line); margin: 0 3px; }
.ns-chips .filtering { font-size: 11px; color: var(--mod); font-weight: 600; margin-left: 4px; }

/* ── Khối nhà ────────────────────────────────────────────────────────────────────────────── */

.ns-house {
    background-color: var(--surface);
    border-style: solid; border-width: 1px; border-color: var(--line-strong);
    border-radius: var(--radius-card); padding: 13px 14px; margin-bottom: 13px;
}
.ns-hhead { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.ns-hname { font-size: 14.5px; font-weight: 600; }
.ns-hmeta { font-size: 11px; color: var(--ink-mute); margin-top: 2px; }
.ns-tag {
    display: inline-flex; align-items: center; border-style: solid; border-width: 1px;
    border-color: var(--line-strong); background-color: #faf8f5; border-radius: 999px;
    padding: 2px 8px; font-size: 10.5px; color: var(--ink-soft); margin-left: 5px;
}
.ns-hactions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.ns-free { display: flex; align-items: baseline; gap: 7px; margin: 11px 0 6px; flex-wrap: wrap; }
.ns-free .lab { font-size: 11.5px; color: var(--ink-mute); }
/* Số NỔI NHẤT của đầu nhà — 27px theo thiết kế. */
.ns-free .big { font-size: 27px; font-weight: 700; line-height: 1; color: var(--ink); }
.ns-free .u { font-size: 12px; color: var(--ink-mute); }
.ns-free .plus { font-size: 11.5px; color: #0e7a63; font-weight: 600; }
.ns-free .plus.warn { color: #b5561f; }

/* Thanh sức chứa — GIỮ NGUYÊN bề rộng và chiều cao ở MỌI khổ: nó là thứ phải đọc được. */
.ns-bar {
    display: flex; height: 16px; border-radius: 5px; overflow: hidden;
    border-style: dashed; border-width: 1px; border-color: #cfc8bd; background-color: #fff;
}
.ns-bar-seg { display: flex; height: 100%; min-width: 0; }
.ns-bar-solid { height: 100%; background-color: var(--c); }
/* Chỗ thừa: sọc chéo CÙNG MÀU, nằm CUỐI đoạn. Một trong ĐÚNG HAI kiểu sọc của hệ thống. */
.ns-bar-extra {
    height: 100%;
    background-image: repeating-linear-gradient(45deg, var(--c) 0 3px, color-mix(in srgb, var(--c) 32%, #fff) 3px 6px);
}
/* Tạm giữ: sọc THƯA toàn đoạn — kiểu sọc THỨ HAI, ⛔ có kiểu thứ ba. */
.ns-bar-seg.sparse .ns-bar-solid,
.ns-bar-seg.sparse .ns-bar-extra {
    background-color: transparent;
    background-image: repeating-linear-gradient(45deg, var(--c) 0 2px, color-mix(in srgb, var(--c) 16%, #fff) 2px 7px);
}
.ns-bar-seg.faded { opacity: .45; }

.ns-hlegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; color: var(--ink-mute); margin-top: 6px; }
.ns-hlegend b { color: var(--ink-soft); font-weight: 600; }

/* Chú giải MÀU (lịch chỗ) — khác `.ns-hlegend` là chú giải bằng SỐ của đầu nhà. */
.ns-swatches { display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: 11px; color: var(--ink-soft); margin-top: 9px; }
.ns-sw { display: inline-flex; align-items: center; gap: 5px; }
.ns-sw i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex: 0 0 auto; }
.ns-sw i.x { background-image: repeating-linear-gradient(45deg, var(--ink-mute) 0 2px, #fff 2px 4px);
    border-style: solid; border-width: 1px; border-color: var(--line-strong); }

.ns-setup {
    margin-top: 9px; font-size: 11.5px; color: #8a6d3b;
    background-color: #fdf6e6;
    border-style: solid; border-width: 1px; border-color: #ead9b4; border-radius: var(--radius-ctl);
    padding: 7px 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

/* ── Thẻ lượt ────────────────────────────────────────────────────────────────────────────── */

.ns-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 9px; margin-top: 11px; }

.ns-card {
    position: relative; text-align: left; width: 100%;
    background-color: color-mix(in srgb, var(--c) 18%, #fff);
    border-style: solid; border-width: 1px;
    border-color: color-mix(in srgb, var(--c) 34%, var(--line-strong));
    border-radius: var(--radius-card); padding: 9px 10px 8px;
    transition: transform .12s ease, box-shadow .12s ease;
}
.ns-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.09); }
.ns-card:hover::after { content: ""; position: absolute; inset: auto 0 0 0; height: 2px; background-color: var(--c); }
.ns-card.sel { box-shadow: 0 0 0 2px color-mix(in srgb, var(--mod) 55%, transparent); }
/* Tạm giữ: sọc chéo 3px ở MÉP TRÊN thẻ. */
.ns-card.tent::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: var(--radius-card) var(--radius-card) 0 0;
    background-image: repeating-linear-gradient(45deg, var(--c) 0 3px, transparent 3px 6px);
}

.ns-card-top { display: flex; align-items: flex-start; gap: 6px; }
/* Tên hiện ĐỦ (chủ dự án 21/09: "sơ đồ cứ để hiện full tên") — xuống dòng, ⛔ cắt ellipsis. */
.ns-card-name { font-size: 12.5px; font-weight: 600; line-height: 1.3; min-width: 0; flex: 1 1 auto;
    overflow-wrap: anywhere; }
.ns-ini { width: 17px; height: 17px; border-radius: 5px; display: inline-grid; place-items: center;
    font-size: 9.5px; font-weight: 700; color: #fff; background-color: var(--mod); margin-right: 4px; flex: 0 0 auto; }
/* Icon tín hiệu LUÔN ở góc trên phải — ⛔ đặt số khách hay nút vào đó. */
.ns-sigs { display: flex; gap: 3px; flex: 0 0 auto; }
.ns-sig { width: 15px; height: 15px; border-radius: 4px; display: grid; place-items: center;
    font-size: 9px; font-weight: 700; color: #fff; }
.ns-sig.g { background-color: #0e7a63; } .ns-sig.p { background-color: #7a8898; }
.ns-sig.b { background-color: #d6568c; } .ns-sig.n { background-color: #6b6355; }
.ns-sig.t { background-color: #8a4fb8; } .ns-sig.c { background-color: #5b7a3a; }

.ns-pillrow { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.ns-pill {
    display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 8px;
    font-size: 10.5px; font-weight: 600; white-space: normal;
    background-color: color-mix(in srgb, var(--c) 38%, #fff);
    color: color-mix(in srgb, var(--c) 48%, #000);
    border-style: solid; border-width: 1px;
    border-color: color-mix(in srgb, currentColor 30%, transparent);
}
.ns-time { font-size: 10.5px; color: var(--ink-mute); }
.ns-time.late { color: #b5561f; font-weight: 600; }

.ns-seats { margin-top: 6px; font-size: 15px; font-weight: 700; line-height: 1.2; }
.ns-seats .q { font-weight: 600; color: var(--ink-soft); font-size: 13px; }
.ns-extra { font-size: 10.5px; color: var(--ink-mute); margin-top: 2px; }
.ns-note { font-size: 10.5px; color: var(--ink-mute); font-style: italic; margin-top: 2px; }

/* Chấm chỗ — bốn kiểu: đặc (đang nghỉ) · viền rỗng (chưa tới) · sọc (chỗ thừa) · nhạt (chờ dọn). */
.ns-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.ns-dot { width: 9px; height: 9px; border-radius: 50%; background-color: var(--c); }
.ns-dot.hollow { background-color: transparent; border-style: solid; border-width: 1.5px; border-color: var(--c); }
.ns-dot.stripe { background-image: repeating-linear-gradient(45deg, var(--c) 0 2px, #fff 2px 4px); }
.ns-dot.pale { opacity: .4; }
/* Trên 12 chỗ ⇒ thanh nhỏ cùng quy ước. */
.ns-minibar { display: flex; height: 7px; border-radius: 4px; overflow: hidden; margin-top: 6px;
    background-color: color-mix(in srgb, var(--c) 16%, #fff); }
.ns-minibar .s { height: 100%; background-color: var(--c); }
.ns-minibar .x { height: 100%; background-image: repeating-linear-gradient(45deg, var(--c) 0 3px, #fff 3px 6px); }

.ns-card-foot {
    display: flex; align-items: baseline; gap: 6px; margin-top: 7px; padding-top: 6px;
    border-top-style: dashed; border-top-width: 1px; border-top-color: color-mix(in srgb, var(--c) 30%, var(--line));
    flex-wrap: wrap;
}
.ns-src { font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.ns-money { margin-left: auto; font-size: 12.5px; font-weight: 700; }
.ns-money-note { font-size: 10px; color: var(--ink-mute); width: 100%; text-align: right; }

/* ── Ngăn kéo phải ───────────────────────────────────────────────────────────────────────── */

.ns-split { display: grid; grid-template-columns: minmax(0, 1fr) 352px; gap: 13px; align-items: start; }
.ns-aside { position: sticky; top: 12px; max-height: calc(100vh - 90px); overflow: auto;
    background-color: var(--surface); border-style: solid; border-width: 1px; border-color: var(--line-strong);
    border-radius: var(--radius-card); padding: 12px; }
.ns-aside h3 { font-size: 13px; font-weight: 600; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.ns-aside h3 .n { margin-left: auto; font-size: 11px; color: var(--ink-mute); font-weight: 500; }
.ns-grp { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute);
    font-weight: 600; margin: 11px 0 5px; }
.ns-row {
    display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
    padding: 7px 8px; border-radius: 8px; background-color: transparent;
    border-style: solid; border-width: 1px; border-color: transparent; min-height: 44px;
}
.ns-row:hover { background-color: #faf8f5; border-color: var(--line); }
.ns-row.sel { background-color: #faf6ee; border-color: var(--mod); }
.ns-row .t { font-size: 11px; color: var(--ink-mute); width: 38px; flex: 0 0 auto; }
.ns-row .nm { font-size: 12px; font-weight: 600; min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.ns-row .meta { font-size: 10.5px; color: var(--ink-mute); }

/* ── Khối chi tiết ───────────────────────────────────────────────────────────────────────── */

.ns-kv { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 8px; font-size: 11.5px; margin-bottom: 9px; }
.ns-kv .k { color: var(--ink-mute); }
.ns-kv .v { color: var(--ink); font-weight: 500; }

.ns-box {
    background-color: #faf8f5;
    border-style: solid; border-width: 1px; border-color: var(--line); border-radius: var(--radius-ctl);
    padding: 10px; margin-bottom: 10px;
}
.ns-box > .cap { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute);
    font-weight: 600; margin-bottom: 7px; }

.ns-step { display: inline-flex; align-items: center; gap: 0; }
.ns-step button {
    width: 32px; height: 32px; display: grid; place-items: center; font-size: 15px;
    border-style: solid; border-width: 1px; border-color: var(--line-strong); background-color: #fff;
}
.ns-step button:first-child { border-radius: var(--radius-ctl) 0 0 var(--radius-ctl); }
.ns-step button:last-child { border-radius: 0 var(--radius-ctl) var(--radius-ctl) 0; }
.ns-step button:disabled { opacity: .4; }
.ns-step .n { min-width: 42px; height: 32px; display: grid; place-items: center; font-size: 13.5px; font-weight: 600;
    border-top-style: solid; border-bottom-style: solid; border-top-width: 1px; border-bottom-width: 1px;
    border-top-color: var(--line-strong); border-bottom-color: var(--line-strong); background-color: #fff; }

.ns-lines { font-size: 12px; }
.ns-line { display: flex; align-items: baseline; gap: 8px; padding: 5px 0;
    border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: var(--line); }
.ns-line:last-child { border-bottom-width: 0; }
.ns-line .nm { min-width: 0; flex: 1 1 auto; }
.ns-line .sub { display: block; font-size: 10.5px; color: var(--ink-mute); }
.ns-line .amt { font-weight: 600; white-space: nowrap; }
.ns-line.muted .nm, .ns-line.muted .amt { color: var(--ink-mute); }
.ns-total { display: flex; align-items: baseline; gap: 8px; padding-top: 8px; margin-top: 4px;
    border-top-style: solid; border-top-width: 1px; border-top-color: var(--line-strong); font-size: 13.5px; font-weight: 700; }
.ns-total .amt { margin-left: auto; }

/* Hộp nhắc — nền nhạt + viền ĐỦ 4 CẠNH cùng tông, ⛔ vạch trái. */
.ns-hint { font-size: 11.5px; border-radius: var(--radius-ctl); padding: 8px 10px; margin: 8px 0;
    border-style: solid; border-width: 1px; }
.ns-hint.info { background-color: #eef5f1; border-color: #cfe3d8; color: #24543f; }
.ns-hint.warn { background-color: #fdf6e6; border-color: #ead9b4; color: #8a6d3b; }
.ns-hint.err { background-color: #fbeceb; border-color: #e9c9c5; color: #92312a; }

.ns-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.ns-acts .ns-btn { justify-content: center; }
.ns-acts .ns-btn.primary { grid-column: 1 / -1; }

/* ── Hộp thoại (⛔ tên .modal của Bootstrap) ─────────────────────────────────────────────── */

.ns-overlay {
    position: fixed; inset: 0; z-index: 1050; background-color: rgba(23, 20, 15, .42);
    display: flex; align-items: center; justify-content: center; padding: 18px;
}
.ns-dlg {
    position: relative; background-color: var(--surface); color: var(--ink);
    border-radius: 13px; width: min(1060px, 96vw); max-height: 92vh;
    display: flex; flex-direction: column; overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    --ink: #2b241e; --ink-soft: #4a4137; --ink-mute: #7a6f61;
    --line: #ece6dc; --line-strong: #e6e0d6; --surface: #ffffff;
    --mod: #d98a12; --primary: #1f5138; --radius-ctl: 9px; --radius-card: 11px;
}
.ns-dlg.sm { width: min(560px, 96vw); }
.ns-dlg-head { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px;
    border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: var(--line); }
.ns-dlg-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.ns-dlg-title .dia { color: var(--mod); font-size: 12px; }
.ns-dlg-sub { font-size: 11.5px; color: var(--ink-mute); margin-top: 2px; }
.ns-x { margin-left: auto; width: 32px; height: 32px; display: grid; place-items: center; font-size: 15px;
    border-radius: 8px; background-color: transparent; border-style: solid; border-width: 1px; border-color: transparent; }
.ns-x:hover { background-color: #f3efe9; }
.ns-dlg-body { padding: 14px 15px; overflow: auto; flex: 1 1 auto; }
.ns-dlg-foot {
    padding: 11px 15px; border-top-style: solid; border-top-width: 1px; border-top-color: var(--line);
    display: flex; align-items: center; gap: 9px; flex-wrap: wrap; background-color: #faf8f5;
}
.ns-dlg-sum { font-size: 11.5px; color: var(--ink-soft); min-width: 0; flex: 1 1 260px; }

.ns-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ns-blk { margin-bottom: 14px; }
.ns-blk-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.ns-blk-no { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
    font-size: 10px; font-weight: 700; color: #fff; background-color: var(--mod); }
.ns-blk-cap { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.ns-blk-note { font-size: 10.5px; color: var(--ink-mute); margin-left: auto; }

.ns-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.ns-f { min-width: 0; }
.ns-f > label { display: block; font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase;
    color: var(--ink-mute); font-weight: 600; margin-bottom: 3px; }
.ns-f.wide { grid-column: 1 / -1; }
/* Khối "Khách hàng / Công ty" trong hộp đặt chỗ (30/10/2026) — dòng tiêu đề nhỏ chia khối ①. */
.ns-subcap { grid-column: 1 / -1; margin-top: 4px; padding-top: 9px; border-top-style: dashed; border-top-width: 1px;
    border-top-color: var(--line-strong); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
    color: var(--ink-mute); font-weight: 700; }

.ns-seg { display: inline-flex; border-style: solid; border-width: 1px; border-color: var(--line-strong);
    border-radius: var(--radius-ctl); overflow: hidden; }
.ns-seg button { padding: 7px 12px; font-size: 12px; background-color: #fff; border-width: 0; min-height: 36px; }
.ns-seg button.on { background-color: var(--primary); color: #fff; font-weight: 600; }

/* Danh sách nhà còn chỗ — BA–BỐN dòng CỐ ĐỊNH, ⛔ cuộn. */
.ns-fit { display: flex; align-items: center; gap: 9px; padding: 9px 10px; width: 100%; text-align: left;
    border-style: solid; border-width: 1px; border-color: var(--line-strong); border-radius: var(--radius-ctl);
    background-color: #fff; margin-bottom: 6px; min-height: 48px; }
.ns-fit.on { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent); }
.ns-fit:disabled { opacity: .55; }
.ns-fit .nm { font-size: 12.5px; font-weight: 600; }
.ns-fit .note { font-size: 10.5px; color: var(--ink-mute); }
.ns-fit .num { margin-left: auto; text-align: right; }
.ns-fit .num b { font-size: 16px; font-weight: 700; }
.ns-fit .num span { font-size: 10.5px; color: var(--ink-mute); }
.ns-fitlab { display: inline-flex; border-radius: 999px; padding: 2px 8px; font-size: 10.5px; font-weight: 600;
    border-style: solid; border-width: 1px; }
.ns-fitlab.du { background-color: #e6f4ec; border-color: #bcdfcb; color: #1d6b45; }
.ns-fitlab.vua-khit { background-color: #fdf3e0; border-color: #e8d3a8; color: #8a6114; }
.ns-fitlab.thieu { background-color: #f1f1f0; border-color: #ddd9d4; color: #6d665c; }

/* Hai lớp dịch vụ: lớp KÈM THEO nền xanh CHỈ ĐỌC, lớp ĐẶT THÊM có tìm + ＋ */
.ns-inc { background-color: #eef5f1; border-style: solid; border-width: 1px; border-color: #cfe3d8;
    border-radius: var(--radius-ctl); padding: 9px 10px; }
.ns-inc .it { display: flex; align-items: center; gap: 7px; font-size: 11.5px; padding: 3px 0; }
.ns-inc .it .ok { color: #1d6b45; font-weight: 700; }
.ns-inc .it .sub { font-size: 10px; color: #4c6a5b; }
.ns-inc .it .qty { margin-left: auto; font-size: 10.5px; color: #24543f; font-weight: 600; white-space: nowrap; }

.ns-addon { display: flex; align-items: center; gap: 8px; padding: 6px 0;
    border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: var(--line); }
.ns-addon:last-child { border-bottom-width: 0; }
.ns-addon .nm { font-size: 12px; font-weight: 500; min-width: 0; flex: 1 1 auto; }
.ns-addon .sub { display: block; font-size: 10px; color: var(--ink-mute); }
.ns-addon .amt { font-size: 12px; font-weight: 600; white-space: nowrap; min-width: 74px; text-align: right; }
.ns-addonlist { max-height: 210px; overflow: auto; }

/* ── Lịch chỗ 7 ngày ─────────────────────────────────────────────────────────────────────── */

.ns-calwrap { overflow: auto; border-style: solid; border-width: 1px; border-color: var(--line-strong);
    border-radius: var(--radius-card); background-color: var(--surface); }
.ns-cal { border-collapse: separate; border-spacing: 0; min-width: 920px; width: 100%; }
.ns-cal th, .ns-cal td { border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: var(--line);
    padding: 7px 8px; vertical-align: top; text-align: left; }
.ns-cal thead th { position: sticky; top: 0; z-index: 2; background-color: #faf8f5; font-size: 10.5px;
    color: var(--ink-soft); font-weight: 600; }
.ns-cal thead th .d { font-size: 12px; color: var(--ink); }
.ns-cal thead th .k { font-size: 9.5px; color: var(--ink-mute); font-weight: 500; }
.ns-cal th.stick, .ns-cal td.stick { position: sticky; left: 0; z-index: 1; background-color: #fff;
    width: 150px; border-right-style: solid; border-right-width: 1px; border-right-color: var(--line); }
.ns-cal thead th.stick { z-index: 3; background-color: #faf8f5; }
.ns-cal td.today { background-color: color-mix(in srgb, var(--mod) 7%, #fff); }
.ns-calcell { width: 100%; text-align: left; background-color: transparent; border-width: 0; padding: 0; min-height: 44px; }
.ns-calfree { font-size: 12px; font-weight: 600; }
/* Chip lượt ở Lịch chỗ: tên ĐỦ, xuống dòng (⛔ nowrap — nó còn ép cột ngày có lượt rộng gấp đôi cột khác). */
.ns-calchip { display: block; font-size: 10px; line-height: 1.35; padding: 1px 5px; border-radius: 4px; margin-top: 2px;
    background-color: color-mix(in srgb, var(--c) 22%, #fff); overflow-wrap: anywhere; }
.ns-calchip.tent { background-image: repeating-linear-gradient(45deg, color-mix(in srgb, var(--c) 30%, #fff) 0 3px, #fff 3px 6px); }
.ns-calmore { font-size: 10px; color: var(--ink-mute); margin-top: 2px; }

/* ── Cấu hình ────────────────────────────────────────────────────────────────────────────── */

.ns-cfg { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 13px; align-items: start; }
.ns-cfg-list { background-color: var(--surface); border-style: solid; border-width: 1px;
    border-color: var(--line-strong); border-radius: var(--radius-card); padding: 9px; }
.ns-cfg-item { display: block; width: 100%; text-align: left; padding: 8px 9px; border-radius: 8px;
    background-color: transparent; border-style: solid; border-width: 1px; border-color: transparent; min-height: 46px; }
.ns-cfg-item:hover { background-color: #faf8f5; }
.ns-cfg-item.on { background-color: var(--ez-sel-bg, #faf6ee); border-color: var(--mod); }
.ns-cfg-item .nm { font-size: 12.5px; font-weight: 600; }
.ns-cfg-item .meta { font-size: 10.5px; color: var(--ink-mute); }

.ns-card-plain { background-color: var(--surface); border-style: solid; border-width: 1px;
    border-color: var(--line-strong); border-radius: var(--radius-card); padding: 13px 14px; margin-bottom: 12px; }
.ns-card-plain > h3 { font-size: 13.5px; font-weight: 600; margin: 0 0 3px; }
.ns-card-plain > .sub { font-size: 11px; color: var(--ink-mute); margin-bottom: 10px; }

.ns-tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.ns-tbl th, .ns-tbl td { padding: 6px 8px; text-align: left;
    border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: var(--line); }
.ns-tbl th { font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.ns-tbl td.num, .ns-tbl th.num { text-align: right; }
.ns-tbl td.miss { color: #b5561f; }

.ns-lock { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-mute); }
.ns-trial { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ns-trial .t { background-color: #faf8f5; border-style: solid; border-width: 1px; border-color: var(--line);
    border-radius: var(--radius-ctl); padding: 10px; }
.ns-trial .t .cap { font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase;
    color: var(--ink-mute); font-weight: 600; }
.ns-trial .t .v { font-size: 20px; font-weight: 700; margin-top: 4px; }
.ns-trial .t .n { font-size: 10.5px; color: var(--ink-mute); margin-top: 2px; }

/* ── Khung xương khi tải ─────────────────────────────────────────────────────────────────── */

.ns-skel { background-image: linear-gradient(90deg, #efeae2 25%, #f7f3ed 37%, #efeae2 63%);
    background-size: 400% 100%; animation: ns-shimmer 1.3s ease infinite; border-radius: 6px; }
@keyframes ns-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.ns-skel.bar { height: 16px; border-radius: 5px; }
.ns-skel.card { height: 118px; border-radius: var(--radius-card); }
.ns-skel.line { height: 12px; }

/* ── Băng mất kết nối — trên cùng, ⛔ che nút chính ──────────────────────────────────────── */
.ns-offline { position: sticky; top: 0; z-index: 30; margin: -6px 0 10px; font-size: 11.5px;
    background-color: #fdf6e6; border-style: solid; border-width: 1px; border-color: #ead9b4;
    border-radius: var(--radius-ctl); padding: 7px 10px; color: #8a6d3b;
    display: flex; align-items: center; gap: 8px; }

.ns-empty { text-align: center; padding: 26px 14px; color: var(--ink-mute); font-size: 12.5px; }

/* Thông báo ngắn ở đáy — ⛔ tên .toast của Bootstrap. */
.ns-flash { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 1100; background-color: #2b241e; color: #f7f3ec; font-size: 12.5px; padding: 10px 15px;
    border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.24); max-width: min(560px, 92vw); }
.ns-flash.err { background-color: #92312a; }

/* ── Ô số GÕ TAY trong bước −/+ (21/09 — chủ dự án: "nhập tay chứ không chỉ bấm + và −") ─────
   ⚠️ ⛔ `font:` shorthand — nó đặt lại `font-variant-numeric` và giết `tabular-nums` của cột số. */
.ns-step input.n { display: block; width: 52px; padding: 0 4px; text-align: center; border-radius: 0;
    border-left-width: 0; border-right-width: 0; font-family: inherit; color: var(--ink); -moz-appearance: textfield; }
.ns-step input.n::-webkit-outer-spin-button, .ns-step input.n::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ns-step input.n:focus { outline: 2px solid color-mix(in srgb, var(--mod) 45%, transparent); outline-offset: -1px; }
.ns-step input.n:disabled { color: var(--ink-mute); background-color: #f4f1ec; }

/* ── Folio đoàn của lượt (đường đơn dịch vụ) — nền nhạt + viền ĐỦ 4 CẠNH, ⛔ vạch trái ─────────── */
.ns-folio { background-color: #f1f7f3; border-color: #cfe3d8; }
.ns-folio.owe { background-color: #fdf3f2; border-color: #e9c9c5; }
.ns-folio > .cap .st { margin-left: 7px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
.ns-folio.owe .ns-total { color: #92312a; }
.ns-folio-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.ns-money-note.owe { color: #92312a; font-weight: 600; }
.ns-flash.warn { background-color: #7a5b1f; }

/* ── Hộp Gọi dịch vụ — bảng dòng, số lượng gõ tay ─────────────────────────────────────────────── */
.ns-svc { border-style: solid; border-width: 1px; border-color: var(--line); border-radius: var(--radius-ctl);
    background-color: #fff; margin-top: 8px; }
.ns-svc-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 96px 104px 40px; gap: 8px; align-items: center;
    padding: 7px 10px; font-size: 12px; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: var(--line); }
.ns-svc-row:last-child { border-bottom-width: 0; }
.ns-svc-row.head { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute);
    font-weight: 600; background-color: #faf8f5; }
.ns-svc-row .nm { min-width: 0; }
.ns-svc-row .nm .sub { display: block; font-size: 10.5px; color: var(--ink-mute); }
.ns-svc-row .r { text-align: right; }
.ns-svc-row .amt { font-weight: 600; white-space: nowrap; }
.ns-inp.qty { width: 72px; text-align: center; }
@media (max-width: 640px) {
    .ns-svc-row { grid-template-columns: minmax(0, 1fr) 72px 96px 36px; }
    .ns-svc-row > :nth-child(3) { display: none; }
}

/* ═══ Responsive (spec §7.5) ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1180px) {
    /* Ngăn kéo biến mất, chi tiết trượt lên từ ĐÁY — ⛔ đổi bố cục sơ đồ. */
    .ns-split { grid-template-columns: minmax(0, 1fr); }
    .ns-aside { display: none; }
    .ns-sheet { display: flex; }
}

@media (max-width: 1080px) {
    .ns-kpis { grid-template-columns: repeat(3, 1fr); }
    .ns-cols { grid-template-columns: minmax(0, 1fr); }
    .ns-cfg { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 959px) {
    .ns-page { padding: 11px 12px 74px; }
    .ns-kpis { grid-template-columns: repeat(2, 1fr); }
    .ns-cards { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 7px; }
    .ns-title { font-size: 17px; }
    /* Chế độ GỌN: mỗi lượt một dòng 46px. */
    .ns-cards.slim { display: block; }
    .ns-cards.slim .ns-card { display: flex; align-items: center; gap: 8px; min-height: 46px;
        padding: 6px 9px; margin-bottom: 5px; }
    .ns-cards.slim .ns-dots, .ns-cards.slim .ns-minibar, .ns-cards.slim .ns-note,
    .ns-cards.slim .ns-extra, .ns-cards.slim .ns-src { display: none; }
    .ns-cards.slim .ns-card-foot { border-top-width: 0; padding-top: 0; margin-top: 0; margin-left: auto; width: auto; }
    .ns-cards.slim .ns-money-note { display: none; }
    .ns-cards.slim .ns-seats { margin-top: 0; font-size: 13px; }

    /* LỊCH CHỖ — cuộn ngang với cột nhà DÍNH. Cột 150px ăn gần nửa màn 375px ⇒ hẹp lại, và hạ
       `min-width` để 7 cột vừa một lượt cuộn ngắn. ⛔ cho bảng xuống dòng: mất luôn trục ngày. */
    .ns-cal { min-width: 760px; }
    .ns-cal th, .ns-cal td { padding: 6px 6px; }
    .ns-cal th.stick, .ns-cal td.stick { width: 104px; }
    .ns-cal .ns-hname { font-size: 12px; }
    .ns-cal .ns-hmeta { font-size: 9.5px; }
    .ns-calchip { font-size: 9.5px; }
}

@media (max-width: 767px) {
    /* Hộp thoại toàn màn hình; ô nhập 16px để iOS ⛔ tự phóng to cả trang. */
    .ns-overlay { padding: 0; align-items: stretch; }
    .ns-dlg, .ns-dlg.sm { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
    .ns-inp, .ns-dlg input, .ns-dlg select, .ns-dlg textarea { font-size: 16px; }
    .ns-dlg-foot { position: sticky; bottom: 0; }
    .ns-acts { grid-template-columns: 1fr; }
}

/* Tấm trượt từ ĐÁY — chi tiết lượt / thao tác đầu nhà trên máy tính bảng và điện thoại.
   ⚠️ KHUNG NGHỈ của animation phải NHÌN THẤY ĐƯỢC: `translateY(102%)` thì tab nền / máy yếu kẹt
      khung đầu ⇒ tấm nằm HẲN ngoài màn hình, ⛔ lỗi ⛔ log (bài học 22/08).
   🩹 21/09: rule gốc từng khai `display: none` — nó đứng SAU rule bật tấm ở khổ ≤1180px nên THẮNG theo thứ tự
      (cùng độ ưu tiên) ⇒ trên máy tính bảng / điện thoại bấm thẻ lượt ⛔ hiện gì (ngăn phải cũng bị ẩn ở khổ đó).
      Nay rule gốc HIỆN, và chỉ khổ ≥1181px ẩn nó (`!important` ở cuối khối này). */
.ns-sheet { display: flex; position: fixed; left: 0; right: 0; z-index: 1040;
    bottom: calc(62px + env(safe-area-inset-bottom));
    max-height: 76vh; overflow: auto; background-color: #fff;
    border-top-left-radius: 15px; border-top-right-radius: 15px;
    box-shadow: 0 -10px 30px rgba(0,0,0,.16); padding: 13px 14px 18px;
    flex-direction: column; animation: ns-rise .16s ease-out;
}
@keyframes ns-rise { from { transform: translateY(14px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
.ns-sheet-grip { width: 38px; height: 4px; border-radius: 3px; background-color: #ddd6cb; margin: 0 auto 10px; }
@media (min-width: 1181px) { .ns-sheet { display: none !important; } }

/* ═══ MENU THAO TÁC CỦA LƯỢT (21/09) — chuột phải trên thẻ · nút "⋯" của ngăn chi tiết ═══════════════════
   ⚠️ Menu nằm NGOÀI `.ns-page` (và ngoài tấm đáy có transform) ⇒ token của `.ns-page` ⛔ tới được: khai lại
      trên chính `.ns-ctx`, cùng cách `.ns-dlg`.
   ⚠️ Vị trí do `ezCtxMenu.place` đặt (lật mép / kẹp khung). ≤959px: TẤM TỪ ĐÁY — `!important` thắng toạ độ inline. */
.ns-ctx-backdrop { position: fixed; inset: 0; z-index: 1060; }
.ns-ctx {
    position: fixed; z-index: 1061; min-width: 272px; max-width: 336px; overflow: auto;
    background-color: #fff; color: #2b241e; border-radius: 12px;
    border-style: solid; border-width: 1px; border-color: #e6e0d6;
    box-shadow: 0 14px 34px rgba(43, 36, 30, .2);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    --ink: #2b241e; --ink-soft: #4a4137; --ink-mute: #7a6f61;
    --line: #ece6dc; --line-strong: #e6e0d6; --mod: #d98a12; --primary: #1f5138;
}
.ns-ctx:focus { outline: none; }
.ns-ctx-head { padding: 10px 12px 9px; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: var(--line); }
.ns-ctx-head .t { font-size: 13px; font-weight: 600; line-height: 1.3; }
.ns-ctx-head .s { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 10.5px;
    color: var(--ink-mute); margin-top: 4px; }
.ns-ctx-list { padding: 3px 0 6px; }
.ns-ctx-sec { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute);
    font-weight: 600; padding: 8px 12px 3px; }
.ns-ctx-sep { height: 1px; background-color: var(--line); margin: 6px 0 3px; }
.ns-ctx-item {
    display: flex; align-items: center; gap: 9px; width: 100%; min-height: 38px; padding: 6px 12px;
    text-align: left; background-color: transparent; border-width: 0; cursor: pointer;
    font-family: inherit; font-size: 12.5px; color: var(--ink);
}
.ns-ctx-item:hover:not(:disabled) { background-color: #faf6ee; }
.ns-ctx-item:focus-visible { outline: 2px solid color-mix(in srgb, var(--mod) 45%, transparent); outline-offset: -2px; }
.ns-ctx-item:disabled { cursor: not-allowed; color: #a0968a; }
.ns-ctx-item.primary { font-weight: 600; }
.ns-ctx-item.primary .ic { color: var(--primary); }
.ns-ctx-item.danger { color: #b3261e; }
.ns-ctx-item .ic { width: 18px; text-align: center; flex: 0 0 auto; opacity: .85; }
.ns-ctx-item .tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.ns-ctx-item .hint { font-size: 10.5px; color: var(--ink-mute); font-weight: 400; white-space: normal; }
/* Mục bị chặn: LÝ DO phải đọc được (⛔ mờ luôn cả lý do) — chính câu đó chỉ người trực đi đâu. */
.ns-ctx-item:disabled .hint { color: #8a6d3b; font-style: italic; }
.ns-ctx-item .go { font-size: 11px; color: var(--ink-mute); flex: 0 0 auto; }
.ns-ctx-close { display: none; }

/* ═══ NGĂN CHI TIẾT GỌN (21/09) — chỉ thông tin + thao tác nhanh ══════════════════════════════════════ */
.ns-money-box { padding: 9px 10px; }
.ns-money-box.owe { background-color: #fdf3f2; border-color: #e9c9c5; }
.ns-money-line { display: flex; align-items: baseline; gap: 8px; }
.ns-money-line .lab { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); }
.ns-money-line .amt { margin-left: auto; font-size: 17px; font-weight: 700; }
.ns-money-box.owe .ns-money-line .amt { color: #92312a; }
.ns-money-sub { font-size: 10.5px; color: var(--ink-mute); margin-top: 3px; }
.ns-acts .ns-more { grid-column: 1 / -1; border-style: dashed; }
.ns-more-hint { font-size: 10.5px; color: var(--ink-mute); text-align: center; margin-top: 5px; }
/* Máy cảm ứng ⛔ có chuột phải ⇒ ⛔ nhắc một thao tác người dùng ⛔ làm được. */
@media (hover: none) { .ns-more-hint { display: none; } }

.ns-quote {
    margin-top: 10px; padding: 0 10px; background-color: #faf8f5;
    border-style: solid; border-width: 1px; border-color: var(--line); border-radius: var(--radius-ctl);
}
.ns-quote > summary { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; cursor: pointer;
    font-size: 11.5px; font-weight: 600; color: var(--ink-soft); }
.ns-quote > summary .amt { margin-left: auto; color: var(--ink); }
.ns-quote[open] > summary { border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: var(--line); }
.ns-quote .ns-lines { padding: 3px 0 7px; }

/* ═══ HỘP SỬA CHỖ QUÂY · NHẬT KÝ · CHUYỂN NHÀ ═══════════════════════════════════════════════════════════ */
.ns-seatrow { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ns-seatrow .lab { font-size: 11.5px; color: var(--ink-mute); min-width: 96px; }
.ns-seatrow .meta { font-size: 11px; color: var(--ink-mute); }
.ns-seatrow-block { margin-top: 13px; }
.ns-seatrow-block > .cap { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute);
    font-weight: 600; margin-bottom: 6px; }
.ns-check { display: flex; align-items: center; gap: 7px; margin-top: 9px; font-size: 12px; }
.ns-check .note { font-size: 10.5px; color: var(--ink-mute); }
.ns-seats-free { font-size: 11px; color: var(--ink-mute); margin-top: 11px; }

.ns-audit { border-style: solid; border-width: 1px; border-color: var(--line); border-radius: var(--radius-ctl); overflow: hidden; }
.ns-audit-row { display: grid; grid-template-columns: 116px minmax(0, 1fr) 150px; gap: 10px; align-items: start;
    padding: 8px 10px; font-size: 12px;
    border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: var(--line); }
.ns-audit-row:last-child { border-bottom-width: 0; }
.ns-audit-row .when { font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
.ns-audit-row .act { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ns-audit-row .act .ns-tag { margin-left: 0; }
.ns-audit-row .desc { color: var(--ink-soft); margin-top: 2px; }
.ns-audit-row .chg { font-size: 11px; color: #1d6b45; font-weight: 600; margin-top: 2px; }
.ns-audit-row .who { font-size: 11px; color: var(--ink-mute); text-align: right; }

@media (max-width: 959px) {
    /* Menu thành TẤM TỪ ĐÁY — nền mờ, mục cao 48px, nút Đóng ở đáy; chừa thanh tab dưới (62px). */
    .ns-ctx-backdrop { background-color: rgba(28, 24, 20, .42); }
    .ns-ctx { left: 0 !important; right: 0; top: auto !important; bottom: 0; max-width: none; min-width: 0;
        max-height: 80vh !important; border-radius: 16px 16px 0 0;
        padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
    .ns-ctx::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px;
        background-color: #ddd6cb; margin: 8px auto 2px; }
    .ns-ctx-item { min-height: 48px; font-size: 14px; padding: 6px 16px; }
    .ns-ctx-close { display: block; width: calc(100% - 24px); margin: 6px 12px 0; min-height: 46px; border-radius: 9px;
        background-color: #f3efe9; border-width: 0; font-size: 13px; color: var(--ink-soft); font-family: inherit; }

    .ns-audit-row { grid-template-columns: minmax(0, 1fr); gap: 3px; }
    .ns-audit-row .who { text-align: left; }
}

/* ── Danh sách khách của lượt (NsGuestImportDialog) — cùng dáng khối "Danh sách khách" của đơn dịch vụ (01/11/2026) ── */
.ns-gl-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; font-size: 12px; }
.ns-gl-bar.end { justify-content: flex-end; }
.ns-gl-count { margin-left: auto; font-size: 11.5px; color: var(--ink-soft); }
.ns-gl-import { border-style: solid; border-width: 1px; border-color: var(--line); border-radius: 10px;
    padding: 10px 12px; margin: 0 0 10px; background-color: #faf8f5; }
.ns-gl-label { font-size: 12px; color: var(--ink-soft); margin: 2px 0 4px; }
.ns-gl-paste { width: 100%; font-size: 12px; resize: vertical; }
.ns-gl-empty { border-style: dashed; border-width: 1px; border-color: var(--line); border-radius: 10px;
    padding: 18px 12px; text-align: center; font-size: 12.5px; color: var(--ink-mute); margin: 0 0 8px; }
.ns-gl-tbl { width: 100%; border-collapse: collapse; font-size: 12px; margin: 0 0 8px; }
.ns-gl-tbl th { text-align: left; font-weight: 600; font-size: 11px; color: var(--ink-soft); padding: 6px 6px;
    border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: var(--line); white-space: nowrap; }
.ns-gl-tbl td { padding: 4px 6px; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #f1ece4;
    vertical-align: middle; }
.ns-gl-tbl td.num { width: 34px; color: var(--ink-mute); text-align: right; }
.ns-gl-tbl td.act { width: 92px; text-align: right; white-space: nowrap; }
.ns-gl-tbl.edit .ns-inp { width: 100%; min-width: 0; }
.ns-gl-tbl tr.bad td { color: #92312a; }
.ns-gl-tbl tr.warn td { color: #8a6d3b; }
.ns-gl-in { font-size: 11px; font-weight: 600; color: #24543f; }
@media (max-width: 959px) {
    .ns-gl-tbl.edit thead { display: none; }
    .ns-gl-tbl.edit tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 6px; padding: 6px 0;
        border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #f1ece4; }
    .ns-gl-tbl.edit td { border: none; padding: 0; }
    .ns-gl-tbl.edit td.num { display: none; }
    .ns-gl-tbl.edit td.act { width: auto; text-align: left; }
}
