@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800;900&display=swap");

:root {
  --app-primary: #F6C23E;
  --app-primary-dark: #9a6100;
  --app-primary-soft: #fff8e5;
  --app-success: #F6C23E;
  --app-info: #F6C23E;
  --app-warning: #F6C23E;
  --app-danger: #b42318;
  --app-secondary: #6b5a2d;
  --app-dark: #2f260f;
  --app-light: #fff;
  --app-brand: var(--app-primary);
  --app-brand-dark: var(--app-primary-dark);
  --app-brand-soft: var(--app-primary-soft);
  --app-sidebar-bg: #F6C23E;
  --app-sidebar-border: #d39e19;
  --app-sidebar-text: #2f260f;
  --app-radius: 0.35rem;
  --app-sidebar-width: 14rem;
  --bs-primary: var(--app-primary);
  --bs-primary-rgb: 246, 194, 62;
  --bs-warning: var(--app-warning);
  --bs-warning-rgb: 246, 194, 62;
  --bs-link-color: var(--app-primary-dark);
  --bs-link-hover-color: var(--app-dark);
  --bottom-nav-height: 72px;
  --app-safe-area-top: env(safe-area-inset-top, 0px);
  --app-safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

body {
  min-height: 100svh;
  min-height: 100dvh;
  background: var(--app-light);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--app-secondary);
}

body.booking-popup-open {
  overflow: hidden;
}

[data-bs-theme="dark"] body {
  background: var(--bs-tertiary-bg);
}

