/* SugarPie KTV — mobile-first, midnight theme */
:root {
  --bg: #0a0f1e;
  --card: #121a2e;
  --soft: #1a2340;
  --line: rgba(255, 255, 255, .09);
  --line2: rgba(255, 255, 255, .17);
  --text: #eef2ff;
  --muted: #aab4cf;
  --dim: #74809e;
  --primary: #6d7cff;
  --primary-soft: rgba(99, 102, 241, .16);
  --on-primary: #ffffff;
  --grad: linear-gradient(95deg, #6366f1 0%, #3b82f6 55%, #06b6d4 100%);
  --green: #34d399; --green-solid: #10b981; --green-soft: rgba(16, 185, 129, .16);
  --amber: #fbbf24; --amber-solid: #f59e0b; --amber-soft: rgba(245, 158, 11, .16);
  --red: #fb7185; --red-solid: #e11d48; --red-soft: rgba(244, 63, 94, .15);
  --blue: #60a5fa; --blue-soft: rgba(96, 165, 250, .15);
  --violet: #c4b5fd; --violet-soft: rgba(167, 139, 250, .18);
  --gray: #94a3b8; --gray-soft: rgba(255, 255, 255, .07);
  --pink: var(--primary); --cyan: var(--blue);
  --radius: 16px;
  --shadow: 0 8px 28px rgba(0, 0, 0, .28);
  --tabbar-h: 62px;
  --top-h: 56px;
  color-scheme: dark;
}
body { background: radial-gradient(900px 520px at 110% -10%, rgba(37, 99, 235, .32), transparent 60%), radial-gradient(800px 600px at -30% 40%, rgba(6, 182, 212, .22), transparent 60%), var(--bg); background-attachment: fixed; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; overflow-x: clip; }
body {
  color: var(--text);
  font: 15px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 650; }
h2 { font-size: 17px; }
h3 { font-size: 15.5px; }
h4 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin: 22px 0 8px; font-weight: 600; }
p { margin: 0 0 8px; }
a { color: var(--primary); }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .92em; white-space: nowrap; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* ---------- shell ---------- */
#app { min-height: 100vh; }
.sidebar { display: none; }
.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: calc(var(--top-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0 16px; display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.topbar .title { font-size: 17px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clock-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-variant-numeric: tabular-nums; }
.clock-chip b { font-weight: 600; font-size: 13.5px; }
.avatar-btn { background: none; border: 0; padding: 0; cursor: pointer; }
.lang-switch { display: inline-flex; height: 32px; padding: 2px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); flex: none; }
.lang-switch button { border: 0; background: none; color: var(--muted, inherit); font: inherit; font-size: 12.5px; font-weight: 600; padding: 0 9px; border-radius: 99px; cursor: pointer; }
.lang-switch button.on { background: var(--primary); color: var(--on-primary); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; background: var(--primary-soft); color: var(--primary); flex: none; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }

.page { padding: 14px 16px calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); max-width: 1440px; margin: 0 auto; }
.page-head { display: none; }

