:root {
  --bg: #eadcc6;
  --paper: #fff8ed;
  --panel: #fffaf3;
  --ink: #17120f;
  --muted: #756556;
  --line: #dccab0;
  --brand: #8a6a56;
  --brand-dark: #5c4638;
  --green: #58766f;
  --danger: #b0372f;
  --warn: #b9872d;
  --ok: #3e7d5a;
  --nav: #142230;
  --shadow: 0 16px 40px rgba(79, 58, 38, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #efe3d0, #e4d2b8);
  font-family: Arial, Helvetica, sans-serif;
}

button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }

input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px 1fr;
}

.sidebar {
  background: var(--nav);
  color: #fff;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  font-weight: 800;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy .muted { font-size: 11px; color: rgba(255, 255, 255, 0.5); }

.mark {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #7b553a;
  background: #fff5e8;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 17px;
}

.mark-logo { object-fit: contain; padding: 4px; }

.mark-brand { background: transparent; padding: 0; overflow: hidden; }
.mark-brand svg { width: 100%; height: 100%; display: block; }

.nav { display: grid; gap: 4px; }

.nav-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}

.nav-link.active, .nav-link:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.nav-link-static:hover { background: transparent; }

.nav-icon {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
}

.nav-icon svg { width: 100%; height: 100%; }

.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-badge {
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.nav-group { display: grid; gap: 2px; }

.nav-subnav {
  display: grid;
  gap: 1px;
  padding: 2px 0 6px 38px;
}

.nav-sublink {
  width: 100%;
  padding: 7px 10px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.56);
  background: transparent;
  text-align: left;
  font-size: 13px;
}

.nav-sublink.active, .nav-sublink:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }

.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nav-push-enable {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 700;
}

.nav-push-enable:hover { background: rgba(255, 255, 255, 0.16); }

.sidebar-role {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

.nav-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 700;
}

.nav-logout:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.nav-logout svg { width: 15px; height: 15px; }

.content { padding: 18px 18px; }

.topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: 22px; }
h2 { font-size: 18px; margin-bottom: 10px; }
h3 { font-size: 15px; }
.muted, .hint { color: var(--muted); }
.hint { font-size: 13px; line-height: 1.5; }
.service-modal-desc { color: var(--muted); font-size: 15px; line-height: 1.55; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.panel, .guest-card, .modal-panel {
  background: rgba(255, 250, 243, 0.96);
  border: 1px solid rgba(207, 190, 166, 0.9);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(82, 61, 41, 0.06);
  padding: 14px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.panel-head h2 {
  margin-bottom: 4px;
}

.metric { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 54px; }
.metric span { color: var(--muted); }
.metric strong { font-size: 22px; }

.top-actions, .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  padding: 7px 9px;
  border-top: 1px solid rgba(220, 202, 176, 0.72);
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(245, 231, 210, 0.5);
}

.table .actions {
  gap: 6px;
  flex-wrap: nowrap;
}

.table .btn {
  white-space: nowrap;
}

.table td:first-child {
  min-width: 170px;
}

.table td:nth-child(4),
.table td:nth-child(5),
.table td:nth-child(6) {
  color: #433428;
  line-height: 1.25;
}

.owner-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.owner-metrics div {
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(220, 202, 176, 0.78);
  border-radius: 8px;
  background: rgba(255, 247, 234, 0.68);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.owner-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.owner-metrics strong {
  font-size: 20px;
}

.btn {
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
}

.btn.secondary {
  color: var(--ink);
  background: var(--paper, #fff7eb);
  border: 1px solid var(--line);
}

.btn.success { background: var(--ok); }
.btn.danger { background: var(--danger); }
.btn.wide { width: 100%; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #8a3f37;
  background: #f3d6d0;
}

.pill.ok { color: #2f6b4b; background: #d9efdf; }
.pill.warn { color: #805813; background: #f7e4bd; }
.pill.danger { color: #8a3f37; background: #f3d6d0; }
.danger-text { color: var(--danger); }

.empty, .compact-empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.compact-empty { padding: 8px; }
.list { display: grid; gap: 8px; }

.list-two-col { grid-template-columns: 1fr 1fr; margin-bottom: 10px; }
.list-two-col .row { flex-wrap: wrap; }
@media (max-width: 920px) {
  .list-two-col { grid-template-columns: 1fr; }
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 243, 0.7);
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}

.guest-card > .btn + .btn { margin-top: 10px; }

.row-main { display: grid; gap: 3px; }
.row-main strong { font-size: 14px; }
.row-main span { font-size: 13px; }
.form { display: grid; gap: 9px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 9px;
}

.field { display: grid; gap: 4px; }
.field label { color: var(--ink, #4c3a2e); font-size: 12px; font-weight: 800; }

.input, .select, .textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper, #fffaf2);
  padding: 7px 9px;
  color: var(--ink);
}

.textarea { min-height: 76px; resize: vertical; }
.textarea.compact { min-height: 42px; }
.compact-select { min-height: 34px; padding: 6px 8px; }

.integration-note {
  padding: 10px 12px;
  border: 1px solid rgba(88, 118, 111, 0.22);
  border-radius: 8px;
  background: rgba(88, 118, 111, 0.07);
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.integration-note strong {
  color: var(--ink);
}

.room-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.room-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.room-chip,
.editor-line {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 30px;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border: 1px solid rgba(220, 202, 176, 0.78);
  border-radius: 8px;
  background: rgba(255, 247, 234, 0.55);
}

.room-chip {
  max-width: 210px;
}

.editor-list {
  display: grid;
  gap: 6px;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 8px;
  overflow-x: auto;
}

.kanban-col {
  min-height: 126px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 247, 234, 0.62);
}

.kanban-col h3 {
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-size: 12px;
}

.task-card {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
}

.clickable-task { cursor: pointer; }
.chat-row-button { text-align: left; }

.unread-dot {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--danger);
  font-size: 11px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 18, 20, 0.48);
}

.modal-backdrop.hidden, .hidden { display: none !important; }

.modal-panel {
  width: min(760px, 100%);
  max-height: 86vh;
  overflow: auto;
}

.modal-head, .inline-chat-head, .bill-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.icon-action {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #f2e4d0;
}

.history-list, .message-list { display: grid; gap: 8px; }

.message-list {
  align-items: stretch;
}

.history-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.history-item > div, .history-meta { display: grid; gap: 5px; }

.message-bubble {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f1dfc6;
}

.message-bubble.admin { background: #dce9e2; }
.message-bubble small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }

.order-items-summary {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 250, 243, 0.7);
  display: grid;
  gap: 6px;
  margin-bottom: 4px;
}

.order-items-serve { font-weight: 900; color: var(--ink, #241a14); font-size: 0.88rem; }

.order-items-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.order-items-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
}
.order-items-list li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.order-items-note {
  font-size: 0.86rem;
  color: var(--muted);
  border-top: 1px dashed rgba(207, 190, 166, 0.9);
  padding-top: 6px;
}
.order-items-note b { color: var(--ink, #241a14); }

.guest-page {
  min-height: 100vh;
  padding: 0;
  display: flex;
  justify-content: center;
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--page-grad-a, rgba(239, 228, 211, 0.7)), var(--page-grad-b, rgba(239, 228, 211, 0.95))),
    radial-gradient(circle at top left, var(--page-radial, rgba(47, 95, 91, 0.16)), transparent 36%);
}

.phone-frame { width: min(420px, 100%); }
.guest-auth-page { padding: 24px 16px; }
.guest-title { text-align: center; margin-bottom: 24px; }
.guest-title h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-style: italic; }
.auth-card { overflow: hidden; border-radius: 22px; }

.guest-logo, .auth-hero .guest-logo {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--paper, #fff5e7);
  color: var(--brand-dark, #704d35);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  flex-shrink: 0;
}

img.guest-logo {
  object-fit: contain;
  background: #fff;
  padding: 6px;
}

.mini-phone {
  overflow: hidden;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--phone-grad-a, #fff9ef), var(--phone-grad-b, #f7eddd));
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  grid-template-rows: auto 1fr;
}

.mini-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--header-border, rgba(226, 213, 195, 0.8));
  background: var(--header-bg, rgba(255, 249, 239, 0.76));
}

.lang-switch {
  position: relative;
}

.lang-switch-current {
  display: flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: var(--muted, #756556);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 9px;
  border-radius: 8px;
  cursor: pointer;
}

.sidebar-footer .lang-switch-current {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 100%;
  justify-content: center;
}

.lang-switch-current .lang-caret { font-size: 9px; opacity: 0.7; margin-left: 1px; }

.lang-flag-icon {
  display: inline-flex;
  width: 19px;
  height: 13px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14);
  flex-shrink: 0;
}
.lang-flag-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.lang-switch-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 168px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  padding: 6px;
  z-index: 40;
}

.lang-switch-menu.hidden { display: none; }

.lang-switch-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: none;
  background: transparent;
  color: #2d271f;
  font-size: 13px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.lang-switch-option:hover { background: rgba(0, 0, 0, 0.05); }
.lang-switch-option.active { background: rgba(109, 151, 115, 0.14); font-weight: 600; }

.mini-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 17px;
  color: var(--ink, #35281f);
}

.mini-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 7px;
  background: #fff;
  flex-shrink: 0;
}

