/* CHAN HAIR – tông đen / trắng / vàng kem. Mobile-first. */
:root {
  --ink: #141414;
  --ink-2: #3a3a3a;
  --muted: #7a746b;
  --line: #e7dfd2;
  --bg: #faf7f2;
  --card: #ffffff;
  --cream: #f3e9d7;
  --gold: #b8935a;
  --gold-d: #9a7841;
  --ok: #2f7d4f;
  --ok-bg: #e5f3ea;
  --warn: #9a6a00;
  --warn-bg: #fdf3d8;
  --bad: #b3261e;
  --bad-bg: #fbe7e5;
  --info: #2c5b8a;
  --info-bg: #e6eef7;
  --r: 14px;
  --shadow: 0 1px 2px rgba(20, 20, 20, .05), 0 4px 16px rgba(20, 20, 20, .05);
  --nav-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
.boot { padding: 40vh 16px 0; text-align: center; color: var(--muted); }

/* ---------- Thương hiệu ---------- */
.brand { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; letter-spacing: .18em; line-height: 1; white-space: nowrap; }
.brand b { color: var(--gold); font-weight: 600; }

/* ---------- Khung ---------- */
.top {
  position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
}
.top-in { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.top .brand { font-size: 22px; }
.top-title { font-size: 13px; color: #cfc6b6; border-left: 1px solid #444; padding-left: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-user { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #e8e1d4; min-width: 0; }
.top-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30vw; }
.top-user button { background: transparent; border: 1px solid #555; color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
@media (max-width: 560px) {
  .top .brand { font-size: 19px; }
  .top-user span { display: none; }
  .top-title { flex: 1; }
}
.mock-bar { background: var(--cream); color: var(--ink-2); font-size: 12px; text-align: center; padding: 4px 16px; }
.mock-bar a { color: var(--gold-d); }

.nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line);
  display: flex; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
}
.nav button {
  flex: 1; border: 0; background: transparent; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative;
}
.nav button svg { width: 22px; height: 22px; }
.nav button.on { color: var(--ink); }
.nav button.on::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); }
.nav .dot { position: absolute; top: 8px; left: calc(50% + 8px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; padding: 0 5px; }
main { max-width: 1040px; margin: 0 auto; padding: 16px 16px calc(var(--nav-h) + 32px); }

@media (min-width: 900px) {
  .nav { position: sticky; top: 52px; height: auto; border: 0; border-bottom: 1px solid var(--line); justify-content: center; gap: 4px; padding: 0 16px; }
  .nav button { flex: 0 0 auto; flex-direction: row; padding: 14px 18px; font-size: 14px; }
  .nav button svg { width: 18px; height: 18px; }
  .nav button.on::before { top: auto; bottom: 0; left: 18px; right: 18px; border-radius: 3px 3px 0 0; }
  .nav .dot { position: static; }
  main { padding-bottom: 48px; }
}

/* ---------- Thành phần ---------- */
h1 { font-size: 22px; margin: 4px 0 14px; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 520px) { .grid3 { grid-template-columns: 1fr 1fr; } }
.sp { height: 8px; }

label.f { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 12px; }
label.f > span { display: block; margin-bottom: 5px; }
.in, select.in, textarea.in {
  width: 100%; min-height: 46px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px;
  font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.in { min-height: 70px; resize: vertical; }
.in:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184, 147, 90, .18); }
.in.sm { min-height: 38px; padding: 6px 10px; font-size: 15px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 10px 18px;
  border-radius: 10px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 600; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: transform .05s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.gold { background: var(--gold); border-color: var(--gold); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.danger { background: #fff; color: var(--bad); border-color: #f0c9c5; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.lg { min-height: 54px; font-size: 16px; }
.linkbtn { background: none; border: 0; color: var(--gold-d); font-weight: 600; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; background: var(--cream); color: var(--ink-2); }
.b-CHO_DEN { background: var(--info-bg); color: var(--info); }
.b-DA_DEN, .b-DA_THANH_TOAN { background: var(--ok-bg); color: var(--ok); }
.b-KHONG_DEN, .b-HUY { background: var(--bad-bg); color: var(--bad); }
.b-DOI_LICH { background: var(--warn-bg); color: var(--warn); }
.b-NHAP { background: var(--cream); color: var(--gold-d); }

.alert { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.alert.bad { background: var(--bad-bg); color: var(--bad); border: 1px solid #f0c9c5; font-weight: 500; }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.svc-search { position: sticky; top: 0; z-index: 5; background: var(--card, #fff); padding: 8px 0 6px; margin-bottom: 4px; }
.svc-hint-q:empty { display: none; }
.size-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.size-row .seg button { min-width: 52px; min-height: 40px; font-size: 16px; font-weight: 700; }
.size-row .seg button.on { background: var(--gold-d); color: #fff; }
.pct-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pct-row .pct-in { width: 72px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; min-height: 36px; cursor: pointer; }
.chip.on { background: var(--gold-d); border-color: var(--gold-d); color: #fff; font-weight: 600; }
.size-pick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.size-pick .chip { min-height: 44px; font-size: 15px; font-weight: 600; }
.svc.need-size { border-color: var(--warn); background: var(--warn-bg); }
.promo-bar:empty { display: none; }
.promo-bar { border: 2px solid var(--gold-d); background: var(--cream); border-radius: 14px; padding: 10px 12px; margin: 10px 0 14px; display: flex; flex-direction: column; gap: 8px; }
.promo-h { font-weight: 700; font-size: 16px; }
.promo-h .small { font-weight: 400; }
.promo-bar .svc.svc-loai { background: #fff; margin: 0; }
.sh-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.sh-row2 { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.sh-row2 label { display: flex; flex-direction: column; gap: 2px; }
.sh-row2 .in { width: 100%; min-width: 0; }
@media (max-width: 560px) { .sh-row2 { grid-template-columns: 1fr; } }
.svc.svc-loai { border: 1px dashed var(--gold-d); background: var(--cream); }
.svc.svc-loai.on { border-style: solid; }
.svc.svc-loai .svc-name { font-weight: 700; }
.svc.svc-cov { opacity: .75; }
.svc.svc-cov .svc-hint { color: var(--ok); font-weight: 600; }
.rule-box { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.rule { border: 1px dashed var(--gold-d); background: var(--cream); border-radius: 12px; padding: 10px 12px; }
.rule.gift { border: 2px solid var(--ok); background: #f1f8f1; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.rule-btn { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; min-height: 52px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--gold-d); background: #fff; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.rule-btn:active { background: var(--cream); }
.add-box { margin-top: 10px; }
.add-box .chip { min-height: 44px; min-width: 40px; font-weight: 600; }
.add-box .rule-grid:empty { display: none; }
.rule-btn .num { font-size: 13px; }
.svc-hint-q { margin-top: 4px; }
.sh-row { display: grid; grid-template-columns: 90px 1fr 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
.sh-row .x { justify-self: center; }
.sug { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sug:empty { display: none; }
.sug-i { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; text-align: left; width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--gold-d); background: #fff; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; min-height: 44px; }
.sug-i:active { background: var(--cream); }
.sug-i .small { flex-basis: 100%; }
.ai-card { border: 1px dashed var(--gold-d); background: var(--cream); }
.ai-card .alert { margin-bottom: 0; }

/* Bảng */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 8px; border-bottom: 1px solid #f1ebe1; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r, .tbl th.r { text-align: right; white-space: nowrap; }
.tbl tfoot td { font-weight: 700; border-top: 1px solid var(--line); }
.num { font-variant-numeric: tabular-nums; }
.disc { color: var(--bad); font-weight: 600; white-space: nowrap; }
.strike { text-decoration: line-through; color: var(--muted); font-size: 12px; }

/* Danh sách lịch */
.list { display: flex; flex-direction: column; gap: 10px; }
.bk {
  display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px;
  cursor: pointer; text-align: left; width: 100%; border-left: 4px solid var(--info);
}
.bk:hover { border-color: #d8ccb7; }
.bk.st-DA_DEN { border-left-color: var(--ok); }
.bk.st-KHONG_DEN, .bk.st-HUY { border-left-color: var(--bad); opacity: .75; }
.bk.st-DOI_LICH { border-left-color: var(--warn); }
.bk-time { font-size: 20px; font-weight: 700; min-width: 58px; font-variant-numeric: tabular-nums; }
.bk-time small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.bk-main { flex: 1; min-width: 0; }
.bk-name { font-weight: 600; font-size: 16px; }
.bk-sub { font-size: 13px; color: var(--muted); }
.bk-items { font-size: 13px; margin-top: 4px; color: var(--ink-2); }
.bk-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* Chọn dịch vụ */
.svc-group { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }
.svc { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.svc.on { border-color: var(--gold); background: #fffcf6; }
.svc-head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.svc-head input { width: 22px; height: 22px; accent-color: var(--ink); flex: 0 0 auto; }
.svc-name { flex: 1; font-weight: 500; }
.svc-price { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.svc-body { margin-top: 8px; padding-left: 32px; }
.svc-hint { font-size: 12px; color: var(--gold-d); font-weight: 600; }

.totals { display: grid; gap: 6px; font-size: 15px; }
.totals div { display: flex; justify-content: space-between; }
.totals .big { font-size: 20px; font-weight: 700; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; }

/* Ô tra SĐT */
.lookup { background: var(--ink); color: #fff; border-radius: var(--r); padding: 18px 16px; margin-bottom: 14px; }
.lookup h2 { color: #f3e9d7; font-weight: 600; }
.lookup .row { flex-wrap: nowrap; }
.lookup .in { color: var(--ink); font-size: 24px; min-height: 58px; letter-spacing: .06em; font-weight: 600; border: 0; }
.lookup .btn { min-height: 58px; padding: 0 22px; font-size: 17px; }

.kh { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; }
.kh-name { font-size: 20px; font-weight: 700; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.kpi .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi .v.gold { color: var(--gold-d); }

.seg { display: inline-flex; background: #efe8dc; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-weight: 500; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.lock { font-size: 12px; }
.tag-them { font-size: 11px; font-weight: 600; background: var(--info-bg); color: var(--info); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.inv-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 10px; }
.inv-lines .in.sm { min-width: 110px; }
.pct-in { width: 70px !important; min-width: 0 !important; }
.x { border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px 8px; }
.x:hover { color: var(--bad); }
.unsaved { font-size: 12px; color: var(--warn); font-weight: 600; }
.sticky-actions { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); padding: 10px 0 6px; margin: 8px 0 -6px; z-index: 2; }
.sticky-actions .row { flex-wrap: nowrap; }
.sticky-actions .btn.lg { font-size: 15px; padding: 10px 12px; }

/* Danh sách dịch vụ của lịch */
.items { font-size: 14px; }
.it { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid #f1ebe1; }
.it-r { text-align: right; white-space: nowrap; }
.it-tot { font-weight: 700; font-size: 15px; border-bottom: 0; padding-bottom: 0; }
@media (min-width: 900px) { .sticky-actions { bottom: 0; } }

/* Đăng nhập */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; background: var(--ink); }
.login-box { width: 100%; max-width: 380px; background: #fff; border-radius: 18px; padding: 28px 22px; }
.login .brand { font-size: 38px; color: #fff; text-align: center; }
.login-sub { color: #cfc6b6; text-align: center; margin: 10px 0 22px; font-size: 14px; letter-spacing: .04em; }
.login-hint { margin-top: 14px; font-size: 13px; color: var(--muted); background: var(--cream); border-radius: 10px; padding: 10px 12px; }

/* Modal */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(20, 20, 20, .5); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.modal { background: var(--bg); width: 100%; max-width: 720px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 18px 16px 24px; padding-bottom: max(24px, env(safe-area-inset-bottom)); animation: up .2s; }
.modal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.modal-h h2 { margin: 0; }
@media (min-width: 720px) { .modal-bg { align-items: center; } .modal { border-radius: 18px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }

/* Toast */
#toasts { position: fixed; z-index: 60; left: 16px; right: 16px; top: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; max-width: 480px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); animation: up .2s; }
.toast.err { background: var(--bad); }
.toast.ok { background: var(--ok); }

.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.loading { text-align: center; padding: 30px; color: var(--muted); }

/* Tin nhắn sale ↔ chi nhánh */
.chat { display: flex; flex-direction: column; height: calc(100dvh - var(--nav-h) - 130px); min-height: 320px; }
.chat-box { flex: 1; min-height: 0; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-box .empty, .chat-box .loading { margin: auto; }
.chat-day { align-self: center; font-size: 12px; color: var(--muted); background: #efe8dc; border-radius: 999px; padding: 2px 10px; margin: 4px 0; }
.msg { display: flex; }
.msg.me { justify-content: flex-end; }
.msg-b { max-width: min(78%, 560px); background: #f3efe8; border-radius: 14px 14px 14px 4px; padding: 8px 12px; overflow-wrap: anywhere; }
.msg.me .msg-b { background: var(--cream); border-radius: 14px 14px 4px 14px; }
.msg-who { font-size: 12px; font-weight: 600; color: var(--gold-d); }
.msg-who span { font-weight: 400; color: var(--muted); }
.msg-ref { font-size: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; margin: 3px 0; }
.msg-t { white-space: pre-wrap; }
.msg-at { font-size: 11px; color: var(--muted); text-align: right; }
.chat-ref { display: flex; align-items: center; gap: 8px; font-size: 13px; background: var(--info-bg); color: var(--info); border-radius: 10px; padding: 6px 10px; margin-top: 8px; }
.chat-ref .x { margin-left: auto; border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; }
.chat-in { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.chat-in textarea { flex: 1; resize: none; min-height: 46px; max-height: 120px; font: inherit; }
.chat-in .btn { min-height: 46px; }
.chat-n { display: inline-block; min-width: 18px; height: 18px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; padding: 0 5px; margin-left: 6px; }
@media (min-width: 900px) { .chat { height: calc(100dvh - 190px); } }

/* khach di nhom (+5% / +10% goi Uon-Duoi-Nhuom) */
.tag-web{display:inline-block;background:#0b7a3e;color:#fff;border-radius:999px;padding:1px 8px;margin-left:6px;font-size:11px;font-weight:800;letter-spacing:.4px;vertical-align:2px;white-space:nowrap}
.alert.info{background:#e8f5e9;color:#1b5e20}
.tag-nhom{display:inline-block;background:#e6f0ff;color:#1746a2;border-radius:999px;padding:2px 9px;font-size:12px;font-weight:700;white-space:nowrap}
.grp-row{margin-top:8px;padding-top:8px;border-top:1px dashed rgba(0,0,0,.15)}

/* ---------- LỊCH HẸN của thu ngân (12/11) ---------- */
.ap-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ap-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.ap-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 0; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; min-width: 0; position: relative; }
.ap-stat .v { font-size: 24px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ap-stat .k { font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ap-stat .w { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; color: var(--bad); background: var(--bad-bg); border-radius: 999px; padding: 1px 7px; }
.ap-stat.k-open .v { color: var(--info); }
.ap-stat.k-done .v { color: var(--ok); }
.ap-stat.k-miss .v { color: var(--bad); }
.ap-stat.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fffdf8; }
.ap-tools { display: flex; gap: 8px; margin-bottom: 4px; }
.ap-tools .in { flex: 1; min-width: 0; }
.ap-tools .btn { min-height: 0; padding: 8px 14px; white-space: nowrap; }
.ap-sec { display: flex; align-items: center; gap: 8px; margin: 18px 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.ap-sec::after { content: ''; flex: 1; height: 1px; background: var(--line); order: 2; }
.ap-sec i { order: 3; font-style: normal; background: var(--cream); color: var(--ink-2); border-radius: 999px; padding: 1px 9px; font-size: 12px; letter-spacing: 0; }
.ap-sec small { font-weight: 500; color: var(--muted); letter-spacing: 0; text-transform: none; margin-left: 4px; }
.ap-sec.late { color: var(--bad); }
.ap-sec.late i { background: var(--bad-bg); color: var(--bad); }
.ap-sec.dim { color: var(--muted); }
.ap-sec.day { font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.bk.ap { align-items: center; gap: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.bk.ap.late { border-left-color: var(--bad); background: #fffafa; }
.bk.ap.next { border-color: var(--gold); border-left-color: var(--gold); background: #fffdf7; box-shadow: 0 0 0 1px var(--gold), var(--shadow); }
.bk.ap.closed { box-shadow: none; padding: 9px 14px; opacity: .8; }
.bk.ap.closed .ap-svcs { display: none; }
.ap-time { flex: 0 0 92px; display: flex; flex-direction: column; align-items: flex-start; }
.ap-time b { font-size: 24px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bk.ap.closed .ap-time b { font-size: 18px; color: var(--muted); }
.ap-rel { font-size: 12px; font-weight: 600; color: var(--info); white-space: nowrap; }
.ap-rel.now { color: var(--gold-d); }
.ap-rel.late { color: var(--bad); }
.ap-main { flex: 1 1 0; min-width: 0; }
.ap-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ap-next { font-size: 11px; font-weight: 700; background: var(--gold); color: #fff; border-radius: 999px; padding: 1px 8px; text-transform: uppercase; letter-spacing: .04em; }
.ap-svcs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ap-svc { font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; color: var(--ink-2); }
.ap-svc b { color: var(--bad); font-weight: 700; }
.ap-note { margin-top: 6px; font-size: 13px; background: var(--warn-bg); color: #5c4300; border-radius: 8px; padding: 5px 9px; }
.ap-act { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.ap-act .btn.gold { min-width: 132px; }
.ap-more { display: flex; gap: 6px; }
.ap-more .btn { flex: 1; padding: 6px 8px; color: var(--muted); }
.ap-empty { text-align: center; padding: 44px 16px; background: #fff; border: 1px dashed var(--line); border-radius: var(--r); margin-top: 12px; }
.ap-empty .ic { font-size: 34px; margin-bottom: 6px; }
@media (max-width: 640px) {
  .ap-stats { gap: 6px; }
  .ap-stat { padding: 8px 9px; }
  .ap-stat .v { font-size: 20px; }
  .ap-stat .w { position: static; margin-top: 2px; }
  .bk.ap { flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }
  .ap-time { flex-basis: 84px; }
  .ap-time b { font-size: 21px; }
  .ap-act { flex: 1 1 100%; flex-direction: row; align-items: center; }
  .ap-act .btn.gold { flex: 1 1 auto; }
  .ap-more { flex: 0 0 auto; }
  .ap-tools .btn { padding: 8px 10px; }
}

/* ---------- HÓA ĐƠN của thu ngân (12/11) — dùng chung khung .ap-* của Lịch hẹn ---------- */
.hd-total { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 14px; }
.hd-total .k { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #d9cdb8; font-weight: 600; }
.hd-total .v { font-size: 22px; font-weight: 700; color: #f1d9a8; margin-left: auto; }
.hd-total .small { color: #b9b1a4; flex-basis: 100%; margin-top: -4px; }
.hd-money { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; min-width: 110px; }
.hd-money b { font-size: 18px; font-weight: 700; white-space: nowrap; }
.bk.ap.hd.closed .hd-money b { font-size: 16px; }
.bk.ap.hd .ap-act .btn.gold { min-width: 120px; }
@media (max-width: 640px) {
  .hd-total .small { flex-basis: auto; margin: 0; }
  .hd-money { flex: 1 1 100%; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 8px; order: 3; padding-left: 96px; }
  .bk.ap.hd .ap-act { order: 4; }
  .bk.ap.hd.closed .ap-act { display: none; }
}

/* ---------- THỢ CHÍNH / THỢ PHỤ + KHÁCH YÊU CẦU trên hóa đơn (12/11) ---------- */
.tho-box { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tho-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.tho-lb { flex: 0 0 72px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tho-line .in.sm { flex: 1 1 150px; min-width: 0; }
.yc { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; padding: 6px 11px; min-height: 36px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; user-select: none; }
.yc input { width: 16px; height: 16px; margin: 0; accent-color: var(--gold-d); }
.yc.on { background: var(--warn-bg); border-color: var(--gold); color: var(--gold-d); }
.yc.off { opacity: .45; cursor: default; }
.tag-yc { display: inline-block; font-size: 11px; font-weight: 700; background: var(--warn-bg); color: var(--gold-d); border: 1px solid #ead9b5; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
@media (max-width: 640px) { .tho-lb { flex-basis: 100%; } }

/* ---------- BƯỚC NHẬN KHÁCH: chốt thợ chính / thợ phụ cho cả hóa đơn (12/11 tối) ---------- */
.nhan-khach { border: 2px solid var(--gold); background: #fffdf7; border-radius: var(--r); padding: 12px 14px; margin: 4px 0 14px; }
.nhan-khach.ok { border: 1px solid var(--line); background: #fff; }
.nk-h { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.nhan-khach.ok .nk-h { color: var(--ok); font-size: 14px; margin-bottom: 8px; }
.nhan-khach .tho-line b { font-size: 16px; }
.svc-zone-h { margin: 4px 0 8px; font-size: 15px; }

/* ---------- NÚT SỐ THỢ: thợ chính 01–10, thợ phụ 11 trở lên (12/11 tối) ---------- */
.tho-grp { border-top: 1px dashed var(--line); padding-top: 10px; }
.tho-grp:first-child { border-top: 0; padding-top: 0; }
.tho-gh { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tho-lb2 { font-weight: 700; font-size: 14px; }
.tho-lb2 small { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 2px; }
.tho-lb2 b { color: var(--gold-d); }
.tho-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.tho-chip { display: flex; align-items: center; gap: 6px; min-height: 46px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; font-size: 13px; text-align: left; color: var(--ink-2); overflow: hidden; }
.tho-chip b { font-size: 17px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.tho-chip:hover { border-color: #d8ccb7; }
.tho-chip.on { background: var(--gold); border-color: var(--gold); color: #fff; box-shadow: 0 2px 6px rgba(154, 120, 65, .35); }
.tho-chip.on b { color: #fff; }
.tho-chip.noso { color: var(--muted); font-size: 12px; }
@media (max-width: 640px) { .tho-chips { grid-template-columns: repeat(3, 1fr); } .tho-chip { min-height: 50px; } }

/* ---------- Lịch sử khách + ảnh trước / sau (15/11/2026) ---------- */
.hist { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 14px; }
.hist-load { color: var(--muted); font-size: 14px; }
.hist-new { border-left-color: var(--ok); background: var(--ok-bg); font-size: 15px; }
.hist-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 10px; }
.hist-h span:first-child { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-d); width: 100%; }
.hist-h b { font-size: 18px; }
.hist-s { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.hist-s > div { background: var(--bg); border-radius: 10px; padding: 8px 4px; text-align: center; min-width: 0; }
.hist-s b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-s small { color: var(--muted); font-size: 11px; }
.hv { border-top: 1px dashed var(--line); padding: 10px 0; }
.hv:first-child { border-top: 0; padding-top: 0; }
.hv-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.hv-h b { font-size: 16px; }
.hv-cn { margin-left: auto; font-size: 12px; background: var(--cream); border-radius: 999px; padding: 2px 10px; }
.hv-ph { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.ph { position: relative; width: 104px; height: 104px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--cream); cursor: pointer; }
.ph img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.ph img.on { opacity: 1; }
.ph i { position: absolute; left: 0; right: 0; bottom: 0; font-style: normal; font-size: 11px; font-weight: 600; color: #fff; background: rgba(20, 20, 20, .55); text-align: center; padding: 2px 0; }
.ph-err::after { content: 'Lỗi ảnh'; position: absolute; inset: 0 0 18px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--bad); }
.hv-l { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.hv-l li { display: flex; gap: 6px; padding: 2px 0; }
.hv-l li .num { margin-left: auto; white-space: nowrap; }
.hv-f { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-top: 4px; }
.hv-f b { font-size: 15px; white-space: nowrap; }
.modal.modal-wide { max-width: 980px; }
.pv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pv-col img { width: 100%; border-radius: 10px; background: var(--cream); min-height: 120px; margin-bottom: 4px; }
.pv-t { font-weight: 700; letter-spacing: .08em; color: var(--gold-d); margin-bottom: 6px; text-align: center; }
.pv-none { color: var(--muted); text-align: center; padding: 40px 0; background: var(--card); border-radius: 10px; }
.spin.dark { width: 14px; height: 14px; vertical-align: -2px; color: var(--gold); }
@media (max-width: 400px) { .hist-s { grid-template-columns: repeat(2, 1fr); } .ph { width: 92px; height: 92px; } }

/* ---------- Phản hồi khách (15/11/2026, chuyển từ sale.chanhair.vn) ---------- */
.ph-subs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; -webkit-overflow-scrolling: touch; }
.ph-subs .chip { white-space: nowrap; min-height: 42px; font-size: 15px; }
.ph-n:empty { display: none; }
.ph-n { background: var(--bad); color: #fff; border-radius: 999px; font-size: 12px; padding: 0 7px; margin-left: 2px; }
.ph-flt { margin: 8px 0; gap: 6px; }
.ph-more { margin: 6px 0 12px; }
.ph-more summary { cursor: pointer; color: var(--gold-d); font-weight: 600; padding: 6px 0; }
.ph-sum { justify-content: space-between; margin: 6px 2px; }
.ph-list { display: flex; flex-direction: column; gap: 10px; }
.ph-card { display: block; text-align: left; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--info); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); cursor: pointer; }
.ph-card.st-da-bh { border-left-color: var(--ok); }
.ph-card.st-huy { border-left-color: var(--bad); opacity: .75; }
.ph-card.src-ph { border-left-color: #8a6bbf; }
.ph-card:focus-visible { outline: 3px solid rgba(184, 147, 90, .4); }
.ph-c-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.ph-c-k { margin-top: 6px; font-size: 16px; }
.ph-c-t { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.ph-tho-x { color: #b45309; font-weight: 600; }
.ph-tho li { display: block; }
.ph-c-x { margin: 4px 0; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ph-sel { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.ph-sel input { width: 20px; height: 20px; }
.ph-bar { position: sticky; bottom: calc(var(--nav-h) + 8px); margin-top: 10px; }
.b-PH { background: #efe7f8; color: #6a4a9c; }
.ph-quote { font-size: 16px; white-space: pre-wrap; border-left: 4px solid var(--gold); }
.ph-big { width: 100%; max-height: 80vh; object-fit: contain; border-radius: 10px; background: #000; }
.ph video { width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.ph video.on { opacity: 1; }
.ph-add { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 28px; border-style: dashed; background: #fff; }
.ph-add i { position: static; background: none; color: var(--ink-2); font-size: 12px; }
.pf.busy { opacity: .6; }
.pf-x { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(20, 20, 20, .65); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.big-in { font-size: 20px; letter-spacing: .04em; font-weight: 600; }
.ph-visit { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.ph-visit.on { border-color: var(--gold); background: #fffaf1; }
.ph-visit input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; }
.ph-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph-cat { min-height: 56px; border: 1px solid var(--line); background: #fff; border-radius: 12px; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; padding: 6px; }
.ph-cat.on { background: var(--gold-d); border-color: var(--gold-d); color: #fff; }
.ph-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ph-chips .chip { min-height: 42px; font-size: 15px; }
.bh-media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.bh-c { position: relative; border: 1px dashed var(--line); border-radius: 12px; padding: 6px; text-align: center; background: #fff; min-width: 0; }
.bh-c.ok { border-style: solid; border-color: var(--ok); }
.bh-c.busy { opacity: .55; pointer-events: none; }
.bh-c .ml { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.bh-c.ok .ml { color: var(--ok); }
.bh-add { width: 100%; min-height: 84px; border: 0; background: var(--cream); border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.bh-add span { font-size: 26px; }
.bh-view { width: 100%; height: 84px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--cream); cursor: pointer; }
.bh-view img, .bh-view video { width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.bh-view .on { opacity: 1; }
.bh-need:empty { display: none; }
.bh-need { color: var(--warn); margin-bottom: 8px; }
.bh-need.bad { color: var(--bad); font-weight: 600; }
.bh-done { border-left: 4px solid var(--ok); }
/* Việc 6 (16/11/2026): mục Bảo hành */
.bh-han { display: inline-block; margin-top: 4px; font-size: 13px; color: var(--info); font-weight: 600; }
.bh-han.qua { color: var(--bad); }
.bh-han.ok { color: var(--ok); }
.bh-card.st-qua-han { border-left: 4px solid var(--bad); }
.bh-card.st-chua-bh { border-left: 4px solid var(--info); }
.bh-card.st-da-bh { border-left: 4px solid var(--ok); }
.bh-link { border-left: 4px solid var(--info); }
.bh-link .row { gap: 8px; align-items: center; }
.bh-n:empty { display: none; }
.bh-n { font-weight: 700; margin-left: 2px; }
.bh-tiles { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.bh-tiles .ap-stat .k { white-space: normal; }
.hist-bh { border-left: 4px solid var(--info); }
.rec { position: fixed; inset: 0; z-index: 80; background: #000; display: flex; flex-direction: column; }
.rec-v { flex: 1; width: 100%; object-fit: cover; min-height: 0; }
.rec-h { color: #fff; text-align: center; padding: 8px; font-size: 14px; }
.rec-bar { display: flex; align-items: center; justify-content: space-around; gap: 8px; padding: 12px 12px max(16px, env(safe-area-inset-bottom)); }
.rec-t { color: #fff; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ph-tiles { grid-template-columns: repeat(3, 1fr); }
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
.ph-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.ph-tbl th, .ph-tbl td { padding: 8px 5px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.ph-tbl th:first-child, .ph-tbl td:first-child { text-align: left; white-space: normal; min-width: 128px; }
.ph-tbl th { font-size: 12px; color: var(--muted); font-weight: 600; }
.ph-tbl td.zero { color: #cfc6b6; }
.ph-tbl tr.clk { cursor: pointer; }
.ph-tbl tr.clk:active { background: var(--cream); }
@media (max-width: 440px) { .nav button { font-size: 11px; } .nav button span { white-space: nowrap; } }
/* 7 mục (quản lý có thêm Bảo hành): điện thoại nhỏ thì vuốt ngang thanh dưới, không bóp chữ */
@media (max-width: 899px) { .nav { overflow-x: auto; scrollbar-width: none; } .nav::-webkit-scrollbar { display: none; } .nav button { flex: 1 0 auto; min-width: 54px; padding: 0 4px; } }
@media (max-width: 400px) { .ph-cats { grid-template-columns: 1fr; } .ph-cat { min-height: 50px; } }

/* ---------- Điểm tích luỹ (15/11/2026, đọc từ admin.chanhair.vn) ---------- */
.diem { background: #fffaf0; border: 1px solid #ecd9b4; border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; }
.diem-off { background: var(--card); border-color: var(--line); }
.diem-h { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-d); }
.diem-h .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.diem-v { font-size: 15px; margin: 2px 0; }
.diem-v b { font-size: 28px; font-variant-numeric: tabular-nums; color: var(--ink); margin-right: 4px; }
.diem-hh { margin-top: 6px; font-size: 14px; background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 6px 10px; }
.diem-gd { margin-top: 8px; font-size: 14px; }
.diem-gd summary { cursor: pointer; color: var(--gold-d); font-weight: 600; }
.diem-t { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.diem-t .duong { color: var(--ok); } .diem-t .am { color: var(--bad); }
/* ---------- Hoàn tiền (Việc 7, 16/11/2026 — chỉ admin) ---------- */
.ht-bill { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.ht-bill:active, .ht-row:active { background: var(--cream); }
.ht-bill .num { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.ht-row { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ht-row .row { gap: 8px; align-items: center; flex-wrap: wrap; }
.ht-tbl td:last-child, .ht-tbl th:last-child { text-align: left; white-space: normal; min-width: 180px; }
.ht-tbl input[type=checkbox], .ht-tho input { width: 20px; height: 20px; vertical-align: middle; }
.ht-tbl tr.ht-done td { color: var(--muted); background: #faf7f2; }
.ht-tho { display: flex; gap: 8px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ht-big { font-size: 22px; font-variant-numeric: tabular-nums; }
/* ===== VIỆC 9 (16/11/2026) — chốt sale theo kênh ===== */
.kenh-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 10px; }
.kenh-pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 64px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.kenh-pick button b { font-size: 15px; }
.kenh-pick button small { font-size: 12px; color: var(--muted); }
.kenh-pick button[data-k="FBIG"].on { border-color: #1f5fbf; background: #eaf1fc; box-shadow: 0 2px 6px rgba(31, 95, 191, .18); }
.kenh-pick button[data-k="TIKTOK"].on { border-color: #141414; background: #141414; color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.kenh-pick button[data-k="TIKTOK"].on small { color: #d7d2ca; }
.chk-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: 14px; cursor: pointer; line-height: 1.4; }
.chk-row input { width: 22px; height: 22px; flex: 0 0 auto; margin: 0; accent-color: var(--gold-d); }
.tag-kenh { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: 1px; white-space: nowrap; }
.tag-kenh.k-FBIG { background: #eaf1fc; color: #1f5fbf; }
.tag-kenh.k-TIKTOK { background: #141414; color: #fff; }
.tag-kenh.k-none { background: var(--warn-bg); color: var(--warn); }
.tag-kenh.lg { font-size: 14px; padding: 4px 12px; margin-left: 0; }
.tag-hap { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-left: 4px; background: #f6e7f3; color: #8a2c74; vertical-align: 1px; white-space: nowrap; }
.cs-me { display: flex; align-items: center; background: #f6f2eb; color: var(--ink-2); }
.cs-sec .cs-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cs-hap { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: #f6e7f3; color: #6d2a5d; font-size: 14px; }
.cs-miss { color: var(--warn); }
.cs-det > summary { cursor: pointer; list-style: none; }
.cs-det > summary::-webkit-details-marker { display: none; }
.cs-det > summary h2 { display: inline; }
.cs-det > summary::after { content: '▾'; float: right; color: var(--muted); }
.cs-det[open] > summary::after { content: '▴'; }
.cs-loc { flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.cs-k { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1ebe1; }
.cs-k:last-child { border-bottom: 0; }
.cs-l { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.cs-l-chot { background: var(--ok-bg); color: var(--ok); }
.cs-l-chua { background: var(--warn-bg); color: var(--warn); }
.cs-l-hap { background: #f6e7f3; color: #8a2c74; }
.cs-hoan { color: var(--bad); font-weight: 700; }
.cs-days { display: flex; flex-direction: column; }
.cs-day { display: grid; grid-template-columns: 70px 1fr auto; grid-template-areas: "d v b" "d by by"; align-items: center; column-gap: 8px; padding: 8px 0; border-bottom: 1px solid #f1ebe1; }
.cs-day .cs-dn { grid-area: d; font-weight: 600; font-size: 14px; }
.cs-day input, .cs-day .cs-dv { grid-area: v; min-width: 0; }
.cs-day [data-save] { grid-area: b; }
.cs-day .cs-by { grid-area: by; }
.cs-day .cs-by:empty { display: none; }
.cs-vet { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.cs-quyen { display: flex; flex-direction: column; }
.cs-sec .tbl th { white-space: normal; vertical-align: bottom; }
.cs-sec .tbl th, .cs-sec .tbl td { padding-left: 5px; padding-right: 5px; }

/* ===== 21/11/2026: YÊU CẦU NHÂN SỰ (khoá) + KHÁCH VÃNG LAI QUÉT QR ===== */
.tag-ycl { display: inline-block; font-size: 11px; font-weight: 700; background: #fff4dc; color: #8a5a00; border: 1px solid #ecd29a; border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: 1px; white-space: nowrap; }
.tag-ycl.no { background: #f1f1ef; color: #555; border-color: #dcdcd6; }
.tag-ycl small { font-weight: 500; opacity: .8; }
.yc-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.yc-pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 64px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.yc-pick button b { font-size: 15px; }
.yc-pick button small { font-size: 12px; color: var(--muted); }
.yc-pick button[data-ycv="CO"].on { border-color: var(--gold-d); background: #fff4dc; box-shadow: 0 2px 6px rgba(154, 120, 65, .25); }
.yc-pick button[data-ycv="KHONG"].on { border-color: #444; background: #f1f1ef; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.yc-lock { margin: 8px 0 10px; padding: 9px 12px; border: 1px solid #ecd29a; background: #fff8e8; border-radius: 10px; font-size: 14px; }
.yc-lock.no { border-color: #dcdcd6; background: #f6f6f3; }
.yc-h { padding: 8px 0; border-bottom: 1px solid var(--line); }
.yc-h:last-child { border-bottom: 0; }
.kq-box { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 12px 14px; margin-bottom: 14px; }
.kq-box.has { border: 2px solid var(--gold); background: #fffaf0; box-shadow: 0 2px 10px rgba(154, 120, 65, .15); }
.kq-h { font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.kq-h i { font-style: normal; display: inline-block; min-width: 22px; text-align: center; background: var(--bad); color: #fff; border-radius: 11px; font-size: 12px; padding: 1px 6px; margin-left: 4px; vertical-align: 2px; }
.kq-box:not(.has) .kq-h i { background: #bbb; }
.kq-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.kq-row .grow { flex: 1; min-width: 0; }
.kq-tags { margin: 3px 0; display: flex; flex-wrap: wrap; gap: 4px; }
.kq-tags .tag-ycl { margin-left: 0; }
.kq-act { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex: 0 0 auto; }
.tag-kq { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; white-space: nowrap; background: #eef3fb; color: #1f4f9a; }
.tag-kq.k-LICH { background: var(--ok-bg); color: var(--ok); }
.tag-kq.k-MOI { background: #f6e7f3; color: #8a2c74; }
.kq-done summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 8px 0 2px; }
.kq-done .kq-row { opacity: .75; }
@media (max-width: 640px) { .kq-row { flex-wrap: wrap; } .kq-act { flex-direction: row; width: 100%; } .kq-act .btn { flex: 1; } }