/* Bid2Stay 29.0.7 — Premium UI and responsive integrity standard */
:root {
  --b2s-ui-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --b2s-ui-text: #172033;
  --b2s-ui-muted: #667085;
  --b2s-ui-line: rgba(16, 24, 40, 0.12);
  --b2s-ui-focus: #f5ad16;
  --b2s-ui-radius-sm: 10px;
  --b2s-ui-radius-md: 16px;
  --b2s-ui-radius-lg: 22px;
  --b2s-ui-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  --b2s-ui-page-pad: clamp(16px, 3vw, 32px);
  --b2s-ui-section-gap: clamp(24px, 4vw, 48px);
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow-x: clip;
  font-family: var(--b2s-ui-font);
  font-size: 16px;
  line-height: 1.55;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:where(h1, h2, h3, h4, h5, h6, p, span, strong, small, label, th, td, li, a, button) {
  min-width: 0;
  max-width: 100%;
}

:where(h1, h2, h3, h4, h5, h6) {
  margin-block-start: 0;
  color: inherit;
  font-family: var(--b2s-ui-font);
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

:where(h1) { font-size: clamp(2rem, 5vw, 4.5rem); }
:where(h2) { font-size: clamp(1.5rem, 3.2vw, 2.75rem); }
:where(h3) { font-size: clamp(1.1rem, 2vw, 1.45rem); }

:where(p, li, td, th, label, small) {
  overflow-wrap: anywhere;
  word-break: normal;
}

:where(p) { text-wrap: pretty; }
:where(img, svg, video, canvas, iframe) { max-width: 100%; }
:where(img, video) { height: auto; }

:where(.layout, .admin-shell, .admin-main, .main, .page, .public-shell, .b2s-home-shell,
  .grid, .metrics, .dashboard-grid, .admin-grid, .guest-grid, .hotel-grid, .card-grid,
  .form, .form-grid, .row, .toolbar, .actions, .button-row, .filter-row,
  .b2s30-destination-grid, .b2s30-card-content, .b2s30-card-actions,
  .b2s-geo-layout, .b2s-geo-toolbar, .b2s-geo-controls) {
  min-width: 0;
  max-width: 100%;
}

:where(.grid, .metrics, .dashboard-grid, .admin-grid, .guest-grid, .hotel-grid, .card-grid,
  .form-grid, .b2s30-destination-grid) > * {
  min-width: 0;
  max-width: 100%;
}

:where(.card, .panel, .surface, .content-card, .admin-card, .dashboard-panel,
  .destination-card, .b2s30-destination-card, .b2s-auth-card, .b2s-principle) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-radius: var(--b2s-ui-radius-md);
}

:where(button, .btn, [role="button"], a.btn, a[class*="button"], input[type="submit"], input[type="button"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 16px;
  border-radius: var(--b2s-ui-radius-sm);
  font-family: var(--b2s-ui-font);
  font-size: clamp(0.875rem, 1.1vw, 0.975rem);
  font-weight: 720;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

:where(button, .btn, [role="button"], a.btn, a[class*="button"]):not(:disabled) {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  :where(button, .btn, [role="button"], a.btn, a[class*="button"]):not(:disabled):hover {
    transform: translateY(-1px);
  }
}

:where(button, .btn, [role="button"], a, input, select, textarea):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--b2s-ui-focus) 48%, transparent);
  outline-offset: 2px;
}

:where(button, input, select, textarea):disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border-radius: var(--b2s-ui-radius-sm);
  font-family: var(--b2s-ui-font);
  font-size: 16px;
  line-height: 1.35;
}

:where(textarea) {
  min-height: 112px;
  resize: vertical;
}

:where(label) {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 690;
  line-height: 1.35;
}

:where(.field, .s04-field, .b23-field, .b2s-auth-field, [class*="-field"]) {
  min-width: 0;
  max-width: 100%;
}

:where(.actions, .button-row, .card-actions, .b2s30-card-actions, .header-actions,
  .b2s-global-actions, .b2s-mobile-overflow-actions, [class*="-actions"]) {
  min-width: 0;
  max-width: 100%;
  gap: clamp(8px, 1.5vw, 12px);
}

:where(.admin-nav, .sidebar, .b2s-global-nav, .b2s-guest-desktop-nav, .b2s-provider-desktop-nav) a {
  min-width: 0;
  max-width: 100%;
  line-height: 1.25;
}