.mini-content { padding: 18px; }
.guest-home { display: grid; gap: 14px; }

.stay-summary {
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, var(--stay-grad-a, rgba(88, 118, 111, 0.16)), var(--stay-grad-b, rgba(255, 249, 239, 0.7))),
    var(--stay-base, #f8eddc);
  border: 1px solid var(--header-border, rgba(226, 213, 195, 0.9));
}

.eyebrow {
  display: inline-flex;
  color: var(--muted, #6a5545);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-hero-text { min-width: 0; }

.auth-hero-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.auth-hero-top .eyebrow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.auth-app-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a8927a;
}

.auth-hero h1 { margin-top: 14px; }

.stay-summary h1 {
  margin: 5px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1;
  font-weight: 400;
  font-style: italic;
}

.stay-summary p { margin: 0; color: var(--muted); line-height: 1.45; }
.stay-room-line { font-weight: 700; color: var(--ink, #2d271f) !important; margin-top: 2px !important; }
.stay-checkout-line { margin-top: 2px !important; }

.my-room-button {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(138, 106, 86, 0.42);
  background: rgba(255, 253, 247, 0.85);
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 13px;
}
.my-room-button .arrow { transition: transform 0.15s; }

.my-room-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 250, 243, 0.72);
  border: 1px solid rgba(226, 213, 195, 0.88);
}
.my-room-summary > div { display: grid; gap: 2px; }
.my-room-summary .muted { font-size: 11px; }

.my-room-info-block {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.6);
}
.my-room-info-block p { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.4; white-space: pre-wrap; }

.room-bill {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(226, 213, 195, 0.88);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 253, 247, 0.72);
}

