/* VIKI Core staff app. The hotel's own colour arrives as --accent from /brand/theme.css.
   Look and feel: calm, light and rounded, in the style of iPhone apps. Inter is the typeface (SF on Apple devices). */
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Regular.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Medium.woff') format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-SemiBold.woff') format('woff'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Bold.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter Display'; src: url('/fonts/InterDisplay-Bold.woff') format('woff'); font-weight: 700; font-display: swap; }
:root {
  color-scheme: light;
  --accent: #0E7C70;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, white);
  --accent-ink: color-mix(in srgb, var(--accent) 82%, black);
  --bg: #F2F2F7; --surface: #FFFFFF; --ink: #1C1C1E; --ink2: #3A3A3C; --muted: #6E6E73; --faint: #AEAEB2;
  --line: rgba(60, 60, 67, .14); --line2: rgba(60, 60, 67, .08); --soft: #F7F7FA;
  --fill: rgba(118, 118, 128, .12); --fill2: rgba(118, 118, 128, .07);
  --red: #FF3B30; --red-ink: #C4161C; --red-bg: #FFE9E7;
  --orange: #FF9500; --amber: #B25000; --amber-bg: #FFF1DC;
  --green: #34C759; --green-ink: #1A7F37; --green-bg: #E4F7E8;
  --blue: #007AFF; --blue-ink: #0060C7; --blue-bg: #E6F0FF;
  --violet: #AF52DE; --violet-ink: #8939B3; --violet-bg: #F5EAFB;
  --indigo: #5856D6; --teal: #30B0C7; --pink: #FF2D55; --brown: #A2845E; --grey: #8E8E93; --grey-bg: #EEEEF1;
  --head: 'Inter Display', -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, Roboto, Arial, sans-serif;
  --r: 18px; --r-sm: 12px; --r-xs: 9px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 8px rgba(0, 0, 0, .03);
  --shadow: 0 2px 6px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .06);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .22), 0 4px 14px rgba(0, 0, 0, .08);
  --ease: cubic-bezier(.32, .72, 0, 1);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C7C7CC' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
  --down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11'; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { font-family: var(--body); font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -0.015em; }
h1 { font: 700 34px/1.1 var(--head); letter-spacing: -0.028em; }
h2 { font-size: 19px; font-weight: 650; letter-spacing: -0.012em; } h3 { font-size: 16px; font-weight: 600; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, white); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 25%, white); }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; } .num { font-weight: 600; font-variant-numeric: tabular-nums; }
.right { text-align: right; } .nowrap { white-space: nowrap; }
svg { flex: none; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }
.side { background: rgba(250, 250, 252, .86); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-right: 1px solid var(--line); padding: 18px 12px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; z-index: 30; }
.side .brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 2px; }
.side .brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 11px; background: #fff; box-shadow: var(--shadow-sm); }
.side .brand .mark, .mobilebar .mark { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 80%, white), var(--accent)); color: #fff;
  display: grid; place-items: center; font: 700 18px var(--head); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 30%, transparent); }
.side .brand b { font-weight: 650; font-size: 15.5px; line-height: 1.25; letter-spacing: -0.01em; }
.ask-btn { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: var(--fill); color: var(--muted); border-radius: 11px; padding: 8px 10px;
  cursor: pointer; text-align: left; font-size: 15px; }
