/* PetVC — giao diện tông cam */
:root {
  --brand: #ff7420;
  --brand-2: #e85f0e;
  --brand-3: #c14a06;      /* chữ / liên kết màu cam đậm, đọc rõ trên nền trắng */
  --brand-soft: #ffe7d7;
  --brand-softer: #fff5ee;
  --ink: #ffffff;          /* chữ trên nền cam */
  --side: #fff0e6;
  --ok: #15803d;
  --ok-soft: #e6f6ec;
  --warn: #b45309;
  --warn-soft: #fff1dc;
  --danger: #c62828;
  --danger-soft: #fdecec;
  --info: #1d4ed8;
  --info-soft: #e8efff;
  --bg: #f8f4f1;
  --panel: #ffffff;
  --line: #efe3db;
  --line-2: #e2d0c4;
  --text: #2a1e18;
  --muted: #7d6b61;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(80, 35, 0, .06), 0 4px 14px rgba(80, 35, 0, .07);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-3); }
h4 { margin: 18px 0 8px; font-size: 14px; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.center { text-align: center; }
.lead { font-size: 15px; line-height: 1.5; }

/* ---------- thành phần chung ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.panel h2 { font-size: 15px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.panel h2 .grow { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.btn { border: 1px solid var(--line-2); background: #fff; padding: 8px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.2; min-height: 36px; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--brand-2); background: var(--brand-softer); }
.btn.primary { background: var(--brand); color: var(--ink); border-color: var(--brand-2); font-weight: 600; }
.btn.primary:hover { background: var(--brand-2); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(0,0,0,.05); }
.btn.sm { padding: 4px 10px; font-size: 13px; min-height: 30px; }
.btn.big { padding: 13px 18px; font-size: 16px; min-height: 48px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; cursor: pointer; font-size: 16px; width: 34px; height: 34px; border-radius: 8px; display: inline-grid; place-items: center; }
.icon-btn:hover { background: rgba(0,0,0,.06); }
input, select, textarea { border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; background: #fff; min-width: 0; min-height: 36px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(255, 116, 32, .4); border-color: var(--brand-2); }
input[readonly] { background: #f8f4f1; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; min-height: 0; margin: 0; accent-color: var(--brand-3); }
input.money, input.num { text-align: right; font-variant-numeric: tabular-nums; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
label.f > input, label.f > select, label.f > textarea, label.f > .pw-wrap { color: var(--text); }
label.chk { cursor: pointer; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
label.chk:has(input:checked) { background: var(--brand-soft); border-color: var(--brand-2); }
.hint { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span2 { grid-column: span 2; }
.form-grid .span3, .form-grid .full { grid-column: 1 / -1; }
.pet-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr 1fr 2fr; gap: 6px; margin-bottom: 6px; }
.pw-wrap { display: flex; gap: 4px; }
.pw-wrap input { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right, .num { text-align: right; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ok-text { color: var(--ok); }
.bad-text { color: var(--danger); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: var(--brand-soft); color: #a3460a; white-space: nowrap; }
.tag.svc { background: var(--ok-soft); color: var(--ok); }
.tag.bad { background: var(--danger-soft); color: var(--danger); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.info { background: var(--info-soft); color: var(--info); }
.tag.gray { background: #eee; color: #555; }
table.t { width: 100%; border-collapse: collapse; background: #fff; }
table.t th, table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.t th { background: #fbf6f2; font-weight: 600; font-size: 13px; position: sticky; top: 0; z-index: 1; color: #5f5049; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--brand-softer); }
table.t tr.cancelled td { color: #aaa; text-decoration: line-through; }
table.t tr.subtotal td, table.t tfoot td { background: #fdf8f5; font-weight: 600; }
table.t td.thumb { width: 52px; padding: 4px 8px; }
.thumb img, .thumb .ph { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--brand-softer); display: grid; place-items: center; font-size: 20px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.table-wrap.tall { max-height: calc(100vh - 210px); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.card .k { color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; }
.card .v { font-size: 22px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.card .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card.hl { background: linear-gradient(135deg, #ff9a4d, #ff7420); border-color: var(--brand-2); color: #fff; }
.card.hl .k, .card.hl .s { color: #fff3ea; }
.card .v.ok { color: var(--ok); }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty .ico { font-size: 34px; display: block; margin-bottom: 6px; }
.callout { background: var(--brand-softer); border: 1px solid #ffd2b4; border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.55; margin-bottom: 14px; }
.callout.info { background: var(--info-soft); border-color: #c9d8ff; }
.callout.warn { background: var(--warn-soft); border-color: #f6d3a6; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 9px 14px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; color: var(--muted); font-weight: 600; }
.tabs button.active { border-color: var(--brand-2); color: var(--text); }
.bar { height: 8px; background: #f2e8e2; border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand-2); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13px; }
.kv > span:nth-child(odd) { color: var(--muted); }
.img-pick { display: flex; gap: 12px; align-items: center; }
.img-pick .preview { width: 110px; height: 110px; border-radius: 12px; border: 2px dashed var(--line-2); background: var(--brand-softer); display: grid; place-items: center; overflow: hidden; cursor: pointer; font-size: 13px; color: var(--muted); text-align: center; }
.img-pick .preview img { width: 100%; height: 100%; object-fit: cover; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: #fff; border-radius: 18px; padding: 6px 14px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.chip:hover { border-color: var(--brand-2); }
.chip.active { background: var(--brand); border-color: var(--brand-2); color: var(--ink); font-weight: 600; }

/* hộp thoại, thông báo */
.modal-back { position: fixed; inset: 0; background: rgba(35, 28, 10, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 14px; width: min(560px, 100%); max-height: 94vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(920px, 100%); }
.modal.xwide { width: min(1200px, 100%); }
.modal header { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; background: var(--brand-softer); border-radius: 14px 14px 0 0; }
.modal header h3 { margin: 0; font-size: 17px; flex: 1; }
.modal .body { padding: 18px; overflow: auto; }
.modal footer { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
#toast-root { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { background: #2b2518; color: #fff; padding: 12px 16px; border-radius: 10px; max-width: 400px; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 14px; }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }

/* đăng nhập */
.auth { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 20% 20%, #ffb073, #ff7420 45%, #e85f0e); padding: 16px; }
.auth .box { background: #fff; border-radius: 18px; padding: 30px; width: min(410px, 100%); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 50px rgba(120, 50, 0, .25); }
.auth-logo { font-size: 44px; text-align: center; }
.auth h1 { margin: 0; font-size: 22px; text-align: center; }

/* ---------- trang quản trị ---------- */
.layout { display: grid; grid-template-columns: 236px 1fr; height: 100vh; }
.sidebar { background: var(--side); border-right: 1px solid #f7ddcb; display: flex; flex-direction: column; min-height: 0; }
.brand { padding: 16px; font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.brand .logo { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; font-size: 20px; box-shadow: 0 2px 6px rgba(190,80,0,.35); }
.brand .small { font-weight: 400; color: var(--muted); display: block; }
.pos-link { margin: 0 12px 10px; padding: 12px; border-radius: 10px; background: var(--brand); color: var(--ink); font-weight: 700; text-align: center; text-decoration: none; border: 1px solid var(--brand-2); box-shadow: 0 2px 6px rgba(190,80,0,.3); }
.pos-link:hover { background: var(--brand-2); }
.sidebar nav { flex: 1; overflow: auto; padding: 0 8px 12px; }
.nav-group { font-size: 11px; font-weight: 700; color: #b07a55; text-transform: uppercase; letter-spacing: .04em; padding: 12px 10px 4px; }
.sidebar nav a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; color: var(--text); text-decoration: none; border-radius: 8px; margin: 1px 0; }
.sidebar nav a:hover { background: rgba(255, 194, 26, .25); }
.sidebar nav a.active { background: #fff; font-weight: 700; box-shadow: var(--shadow); }
.sidebar nav a .ic { width: 22px; text-align: center; }
.sidebar .me { padding: 12px 16px; border-top: 1px solid #f7ddcb; font-size: 13px; }
.sidebar .me b { display: block; }
.sidebar .me .btn { margin-top: 8px; width: 100%; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); padding: 10px 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 58px; }
.topbar h1 { font-size: 18px; margin: 0; flex: 1; white-space: nowrap; }
.content { flex: 1; overflow: auto; padding: 18px; }
.menu-btn { display: none; }

/* ---------- màn hình BÁN HÀNG ---------- */
body.pos-page { overflow: hidden; }
.pos-app { display: flex; flex-direction: column; height: 100vh; }
.pos-head { background: var(--brand); display: flex; align-items: flex-end; gap: 10px; padding: 6px 10px 0; min-height: 52px; border-bottom: 1px solid var(--brand-2); }
.pos-logo { font-weight: 800; font-size: 16px; padding-bottom: 12px; white-space: nowrap; color: var(--ink); }
.pos-tabs { display: flex; gap: 3px; align-items: flex-end; overflow-x: auto; flex: 1; min-width: 0; }
.pos-tab { padding: 9px 14px; background: rgba(255,255,255,.82); color: #7a3208; border-radius: 10px 10px 0 0; cursor: pointer; display: flex; gap: 6px; align-items: center; white-space: nowrap; border: 0; }
.pos-tab:hover { background: rgba(255,255,255,.7); }
.pos-tab.active { background: var(--bg); font-weight: 700; color: var(--text); }
.pos-tab.add { font-size: 17px; padding: 7px 14px; font-weight: 700; }
.pos-tab .x { opacity: .5; padding: 0 3px; border-radius: 4px; }
.pos-tab .x:hover { opacity: 1; background: var(--danger-soft); color: var(--danger); }
.badge { background: var(--brand-2); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; }
.pos-head-right { display: flex; gap: 8px; align-items: center; padding-bottom: 8px; white-space: nowrap; color: var(--ink); }
.pos-head-right .btn { background: rgba(255,255,255,.92); border-color: rgba(0,0,0,.12); color: #7a3208; }
.pos-head-right .btn:hover { background: #fff; }
.shift-pill { background: rgba(255,255,255,.92); color: #7a3208; border-radius: 16px; padding: 5px 10px; font-size: 12px; font-weight: 600; }

.pos-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 10px; padding: 10px; min-height: 0; }
.pos-left { display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; }
.pos-search { position: relative; background: #fff; border: 2px solid var(--brand); border-radius: 12px; padding: 6px 10px; display: flex; gap: 8px; align-items: center; box-shadow: var(--shadow); }
.pos-search .search-ico { font-size: 18px; }
.pos-search input.q { flex: 1; font-size: 16px; border: 0; outline: 0; padding: 7px 2px; min-height: 0; }
.pos-search .kbd { font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.15); z-index: 30; max-height: 380px; overflow: auto; }
.suggest > div { padding: 8px 12px; display: flex; gap: 10px; align-items: center; cursor: pointer; border-bottom: 1px solid #f6ebe4; }
.suggest > div.sel, .suggest > div:hover { background: var(--brand-soft); }
.suggest > div[data-new] { color: #c14a06; font-weight: 600; }
.suggest .sthumb { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; background: var(--brand-softer); display: grid; place-items: center; flex: none; }

.cat-bar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.cat-bar::-webkit-scrollbar { height: 4px; }
.cat-bar::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 2px; }
.cat-bar .chip { padding: 8px 16px; font-size: 14px; }
.pos-grid-wrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); grid-auto-rows: max-content; gap: 10px; overflow: auto; align-content: start; padding: 2px; flex: 1; min-height: 0; }
.tile { border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; display: flex; flex-direction: column; text-align: left; overflow: hidden; padding: 0; position: relative; transition: transform .08s, box-shadow .12s; }
.tile:hover { border-color: var(--brand-2); box-shadow: 0 4px 14px rgba(190, 80, 0, .2); }
.tile:active { transform: scale(.97); }
.tile .pic { aspect-ratio: 4 / 3; background: var(--brand-softer); display: grid; place-items: center; font-size: 30px; overflow: hidden; }
.tile .pic img { width: 100%; height: 100%; object-fit: cover; }
.tile .info { padding: 7px 9px 9px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.tile .n { font-size: 13px; line-height: 1.25; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.tile .meta { font-size: 11px; color: var(--muted); }
.tile .p { font-weight: 800; color: #c14a06; margin-top: auto; font-size: 14px; }
.tile .corner { position: absolute; top: 6px; right: 6px; }
.tile.out { opacity: .6; }

.pos-right { background: #fff; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; box-shadow: var(--shadow); }
.pos-right .sec { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.cust-search { position: relative; }
.cust-search input { width: 100%; }
.cust-box { background: var(--brand-softer); border: 1px solid #ffd2b4; border-radius: 10px; padding: 8px 10px; margin-top: 8px; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.pet-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.pet-chip { background: #fff; border: 1px solid #f0d98c; border-radius: 12px; padding: 1px 8px; font-size: 12px; }
.pkg-note { background: var(--ok-soft); color: var(--ok); border-radius: 8px; padding: 5px 8px; font-size: 12px; margin-top: 6px; }
.cart { flex: 1; overflow: auto; min-height: 80px; }
.line { border-bottom: 1px solid var(--line); padding: 9px 12px; }
.line.need { background: #fff2e8; }
.line.flash { animation: flash .9s; }
@keyframes flash { from { background: #ffd9bf; } to { background: transparent; } }
.line-main { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.line-name { font-weight: 600; line-height: 1.3; }
.line-name .sub { font-weight: 400; font-size: 12px; color: var(--muted); }
.line-amt { text-align: right; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; min-width: 84px; }
.stepper { display: flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; height: 34px; }
.stepper button { border: 0; background: #fbf2ec; width: 32px; cursor: pointer; font-size: 17px; font-weight: 700; }
.stepper button:hover { background: var(--brand-soft); }
.stepper input { border: 0; border-radius: 0; width: 46px; text-align: center; padding: 4px 2px; min-height: 0; }
.line-sub { display: flex; flex-direction: column; gap: 6px; margin-top: 7px; }
.who { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.who .lbl { color: var(--muted); min-width: 72px; }
.who .chip { padding: 4px 10px; font-size: 12px; }
.who.missing .lbl { color: var(--warn); font-weight: 700; }
.line-tools { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; align-items: center; }
.line-tools select, .line-tools input { padding: 3px 6px; min-height: 28px; font-size: 12px; }
.line-tools input.money { width: 90px; }
.cart-empty { text-align: center; color: var(--muted); padding: 30px 16px; line-height: 1.7; }
.cart-empty .ico { font-size: 38px; }
.steps { text-align: left; display: inline-block; margin-top: 8px; font-size: 13px; }
.steps b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; margin-right: 6px; font-size: 11px; }
.totals { padding: 10px 12px; border-top: 1px solid var(--line); background: #fdf8f5; }
.sum { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; gap: 8px; }
.sum input.money { width: 130px; min-height: 30px; padding: 4px 8px; }
.sum.big { font-size: 20px; font-weight: 800; }
.pay-btn { margin: 0 12px 12px; display: grid; grid-template-columns: 1fr 2.2fr; gap: 8px; }
.pay-btn .btn { min-height: 58px; font-size: 16px; font-weight: 800; flex-direction: column; gap: 2px; }
.pay-btn .btn .small { font-weight: 500; opacity: .8; }
.done-banner { background: var(--ok); color: #fff; border-radius: 12px; padding: 12px 16px; font-size: 15px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow); }
.done-banner .big-change { font-size: 20px; font-weight: 800; background: rgba(255,255,255,.22); padding: 2px 10px; border-radius: 8px; }
.done-banner .btn { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.5); color: #fff; }

/* màn hình thanh toán */
.pay-screen { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; }
.pay-total { background: var(--brand-softer); border: 1px solid #ffd2b4; border-radius: 12px; padding: 14px; text-align: center; }
.pay-total .v { font-size: 34px; font-weight: 800; color: #c14a06; }
.tender { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tender button { border: 2px solid var(--line-2); background: #fff; border-radius: 12px; padding: 14px 8px; cursor: pointer; font-size: 15px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tender button .ico { font-size: 24px; }
.tender button.active { border-color: var(--brand-2); background: var(--brand-soft); }
.cash-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cash-keys button { border: 1px solid var(--line-2); background: #fff; border-radius: 10px; padding: 12px 4px; cursor: pointer; font-size: 15px; font-weight: 700; }
.cash-keys button:hover { background: var(--brand-softer); border-color: var(--brand-2); }
.pay-field { display: flex; flex-direction: column; gap: 4px; }
.pay-field input { font-size: 22px; font-weight: 700; padding: 10px 12px; text-align: right; }
.change-box { border-radius: 12px; padding: 12px; text-align: center; font-size: 15px; }
.change-box.ok { background: var(--ok-soft); color: var(--ok); }
.change-box.bad { background: var(--danger-soft); color: var(--danger); }
.change-box b { font-size: 26px; display: block; }
.qr-box { text-align: center; }
.qr-box img { width: 240px; max-width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.denoms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.denoms label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.denoms label span { width: 70px; text-align: right; font-weight: 600; }
.denoms input { width: 70px; text-align: center; }

/* ---------- in hóa đơn khổ 80mm ---------- */
#print-root { display: none; }
@media print {
  @page { size: 80mm auto; margin: 3mm; }
  body * { visibility: hidden; }
  body.pos-page { overflow: visible; }
  #print-root, #print-root * { visibility: visible; }
  #print-root { display: block; position: absolute; left: 0; top: 0; width: 74mm; font-size: 12px; color: #000; font-family: Arial, sans-serif; }
  #print-root h2 { font-size: 15px; text-align: center; margin: 0 0 2px; }
  #print-root .c { text-align: center; }
  #print-root .r { text-align: right; }
  #print-root table { width: 100%; border-collapse: collapse; }
  #print-root td { padding: 2px 0; vertical-align: top; }
  #print-root hr { border: 0; border-top: 1px dashed #000; margin: 4px 0; }
}

/* ---------- màn hình nhỏ ---------- */
@media (max-width: 1200px) {
  .pos-body { grid-template-columns: minmax(0, 1fr) 370px; }
  .pos-logo { display: none; }
}
@media (max-width: 920px) {
  body.pos-page { overflow: auto; }
  .pos-app { height: auto; min-height: 100vh; }
  .pos-body { grid-template-columns: 1fr; }
  .pos-grid-wrap { height: 380px; flex: none; }
  .pos-right { min-height: 520px; }
  .pos-head-right .hide-sm { display: none; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .pay-screen { grid-template-columns: 1fr; }
  .pet-row { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 20% 0 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .content { padding: 10px; }
  .form-grid, .form-grid.two, .pet-row { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: auto; }
  .topbar h1 { font-size: 16px; }
}

table.t tr.warn-row td { background: var(--warn-soft); }

.auth .btn.small-link { background: none; border: none; color: #c14a06; font-size: 12px; padding: 4px; text-decoration: underline; }

/* ---------- Lịch off nhân viên (/lich-off/) — ưu tiên điện thoại ---------- */
.off-page { background: var(--bg); }
.off-app { max-width: 980px; margin: 0 auto; padding: 0 10px calc(24px + env(safe-area-inset-bottom)); }
.off-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin: 0 -10px;
  background: var(--brand); color: var(--ink); box-shadow: var(--shadow); }
.off-title { font-weight: 700; font-size: 16px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.off-who { border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.15); color: #fff; border-radius: 18px; padding: 6px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.off-who.shop { cursor: default; }
.off-nav { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; }
.off-nav h2 { margin: 0; font-size: 20px; flex: 1; text-align: center; }
.off-nav .btn { min-width: 44px; min-height: 44px; font-size: 20px; }
.off-nav .btn.sm { font-size: 13px; min-width: 0; }
.off-hint { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.off-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.off-dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 0; background: var(--brand-softer); border-bottom: 1px solid var(--line-2); }
.off-dow.sun { color: var(--danger); }
.off-cell { min-height: 76px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; padding: 4px 3px 6px;
  display: flex; flex-direction: column; align-items: stretch; gap: 3px; text-align: left; cursor: pointer; font: inherit; color: inherit; min-width: 0; }
.off-cell:nth-child(7n) { border-right: 0; }
.off-cell:hover { background: var(--brand-softer); }
.off-cell.out { background: #faf6f3; cursor: default; }
.off-cell.past { background: #fbf9f7; }
.off-cell.past .dn { color: #b7a79d; }
.off-cell .dn { text-align: center; font-size: 13px; font-weight: 600; line-height: 22px; }
.off-cell.today .dn { background: var(--brand); color: #fff; border-radius: 11px; width: 26px; margin: 0 auto; }
.off-cell.busy { box-shadow: inset 0 -3px 0 var(--danger); }
.off-chip { display: block; font-size: 11px; line-height: 1.25; padding: 2px 4px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-style: normal;
  border: 1px dashed var(--c); color: var(--c); background: #fff; }
.off-chip.approved { background: var(--c); color: #fff; border-style: solid; font-weight: 600; }
.off-chip.rejected { border-style: solid; border-color: #ccc; color: #999; text-decoration: line-through; }
.off-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: 12px; color: var(--muted); margin: 10px 0 16px; }
.off-legend span { display: inline-flex; align-items: center; gap: 5px; }
.off-legend .off-chip { display: inline-block; }
.lg-busy { display: inline-block; width: 18px; height: 3px; background: var(--danger); }
.off-sum { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.off-sum h3 { margin: 0 0 8px; font-size: 15px; }
.off-sum-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 7px 0; border-top: 1px solid var(--line); }
.off-sum-row .dot { width: 12px; height: 12px; border-radius: 6px; }
.off-pick { display: grid; gap: 10px; }
.off-pick .btn { justify-content: flex-start; }
.off-entry { border: 1px solid var(--line-2); border-left: 5px solid var(--c); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.off-form { margin-top: 6px; }
.off-parts { margin: 6px 0 12px; }
.off-parts .chip { padding: 10px 16px; font-size: 15px; }
@media (max-width: 520px) {
  .off-cell { min-height: 64px; padding: 3px 1px 4px; }
  .off-chip { font-size: 10px; padding: 1px 2px; }
  .off-page .modal-back { place-items: end center; padding: 0; }
  .off-page .modal { border-radius: 16px 16px 0 0; max-height: 88vh; }
  .off-page .modal footer .btn { flex: 1; min-height: 46px; }
}

/* Logo Summit Pet */
.brand .logo-img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; box-shadow: 0 2px 6px rgba(190,80,0,.35); flex: none; }
.auth-logo img { width: 120px; height: 120px; border-radius: 22px; box-shadow: 0 4px 14px rgba(190,80,0,.3); }
.pos-logo { display: flex; align-items: center; gap: 8px; }
.pos-logo .brand-img { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; }