/* bottom tab bar (mobile) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--card); border-top: 1px solid var(--line);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative;
  color: var(--dim); text-decoration: none; font-size: 11px; font-weight: 600; background: none; border: 0; cursor: pointer; min-width: 0;
}
.tab-item svg { width: 23px; height: 23px; }
.tab-item span:not(.nav-badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.tab-item.on { color: var(--primary); }
.tab-item .nav-badge { position: absolute; top: 6px; left: calc(50% + 6px); }
.nav-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--primary); color: var(--on-primary); font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; }

/* "More" sheet */
.me-row { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--soft); cursor: pointer; font-size: 12px; font-weight: 600; text-align: center; }
.tile svg { width: 22px; height: 22px; color: var(--muted); }
.tile.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.tile.on svg { color: var(--primary); }
.tile .nav-badge { position: absolute; top: 6px; right: 6px; }
.sheet-sec { margin-top: 18px; }
.sheet-sec .lbl { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.clock-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.big-clock { font-size: 26px; font-variant-numeric: tabular-nums; }
.seg-btns { display: inline-flex; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; }
.seg-btns button { border: 0; background: var(--card); padding: 9px 11px; font-weight: 600; font-size: 13px; cursor: pointer; }
.seg-btns button + button { border-left: 1px solid var(--line2); }
.seg-btns button:active { background: var(--soft); }

/* ---------- primitives ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; cursor: pointer;
  min-height: 42px; padding: 0 16px; border-radius: 11px; font-weight: 600; font-size: 14px;
  background: var(--card); color: var(--text); border: 1px solid var(--line2); transition: background .12s, transform .05s;
}
.btn:active { transform: scale(.98); }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: var(--card); }
.btn.danger:hover { background: var(--red-soft); }
.btn.ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--soft); color: var(--text); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.xs { min-height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.locked { opacity: .5; border-style: dashed; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; width: 38px; height: 38px; border-radius: 10px; }
.icon-btn:hover { background: var(--soft); color: var(--text); }

.input, select.input, textarea.input {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--card);
  border: 1px solid var(--line2); border-radius: 11px; padding: 0 12px; min-height: 44px; outline: none; appearance: none;
}
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
textarea.input { padding: 10px 12px; min-height: 72px; resize: vertical; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input.sm { width: auto; min-height: 38px; font-size: 14px; border-radius: 10px; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 18px; height: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.field .hint { font-size: 12px; color: var(--dim); }
.grid2, .grid3, .grid4 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 12px; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; min-height: 36px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 18px; }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; background: var(--gray-soft); color: var(--gray); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.pink { background: var(--primary-soft); color: var(--primary); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.tag.fly { background: var(--blue-soft); color: var(--blue); }
.tag.lock { background: var(--violet-soft); color: var(--violet); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--dim); }
.dot.available { background: var(--green); }
.dot.fly { background: var(--blue); }
.dot.lock { background: var(--violet); }
.cd { font-variant-numeric: tabular-nums; color: var(--green); font-weight: 600; white-space: nowrap; }
.cd.warn { color: var(--amber); }
.cd.done { color: var(--dim); font-weight: 500; }
.el { font-variant-numeric: tabular-nums; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-width: 0; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-head > :last-child:not(:first-child) { margin-left: auto; }
.cards, .mommy-rooms { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.cards .card + .card, .mommy-rooms .card + .card { margin-top: 0; }
.empty { color: var(--dim); text-align: center; padding: 22px 12px; border: 1px dashed var(--line2); border-radius: 12px; font-size: 14px; }
.note { background: var(--soft); border-radius: 10px; padding: 10px 12px; color: var(--muted); font-size: 13px; margin: 10px 0; }
.note.warn { background: var(--amber-soft); color: var(--amber); }
.note.ok { background: var(--green-soft); color: var(--green); }
.preview { background: var(--primary-soft); color: var(--text); border-radius: 10px; padding: 10px 12px; margin: 6px 0 4px; font-size: 14px; }

/* stats: swipeable strip on phones */
.kpis { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 4px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; }
.kpis::-webkit-scrollbar { display: none; }
.kpi { flex: 0 0 auto; min-width: 128px; scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }
.kpi-l { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi-l::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.kpi.green .kpi-l::before { background: var(--green); }
.kpi.pink .kpi-l::before { background: var(--primary); }
.kpi.violet .kpi-l::before { background: var(--violet); }
.kpi.amber .kpi-l::before { background: var(--amber); }
.kpi.cyan .kpi-l::before { background: var(--blue); }
.kpi-v { font-size: 21px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-s { font-size: 11.5px; color: var(--dim); white-space: nowrap; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar > .input.sm, .toolbar > select.input.sm { flex: 1 1 140px; }
.toolbar .lbl { font-size: 12.5px; color: var(--muted); }
.tabs { display: flex; gap: 6px; margin: 0 -16px 14px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 13.5px; padding: 0 14px; height: 36px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.tab.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.fchips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; }
.fchips::-webkit-scrollbar { display: none; }
.fchip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.fchip span { font-size: 12px; color: var(--dim); }
.fchip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.fchip.on span { color: var(--bg); opacity: .7; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.actions .btn { flex: 1 1 auto; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- tables: real tables on desktop, stacked cards on phones ---------- */
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tr.total td { font-weight: 700; background: var(--soft); }
tr.clickable { cursor: pointer; }
tr.group td { background: var(--soft); font-weight: 700; color: var(--primary); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
td.c { text-align: center; }

@media (max-width: 759px) {
  .table-wrap { background: none; border: 0; box-shadow: none; overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tr { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
  .table-wrap td { display: block; padding: 5px 0; border: 0; text-align: right; min-height: 28px; overflow-wrap: anywhere; }
  .table-wrap td::before { content: attr(data-label); float: left; color: var(--muted); font-size: 12.5px; text-align: left; margin-right: 12px; max-width: 45%; line-height: 1.6; }
  .table-wrap td[data-label=""]::before { display: none; }
  .table-wrap td:first-child { font-size: 15px; font-weight: 600; text-align: left; }
  .table-wrap td:first-child::before { display: none; }
  .table-wrap td[data-label=""]:last-child { padding-top: 8px; }
  .table-wrap td:empty, .table-wrap td.opt { display: none; }
  .table-wrap td > div:not(.row-actions):not(.chips):not(.role-chips) { display: inline; margin-left: 6px; }
  .table-wrap td .chips, .table-wrap td .role-chips { justify-content: flex-end; }
  .table-wrap td::after { content: ""; display: table; clear: both; }
  .table-wrap tr.total { background: var(--soft); }
  .table-wrap tr.group { background: none; border: 0; box-shadow: none; padding: 10px 2px 2px; margin: 0; }
  .table-wrap .row-actions { justify-content: flex-end; }
  .matrix td:first-child { position: static; }
}

.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.info { background: var(--soft); border-radius: 10px; padding: 8px 11px; min-width: 0; }
.info .k { font-size: 11.5px; color: var(--muted); }
.info .v { margin-top: 1px; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.room-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.room-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer;
  display: flex; flex-direction: column; gap: 8px; min-width: 0; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.room-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line2); }
.room-card.st-available::before { background: var(--green); }
.room-card.st-reserved::before { background: var(--amber); }
.room-card.st-occupied::before { background: var(--primary); }
.room-card.st-maintenance { opacity: .65; }
.room-card:active { transform: scale(.995); }
.rc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rc-name { font-weight: 700; font-size: 16px; min-width: 0; }
.rc-name .muted { font-weight: 500; margin-left: 4px; }
.rc-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rc-cust { font-weight: 600; min-width: 0; }
.rc-amt { font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-free { color: var(--muted); font-size: 14px; }
.rc-next { font-size: 12.5px; color: var(--amber); }
.rc-meta { display: flex; gap: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; padding: 4px 9px; border-radius: 8px; background: var(--soft); }
.chip .k { font-weight: 700; font-size: 11.5px; }
.chip.fly .k { color: var(--blue); }
.chip.lock .k { color: var(--violet); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; }
.list li:last-child { border-bottom: 0; }
.list li > div { grid-column: 1; }
.list li > .btn { grid-row: 1 / span 2; grid-column: 2; }
.roster { list-style: none; padding: 0; margin: 0; }
.roster li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.roster li:last-child { border-bottom: 0; }
.ros-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ros-st { text-align: right; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }

/* ---------- mommy ---------- */
.asg-line { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.asg-line:last-child { border-bottom: 0; }
.asg-line .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.asg-line .row-actions { justify-content: flex-start; }
.asg-line.mine { box-shadow: inset 3px 0 0 var(--primary); padding-left: 10px; }
.countdowns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cd-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); min-width: 0; }
.cd-card .cd { font-size: 19px; display: block; margin: 3px 0; }
.cd-card.lock { border-top: 3px solid var(--violet); }
.cd-card.fly { border-top: 3px solid var(--blue); }

/* PR picker */
.pr-pick { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; max-height: 46vh; overflow-y: auto; }
.pp { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 12px; cursor: pointer; background: var(--card); font-size: 13px; }
.pp:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.pp.dis { opacity: .45; cursor: not-allowed; }
.pp input { grid-row: 1 / span 3; }
.pp-name { font-weight: 650; font-size: 14.5px; }
.pp-st, .pp-why { font-size: 12px; color: var(--muted); }
.pp-why { color: var(--amber); }
.pp-st > div { display: inline; margin-right: 6px; }
/* QR ticket scan (Add PR to room) */
.scan-row { display: flex; gap: 8px; }
.scan-row .input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; letter-spacing: .04em; }
.scan-row .btn { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.scan-row .btn svg { width: 18px; height: 18px; }
.scan-row .btn.on { border-color: var(--primary); background: var(--primary-soft); }
.scan-video { display: block; width: 100%; max-height: 260px; margin-top: 8px; border-radius: 12px; background: #000; object-fit: cover; }
.scan-msg { font-size: 12.5px; margin-top: 6px; min-height: 1em; }
.scan-msg:empty { display: none; }
.scan-msg.ok { color: var(--green); }
.scan-msg.bad { color: var(--red); }
.seg { display: flex; gap: 8px; }
.seg label { flex: 1; cursor: pointer; min-width: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; font-weight: 700; background: var(--card); }
.seg small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.seg input:checked + span { border-color: var(--primary); background: var(--primary-soft); }

/* menu picker */
.menu-pick { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.mp { display: grid; grid-template-columns: minmax(0, 1fr) 76px; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.mp .input { text-align: center; padding: 0 6px; }
.mp small { display: block; color: var(--muted); }
.cat-title { font-size: 12px; color: var(--primary); text-transform: uppercase; letter-spacing: .07em; margin-top: 10px; font-weight: 700; }
.tip-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; gap: 8px; margin-bottom: 8px; align-items: center; }

/* ---------- modal = bottom sheet on phones ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(5, 8, 18, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; overscroll-behavior: contain; }
html:has(#modals > .modal-backdrop) { overscroll-behavior-y: none; }
.modal {
  background: var(--card); width: 100%; max-height: 92vh; display: flex; flex-direction: column;
  border-radius: 20px 20px 0 0; animation: up .22s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom);
}
.grabber { width: 38px; height: 5px; border-radius: 99px; background: var(--line2); margin: 8px auto 0; flex: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 6px 18px; flex: none; }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 4px 18px 16px; overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.modal-foot { display: flex; gap: 8px; padding: 10px 18px 12px; border-top: 1px solid var(--line); flex: none; }
.modal-foot .spacer { display: none; }
.modal-foot .btn { flex: 1; }
.is-sheet .modal-foot { display: none; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.detail-head h2 { font-size: 21px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }

#toasts { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; z-index: 200; pointer-events: none; align-items: center; }
.toast { background: #1e2a4f; color: var(--text); border: 1px solid var(--line2); padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; max-width: 440px; box-shadow: 0 10px 32px rgba(0, 0, 0, .55); transition: opacity .3s, transform .3s; animation: up .2s; }
.toast-ok { border-left: 4px solid var(--green-solid); }
.toast-info { border-left: 4px solid var(--primary); }
.toast-error { background: var(--red-solid); color: #fff; border-color: transparent; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- ticket ---------- */
.ticket { background: #fff; color: #0f172a; border-radius: 18px; padding: 20px 18px 14px; text-align: center; max-width: 340px; margin: 0 auto; border: 1px solid #e2e8f0; position: relative; }
.t-brand { font-weight: 800; font-size: 18px; color: #4f46e5; }
.t-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: #64748b; margin-bottom: 10px; }
.t-qr { display: flex; justify-content: center; padding: 6px; }
.t-qr img, .t-qr canvas { display: block; }
.ticket.expired .t-qr { opacity: .18; filter: grayscale(1); }
.t-stamp { position: absolute; left: 50%; top: 128px; transform: translateX(-50%) rotate(-12deg); border: 3px solid #e11d48; color: #e11d48; font-weight: 800; font-size: 22px; letter-spacing: .14em; padding: 4px 14px; border-radius: 8px; background: rgba(255,255,255,.85); }
.t-no { font-family: ui-monospace, Consolas, monospace; font-weight: 700; margin-top: 8px; letter-spacing: .05em; border-top: 2px dashed #e2e8f0; padding-top: 12px; }
.t-name { font-size: 22px; font-weight: 800; margin: 2px 0 8px; }
.t-name span { font-size: 12px; color: #64748b; font-weight: 600; }
.ticket dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; text-align: left; font-size: 13px; margin: 8px 0; }
.ticket dt { color: #64748b; }
.ticket dd { margin: 0; font-weight: 600; text-align: right; }
.t-foot { font-size: 11px; color: #64748b; background: #f1f5f9; border-radius: 8px; padding: 6px 8px; margin-top: 8px; }
.qr-fallback svg { display: block; }
.ticket-mini { display: flex; gap: 10px; align-items: center; }
.mytickets { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }

/* ---------- bill ---------- */
.bill-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.bill-brand { font-size: 17px; font-weight: 800; color: var(--primary); }
.bill-table { width: 100%; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.bill-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.bill-table tr:last-child td { border-bottom: 0; }
.bill-table td.num { vertical-align: top; }
.bill-table tr.sec td { background: var(--soft); color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.bill-table tr.sub td { background: var(--soft); }
.bill-table tr.grand td { background: var(--primary-soft); font-size: 16px; }
.bill-table tr.due td { color: var(--amber); }
.bill-table tr.pending td { color: var(--dim); }

/* ---------- pricing ---------- */
.timeline { position: relative; height: 46px; background: var(--soft); border-radius: 10px; margin: 8px 0 26px; }
.tl-seg { position: absolute; top: 5px; bottom: 5px; border-radius: 7px; padding: 3px 6px; font-size: 10.5px; overflow: hidden; white-space: nowrap; color: #fff; font-weight: 600; }
.tl-seg small { display: block; font-weight: 400; opacity: .9; }
.tl-tick { position: absolute; bottom: -19px; font-size: 10px; color: var(--dim); transform: translateX(-50%); }
.tl-tick:nth-child(even) { display: none; }

/* ---------- permission matrix ---------- */
.matrix th, .matrix td { text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix tr.group td { text-align: left; }
.matrix input { cursor: pointer; }
.act-tag { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); border: 1px solid var(--line2); border-radius: 5px; padding: 0 5px; margin-left: 6px; font-weight: 600; }
.role-chips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.bar { height: 6px; background: var(--soft); border-radius: 99px; overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }

/* ---------- grouped lists (the main building block) ---------- */
.group { margin-bottom: 22px; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px 8px; min-height: 28px; }
.group-head h3 { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.group-head .count { font-weight: 500; color: var(--dim); margin-left: 4px; text-transform: none; letter-spacing: 0; }
.group-foot { font-size: 12.5px; color: var(--dim); padding: 8px 4px 0; }
.glist { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 58px; position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; border-top: 1px solid var(--line); }
.row[data-act] { cursor: pointer; }
.row[data-act]:active, .row[data-act]:hover { background: var(--soft); }
.row-lead { flex: none; display: flex; align-items: center; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; }
.row-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.row-end { flex: none; text-align: right; font-size: 14px; line-height: 1.4; white-space: nowrap; max-width: 55%; }
.row-end .prs { color: var(--muted); font-size: 12.5px; white-space: normal; }
.row-prs { display: flex; flex-wrap: wrap; gap: 3px 14px; margin-top: 6px; font-size: 12.5px; color: var(--text); }
.chev { width: 7px; height: 7px; flex: none; border-right: 2px solid var(--line2); border-top: 2px solid var(--line2); transform: rotate(45deg); margin: 0 2px 0 -4px; }
.kv { min-height: 46px; padding: 11px 14px; }
.kv .row-main { color: var(--muted); font-size: 14px; }
.kv .row-end { font-weight: 600; white-space: normal; }
.empty-row { justify-content: center; color: var(--dim); font-size: 14px; min-height: 52px; }
.dim-row .row-title, .dim-row .row-end { color: var(--dim); }
.t-fly, .t-lock { font-weight: 700; font-size: .82em; letter-spacing: .02em; }
.t-fly { color: var(--blue); }
.t-lock { color: var(--violet); }
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--gray); white-space: nowrap; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st.green { color: var(--green); } .st.pink { color: var(--primary); } .st.amber { color: var(--amber); }
.st.red { color: var(--red); } .st.blue { color: var(--blue); } .st.violet { color: var(--violet); }
.amber-t { color: var(--amber); }
.avatar.sm { width: 36px; height: 36px; font-size: 12px; }
.btn.link { background: none; border: 0; color: var(--primary); min-height: 28px; padding: 0 2px; font-size: 14px; font-weight: 600; }
.btn.link:hover { background: none; text-decoration: underline; }

/* sheet content */
.sheet-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 2px 0 16px; }
.sheet-title h2 { font-size: 23px; font-weight: 700; }
.total-card { background: var(--soft); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.total-card > span { display: block; font-size: 13px; color: var(--muted); }
.total-card > b { display: block; font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.total-card .split { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.btn-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; padding: 0 8px; }
.modal .glist { border-color: var(--line); }

/* calmer status labels & tags everywhere */
.pill { background: none !important; padding: 0; gap: 5px; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag { background: none !important; padding: 0; }

/* stats: one joined card */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0 0 22px; padding: 0; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 14px; scroll-snap-type: none; }
.kpi { border: 0; border-radius: 0; box-shadow: none; padding: 12px 14px; min-width: 0; }
.kpi:nth-child(2n) { border-left: 1px solid var(--line); }
.kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
.kpi-l { font-weight: 500; }
.kpi-l::before { display: none; }
.kpi-v { font-size: 22px; }

/* segmented tabs */
.tabs { gap: 2px; background: var(--gray-soft); padding: 3px; border-radius: 11px; margin: 0 0 18px; }
.tab { flex: 1 0 auto; background: none; border: 0; height: 34px; border-radius: 9px; font-size: 13.5px; padding: 0 12px; color: var(--muted); }
.tab.on { background: var(--card); color: var(--text); border: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.fchip { height: 34px; }

@media (max-width: 759px) {
  .toolbar .muted.small { display: none; }
  .table-wrap tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 12px 14px; box-shadow: none; }
  .table-wrap td { text-align: left; padding: 0; min-height: 0; }
  .table-wrap td::before { float: none; display: block; font-size: 11.5px; line-height: 1.3; margin: 0 0 2px; max-width: none; }
  .table-wrap td:first-child, .table-wrap td[data-label=""] { grid-column: 1 / -1; }
  .table-wrap td.num { text-align: left; }
  .table-wrap .row-actions, .table-wrap td .chips, .table-wrap td .role-chips { justify-content: flex-start; }
  .table-wrap tr.group { display: block; }
  .table-wrap td > div:not(.row-actions):not(.chips):not(.role-chips) { display: block; margin-left: 0; }
}

/* ---------- tablet ---------- */
@media (min-width: 600px) {
  .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .room-grid, .pr-pick, .menu-pick, .cards, .mommy-rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .countdowns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .info-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tl-tick:nth-child(even) { display: block; }
  .actions .btn { flex: 0 0 auto; }
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { width: 560px; max-width: 100%; border-radius: 18px; max-height: 88vh; }
  .modal.sm { width: 440px; }
  .modal.lg { width: 820px; }
  .modal.xl { width: 1060px; }
  .grabber { display: none; }
  .modal-head { padding: 14px 12px 6px 20px; }
  .modal-body { padding: 6px 20px 18px; }
  .modal-foot { padding: 12px 20px; }
  .modal-foot .spacer { display: block; }
  .modal-foot .btn { flex: 0 0 auto; }
  .mytickets { grid-template-columns: 360px minmax(0, 1fr); align-items: start; }
}

/* ---------- desktop: sidebar replaces the tab bar ---------- */
@media (min-width: 1024px) {
  #app { display: flex; }
  .sidebar {
    display: flex; flex-direction: column; width: 232px; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--card); border-right: 1px solid var(--line);
  }
  .brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px 10px; }
  .brand .logo { width: 34px; height: 34px; font-size: 13px; }
  .brand-name { font-weight: 700; }
  .brand-sub { font-size: 11.5px; color: var(--muted); }
  #nav { padding: 4px 10px; flex: 1; }
  .nav-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); padding: 14px 10px 6px; font-weight: 600; }
  .nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
  .nav-item:hover { background: var(--soft); color: var(--text); }
  .nav-item.on { background: var(--primary-soft); color: var(--primary); }
  .nav-item svg { width: 18px; height: 18px; flex: none; }
  .nav-item .nav-badge { margin-left: auto; }
  .side-foot { padding: 14px 16px; }
  .main { flex: 1; }
  .tabbar { display: none !important; }
  .topbar { padding: 0 24px; height: var(--top-h); }
  .topbar .logo { display: none; }
  .page { padding: 20px 24px 48px; max-width: 1120px; }
  .page-head { display: block; margin-bottom: 16px; }
  .page-head h1 { display: none; }
  .page-head p { color: var(--muted); margin: 2px 0 0; }
  #toasts { left: auto; right: 20px; bottom: 20px; align-items: flex-end; }
  .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 0 0 16px; padding: 0; overflow: visible; }
  .tabs, .fchips { margin-left: 0; margin-right: 0; padding: 0; }
  .dash { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
  .room-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .mommy-rooms, .cards { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  .asg-line { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .asg-line .row-actions { justify-content: flex-end; }
  .countdowns { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .pr-pick { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .menu-pick { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .matrix th:first-child, .matrix td:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 240px; }
}

/* ================= HotPie-style components ================= */
.topbar { background: rgba(10, 15, 30, .82); }
.tabbar { background: rgba(14, 20, 38, .96); backdrop-filter: blur(12px); }
.glist, .kpis, .card, .table-wrap, .info, .room-card, .kpi { background: linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .035)); }
.kpis .kpi { background: none; }
.modal { background: linear-gradient(180deg, #18213a, #0f1628); border: 1px solid var(--line); }
.input, select.input, textarea.input { background: rgba(255, 255, 255, .06); border-color: var(--line2); }
select.input option { background: #121a2e; }
.avatar { background: rgba(99, 102, 241, .2); color: #a5b4fc; }
.logo { background: #fff; object-fit: contain; }

.btn { background: rgba(255, 255, 255, .07); border-color: var(--line2); color: var(--text); }
.btn:hover { background: rgba(255, 255, 255, .12); }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 4px 16px rgba(59, 130, 246, .28); }
.btn.green { background: var(--green-solid); border: 0; color: #fff; }
.btn.amber { background: linear-gradient(95deg, #f59e0b, #fb923c); border: 0; color: #fff; }
.btn.danger { background: rgba(244, 63, 94, .1); border-color: rgba(244, 63, 94, .5); color: #fda4af; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.link { color: #a5b4fc; }
.fchip { background: rgba(255, 255, 255, .06); border-color: var(--line); color: var(--muted); }
.fchip.on { background: var(--grad); color: #fff; border-color: transparent; }
.fchip.on span { color: #fff; }
.tabs { background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 14px; }
.tab.on { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }
.tab-item.on { color: #818cf8; }
.nav-item.on { background: rgba(99, 102, 241, .16); color: #a5b4fc; }
.tile.on { background: rgba(99, 102, 241, .16); color: #a5b4fc; border-color: rgba(99, 102, 241, .5); }

.badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 3px 10px; border-radius: 99px; color: #fff; white-space: nowrap; background: #475569; }
.badge.green { background: var(--green-solid); }
.badge.amber { background: var(--amber-solid); }
.badge.red { background: var(--red-solid); }
.badge.violet { background: #7c3aed; }
.badge.gray { background: rgba(255, 255, 255, .16); color: var(--muted); }
.tl { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-weight: 700; font-variant-numeric: tabular-nums; }
.tl.over { color: #fda4af; }
.tl.small { font-size: 12px; color: var(--green); }
.ok { color: var(--green); }
.bad { color: var(--red); }
.none { color: #fda4af; }
.hint-line { font-size: 12px; color: var(--dim); margin: 6px 2px 12px; }

/* room / booking cards */
.rcards { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.rcard { border-radius: 18px; padding: 14px; border: 1px solid rgba(99, 102, 241, .22);
  background: linear-gradient(160deg, rgba(37, 99, 235, .26), rgba(30, 58, 138, .18) 60%, rgba(255, 255, 255, .03)); box-shadow: var(--shadow); }
.rcard.booking { border-color: rgba(245, 158, 11, .28); background: linear-gradient(160deg, rgba(180, 83, 9, .22), rgba(30, 58, 138, .16) 60%, rgba(255, 255, 255, .03)); }
.rcard.ended { border-color: var(--line); background: rgba(255, 255, 255, .04); }
.rcard-top { display: flex; gap: 12px; justify-content: space-between; }
.rcard-info { min-width: 0; flex: 1; }
.rcard-title { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.rcard-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-btn { background: none; border: 0; padding: 2px; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.hist-btn svg { width: 16px; height: 16px; }
.rcard-lines { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-top: 4px; }
.rcard-lines b { color: var(--text); font-weight: 600; }
.rcard-money { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; min-width: 128px; }
.rcard-money dl { display: grid; grid-template-columns: auto auto; gap: 1px 12px; margin: 4px 0 0; font-size: 12px; }
.rcard-money dt { color: var(--muted); text-align: left; }
.rcard-money dd { margin: 0; font-variant-numeric: tabular-nums; }
.rcard-total { border-top: 1px solid var(--line2); padding-top: 4px; display: flex; gap: 12px; align-items: baseline; font-size: 12px; color: var(--muted); }
.rcard-total b { font-size: 15px; color: var(--text); }
.rcard-left { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.rcard-left .tl { font-size: 17px; color: var(--text); }
.rcard-left.over .tl { color: #fda4af; }
.rcard-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rcard-acts .btn { flex: 1 1 calc(50% - 4px); }
.hosts { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.hosts-h { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.host { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: rgba(255, 255, 255, .055); border: 1px solid var(--line); cursor: pointer; }
.host + .host { margin-top: 6px; }
.host.off { opacity: .55; }
.host-main { flex: 1; min-width: 0; font-size: 14px; }
.host-sub { font-size: 12px; color: var(--muted); }

/* search + floating action button */
.searchbar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); z-index: 35; display: flex; gap: 10px; align-items: center; }
.search-in { flex: 1; display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 16px; border-radius: 99px; background: rgba(18, 26, 46, .94); border: 1px solid var(--line2); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.search-in svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search-in .input { border: 0; background: none; min-height: 40px; padding: 0; box-shadow: none; width: 100%; }
.fab { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; font-size: 30px; font-weight: 300; line-height: 1; cursor: pointer; box-shadow: 0 8px 24px rgba(59, 130, 246, .45); flex: none; }
.page:has(.searchbar) { padding-bottom: calc(var(--tabbar-h) + 96px + env(safe-area-inset-bottom)); }
.fab-grid { display: grid; gap: 10px; padding-bottom: 8px; }
.fab-opt { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; text-align: left; padding: 16px; border-radius: 16px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .06); cursor: pointer; }
.fab-opt svg { grid-row: 1 / span 2; width: 26px; height: 26px; color: #a5b4fc; }
.fab-opt b { font-size: 16px; }
.fab-opt span { font-size: 13px; color: var(--muted); }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.tile-stat { border-radius: 14px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--dim); background: rgba(255, 255, 255, .05); }
.tile-stat b { display: block; font-size: 24px; line-height: 1.1; }
.tile-stat span { font-size: 12px; color: var(--muted); }
.tile-stat.green { border-left-color: var(--green-solid); }
.tile-stat.red { border-left-color: var(--red-solid); }
.tile-stat.amber { border-left-color: var(--amber-solid); }

/* timetable */
.tt { display: flex; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .035); margin-bottom: 10px; }
.tt-names { flex: none; width: 84px; border-right: 1px solid var(--line); background: rgba(10, 15, 30, .6); }
.tt-corner, .tt-head { height: 28px; }
.tt-name { height: 40px; display: flex; align-items: center; padding: 0 10px; font-size: 12px; font-weight: 600; border-top: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.tt-scroll { overflow-x: auto; flex: 1; }
.tt-grid { position: relative; background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px var(--px)); }
.tt-head { position: relative; }
.tt-head span { position: absolute; top: 7px; font-size: 10.5px; color: var(--dim); padding-left: 4px; }
.tt-body { position: relative; }
.tt-row { position: relative; height: 40px; border-top: 1px solid var(--line); cursor: copy; }
.tt-row.maint { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 6px, transparent 6px 12px); }
.tt-bar { position: absolute; top: 7px; height: 26px; border-radius: 7px; padding: 0 6px; font-size: 11px; font-weight: 600; line-height: 26px; color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.tt-bar.inuse { background: linear-gradient(90deg, #4f46e5, #3b82f6); }
.tt-bar.booked { background: var(--amber-solid); }
.tt-bar.ended { background: rgba(255, 255, 255, .16); color: var(--muted); }
.tt-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #818cf8; box-shadow: 0 0 8px #818cf8; pointer-events: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 6px 2px 20px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lgd { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lgd.inuse { background: #4f46e5; } .lgd.booked { background: var(--amber-solid); } .lgd.ended { background: rgba(255, 255, 255, .25); }
.when { display: flex; flex-direction: column; min-width: 58px; font-size: 12px; }
.when b { color: var(--amber); font-size: 12px; }
.when span { font-weight: 700; font-size: 14px; }
.hist-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* room picker */
.room-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.room-chip { min-width: 96px; text-align: left; padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(52, 211, 153, .6); background: rgba(16, 185, 129, .22); color: inherit; font: inherit; cursor: pointer; }
.room-chip b { display: block; font-size: 14px; }
.room-chip span { font-size: 11.5px; color: var(--muted); }
.room-chip.on { background: var(--green-solid); border-color: var(--green-solid); }
.room-chip.on span { color: #ecfdf5; }
.room-chip.busy { border-color: rgba(244, 63, 94, .45); background: rgba(244, 63, 94, .1); }
.room-chip.busy b { text-decoration: line-through; color: var(--muted); }
/* booking form */
.bk-sec { margin-bottom: 18px; }
.bk-h { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.bk-sub { font-size: 13px; color: var(--muted); font-weight: 600; margin: 4px 0 8px; }
.pick-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px 12px; padding: 0 18px 2px; scroll-padding: 0 18px; }
.pick-row::-webkit-scrollbar { display: none; }
.pick { position: relative; flex: none; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-height: 44px; padding: 7px 14px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .05); color: inherit; font: inherit; cursor: pointer; white-space: nowrap; }
.pick b { font-size: 14px; }
.pick span { font-size: 11.5px; color: #34d399; font-weight: 600; }
.pick.full span { color: #fb7185; }
.pick.full b { color: var(--muted); }
.pick.on { border-color: #818cf8; background: rgba(99, 102, 241, .16); box-shadow: 0 0 0 1px #818cf8 inset; }
.pick.on span { color: #c7d2fe; }
.slots .pick { min-width: 72px; }
.pick-input { flex-direction: row; align-items: center; gap: 6px; border-style: dashed; }
.pick-input svg { width: 16px; height: 16px; color: var(--muted); }
.pick-input input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.bk-h .av-legend { float: right; display: inline-flex; align-items: center; gap: 4px 6px; flex-wrap: wrap; font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.av-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 4px; }
.lg-free { background: rgba(16, 185, 129, .55); } .lg-inuse { background: #4f46e5; } .lg-booked { background: var(--amber-solid); }
/* night availability chart (rooms × hours) */
.av { display: flex; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 10px; background: rgba(255, 255, 255, .02); }
.av-names { flex: none; width: 100px; border-right: 1px solid var(--line); background: rgba(10, 15, 30, .6); }
.av-corner, .av-head { height: 42px; }
.av-name { height: 38px; display: flex; flex-direction: column; justify-content: center; padding: 0 9px; border-top: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.av-name b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.av-name span { font-size: 10.5px; color: var(--dim); }
.av-name.on { background: rgba(99, 102, 241, .16); box-shadow: inset 3px 0 0 #818cf8; }
.av-scroll { flex: 1; overflow-x: auto; overscroll-behavior-x: contain; }
.av-grid { position: relative; background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px var(--px)); }
.av-head { position: relative; }
.av-head span { position: absolute; top: 24px; font-size: 10.5px; color: var(--dim); padding-left: 4px; }
.av-body { position: relative; }
.av-row { position: relative; height: 38px; border-top: 1px solid var(--line); }
.av-row.on { background: rgba(99, 102, 241, .08); }
.av-name b { display: flex; align-items: center; gap: 5px; }
.av-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; }
.av-dot.ok { background: #34d399; box-shadow: 0 0 6px rgba(52, 211, 153, .7); }
.av-dot.no { background: #fb7185; }
.av-win { position: absolute; top: 0; bottom: 0; background: rgba(99, 102, 241, .1); border-left: 1.5px dashed rgba(129, 140, 248, .8); border-right: 1.5px dashed rgba(129, 140, 248, .8); pointer-events: none; z-index: 2; }
.av-win em { position: absolute; top: 3px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10.5px; font-weight: 700; color: #fff; background: #4f46e5; padding: 1px 7px; border-radius: 99px; white-space: nowrap; }
.av-bar.clash { box-shadow: 0 0 0 2px #fff inset; }
.av-now em { position: absolute; top: -1px; left: 4px; font-style: normal; font-size: 9.5px; font-weight: 700; color: #818cf8; text-transform: uppercase; letter-spacing: .04em; }
.av-row::before { content: ''; position: absolute; left: 0; right: 0; top: 8px; bottom: 8px; background: rgba(16, 185, 129, .3); border-top: 1px solid rgba(52, 211, 153, .55); border-bottom: 1px solid rgba(52, 211, 153, .55); }
.av-row.maint::before { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 6px, transparent 6px 12px); border: 0; }
.av-bar, .av-sel { position: absolute; top: 6px; height: 26px; border-radius: 7px; padding: 0 6px; font-size: 10.5px; font-weight: 600; line-height: 26px; color: #fff; overflow: hidden; white-space: nowrap; }
.av-bar.inuse { background: linear-gradient(90deg, #4f46e5, #3b82f6); }
.av-bar.booked { background: var(--amber-solid); }
.av-sel { top: 4px; height: 30px; padding: 0; border: 2px solid #818cf8; background: rgba(99, 102, 241, .45); box-shadow: 0 0 12px rgba(99, 102, 241, .5); z-index: 2; }
.av-past { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(4, 7, 16, .55) 0 6px, rgba(4, 7, 16, .4) 6px 12px); pointer-events: none; z-index: 1; }
.av-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #818cf8; box-shadow: 0 0 8px #818cf8; pointer-events: none; z-index: 3; }
.bk-ok { font-size: 13px; color: #6ee7b7; padding: 2px 2px 0; }
.bk-ok b { color: inherit; }
/* booking: when card */
.bk-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bk-h-sum { font-size: 13px; font-weight: 600; color: #a5b4fc; white-space: nowrap; }
.when { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: rgba(255, 255, 255, .03); }
.when-days { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 54px; border-radius: 12px; border: 1px solid transparent; background: none; color: inherit; font: inherit; cursor: pointer; min-width: 0; }
.day small { font-size: 10.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; max-width: 100%; }
.day b, .dur-v b { color: var(--text); }
.day b { font-size: 17px; line-height: 1.1; }
.day:hover { background: rgba(255, 255, 255, .05); }
.day.on { background: linear-gradient(160deg, #6366f1, #06b6d4); border-color: transparent; }
.day.on small { color: rgba(255, 255, 255, .85); }
.day-cal { border: 1px dashed var(--line2); }
.day-cal svg { width: 18px; height: 18px; color: var(--muted); }
.day-cal input, .slot-other input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.when-lbl { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 8px; }
.when-key { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.when-key i { width: 8px; height: 3px; border-radius: 2px; margin-left: 6px; }
.when-key i.ok, .slot.ok i { background: #34d399; }
.when-key i.few, .slot.few i { background: #fbbf24; }
.when-key i.full, .slot.full i { background: #fb7185; }
.when .pick-row { margin: 0 -12px; padding: 0 12px 2px; scroll-padding: 0 12px; gap: 6px; }
.slot { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 58px; height: 42px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); color: inherit; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.slot i { width: 18px; height: 3px; border-radius: 2px; }
.slot.full { color: var(--dim); }
.slot.on { background: rgba(99, 102, 241, .2); border-color: #818cf8; box-shadow: 0 0 0 1px #818cf8 inset; color: #fff; }
.slot-other { border-style: dashed; }
.slot-other svg { width: 18px; height: 18px; color: var(--muted); }
.when-dur { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.when-dur .when-lbl { margin: 0; }
.dur { display: flex; align-items: center; gap: 8px; }
.dur .step-btn { height: 38px; width: 38px; }
.dur .step-btn:disabled { opacity: .35; cursor: default; }
.dur-v { min-width: 84px; text-align: center; line-height: 1.15; }
.dur-v b { display: block; font-size: 15px; }
.dur-v span { font-size: 11.5px; color: var(--muted); }

/* make payment */
.sum-bar.three > div { flex: 1; }
.sum-bar.three > div:nth-child(2) { text-align: center; }
.pay-due { padding: 16px; border-radius: 16px; margin: 4px 0 12px; background: linear-gradient(135deg, rgba(99, 102, 241, .25), rgba(99, 102, 241, .25)); border: 1px solid rgba(129, 140, 248, .4); }
.pay-due > div:first-child span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pay-due > div:first-child b { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.pay-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 6px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .12); }
.pay-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.pay-methods label { cursor: pointer; min-width: 0; }
.pay-methods input { position: absolute; opacity: 0; pointer-events: none; }
.pay-methods span { display: flex; flex-direction: column; justify-content: center; min-height: 46px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.pay-methods small { font-weight: 500; font-size: 11.5px; color: var(--muted); }
.pay-methods input:checked + span { border-color: #818cf8; background: rgba(99, 102, 241, .18); box-shadow: 0 0 0 1px #818cf8 inset; }
.pay-methods input:focus-visible + span { outline: 2px solid #818cf8; outline-offset: 2px; }
.pay-amt { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line2); border-radius: 14px; padding: 0 14px; background: rgba(255, 255, 255, .04); margin-bottom: 10px; }
.pay-amt span { font-weight: 700; color: var(--muted); }
.pay-amt .input { border: 0; background: none; font-size: 24px; font-weight: 800; height: 56px; padding: 0; box-shadow: none; }
.pay-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pay-cash-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; align-items: start; }
.pay-cash-row .pay-quick { margin: 0; flex-wrap: nowrap; }
.pay-cash-row .pick { min-height: 42px; padding: 6px 12px; }
.pay-change { font-size: 14px; margin: 8px 0 14px; min-height: 4px; }
.pay-change b { font-size: 18px; color: #34d399; }

/* receipt (paper style) */
.receipt { position: relative; background: #fffdf8; color: #1e293b; border-radius: 6px; padding: 20px 18px 16px; margin: 0 auto 4px; max-width: 420px; font-size: 13.5px; line-height: 1.35; box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  -webkit-mask: radial-gradient(circle 5px at 50% 100%, transparent 98%, #000) 0 0 / 14px 100% repeat-x; mask: radial-gradient(circle 5px at 50% 100%, transparent 98%, #000) 0 0 / 14px 100% repeat-x; padding-bottom: 22px; }
.rx-top { text-align: center; padding-bottom: 12px; border-bottom: 1.5px dashed #cbd5e1; }
.rx-shop { font-size: 19px; font-weight: 800; letter-spacing: .02em; color: #0f172a; }
.rx-doc { font-size: 12px; color: #64748b; margin-top: 2px; }
.rx-stamp { position: absolute; top: 16px; right: 14px; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 3px 8px; border: 2px solid; border-radius: 6px; transform: rotate(6deg); }
.rx-stamp.green { color: #059669; } .rx-stamp.amber { color: #d97706; } .rx-stamp.violet { color: #7c3aed; } .rx-stamp.blue { color: #2563eb; }
.rx-meta { padding: 10px 0; border-bottom: 1.5px dashed #cbd5e1; }
.rx-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 1.5px 0; }
.rx-kv span:first-child { color: #64748b; flex: none; }
.rx-kv span:last-child { text-align: right; font-weight: 600; }
.rx-sec { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; margin: 12px 0 4px; }
.rx-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 3px 0; }
.rx-l { min-width: 0; }
.rx-l small { display: block; font-size: 11.5px; color: #64748b; }
.rx-r { flex: none; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rx-strong { font-weight: 700; }
.rx-void { color: #94a3b8; }
.rx-due .rx-r, .rx-due .rx-l { color: #c2410c; }
.rx-dim { color: #94a3b8; }
.rx-rule { border-top: 1.5px dashed #cbd5e1; margin: 10px 0 6px; }
.rx-total { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 4px; padding: 10px 0; border-top: 2px solid #1e293b; border-bottom: 2px solid #1e293b; }
.rx-total span { font-weight: 800; letter-spacing: .06em; font-size: 13px; }
.rx-total b { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rx-foot { text-align: center; font-size: 12px; color: #64748b; margin-top: 14px; padding-top: 10px; border-top: 1.5px dashed #cbd5e1; }
.rx-pend, .rx-tag { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 99px; margin-left: 4px; background: #fef3c7; color: #b45309; }
.rx-tag { background: #ede9fe; color: #6d28d9; }
.rx-act { border: 1px solid #cbd5e1; background: #fff; color: #7c3aed; font: inherit; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; margin-left: 6px; cursor: pointer; vertical-align: 1px; }
.rx-act.ok { color: #059669; }
.receipt .t-fly { color: #0891b2; } .receipt .t-lock { color: #c026d3; }
.receipt .mono { color: inherit; }
/* checkout: receipt + tips */
.pay-rcpt { margin: 0 0 16px; }
.pay-rcpt > summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 15px; padding: 4px 0 10px; display: flex; align-items: center; gap: 8px; }
.pay-rcpt > summary::-webkit-details-marker { display: none; }
.pay-rcpt > summary::before { content: '›'; font-size: 18px; color: var(--muted); transition: transform .15s; }
.pay-rcpt[open] > summary::before { transform: rotate(90deg); }
.pay-tips { border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 18px; background: rgba(255, 255, 255, .03); }
.pay-tips .bk-h { margin-bottom: 8px; }
.tip-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tip-chips:empty { display: none; }
.tip-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 99px; background: rgba(99, 102, 241, .16); border: 1px solid rgba(129, 140, 248, .45); font-size: 13px; }
.tip-chip button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: inherit; cursor: pointer; font-size: 14px; line-height: 1; }
.tip-form { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; margin-bottom: 8px; }
.pay-amt.sm { margin: 0; padding: 0 10px; border-radius: 10px; }
.pay-amt.sm .input { font-size: 16px; height: 42px; }
.tip-form-2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tip-form-2 .pay-quick { margin: 0; gap: 6px; flex-wrap: nowrap; }
.tip-form-2 .pick { min-height: 38px; padding: 4px 12px; }
.pay-h { margin-top: 4px; }
body.printing .receipt { box-shadow: none; -webkit-mask: none; mask: none; max-width: 100%; }

/* hold bill (debt) cards */
.ok-t { color: #34d399; } .red-t { color: #fb7185; }
.hold-card { border: 1px solid var(--line); border-left: 4px solid var(--line2); border-radius: 16px; padding: 14px; margin-bottom: 12px; background: var(--card); }
.hold-card.pending { border-left-color: var(--amber-solid); }
.hold-card.settled { border-left-color: var(--green-solid); }
.hold-card.voided { opacity: .7; }
.hc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hc-who { min-width: 0; }
.hc-who b { display: block; font-size: 15.5px; }
.hc-who span { font-size: 12.5px; color: var(--muted); }
.hc-amt { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.hc-amt b { font-size: 19px; }
.hold-card .info-grid { padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 10px 0 12px; }
.hold-card .btn-row .btn { flex: 1; }

/* booking confirmation */
/* room details: booked time on top */
.time-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin: 0 0 12px; border-radius: 14px; background: var(--amber-soft); border: 1px solid rgba(245, 158, 11, .4); }
.time-top .tt-l { flex: none; }
.time-top .tt-l span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--amber); }
.time-top .tt-l b { font-size: 22px; font-weight: 800; white-space: nowrap; }
.time-top .tt-r { min-width: 0; text-align: right; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--muted); }
.cb-hero { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; margin: 4px 0 12px; background: linear-gradient(135deg, rgba(99, 102, 241, .28), rgba(99, 102, 241, .28)); border: 1px solid rgba(129, 140, 248, .45); }
.cb-room { font-size: 22px; font-weight: 800; line-height: 1.15; min-width: 0; }
.cb-room span, .cb-time span { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.cb-time { text-align: right; flex: none; }
.cb-time b { font-size: 19px; }
/* booking time card: Starts → Ends, each with its own date */
.ts { padding: 12px 14px; border-radius: 14px; margin: 12px 0; background: rgba(99, 102, 241, .16); border: 1px solid rgba(129, 140, 248, .4); }
.ts-row { display: flex; align-items: center; gap: 8px; }
.ts-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--amber); margin-bottom: 8px; }
.ts-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.ts-end { flex: 1; min-width: 0; }
.ts-end:last-child { text-align: right; }
.ts-end span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #a5b4fc; }
.ts-end b { display: block; font-size: 24px; font-weight: 800; line-height: 1.2; }
.ts-end em { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); }
.ts-end.next em { color: var(--amber); font-weight: 600; }
.ts-mid { flex: none; text-align: center; color: var(--muted); }
.ts-mid i { display: block; font-style: normal; font-size: 18px; line-height: 1; }
.ts-mid span { font-size: 12px; font-weight: 600; }
.was { font-size: 12.5px; color: var(--amber); margin: -4px 2px 10px; }
.bk-two { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 0 12px; }
.stepper { display: flex; align-items: stretch; gap: 6px; }
.stepper .input { text-align: center; min-width: 0; padding-left: 4px; padding-right: 4px; -moz-appearance: textfield; }
.stepper .input::-webkit-inner-spin-button, .stepper .input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.step-btn { flex: none; width: 40px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .06); color: inherit; font-size: 20px; font-weight: 600; cursor: pointer; }
.step-btn:active { background: rgba(255, 255, 255, .14); }
/* booking: customer profile picker */
.cust-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.cust-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--soft); color: inherit; font: inherit; cursor: pointer; text-align: left; }
.cust-row:hover, .cust-row:focus-visible { border-color: rgba(99, 102, 241, .55); }
.cust-row div { display: flex; flex-direction: column; min-width: 0; }
.cust-row b { font-size: 14px; }
.cust-row span:not(.avatar), .cust-main span { font-size: 12px; color: var(--muted); }
.cust-none { padding: 2px 4px; }
.cust-card { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-bottom: 12px; border-radius: 14px; border: 1px solid rgba(99, 102, 241, .45); background: var(--primary-soft); }
.cust-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cust-main em { font-size: 12px; font-style: normal; color: var(--text); opacity: .8; margin-top: 3px; overflow-wrap: anywhere; }
.cust-acts { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.bk-more { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; }
.bk-more summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 14px; list-style: none; display: flex; align-items: center; gap: 8px; }
.bk-more summary::-webkit-details-marker { display: none; }
.bk-more summary::before { content: '›'; display: inline-block; font-size: 18px; line-height: 1; color: var(--muted); transition: transform .15s; }
.bk-more[open] summary::before { transform: rotate(90deg); }
.bk-more summary .muted { font-weight: 400; font-size: 12.5px; }
.sum-bar { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); margin: 6px 0 10px; }
.sum-bar div { min-width: 0; }
.sum-bar span { display: block; font-size: 12px; color: var(--muted); }
.sum-bar b { font-size: 17px; }
.sum-bar div:last-child { text-align: right; }

/* history timeline */
.timeline-v { position: relative; padding-left: 4px; }
.timeline-v::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 2px; background: var(--line2); }
.tv-item { display: flex; gap: 12px; margin-bottom: 10px; position: relative; }
.tv-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #475569; color: #fff; z-index: 1; }
.tv-dot svg { width: 16px; height: 16px; }
.tv-dot.green { background: var(--green-solid); } .tv-dot.pink { background: #4f46e5; } .tv-dot.violet { background: #7c3aed; }
.tv-dot.amber { background: var(--amber-solid); } .tv-dot.red { background: var(--red-solid); }
.tv-card { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.tv-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.tv-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tv-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--dim); margin-top: 6px; }

/* PR self-service */
.me-card { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; margin-bottom: 16px; background: linear-gradient(110deg, #4f46e5, #3b82f6 60%, #06b6d4); color: #fff; }
.me-card .avatar { background: rgba(255, 255, 255, .25); color: #fff; }
.me-card .muted { color: rgba(255, 255, 255, .85); }
.me-earn { margin-left: auto; text-align: right; }
.me-earn span { display: block; font-size: 12px; opacity: .9; }
.me-earn b { font-size: 22px; }
.works { display: grid; gap: 10px; margin-bottom: 20px; }
.work { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.work.on { border-color: rgba(99, 102, 241, .4); }
.work-top, .work-bot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.work-bot { font-size: 13px; margin-top: 6px; }
.progress { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #38bdf8); border-radius: 99px; }
details.night { border-top: 1px solid var(--line); }
details.night:first-child { border-top: 0; }
details.night summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; cursor: pointer; }
details.night summary::-webkit-details-marker { display: none; }
details.night summary b { display: block; font-size: 16px; }
details.night summary span { font-size: 12px; color: var(--muted); }
.count-dot { min-width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #fff !important; display: grid; place-items: center; font-weight: 700; }
details.night .row { background: rgba(0, 0, 0, .12); }

@media (min-width: 760px) {
  .rcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rcard-acts .btn { flex: 0 1 auto; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .searchbar { position: sticky; bottom: 16px; left: auto; right: auto; margin-top: 16px; }
  .page:has(.searchbar) { padding-bottom: 32px; }
  .rcards { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
}

/* ================= v3.3 refinements: fewer sections, calmer UI ================= */
.page { padding-top: 16px; }
.page-head { display: none !important; }
h4 { margin: 20px 2px 8px; }

/* top row: date + list/timetable switch */
.rm-top { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.rm-top .input { flex: 1; min-width: 0; }
.seg-mini { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); flex: none; }
.seg-mini button { border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 13.5px; height: 36px; padding: 0 14px; border-radius: 9px; cursor: pointer; }
.seg-mini button.on { background: rgba(255, 255, 255, .14); color: #fff; }
.seg-mini.wide { display: flex; margin-bottom: 16px; }
.seg-mini.wide button { flex: 1; }
.tabs { margin-bottom: 16px; }

/* tiles double as filters */
.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
button.tile-stat { text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.tile-stat { border-left-width: 3px; padding: 9px 11px; }
.tile-stat b { font-size: 22px; }
.tile-stat.gray { border-left-color: var(--dim); }
.tile-stat.on { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .35); }
.sec-t { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 2px 10px; }
.sec-t span { font-weight: 500; color: var(--dim); letter-spacing: 0; }
.rm-sec { margin-bottom: 22px; }
.rm-sec .group { margin-bottom: 0; }
.link-row { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--line2); background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; margin-bottom: 20px; }
.link-row span { color: #a5b4fc; font-weight: 600; }

/* room card — calmer */
.rcard { padding: 14px 14px 12px; border-color: rgba(99, 102, 241, .18); background: linear-gradient(165deg, rgba(37, 99, 235, .16), rgba(30, 58, 138, .1) 55%, rgba(255, 255, 255, .03)); }
.rc-h { display: flex; align-items: center; gap: 10px; }
.rc-room { font-size: 18px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.rc-cust { flex: 1; min-width: 0; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-meta { font-size: 12.5px; color: var(--dim); margin-top: 2px; }
.rc-mid { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 12px 0 10px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .18); }
.rc-mid span { display: block; font-size: 11.5px; color: var(--muted); }
.rc-time .tl { font-size: 22px; color: #fff; }
.rc-time.over .tl, .rc-time.over span { color: #fda4af; }
.rc-amt { text-align: right; }
.rc-amt b { font-size: 18px; font-variant-numeric: tabular-nums; }
.rc-amt small { display: block; font-size: 11px; color: var(--dim); }
.rc-prs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pr-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; }
.pr-pill .tl { font-size: 12px; color: var(--green); }
.pr-pill .tl.over { color: var(--dim); }
.pr-pill.lock { border-color: rgba(196, 181, 253, .35); }
.rc-acts { display: flex; gap: 8px; }
.rc-acts .btn { flex: 1; min-width: 0; padding: 0 8px; }
.rc-acts .more-btn { flex: 0 0 44px; padding: 0; }
.rc-acts .more-btn svg { width: 20px; height: 20px; }
.rc-note { font-size: 12.5px; color: var(--muted); margin: -2px 2px 10px; }
.rcard.booking { border-color: rgba(245, 158, 11, .22); background: linear-gradient(165deg, rgba(180, 83, 9, .14), rgba(30, 58, 138, .08) 55%, rgba(255, 255, 255, .03)); }

/* sheets */
.sum-bar.big .tl { font-size: 22px; }
.sum-bar.big b { font-size: 20px; }
.act-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
.act-grid .btn { min-height: 48px; }

/* avatars */
.avatar.xs { width: 26px; height: 26px; font-size: 10px; margin-left: -6px; border: 2px solid #121a2e; }
.avatar.xs.more { background: rgba(255, 255, 255, .15); color: var(--text); }
.faces { display: inline-flex; padding-left: 6px; align-items: center; }
.avatar.available { background: rgba(16, 185, 129, .22); color: #6ee7b7; }
.avatar.fly, .avatar.lock { background: rgba(99, 102, 241, .22); }
.avatar.off { background: rgba(255, 255, 255, .08); color: var(--dim); }

/* switches (feature access) */
.switch { appearance: none; -webkit-appearance: none; width: 46px !important; height: 28px !important; border-radius: 99px; background: rgba(255, 255, 255, .16); position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch:checked { background: var(--green-solid); }
.switch:checked::after { transform: translateX(18px); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.sw-group { background: linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .035)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.sw-g { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 14px 4px; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 14px; cursor: pointer; }
.sw-row + .sw-row { border-top: 1px solid var(--line); }
.sw-row b { display: block; font-size: 14.5px; font-weight: 600; }
.sw-row small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.sw-who { display: flex; align-items: center; gap: 10px; }

/* F&B order stepper */
.cat-chips { margin: 0 0 10px; padding: 0; }
.menu-list { margin-bottom: 14px; max-height: 50vh; overflow-y: auto; overscroll-behavior: contain; }
.menu-row { min-height: 56px; }
.menu-row.picked { background: rgba(99, 102, 241, .1); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; flex: none; }
.stepper button { width: 38px; height: 38px; border: 0; background: rgba(255, 255, 255, .06); color: var(--text); font-size: 20px; cursor: pointer; }
.stepper button:active { background: rgba(255, 255, 255, .16); }
.stepper input { width: 36px; height: 38px; border: 0; background: none; color: var(--text); text-align: center; font: inherit; font-weight: 700; }
.menu-row.picked .stepper { border-color: #818cf8; }
.menu-row .line-amt { font-size: 14px; font-variant-numeric: tabular-nums; color: #a5b4fc; white-space: nowrap; }
.menu-row .line-amt:empty { display: none; }

/* POS layout: menu + order panel side by side, stacked on phones */
.pos { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.pos .menu-list { max-height: 42vh; margin-bottom: 0; }
.pos-cart { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .04); overflow: hidden; }
.pos-cart-h { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.pos-cart-h span { color: var(--muted); font-size: 13px; flex: 1; }
.pos-cart-h .link { background: none; border: 0; color: #a5b4fc; font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.pos-lines { flex: 1; overflow-y: auto; max-height: 26vh; }
.pos-line { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.pos-line > div { flex: 1; min-width: 0; }
.pos-line b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-line small { color: var(--muted); font-size: 12.5px; }
.pos-line > span { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos-x { width: 28px; height: 28px; flex: none; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .06); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.pos-empty { padding: 16px 12px; color: var(--muted); font-size: 13px; text-align: center; }
.pos-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px; background: rgba(99, 102, 241, .12); }
.pos-total b { font-size: 20px; font-variant-numeric: tabular-nums; }
.pos-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pos-prev-box { background: rgba(255, 255, 255, .02); border-style: dashed; }
.pos-prev-box .pos-cart-h span { text-align: right; font-variant-numeric: tabular-nums; }
.pos-prev { opacity: .75; max-height: 18vh; }
@media (min-width: 720px) {
  .pos { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
  .pos .menu-list { max-height: 56vh; }
  .pos-side { position: sticky; top: 0; max-height: 64vh; overflow-y: auto; }
  .pos-lines { max-height: 30vh; }
  .pos-prev { max-height: 22vh; }
}

@media (min-width: 760px) {
  .act-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .rm-top { max-width: 560px; }
  .tiles.four { max-width: 720px; }
  .sidebar .nav-item { padding: 10px 12px; font-size: 14.5px; }
}

/* ================= v3.4 clarity pass — one quiet visual language ================= */
body { font-size: 15px; letter-spacing: 0; }
.tl, .mono { font-family: inherit; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.mono { color: var(--muted); }

/* headings: sentence case, one size */
.blk-t, .group-head h3, h4, .sec-t, .sw-g {
  text-transform: none !important; letter-spacing: 0 !important; font-size: 16px !important; font-weight: 650 !important; color: var(--text) !important;
}
.blk-t span, .group-head .count, .sec-t span { color: var(--dim); font-weight: 500; margin-left: 4px; }
.group-head { padding: 0 2px 8px; }
.sw-g { padding: 14px 14px 4px !important; font-size: 14px !important; color: var(--muted) !important; }
.blk { margin-bottom: 26px; }
.blk-t { margin: 0 2px 10px; }

/* status: soft, sentence case */
.badge { font-size: 12px; font-weight: 600; letter-spacing: 0; padding: 2px 9px; background: rgba(255, 255, 255, .1); color: var(--muted); }
.badge.green { background: rgba(16, 185, 129, .16); color: #6ee7b7; }
.badge.amber { background: rgba(245, 158, 11, .16); color: #fcd34d; }
.badge.red { background: rgba(244, 63, 94, .18); color: #fda4af; }
.badge.violet { background: rgba(167, 139, 250, .2); color: #ddd6fe; }
.st { font-weight: 500; }
.soon { color: #fcd34d; font-size: 13.5px; font-weight: 600; }

/* buttons: one filled, the rest quiet */
.btn.quiet { background: transparent; border: 1px solid var(--line2); color: var(--text); }
.btn.quiet:hover { background: rgba(255, 255, 255, .06); }
.btn.primary { box-shadow: none; }
.icon-btn.sm { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); flex: none; }
.icon-btn.sm svg { width: 19px; height: 19px; }
.icon-btn.sm.on { background: rgba(255, 255, 255, .12); color: #fff; }

/* top bar of a page */
.pbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.pbar.range .input { flex: 1; min-width: 0; }
.pbar.range .muted { flex: none; font-size: 13px; }
.pbar .btn { flex: none; }
.date-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); font-weight: 600; font-size: 14px; cursor: pointer; flex: none; }
.date-chip svg { width: 16px; height: 16px; color: var(--muted); }
.date-chip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.pbar .seg-mini { margin-left: auto; }
.seg-mini button { height: 34px; }
.rooms-bar .icon-btn.sm { margin-left: auto; }
.rooms-bar .seg-mini { margin-left: 0; }
.rooms-bar .seg-mini button { padding: 0 11px; }
.hist-room { flex: none; display: inline-flex; }
.hist-room .input { height: 36px; min-height: 36px; border-radius: 99px; padding: 0 12px; font-size: 13.5px; font-weight: 600; }
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; }
.tab { flex: 1 0 auto; height: 36px; border-radius: 9px; font-size: 14px; color: var(--muted); }
.tab.on { background: rgba(255, 255, 255, .13); color: #fff; }
.search-row { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .05); margin-bottom: 12px; }
.search-row svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search-row .input { border: 0; background: none; padding: 0; min-height: 40px; width: 100%; box-shadow: none; }
.fchips { margin: 0 -16px 18px; padding: 0 16px; }
.fchip { height: 36px; font-size: 14px; font-weight: 600; }
.fchip.on { background: #fff; color: #0a0f1e; }
.fchip.on span { color: #0a0f1e; opacity: .55; }

/* room cards */
.rcs { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.rc { border-radius: 16px; padding: 14px; background: rgba(255, 255, 255, .055); border: 1px solid var(--line); cursor: pointer; }
.rc:active { background: rgba(255, 255, 255, .08); }
.rc.booking { border-left: 3px solid var(--amber-solid); }
.rc.done { opacity: .85; }
.rc-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rc-line.sub { margin-top: 3px; font-size: 13.5px; color: var(--muted); align-items: center; }
.rc-line.sub > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-name { font-size: 17px; font-weight: 700; }
.rc-total { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cd.room { font-weight: 600; font-size: 13.5px; white-space: nowrap; color: var(--green); }
.cd.room.warn { color: #fcd34d; }
.cd.room.over { color: #fda4af; }
.rc-prs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.rc-prs em { font-style: normal; }
.rc-prs .cd { font-weight: 500; font-size: 12.5px; }
.rc-note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.rc-ext { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px; border-radius: 999px; font-size: 13px; color: var(--amber); background: rgba(251, 191, 36, .12); }
.rc-ext svg { width: 14px; height: 14px; flex: none; }
.rc-ext b { font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-ext s { opacity: .6; font-variant-numeric: tabular-nums; }
.rc-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.rc-btns .btn { min-height: 42px; }

/* room card tidy-up: consistent spacing, nothing truncated */
.rc { padding: 14px 16px; }
.rc-line .rc-name { line-height: 1.3; }
.rc-line.sub { margin-top: 2px; }
.rc-line.sub > .rc-cust { flex: 1; min-width: 0; font-size: 14px; color: var(--text); opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-when { flex: none; font-size: 13.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.rc .rc-meta { display: flex; flex-wrap: wrap; gap: 2px 0; margin-top: 4px; font-size: 13px; color: var(--muted); }
.rc-meta i { font-style: normal; color: var(--dim); margin: 0 7px; }
.rc .rc-ext { margin-top: 10px; }
.rc .rc-note { margin-top: 8px; font-size: 13px; color: var(--dim); }
.rc .rc-prs { gap: 6px 16px; margin-top: 12px; padding-top: 12px; }
.rc-btns { margin-top: 14px; }
.fab { position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); z-index: 36; }
.page:has(.fab) { padding-bottom: calc(var(--tabbar-h) + 90px + env(safe-area-inset-bottom)); }
.link-row { margin-top: -8px; }

/* lists */
.row { min-height: 56px; }
.row-title { font-weight: 600; }
.row-end b { font-weight: 650; }
.row-end small { font-size: 11.5px; }
.kv .row-main { color: var(--muted); }
.minibar { display: block; height: 4px; margin-top: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; max-width: 180px; }
.minibar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.kpis { margin-bottom: 20px; }
.kpi-l { font-size: 12.5px; }
.kpi-v { font-size: 21px; }
.timeline { margin: -8px 0 30px; height: 30px; }
.tl-seg { font-size: 10.5px; padding: 0 6px; line-height: 20px; top: 5px; bottom: 5px; }
.tl-tick { font-size: 10.5px; }
.tl-tick:nth-child(even) { display: block; }

/* sheets */
.sheet-title { margin-bottom: 14px; }
.sheet-title h2 { font-size: 22px; }
.sum-bar.big b, .sum-bar.big .cd.room { font-size: 20px; }
/* Time · Bill so far · Paid: three equal columns that never overlap on a phone */
.sum-bar.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; }
.sum-bar.three b, .sum-bar.three .cd.room { display: block; font-size: 16px; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
.act-grid .btn { min-height: 46px; }
.bill-table tr.sec td { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--muted); }
.bill-table tr.grand td { background: rgba(255, 255, 255, .06); }

@media (min-width: 760px) {
  .rcs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .rcs { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  .fab { right: 32px; bottom: 32px; }
  .page:has(.fab) { padding-bottom: 100px; }
  .fchips { margin: 0 0 18px; padding: 0; }
  .pbar { max-width: 640px; }
}

/* ---------- print (tickets & bills) ---------- */
@media print {
  body.printing { background: #fff; color: #000; }
  body.printing #app, body.printing #toasts, body.printing .tabbar { display: none !important; }
  body.printing .modal-backdrop { position: static; background: none; padding: 0; }
  body.printing .modal-backdrop:not(:last-child) { display: none; }
  body.printing .modal { box-shadow: none; border: 0; width: 100%; max-height: none; background: #fff; color: #000; }
  body.printing .modal-body { overflow: visible; }
  body.printing .modal-head, body.printing .modal-foot, body.printing .grabber, body.printing .no-print { display: none !important; }
}

/* desktop refinements for joined stats & tabs */
@media (min-width: 1024px) {
  .kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 22px; }
  .kpi { border-left: 1px solid var(--line); border-top: 0 !important; }
  .kpi:first-child { border-left: 0; }
  .tabs { display: inline-flex; padding: 3px; }
  .dash { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
}

/* ---------- staff clock-in ---------- */
.btn svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.src { display: inline-flex; align-items: center; vertical-align: middle; }
.src.fp svg { width: 14px; height: 14px; color: var(--green); }
.src.manual { font-size: 11px; font-weight: 600; color: var(--amber); background: var(--amber-soft); border-radius: 6px; padding: 1px 6px; }
.kind { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 26px; border-radius: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; }
.kind.in { background: var(--green-soft); color: var(--green); }
.kind.out { background: var(--gray-soft); color: var(--muted); }
.avatar.warn-av { background: var(--amber-soft); color: var(--amber); }
.avatar svg { width: 18px; height: 18px; }

/* ---------- people: full profile page ---------- */
.back-link { border: 0; background: none; color: var(--primary); font: inherit; font-weight: 600; font-size: 15px; padding: 4px 0 12px; cursor: pointer; }
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.profile-head h2 { font-size: 22px; line-height: 1.2; }
.profile-st { margin-top: 4px; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; }
.profile-btns { margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.chip-s { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: var(--muted); white-space: nowrap; }
.tab .count { font-weight: 500; color: var(--dim); margin-left: 2px; }

/* ---------- bar: stock & kept bottles ---------- */
.kp-tag { display: inline-block; font-size: 13px; font-weight: 700; color: var(--amber); background: var(--amber-soft); border-radius: 8px; padding: 2px 8px; margin-bottom: 6px; }
.kp-photo { display: block; width: 100%; max-height: 280px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); margin: 0 0 16px; }
.kp-pick { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.kp-pick + input + .kp-photo { margin-top: 10px; }
.kp-photo[hidden] { display: none; }
.kp-slip { margin-bottom: 8px; }
.scan-box { position: relative; aspect-ratio: 1; max-width: 340px; margin: 0 auto 12px; border-radius: 16px; overflow: hidden; background: #05080f; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, .85); border-radius: 14px; box-shadow: 0 0 0 999px rgba(5, 8, 18, .35); pointer-events: none; }
.scan-say { position: absolute; left: 12px; right: 12px; bottom: 12px; text-align: center; font-size: 13px; color: #fff; background: rgba(5, 8, 18, .7); border-radius: 10px; padding: 6px 10px; }
.scan-say[hidden] { display: none; }
@media (min-width: 760px) { .act-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.menu-row.out .row-title, .menu-row.out .row-sub { color: var(--dim); }
.stepper button:disabled { opacity: .35; cursor: default; }

/* ---------- sales: split bars, colour keys & labelled amounts ---------- */
.sbar-row { display: block; min-height: 0; padding: 14px 14px 12px; }
.sbar { display: flex; gap: 2px; height: 10px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.sbar i { display: block; height: 100%; min-width: 3px; }
.sbar-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.sbar-key span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sw-blue { background: #60a5fa; } .sw-violet { background: #a78bfa; } .sw-amber { background: #fbbf24; } .sw-green { background: #34d399; }
.sw-cyan { background: #22d3ee; } .sw-red { background: #fb7185; } .sw-gray { background: #64748b; } .sw-pink { background: #818cf8; }
.splits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.splits span { display: inline-flex; flex-direction: column; min-width: 68px; padding: 4px 9px; border-radius: 8px; background: rgba(255, 255, 255, .06); }
.splits em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--dim); white-space: nowrap; }
.splits b { font-size: 13px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw-t-blue { color: #60a5fa !important; } .sw-t-violet { color: #a78bfa !important; } .sw-t-amber { color: #fbbf24 !important; }
.sw-t-green { color: #34d399 !important; } .sw-t-cyan { color: #22d3ee !important; }
.note.how { margin: 0 0 20px; line-height: 1.5; }
.note.how div + div { margin-top: 4px; }
.note.how b { color: var(--text); }
.seg-mini.wide { overflow-x: auto; scrollbar-width: none; }
.seg-mini.wide::-webkit-scrollbar { display: none; }
.seg-mini.wide button { flex: 1 0 auto; padding: 0 11px; white-space: nowrap; }

/* who did it, in record lines */
.by { color: var(--text); font-weight: 600; }
.hint-line.stamp { margin: 0 0 12px; }