.room-bill span { color: var(--muted); font-size: 12px; }
.room-bill strong, .bill-total { color: var(--ink, #2d271f); font-size: 18px; }
.room-bill.has-debt strong, .bill-total.has-debt { color: var(--danger); }

.room-bill-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 10px;
  flex: 1 1 auto;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.bill-details-hint {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-dark, #5c4638);
  vertical-align: middle;
}

.bill-items-details { margin-top: 4px; }
.bill-items-details summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-dark, #5c4638);
  list-style: none;
}
.bill-items-details summary::-webkit-details-marker { display: none; }
.bill-items-details summary::before { content: "▸ "; }
.bill-items-details[open] summary::before { content: "▾ "; }
.bill-items-details .bill-items-list { margin-top: 6px; }
.bill-items-details .bill-item-row { padding: 6px 8px; font-size: 12px; }

.bill-items-list { display: grid; gap: 8px; }
.bill-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 253, 247, 0.72);
  border: 1px solid rgba(226, 213, 195, 0.72);
}
.bill-item-row div { display: flex; flex-direction: column; gap: 2px; }
.bill-item-row .muted { font-size: 11.5px; }
.bill-item-amount { font-weight: 700; white-space: nowrap; color: var(--ink, #2d271f); }
.bill-item-row.is-credit .bill-item-amount { color: var(--brand-dark, #5c4638); }

.pay-online-button {
  flex-basis: 100%;
  margin-top: 10px;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: var(--brand-dark, #5c4638);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.pay-online-button:disabled { opacity: 0.6; cursor: default; }

.pay-reception-note {
  flex-basis: 100%;
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--muted, #756556);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 2px 10px;
  color: var(--ink, #5d4b3f);
  font-weight: 800;
}

.section-label small {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
}

.text-link {
  background: transparent;
  color: var(--green);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.category-menu, .service-grid, .guest-orders { display: grid; gap: 10px; }

.category-tile, .service-card, .guest-order {
  width: 100%;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--tile-border, rgba(207, 190, 166, 0.92));
  border-radius: 16px;
  background: var(--tile-bg, rgba(255, 253, 247, 0.78));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  text-align: left;
  box-shadow: 0 6px 16px rgba(81, 61, 43, 0.06);
}

.service-card { display: grid; grid-template-columns: 28px 1fr 34px; }
.category-tile span, .service-card strong, .guest-order strong { color: var(--ink, #241a14); font-weight: 900; }
.category-tile small, .service-card small { color: var(--muted); }
.guest-history-button {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px dashed var(--line, rgba(138, 106, 86, 0.42));
  border-radius: 14px;
  background: var(--tile-bg, rgba(255, 249, 239, 0.54));
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink, #5d4b3f);
  font-weight: 900;
}

.guest-history-button small {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--panel, #efe0cb);
  color: var(--muted);
}

.guest-history-list {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.muted-order {
  opacity: 0.86;
}
.svc-copy { display: grid; gap: 3px; }
.svc-icon { color: var(--green); }

.plus {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  font-size: 22px;
}

.chat-panel {
  margin-top: 6px;
  padding: 14px;
  border: 1px solid rgba(226, 213, 195, 0.82);
  border-radius: 18px;
  background: rgba(255, 249, 239, 0.62);
}

.bill-table-wrap {
  margin-top: 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.74);
}

.compact-details-panel {
  padding: 0;
  overflow: hidden;
}

.foldable-section summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 900;
}

.foldable-section summary::-webkit-details-marker {
  display: none;
}

.foldable-section summary::after {
  content: "+";
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 900;
}

.foldable-section[open] summary {
  border-bottom: 1px solid var(--line);
}

.foldable-section[open] summary::after {
  content: "−";
}

.foldable-section > .bill-table-wrap,
.foldable-section > .empty {
  margin: 12px;
}

.bill-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 13px;
}

.bill-table th,
.bill-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(220, 202, 176, 0.72);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.bill-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(245, 231, 210, 0.55);
}

.bill-table tr:last-child td {
  border-bottom: 0;
}

.bill-total {
  font-size: 14px;
}

.bill-adjust-form,
.compact-bill-form {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.compact-bill-form input[name="amount"] {
  flex: 0 0 82px;
}

.compact-bill-form input[name="reason"] {
  flex: 1 1 150px;
  min-width: 120px;
}

.compact-bill-form .btn {
  min-width: 34px;
  padding: 6px;
  flex: 0 0 auto;
}

.settle-bill-btn {
  flex: 1 1 100%;
  min-width: 100% !important;
  margin-top: 2px;
}

.editor-list, .services-editor, .rooms-editor, .service-editor-list, .room-info-list { display: grid; gap: 6px; }

.service-editor-card, .employee-editor-card {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 243, 0.72);
}

.employee-list {
  display: grid;
  gap: 6px;
}

.employee-editor-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 243, 0.72);
  position: relative;
}

.employee-editor-row .check-row {
  min-height: 34px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.employee-editor-row > [data-remove-employee],
.employee-editor-row > .hint,
.employee-editor-row > .permission-override-details {
  grid-column: 1 / -1;
}

.employee-editor-row > [data-remove-employee] {
  justify-self: end;
  width: 30px;
}

.permission-override-details summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.position-editor-row {
  display: block;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 243, 0.72);
  grid-template-columns: unset;
}

.position-editor-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.position-editor-head .input {
  flex: 1;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 14px;
}

.permission-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
}

.permission-check input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.service-editor-list {
  border: 1px solid rgba(220, 202, 176, 0.8);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 250, 243, 0.58);
}

.service-category-group {
  border: 1px solid rgba(220, 202, 176, 0.8);
  border-radius: 8px;
  background: rgba(255, 250, 243, 0.4);
  margin-bottom: 8px;
  overflow: hidden;
}

.service-category-group summary {
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 900;
  color: #241a14;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.service-category-group summary::-webkit-details-marker { display: none; }

.service-category-group summary::before {
  content: "▸";
  color: var(--muted);
  font-size: 0.8em;
}

.service-category-group[open] summary::before { content: "▾"; }

.service-category-group .service-editor-list {
  border: 0;
  border-top: 1px solid rgba(220, 202, 176, 0.8);
  border-radius: 0;
}

.service-editor-card {
  align-items: start;
  border: 0;
  border-bottom: 1px solid rgba(220, 202, 176, 0.7);
  border-radius: 0;
  background: transparent;
}

.service-editor-card:last-child {
  border-bottom: 0;
}

.service-editor-main {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) 108px 82px 124px 136px minmax(170px, 1fr);
  gap: 6px;
  align-items: end;
}

.editor-flags {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: -2px;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.compact-service-row .input,
.compact-service-row .select {
  min-height: 32px;
  padding: 6px 8px;
}

.compact-service-row .field label {
  font-size: 11px;
}

.compact-danger {
  min-height: 30px;
  padding: 5px 10px;
  margin-left: auto;
}

.room-chip-row { display: flex; gap: 8px; }
.room-input { max-width: 140px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { padding: 10px 14px; border-radius: 999px; background: #f5e7d2; }
.tabs button.active { color: #fff; background: var(--brand); }

.settings-subnav {
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  flex-wrap: nowrap;
}
.settings-subnav button { white-space: nowrap; }

.review-stars { font-size: 13px; letter-spacing: 1px; margin-left: 6px; }
.star-on { color: var(--warn); }
.star-off { color: var(--line); }

.review-picker { display: flex; gap: 6px; }
.review-star-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.7);
  font-size: 20px;
  color: var(--line);
}
.review-star-btn.on { color: var(--warn); border-color: var(--warn); background: rgba(185, 135, 45, 0.1); }

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand-dark);
}

.toast.danger { background: var(--danger); }

.input-reveal { position: relative; }
.input-reveal .input { padding-right: 40px; }
.input-reveal-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--muted, #6e6e73);
  cursor: pointer;
  border-radius: 8px;
}
.input-reveal-toggle:hover { background: rgba(0, 0, 0, 0.06); }
.input-reveal-toggle svg { width: 17px; height: 17px; }

.mobile-nav-toggle { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; position: relative; }

  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 60;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--nav);
    color: #fff;
    box-shadow: 0 6px 16px rgba(20, 34, 48, 0.35);
  }
  .mobile-nav-toggle svg { width: 20px; height: 20px; }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 26, 0.5);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .sidebar-backdrop.nav-open { opacity: 1; pointer-events: auto; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    max-width: 82vw;
    min-height: 100vh;
    overflow-y: auto;
    z-index: 58;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.25);
  }
  .sidebar.nav-open { transform: translateX(0); }

  .content { padding-top: 70px; }

  .grid, .form-grid { grid-template-columns: 1fr; }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-12 { grid-column: span 1; }
  .kanban { grid-template-columns: 1fr; }
  .service-editor-main { grid-template-columns: 1fr 1fr; }
  .employee-editor-row { grid-template-columns: 1fr 1fr; }

  .bill-table-wrap { overflow-x: visible; border: none; background: transparent; }
  .bill-table { min-width: 0; width: 100%; }
  .bill-table thead { display: none; }
  .bill-table, .bill-table tbody, .bill-table tr, .bill-table td { display: block; width: 100%; }
  .bill-table tr {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 250, 242, 0.74);
  }
  .bill-table tr:last-child { margin-bottom: 0; }
  .bill-table td {
    padding: 5px 0;
    border-bottom: none;
    white-space: normal;
  }
  .bill-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 2px;
  }
  .compact-bill-form input[name="amount"],
  .compact-bill-form input[name="reason"] {
    flex-basis: 100%;
  }
  .compact-bill-form .btn {
    flex: 1 1 0;
  }
}