:where(.b2s-nav-label) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:where(.table-wrap, [class*="table-wrap"], [class*="table-scroll"]) {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

:where(table) {
  width: 100%;
  border-collapse: collapse;
}

:where(th, td) {
  padding: 12px 14px;
  vertical-align: middle;
  line-height: 1.35;
}

:where(.status, [role="status"], [role="alert"], .toast, #toast) {
  max-width: min(100%, 680px);
  overflow-wrap: anywhere;
}

@media (max-width: 767px) {
  :root { --b2s-ui-page-pad: 16px; }

  body { font-size: 15.5px; }

  :where(.main, .admin-main, .page, .public-section, .b2s-about-section,
    .b2s-home-section, .b2s30-shell, [class$="-shell"]):not(.admin-shell) {
    min-width: 0;
  }

  :where(.main, .admin-main) {
    padding-inline: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  :where(.card, .panel, .surface, .content-card, .admin-card, .dashboard-panel,
    .b2s-auth-card, .b2s-principle) {
    padding: clamp(15px, 4vw, 20px);
  }

  :where(.grid, .dashboard-grid, .admin-grid, .guest-grid, .hotel-grid, .card-grid,
    .form-grid, .metrics, .b2s30-destination-grid) {
    grid-template-columns: minmax(0, 1fr);
  }

  :where(.row, .toolbar, .filter-row, .actions, .button-row, .card-actions,
    .b2s30-card-actions, [class*="-actions"]) {
    flex-wrap: wrap;
  }

  :where(.actions, .button-row, .card-actions, .b2s30-card-actions) > :where(button, .btn, a[class*="button"]) {
    flex: 1 1 148px;
  }

  :where(.b2s-mobile-overflow-panel, .admin-nav, .sidebar) {
    max-width: min(88vw, 340px);
  }

  :where(.b2s-mobile-guest-tools, .b2s-mobile-overflow-panel, [class*="bottom-nav"], [class*="floating"]) {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  :where(th, td) { padding: 10px 11px; }
}

@media (max-width: 420px) {
  :where(button, .btn, [role="button"], a.btn, a[class*="button"], input[type="submit"]) {
    min-height: 46px;
    padding-inline: 13px;
    font-size: 0.9rem;
  }

  :where(.b2s-global-header-inner, .topbar-inner, .b2s-admin-topbar-inner) {
    padding-inline: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Bid2Stay 29.0.8 — interaction, feedback and accessibility integrity */
:root {
  --b2s-ux-focus: #a86900;
  --b2s-ux-danger: #b42318;
  --b2s-ux-danger-soft: #fff4f2;
  --b2s-ux-success: #146c43;
}

.b2s-skip-link {
  position: fixed;
  inset: 12px auto auto 12px;
  z-index: 100000;
  max-width: calc(100vw - 24px);
  padding: 11px 16px;
  border: 2px solid #fff;
  border-radius: 10px;
  background: #102f28;
  color: #fff;
  font-size: .9375rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
  transform: translateY(-180%);
  transition: transform .16s ease;
}

.b2s-skip-link:focus {
  color: #fff;
  transform: translateY(0);
}

#b2s-main-content {
  scroll-margin-top: 88px;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--b2s-ux-focus) !important;
  outline-offset: 3px !important;
}

:where(input, select, textarea).b2s-ux-invalid,
:where(input, select, textarea)[aria-invalid="true"] {
  border-color: var(--b2s-ux-danger) !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .14) !important;
}

.b2s-connection-status {
  position: fixed;
  inset: auto 18px calc(18px + env(safe-area-inset-bottom, 0px)) auto;
  z-index: 99999;
  width: min(420px, calc(100vw - 36px));
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  background: #102f28;
  color: #fff;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
}

.b2s-connection-status[data-state="offline"] {
  background: #7a271a;
}

:where(.status, [data-page-status], [role="status"], [aria-live]) {
  overflow-wrap: anywhere;
}

:where(.status, [data-page-status])[data-state="error"],
:where(.status, [data-page-status]).error {
  color: var(--b2s-ux-danger);
}

:where(.status, [data-page-status])[data-state="success"],
:where(.status, [data-page-status]).success {
  color: var(--b2s-ux-success);
}

@media (max-width: 767px) {
  #b2s-main-content {
    scroll-margin-top: 72px;
  }

  .b2s-connection-status {
    inset: auto 12px calc(12px + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 24px);
    padding: 12px 14px;
  }

  .b2s-skip-link {
    inset: 8px 8px auto;
    max-width: none;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .b2s-skip-link {
    transition: none;
  }
}

/* =====================================================================
   Bid2Stay 29.0.9.1 — Final UI System Consolidation & Production Visual Lock
   Loaded last on every page. Visual-system only: no routing/data/business logic.
   ===================================================================== */
:root {
  /* One dependency-free product typography stack. */
  --b2s-system-font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --b2s-ui-font: var(--b2s-system-font) !important;
  --b2s-font: var(--b2s-system-font) !important;
  --b2s-font-family: var(--b2s-system-font) !important;
  --b2s-global-font: var(--b2s-system-font) !important;

  /* Canonical production tokens. */
  --b2s-lock-text: #172437;
  --b2s-lock-muted: #667085;
  --b2s-lock-border: #e1e6eb;
  --b2s-lock-surface: #ffffff;
  --b2s-lock-soft: #f7f8f9;
  --b2s-lock-charcoal: #0c0f12;
  --b2s-lock-navy: #071828;
  --b2s-lock-gold: #f3b51b;
  --b2s-lock-radius-control: 12px;
  --b2s-lock-radius-card: 16px;
  --b2s-lock-radius-panel: 18px;
  --b2s-lock-control-h: 46px;
  --b2s-lock-touch-h: 44px;
  --b2s-lock-shadow: 0 1px 2px rgba(16,24,40,.025), 0 10px 28px rgba(16,24,40,.05);
  --b2s-lock-shadow-hover: 0 2px 5px rgba(16,24,40,.035), 0 14px 32px rgba(16,24,40,.065);

  /* Bridge historical variables to one system without rewriting page logic. */
  --b2s-ui-text: var(--b2s-lock-text) !important;
  --b2s-ui-muted: var(--b2s-lock-muted) !important;
  --b2s-ui-border: var(--b2s-lock-border) !important;
  --b2s-ui-border-strong: #d5dce3 !important;
  --b2s-ui-surface: var(--b2s-lock-surface) !important;
  --b2s-ui-surface-soft: var(--b2s-lock-soft) !important;
  --b2s-ui-radius: var(--b2s-lock-radius-card) !important;
  --b2s-clean-text: var(--b2s-lock-text) !important;
  --b2s-clean-muted: var(--b2s-lock-muted) !important;
  --b2s-clean-radius: var(--b2s-lock-radius-card) !important;
  --b2s-prod-ink: var(--b2s-lock-text) !important;
  --b2s-prod-muted: var(--b2s-lock-muted) !important;
  --b2s-prod-line: var(--b2s-lock-border) !important;
  --b2s-prod-gold: #d8a51d !important;
}

/* Typography lock: all product text and controls use one family; code stays monospace. */
body,
button,
input,
select,
textarea,
optgroup {
  font-family: var(--b2s-system-font) !important;
}

:where(h1,h2,h3,h4,h5,h6) {
  font-family: var(--b2s-system-font) !important;
  font-feature-settings: "kern" 1, "liga" 1;
}

:where(code,kbd,samp,pre) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
}

/* Prevent accidental text spill while preserving readable natural wrapping. */
:where(body, main, section, article, aside, header, footer, nav, form, fieldset, div, label) {
  min-width: 0;
}

:where(h1,h2,h3,h4,h5,h6,p,li,td,th,label,small,strong,a,button,.status,[role="status"],[role="alert"]) {
  overflow-wrap: break-word;
  word-break: normal;
}

/* Canonical controls. Existing semantic colours remain page-owned. */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
  min-height: var(--b2s-lock-control-h);
  border-radius: var(--b2s-lock-radius-control);
  font-size: 16px;
}