.app-title {
  font-size: clamp(2rem, 7vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
}

.eyebrow {
  color: var(--app-primary-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card,
.mobile-nav {
  border-radius: var(--app-radius) !important;
}

.card {
  --bs-card-border-color: var(--bs-border-color);
  --bs-card-cap-bg: var(--bs-body-bg);
}

.admin-wrapper {
  display: flex;
  min-height: 100svh;
  min-height: 100dvh;
  flex-direction: column;
}

.admin-sidebar {
  background: var(--app-sidebar-bg);
  border-right: 1px solid var(--app-sidebar-border);
  box-shadow: 0 0.15rem 1.75rem 0 rgba(246, 194, 62, 0.22);
  color: var(--app-sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
}

.sidebar-brand {
  align-items: center;
  color: var(--app-sidebar-text);
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  min-height: 4.375rem;
  text-decoration: none;
  text-transform: uppercase;
}

.sidebar-brand:hover {
  color: var(--app-dark);
  text-decoration: none;
}

.sidebar-brand-logo {
  display: block;
  filter: brightness(0) invert(1);
  max-height: 3.25rem;
  max-width: 10rem;
  object-fit: contain;
  width: auto;
}

.auth-logo {
  display: block;
  filter: brightness(0) invert(1);
  max-height: 4.25rem;
  max-width: 12rem;
  object-fit: contain;
}

.sidebar-divider {
  border-top: 1px solid rgba(47, 38, 15, 0.2);
  margin: 0.25rem 0 0.75rem;
  opacity: 1;
}

.sidebar-heading {
  color: var(--app-primary-dark);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 0 0.75rem 0.5rem;
  text-transform: uppercase;
}

.admin-sidebar .nav-link {
  align-items: center;
  border-radius: 0.35rem;
  color: var(--app-sidebar-text);
  display: flex;
  gap: 0.75rem;
  min-width: 12rem;
  padding: 0.75rem;
}

.admin-sidebar button.nav-link {
  border: 0;
}

.admin-sidebar .mobile-logout-button {
  background: transparent;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link:focus {
  background: rgba(255, 255, 255, 0.72);
  color: var(--app-dark);
  text-decoration: none;
}

.admin-sidebar .nav-link.active {
  background: var(--app-primary-soft);
  color: var(--app-dark);
  font-weight: 800;
}

.admin-sidebar .nav-link.active small {
  color: rgba(47, 38, 15, 0.76);
}

.admin-sidebar .nav-link.active .nav-icon {
  background: var(--app-primary);
  color: var(--app-dark);
}

.admin-sidebar .sidebar-booking-action {
  background: var(--app-dark);
  color: #fff;
}

.admin-sidebar .sidebar-booking-action:hover,
.admin-sidebar .sidebar-booking-action:focus {
  background: var(--app-primary-dark);
  color: #fff;
}

.admin-sidebar .sidebar-booking-action small {
  color: rgba(255, 255, 255, 0.78);
}

.sidebar-booking-action .nav-icon {
  background: #fff;
  color: var(--app-dark);
  font-size: 1rem;
}

.admin-sidebar .nav-link small {
  color: rgba(47, 38, 15, 0.7);
  font-size: 0.72rem;
  line-height: 1.25;
}

.nav-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 900;
  height: 2rem;
  justify-content: center;
  color: var(--app-primary-dark);
  width: 2rem;
}

.admin-content-wrapper {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.user-summary {
  align-items: center;
  display: flex;
  gap: 0.65rem;
  min-width: 0;
}

.user-avatar {
  align-items: center;
  background: var(--app-primary-soft);
  border: 1px solid rgba(246, 194, 62, 0.42);
  border-radius: 999px;
  color: var(--app-dark);
  display: inline-flex;
  font-size: 0.66rem;
  font-weight: 900;
  justify-content: center;
  max-width: 5.75rem;
  min-height: 2.25rem;
  overflow: hidden;
  padding: 0 0.65rem;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-user-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(47, 38, 15, 0.14);
  border-radius: 0.35rem;
  color: var(--app-sidebar-text);
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
}

.sidebar-user-summary {
  align-items: center;
  flex-direction: column;
  text-align: center;
  width: 100%;
}

.page-heading .btn {
  box-shadow: 0 0.125rem 0.25rem 0 rgba(58, 59, 69, 0.2);
}

.admin-card-header {
  background: var(--bs-body-bg);
  border-bottom: 1px solid var(--bs-border-color);
}

.admin-footer {
  margin-top: auto;
  box-shadow: 0 -0.15rem 1rem 0 rgba(58, 59, 69, 0.04);
}

.booking-create-card {
  overflow: hidden;
}

.booking-popup[hidden],
.management-popup[hidden] {
  display: none;
}

.booking-popup {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 0.75rem;
  position: fixed;
  z-index: 1080;
}

.booking-popup-backdrop {
  background: rgba(47, 38, 15, 0.52);
  inset: 0;
  position: absolute;
}

.booking-popup-panel {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  box-shadow: 0 1rem 3rem rgba(47, 38, 15, 0.28);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-height: calc(100svh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  max-width: 760px;
  overflow: hidden;
  position: relative;
  width: min(100%, 760px);
}

.booking-popup-header {
  align-items: flex-start;
  background: var(--bs-body-bg);
  border-bottom: 1px solid var(--bs-border-color);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
}

.booking-popup-body {
  overflow-y: auto;
  padding: 1rem;
}

.management-form {
  margin: 0;
}

.management-form:not(.row) {
  display: grid;
  gap: 1rem;
}

.management-form-note {
  background: #fff8e5;
  border: 1px solid rgba(246, 194, 62, 0.35);
  border-radius: 0.85rem;
  color: #6a514c;
  font-size: 0.88rem;
  font-weight: 750;
  padding: 0.8rem;
}

.assign-area-block,
.assign-table-block {
  display: grid;
  gap: 0.55rem;
}

.assign-area-block {
  margin-bottom: 0.9rem;
}

.assign-block-title {
  color: #5b5148;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.assign-area-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
}

.assign-area-card {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  color: #5b5148;
  font-size: 0.86rem;
  font-weight: 900;
  min-height: 3.25rem;
  padding: 0.65rem 0.75rem;
  text-align: left;
}

.assign-area-card.selected {
  background: var(--wine);
  border-color: var(--wine);
  color: #fff;
}

.assign-table-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.assign-table-card {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.2rem;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.55rem 0.4rem;
  position: relative;
  text-align: center;
}

.assign-table-card:hover,
.assign-table-card.selected {
  border-color: var(--wine);
  box-shadow: 0 0.45rem 1.1rem rgba(143, 16, 45, 0.12);
}

.assign-table-card.selected {
  background: #fff4df;
}

.assign-table-card:disabled,
.assign-table-card.disabled {
  background: #f4f1ec;
  border-color: var(--line);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.58;
}

.assign-table-card:disabled:hover,
.assign-table-card.disabled:hover {
  border-color: var(--line);
  box-shadow: none;
}

.assign-table-card.selected::after {
  align-items: center;
  background: var(--wine);
  border-radius: 999px;
  color: #fff;
  content: "✓";
  display: flex;
  font-size: 0.65rem;
  font-weight: 950;
  height: 1rem;
  justify-content: center;
  position: absolute;
  right: 0.35rem;
  top: 0.35rem;
  width: 1rem;
}

.assign-table-code {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 950;
  line-height: 1;
}

.assign-table-status {
  color: #7b6d62;
  font-size: 0.63rem;
  font-weight: 900;
  line-height: 1.1;
}

.booking-form-intro {
  background: linear-gradient(135deg, #fff, var(--app-primary-soft));
  border: 1px solid rgba(246, 194, 62, 0.45);
  border-radius: 1rem;
  padding: 1rem;
}

.booking-public-form {
  display: grid;
  gap: 1.35rem;
}

.booking-step-block {
  background: transparent;
}

.booking-step-label,
.booking-field-label {
  align-items: center;
  color: var(--app-dark);
  display: flex;
  font-size: 0.78rem;
  font-weight: 900;
  gap: 0.5rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.booking-step-number {
  align-items: center;
  background: var(--app-warning);
  border-radius: 50%;
  color: var(--app-dark);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-weight: 900;
  height: 1.35rem;
  justify-content: center;
  width: 1.35rem;
}

.booking-date-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.booking-date-chip,
.booking-date-input,
.booking-choice-card,
.booking-time-choice {
  background: #fff;
  border: 1.5px solid rgba(246, 194, 62, 0.35);
  color: var(--app-secondary);
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.booking-date-chip,
.booking-date-input {
  border-radius: 0.65rem;
  font-weight: 800;
  min-height: 46px;
  padding: 0.65rem 1rem;
}

.booking-date-chip:hover,
.booking-date-chip.active,
.booking-choice-card:hover,
.booking-choice-card.active,
.booking-time-choice:hover,
.booking-time-choice.active {
  border-color: var(--app-warning);
  box-shadow: 0 0 0 0.2rem rgba(246, 194, 62, 0.18);
}

.booking-date-chip.active,
.booking-time-choice.active {
  background: var(--app-warning);
  color: var(--app-dark);
}

.booking-date-input {
  flex: 1 1 11rem;
}

.booking-branch-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr);
}

.booking-choice-card {
  border-radius: 0.8rem;
  min-height: 72px;
  padding: 0.85rem;
  text-align: left;
}

.booking-choice-card.active {
  background: var(--app-primary-soft);
}

.booking-choice-name,
.booking-choice-sub {
  display: block;
}

.booking-choice-name {
  color: var(--app-dark);
  font-weight: 900;
}

.booking-choice-sub {
  color: var(--app-secondary);
  font-size: 0.74rem;
  margin-top: 0.2rem;
}

.booking-time-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.booking-time-choice {
  border-radius: 0.55rem;
  font-weight: 900;
  min-height: 42px;
  padding: 0.45rem 0.25rem;
}

.booking-two-column {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.booking-stepper {
  align-items: center;
  background: #fff;
  border: 1.5px solid rgba(246, 194, 62, 0.35);
  border-radius: 0.75rem;
  display: flex;
  min-height: 48px;
  overflow: hidden;
}

.booking-stepper-button {
  background: transparent;
  border: 0;
  color: var(--app-primary-dark);
  flex: 0 0 3rem;
  font-size: 1.35rem;
  font-weight: 900;
  height: 100%;
}

.booking-stepper-button:hover {
  background: var(--app-primary-soft);
}

.booking-stepper-value {
  color: var(--app-dark);
  flex: 1 1 auto;
  font-size: 1.15rem;
  font-weight: 900;
  text-align: center;
}

.booking-submit-button {
  box-shadow: 0 0.35rem 1rem rgba(246, 194, 62, 0.25);
}

.booking-created-summary[hidden] {
  display: none;
}

.booking-created-summary {
  background: #fff;
  border: 1px solid rgba(246, 194, 62, 0.45);
  border-radius: 1rem;
  box-shadow: 0 0.5rem 1.5rem rgba(47, 38, 15, 0.08);
  color: var(--app-dark);
  margin-top: 1rem;
  padding: 1rem;
}

.booking-created-summary-header {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.booking-created-summary-eyebrow {
  color: var(--app-primary-dark);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 0.2rem;
  text-transform: uppercase;
}

.booking-created-summary-header h4 {
  font-size: 1.05rem;
  font-weight: 900;
  margin: 0;
}

.booking-created-summary-code {
  background: var(--app-primary-soft);
  border-radius: 999px;
  color: var(--app-primary-dark);
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0.35rem 0.6rem;
}

.booking-created-summary-list {
  display: grid;
  gap: 0;
  margin: 0.85rem 0 0;
}

.booking-created-summary-row {
  border-top: 1px solid rgba(246, 194, 62, 0.28);
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem 0;
}

.booking-created-summary-row dt {
  color: var(--app-secondary);
  font-size: 0.74rem;
  font-weight: 850;
}

.booking-created-summary-row dd {
  color: var(--app-dark);
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0;
  overflow-wrap: anywhere;
}

.booking-created-summary-hint {
  background: var(--app-primary-soft);
  border-radius: 0.75rem;
  color: var(--app-primary-dark);
  font-size: 0.8rem;
  font-weight: 800;
  margin-top: 0.6rem;
  padding: 0.65rem;
}

.required-mark {
  color: var(--app-danger);
  font-weight: 900;
}

.metric-card {
  border: 0;
  border-radius: 0.35rem !important;
  overflow: hidden;
}

.metric-icon {
  color: rgba(246, 194, 62, 0.38);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
}

.border-left-primary,
.border-left-success,
.border-left-info,
.border-left-warning,
.border-left-danger {
  border-left: 0.25rem solid transparent !important;
}

.border-left-primary {
  border-left-color: var(--app-primary) !important;
}

.border-left-success {
  border-left-color: var(--app-success) !important;
}

.border-left-info {
  border-left-color: var(--app-info) !important;
}

.border-left-warning {
  border-left-color: var(--app-warning) !important;
}

.border-left-danger {
  border-left-color: var(--app-danger) !important;
}

.text-xs {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.text-gray-800 {
  color: var(--app-dark) !important;
}

[data-bs-theme="dark"] .text-gray-800 {
  color: var(--bs-body-color) !important;
}

.text-primary {
  color: var(--app-primary) !important;
}

.text-success {
  color: var(--app-success) !important;
}

.text-info {
  color: var(--app-info) !important;
}

.text-warning {
  color: var(--app-warning) !important;
}

.nav-pills .nav-link {
  color: var(--bs-body-color);
  min-width: max-content;
  padding: 0.75rem 1rem;
}

.nav-pills .nav-link small {
  color: var(--bs-secondary-color);
  line-height: 1.35;
}

.nav-pills .nav-link.active {
  background: var(--app-brand);
  color: var(--app-dark);
}

.nav-pills .nav-link.active small {
  color: var(--app-dark);
}

.mobile-nav {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scroll-snap-type: inline proximity;
}

.mobile-nav .nav-link {
  scroll-snap-align: start;
}

.mobile-logout-form {
  margin: 0;
}

.scope-field {
  display: grid;
  gap: 0.45rem;
}

.scope-branch-field {
  flex: 0 0 auto;
  min-width: 0;
  width: 100%;
}

.scope-branch-select {
  width: 100%;
}

.scope-date-field {
  flex: 0 0 auto;
  min-width: 0;
}

.dashboard-date-row {
  justify-content: flex-start;
}

.dashboard-date-input {
  flex: 0 0 12rem;
  width: 12rem;
}

.form-control,
.form-select {
  min-height: 44px;
}

.form-control,
.form-select {
  border-radius: 0.75rem;
}

.form-label {
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
}

.form-submit {
  min-height: 48px;
}

.btn-warning {
  --bs-btn-bg: var(--app-warning);
  --bs-btn-border-color: var(--app-warning);
  --bs-btn-hover-bg: var(--app-primary-dark);
  --bs-btn-hover-border-color: var(--app-primary-dark);
  --bs-btn-color: var(--app-dark);
  --bs-btn-hover-color: #fff;
}

.btn-primary,
.btn-success {
  --bs-btn-bg: var(--app-primary);
  --bs-btn-border-color: var(--app-primary);
  --bs-btn-color: var(--app-dark);
  --bs-btn-hover-bg: var(--app-primary-dark);
  --bs-btn-hover-border-color: var(--app-primary-dark);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--app-primary-dark);
  --bs-btn-active-border-color: var(--app-primary-dark);
  --bs-btn-active-color: #fff;
}

.btn-outline-secondary {
  --bs-btn-color: var(--app-primary-dark);
  --bs-btn-border-color: rgba(246, 194, 62, 0.55);
  --bs-btn-hover-bg: var(--app-primary);
  --bs-btn-hover-border-color: var(--app-primary);
  --bs-btn-hover-color: var(--app-dark);
  --bs-btn-active-bg: var(--app-primary);
  --bs-btn-active-border-color: var(--app-primary);
  --bs-btn-active-color: var(--app-dark);
}

.booking-card,
.table-card {
  border-color: var(--bs-border-color);
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.booking-card:hover,
.table-card:hover {
  border-color: var(--app-primary);
  box-shadow: 0 0.25rem 1rem rgba(246, 194, 62, 0.2);
}

.booking-card-body {
  padding: 0.55rem 0.75rem;
}

.booking-card-main {
  min-width: 0;
}

.booking-summary-line {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: 0.35rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.booking-summary-line > * {
  flex: 0 0 auto;
}

.booking-customer,
.booking-tables {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booking-customer {
  flex: 1 1 auto;
}

.booking-tables {
  align-items: center;
  align-self: stretch;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-sm);
  display: inline-flex;
  flex: 0 1 auto;
  font-size: 0.82rem;
  font-weight: 600;
  min-height: 34px;
  padding: 0.32rem 0.65rem;
}

.booking-time {
  color: var(--app-primary-dark);
  font-weight: 700;
}

.booking-separator {
  color: var(--bs-secondary-color);
}

.status-pill.booking-status-pill {
  font-size: 0.72rem;
  padding: 0.3rem 0.55rem;
}

.action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.booking-action-btn {
  font-size: 0.82rem;
  line-height: 1.2;
  min-height: 34px;
  padding: 0.32rem 0.65rem;
}

.status-pill {
  border: 1px solid rgba(246, 194, 62, 0.45);
  flex: 0 0 auto;
  padding: 0.55rem 0.7rem;
}

.status-PENDING {
  background: var(--app-primary-soft);
  color: var(--app-primary-dark);
}

.status-CONFIRMED,
.status-RESERVED {
  background: #fff;
  color: var(--app-primary-dark);
}

.status-CHECKED_IN,
.status-OCCUPIED {
  background: var(--app-primary);
  color: var(--app-dark);
}

.status-CANCELLED,
.status-NO_SHOW,
.status-BLOCKED {
  background: #fff;
  color: var(--app-danger);
}

.status-CHECKED_OUT,
.status-COMPLETED,
.status-AVAILABLE {
  background: #fff;
  color: var(--app-secondary);
}

.online-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--app-primary);
  box-shadow: 0 0 0 0.22rem rgba(246, 194, 62, 0.18);
}

.text-bg-success {
  background-color: var(--app-primary) !important;
  color: var(--app-dark) !important;
}

.text-bg-warning,
.text-bg-secondary {
  background-color: var(--app-primary-soft) !important;
  color: var(--app-primary-dark) !important;
}

.text-bg-light {
  background-color: #fff !important;
  color: var(--app-dark) !important;
}

.alert-warning {
  --bs-alert-bg: var(--app-primary-soft);
  --bs-alert-border-color: rgba(246, 194, 62, 0.45);
  --bs-alert-color: var(--app-primary-dark);
}

.auth-card {
  max-width: 460px;
}

.error-card {
  max-width: 640px;
}

.min-w-0 {
  min-width: 0;
}

.user-table-wrap {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--app-radius);
}

.user-table {
  font-size: 0.9rem;
  min-width: 68rem;
}

.user-table thead th {
  background: var(--bs-tertiary-bg);
  border-bottom-width: 2px;
  color: var(--app-secondary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.85rem 0.75rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.user-table tbody td {
  padding: 0.8rem 0.75rem;
}

.user-name-cell {
  min-width: 11rem;
}

.user-username {
  color: var(--bs-secondary-color);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
}

.branch-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
}

.branch-card {
  border-color: var(--bs-border-color) !important;
  min-width: 0;
}

.branch-card-header {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.branch-card-metrics {
  align-items: flex-end;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0.25rem;
}

.area-list {
  display: grid;
  gap: 0.45rem;
  list-style: none;
  margin-bottom: 0;
  padding-left: 0;
}

.area-list-item {
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  padding: 0.55rem;
}

.area-list-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.area-list-summary strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.area-list-count,
.area-list-separator {
  color: var(--bs-secondary-color);
  flex: 0 0 auto;
  font-size: 0.88rem;
}

.branch-card-actions {
  margin-top: 0.75rem;
}

details > summary {
  list-style: none;
  width: fit-content;
}

details > summary::-webkit-details-marker {
  display: none;
}

@media (min-width: 576px) {
  .booking-branch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-time-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .booking-two-column {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }

}

@media (min-width: 768px) {
  .booking-branch-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .admin-wrapper {
    flex-direction: row;
  }

  .admin-content-wrapper {
    margin-left: var(--app-sidebar-width);
    width: calc(100% - var(--app-sidebar-width));
  }

  .admin-sidebar {
    flex: 0 0 var(--app-sidebar-width);
    bottom: 0;
    height: 100svh;
    height: 100dvh;
    left: 0;
    max-height: 100svh;
    max-height: 100dvh;
    overflow-y: auto;
    position: fixed;
    top: 0;
    width: var(--app-sidebar-width);
    z-index: 1030;
  }

  .admin-sidebar .mobile-nav {
    flex-direction: column !important;
    overflow-x: visible !important;
  }

  .admin-sidebar .nav-link {
    min-width: 0;
  }

  .admin-sidebar button.nav-link {
    text-align: left;
    width: 100%;
  }

  .admin-sidebar .sidebar-booking-action {
    order: 99;
  }

  .sidebar-user-card {
    flex: 0 0 auto;
    margin-top: auto;
  }

  .mobile-logout-form {
    display: none !important;
  }

  .scope-branch-field {
    flex-basis: 18rem;
    width: 18rem;
  }

  .dashboard-date-row {
    flex-wrap: nowrap;
  }
}

@media (max-width: 767.98px) {
  .dashboard-body {
    padding-bottom: calc(5.25rem + var(--app-safe-area-bottom));
  }

  .admin-wrapper {
    min-height: calc(100svh - 5.25rem);
    min-height: calc(100dvh - 5.25rem);
  }

  .admin-sidebar {
    background: var(--app-sidebar-bg);
    border: 1px solid var(--app-sidebar-border);
    border-bottom: 0;
    border-radius: 1rem 1rem 0 0;
    bottom: 0;
    box-shadow: 0 -0.45rem 1.5rem rgba(47, 38, 15, 0.18);
    display: block;
    left: 0;
    padding: 0.45rem 0.4rem calc(0.45rem + var(--app-safe-area-bottom));
    position: fixed;
    right: 0;
    z-index: 1060;
  }

  .sidebar-brand,
  .admin-sidebar > .sidebar-divider,
  .sidebar-heading,
  .sidebar-user-card {
    display: none !important;
  }

  .admin-sidebar .mobile-nav {
    display: flex;
    gap: 0.25rem !important;
    justify-content: space-around;
    overflow: visible;
    width: 100%;
  }

  .admin-sidebar .nav-link,
  .mobile-logout-form {
    flex: 1 1 0;
    min-width: 0;
  }

  .admin-sidebar .nav-link {
    align-items: center;
    border-radius: 0.75rem;
    flex-direction: column;
    gap: 0.2rem;
    justify-content: center;
    min-height: 4.15rem;
    padding: 0.35rem 0.2rem;
    text-align: center;
  }

  .admin-sidebar button.nav-link {
    text-align: center;
  }

  .admin-sidebar .mobile-logout-button {
    width: 100%;
  }

  .admin-sidebar .nav-link > span:last-child {
    min-width: 0;
    width: 100%;
  }

  .admin-sidebar .nav-link strong {
    font-size: 0.7rem;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-sidebar .nav-link small {
    display: none !important;
  }

  .admin-sidebar .mobile-logout-button small {
    display: block !important;
    font-size: 0.56rem;
    line-height: 1.1;
    margin-top: 0.12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-sidebar .nav-icon {
    height: 1.85rem;
    width: 1.85rem;
  }

  .admin-sidebar .nav-link.active {
    background: var(--app-primary-soft);
  }

  .admin-sidebar .sidebar-booking-action {
    background: var(--app-dark);
    color: #fff;
  }

  .admin-sidebar .sidebar-booking-action:hover,
  .admin-sidebar .sidebar-booking-action:focus {
    background: var(--app-primary-dark);
    color: #fff;
  }

  .sidebar-booking-action .nav-icon {
    background: #fff;
    color: var(--app-dark);
  }

  .mobile-logout-button {
    color: var(--app-danger) !important;
  }
}

@media (max-width: 575.98px) {
  .container-xl {
    --bs-gutter-x: 1.25rem;
  }

  .card-body {
    overflow-wrap: anywhere;
  }

  .booking-popup {
    padding: 0;
  }

  .booking-popup-panel {
    border-radius: 1rem 1rem 0 0;
    bottom: 0;
    left: 0;
    max-height: 92svh;
    max-height: 92dvh;
    position: absolute;
    right: 0;
    width: 100%;
  }

  .booking-popup-header,
  .booking-popup-body {
    padding: 0.9rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .booking-card,
  .table-card {
    transition: none;
  }
}

/* Mobile prototype visual system */
:root {
  --wine: #8f102d;
  --wine-dark: #6f0d25;
  --gold: #edae32;
  --cream: #f6f1e8;
  --paper: #fffdf9;
  --muted: #827b72;
  --line: #e7ddce;
  --green: #15996a;
  --blue: #2b78b8;
  --red: #c93a33;
  --ink: #281b1b;
  --app-primary: var(--wine);
  --app-primary-dark: var(--wine-dark);
  --app-primary-soft: #f8e7ec;
  --app-success: var(--green);
  --app-info: var(--blue);
  --app-warning: var(--gold);
  --app-danger: var(--red);
  --app-secondary: var(--muted);
  --app-dark: var(--ink);
  --app-light: #e9e3d7;
  --app-brand: var(--wine);
  --app-brand-dark: var(--wine-dark);
  --app-brand-soft: #f8e7ec;
  --app-radius: 18px;
  --bs-primary: var(--wine);
  --bs-primary-rgb: 143, 16, 45;
  --bs-warning: var(--gold);
  --bs-warning-rgb: 237, 174, 50;
  --bs-link-color: var(--wine);
  --bs-link-hover-color: var(--wine-dark);
}

body {
  background: #e9e3d7;
  color: var(--ink);
  font-family: Inter, "Be Vietnam Pro", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 650;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: inherit;
}

.mobile-app-body {
  min-height: 100svh;
  min-height: 100dvh;
  padding: 0 !important;
}

.prototype-stage {
  display: grid;
  min-height: 100svh;
  min-height: 100dvh;
  padding: 0;
  place-items: stretch;
}

.mobile-shell {
  background: var(--cream);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  height: 100svh;
  height: 100dvh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.dashboard-shell {
  isolation: isolate;
}

.app-header {
  background: linear-gradient(145deg, var(--wine), var(--wine-dark));
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
  color: #fff;
  flex: 0 0 auto;
  margin: 0;
  padding: 18px 22px 22px;
  padding-top: calc(18px + var(--app-safe-area-top));
  position: sticky;
  top: 0;
  z-index: 30;
}

.app-header.flat {
  border-radius: 0 0 22px 22px;
}

.app-header-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0;
}

.app-brand {
  align-items: center;
  display: inline-flex;
  min-width: 0;
}

.app-brand-logo {
  display: block;
  filter: brightness(0) invert(1);
  max-height: 44px;
  max-width: 150px;
  object-fit: contain;
  width: auto;
}

.header-logout-form {
  margin: 0;
}

.header-user-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  gap: 8px;
  min-height: 46px;
  padding: 4px 12px 4px 4px;
}

.header-user-name {
  font-size: 12px;
  font-weight: 850;
}

.avatar {
  background: #feeceb;
  border-radius: 14px;
  color: var(--wine);
  display: inline-grid;
  flex: 0 0 auto;
  font-size: 22px;
  font-weight: 900;
  height: 54px;
  place-items: center;
  width: 54px;
}

.avatar.gold {
  background: var(--gold);
  color: #4b2b14;
}

.avatar-compact {
  border-radius: 999px;
  font-size: 10px;
  height: 38px;
  line-height: 1;
  max-width: 38px;
  overflow: hidden;
  padding: 0 4px;
  text-align: center;
  width: 38px;
}

.eyebrow {
  color: var(--wine);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-header .eyebrow,
.login-shell .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.screen-title {
  color: inherit;
  font-size: 31px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
}

.screen-subtitle {
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  margin-top: 5px;
}

.page-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 22px 112px;
  padding-bottom: calc(var(--bottom-nav-height) + 12px + var(--app-safe-area-bottom));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.dashboard-page-main {
  background: var(--cream);
}

.search-field {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(96, 69, 45, 0.07);
  color: var(--muted);
  display: flex;
  gap: 12px;
  min-height: 58px;
  padding: 0 16px;
}

.section-title {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 20px;
  font-weight: 900;
  justify-content: space-between;
  margin: 20px 0 12px;
}

.section-title-note {
  color: var(--wine);
  font-size: 13px;
  font-weight: 850;
}

.section-title-note.muted {
  color: var(--muted);
}

.field-label {
  color: #625950;
  display: block;
  font-size: 15px;
  font-weight: 850;
  margin: 0 0 8px;
}

.scope-field {
  width: 100%;
}

.dashboard-date-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-date-input {
  grid-column: 1 / -1;
  width: 100%;
}

.metric-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}

.metric {
  background: #f6eee2;
  border-radius: 14px;
  display: grid;
  min-height: 72px;
  padding: 8px;
  place-items: center;
  text-align: center;
}

.metric strong {
  color: var(--ink);
  display: block;
  font-size: 25px;
  font-weight: 950;
  line-height: 1;
}

.metric small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric.green {
  background: #e8f4ed;
  color: var(--green);
}

.metric.green strong,
.metric.green small {
  color: var(--green);
}

.metric.gold {
  background: #fff4df;
}

.metric.gold strong,
.metric.gold small {
  color: #9a6f0c;
}

.metric.red {
  background: #fee9e8;
}

.metric.red strong,
.metric.red small {
  color: var(--red);
}

.table-status-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.table-status-toolbar {
  max-width: none;
}

.table-status-toolbar-grid {
  align-items: end;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr);
}

.table-status-toolbar-grid.has-table-booking-action {
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
}

.table-status-search {
  border-color: rgba(237, 174, 50, 0.55);
  font-weight: 900;
}

.table-booking-action-inline {
  align-items: center;
  display: flex;
  justify-content: stretch;
}

.table-booking-action-inline[hidden] {
  display: none;
}

.table-booking-create-button {
  min-height: 42px;
  white-space: nowrap;
  width: 100%;
}

.table-status-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
}

.table-status-card {
  background: #fff;
  border: 1px solid rgba(231, 221, 206, 0.85);
  border-left: 5px solid #d8cbbb;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(83, 58, 35, 0.07);
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 14px;
}

.table-status-card-selected {
  border-color: rgba(246, 194, 62, 0.85);
  box-shadow: 0 12px 26px rgba(143, 16, 45, 0.13);
}

.table-status-card-quick-match {
  border-color: var(--app-warning);
  box-shadow: 0 0 0 0.22rem rgba(246, 194, 62, 0.28), 0 12px 26px rgba(83, 58, 35, 0.12);
}

.table-status-search-note {
  grid-column: 1 / -1;
}

.table-status-available {
  border-left-color: var(--green);
}

.table-status-reserved {
  border-left-color: #b8aa9a;
}

.table-status-occupied {
  border-left-color: var(--red);
}

.table-status-soon-out {
  border-left-color: var(--gold);
}

.table-status-card-top {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.table-booking-check {
  align-items: center;
  background: #fff8e5;
  border: 1px solid rgba(246, 194, 62, 0.42);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 950;
  gap: 0.3rem;
  padding: 0.28rem 0.45rem;
}

.table-booking-check input {
  accent-color: var(--app-primary);
  height: 0.95rem;
  margin: 0;
  width: 0.95rem;
}

.table-booking-check.disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.table-status-code {
  color: var(--ink);
  display: block;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

.table-status-branch,
.table-status-meta,
.table-status-detail {
  color: #6d645d;
  font-size: 12px;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-booking-conflict {
  background: #fff4df;
  border-radius: 9px;
  color: #9a6f0c;
  font-size: 10.5px;
  font-weight: 900;
  padding: 0.35rem 0.45rem;
}

.table-booking-summary-card {
  display: grid;
  gap: 0.25rem;
}

.table-booking-summary-card span {
  color: #6a514c;
  font-size: 0.82rem;
  font-weight: 750;
}

.table-status-pill {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  padding: 7px 8px;
  white-space: nowrap;
}

.table-status-pill-green {
  background: #e8f5ef;
  color: var(--green);
}

.table-status-pill-neutral {
  background: #f3ecdf;
  color: #5b5148;
}

.table-status-pill-red {
  background: #fee9e8;
  color: var(--red);
}

.table-status-pill-gold {
  background: #fff4df;
  color: #9a6f0c;
}

.table-status-customer {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.15;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-status-select {
  background-color: #fffdf8;
  border-color: rgba(237, 174, 50, 0.45);
  border-radius: 11px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  min-height: 36px;
}

.table-status-select:disabled {
  background-color: #f8f1e7;
  color: #8a7a6c;
  opacity: 1;
}

.booking-board,
.booking-card-list {
  display: grid;
  gap: 14px;
}

.booking-quick-search-toolbar {
  max-width: none;
}

.booking-alert-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.75rem), 1fr));
}

.booking-alert-grid[hidden] {
  display: none;
}

.booking-alert {
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #5b5148;
  display: grid;
  gap: 2px 6px;
  min-height: 58px;
  padding: 9px 12px;
}

.booking-alert-dot,
.booking-alert-title {
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.booking-alert strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
}

.booking-alert-danger {
  background: #fee9e8;
  border-color: rgba(201, 58, 51, 0.18);
  color: var(--red);
}

.booking-alert-warning {
  background: #fff4df;
  border-color: rgba(237, 174, 50, 0.32);
  color: #9a6f0c;
}

.booking-alert-neutral {
  background: #f3ecdf;
  color: #5b5148;
}

.booking-tabs {
  display: flex;
  gap: 10px;
  margin: 0 -22px 16px 0;
  overflow-x: auto;
  padding: 0 22px 2px 0;
  scrollbar-width: none;
}

.booking-tabs::-webkit-scrollbar {
  display: none;
}

.booking-tab {
  border-color: var(--line);
  color: #5b5148;
  cursor: pointer;
  flex: 0 0 auto;
  font-weight: 900;
}

.booking-tab.active {
  background: var(--wine);
  border-color: var(--wine);
  color: #fff;
}

.booking-timeline-list {
  display: grid;
  gap: 0;
}

.booking-timeline-item {
  display: grid;
  gap: 10px;
  grid-template-columns: 64px minmax(0, 1fr);
  position: relative;
}

.booking-timeline-item::before {
  background: #d9cdbc;
  bottom: -12px;
  content: "";
  left: 58px;
  position: absolute;
  top: 32px;
  width: 1px;
}

.booking-timeline-item:last-child::before {
  display: none;
}

.booking-time-mark {
  color: var(--wine);
  font-size: 17px;
  font-weight: 950;
  line-height: 1.1;
  padding-right: 13px;
  padding-top: 7px;
  position: relative;
  text-align: right;
}

.booking-time-mark::after {
  background: currentColor;
  border-radius: 999px;
  content: "";
  height: 11px;
  position: absolute;
  right: -5px;
  top: 12px;
  width: 11px;
  z-index: 1;
}

.booking-time-mark small {
  color: currentColor;
  display: block;
  font-size: 11px;
  font-weight: 900;
  margin-top: 4px;
}

.booking-time-mark.red {
  color: var(--red);
}

.booking-time-mark.gold {
  color: #b99112;
}

.booking-time-mark.green {
  color: var(--green);
}

.booking-time-mark.neutral {
  color: var(--muted);
}

.booking-section {
  min-width: 0;
}

.card,
.booking-card,
.info-card,
.admin-card,
.branch-card,
.api-client-card {
  border-radius: 18px !important;
}

.booking-card,
.info-card {
  background: #fff;
  border: 1px solid rgba(231, 221, 206, 0.78) !important;
  box-shadow: 0 13px 28px rgba(71, 52, 36, 0.08);
  margin-bottom: 0;
  overflow: visible;
  position: relative;
}

.timeline-card {
  border-left: 5px solid var(--wine) !important;
  margin-bottom: 16px;
}

.timeline-card.red {
  border-left-color: var(--red) !important;
}

.timeline-card.gold {
  border-left-color: var(--gold) !important;
}

.timeline-card.green {
  border-left-color: var(--green) !important;
}

.timeline-card.neutral {
  border-left-color: #b8aa9a !important;
}

.booking-card:hover,
.table-card:hover {
  border-color: rgba(143, 16, 45, 0.28) !important;
  box-shadow: 0 13px 28px rgba(71, 52, 36, 0.08);
}

.booking-card-delete-button {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(201, 58, 51, 0.28);
  border-radius: 999px;
  box-shadow: 0 0.45rem 1rem rgba(83, 58, 35, 0.12);
  color: var(--red);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 950;
  height: 1.75rem;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: -0.45rem;
  top: -0.45rem;
  width: 1.75rem;
  z-index: 2;
}

.booking-card-delete-button:hover,
.booking-card-delete-button:focus {
  background: var(--red);
  color: #fff;
  outline: 0;
}

.booking-card-body {
  padding: 18px;
}

.timeline-card-header {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.timeline-customer {
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.08;
  margin: 0;
}

.timeline-phone {
  margin-top: 3px;
}

.timeline-visit-count {
  align-items: center;
  background: linear-gradient(135deg, #fff4df 0%, #f7d27a 100%);
  border: 1px solid rgba(237, 174, 50, 0.55);
  border-radius: 13px;
  color: var(--wine);
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  line-height: 1.15;
  max-width: 42%;
  min-width: 68px;
  padding: 7px 11px;
  text-align: center;
}

.timeline-visit-count strong {
  display: block;
  font-size: 13px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-meta-row {
  align-items: center;
  color: #6d645d;
  display: flex;
  flex-wrap: nowrap;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  margin-top: 14px;
  min-width: 0;
  white-space: nowrap;
}

.timeline-meta-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-meta-row i {
  color: var(--wine);
}

.timeline-table {
  color: #5b5148;
}

.timeline-area {
  color: #5b5148;
}

.timeline-table-missing {
  color: #b99112;
}

.timeline-notice,
.timeline-note {
  border-radius: 12px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  margin-top: 12px;
  padding: 9px 11px;
}

.timeline-notice-red {
  background: #fee9e8;
  color: var(--red);
}

.timeline-notice-gold {
  background: #fff4df;
  color: #9a6f0c;
}

.timeline-note {
  background: #f8f1e7;
  color: #6d645d;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.booking-summary-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  overflow: visible;
  white-space: normal;
}

.booking-time {
  color: var(--wine);
  font-size: 20px;
  font-weight: 950;
}

.booking-customer {
  color: var(--ink);
  flex: 1 1 auto;
  font-size: 20px;
  font-weight: 950;
  min-width: 120px;
}

.booking-separator {
  color: #d4c6b4;
}

.booking-guest-count,
.booking-meta {
  color: #6d645d;
  font-weight: 700;
}

.action-row {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.timeline-action-row {
  margin-top: 14px;
}

@media (max-width: 991.98px) {
  .booking-board {
    padding-bottom: 74px;
  }

  .booking-quick-search-toolbar {
    backdrop-filter: blur(12px);
    background: rgba(255, 253, 249, 0.96);
    border-top: 1px solid var(--line);
    bottom: calc(var(--bottom-nav-height) + var(--app-safe-area-bottom));
    box-shadow: 0 -10px 26px rgba(83, 58, 35, 0.12);
    left: 0;
    margin: 0 !important;
    padding: 0.65rem 0.75rem;
    position: fixed;
    right: 0;
    z-index: 1029;
  }

  .booking-quick-search-toolbar .form-control {
    min-height: 44px;
  }

  .table-status-page {
    padding-bottom: 74px;
  }

  .table-status-toolbar {
    backdrop-filter: blur(12px);
    background: rgba(255, 253, 249, 0.96);
    border-top: 1px solid var(--line);
    bottom: calc(var(--bottom-nav-height) + var(--app-safe-area-bottom));
    box-shadow: 0 -10px 26px rgba(83, 58, 35, 0.12);
    left: 0;
    margin: 0 !important;
    padding: 0.65rem 0.75rem;
    position: fixed;
    right: 0;
    z-index: 1029;
  }

  .table-status-toolbar-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .table-status-toolbar-grid.has-table-booking-action {
    grid-template-columns: minmax(0, 1fr) minmax(7.5rem, 38%);
  }

  .table-status-search,
  .table-booking-create-button {
    min-height: 44px;
  }

  .table-status-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-status-list {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-status-card {
    border-left-width: 3px;
    border-radius: 13px;
    gap: 7px;
    padding: 10px;
  }

  .table-status-code {
    font-size: 18px;
  }

  .table-status-customer {
    font-size: 13px;
  }

  .table-status-branch,
  .table-status-meta,
  .table-status-detail,
  .table-status-pill {
    font-size: 10px;
  }

  .table-status-select {
    border-radius: 9px;
    font-size: 10.5px;
    min-height: 32px;
    padding: 5px 7px;
  }

  .booking-timeline-list {
    align-items: stretch;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-timeline-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .booking-timeline-item::before {
    display: none;
  }

  .booking-time-mark {
    align-items: center;
    background: #fff7e7;
    border: 1px solid rgba(237, 174, 50, 0.28);
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    gap: 3px;
    line-height: 1;
    margin-bottom: 6px;
    max-width: 100%;
    padding: 5px 8px;
    text-align: left;
  }

  .booking-time-mark::after {
    display: none;
  }

  .booking-time-mark small {
    display: inline;
    font-size: 10px;
    margin-top: 0;
  }

  .timeline-card {
    border-left-width: 3px !important;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    margin-bottom: 0;
  }

  .booking-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 10px;
  }

  .timeline-card-header {
    gap: 6px;
  }

  .timeline-customer {
    display: -webkit-box;
    font-size: 15px;
    line-height: 1.12;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .timeline-phone {
    font-size: 11px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .timeline-visit-count {
    border-radius: 9px;
    max-width: 45%;
    min-width: 54px;
    padding: 5px 6px;
  }

  .timeline-visit-count strong {
    font-size: 10.5px;
  }

  .timeline-meta-row {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    font-size: 11px;
    gap: 5px;
    margin-top: 9px;
    overflow: hidden;
    white-space: nowrap;
  }

  .timeline-meta-row > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .timeline-notice,
  .timeline-note {
    border-radius: 9px;
    font-size: 10.5px;
    line-height: 1.25;
    margin-top: 8px;
    padding: 7px 8px;
  }

  .timeline-action-row {
    align-items: stretch;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 9px;
  }

  .timeline-action-row .booking-action-btn {
    flex: 1 1 0;
    font-size: 11px;
    min-width: 0;
    padding: 6px 5px;
    white-space: nowrap;
    width: auto;
  }
}

@media (max-width: 360px) {
  .booking-timeline-list {
    gap: 8px;
  }

  .booking-card-body {
    padding: 9px 8px;
  }

  .timeline-customer {
    font-size: 14px;
  }

  .timeline-visit-count {
    padding-inline: 5px;
  }
}

.booking-tables {
  background: #fbf7f0;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #5b5148;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  grid-column: 1 / -1;
  min-height: 44px;
  padding: 10px 12px;
}

.booking-action-btn {
  border-radius: 13px;
  font-size: 13px;
  font-weight: 900;
  padding: 8px 12px;
  width: 100%;
}

.booking-edit-call-button {
  align-items: center;
  border-radius: 13px;
  display: inline-flex;
  font-weight: 900;
  gap: 7px;
  justify-content: center;
  margin-top: 10px;
  width: 100%;
}

.booking-status-select {
  cursor: pointer;
  text-align: center;
  text-align-last: center;
}

.status-pill,
.badge-soft {
  align-items: center;
  background: #fbf0d0;
  border: 0;
  border-radius: 10px;
  color: #95720b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.status-CANCELLED,
.status-NO_SHOW,
.badge-red {
  background: #fee9e8;
  color: var(--red);
}

.status-CHECKED_IN,
.status-OCCUPIED,
.status-CHECKED_OUT,
.status-COMPLETED,
.badge-green {
  background: #e8f5ef;
  color: var(--green);
}

.status-CONFIRMED,
.status-RESERVED {
  background: #fff4df;
  color: var(--wine);
}

.form-control,
.form-select {
  background-color: #fffdf8;
  border-color: var(--line);
  border-radius: 13px;
  color: var(--ink);
  font-weight: 750;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(143, 16, 45, 0.55);
  box-shadow: 0 0 0 0.2rem rgba(143, 16, 45, 0.12);
}

.btn-gold,
.btn-warning,
.form-submit.booking-submit-button {
  --bs-btn-bg: var(--gold);
  --bs-btn-border-color: var(--gold);
  --bs-btn-color: #2e211d;
  --bs-btn-hover-bg: #d99621;
  --bs-btn-hover-border-color: #d99621;
  --bs-btn-hover-color: #2e211d;
  --bs-btn-active-bg: #d99621;
  --bs-btn-active-border-color: #d99621;
  border-radius: 13px;
  font-weight: 900;
}

.btn-wine,
.btn-primary {
  --bs-btn-bg: var(--wine);
  --bs-btn-border-color: var(--wine);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--wine-dark);
  --bs-btn-hover-border-color: var(--wine-dark);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--wine-dark);
  --bs-btn-active-border-color: var(--wine-dark);
  border-radius: 13px;
  font-weight: 900;
}

.btn-success {
  --bs-btn-bg: var(--green);
  --bs-btn-border-color: var(--green);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: #107c55;
  --bs-btn-hover-border-color: #107c55;
  --bs-btn-hover-color: #fff;
  border-radius: 13px;
  font-weight: 900;
}

.btn-soft,
.btn-outline-secondary {
  --bs-btn-bg: #f3ecdf;
  --bs-btn-border-color: #f3ecdf;
  --bs-btn-color: #51463d;
  --bs-btn-hover-bg: #eadfce;
  --bs-btn-hover-border-color: #eadfce;
  --bs-btn-hover-color: #2e211d;
  border-radius: 13px;
  font-weight: 900;
}

.btn-outline-danger {
  --bs-btn-color: var(--red);
  --bs-btn-border-color: #f1c7c4;
  --bs-btn-hover-bg: #fee9e8;
  --bs-btn-hover-border-color: #fee9e8;
  --bs-btn-hover-color: var(--red);
  border-radius: 13px;
  font-weight: 900;
}

.text-primary {
  color: var(--wine) !important;
}

.text-success {
  color: var(--green) !important;
}

.text-info {
  color: var(--blue) !important;
}

.text-warning {
  color: var(--gold) !important;
}

.text-gray-800 {
  color: var(--ink) !important;
}

.text-bg-success {
  background-color: #e8f5ef !important;
  color: var(--green) !important;
}

.text-bg-warning,
.text-bg-secondary {
  background-color: #fbf0d0 !important;
  color: #95720b !important;
}

.admin-panel,
.admin-card,
.branch-card,
.api-client-card {
  background: #fff;
  border: 1px solid rgba(231, 221, 206, 0.85) !important;
  box-shadow: 0 10px 22px rgba(83, 58, 35, 0.07);
}

.admin-panel {
  border-radius: 18px;
  padding: 18px;
}

.branch-card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}

.customer-card-grid,
.customer-history-list {
  display: grid;
  gap: 14px;
}

.branch-card,
.api-client-card,
.customer-card,
.customer-history-item {
  padding: 18px !important;
}

.customer-card,
.customer-history-item {
  background: #fff;
  border: 1px solid rgba(231, 221, 206, 0.85) !important;
  box-shadow: 0 10px 22px rgba(83, 58, 35, 0.07);
}

.customer-history-item {
  border-radius: 16px;
}

.customer-quickfill {
  margin-top: 0.55rem;
}

.customer-quickfill-card,
.customer-quickfill-note {
  background: #fff8e5;
  border: 1px solid rgba(246, 194, 62, 0.35);
  border-radius: 0.85rem;
  color: #6a514c;
  font-size: 0.82rem;
  padding: 0.75rem;
}

.customer-suggestion-list {
  background: #fff;
  border: 1px solid rgba(246, 194, 62, 0.35);
  border-radius: 0.95rem;
  box-shadow: 0 10px 20px rgba(83, 58, 35, 0.09);
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem;
}

.customer-suggestion-title {
  color: var(--app-primary-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 0 0.2rem;
  text-transform: uppercase;
}

.customer-suggestion-item {
  background: #fff8e5;
  border: 1px solid rgba(246, 194, 62, 0.28);
  border-radius: 0.75rem;
  color: #6a514c;
  display: grid;
  gap: 0.1rem;
  padding: 0.7rem;
  text-align: left;
}

.customer-suggestion-item:hover,
.customer-suggestion-item:focus {
  background: var(--app-primary-soft);
  border-color: rgba(246, 194, 62, 0.7);
  outline: 0;
}

.customer-suggestion-item strong {
  color: var(--app-dark);
}

.customer-suggestion-item span,
.customer-suggestion-item small {
  font-size: 0.8rem;
}

.customer-quickfill-card {
  display: grid;
  gap: 0.2rem;
}

.customer-quickfill-card strong {
  color: var(--app-dark);
}

.customer-quickfill-card small {
  color: #7a6a60;
  line-height: 1.5;
}

.area-list-item {
  background: #fbf7f0;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.user-table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(83, 58, 35, 0.07);
}

.user-table thead th {
  background: #fbf7f0;
  color: #625950;
}

.api-client-card code,
.user-username {
  color: #6a514c;
  font-weight: 750;
}

.bottom-nav {
  align-items: center;
  backdrop-filter: blur(10px);
  background: rgba(255, 253, 249, 0.95);
  border-top: 1px solid var(--line);
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 72px;
  height: calc(var(--bottom-nav-height) + var(--app-safe-area-bottom));
  left: 0;
  padding: 6px 14px 10px;
  padding-bottom: calc(10px + var(--app-safe-area-bottom));
  position: fixed;
  right: 0;
  z-index: 1030;
}

.nav-item {
  align-items: center;
  background: transparent;
  border: 0;
  color: #928b80;
  display: grid;
  font-size: 10px;
  font-weight: 850;
  gap: 2px;
  justify-items: center;
  line-height: 1.15;
  min-height: 46px;
  padding: 0;
  text-align: center;
}

.nav-item.active,
.nav-item.active .bottom-nav-icon {
  color: var(--wine);
}

.nav-item.disabled {
  opacity: 0.38;
  pointer-events: none;
}

.bottom-nav-icon {
  align-items: center;
  color: inherit;
  display: inline-flex;
  font-size: 16px;
  height: 18px;
  justify-content: center;
  line-height: 1;
  width: 18px;
}

.fab {
  background: var(--gold);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 10px 18px rgba(237, 174, 50, 0.3);
  color: #241916;
  display: grid;
  font-size: 22px;
  font-weight: 900;
  height: 56px;
  line-height: 1;
  margin: -16px auto 0;
  min-height: 56px;
  padding: 0;
  place-items: center;
  width: 56px;
}

.fab i {
  line-height: 1;
}

.fab.disabled {
  opacity: 0.45;
}

.booking-popup {
  align-items: flex-end;
  justify-content: center;
  padding: 0 12px;
}

.booking-popup-backdrop {
  background: rgba(38, 25, 25, 0.68);
}

.booking-popup-panel.bottom-sheet {
  background: var(--paper);
  border: 0;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -18px 42px rgba(45, 30, 24, 0.24);
  display: flex;
  flex-direction: column;
  max-height: 82svh;
  max-height: 82dvh;
  max-width: 430px;
  overflow: hidden;
  padding: 18px 0 0;
  position: relative;
  width: min(100%, 430px);
}

.sheet-handle {
  background: #d8c8ae;
  border-radius: 999px;
  flex: 0 0 auto;
  height: 5px;
  margin: 0 auto 16px;
  width: 55px;
}

.booking-popup-header {
  align-items: center;
  background: transparent;
  border-bottom: 0;
  padding: 0 22px 8px;
}

.booking-popup-header .eyebrow {
  color: var(--wine);
}

.booking-close-button {
  border-radius: 999px !important;
  min-height: 46px;
  padding: 0;
  width: 46px;
}

.booking-popup-body {
  overflow-y: auto;
  padding: 0 22px 28px;
}

.management-popup-body {
  padding-top: 8px;
}

.booking-public-form {
  display: grid;
  gap: 0;
}

.booking-step-label,
.booking-field-label {
  color: #625950;
  display: flex;
  font-size: 15px;
  font-weight: 850;
  gap: 8px;
  letter-spacing: 0;
  margin: 18px 0 8px;
  text-transform: none;
}

.booking-step-number {
  background: var(--wine);
  border-radius: 999px;
  color: #fff;
  display: inline-grid;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
  height: 25px;
  place-items: center;
  width: 25px;
}

.booking-date-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.booking-date-input {
  grid-column: 1 / -1;
  width: 100%;
}

.booking-date-chip,
.booking-date-input,
.booking-choice-card,
.booking-time-choice {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #5d554e;
  font-weight: 850;
  min-height: 55px;
  padding: 8px;
  text-align: center;
}

.booking-date-chip:hover,
.booking-date-chip.active,
.booking-choice-card:hover,
.booking-choice-card.active,
.booking-time-choice:hover,
.booking-time-choice.active {
  border-color: var(--wine);
  box-shadow: 0 0 0 0.2rem rgba(143, 16, 45, 0.12);
}

.booking-date-chip.active,
.booking-choice-card.active,
.booking-time-choice.active {
  background: var(--wine);
  color: #fff;
}

.booking-choice-card.active .booking-choice-name,
.booking-choice-card.active .booking-choice-sub {
  color: #fff;
}

.booking-branch-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
}

.booking-choice-card {
  min-height: 74px;
  text-align: left;
}

.booking-choice-name {
  color: var(--ink);
  font-weight: 950;
}

.booking-choice-sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: 3px;
}

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

.booking-time-choice {
  min-height: 48px;
}

.booking-stepper {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: inline-grid;
  gap: 0;
  grid-template-columns: 58px 80px 58px;
  min-height: 58px;
  overflow: visible;
}

.booking-stepper-button {
  background: #f3ecdf;
  border: 0;
  border-radius: 13px;
  color: #51463d;
  font-size: 24px;
  font-weight: 900;
  min-height: 58px;
}

.booking-stepper-button:last-child {
  background: var(--wine);
  color: #fff;
}

.booking-stepper-value {
  color: var(--ink);
  display: grid;
  font-size: 28px;
  font-weight: 900;
  place-items: center;
}

.booking-two-column {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
}

.booking-submit-button {
  margin-top: 18px;
  min-height: 58px;
  width: 100%;
}

.booking-edit-public-form .booking-submit-button {
  margin-top: 0;
}

.booking-edit-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.required-mark {
  color: var(--red);
}

.login-shell {
  background: linear-gradient(150deg, var(--wine), #5b071d);
  color: #fff;
}

.browser-bar {
  background: #eee6db;
  flex: 0 0 auto;
  height: 56px;
  margin: 0;
  padding: 10px 18px;
}

.browser-pill {
  align-items: center;
  background: #fff;
  border-radius: 12px;
  color: #5b524b;
  display: flex;
  font-size: 14px;
  gap: 12px;
  height: 36px;
  justify-content: space-between;
  padding: 0 14px;
}

.login-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 44px 30px;
}

.login-panel {
  background: #fff;
  border-radius: 22px;
  color: var(--ink);
  padding: 24px;
}

.auth-logo {
  display: block;
  filter: brightness(0) invert(1);
  max-height: 62px;
  max-width: 150px;
  object-fit: contain;
}

.quick-login {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.pill,
.tag {
  align-items: center;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #5b5148;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  gap: 6px;
  justify-content: center;
  min-height: 34px;
  padding: 7px 13px;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .booking-board {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 460px) {
  .prototype-stage {
    background: var(--cream);
    padding: 0;
  }

  .mobile-shell {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    height: 100svh;
    height: 100dvh;
    min-height: 100svh;
    min-height: 100dvh;
    width: 100%;
  }

  .booking-popup {
    padding: 0;
  }

  .booking-popup-panel.bottom-sheet {
    max-height: 86svh;
    max-height: 86dvh;
    max-width: 100%;
    width: 100%;
  }
}

/* Desktop admin layout inspired by SB Admin 2 */
.desktop-sidebar,
.desktop-topbar {
  display: none;
}

.desktop-topbar.desktop-topbar-with-scope {
  background: var(--cream);
  display: block;
  flex: 0 0 auto;
  max-width: 100%;
  overflow: hidden;
  padding: 12px 14px 0;
}

.desktop-topbar-scope {
  margin-bottom: 0 !important;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.desktop-topbar-scope .scope-field {
  min-width: 0;
}

@media (max-width: 991.98px) {
  .desktop-topbar.desktop-topbar-with-scope {
    padding: 8px 10px 0;
  }

  .desktop-topbar-scope {
    display: grid !important;
    gap: 0.4rem !important;
    grid-template-columns: minmax(0, 1fr);
    padding: 0.5rem;
    position: static;
    top: auto;
    z-index: auto;
  }

  .desktop-topbar-scope .scope-branch-field {
    grid-column: 1;
    width: 100%;
  }

  .desktop-topbar-scope .scope-date-field {
    grid-column: 1;
    width: 100%;
  }

  .desktop-topbar-scope-with-date {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .desktop-topbar-scope-with-date .scope-date-field {
    grid-column: 2 / 4;
  }

  .desktop-topbar-scope .dashboard-date-row {
    display: grid;
    gap: 0.4rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desktop-topbar-scope .booking-date-chip,
  .desktop-topbar-scope .booking-date-input,
  .desktop-topbar-scope .form-select {
    font-size: 0.78rem;
    min-height: 40px;
    min-width: 0;
  }

  .desktop-topbar-scope .booking-date-chip,
  .desktop-topbar-scope .booking-date-input {
    padding: 0.45rem 0.35rem;
  }

  .desktop-topbar-scope .booking-date-chip {
    white-space: nowrap;
  }

  .desktop-topbar-scope .dashboard-date-input {
    display: none;
  }
}

@media (min-width: 992px) {
  .dashboard-body {
    background: #f7f1e8;
    overflow: hidden;
  }

  .dashboard-body .prototype-stage {
    background: #f7f1e8;
    display: block;
    min-height: 100svh;
    min-height: 100dvh;
    padding: 0;
  }

  .dashboard-shell {
    background: #f7f1e8;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: 16.75rem minmax(0, 1fr);
    grid-template-rows: minmax(6.5rem, auto) minmax(0, 1fr);
    height: 100svh;
    height: 100dvh;
    min-height: 100svh;
    min-height: 100dvh;
    overflow: hidden;
    width: 100%;
  }

  .dashboard-app-header,
  .bottom-nav {
    display: none;
  }

  .desktop-sidebar {
    background: linear-gradient(180deg, var(--wine), var(--wine-dark));
    box-shadow: 0.35rem 0 1.5rem rgba(45, 30, 24, 0.14);
    color: #fff;
    display: flex;
    flex-direction: column;
    grid-column: 1;
    grid-row: 1 / span 2;
    min-height: 0;
    overflow-y: auto;
    padding: 1.25rem 1rem;
  }

  .desktop-sidebar-brand {
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    display: flex;
    justify-content: center;
    min-height: 4.75rem;
    padding: 0.85rem;
  }

  .desktop-sidebar-logo {
    display: block;
    filter: brightness(0) invert(1);
    max-height: 3.15rem;
    max-width: 11rem;
    object-fit: contain;
    width: auto;
  }

  .desktop-sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    margin: 1rem 0;
  }

  .desktop-sidebar-heading {
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    padding: 0 0.75rem 0.5rem;
    text-transform: uppercase;
  }

  .desktop-sidebar-nav {
    display: grid;
    gap: 0.45rem;
  }

  .desktop-nav-link {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0.85rem;
    color: rgba(255, 255, 255, 0.78);
    display: flex;
    font-weight: 850;
    gap: 0.75rem;
    min-height: 3.25rem;
    padding: 0.75rem;
    text-align: left;
    width: 100%;
  }

  .desktop-nav-link:hover,
  .desktop-nav-link:focus,
  .desktop-nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
  }

  .desktop-nav-link.active {
    box-shadow: inset 0.25rem 0 0 var(--gold);
  }

  .desktop-nav-action {
    background: var(--gold);
    color: #2e211d;
  }

  .desktop-nav-action:hover,
  .desktop-nav-action:focus {
    background: #d99621;
    color: #2e211d;
  }

  .desktop-nav-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.74rem;
    font-weight: 950;
    height: 2.15rem;
    justify-content: center;
    width: 2.15rem;
  }

  .desktop-nav-icon i {
    line-height: 1;
  }

  .desktop-nav-action .desktop-nav-icon {
    background: rgba(46, 33, 29, 0.12);
  }

  .desktop-sidebar-user {
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
    padding: 0.85rem;
  }

  .desktop-sidebar-user > .min-w-0 {
    flex: 1 1 0;
  }

  .desktop-sidebar-user .small {
    color: rgba(255, 255, 255, 0.7);
  }

  .desktop-sidebar-logout-form {
    flex: 1 0 100%;
    margin: 0;
  }

  .desktop-sidebar-logout-button {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.7rem;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 850;
    min-height: 2.5rem;
    padding: 0.45rem 0.7rem;
    text-align: center;
    width: 100%;
  }

  .desktop-sidebar-logout-button:hover,
  .desktop-sidebar-logout-button:focus {
    background: rgba(255, 255, 255, 0.2);
  }

  .desktop-topbar {
    align-items: center;
    background: var(--paper);
    border-bottom: 1px solid rgba(231, 221, 206, 0.8);
    box-shadow: 0 0.15rem 1.1rem rgba(45, 30, 24, 0.08);
    display: grid;
    gap: 1rem;
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    justify-content: space-between;
    min-width: 0;
    padding: 1rem 1.75rem;
    z-index: 4;
  }

  .desktop-topbar.desktop-topbar-with-scope {
    background: var(--paper);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 1rem 1.75rem;
  }

  .desktop-topbar:not(.desktop-topbar-with-scope) {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .desktop-topbar .eyebrow {
    color: var(--wine);
  }

  .desktop-topbar-scope {
    align-items: flex-end !important;
    box-shadow: none;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
    margin: 0 !important;
    min-width: 0;
    padding: 0.75rem;
    position: static;
    width: 100%;
  }

  .desktop-topbar-scope .scope-branch-field {
    flex: 1 1 13rem;
    max-width: 18rem;
    width: auto;
  }

  .desktop-topbar-scope .scope-date-field {
    flex: 999 1 18rem;
    min-width: 0;
  }

  .desktop-topbar-scope .dashboard-date-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .desktop-topbar-scope .booking-date-chip,
  .desktop-topbar-scope .booking-date-input,
  .desktop-topbar-scope .form-select {
    min-height: 2.75rem;
  }

  .desktop-topbar-scope .booking-date-chip {
    padding-inline: 0.8rem;
  }

  .desktop-topbar-scope .dashboard-date-input {
    flex: 1 1 11.75rem;
    grid-column: auto;
    min-width: min(100%, 10rem);
    width: auto;
  }

  .dashboard-page-main {
    background: #f7f1e8;
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    overflow-y: auto;
    padding: 1.5rem 1.75rem 2rem;
  }

  .dashboard-page-main .table-status-page {
    padding-bottom: 6rem;
  }

  .dashboard-page-main .booking-board {
    padding-bottom: 6rem;
  }

  .dashboard-page-main .booking-quick-search-toolbar,
  .dashboard-page-main .table-status-toolbar {
    backdrop-filter: blur(14px);
    background: rgba(255, 253, 249, 0.96);
    border-top: 1px solid rgba(231, 221, 206, 0.88);
    bottom: 0;
    box-shadow: 0 -0.75rem 1.65rem rgba(83, 58, 35, 0.11);
    left: 16.75rem;
    margin: 0 !important;
    padding: 0.85rem 1.75rem calc(0.85rem + var(--app-safe-area-bottom));
    position: fixed;
    right: 0;
    z-index: 1029;
  }

  .dashboard-page-main .booking-quick-search-toolbar .form-control,
  .dashboard-page-main .table-status-search,
  .dashboard-page-main .table-booking-create-button {
    min-height: 46px;
  }

  .dashboard-page-main .metric-grid {
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1.5rem !important;
  }

  .dashboard-page-main .metric {
    align-content: center;
    background: var(--paper);
    border: 1px solid rgba(231, 221, 206, 0.88);
    border-left: 0.3rem solid var(--wine);
    box-shadow: 0 0.55rem 1.3rem rgba(83, 58, 35, 0.07);
    justify-items: start;
    min-height: 7rem;
    padding: 1.15rem 1.25rem;
    text-align: left;
  }

  .dashboard-page-main .metric.green {
    border-left-color: var(--green);
  }

  .dashboard-page-main .metric strong {
    font-size: 2rem;
  }

  .dashboard-page-main .metric small {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .dashboard-page-main .booking-board {
    align-items: start;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-page-main .booking-section {
    min-width: 0;
  }

  .dashboard-page-main .booking-section > .section-title {
    background: var(--paper);
    border: 1px solid rgba(231, 221, 206, 0.88);
    border-radius: 1rem;
    box-shadow: 0 0.55rem 1.3rem rgba(83, 58, 35, 0.06);
    margin: 0 0 1rem;
    padding: 1rem 1.15rem;
  }

  .dashboard-page-main .booking-tabs {
    margin-right: 0;
    padding-right: 0;
  }

  .dashboard-page-main .booking-card-list {
    gap: 0.75rem;
  }

  .dashboard-page-main .booking-card-body {
    padding: 1rem 1.1rem;
  }

  .dashboard-page-main .booking-summary-line {
    flex-wrap: nowrap;
    gap: 0.45rem;
    overflow: hidden;
    white-space: nowrap;
  }

  .dashboard-page-main .booking-time,
  .dashboard-page-main .booking-customer {
    font-size: 1rem;
  }

  .dashboard-page-main .booking-customer {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dashboard-page-main .action-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
  }

  .dashboard-page-main .booking-tables {
    flex: 1 1 12rem;
    grid-column: auto;
    min-height: 2.5rem;
  }

  .dashboard-page-main .booking-action-btn {
    width: auto;
  }

  .dashboard-page-main .admin-panel {
    border-radius: 1rem;
    padding: 1.5rem;
  }

  .dashboard-page-main .branch-card-grid {
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  }

  .dashboard-page-main .user-table-wrap {
    border-radius: 1rem;
  }

  .dashboard-page-main .api-client-card,
  .dashboard-page-main .branch-card {
    border-radius: 1rem !important;
  }

  .dashboard-body .booking-popup {
    align-items: center;
    padding: 2rem;
  }

  .dashboard-body .booking-popup-panel.bottom-sheet {
    border-radius: 1.5rem;
    max-height: calc(100svh - 4rem);
    max-height: calc(100dvh - 4rem);
    max-width: 900px;
    width: min(900px, calc(100vw - 4rem));
  }

  .dashboard-body .booking-popup-body {
    padding: 0 2rem 2rem;
  }

  .dashboard-body .booking-branch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-body .booking-time-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .dashboard-body .booking-two-column {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }
}

@media (min-width: 1280px) {
  .dashboard-shell {
    grid-template-columns: 17.5rem minmax(0, 1fr);
  }

  .dashboard-page-main {
    padding: 1.75rem 2rem 2.25rem;
  }

  .dashboard-page-main .booking-quick-search-toolbar,
  .dashboard-page-main .table-status-toolbar {
    left: 17.5rem;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
