/* =============================================================
   HAPPY SPA — giao diện
   Tông: nâu cacao + hồng phấn + nền kem
   ============================================================= */
:root {
  --brown: #5e3626; --brown-2: #8a5a43; --brown-3: #b07d62;
  --rose: #d4738a; --rose-2: #f6dde3; --rose-3: #fcf0f3;
  --gold: #c9a063;
  --cream: #faf6f1; --paper: #fff; --line: #eee3da; --line-2: #f4ece5;
  --text: #2d2420; --muted: #8c7f77;
  --green: #2f8a5a; --green-bg: #e7f5ec; --red: #c2453a; --red-bg: #fdebe8; --blue: #3a62a8; --blue-bg: #e9effa;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(94, 54, 38, .05), 0 6px 18px rgba(94, 54, 38, .07);
  --shadow-lg: 0 18px 50px rgba(60, 30, 20, .22);
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--text);
  background: var(--cream) radial-gradient(1200px 400px at 100% -10%, var(--rose-3), transparent 70%) no-repeat;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
button, input, select { font-family: inherit; }

/* ---------- đầu trang ---------- */
header {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 20px;
  background: linear-gradient(120deg, #4f2c1f 0%, var(--brown) 45%, #7a4a35 100%); color: #fff;
  position: sticky; top: 0; z-index: 20; box-shadow: 0 4px 18px rgba(60, 30, 20, .18);
}
.brand { font-weight: 800; font-size: 19px; letter-spacing: .2px; display: flex; align-items: center; gap: 10px; }
.brand .logo { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.5), 0 2px 8px rgba(0,0,0,.25); }
nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
nav button {
  background: transparent; border: 0; color: #f3e6dc; padding: 8px 14px; border-radius: 999px;
  cursor: pointer; font-size: 14px; font-weight: 500;
}
nav button:hover { background: rgba(255,255,255,.12); color: #fff; }
nav button.active { background: #fff; color: var(--brown); font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
nav .ic { width: 18px; height: 18px; margin-right: 6px; vertical-align: -4px; flex: none; }
.mode { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.14); }
.mode.local { background: #f6cf7d; color: #4a3000; font-weight: 600; }
#logout { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); }
#logout:hover { background: rgba(255,255,255,.25); }

main { padding: 20px; max-width: 1400px; margin: 0 auto; }
h2, h3 { letter-spacing: -.2px; }
h3 { margin: 22px 0 10px; color: var(--brown); font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
h3::before { content: ''; width: 4px; height: 18px; border-radius: 4px; background: linear-gradient(var(--rose), var(--gold)); flex: none; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .red { color: var(--red); } .green { color: var(--green); }

/* ---------- nút & ô nhập ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--paper); padding: 8px 14px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text);
  transition: transform .1s, box-shadow .15s, border-color .15s, background .15s;
}
.btn:hover { border-color: var(--brown-3); box-shadow: 0 2px 8px rgba(94,54,38,.08); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--brown-2), var(--brown)); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(94,54,38,.25); }
.btn.primary:hover { box-shadow: 0 6px 16px rgba(94,54,38,.32); }
.btn.ok { background: var(--green); color: #fff; border-color: var(--green); }
.btn.danger { color: var(--red); border-color: #f0c4be; }
.btn.danger:hover { background: var(--red-bg); }
.btn.tiny { padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
.big-btn { padding: 10px 18px; font-size: 15px; font-weight: 700; border-radius: 12px; }

input, select {
  font-size: 15px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); width: 100%; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(212,115,138,.18); }
input::placeholder { color: #b5aaa2; }
label { display: block; margin: 10px 0; font-size: 13px; font-weight: 500; color: #6a5d55; }
label > input, label > select, label > .suggest-wrap { margin-top: 4px; }
label.check { display: flex; align-items: center; gap: 6px; font-weight: 400; } label.check input { width: auto; }
input[type=checkbox] { accent-color: var(--brown-2); width: 16px; height: 16px; }

/* ---------- thanh công cụ ---------- */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=date] { width: auto; }
.toolbar input.big { flex: 1; min-width: 240px; font-size: 16px; padding: 11px 14px; border-radius: 12px; box-shadow: var(--shadow); border-color: transparent; }
.spacer { flex: 1; }
.seg { display: inline-flex; background: #efe6de; border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; cursor: pointer; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: #6a5d55; }
.seg button.active { background: #fff; color: var(--brown); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.board-title { font-size: 16px; color: var(--brown); font-weight: 700; }

/* ---------- thông báo ---------- */
.alert { padding: 11px 14px; border-radius: 12px; margin: 10px 0; font-size: 14px; border: 1px solid transparent; }
.alert.warn { background: #fff4ea; border-color: #f4cfa9; color: #6b3d12; }
.alert.ok { background: var(--green-bg); border-color: #c9e8d4; color: #275c3e; font-size: 13px; }

/* ---------- thẻ ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.card { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.card-title { font-weight: 700; color: var(--brown); font-size: 16px; }
.small-card { cursor: default; }
.badge { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.busy { background: var(--red-bg); color: var(--red); } .badge.free { background: var(--green-bg); color: var(--green); }

/* ---------- trang Đặt lịch: từng giường ---------- */
.lanes { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.lane { background: var(--paper); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); border: 1px solid var(--line-2); position: relative; overflow: hidden; }
.lane::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--green); }
.lane-busy::before { background: linear-gradient(90deg, var(--red), var(--rose)); } .lane-none::before { background: #c9c0b9; }
.lane-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.lane-head > b { font-size: 17px; color: var(--brown); font-weight: 800; }
.lane-tag { margin-top: 2px; }
.slots { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.slot { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; font-size: 13.5px; transition: transform .1s, box-shadow .15s; }
.slot:hover { box-shadow: 0 3px 10px rgba(0,0,0,.07); }
.slot:active { transform: scale(.99); }
.slot-time { font-weight: 700; white-space: nowrap; min-width: 94px; font-variant-numeric: tabular-nums; }
.slot-main { flex: 1; min-width: 0; line-height: 1.35; }
.slot-main .small { opacity: .8; }
.slot-st { font-size: 11px; font-weight: 600; white-space: nowrap; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.6); }
.slot-free { background: #f4fbf6; color: #2f6b48; border: 1.5px dashed #b7dfc5; }
.slot-free:hover { background: #e8f6ed; border-color: #8fcda6; }
.slot-add { font-weight: 700; white-space: nowrap; background: var(--green); color: #fff; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; }
.slot-now { box-shadow: 0 0 0 2px var(--red) inset, 0 4px 12px rgba(194,69,58,.18); }

/* màu trạng thái lịch */
.st-booked { background: var(--blue-bg); color: #2c4c86; }
.st-progress { background: #fde7e4; color: #9a3027; }
.st-done { background: #e9f4ec; color: #3a6b4b; }
.st-cancel { background: #f0eeec; color: #8c8580; text-decoration: line-through; }
.legend { margin-top: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin: 0 5px 0 12px; vertical-align: -2px; }
.legend i:first-child { margin-left: 0; }

/* ---------- biểu đồ giờ ---------- */
.timeline-wrap { overflow-x: auto; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line-2); }
.timeline { position: relative; }
.tl-row, .tl-head { display: flex; border-bottom: 1px solid var(--line-2); }
.tl-row { height: 60px; } .tl-head { height: 30px; background: #fcf9f6; }
.tl-label { width: 110px; flex: none; position: sticky; left: 0; background: var(--paper); z-index: 4; padding: 8px 10px; font-weight: 700; font-size: 13px; color: var(--brown); border-right: 1px solid var(--line); }
.tl-head .tl-label { background: #fcf9f6; }
.tl-track { position: relative; flex: none; cursor: copy;
  background-image: repeating-linear-gradient(90deg, #eadfd5 0 1px, transparent 1px 120px), repeating-linear-gradient(90deg, #f7f1ec 0 1px, transparent 1px 30px); }
.tl-track.head { cursor: default; background: none; }
.tl-hour { position: absolute; top: 7px; font-size: 11px; font-weight: 600; color: var(--muted); transform: translateX(-50%); }
.tl-block { position: absolute; top: 5px; bottom: 5px; border-radius: 9px; padding: 4px 8px; font-size: 12px; line-height: 1.3; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); z-index: 3; pointer-events: none; }
.now-line::before { content: ''; position: absolute; top: 2px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

/* ---------- số liệu & bảng ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 12px 0; }
.stat { background: var(--paper); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); border: 1px solid var(--line-2); position: relative; overflow: hidden; }
.stat::after { content: ''; position: absolute; right: -18px; top: -18px; width: 64px; height: 64px; border-radius: 50%; background: var(--rose-3); }
.stat span { font-size: 12.5px; color: var(--muted); position: relative; z-index: 1; } .stat b { font-size: 22px; color: var(--brown); font-weight: 800; position: relative; z-index: 1; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); text-align: left; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { background: #f7f0ea; font-size: 12.5px; font-weight: 700; color: #6a5d55; }
.tbl.small td { font-size: 13px; }
.row-low td { background: #fff7ef; }
.clickable { cursor: pointer; } .clickable:hover td { background: #fcf6f1; }
.table-scroll { overflow-x: auto; border-radius: var(--radius); }
.bar { width: 160px; height: 8px; background: #f1e8e1; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--rose), var(--brown-2)); border-radius: 99px; }
.pill { font-size: 12px; padding: 3px 9px; border-radius: 999px; font-weight: 600; }

/* ---------- trang Nhân viên ---------- */
.staff-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.staff-card { gap: 6px; }
.kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.kpi > div { background: linear-gradient(160deg, #fdf7f3, #f8efe8); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 1px; }
.kpi > div:first-child { background: linear-gradient(160deg, #f1faf4, #e3f3e9); }
.kpi span { font-size: 12px; color: var(--muted); font-weight: 500; } .kpi b { font-size: 20px; color: var(--green); font-weight: 800; } .kpi small { font-size: 11.5px; color: #6f625a; }

/* ---------- bảng giá ---------- */
.cat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 22px 0 10px; }
.cat-head h3 { margin: 0; }
.cat-pct { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #6a5d55; background: var(--paper); padding: 4px 6px 4px 12px; border-radius: 999px; box-shadow: var(--shadow); }
.cat-pct input { width: 64px; padding: 5px 8px; border-radius: 8px; text-align: center; }
.cat-pct .btn { border-radius: 999px; }
.svc-list { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line-2); }
.svc { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background .12s; }
.svc:last-child { border-bottom: 0; }
.svc:hover { background: #fcf6f1; } .svc.inactive { opacity: .45; }
.svc b { color: var(--brown); white-space: nowrap; font-weight: 800; }
.svc-right { display: flex; align-items: center; gap: 10px; }
.pct { background: var(--green-bg); color: #2f6b48; white-space: nowrap; } .pct-def { background: #f3ede8; color: var(--muted); }

/* ---------- hộp thoại ---------- */
.modal { position: fixed; inset: 0; background: rgba(45, 25, 15, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; z-index: 50; overflow-y: auto; padding: 28px 12px; animation: fade .18s ease; }
.modal.hidden { display: none; }
.modal-box { background: var(--paper); border-radius: 20px; padding: 20px 22px; width: 100%; max-width: 660px; box-shadow: var(--shadow-lg); animation: pop .22s cubic-bezier(.2,.9,.3,1.2); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
.modal-head h2 { margin: 0; color: var(--brown); font-size: 21px; font-weight: 800; }
.modal-foot { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.x { border: 0; background: #f4eee9; width: 34px; height: 34px; border-radius: 50%; font-size: 15px; cursor: pointer; color: var(--muted); flex: none; }
.x:hover { background: #ebe1d9; color: var(--text); }
table.items .x { width: 28px; height: 28px; font-size: 13px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes up { from { transform: translateY(100%); } }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.suggest-wrap { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; z-index: 5; box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto; padding: 4px; }
.suggest:empty { display: none; }
.sg { display: flex; justify-content: space-between; gap: 8px; padding: 9px 10px; cursor: pointer; color: var(--text); font-size: 14px; border-radius: 8px; }
.sg.hl, .sg:hover { background: var(--rose-3); } .sg b { color: var(--brown); white-space: nowrap; }
table.items { width: 100%; border-collapse: collapse; margin: 8px 0; background: #fcf9f6; border-radius: 12px; overflow: hidden; }
table.items th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 6px 4px; }
table.items td { padding: 5px 6px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
table.items input { width: 100px; padding: 5px 7px; }
table.items tr.sum td { font-weight: 800; color: var(--brown); border: 0; font-size: 15px; }
.hint { background: var(--rose-3); border: 1px solid var(--rose-2); border-radius: 12px; padding: 6px 12px; font-size: 13.5px; }
.hint:empty { display: none; } .hint > div { margin: 5px 0; }

/* ---------- cài đặt ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.panel { background: var(--paper); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); border: 1px solid var(--line-2); }
.panel h3 { margin-top: 2px; }
.panel .btn { margin: 4px 4px 4px 0; }
.row-edit { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.row-edit label.check { margin: 0; white-space: nowrap; }
.row-edit.skills { flex-wrap: wrap; gap: 6px; margin: -2px 0 14px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.chip { background: #faf5f1; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; transition: background .12s, border-color .12s; }
.chip:has(input:checked) { background: var(--rose-3); border-color: #ecc0cb; color: #7a3447; }

/* ---------- đăng nhập ---------- */
.login { max-width: 380px; margin: 8vh auto 40px; padding: 28px 26px; text-align: center; border-radius: 22px; box-shadow: var(--shadow-lg); }
.login h2 { margin: 8px 0 2px; color: var(--brown); font-size: 24px; font-weight: 800; }
.login label { text-align: left; }
.login .btn.primary { width: 100%; padding: 12px; font-size: 16px; font-weight: 700; margin-top: 8px; border-radius: 12px; }
.login-logo { width: 76px; height: 76px; border-radius: 50%; box-shadow: 0 6px 20px rgba(94,54,38,.3); }

/* ---------- thông báo nổi ---------- */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(90px); background: #3a2e28; color: #fff; padding: 11px 20px; border-radius: 999px; font-weight: 500; font-size: 14px; transition: .25s; z-index: 100; opacity: 0; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); text-align: center; }
#toast.show { transform: translateX(-50%); opacity: 1; }
#toast.ok { background: var(--green); } #toast.err { background: var(--red); }

/* ============================================================
   ĐIỆN THOẠI
   ============================================================ */
@media (max-width: 640px) {
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); font-size: 14.5px; }
  main { padding: 12px; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none; }

  /* đầu trang: 1 dòng gọn */
  header { flex-wrap: nowrap; gap: 8px; padding: 9px 14px; padding-top: calc(9px + env(safe-area-inset-top)); }
  .brand { font-size: 18px; flex: 1; }
  .brand .logo { width: 30px; height: 30px; }
  .mode.cloud { display: none; }          /* chỉ hiện khi đang ở chế độ thử */
  .mode.local { font-size: 11px; }

  /* menu thành thanh tab dưới đáy, nền trắng */
  nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; flex-wrap: nowrap; gap: 2px;
        background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(60,30,20,.08);
        padding: 5px 6px calc(5px + env(safe-area-inset-bottom)); }
  nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
               padding: 6px 1px; font-size: 11px; font-weight: 600; line-height: 1.15; border-radius: 14px; color: var(--muted); }
  nav button:hover { background: transparent; color: var(--muted); }
  nav button.active { background: var(--rose-3); color: var(--brown); box-shadow: none; }
  nav .ic { width: 23px; height: 23px; margin: 0; stroke-width: 1.8; }
  nav button.active .ic { stroke-width: 2.2; color: var(--rose); }

  /* dễ bấm bằng ngón tay: nút ≥44px, ô nhập ≥44px, chữ ≥16px (iPhone không tự phóng to) */
  input, select { font-size: 16px; min-height: 44px; }
  .btn { min-height: 44px; padding: 9px 14px; }
  .btn.tiny { min-height: 34px; padding: 5px 12px; font-size: 13px; }
  .seg button { padding: 9px 14px; font-size: 14px; }
  .x { width: 40px; height: 40px; }
  table.items input { min-height: 38px; }
  table.items td:nth-child(2) input { width: 100px; } table.items td:nth-child(3) input { width: 60px; }
  table.items td:first-child { font-size: 13.5px; line-height: 1.3; }

  /* nút "+ Đặt lịch" nổi ở góc phải, ngay trên thanh menu */
  .big-btn { position: fixed; right: 14px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 25;
             border-radius: 999px; padding: 14px 22px; font-size: 16px; box-shadow: 0 8px 24px rgba(94,54,38,.4); }
  .modal-foot .spacer { display: none; }
  label.check input, .chip input { min-height: 0; }
  .chip { padding: 7px 12px; font-size: 13.5px; }
  .slot { min-height: 48px; }
  .slot-add { padding: 6px 12px; font-size: 13px; }
  .toolbar { gap: 6px; }
  .toolbar input.big { min-width: 0; width: 100%; }
  h3 { margin: 18px 0 8px; }

  .lanes { gap: 12px; }
  .lanes, .cards.staff-cards { grid-template-columns: 1fr; }
  .lane { padding: 12px; }
  .slot { padding: 8px 9px; gap: 8px; }
  .slot-time { min-width: 84px; }
  .svc { flex-wrap: wrap; padding: 10px 12px; } .svc-right { margin-left: auto; }
  .cat-head { margin-top: 18px; }

  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 10px 12px; font-size: 13.5px; }

  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat b { font-size: 18px; }

  /* hộp thoại trượt lên từ dưới (kiểu ứng dụng) */
  .modal { padding: 40px 0 0; align-items: flex-end; }
  .modal-box { border-radius: 22px 22px 0 0; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); max-width: none; min-height: 60vh; animation: up .25s cubic-bezier(.2,.9,.3,1); }
  .modal-box::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 9px; background: #e2d6cc; margin: 0 auto 10px; }
  .grid2 { gap: 8px; }
  .modal-foot .btn.primary { flex: 1; padding: 12px; font-size: 16px; font-weight: 700; }

  .tbl th, .tbl td { padding: 8px 8px; font-size: 13px; }
  .table-scroll .tbl td { white-space: nowrap; }
  .login { margin-top: 5vh; padding: 24px 20px; }

  .lanes { padding-bottom: 60px; }   /* chừa chỗ cho nút nổi */
  #toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
}