@media (max-width: 560px) {
  .content { padding: 70px 12px 16px; }
  .service-editor-main { grid-template-columns: 1fr; }
  .employee-editor-row { grid-template-columns: 1fr; }
  .topline, .inline-chat-head, .bill-card-head { display: grid; }
}

.cart-service-card {
  display: block;
}
.cart-service-card.in-cart { border-color: var(--brand); background: rgba(255, 253, 247, 0.95); }

.cart-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.svc-thumb-lg {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 10px;
  border: 1px solid rgba(207, 190, 166, 0.9);
}

.cart-service-card .svc-desc {
  display: block;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.4;
  margin-top: 8px;
}

.svc-thumb {
  width: 100%;
  aspect-ratio: 1;
  max-width: 44px;
  max-height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(207, 190, 166, 0.9);
}

.service-image-field { grid-column: 1 / -1; }
.service-image-control {
  display: flex;
  align-items: center;
  gap: 10px;
}
.service-image-preview {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.service-image-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px dashed rgba(138, 106, 86, 0.42);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.service-image-file { max-width: 220px; font-size: 12px; }

.logo-upload-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.logo-preview {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  padding: 4px;
}
.logo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px dashed rgba(138, 106, 86, 0.42);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.theme-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 14px;
}
.theme-preset-swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.theme-preset-swatch:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
}
.theme-preset-swatch span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-custom-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.theme-color-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.theme-color-field input[type="color"] {
  width: 56px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: none;
  cursor: pointer;
}