:where(button, .btn, [role="button"], a.btn, a[class*="button"], input[type="submit"], input[type="button"]) {
  min-height: var(--b2s-lock-touch-h);
  font-family: var(--b2s-system-font) !important;
  font-weight: 700;
  text-underline-offset: 2px;
}

/* Do not let compact controls split into awkward two-line labels. */
:where(.topbar, .b2s-global-header, .b2s-admin-topbar, .admin-nav, .sidebar, .b2s-mobile-guest-tools,
       .b2s2834-admin-mobile-quick, .b2s2880-filter-panel, .b2s2057-map-tools)
  :where(button, .btn, a[role="button"], a.btn) {
  white-space: nowrap;
}

/* Shared card/panel geometry. We intentionally do not override page colours. */
:where(.card, .panel, .surface, .content-card, .admin-card, .dashboard-panel,
       .b2s-auth-card, .b2s-principle, [class$="-card"], [class*="-card "]) {
  min-width: 0;
}

/* Images and logos must never enlarge their layout boxes or distort. */
:where(img, svg, video, canvas) {
  max-width: 100%;
}

:where(header img, .logo img, [class*="brand"] img) {
  object-fit: contain;
}

/* Dense operational data stays inside the viewport rather than forcing page overflow. */
:where(.table-wrap, [class*="table-wrap"], [class*="table-scroll"], [class*="intel-list"], [class*="data-table"]) {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

:where(table) {
  max-width: 100%;
}

/* Admin visual discipline: keep the command centre compact and scannable. */
.admin-main :where(.dashboard-hero, .dashboard-panel, .b2s2880-filter-panel, [class*="admin-card"]) {
  min-width: 0;
}

.admin-main :where(.dashboard-section-head, .b2s2880-filter-heading, [class*="toolbar"], [class*="actions"]) {
  min-width: 0;
  gap: clamp(8px, 1.25vw, 14px);
}

.admin-main :where(.dashboard-section-head > *, .b2s2880-filter-heading > *) {
  min-width: 0;
}

/* Navigation labels stay aligned and badges cannot force overflow. */
:where(.admin-nav a, .sidebar a, .b2s-guest-desktop-nav a, .b2s-provider-desktop-nav a,
       .b2s-mobile-overflow-links a) {
  min-width: 0;
}

:where(.b2s-nav-badge, [data-nav-badge]) {
  flex: 0 0 auto;
}

/* Consistent interactive feedback without noisy movement. */
@media (hover:hover) and (pointer:fine) {
  :where(button, .btn, [role="button"], a.btn, a[class*="button"]):not(:disabled):hover {
    transform: translateY(-1px);
  }
}

/* Mobile product surface lock. */
@media (max-width: 767px) {
  :root {
    --b2s-ui-page-pad: 14px;
    --b2s-mobile-pad: 14px !important;
    --b2s-m-page: 14px !important;
    --b2s-m-inner: 14px !important;
    --b2s-m-gap: 10px !important;
    --b2s-m-control: 46px !important;
  }

  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  body {
    font-size: 15.5px;
  }

  :where(.main, .admin-main, .page, main) {
    min-width: 0;
    max-width: 100%;
  }

  /* All common grid systems collapse cleanly before content is squeezed. */
  :where(.grid, .metrics, .dashboard-grid, .admin-grid, .guest-grid, .hotel-grid, .card-grid,
         .form-grid, .b2s30-destination-grid, .b2s2880-kpis, .b2s2880-main-grid,
         .b2s2880-two-grid, .b2s2880-health-grid, .b2s2880-commercial-grid) {
    min-width: 0;
  }

  :where(.row, .toolbar, .filter-row, .actions, .button-row, .card-actions,
         .b2s30-card-actions, [class*="-actions"]) {
    min-width: 0;
    max-width: 100%;
  }

  /* Mobile forms must not trigger iOS zoom or horizontal spill. */
  :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    width: 100%;
    max-width: 100%;
    font-size: 16px !important;
  }

  :where(button, .btn, [role="button"], a.btn, a[class*="button"], input[type="submit"]) {
    min-height: 46px;
  }

  /* Fixed/floating product navigation respects safe areas. */
  :where(.b2s-mobile-guest-tools, .b2s2834-admin-mobile-quick, [class*="bottom-nav"], [class*="floating"]) {
    max-width: 100vw;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  }

  .b2s-mobile-overflow-panel {
    max-width: min(90vw, 360px);
    max-height: min(78vh, 620px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  /* Admin tables stay usable instead of shrinking text below legibility. */
  .admin-main :where(table) {
    min-width: 680px;
  }

  .admin-main :where(.b2s2880-kpis) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .admin-main :where(.b2s2880-kpis) {
    grid-template-columns: minmax(0, 1fr);
  }

  :where(.actions, .button-row, .card-actions, .b2s30-card-actions) > :where(button, .btn, a[class*="button"]) {
    flex-basis: 100%;
  }
}

@media (max-width: 360px) {
  :root {
    --b2s-ui-page-pad: 12px;
    --b2s-mobile-pad: 12px !important;
    --b2s-m-page: 12px !important;
  }
}

/* 200% zoom / narrow desktop resilience. */
@media (min-width: 768px) and (max-width: 1100px) {
  :where(.header-actions, .b2s-guest-desktop-nav, .b2s-provider-desktop-nav) {
    min-width: 0;
  }

  :where(.admin-main, .main, main) {
    min-width: 0;
  }
}

/* Motion is already restrained; respect the OS preference globally. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