.ask-btn:hover { background: rgba(118, 118, 128, .17); }
.ask-btn svg { width: 17px; height: 17px; }
.ask-btn span { flex: 1; }
.ask-btn kbd { font: 600 11px var(--body); color: var(--faint); background: #fff; border-radius: 6px; padding: 1px 6px; box-shadow: 0 0 0 1px var(--line2); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav .grp { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 14px 10px 5px; letter-spacing: .01em; }
.nav .grp:first-child { padding-top: 4px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 6px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { background: var(--fill2); }
.nav a.on { background: var(--accent-soft); font-weight: 650; color: var(--accent-ink); }
.nav a .count { margin-left: auto; background: var(--red); color: #fff; border-radius: 10px; font-size: 12px; padding: 0 7px; font-weight: 600; }
.tile { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; background: var(--grey);
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .08); }
.tile svg { width: 17px; height: 17px; stroke-width: 2.1; }
.side .me { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.profile { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; color: var(--ink); text-decoration: none !important; }
.profile:hover { background: var(--fill2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 14px; color: #fff; flex: none;
  background: linear-gradient(145deg, #A1A1AA, #6E6E73); }
.profile b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.profile small { color: var(--muted); font-size: 12.5px; }
.signout { border: 0; background: none; color: var(--red-ink); font-weight: 500; padding: 4px 8px; text-align: left; cursor: pointer; font-size: 14px; border-radius: 8px; }
.signout:hover { background: var(--red-bg); }
.main { min-width: 0; padding: 34px 40px 80px; max-width: 1440px; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.top p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.menu-btn { display: none; }
.content { min-width: 0; }
.mobilebar, .tabbar { display: none; }
.main:focus { outline: none; }

/* ---------- surfaces ---------- */
.panel { background: var(--surface); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.main > * + *, .stack > * + * { margin-top: 18px; }
.main > .top + * { margin-top: 0; }
.panel > h2, .panel > .ph { margin-bottom: 14px; }
.ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ph a { font-weight: 500; font-size: 14.5px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.empty { padding: 30px 10px; text-align: center; color: var(--muted); }

/* ---------- buttons and forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: var(--fill); padding: 0 16px; min-height: 40px; border-radius: 12px;
  cursor: pointer; font-weight: 600; font-size: 15px; text-decoration: none !important; color: var(--ink); white-space: nowrap; letter-spacing: -0.005em;
  transition: transform .12s var(--ease), background-color .15s, filter .15s; }
.btn:hover { background: rgba(118, 118, 128, .18); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.danger { color: var(--red-ink); background: var(--red-bg); }
.btn.danger:hover { background: #FFDAD6; }
.btn.ghost { background: none; color: var(--accent); padding: 0 8px; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn svg { width: 18px; height: 18px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 14px; }
.f { grid-column: span 12; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f.s6 { grid-column: span 6; } .f.s4 { grid-column: span 4; } .f.s3 { grid-column: span 3; } .f.s8 { grid-column: span 8; } .f.s2 { grid-column: span 2; }
.f > span { font-size: 13.5px; color: var(--ink2); font-weight: 600; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=password], input[type=month], input[type=url], input[type=search], select, textarea {
  width: 100%; border: 1.5px solid transparent; border-radius: 12px; padding: 9px 12px; background: var(--fill2); min-height: 44px; font-size: 15.5px;
  transition: background-color .15s, border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { background: rgba(118, 118, 128, .11); }
input:focus, select:focus, textarea:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
select { appearance: none; -webkit-appearance: none; background-image: var(--down); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 34px; }
textarea { min-height: 80px; resize: vertical; }
input:disabled, select:disabled { background: var(--soft); color: var(--muted); }
input[type=search]::-webkit-search-cancel-button { filter: grayscale(1); }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; line-height: 1.35; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.hint { font-size: 13px; color: var(--muted); }
.err { color: var(--red-ink); font-size: 14px; font-weight: 500; }
.seg { display: inline-flex; background: var(--fill); border-radius: 11px; padding: 2px; gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: none; padding: 6px 14px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink2); border-radius: 9px; white-space: nowrap;
  transition: background-color .2s, box-shadow .2s; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters input[type=search] { max-width: 340px; background-color: #fff; box-shadow: var(--shadow-sm); }
.filters input[type=search]:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.filters select, .filters input[type=month], .filters input[type=date] { width: auto; background-color: #fff; box-shadow: var(--shadow-sm); }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 6px 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--soft); }
.tbl tr.click td:first-child { border-radius: 10px 0 0 10px; } .tbl tr.click td:last-child { border-radius: 0 10px 10px 0; }
.tbl .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl tfoot td { font-weight: 700; border-top: 1.5px solid var(--ink); border-bottom: 0; }
.scroll { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }

/* ---------- status chips ---------- */
.chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--grey-bg); color: var(--muted); line-height: 1.6; }
.st-pending { background: var(--amber-bg); color: var(--amber); }
.st-confirmed { background: var(--accent-soft); color: var(--accent-ink); }
.st-checked_in { background: var(--blue-bg); color: var(--blue-ink); }
.st-checked_out { background: var(--grey-bg); color: var(--muted); }
.st-cancelled, .st-no_show, .st-rejected { background: var(--red-bg); color: var(--red-ink); }
.st-blocked { background: var(--grey-bg); color: var(--ink2); }
.st-ota { background: var(--violet-bg); color: var(--violet-ink); }
.st-verified, .st-paid, .st-clean, .st-inspected, .st-accepted { background: var(--green-bg); color: var(--green-ink); }
.st-dirty, .st-open, .st-sent { background: var(--amber-bg); color: var(--amber); }
.st-maintenance, .st-declined, .st-expired { background: var(--red-bg); color: var(--red-ink); }

/* ---------- dashboard ---------- */
.today { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stat-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; }
.stat-card .tile { grid-row: span 2; width: 46px; height: 46px; border-radius: 13px; align-self: start; }
.stat-card .tile svg { width: 25px; height: 25px; }
.stat { font: 700 36px/1 var(--head); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-l { color: var(--muted); font-size: 14px; margin-top: 4px; }
.stat-card .stat-l + .stat-l { grid-column: 2; margin-top: 0; font-size: 13px; }
.todo { display: flex; flex-direction: column; margin: 0 -8px; }
.todo a { display: flex; align-items: center; gap: 14px; padding: 10px 34px 10px 8px; border-radius: 12px; text-decoration: none !important; color: var(--ink); position: relative;
  background: var(--chev) no-repeat right 8px center / 18px; font-weight: 500; }
.todo a + a::before { content: ''; position: absolute; top: 0; left: 56px; right: 8px; border-top: 1px solid var(--line2); }
.todo a:hover { background-color: var(--soft); }
.todo a b { font-size: 15px; font-weight: 700; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 17px; display: grid; place-items: center; background: var(--amber-bg); color: var(--amber); }
.todo a.red b { background: var(--red-bg); color: var(--red-ink); } .todo a.violet b { background: var(--violet-bg); color: var(--violet-ink); }
.todo a.green b { background: var(--green-bg); color: var(--green-ink); }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line2); }
.people li:last-child { border-bottom: 0; }
.people .who { min-width: 0; } .people .who a { color: var(--ink); text-decoration: none; font-weight: 600; } .people .who a:hover { color: var(--accent); }
.occ { display: grid; grid-template-columns: repeat(30, 1fr); gap: 4px; align-items: end; height: 96px; margin-top: 8px; }
.occ i { display: block; background: color-mix(in srgb, var(--accent) 22%, white); border-radius: 5px; min-height: 4px; }
.occ i.full { background: var(--accent); }
.occ-axis { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.kpi .v { font: 700 24px var(--head); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 13.5px; }
.panel.kpi { padding: 16px 18px; }

/* ---------- room calendar (the tape chart) ---------- */
.tape { --day: 48px; --room: 156px; position: relative; overflow-x: auto; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.tape-inner { position: relative; min-width: calc(var(--room) + var(--days) * var(--day)); }
.tape-head, .tape-row { display: grid; grid-template-columns: var(--room) repeat(var(--days), var(--day)); }
.tape-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); }
.tape-head div { padding: 8px 0; text-align: center; font-size: 11.5px; color: var(--muted); line-height: 1.25; font-weight: 500; }
.tape-head div b { display: block; font: 650 16px var(--body); color: var(--ink); margin: 1px 0; }
.tape-head .we { color: var(--faint); }
.tape-head .is-today b { background: var(--red); color: #fff; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; margin: 1px auto; }
.tape-head .is-today { color: var(--red); font-weight: 650; }
.tape-head .corner { text-align: left; padding-left: 16px; position: sticky; left: 0; background: var(--surface); z-index: 4; align-self: end; font-weight: 600; }
.tape-row { position: relative; height: 50px; border-bottom: 1px solid var(--line2); }
.tape-row:last-child { border-bottom: 0; }
.tape-row .rn { position: sticky; left: 0; z-index: 2; background: var(--surface); padding: 7px 14px 7px 16px; font-size: 14px; line-height: 1.2; border-right: 1px solid var(--line2); overflow: hidden; }
.tape-row .rn b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tape-row .rn small { color: var(--muted); font-size: 12px; }
.tape-row .cell { cursor: pointer; border-left: 1px solid transparent; }
.tape-row .cell.we { background: #FAFAFC; }
.tape-row .cell:hover { background: var(--accent-soft); border-radius: 8px; }
.bar { position: absolute; top: 6px; height: 38px; border-radius: 10px; padding: 4px 9px; font-size: 12.5px; font-weight: 600; line-height: 1.25; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer;
  border: 0; text-align: left; color: #fff; background: var(--accent); z-index: 1; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); transition: transform .12s var(--ease), box-shadow .12s; }
.bar:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, .16); }
.bar small { display: block; opacity: .88; font-size: 11px; font-weight: 500; }
.bar.pending { background: var(--orange); } .bar.checked_in { background: var(--blue); } .bar.checked_out { background: #AEAEB2; }
.bar.blocked { background: repeating-linear-gradient(135deg, #8E8E93 0 6px, #9C9CA1 6px 12px); }
.bar.ota { background: var(--violet); }
.bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; } .bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tape-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); z-index: 2; pointer-events: none; opacity: .55; border-radius: 2px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }

/* ---------- booking detail ---------- */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0; font-size: 15px; }
.dl dt { color: var(--muted); padding: 9px 18px 9px 0; border-bottom: 1px solid var(--line2); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; padding: 9px 0; border-bottom: 1px solid var(--line2); }
.dl dt:nth-last-of-type(1), .dl dd:last-child { border-bottom: 0; }
.money-big { font: 700 26px var(--head); font-variant-numeric: tabular-nums; }
.lines { width: 100%; border-collapse: collapse; }
.lines td { padding: 4px 4px; }
.lines input { min-height: 38px; padding: 6px 10px; }
.totals { margin-left: auto; min-width: 260px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
.totals .grand { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 17px; }
.roompick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.roompick label { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid transparent; border-radius: 12px; cursor: pointer; font-size: 14px; line-height: 1.3;
  background: var(--fill2); transition: background-color .15s, border-color .15s; }
.roompick label:hover { background: rgba(118, 118, 128, .12); }
.roompick label.on { border-color: var(--accent); background: var(--accent-soft); }
.roompick label.taken { opacity: .45; cursor: not-allowed; }
.roompick input { margin-top: 1px; accent-color: var(--accent); width: 17px; height: 17px; }
.notice { padding: 12px 16px; border-radius: 14px; background: var(--amber-bg); color: #7A3C00; font-size: 14.5px; }
.notice.red { background: var(--red-bg); color: #8A1014; } .notice.green { background: var(--green-bg); color: #155E2A; } .notice.info { background: var(--blue-bg); color: #0B4A99; }

/* ---------- housekeeping ---------- */
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.room { background: var(--surface); border-radius: var(--r); padding: 20px 16px 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.room::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--green); }
.room.dirty::before { background: var(--orange); } .room.maintenance::before { background: var(--red); } .room.inspected::before { background: var(--blue); }
.room h3 { font: 700 19px var(--head); letter-spacing: -0.01em; }
.room .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.room .task { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; background: var(--soft); padding: 8px 10px; border-radius: 11px; }
.room .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: auto; }

/* ---------- dialogs and toasts ---------- */
dialog { border: 0; border-radius: 22px; padding: 0; width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: var(--shadow-lg); color: var(--ink); background: var(--surface); }
dialog[open] { animation: pop .28s var(--ease); }
dialog.narrow { width: min(500px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(0, 0, 0, .3); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }
.dlg-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px 10px; position: sticky; top: 0; background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); z-index: 2; }
.dlg-h h2 { font-size: 20px; }
.dlg-b { padding: 10px 22px 22px; }
.dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line2); position: sticky; bottom: 0; background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); flex-wrap: wrap; }
.dlg-f .err { margin-right: auto; align-self: center; }
.x { border: 0; background: var(--fill); width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); display: grid; place-items: center; padding: 0 0 2px; flex: none; }
.x:hover { background: rgba(118, 118, 128, .2); color: var(--ink); }
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 60; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast { background: rgba(28, 28, 30, .92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); color: #fff; padding: 11px 20px; border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: 440px; font-size: 14.5px; font-weight: 500; animation: toast .35s var(--ease); pointer-events: auto; }
.toast.bad { background: rgba(196, 22, 28, .95); }
@keyframes toast { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
.tabs { display: inline-flex; gap: 2px; background: var(--fill); padding: 2px; border-radius: 11px; margin-bottom: 18px; overflow-x: auto; max-width: 100%; }
.tabs button { border: 0; background: none; padding: 7px 15px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink2); border-radius: 9px; white-space: nowrap; transition: background-color .2s, box-shadow .2s; }
.tabs button:hover { color: var(--ink); }
.tabs.wrap { display: flex; flex-wrap: wrap; overflow: visible; width: fit-content; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }

/* ---------- sign in ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--accent) 40%, white), transparent 60%),
    radial-gradient(900px 600px at 110% 110%, color-mix(in srgb, var(--accent) 30%, #E9E3FF), transparent 60%), var(--bg); }
.login .card { width: min(420px, 100%); background: rgba(255, 255, 255, .82); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-radius: 28px; padding: 36px 32px 28px; box-shadow: var(--shadow-lg); animation: pop .4s var(--ease); }
.login .card h1 { margin: 18px 0 4px; font-size: 30px; }
.login .logo { max-height: 72px; max-width: 220px; border-radius: 14px; }
.login .mark { width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 75%, white), var(--accent)); color: #fff;
  display: grid; place-items: center; font: 700 28px var(--head); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.login form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.login form .btn { min-height: 50px; font-size: 16.5px; border-radius: 14px; margin-top: 4px; }
.login input { background: rgba(118, 118, 128, .1); min-height: 50px; }
.login .by { margin-top: 20px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- help, practice hotel ---------- */
.title-row { display: flex; align-items: center; gap: 10px; }
.btn.help-btn { width: 30px; height: 30px; min-height: 30px; padding: 0; border-radius: 50%; background: var(--accent-soft); font-weight: 700; color: var(--accent); font-size: 15px; }
.help { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: var(--r); padding: 16px 18px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.help::before { content: 'i'; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font: italic 700 16px Georgia, serif; }
.help .help-body { flex: 1; } .help p { margin: 4px 0 0; font-size: 14.5px; color: var(--ink2); }
.practice-banner { background: #FFF4CC; color: #5A4300; padding: 10px 22px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14.5px; border-bottom: 1px solid #F2DC8C; }
.practice-banner .btn { background: rgba(255, 255, 255, .7); }
.is-practice .side { background: #FFFBEA; }
.practice-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 12px; border: 0; background: none; color: var(--ink); text-align: left; font-weight: 500; cursor: pointer; font-size: 14.5px; }
.practice-btn:hover { background: var(--fill2); }

/* ---------- restaurant & bar till ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; }
.pos-right { position: sticky; top: 18px; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.pos-item { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 100px; padding: 14px; border-radius: 16px; border: 0;
  background: var(--surface); cursor: pointer; text-align: left; box-shadow: var(--shadow-sm); transition: transform .12s var(--ease), box-shadow .15s; }
.pos-item:hover { box-shadow: 0 0 0 2px var(--accent), var(--shadow-sm); }
.pos-item:active { transform: scale(.96); }
.pos-item b { font-size: 15px; line-height: 1.25; font-weight: 600; }
.pos-item .price { font: 700 16px var(--head); color: var(--accent); margin-top: auto; }
.pos-item .stock { font-size: 12px; color: var(--muted); } .pos-item .stock.low { color: var(--red-ink); font-weight: 700; }
.pos-item.out { opacity: .5; } .pos-item.open { background: var(--fill2); box-shadow: inset 0 0 0 1.5px var(--line); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { border: 0; background: var(--surface); border-radius: 20px; padding: 7px 15px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink2); box-shadow: var(--shadow-sm); }
.chip-btn:hover { color: var(--ink); }
.chip-btn.on { background: var(--ink); color: #fff; }
.pos-lines { display: flex; flex-direction: column; max-height: 46vh; overflow-y: auto; margin-bottom: 10px; }
.pos-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nm amt" "qty x"; gap: 6px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.pos-line .nm { grid-area: nm; } .pos-line .amt { grid-area: amt; align-self: start; } .pos-line .qty { grid-area: qty; } .pos-line > .x { grid-area: x; justify-self: end; }
.pos-line .nm { display: flex; flex-direction: column; min-width: 0; } .pos-line small { font-size: 12px; }
.pos-line .qty { display: flex; align-items: center; gap: 6px; } .pos-line .qty .num { min-width: 22px; text-align: center; }
.pos-line .qty .btn { width: 32px; padding: 0; border-radius: 50%; }
.pos-line .amt { font-variant-numeric: tabular-nums; min-width: 80px; text-align: right; font-weight: 600; }
.pos-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.pos-actions .btn.big { min-height: 52px; font-size: 16px; border-radius: 14px; }
.pos-actions .btn.primary { grid-column: span 2; }
.tabs-open { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.btn.wa { background: #25D366; color: #fff; }
.btn.wa:hover { filter: brightness(1.05); background: #25D366; }
.f.check { flex-direction: row; }

/* ---------- kitchen screen, ready orders ---------- */
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.ticket { background: var(--surface); border-radius: var(--r); padding: 20px 16px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.ticket::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--blue); }
.ticket.slow::before { background: var(--orange); } .ticket.late::before { background: var(--red); } .ticket.ready::before { background: var(--green); }
.ticket.ready { background: #F3FBF5; }
.ticket b { font: 700 19px var(--head); } .ticket .mins { font-weight: 700; }
.ticket.late .mins { color: var(--red-ink); }
.ticket ul { list-style: none; margin: 0; padding: 0; font-size: 18px; font-weight: 600; }
.ticket li { padding: 6px 0; border-bottom: 1px solid var(--line2); } .ticket li.cancel { color: var(--red-ink); text-decoration: line-through; }
.ticket li .off { color: var(--red-ink); font-size: 14px; font-weight: 700; } .ticket li s { color: var(--muted); }
.ticket.cancelled-t { background: #FFF1F0; } .ticket.cancelled-t::before { background: var(--red); }
.cancel-head { color: var(--red-ink); font-weight: 800; font-size: 15px; letter-spacing: .02em; }
.ticket .note { font-size: 14px; font-weight: 500; color: var(--amber); }
.ticket-done { grid-column: 1 / -1; }
.ready-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--green-bg); color: #155E2A; padding: 10px 14px; border-radius: 16px; margin-bottom: 14px; font-weight: 500; }
.ready-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border-radius: 20px; padding: 3px 4px 3px 12px; font-weight: 600; box-shadow: var(--shadow-sm); }

/* ---------- "What do you want to do?" search ---------- */
dialog.ask { width: min(660px, calc(100vw - 24px)); margin-top: 10vh; max-height: 76vh; display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; }
dialog.ask:not([open]) { display: none; }
.ask-bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line2); }
.ask-bar > svg { width: 22px; height: 22px; color: var(--muted); }
.ask-input[type=search] { border: 0 !important; background: none !important; box-shadow: none !important; font-size: 19px; padding: 6px 2px; min-height: 40px; }
.ask-close { border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; font-size: 15px; padding: 6px 4px; }
.ask-out { overflow-y: auto; padding: 6px 8px 12px; }
.ask-h { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 12px 10px 4px; }
.ask-row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 12px; cursor: pointer; color: var(--ink); }
.ask-row.on { background: var(--accent-soft); }
.ask-row > svg:last-child { width: 18px; height: 18px; color: var(--faint); }
.ask-row .tile { width: 32px; height: 32px; border-radius: 9px; }
.ask-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ask-t b { font-weight: 600; font-size: 15.5px; }
.ask-t small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-none { padding: 30px 16px; text-align: center; color: var(--muted); }
.ask-none b { color: var(--ink); }
.ask-answer { padding: 8px 12px 6px; }
.ask-back { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 15px; cursor: pointer; padding: 4px 0; margin-bottom: 8px; }
.ask-back svg { width: 20px; height: 20px; }
.ask-answer h2 { font: 700 24px var(--head); letter-spacing: -0.02em; margin-bottom: 14px; }
.ask-steps { list-style: none; counter-reset: step; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ask-steps li { counter-increment: step; display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.45; }
.ask-steps li::before { content: counter(step); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; margin-top: -2px; }
.ask-tip { background: var(--amber-bg); color: #7A3C00; padding: 10px 14px; border-radius: 12px; font-size: 14.5px; margin: 0 0 16px; }
.ask-answer .btns .btn { min-height: 46px; padding: 0 20px; }

/* ---------- small screens: phone layout with a tab bar ---------- */
@media (max-width: 1000px) {
  .cols, .grid3, .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .pos { grid-template-columns: minmax(0, 1fr) 330px; gap: 12px; }
}
/* a tablet standing up (portrait) gets the phone-style menu, so the till has the whole width */
@media (max-width: 900px) {
  body { font-size: 16px; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(320px, 86vw); z-index: 50; transform: translateX(-104%); transition: transform .35s var(--ease); height: 100%; background: rgba(248, 248, 250, .97); }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .3), var(--shadow-lg); }
  .mobilebar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: rgba(242, 242, 247, .85);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line2); position: sticky; top: 0; z-index: 20; }
  .mobilebar .mark, .mobilebar img { width: 32px; height: 32px; border-radius: 9px; font-size: 15px; object-fit: contain; background-color: #fff; }
  .mobilebar b { font-weight: 650; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobilebar .icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--fill); display: grid; place-items: center; color: var(--accent); cursor: pointer; }
  .mobilebar .icon-btn svg { width: 20px; height: 20px; stroke-width: 2.2; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(249, 249, 251, .9); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--line); padding: 6px 4px max(8px, env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--grey); text-decoration: none !important; font-size: 10.5px; font-weight: 600;
    border: 0; background: none; cursor: pointer; padding: 2px 0; min-width: 0; }
  .tabbar svg { width: 26px; height: 26px; stroke-width: 1.9; }
  .tabbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tabbar .on { color: var(--accent); }
  .main { padding: 18px 16px 110px; }
  .top { margin-bottom: 16px; }
  h1 { font-size: 30px; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpi .v { font-size: 19px; overflow-wrap: anywhere; }
  .stat-card { align-content: start; }
  .today { gap: 10px; } .today .panel { padding: 14px; }
  .stat-card { grid-template-columns: 1fr; } .stat-card .tile { width: 34px; height: 34px; border-radius: 10px; margin-bottom: 8px; grid-row: auto; } .stat-card .tile svg { width: 19px; height: 19px; }
  .stat-card .stat-l + .stat-l { grid-column: 1; }
  .stat { font-size: 30px; } .stat-l { font-size: 13px; }
  .panel { padding: 16px; border-radius: 16px; }
  .f.s6, .f.s4, .f.s3, .f.s8, .f.s2 { grid-column: span 12; }
  .f.s3.keep, .f.s4.keep { grid-column: span 6; }
  .tape { --room: 96px; --day: 42px; }
  .dl { grid-template-columns: 1fr; } .dl dt { border-bottom: 0; padding-bottom: 0; font-size: 13px; } .dl dd { padding-top: 2px; }
  .totals { min-width: 0; width: 100%; }
  .btn { min-height: 44px; }
  .btn.sm { min-height: 36px; }
  dialog:not(.ask) { width: 100vw; max-width: 100vw; max-height: 94vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  dialog:not(.ask)[open] { animation: sheet .38s var(--ease); }
  dialog:not(.ask) .dlg-h::before { content: ''; position: absolute; top: 6px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: rgba(60, 60, 67, .25); }
  .dlg-f { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .dlg-f .btn { flex: 1; }
  dialog.ask { margin-top: 12px; max-height: calc(100vh - 24px); }
  .toasts { bottom: 96px; }
  .filters input[type=search] { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, dialog[open] { transition: none !important; animation: none !important; } }
@media print { .side, .top .btns, .filters, .tabbar, .mobilebar { display: none !important; } .shell { display: block; } body { background: #fff; } .panel { box-shadow: none; } }
@media (max-width: 760px) { .ask-btn kbd { display: none; } }
.rooms { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.room .acts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.room .acts .btn { padding: 0 8px; min-width: 0; white-space: normal; line-height: 1.2; font-size: 13.5px; }

/* ---------- till & stock reports ---------- */
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 12px; align-items: center; font-size: 14.5px; }
.hbar .hl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .ht { height: 10px; background: var(--fill2); border-radius: 6px; overflow: hidden; }
.hbar .ht i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.hbar .hv { font-weight: 600; font-variant-numeric: tabular-nums; }
.sheet-rule { background: var(--soft); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: 15px; }
.in { color: var(--green-ink); } .out { color: var(--red-ink); }
.count-sheet .grp-row td { background: var(--soft); font-weight: 650; font-size: 13px; color: var(--muted); padding: 8px 10px; }
.count-sheet.hide-sys .sys { display: none; }
.count-sheet .count-in { width: 120px; min-height: 38px; text-align: right; }
@media print {
  .tabs, .filters .seg, .btns, .help, .count-help, .practice-banner, .toasts { display: none !important; }
  .main { padding: 0; max-width: none; } .panel { padding: 8px 0; border-radius: 0; }
  .today { grid-template-columns: repeat(4, 1fr) !important; } .tile { display: none; }
  .count-sheet .count-in { border: 1px solid #999; background: #fff; }
  .tbl td, .tbl th { padding: 6px 6px; }
}
@media print { .help-btn, .panel .seg { display: none !important; } }
.linkish { border: 0; background: none; padding: 2px 6px; margin: -2px -6px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600; text-decoration: underline dotted; text-underline-offset: 3px; }
.linkish:hover { background: var(--red-bg); }
.sign-lines { display: none; }
@media print {
  .no-print { display: none !important; }
  .sign-lines { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 30px; margin-top: 40px; }
  .sign-lines div { border-top: 1px solid #000; padding-top: 4px; font-size: 12px; }
  .linkish { text-decoration: none; color: inherit; }
}

/* ---------- check-ins & check-outs ---------- */
.fd-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.fd-summary div { background: var(--surface); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow-sm); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fd-summary b { font: 700 32px/1 var(--head); letter-spacing: -0.02em; }
.fd-summary span { font-weight: 600; } .fd-summary small { color: var(--muted); margin-left: auto; }
.fd-cols { align-items: start; }
.fd-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.fd-head h2 { flex: 1; }
.fd-count { color: #fff; font-weight: 700; border-radius: 14px; min-width: 30px; height: 28px; padding: 0 9px; display: grid; place-items: center; font-size: 15px; }
.fd-list { display: flex; flex-direction: column; gap: 10px; }
.fd-card { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; background: var(--soft); }
.fd-card.done { opacity: .62; }
.fd-room { width: 62px; min-height: 58px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4px; }
.fd-room small { font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.fd-room b { font: 700 20px/1.1 var(--head); overflow-wrap: anywhere; }
.fd-main { min-width: 0; }
.fd-name { font-weight: 650; font-size: 16.5px; } .fd-name a { color: var(--ink); }
.fd-sub { color: var(--muted); font-size: 13.5px; margin-top: 1px; }
.fd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fd-tags:empty { display: none; }
.fd-tags span { font-size: 12.5px; font-weight: 600; border-radius: 20px; padding: 2px 10px; }
.fd-owes { background: var(--red-bg); color: var(--red-ink); } .fd-paid { background: var(--green-bg); color: var(--green-ink); }
.fd-online { background: var(--blue-bg); color: var(--blue-ink); } .fd-warn { background: var(--amber-bg); color: var(--amber); }
.fd-note { font-size: 13.5px; color: var(--ink2); margin-top: 6px; white-space: pre-line; }
.fd-tags .fd-note { background: var(--grey-bg); color: var(--ink2); margin: 0; font-weight: 500; }
.fd-act { display: flex; justify-content: flex-end; }
@media (max-width: 760px) {
  .fd-summary div { padding: 12px; flex-direction: column; gap: 2px; } .fd-summary b { font-size: 26px; } .fd-summary small { margin: 0; }
  .fd-card { grid-template-columns: auto 1fr; } .fd-act { grid-column: 1 / -1; } .fd-act .btn { width: 100%; }
}
@media print { .fd-card { break-inside: avoid; background: #fff; border: 1px solid #ccc; } .fd-act .btn { display: none; } .fd-cols { grid-template-columns: 1fr 1fr !important; } }
.host-notice { padding: 10px 22px; font-size: 14.5px; font-weight: 500; background: var(--blue-bg); color: #0B4A99; border-bottom: 1px solid rgba(0, 0, 0, .05); }
.host-notice.warn { background: var(--red-bg); color: #8A1014; }
.switch-list { display: flex; flex-direction: column; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 4px; border-bottom: 1px solid var(--line2); cursor: pointer; }
.switch-row:last-child { border-bottom: 0; }
.switch-row span { display: flex; flex-direction: column; } .switch-row small { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.switch-row.off { opacity: .45; }
/* iPhone-style switch */
.switch-row input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 16px; background: #E9E9EA; position: relative; flex: none; cursor: pointer; transition: background-color .2s; margin: 0; }
.switch-row input[type=checkbox]::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.switch-row input[type=checkbox]:checked { background: var(--green); }
.switch-row input[type=checkbox]:checked::after { transform: translateX(20px); }
.toast .btn { background: rgba(255, 255, 255, .16); color: #fff; } .toast .btn:hover { background: rgba(255, 255, 255, .26); }
.fd-car { background: var(--indigo-bg, #EEEEFB); color: var(--indigo); }
.car-box { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--fill); }
.cars-owed { color: var(--red, #FF3B30); font-weight: 700; }
.split-parts { display: flex; flex-direction: column; gap: 8px; }
.split-row { display: grid; grid-template-columns: 22px 110px 1fr 28px; gap: 8px; align-items: center; }
.split-row .seg { overflow-x: auto; }
.split-left { font-weight: 700; color: var(--red-ink, #c00); } .split-left.ok { color: var(--green-ink); }
@media (max-width: 560px) { .split-row { grid-template-columns: 22px 1fr 28px; } .split-row .seg { grid-column: 1 / -1; } }
/* till tablet sign-in */
.login.till .card { width: min(640px, 100%); }
.till-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 20px; }
.till-name { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; border: 0; border-radius: 18px; background: rgba(118, 118, 128, .1); cursor: pointer; font: inherit; color: var(--ink); }
.till-name:active { transform: scale(.97); } .till-name small { color: var(--muted); font-size: 12.5px; }
.till-name .avatar, .pin-who .avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 20px; }
.pin { display: flex; flex-direction: column; align-items: center; margin-top: 16px; }
.pin-who { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 18px; }
.pin-dots { display: flex; gap: 14px; margin: 16px 0 18px; } .pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink2); }
.pin-dots i.on { background: var(--ink); border-color: var(--ink); }
.pin-dots.shake { animation: shake .35s; } @keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pin-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; margin-bottom: 14px; }
.pin-key { width: 76px; height: 76px; border-radius: 50%; border: 0; background: rgba(118, 118, 128, .14); font: 500 28px/1 var(--head, inherit); color: var(--ink); cursor: pointer; }
.pin-key:active { background: rgba(118, 118, 128, .3); } .pin-key.ok { background: var(--accent); color: #fff; } .pin-key.del { background: none; font-size: 24px; }
/* ---------- floor plan ---------- */
.floor-wrap { padding: 14px; }
.floor { position: relative; width: 100%; border-radius: 14px; background-color: var(--fill);
  background-image: radial-gradient(circle, rgba(0,0,0,.1) 1px, transparent 1.5px); background-size: calc(100% / var(--cols, 12)) calc(100% / var(--rows, 7)); }
.ftable { position: absolute; padding: 4px; margin: 0; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 14px; font: inherit; color: var(--ink); background: #fff; box-shadow: 0 0 0 2px var(--line), var(--shadow-sm); overflow: hidden; transition: transform .1s; }
.ftable:active { transform: scale(.96); }
.ftable.round { border-radius: 50%; } .ftable.long { border-radius: 10px; }
.ftable b { font: 700 clamp(14px, 2.2vw, 22px)/1.1 var(--head); }
.ftable .ft-amt { font-weight: 700; font-size: clamp(11px, 1.3vw, 14px); }
.ftable .ft-sub, .ftable .ft-amt { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftable .ft-sub { font-size: clamp(10px, 1.1vw, 12px); color: var(--muted); }
@media (max-width: 900px) { .floor-wrap { padding: 8px; } .ftable { padding: 2px; } .ftable.busy .ft-sub, .ftable .ft-word { display: none; } }
.ftable .ft-flag { font-size: 11px; font-weight: 700; background: var(--green); color: #fff; border-radius: 20px; padding: 1px 8px; margin-top: 2px; }
.ftable .ft-flag.bill { background: var(--blue); }
.ftable.busy { background: #FFF4E0; box-shadow: 0 0 0 2px var(--orange), var(--shadow-sm); }
.ftable.billed { background: #E6F0FF; box-shadow: 0 0 0 2px var(--blue), var(--shadow-sm); }
.ftable.ready { background: #E4F7E8; box-shadow: 0 0 0 3px var(--green), var(--shadow-sm); animation: readyPulse 1.4s infinite; }
@keyframes readyPulse { 50% { box-shadow: 0 0 0 7px rgba(52, 199, 89, .35), var(--shadow-sm); } }
.floor-key { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.floor-key i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; margin-left: 8px; box-shadow: 0 0 0 2px var(--line); background: #fff; }
.floor-key i.busy { background: #FFF4E0; box-shadow: 0 0 0 2px var(--orange); } .floor-key i.billed { background: #E6F0FF; box-shadow: 0 0 0 2px var(--blue); }
.floor-key i.ready { background: #E4F7E8; box-shadow: 0 0 0 2px var(--green); }
.big-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 56px; padding-top: 10px; padding-bottom: 10px; height: auto; text-align: left; width: 100%; flex-wrap: wrap; }
.big-row span { font-weight: 500; }
.guest-pad, .table-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.guest-pad .btn, .table-pick .btn { min-height: 60px; font-size: 20px; font-weight: 700; }
.table-pick small { font-size: 11px; font-weight: 500; display: block; }
.opt-head { margin-bottom: 8px; }
.opt-list { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-btn { min-height: 48px; padding: 8px 16px; border-radius: 12px; border: 0; background: var(--fill); font: 600 15px var(--body, inherit); color: var(--ink); cursor: pointer; }
.opt-btn.on { background: var(--accent); color: #fff; } .opt-btn small { font-weight: 500; opacity: .8; }
.pos-line .mods { color: var(--accent); font-weight: 600; }
.pos-line.sent .nm b::after { content: ' ✓'; color: var(--green-ink); font-size: 12px; }
.pos-actions .btn.big[disabled] { opacity: .45; }
@media (max-width: 700px) { .guest-pad, .table-pick { grid-template-columns: repeat(3, 1fr); } }
/* floor plan editor */
.floor-edit .ftable { cursor: grab; touch-action: none; } .floor-edit .ftable.sel { box-shadow: 0 0 0 3px var(--accent), var(--shadow-sm); }
.floor-editor { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .floor-editor { grid-template-columns: 1fr; } }
.amount-in { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.amount-in label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink2); }
.qty-hint { font-weight: 700; color: var(--accent); font-size: 14px; }
.opt-group { padding: 12px; border-radius: 12px; background: var(--fill); display: flex; flex-direction: column; gap: 8px; }

/* till: the bill panel always fits the screen, so Pay and Send are never hidden below */
@media (min-width: 701px) {
  .pos-right { display: flex; flex-direction: column; max-height: calc(100vh - 36px); }
  .pos-right .pos-lines { flex: 1 1 auto; overflow-y: auto; min-height: 90px; }
}
@media (max-width: 700px) { .pos { grid-template-columns: 1fr; } .pos-right { position: static; } }
.split-sum { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line2); }
.stat-card .stat-v { font-size: clamp(20px, 2.2vw, 28px); min-width: 0; white-space: nowrap; line-height: 1.15; }
.stats-stack .stat-card { grid-template-columns: 1fr; } .stats-stack .stat-card .tile { grid-row: auto; width: 38px; height: 38px; border-radius: 11px; margin-bottom: 8px; }
.stats-stack .stat-card .stat-l + .stat-l { grid-column: 1; }
.big-row > span:first-child { text-align: left; }
@media (max-width: 900px) and (min-width: 701px) { .pos-right { top: 70px; max-height: calc(100vh - 170px); } }

/* the PIN pad fits a tablet lying down */
@media (max-height: 860px) {
  .pin-key { width: 62px; height: 62px; font-size: 24px; } .pin-pad { grid-template-columns: repeat(3, 62px); gap: 10px; margin-bottom: 8px; }
  .pin-dots { margin: 10px 0 12px; } .pin-who .avatar { width: 44px; height: 44px; font-size: 17px; } .login.till .card { padding-top: 18px; padding-bottom: 18px; }
  .login.till .logo, .login.till .mark { width: 44px; height: 44px; }
}
/* tables on smaller tablets: show the essentials only */
@media (max-width: 1100px) { .ftable.busy .ft-sub, .ftable .ft-word { display: none; } }

/* standing tablet: room names on the calendar stay readable */
@media (min-width: 701px) and (max-width: 900px) { .tape { --room: 132px; } }
/* phones: money never breaks in the middle */
@media (max-width: 900px) {
  .kpi .v { white-space: nowrap; overflow-wrap: normal; font-size: clamp(15px, 4.4vw, 19px); }
  .stat, .stat-card .stat-v { white-space: nowrap; font-size: clamp(20px, 6.4vw, 30px); }
}