.service-modal-image {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 14px;
}

.sos-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(176, 55, 47, 0.35);
  background: rgba(176, 55, 47, 0.09);
  text-align: left;
}
.sos-label {
  flex-shrink: 0;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--danger);
  background: rgba(176, 55, 47, 0.14);
  padding: 6px 12px;
  border-radius: 999px;
}
.sos-desc { color: #8a4038; font-size: 13px; font-weight: 700; }
.sos-submit { background: var(--danger); }
.sos-call {
  display: block;
  text-align: center;
  text-decoration: none;
}

.qty-stepper { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(138, 106, 86, 0.42);
  background: rgba(255, 249, 239, 0.7);
  font-weight: 900;
  color: var(--brand-dark);
}
.qty-btn.qty-add { padding: 0 14px; }
.qty-value { min-width: 18px; text-align: center; font-weight: 900; }

.guest-cart-bar {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 0;
  background: var(--brand-dark);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(81, 61, 43, 0.22);
}

.cart-items-list { display: grid; gap: 8px; }
.cart-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(207, 190, 166, 0.6);
}
.cart-line-title { font-weight: 700; }
.cart-line-price { color: var(--muted); font-variant-numeric: tabular-nums; }

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.category-editor-line {
  grid-template-columns: minmax(100px, 1fr) minmax(120px, auto) auto 30px;
}

@media (max-width: 560px) {
  .category-editor-line { grid-template-columns: 1fr; }
}

/* Apple-style admin surface — scoped to .app-shell only, guest mini-app keeps its own palette */
.app-shell {
  --bg: #EAF2EA;
  --panel: #ffffff;
  --ink: #0C3B2E;
  --muted: #5C7568;
  --line: #D3E3D6;
  --shadow: 0 1px 2px rgba(12, 59, 46, 0.06), 0 8px 24px rgba(12, 59, 46, 0.10);
  --brand: #6D9773;
  --brand-dark: #0C3B2E;
  --nav: #0C3B2E;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.app-shell .content { background: var(--bg); }

.app-shell h1 { font-weight: 700; letter-spacing: -0.01em; }
.app-shell h2 { font-weight: 700; letter-spacing: -0.005em; }
.app-shell h3 { font-weight: 700; }

.app-shell .panel,
.app-shell .modal-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.app-shell .metric,
.app-shell .owner-metrics div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.app-shell .kanban-col {
  background: #fbfbfd;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.app-shell .task-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}
.app-shell .clickable-task:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); transform: translateY(-1px); }

.app-shell .row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.app-shell .btn {
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.08s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
.app-shell .btn:hover { box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12); }
.app-shell .btn:active { transform: scale(0.97); }
.app-shell .btn.secondary {
  background: #f0f0f2;
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: none;
}
.app-shell .btn.secondary:hover { background: #e8e8ea; box-shadow: none; }

.app-shell .icon-action {
  background: #f0f0f2;
  transition: background-color 0.15s ease;
}
.app-shell .icon-action:hover { background: #e8e8ea; }

.app-shell .input,
.app-shell .select,
.app-shell .textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.app-shell .input:focus,
.app-shell .select:focus,
.app-shell .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(138, 106, 86, 0.15);
}

.app-shell .field label { color: var(--ink); font-weight: 600; }

.app-shell .table th { background: #fbfbfd; }
.app-shell .table th,
.app-shell .table td { border-top: 1px solid var(--line); }

.app-shell .empty,
.app-shell .compact-empty { border: 1px dashed var(--line); border-radius: 12px; }

.app-shell .pill { border-radius: 999px; font-weight: 600; }

.app-shell .editor-line,
.app-shell .service-editor-list,
.app-shell .service-category-group,
.app-shell .employee-editor-card,
.app-shell .service-editor-card {
  background: var(--panel);
  border-color: var(--line);
}

.app-shell .integration-note {
  background: #fbfbfd;
  border: 1px solid var(--line);
  border-radius: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .app-shell .task-card,
  .app-shell .btn,
  .app-shell .input,
  .app-shell .select,
  .app-shell .textarea,
  .app-shell .icon-action { transition: none; }
}
