:root {
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: 14px;
  color-scheme: light;
  --bg: #f5f4f7;
  --surface: #fff;
  --soft: #eeeaf5;
  --ink: #242131;
  --muted: #6b657b;
  --line: #e5e1ec;
  --accent: #6c47ce;
  --on-accent: #fff;
  --green: #197656;
  --green-bg: #eaf5ef;
  --amber: #89600b;
  --amber-bg: #fcf3da;
  --red: #b3394f;
  --shadow: 0 16px 60px #28203514;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
body[data-theme="theme-cyber"] {
  color-scheme: dark;
  --bg: #14131a;
  --surface: #1d1b26;
  --soft: #292438;
  --ink: #f0ecfa;
  --muted: #b4adc7;
  --line: #363040;
  --accent: #ad92ff;
  --on-accent: #1b1039;
  --green: #8edbb3;
  --green-bg: #20382d;
  --amber: #eaca7d;
  --amber-bg: #403721;
  --red: #ffa5b5;
  --shadow: 0 16px 60px #0003;
}
body[data-theme="theme-gold"] {
  --bg: #f4f0e6;
  --surface: #fffcf5;
  --soft: #eee5d2;
  --accent: #80602b;
  --on-accent: #fff;
  --ink: #322d23;
  --muted: #776c58;
  --line: #e1d6bf;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
img {
  max-width: 100%;
  object-fit: cover;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(28px, 3.8vw, 48px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -1.4px;
}
h2 {
  font-size: 26px;
  letter-spacing: -0.8px;
  line-height: 1.35;
}
h3 {
  font-size: 17px;
  line-height: 1.45;
}
p {
  color: var(--muted);
}
small,
.muted {
  color: var(--muted);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
button,
input,
select,
textarea {
  border-radius: 9px;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  min-height: 44px;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}
label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}
label.check {
  display: flex;
  align-items: center;
  font-size: 13px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  border-radius: 9px;
  line-height: 1.4;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn.danger {
  color: var(--red);
}
.btn.plain {
  background: transparent;
  border-color: transparent;
}
.btn.small {
  padding: 8px 12px;
  font-size: 12px;
  min-height: 38px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  background: var(--soft);
  color: var(--ink);
  border: 0;
  font-size: 25px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 18px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.span2 {
  grid-column: 1/-1;
}
.wrap {
  max-width: 1240px;
  margin: auto;
  padding-left: 40px;
  padding-right: 40px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -1px;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
}
.brand-small {
  display: block;
  letter-spacing: 2px;
  font-size: 9px;
  margin-top: 6px;
  font-weight: 500;
}
.public-nav {
  height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.public-nav nav {
  display: flex;
  align-items: center;
  gap: 27px;
  font-size: 13px;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
  padding-top: 42px;
  padding-bottom: 70px;
}
.hero h1 {
  font-size: clamp(36px, 4.5vw, 62px);
  line-height: 1.15;
  letter-spacing: -2.4px;
  max-width: 570px;
}
.hero p {
  max-width: 440px;
  font-size: 15px;
  line-height: 1.9;
}
.hero-image {
  position: relative;
  aspect-ratio: 1.08;
}
.hero-image img {
  width: 100%;
  height: 100%;
  border-radius: 18px 18px 90px 18px;
  filter: brightness(0.84);
}
.hero-caption {
  position: absolute;
  left: 26px;
  bottom: 25px;
  color: white;
  font-size: 12px;
  border-left: 2px solid #d3b9ff;
  padding-left: 14px;
  max-width: 70%;
}
.hero-note {
  display: flex;
  gap: 22px;
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 20px;
  font-size: 11px;
  color: var(--muted);
}
.hero-note strong {
  display: block;
  font-size: 17px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 3px;
}
.section {
  padding-top: 55px;
  padding-bottom: 60px;
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 25px;
  margin-bottom: 30px;
}
.section-head h2 {
  font-size: 33px;
  margin-bottom: 5px;
}
.filters {
  padding: 19px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 14px;
  align-items: end;
  margin-bottom: 28px;
}
.filters label {
  flex: 1;
}
.room-public {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.room-public img {
  width: 100%;
  height: 205px;
}
.room-public .content {
  padding: 22px;
  display: flex;
  flex: 1;
  flex-direction: column;
}
.room-public h3 {
  font-size: 20px;
  margin: 10px 0;
}
.room-public p {
  font-size: 12px;
  line-height: 1.8;
  flex: 1;
}
.room-public .price {
  font-size: 19px;
  font-weight: 700;
}
.room-public .price small {
  font-size: 11px;
  font-weight: 400;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 600;
  padding: 6px 9px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--accent);
}
:root {
  --status-live: #1756a9; --status-live-bg: #e8f1ff;
  --status-confirmed: #7040a5; --status-confirmed-bg: #f1e8fc;
  --status-paused: #99420b; --status-paused-bg: #fff0e4;
  --status-completed: #086c72; --status-completed-bg: #e0f5f4;
  --status-cancelled-bg: #fce8ed;
}
body[data-theme="theme-cyber"] {
  --status-live: #a5caff; --status-live-bg: #203452;
  --status-confirmed: #d5b1ff; --status-confirmed-bg: #39264e;
  --status-paused: #ffc398; --status-paused-bg: #4a2c18;
  --status-completed: #8fe4df; --status-completed-bg: #173b3c;
  --status-cancelled-bg: #462631;
}
.pill.active { background: var(--status-live-bg); color: var(--status-live); }
.pill.paid { background: var(--green-bg); color: var(--green); }
.pill.completed { background: var(--status-completed-bg); color: var(--status-completed); }
.pill.pending { background: var(--amber-bg); color: var(--amber); }
.pill.paused { background: var(--status-paused-bg); color: var(--status-paused); }
.pill.unpaid { background: var(--status-confirmed-bg); color: var(--status-confirmed); }
.pill.cancelled { background: var(--status-cancelled-bg); color: var(--red); }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.step {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.step b {
  display: block;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 25px;
}
.step p {
  font-size: 13px;
}
.branch-row {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  align-items: center;
  gap: 25px;
}
.branch-row h3,
.branch-row p {
  margin: 0;
}
.public-footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-photo {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  min-height: 480px;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(0deg, #15101dea, #15101d33),
    url("../images/studio_vip_room.webp") center/cover;
  color: #fff;
}
.auth-photo p {
  color: #dad2e6;
  max-width: 380px;
}
.auth-photo h1 {
  max-width: 500px;
}
.auth-form {
  padding: 40px;
  display: grid;
  align-content: center;
  max-width: 520px;
  width: 100%;
  margin: auto;
  gap: 24px;
}
.auth-form form {
  display: grid;
  gap: 17px;
}
.form-error {
  color: var(--red);
  font-size: 13px;
  white-space: pre-line;
}
.demo-note {
  font-size: 12px;
  background: var(--soft);
  padding: 12px 16px;
  border-radius: 8px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 228px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 30px 18px;
  z-index: 20;
}
.sidebar .brand {
  padding: 0 12px 28px;
}
.nav-label {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: var(--muted);
  padding: 20px 14px 8px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  border: 0;
  background: none;
  color: var(--muted);
  text-align: left;
  border-radius: 9px;
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  min-height: 44px;
}
.nav-item.selected {
  background: var(--soft);
  color: var(--accent);
}
.nav-num {
  opacity: 0.65;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.sidebar-bottom strong {
  font-size: 12px;
  display: block;
}
.sidebar-bottom small {
  font-size: 10px;
}
.workspace {
  margin-left: 228px;
}
.app-top {
  height: 79px;
  padding: 0 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  gap: 15px;
}
.app-top p {
  margin: 0;
  font-size: 12px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-actions select {
  width: 130px;
  font-size: 12px;
}
.main-content {
  max-width: 1600px;
  margin: auto;
  padding: 32px 35px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 26px;
}
.page-heading h1 {
  font-size: 28px;
  margin: 0 0 5px;
  letter-spacing: -0.9px;
}
.page-heading p {
  font-size: 12px;
  margin: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0 0 24px;
}
.stat {
  padding: 19px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.stat small {
  font-size: 11px;
}
.stat strong {
  display: block;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 7px 0 0;
}
.stat em {
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.toolbar input {
  max-width: 240px;
}
.toolbar select {
  max-width: 220px;
}
.segments {
  display: flex;
  background: var(--surface);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.segments button {
  padding: 8px 13px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 11px;
}
.segments button.selected {
  background: var(--soft);
  color: var(--accent);
}
.floor-label {
  font-size: 12px;
  font-weight: 600;
  margin: 26px 0 14px;
  display: flex;
  gap: 10px;
  color: var(--muted);
}
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px;
}
.room-tile {
  text-align: left;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 19px;
  min-height: 207px;
  display: flex;
  flex-direction: column;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.room-tile:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.room-tile h3 {
  font-size: 19px;
  margin: 18px 0 3px;
}
.room-tile small {
  font-size: 11px;
}
.room-tile .tile-footer {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.room-tile.running {
  border-top: 3px solid var(--status-live);
  padding-top: 17px;
}
.room-tile.running.paused {
  border-top-color: var(--status-paused);
}
.room-tile.reserved {
  border-top: 3px solid var(--amber);
  padding-top: 17px;
}
.room-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.room-grid.compact .room-tile {
  min-height: 155px;
}
.room-grid.compact .room-tile h3 {
  margin-top: 12px;
}
.empty {
  padding: 55px 25px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 10px;
  grid-column: 1/-1;
}
.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 12px;
}
th {
  text-align: left;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  background: var(--bg);
  padding: 14px 17px;
}
td {
  border-top: 1px solid var(--line);
  padding: 15px 17px;
}
td strong {
  display: block;
  font-size: 12px;
}
td small {
  display: block;
  font-size: 10px;
}
td .btn {
  min-height: 33px;
  font-size: 10px;
  padding: 7px 10px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  width: min(880px, calc(100% - 28px));
  max-height: 90dvh;
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #100b20a8;
  backdrop-filter: blur(4px);
}
dialog[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
[hidden] { display: none !important; }
.dialog-head { flex-shrink: 0; }
#dialogBody {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-bottom: 90px;
}
#dialogBody .menu-list { max-height: none; overflow: visible; }
#dialogBody .form-actions {
  position: sticky;
  bottom: -25px;
  background: var(--surface);
  padding: 14px 0;
  border-top: 1px solid var(--line);
  z-index: 1;
  flex-wrap: wrap;
}
.cart-total { text-align: right; font-weight: 600; color: var(--ink); }
.field-help { font-size: 12px; margin: 0; color: var(--muted); }
.dialog-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 25px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  z-index: 2;
  gap: 16px;
}
.dialog-head h2 {
  font-size: 19px;
  margin: 0;
}
#dialogBody {
  padding: 25px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.notice {
  padding: 14px 16px;
  border-radius: 9px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.bill-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 25px;
}
.bill-summary {
  background: var(--bg);
  padding: 21px;
  border-radius: 10px;
}
.bill-line {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 12px;
  margin: 11px 0;
}
.bill-total {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
}
.bill-total strong {
  font-size: 25px;
  letter-spacing: -1px;
}
.qr {
  background: white;
  border-radius: 8px;
  max-width: 200px;
  display: block;
  margin: 18px auto;
}
.menu-list {
  display: grid;
  gap: 0;
  max-height: 310px;
  overflow: auto;
}
.menu-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  gap: 16px;
  font-size: 12px;
}
.menu-line input {
  width: 70px;
  min-height: 37px;
  padding: 7px;
}
.menu-line small {
  display: block;
}
.timer {
  font-variant-numeric: tabular-nums;
  font-size: 32px;
  letter-spacing: -1px;
}
.chart {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 180px;
  padding-top: 20px;
}
.chart-col {
  flex: 1;
  text-align: center;
  min-width: 0;
  font-size: 10px;
  color: var(--muted);
}
.chart-bar {
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  margin: 5px auto;
  width: 70%;
  opacity: 0.75;
}
.chart-col small {
  font-size: 9px;
  display: block;
}
.loading {
  padding: 55px;
  text-align: center;
  color: var(--muted);
}
.loading:before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 15px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  max-width: calc(100% - 30px);
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
#toast:not(:empty) {
  padding: 14px 23px;
  border: 1px solid var(--line);
}
.skip {
  position: absolute;
  top: -70px;
  left: 20px;
  z-index: 200;
  background: var(--surface);
  padding: 12px;
}
.skip:focus {
  top: 10px;
}
.mobile-menu {
  display: none;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}
.tablet {
  max-width: 1120px;
  margin: auto;
  padding: 30px;
}
.tablet-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.menu-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.menu-card h3 {
  margin-bottom: 8px;
}
.cart-bar {
  position: sticky;
  bottom: 20px;
  padding: 18px 22px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 12px;
  margin-top: 25px;
  box-shadow: var(--shadow);
}
.receipt {
  max-width: 440px;
  margin: auto;
}
.receipt .bill-line {
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}
.detail-photo {
  width: 100%;
  aspect-ratio: 1.4;
  border-radius: 15px;
}
.link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1500px) {
  .hero {
    gap: 90px;
  }
  .room-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 195px;
    padding: 25px 12px;
  }
  .workspace {
    margin-left: 195px;
  }
  .main-content {
    padding: 26px 22px;
  }
  .app-top {
    padding: 0 22px;
  }
  .hero {
    gap: 30px;
  }
  .grid3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats {
    gap: 9px;
  }
  .stat {
    padding: 15px;
  }
  .stat strong {
    font-size: 25px;
  }
}
@media (max-width: 760px) {
  .wrap {
    padding-left: 22px;
    padding-right: 22px;
  }
  .public-nav {
    height: 80px;
  }
  .public-nav nav {
    gap: 12px;
    font-size: 11px;
  }
  .public-nav nav > a[href$="#branches"] {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 25px;
    gap: 30px;
    padding-bottom: 40px;
  }
  .hero h1 {
    font-size: 42px;
    letter-spacing: -1.5px;
  }
  .hero-image {
    aspect-ratio: 1.55;
  }
  .hero-note {
    margin-top: 24px;
  }
  .section {
    padding-top: 35px;
    padding-bottom: 35px;
  }
  .section-head {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }
  .section-head h2 {
    font-size: 27px;
  }
  .filters {
    flex-wrap: wrap;
    padding: 15px;
  }
  .filters label {
    flex-basis: 40%;
  }
  .filters .btn {
    width: 100%;
  }
  .grid3 {
    gap: 14px;
  }
  .room-public img {
    height: 165px;
  }
  .room-public .content {
    padding: 17px;
  }
  .room-public h3 {
    font-size: 17px;
  }
  .room-public .row {
    gap: 9px;
  }
  .room-public .price {
    font-size: 17px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .step b {
    margin-bottom: 12px;
  }
  .branch-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .branch-row .btn {
    justify-self: start;
  }
  .sidebar {
    transform: translateX(-100%);
    width: 235px;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .workspace {
    margin-left: 0;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .app-top {
    height: 68px;
    padding: 0 16px;
  }
  .app-top p {
    display: none;
  }
  .top-actions {
    margin-left: auto;
  }
  .top-actions select {
    width: 98px;
  }
  .top-actions .btn {
    font-size: 10px;
    padding: 8px;
  }
  .main-content {
    padding: 23px 16px;
  }
  .page-heading {
    align-items: start;
    gap: 12px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading .btn {
    font-size: 11px;
    padding: 10px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .toolbar {
    gap: 9px;
  }
  .toolbar select,
  .toolbar input {
    max-width: none;
    flex: 1;
    min-width: 125px;
  }
  .segments {
    width: 100%;
    overflow: auto;
  }
  .segments button {
    flex: 1;
    white-space: nowrap;
  }
  .room-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .room-tile {
    padding: 14px;
    min-height: 184px;
  }
  .room-tile.running,
  .room-tile.reserved {
    padding-top: 12px;
  }
  .room-tile h3 {
    font-size: 17px;
  }
  .room-tile .tile-footer {
    font-size: 10px;
    flex-wrap: wrap;
    gap: 5px;
  }
  .room-tile .pill {
    font-size: 9px;
    padding: 5px;
  }
  .bill-layout,
  .grid2 {
    grid-template-columns: 1fr;
  }
  .form-grid {
    gap: 14px;
  }
  .dialog-head {
    padding: 17px;
  }
  .dialog-head h2 {
    font-size: 17px;
  }
  #dialogBody {
    padding: 17px;
  }
  #dialogBody .form-actions { bottom: -17px; }
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-photo {
    display: none;
  }
  .auth-form {
    padding: 30px 24px;
    min-height: 100dvh;
  }
  .tablet {
    padding: 20px 16px;
  }
  .tablet-menu {
    grid-template-columns: repeat(2, 1fr);
  }
  .menu-card {
    padding: 15px;
  }
  .chart {
    overflow: auto;
  }
  .chart-col {
    min-width: 38px;
  }
}
@media (max-width: 420px) {
  .grid3 {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 38px;
  }
  .hero-note {
    gap: 15px;
  }
  .public-nav .brand {
    font-size: 22px;
  }
  .public-nav nav {
    gap: 6px;
  }
  .room-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  .sidebar,
  .workspace,
  .public-nav,
  #toast,
  .dialog-head,
  .form-actions,
  .no-print {
    display: none !important;
  }
  dialog {
    position: static;
    display: block;
    border: 0;
    box-shadow: none;
    max-height: none;
    width: 100%;
    background: white;
    color: black;
  }
  dialog::backdrop {
    display: none;
  }
  #dialogBody {
    padding: 0;
  }
  .receipt {
    width: 80mm;
    max-width: 100%;
  }
  .receipt p,
  .receipt small {
    color: #333;
  }
}

@media print {
  dialog:not([open]),
  #confirmDialog {
    display: none !important;
  }
  .receipt {
    width: 72mm;
  }
  body {
    margin: 0;
  }
  @page {
    margin: 4mm;
  }
}
.brand,
.brand-small {
  white-space: nowrap;
}
.brand img {
  flex-shrink: 0;
}
.sidebar {
  overflow-y: auto;
}
.public-nav nav {
  min-width: 0;
}
.public-nav nav .btn {
  white-space: nowrap;
}
@media (max-width: 760px) {
  .sidebar {
    visibility: hidden;
  }
  .sidebar.open {
    visibility: visible;
  }
  .public-nav {
    gap: 12px;
  }
  .public-nav nav {
    gap: 5px;
  }
  .public-nav nav .btn {
    padding: 8px 7px;
    font-size: 11px;
  }
  .public-nav nav > a {
    white-space: nowrap;
  }
}
@media (max-width: 420px) {
  .public-nav nav > a[href$="#rooms"] {
    display: none;
  }
}
.menu-card {
  min-width: 0;
  overflow-wrap: anywhere;
}
.menu-card .pill {
  white-space: normal;
}
.tablet-menu {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .tablet-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .menu-card h3 {
    font-size: 15px;
  }
  .menu-card .pill {
    font-size: 9px;
  }
}

.auth-headline {
  font-size: clamp(32px, 3.8vw, 48px);
  line-height: 1.25;
  letter-spacing: -1.4px;
  max-width: 500px;
}

/* Selects retain native form/keyboard semantics; newer browsers also style the popup. */
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 42px !important;
  cursor: pointer;
  text-overflow: ellipsis;
  transition: border-color .15s, box-shadow .15s;
}
select:hover { border-color: var(--accent); }
select:focus-visible, select:open { border-color: var(--accent); box-shadow: 0 0 0 3px var(--soft); }
select:disabled { opacity: .55; cursor: not-allowed; }
select option { background: var(--surface); color: var(--ink); }
@supports (appearance: base-select) {
  select, select::picker(select) { appearance: base-select; }
  select { background-image: none; align-items: center; }
  select::picker-icon { color: var(--muted); transition: rotate .15s; margin-left: auto; }
  select:open::picker-icon { rotate: 180deg; }
  select::picker(select) { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 6px; margin-block: 6px; box-shadow: var(--shadow); max-height: min(330px, 55dvh); overflow-y: auto; }
  select option { padding: 11px 13px; border-radius: 8px; min-height: 43px; gap: 12px; white-space: normal; }
  select option:hover, select option:focus { background: var(--soft); color: var(--ink); }
  select option:checked { background: var(--soft); color: var(--accent); font-weight: 600; }
  select option::checkmark { order: 2; margin-left: auto; }
}
.theme-control { display: inline-flex; width: fit-content; flex-shrink: 0; align-items: center; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 100px; background: var(--surface); }
.theme-control button { min-height: 36px; padding: 6px 13px; border: 0; border-radius: 100px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; }
.theme-control button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.public-nav { gap: 20px; flex-wrap: wrap; }
.public-nav nav { margin-left: auto; }
.menu-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 9px; margin-bottom: 18px; background: var(--soft); }
.menu-thumb { width: 64px; height: 54px; border-radius: 8px; flex-shrink: 0; background: var(--soft); }
.manage-thumb { width: 54px; height: 46px; border-radius: 7px; vertical-align: middle; margin-right: 12px; }
.menu-line:has(.menu-thumb) { grid-template-columns: 64px minmax(0, 1fr) 70px; gap: 12px; }
.menu-line:has(.menu-thumb) > span { flex: 1; min-width: 0; }
.public-menu { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.public-menu article { min-width: 0; }
.public-menu .menu-photo { aspect-ratio: 4 / 3; }
.public-menu h3 { margin: 0; }
.public-menu .row { align-items: flex-start; }
.menu-caption { font-size: 12px; color: var(--muted); margin: 24px 0 0; }
.room-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.room-gallery img { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; }
.branch-photo { width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; margin-bottom: 20px; }
@media (max-width: 700px) {
  .public-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .public-menu h3 { font-size: 14px; }
  .public-menu .row { display: block; }
  .public-menu strong { display: block; margin-top: 7px; }
  .public-nav { gap: 14px; }
  .public-nav nav { width: 100%; order: 3; justify-content: space-between; margin: 0; }
  .public-nav > .theme-control { margin-left: auto; }
  .menu-thumb { width: 48px; height: 44px; }
  .menu-line:has(.menu-thumb) { grid-template-columns: 48px minmax(0, 1fr) 60px; gap: 8px; }
  .tablet > header { flex-wrap: wrap; }
}

.service-image-preview { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 16px; min-width: 0; }
.service-image-preview .menu-photo { margin: 0; }
@media print { .theme-control { display: none; } }

td:has(.manage-thumb) { min-width: 235px; }
td .manage-thumb + strong { display: inline-block; max-width: 220px; vertical-align: middle; }

@media (prefers-reduced-motion: reduce) { select, select::picker-icon { transition: none; } }

.demo-note summary { cursor: pointer; font-weight: 600; }
.demo-note > p { margin: 12px 0; }
.demo-accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.demo-account { display: grid; gap: 4px; padding: 12px; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-height: 70px; }
.demo-account:hover { border-color: var(--accent); }
.demo-account span { font-size: 11px; color: var(--muted); }

/* Shared form geometry and bounded checkout layout. */
.required-mark { color: var(--danger, #bb304b); display:inline; }
.toolbar, .align-fields { align-items: end; }
.toolbar > label { margin:0; }
.toolbar > input, .toolbar > select, .toolbar > button { min-height:44px; }
.bill-layout { align-items:start; }
.bill-layout > .stack { align-content:start; min-width:0; }
#dialogBody .menu-list { max-height:min(46dvh, 420px); overflow-y:auto; overscroll-behavior:contain; }
#checkoutButton { align-self:start; min-height:44px; height:auto; }
.qr { height:auto; object-fit:contain; }
@media(max-width:700px) {
  .toolbar { display:flex; flex-wrap:wrap; gap:12px; }
  .toolbar > label { flex:1 1 140px; }
  .toolbar > label input { width:100%; }
}

.category-photo { width:72px; height:72px; aspect-ratio:1; object-fit:cover; border-radius:10px; display:block; }
.category-strip { display:flex; gap:12px; overflow-x:auto; margin:16px 0; padding-bottom:8px; }
.category-strip > * { flex:0 0 auto; display:flex; align-items:center; gap:10px; }
.category-card { padding:8px; }
.stock-label { display:block; }

.menu-line:has(.quantity-control) { grid-template-columns:48px minmax(0,1fr) 132px; }
.quantity-control { display:flex; align-items:center; gap:3px; }
.quantity-control input { width:58px; min-width:0; padding:8px 3px; text-align:center; }
.quantity-control button { min-width:32px; padding:8px 5px; }
.quantity-error { grid-column:2 / -1; color:var(--danger,#bb304b); }
.menu-line[hidden] { display:none; }
.menu-tools { gap:8px; margin-bottom:12px; }
.menu-tools input,.menu-tools select { min-width:0; flex:1 1 130px; }
#bookingReminders { margin:12px 24px; }
#bookingReminders summary { cursor:pointer; font-weight:600; }
.checkout-summary { min-width:0; }
@media(min-width:1200px) {
  dialog:has(.checkout-summary) { width:min(1500px,96vw); max-width:1500px; }
  .bill-layout:has(.checkout-summary) { grid-template-columns:minmax(320px,1.2fr) minmax(240px,1fr) minmax(260px,1fr); }
  .checkout-summary { position:sticky; top:0; }
}
@media(min-width:701px) and (max-width:1199px) { .checkout-summary { grid-column:2; } }
.pricing-breakdown summary { cursor:pointer; font-size:12px; margin:8px 0; }
.pricing-breakdown[open] { max-height:200px; overflow:auto; }
@media(min-width:1200px) { .checkout-summary { max-height:75dvh; overflow:auto; } }
@media(max-width:480px) {
 .menu-line:has(.quantity-control) { grid-template-columns:40px minmax(0,1fr); }
 .quantity-control { grid-column:2; justify-self:start; }
}

.nav-item:hover:not(.selected) { outline:1px solid var(--line); outline-offset:-1px; }

.fnb-history { margin-top: 28px; }
.fnb-results > .toolbar { align-items: center; margin-top: 16px; }
