/*
  Rentoo design tokens — SHARED for all feature agents.
  ========================================================
  Spacing:   --space-1 … --space-8, --space-page, --space-card, --space-card-gap, --space-row
  Controls:  --control-height, --control-box, --row-height, --nav-hit
  Type:      --font-size-xs|sm|md|base|lg|xl
  Icons:     --icon-size-sm|md|lg
  Motion:    --motion-fast (140ms) | --motion-normal (200ms) | --motion-slow (320ms)
             --transition-fast|normal|slow, --ease-standard, --ease-out
  Z-index:   --z-base | --z-header | --z-sidebar | --z-nav | --z-dropdown
             --z-sheet | --z-modal | --z-modal-elevated | --z-toast
  Chrome:    --app-header-height, --app-bottom-nav-height, --app-safe-bottom

  Overlays: import useFeatureOverlay(isOpen, onClose, id) in feature modals.
  Shell closes all overlays on tab change via closeAllOverlays().

  Skeleton:  .app-skeleton, .app-skeleton-line, .page-skeleton (see App.css)
  Animate:   .shell-pane--enter, .anim-fade-up, .anim-stagger, .anim-press, .tap-bounce
             Global tap + tab enter in App.css — respect prefers-reduced-motion
*/

:root {
  /* Compat shim — always 1 */
  --ui-scale: 1;

  /* Soft mesh glass — reference law (pink → indigo → cream) */
  --bg-color: #f7f7f5;
  --bg-gradient: linear-gradient(
    165deg,
    #fce7f3 0%,
    #e0e7ff 42%,
    #fff7ed 78%,
    #f7f7f5 100%
  );
  --surface: rgba(255, 255, 255, 0.72);
  --card-bg: #ffffff;
  --primary: #7c5cfc;
  --primary-light: #ede9fe;
  --primary-hover: #6d4eef;
  --accent: #7c5cfc;
  --accent-light: #ede9fe;
  --text-dark: #111827;
  --text-muted: #9ca3af;
  --accent-green: #65a30d;
  --accent-green-light: #ecfccb;
  --warning: #fb923c;
  --warning-light: #ffedd5;
  --border-color: rgba(26, 26, 26, 0.08);
  --danger: #fb7185;
  --danger-light: #ffe4e6;
  --pastel-blue: #e0e7ff;
  --pastel-purple: #f5f3ff;
  --pastel-peach: #ffedd5;
  --pastel-mint: #ecfccb;
  --pastel-rose: #fce7f3;
  --radius-sm: 20px;
  --radius-md: 24px;
  --radius-lg: 28px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 10px;
  --space-4: 12px;
  --space-5: 14px;
  --space-6: 16px;
  --space-7: 18px;
  --space-8: 22px;
  --space-page: 14px;
  --space-card: 14px;
  --space-card-gap: 10px;
  --space-row: 10px;
  --control-height: 48px;
  --control-box: 42px;
  --row-height: 52px;
  --nav-hit: 44px;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-md: 14px;
  --font-size-base: 16px;
  --font-size-lg: 17px;
  --font-size-xl: 22px;
  --icon-size-sm: 16px;
  --icon-size-md: 18px;
  --icon-size-lg: 22px;
  --app-header-height: 56px;
  --app-bottom-nav-height: 64px;

  /* Motion — Operate app: clear tap ack + visible tab continuity */
  --motion-fast: 140ms;
  --motion-normal: 280ms;
  --motion-slow: 380ms;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-press: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: var(--motion-fast) var(--ease-standard);
  --transition-normal: var(--motion-normal) var(--ease-standard);
  --transition-slow: var(--motion-slow) var(--ease-out);
  --press-scale: 0.94;
  --press-scale-soft: 0.97;

  /* Modal / sheet scrim — dim + frosted glass behind every overlay */
  --overlay-scrim: rgba(15, 23, 42, 0.42);
  --overlay-blur: blur(16px);

  /* Z-index stack */
  --z-base: 1;
  --z-header: 50;
  --z-sidebar: 100;
  --z-nav: 1000;
  --z-dropdown: 1500;
  --z-sheet: 1900;
  --z-modal: 2000;
  --z-modal-elevated: 2100;
  --z-toast: 12500;

  --shadow-xs: 0 4px 14px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.08);
  --shadow-focus: 0 0 0 4px rgba(124, 92, 252, 0.22);
  --app-vv-height: 100vh;
  --app-vv-offset-top: 0px;
  --app-keyboard-inset: 0px;
  --app-safe-bottom: env(safe-area-inset-bottom, 0px);
  --app-bottom-nav-clearance: 0px;
}

@supports (height: 100dvh) {
  :root {
    --app-vv-height: 100dvh;
  }
}

@media (min-width: 768px) {
  :root {
    --space-page: 16px;
    --space-card: 18px;
    --space-card-gap: 12px;
    --control-height: 46px;
    --control-box: 42px;
    --font-size-xs: 12px;
    --font-size-sm: 13px;
    --font-size-md: 15px;
    --font-size-lg: 20px;
    --app-header-height: 68px;
    --app-bottom-nav-height: 0px;
    --app-bottom-nav-clearance: 0px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
}

html,
body,
#root {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

@supports (height: 100dvh) {
  html,
  body,
  #root {
    height: 100dvh;
    max-height: 100dvh;
  }
}

body {
  font-size: var(--font-size-base);
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-dark);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

/* Production parity: body.dark-mode + rentoo_theme localStorage */
body.dark-mode {
  --bg-color: #121218;
  --bg-gradient: linear-gradient(165deg, #1a1625 0%, #121218 55%, #16141a 100%);
  --surface: #1e1e26;
  --card-bg: #1e1e26;
  --text-dark: #f3f4f6;
  --text-muted: #a1a1aa;
  --border-color: rgba(255, 255, 255, 0.1);
  --primary: #9b87ff;
  --primary-light: rgba(124, 92, 252, 0.22);
  --primary-hover: #b4a3ff;
  --accent: #9b87ff;
  --accent-light: rgba(124, 92, 252, 0.22);
  --accent-green-light: rgba(61, 154, 106, 0.18);
  --warning-light: rgba(224, 160, 74, 0.18);
  --danger-light: rgba(224, 91, 106, 0.18);
  --pastel-blue: rgba(99, 102, 241, 0.18);
  --pastel-purple: rgba(124, 92, 252, 0.16);
  --pastel-peach: rgba(251, 146, 60, 0.16);
  --pastel-mint: rgba(101, 163, 13, 0.16);
  --pastel-rose: rgba(244, 114, 182, 0.14);
  --shadow-xs: 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 22px 54px rgba(0, 0, 0, 0.4);
  --shadow-focus: 0 0 0 4px rgba(155, 135, 255, 0.28);
  --overlay-scrim: rgba(0, 0, 0, 0.55);
}

button,
input,
select,
textarea,
a,
.nav-item,
.icon-btn,
.settings-toggle {
  touch-action: manipulation;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* Keep inputs ≥16px on mobile to avoid focus zoom side-effects. */
@media (max-width: 767px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* Shared text-logo used by sidebar (auth.css also defines it) */
.text-logo {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-dark);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: unset;
  letter-spacing: 0.5px;
  margin: 0;
  text-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-fast: 1ms;
    --motion-normal: 1ms;
    --motion-slow: 1ms;
    --press-scale: 1;
    --press-scale-soft: 1;
  }

  .shell-pane--enter,
  .view-panel,
  .anim-fade-up,
  .anim-stagger > *,
  .auth-shell,
  .auth-card,
  .text-logo-container,
  .assistant-welcome-inner > *,
  .assistant-welcome-btn,
  .header-title--swap,
  .nav-item.active,
  .nav-item.active::before {
    animation: none !important;
  }

  html {
    scroll-behavior: auto !important;
  }
}

/* Hide scrollbar chrome everywhere — scrolling still works where needed */
html,
body,
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}
/*
  Shell / global chrome — Rentoo React
  ========================================================
  INTEGRATION NOTES (feature agents):
  - Root uses BOTH `.app-layout` (production) and `.app-shell` (alias).
  - MainShell only renders `.content-area`. Do NOT wrap feature roots in
    another `.content-area` or add competing page padding/max-width here.
  - Desktop breakpoint for sidebar/bottom-nav is 768px (not 900px).
  - Laptop/desktop layout expansions live in desktop.css (768 / 1024 / 1280).
  - Design tokens live in index.css (`:root` / `body.dark-mode`). Prefer
    --space-*, --control-height, --font-size-*, --row-height, --card-bg.
  - Motion: --motion-fast|normal|slow + --transition-*. Prefer CSS; honor
    prefers-reduced-motion (global rule in index.css).
  - Z-index: --z-header|nav|sheet|modal|modal-elevated|toast. Feature overlays
    should use --z-modal / --z-modal-elevated (not ad-hoc 11000).
  - Overlays: call useFeatureOverlay(isOpen, onClose, 'booking-edit') in every
    feature modal/sheet. Tab nav calls closeAllOverlays() from App.
  - Loading: use .page-skeleton / .app-skeleton-* instead of bare "جاري التحميل".
    Never full-screen block when feature cache has data (hasCache pattern).
  - Inactive keep-alive panes use [hidden]+inert — do not portal modals outside
    the pane without also listening to rentoo:close-feature-overlays.
*/

.auth-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  height: 100%;
  width: 100%;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-color);
  gap: var(--space-4);
  font-size: var(--font-size-md);
}

.auth-loading::before {
  content: '';
  width: 48px;
  height: 48px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: authSpin 0.9s linear infinite;
}

@keyframes authSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Wraps layout + in-flow bottom-nav: header | content | nav */
.app-container {
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: none;
  background-color: transparent;
  background-image: none;
  /* Let floating bottom dock sit with side gaps on the pastel shell */
  align-items: stretch;
}

@supports (height: 100dvh) {
  .app-container {
    height: 100dvh;
    max-height: 100dvh;
  }
}

.app-layout,
.app-shell {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  background-color: transparent;
  /* Keep chrome on the inline-start side (right in RTL) */
  flex-direction: row;
}

.sidebar {
  width: 250px;
  background-color: var(--card-bg);
  border-inline-end: 1px solid var(--border-color);
  display: none;
  flex-direction: column;
  z-index: var(--z-sidebar);
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
  /* First in DOM + RTL row => docks on the right */
  order: 0;
}

.sidebar-header {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
  gap: var(--space-4);
  padding: 0 var(--space-6);
}

.sidebar-logo-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 10px;
}

.sidebar-brand-text {
  font-size: 28px;
}

.sidebar-menu {
  padding: var(--space-6) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.sidebar-menu-spacer {
  flex: 1;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--nav-hit);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: right;
  font-size: var(--font-size-md);
  font-family: inherit;
}

.sidebar-item:hover {
  background: var(--bg-color);
  color: var(--text-dark);
}

.sidebar-item:active {
  transform: scale(0.98);
}

.sidebar-item i,
.sidebar-item .assistant-mark {
  width: 20px;
  text-align: center;
  font-size: var(--icon-size-md);
}

.sidebar-item .assistant-mark {
  width: auto;
  height: auto;
  flex-shrink: 0;
  line-height: 1;
  font-size: 19px;
}

.sidebar-item.active {
  background: #7c5cfc;
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 92, 252, 0.22);
  outline: none;
}

.main-wrapper {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  background-color: transparent;
  overflow: hidden;
}

/* ——— Header ——— */
.top-header {
  height: var(--app-header-height);
  background-color: #ffffff;
  border-bottom: 1px solid rgba(26, 26, 26, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 var(--space-page);
  z-index: var(--z-header);
  box-shadow: none;
  flex-shrink: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* Menu button sits on the right in RTL (same edge the drawer opens from) */
.header-menu-btn {
  position: absolute;
  inset-inline-start: var(--space-page);
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--card-bg);
  color: var(--text-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: var(--icon-size-sm);
  box-shadow: var(--shadow-xs);
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.header-menu-btn:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.header-menu-btn:active,
.header-menu-btn[aria-expanded='true'] {
  background: var(--primary-light);
  color: var(--primary);
}

/* Logo sits opposite the menu (left in Arabic, right in English) */
.header-logo-btn {
  position: absolute;
  inset-inline-end: var(--space-page);
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  padding: 0;
  border-radius: 12px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.header-logo-btn:hover,
.header-logo-btn:focus-visible {
  background: var(--primary-light);
  box-shadow: var(--shadow-xs);
  outline: none;
}

.header-logo-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.app-logo {
  position: relative;
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: inherit;
}

.app-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  display: block;
}

.app-logo-img--dark {
  display: none;
}

body.dark-mode .app-logo-img--light {
  display: none;
}

body.dark-mode .app-logo-img--dark {
  display: block;
}

.header-logo-mark,
.sidebar-logo-mark {
  width: 100%;
  height: 100%;
}

.sidebar-logo-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  overflow: hidden;
}

.app-menu-mark-logo {
  width: 100%;
  height: 100%;
}

.header-title,
#mobile-header-title {
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--text-dark);
  text-align: center;
  margin: 0;
  max-width: calc(100% - 120px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.header-title--swap {
  animation: fadeInUp var(--motion-normal) var(--ease-out) both;
}

.content-area {
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-page);
  background-color: var(--bg-color);
  min-height: 0;
  min-width: 0;
}

/* Keep-alive panes: never intercept pointers when inactive */
.shell-pane[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.shell-pane[inert] {
  pointer-events: none !important;
}

body.assistant-view-active .content-area,
.content-area.content-area--assistant {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
  padding: 0;
}

body.assistant-view-active .shell-pane--assistant:not([hidden]),
.content-area.content-area--assistant > .shell-pane--assistant:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

/* ——— Skeletons / loading ——— */
.page-loading,
.page-skeleton {
  padding: var(--space-8) var(--space-page);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.app-skeleton,
.app-skeleton-line,
.app-skeleton-block,
.app-skeleton-circle {
  background: linear-gradient(
    90deg,
    var(--border-color) 0%,
    rgba(148, 163, 184, 0.28) 45%,
    var(--border-color) 100%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.25s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

body.dark-mode .app-skeleton,
body.dark-mode .app-skeleton-line,
body.dark-mode .app-skeleton-block,
body.dark-mode .app-skeleton-circle {
  background: linear-gradient(
    90deg,
    #334155 0%,
    #475569 45%,
    #334155 100%
  );
  background-size: 200% 100%;
}

@keyframes skeletonShimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.app-skeleton-line {
  height: 12px;
  width: 100%;
}

.app-skeleton-line--sm {
  width: 42%;
  height: 10px;
}

.app-skeleton-line--md {
  width: 68%;
}

.app-skeleton-block {
  height: var(--row-height);
  width: 100%;
  border-radius: var(--radius-md);
}

.app-skeleton-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.page-skeleton-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: var(--shadow-xs);
  animation: fadeInUp var(--motion-normal) var(--ease-out);
}

.page-skeleton-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.app-error-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  min-height: 40vh;
  padding: var(--space-8) var(--space-6);
  text-align: center;
}

.app-error-fallback p {
  margin: 0;
  max-width: 28rem;
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1.6;
}

.app-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

/* ——— Motion helpers ——— */
/* Page enter: .shell-pane--enter (MainShell restarts on every tab switch). */

.anim-fade-up {
  animation: fadeInUp var(--motion-normal) var(--ease-out) both;
}

.anim-press {
  transition:
    transform var(--motion-fast) var(--ease-press),
    opacity var(--transition-fast),
    filter var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.anim-press:active {
  transform: scale(var(--press-scale-soft));
  filter: brightness(0.96);
}

.tap-bounce {
  transition: transform var(--motion-fast) var(--ease-press);
  -webkit-tap-highlight-color: transparent;
}

.tap-bounce:active {
  transform: scale(var(--press-scale));
}

/* Staggered list reveal (date change, filter change, first paint) */
.anim-stagger > * {
  animation: fadeInUp var(--motion-normal) var(--ease-out) both;
}

.anim-stagger > *:nth-child(1) {
  animation-delay: 0ms;
}
.anim-stagger > *:nth-child(2) {
  animation-delay: 45ms;
}
.anim-stagger > *:nth-child(3) {
  animation-delay: 90ms;
}
.anim-stagger > *:nth-child(4) {
  animation-delay: 135ms;
}
.anim-stagger > *:nth-child(5) {
  animation-delay: 180ms;
}
.anim-stagger > *:nth-child(6) {
  animation-delay: 225ms;
}
.anim-stagger > *:nth-child(n + 7) {
  animation-delay: 250ms;
}

button:not(:disabled),
[role='button']:not([aria-disabled='true']),
.btn,
.icon-btn,
.nav-item,
.sidebar-item,
.app-menu-item,
.app-menu-logout,
.header-menu-btn,
.anim-press,
.tap-bounce {
  -webkit-tap-highlight-color: transparent;
}

button:not(:disabled),
[role='button']:not([aria-disabled='true']),
.btn,
.icon-btn,
.nav-item,
.sidebar-item,
.app-menu-item,
.app-menu-logout:not(:disabled) {
  transition:
    transform var(--motion-fast) var(--ease-press),
    opacity var(--transition-fast),
    filter var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

button:not(:disabled):active,
[role='button']:not([aria-disabled='true']):active,
.btn:active,
.icon-btn:active,
.sidebar-item:active,
.app-menu-item:active {
  transform: scale(var(--press-scale));
  filter: brightness(0.95);
}

/* Keep vertical centering — do not replace translateY with scale alone */
.header-menu-btn:active {
  transform: translateY(-50%) scale(var(--press-scale));
  filter: brightness(0.95);
}

/* Restarted by MainShell on every tab activation (keep-alive safe). */
.shell-pane.shell-pane--enter:not([hidden]) {
  animation: paneEnter var(--motion-slow) var(--ease-out) both;
}

.shell-pane.shell-pane--enter:not([hidden]) .view-panel > *:nth-child(-n + 4) {
  animation: fadeInUp var(--motion-normal) var(--ease-out) both;
}

.shell-pane.shell-pane--enter:not([hidden]) .view-panel > *:nth-child(1) {
  animation-delay: 40ms;
}
.shell-pane.shell-pane--enter:not([hidden]) .view-panel > *:nth-child(2) {
  animation-delay: 90ms;
}
.shell-pane.shell-pane--enter:not([hidden]) .view-panel > *:nth-child(3) {
  animation-delay: 140ms;
}
.shell-pane.shell-pane--enter:not([hidden]) .view-panel > *:nth-child(4) {
  animation-delay: 180ms;
}

@keyframes paneEnter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes navActiveIn {
  from {
    transform: scale(0.92);
  }
  to {
    transform: scale(1);
  }
}

@keyframes navDashIn {
  from {
    opacity: 0;
    transform: translateX(-50%) scaleX(0.35);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
}

@keyframes sheetSlideUp {
  from {
    opacity: 0.6;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drawerSlideIn {
  from {
    opacity: 0.7;
    transform: translateX(var(--drawer-enter-x, 16px));
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes backdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.date-navigator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 12px 14px;
  border-radius: 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  margin-bottom: var(--space-card-gap);
  border: 1px solid rgba(26, 26, 26, 0.06);
}

.date-navigator h3 {
  margin: 0;
  font-size: var(--font-size-md);
  color: var(--text-dark);
  font-weight: 800;
}

.icon-btn {
  background: #f3f3f3;
  border: none;
  width: var(--control-box);
  height: var(--control-box);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #1a1a1a;
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    background var(--transition-fast);
  font-size: var(--icon-size-sm);
  box-shadow: none;
}

.icon-btn:hover {
  border-color: rgba(26, 26, 26, 0.12);
  color: #1a1a1a;
  background: #ebebeb;
}

.icon-btn:active {
  transform: scale(0.92);
}

body.dark-mode .icon-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
}

body.dark-mode .icon-btn:hover {
  background: rgba(124, 92, 252, 0.22);
  color: #c4b5fd;
  border-color: transparent;
}

body.dark-mode .header-logo-btn {
  background: transparent;
}

body.dark-mode .header-logo-btn:hover,
body.dark-mode .header-logo-btn:focus-visible {
  background: rgba(124, 92, 252, 0.18);
}

body.dark-mode .app-menu-mark {
  background: #1c1c1e;
}

.placeholder-toolbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: var(--space-3);
}

.btn {
  width: 100%;
  min-height: var(--control-height);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-md);
  font-weight: 800;
  border: none;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    opacity var(--transition-fast);
  box-shadow: var(--shadow-sm);
  font-family: inherit;
}

.btn:active {
  transform: scale(var(--press-scale));
}

.btn-primary {
  background: #7c5cfc !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 12px 28px rgba(124, 92, 252, 0.28) !important;
}

body.dark-mode .btn-primary {
  background: #9b87ff !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(124, 92, 252, 0.35) !important;
}

.btn-outline {
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  color: var(--text-dark);
  box-shadow: none;
}

.btn-outline:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 12px 28px rgba(224, 91, 106, 0.18);
}

.search-wrap {
  margin-bottom: var(--space-3);
  position: relative;
}

.search-wrap i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-wrap input {
  width: 100%;
  height: var(--control-height);
  padding: var(--space-3) 38px var(--space-3) var(--space-4);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-md);
  background: var(--card-bg);
  color: var(--text-dark);
  font-weight: 700;
  font-family: inherit;
  outline: none;
  box-shadow: var(--shadow-xs);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.search-wrap input:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

.search-wrap input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.hint-text {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: 0 0 var(--space-card-gap);
}

.placeholder-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6) var(--space-5);
  margin-bottom: var(--space-4);
}

.placeholder-card h4 {
  margin: 0 0 6px;
  font-size: var(--font-size-md);
  font-weight: 800;
  color: var(--text-dark);
}

.placeholder-card p {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-weight: 600;
}

.placeholder-slots {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.placeholder-slot {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
  min-height: var(--row-height);
}

.placeholder-slot strong {
  font-size: var(--font-size-md);
  font-weight: 800;
  color: var(--text-dark);
}

.placeholder-slot span {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text-muted);
}

.placeholder-slot.accent {
  border-right: 5px solid #3b82f6;
}

/* ——— Bottom nav — floating white pill (accounts screenshot) ——— */
.bottom-nav {
  position: relative;
  flex: 0 0 auto;
  width: auto;
  align-self: stretch;
  height: auto;
  min-height: 64px;
  margin: 0 12px calc(10px + var(--app-safe-bottom, 0px));
  padding: 6px 8px;
  background-color: #ffffff !important;
  border: none;
  border-radius: 28px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  gap: 2px;
  z-index: var(--z-nav);
  box-shadow:
    0 8px 28px rgba(99, 80, 180, 0.12),
    0 2px 8px rgba(26, 26, 26, 0.04);
  overflow: visible;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.dark-mode .bottom-nav {
  background-color: #1c1c1e !important;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  text-decoration: none;
  background: transparent;
  border: none;
  font-size: 10px;
  font-weight: 700;
  gap: 2px;
  cursor: pointer;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 52px;
  min-width: 0;
  padding: 10px 4px 6px;
  margin: 0;
  transition:
    color var(--transition-fast),
    transform var(--transition-fast),
    background var(--transition-fast);
  font-family: inherit;
  border-radius: 18px;
  white-space: nowrap;
  overflow: visible;
  box-sizing: border-box;
  justify-self: stretch;
}

body.dark-mode .nav-item {
  color: #a1a1aa;
}

.nav-item i,
.nav-item .assistant-mark {
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  margin-top: 4px;
  border-radius: 0;
  font-style: normal;
  transition: color var(--transition-fast);
}

.assistant-mark {
  display: block;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.nav-item .assistant-mark {
  margin-top: 4px;
  font-size: 19px;
  width: 1em;
  height: 1em;
}

.nav-item.active {
  color: #7c5cfc;
  background: #ede9fe;
  box-shadow: none;
  animation: navActiveIn var(--motion-normal) var(--ease-out);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  width: 14px;
  height: 3px;
  border-radius: 999px;
  background: #7c5cfc;
  transform: translateX(-50%);
  transform-origin: center;
  animation: navDashIn var(--motion-normal) var(--ease-out);
}

.nav-item.active i,
.nav-item.active .assistant-mark {
  font-size: 18px;
  color: #7c5cfc;
  background: transparent;
  box-shadow: none;
}

body.dark-mode .nav-item.active {
  color: #c4b5fd;
  background: rgba(124, 92, 252, 0.22);
  box-shadow: none;
}

body.dark-mode .nav-item.active::before {
  background: #c4b5fd;
}

body.dark-mode .nav-item.active i,
body.dark-mode .nav-item.active .assistant-mark {
  color: #c4b5fd;
  background: transparent;
}

.nav-item:active {
  transform: scale(0.96);
}

.nav-item--assistant.active {
  color: #7c5cfc;
}

body.dark-mode .nav-item--assistant.active {
  color: #c4b5fd;
}

/* Hide floating dock while any feature modal/sheet is open */
body.feature-overlay-open .bottom-nav {
  display: none !important;
}

body.feature-overlay-open .app-header {
  pointer-events: none;
}

/* ——— App menu drawer (hamburger) — soft purple screenshot ——— */
.app-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-sheet);
  background: var(--overlay-scrim, rgba(15, 23, 42, 0.42));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  /* flex-start = inline-start (right in Arabic, left in English) */
  justify-content: flex-start;
  animation: backdropIn var(--motion-fast) var(--ease-standard);
}

.app-menu-drawer {
  --menu-purple: #7c5cfc;
  --menu-purple-soft: #ede9fe;
  --menu-logout-bg: #fff1f2;
  --menu-logout-icon: #fb7185;
  --menu-logout-text: #be123c;
  /* Slide in from the inline-start edge (right in RTL, left in LTR) */
  --drawer-enter-x: 18px;
  width: min(318px, 82vw);
  height: 100%;
  max-height: 100%;
  background: var(--card-bg);
  /* Round the inner (inline-end) edge when docked on inline-start */
  border-start-start-radius: 0;
  border-end-start-radius: 0;
  border-start-end-radius: 28px;
  border-end-end-radius: 28px;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: drawerSlideIn var(--motion-normal) var(--ease-out);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  margin-inline-start: 0;
  margin-inline-end: auto;
}

html[dir='ltr'] .app-menu-drawer {
  --drawer-enter-x: -18px;
  box-shadow: 12px 0 40px rgba(15, 23, 42, 0.18);
}

.app-menu-header {
  flex-shrink: 0;
  background: var(--menu-purple);
  padding: 18px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.app-menu-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-menu-mark {
  width: 42px;
  height: 42px;
  border: none;
  padding: 0;
  border-radius: 14px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.app-menu-mark:hover,
.app-menu-mark:focus-visible {
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  outline: none;
}

.app-menu-mark:active {
  transform: scale(0.97);
}

.app-menu-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.app-menu-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  flex-shrink: 0;
  transition: background 140ms ease;
}

.app-menu-close:hover,
.app-menu-close:focus-visible {
  background: rgba(255, 255, 255, 0.34);
  outline: none;
}

.app-menu-brand {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  text-align: center;
  min-width: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-radius: 16px;
  transition: background 140ms ease;
}

.app-menu-brand:hover,
.app-menu-brand:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.app-menu-brand:active {
  background: rgba(255, 255, 255, 0.16);
}

.app-menu-brand-title {
  display: block;
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.app-menu-brand-sub {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.35;
}

.app-menu-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--card-bg);
}

.app-menu-item {
  width: 100%;
  min-height: 56px;
  border: none;
  background: transparent;
  color: var(--text-dark);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  text-align: start;
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.app-menu-item:hover {
  background: color-mix(in srgb, var(--text-dark) 4%, transparent);
}

.app-menu-item:active {
  transform: scale(0.99);
}

.app-menu-item.is-active {
  background: var(--menu-purple-soft);
}

.app-menu-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--menu-purple-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.app-menu-item-icon.is-muted {
  color: #6b7280;
}

.app-menu-item-icon.is-ads {
  color: #e11d48;
}

.app-menu-item-label {
  flex: 1 1 auto;
  min-width: 0;
}

.app-menu-item-chevron {
  color: #d1d5db;
  font-size: 12px;
  flex-shrink: 0;
}

html[dir='ltr'] .app-menu-item-chevron {
  transform: scaleX(-1);
}

.app-menu-footer {
  flex-shrink: 0;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--border-color);
  background: var(--card-bg);
}

body.dark-mode .app-menu-drawer {
  --menu-purple: #9b87ff;
  --menu-purple-soft: rgba(124, 92, 252, 0.22);
  --menu-logout-bg: rgba(244, 63, 94, 0.16);
  --menu-logout-icon: #fb7185;
  --menu-logout-text: #fda4af;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
}

html[dir='ltr'] body.dark-mode .app-menu-drawer {
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
}

body.dark-mode .app-menu-item-icon.is-muted {
  color: #a1a1aa;
}

body.dark-mode .app-menu-item-chevron {
  color: #52525b;
}

.app-menu-logout {
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 999px;
  background: var(--menu-logout-bg);
  color: var(--menu-logout-text);
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 6px;
  padding-inline: 14px 6px;
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.app-menu-logout:disabled {
  opacity: 0.7;
  cursor: wait;
}

.app-menu-logout:not(:disabled):active {
  transform: scale(0.99);
}

.app-menu-logout-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--menu-logout-icon);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.app-menu-logout-label {
  flex: 1 1 auto;
  text-align: center;
  padding-inline-end: 40px;
}

/* Frosted chrome */
.top-header {
  background: var(--card-bg) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.sidebar {
  background: color-mix(in srgb, var(--card-bg) 96%, transparent) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.bottom-nav {
  background: var(--card-bg) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.dark-mode .top-header {
  background: var(--card-bg) !important;
}

body.dark-mode .sidebar {
  background: color-mix(in srgb, var(--card-bg) 96%, transparent) !important;
}

body.dark-mode .bottom-nav {
  background: var(--card-bg) !important;
}

.sidebar-item.active {
  background: #7c5cfc !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(124, 92, 252, 0.22) !important;
  outline: none !important;
}

.bottom-nav .nav-item.active {
  background: #ede9fe !important;
  color: #7c5cfc !important;
}

body.dark-mode .sidebar-item.active {
  background: #7c5cfc !important;
  color: #fff !important;
}

body.dark-mode .bottom-nav .nav-item.active {
  background: rgba(124, 92, 252, 0.22) !important;
  color: #c4b5fd !important;
}

/* Production desktop breakpoint */
@media (min-width: 768px) {
  .sidebar {
    display: flex;
  }

  .bottom-nav {
    display: none !important;
  }

  .header-menu-btn {
    display: none;
  }

  .header-logo-btn {
    inset-inline-end: var(--space-6);
  }

  .header-title,
  #mobile-header-title {
    max-width: calc(100% - 80px);
  }

  .top-header {
    padding: 0 var(--space-6);
  }

  .date-navigator {
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-page);
  }

  .date-navigator h3 {
    font-size: var(--font-size-lg);
  }

  .btn {
    padding: var(--space-4) var(--space-6);
  }

  .search-wrap {
    margin-bottom: var(--space-5);
  }

  body.assistant-view-active .content-area,
  .content-area.content-area--assistant {
    padding-top: 8px;
    padding-inline: var(--space-page);
    padding-bottom: max(8px, var(--app-safe-bottom));
  }

  .app-menu-overlay {
    display: none !important;
  }
}

body.assistant-view-active .app-container {
  height: var(--app-vv-height);
  max-height: var(--app-vv-height);
  transform: translateY(var(--app-vv-offset-top));
}

body.assistant-view-active .app-layout,
body.assistant-view-active .app-shell {
  flex: 1 1 auto;
  height: auto;
  max-height: none;
  min-height: 0;
  overflow: hidden;
}

body.assistant-view-active .main-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
  flex: 1 1 auto;
}

/* Shared toast */
.app-toast {
  position: fixed;
  bottom: calc(var(--app-bottom-nav-height) + var(--app-safe-bottom) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #0f172a;
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: 999px;
  font-size: var(--font-size-sm);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--motion-normal) var(--ease-standard),
    transform var(--motion-normal) var(--ease-out);
  z-index: var(--z-toast);
  max-width: calc(100% - 32px);
}

.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.app-toast i {
  color: #4ade80;
}

.app-toast.app-toast-error i,
.app-toast.app-toast-network i {
  color: #f87171;
}

@media print {
  .sidebar,
  .bottom-nav,
  .top-header,
  .app-menu-overlay,
  .app-toast {
    display: none !important;
  }
}
/*
  PC / laptop Operate desk — reference board language.
  ≥768  tablet shell (sidebar)
  ≥1024 true desk layout (hero board + movers + wide rows)
  Mobile (<768) unchanged.
*/

/* ——— Shell ≥768 ——— */
@media (min-width: 768px) {
  .app-container {
    background: #f4f5f8;
  }

  body.dark-mode .app-container {
    background: #101018;
  }

  /* In-flow rail: grows on hover and pushes content — never overlays the page */
  .sidebar {
    position: relative;
    z-index: 2;
    flex: 0 0 84px;
    width: 84px;
    max-width: 84px;
    align-self: stretch;
    display: flex !important;
    flex-direction: column;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-inline-end: 1px solid rgba(17, 24, 39, 0.06) !important;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.04) !important;
    overflow: hidden;
    transition:
      flex-basis 0.2s ease,
      width 0.2s ease,
      max-width 0.2s ease;
  }

  .sidebar:hover,
  .sidebar:focus-within {
    flex-basis: 248px;
    width: 248px;
    max-width: 248px;
  }

  .sidebar-rail {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: hidden;
  }

  body.dark-mode .sidebar {
    background: #17171f !important;
    box-shadow: none !important;
  }

  .sidebar-header {
    height: auto;
    min-height: 88px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 16px 12px 10px;
    gap: 12px;
    border-bottom: none;
  }

  .sidebar:hover .sidebar-header,
  .sidebar:focus-within .sidebar-header {
    justify-content: flex-start;
    padding: 18px 16px 12px;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
  }

  .sidebar-brand:focus-visible {
    outline: 2px solid rgba(124, 92, 252, 0.55);
    outline-offset: 3px;
    border-radius: 14px;
  }

  .sidebar:hover .sidebar-brand,
  .sidebar:focus-within .sidebar-brand {
    justify-content: flex-start;
  }

  .sidebar-brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 18px;
    background:
      linear-gradient(145deg, #ffffff 0%, #f3f0ff 100%);
    border: 1px solid rgba(124, 92, 252, 0.18);
    box-shadow:
      0 10px 24px rgba(124, 92, 252, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  body.dark-mode .sidebar-brand-badge {
    background: linear-gradient(145deg, #2a2438 0%, #1d1830 100%);
    border-color: rgba(196, 181, 253, 0.22);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  }

  .sidebar-brand-text,
  .sidebar .text-logo.sidebar-brand-text {
    display: none;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.02em;
    white-space: nowrap;
    color: #111827;
    text-shadow: none;
  }

  .sidebar:hover .sidebar-brand-text,
  .sidebar:focus-within .sidebar-brand-text,
  .sidebar:hover .text-logo.sidebar-brand-text,
  .sidebar:focus-within .text-logo.sidebar-brand-text {
    display: block;
  }

  body.dark-mode .sidebar-brand-text,
  body.dark-mode .sidebar .text-logo.sidebar-brand-text {
    color: #f9fafb;
  }

  .sidebar-logo-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
  }

  .sidebar-toggle {
    display: none !important;
  }

  .sidebar-menu {
    padding: 8px 14px 20px;
    gap: 6px;
    align-items: stretch;
  }

  .sidebar-item {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    padding: 0;
    width: 52px;
    height: 52px;
    min-height: 52px;
    margin-inline: auto;
    font-size: 14px;
    font-weight: 800;
    text-align: start;
    color: #9ca3af;
  }

  .sidebar:hover .sidebar-item,
  .sidebar:focus-within .sidebar-item {
    width: 100%;
    margin-inline: 0;
    justify-content: flex-start;
    padding: 0 14px;
    height: 48px;
    min-height: 48px;
  }

  .sidebar-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    flex: 0 0 22px;
  }

  .sidebar-item-label {
    display: none;
    line-height: 1.15;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar:hover .sidebar-item-label,
  .sidebar:focus-within .sidebar-item-label {
    display: block;
  }

  .sidebar-item i,
  .sidebar-item .assistant-mark {
    width: auto;
    font-size: 18px;
  }

  .sidebar-item:hover {
    background: #f3f0ff;
    color: #5b45d6;
  }

  .sidebar-item.active {
    background: #ede9fe !important;
    color: #5b45d6 !important;
    box-shadow: none !important;
  }

  body.dark-mode .sidebar-item:hover {
    background: rgba(124, 92, 252, 0.16);
    color: #e9e4ff;
  }

  body.dark-mode .sidebar-item.active {
    background: rgba(124, 92, 252, 0.22) !important;
    color: #ddd6fe !important;
  }

  /* Touch / no-hover desks: keep labels open */
  @media (hover: none) {
    .sidebar {
      flex: 0 0 248px;
      width: 248px;
      max-width: 248px;
    }

    .sidebar-header {
      justify-content: flex-start;
      padding: 18px 16px 12px;
    }

    .sidebar-brand {
      justify-content: flex-start;
    }

    .sidebar-brand-text,
    .sidebar .text-logo.sidebar-brand-text,
    .sidebar-item-label {
      display: block;
    }

    .sidebar-item {
      width: 100%;
      margin-inline: 0;
      justify-content: flex-start;
      padding: 0 14px;
      height: 48px;
      min-height: 48px;
    }
  }

  .main-wrapper {
    background: #f4f5f8;
  }

  body.dark-mode .main-wrapper {
    background: #101018;
  }

  .top-header {
    height: 64px;
    justify-content: flex-start;
    padding-inline: 28px 32px;
    background: transparent !important;
    border-bottom: none;
    box-shadow: none;
  }

  body.dark-mode .top-header {
    background: transparent !important;
    border-bottom: none;
  }

  .header-title,
  #mobile-header-title {
    text-align: start;
    max-width: none;
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.02em;
  }

  .header-logo-btn {
    display: none;
  }

  .header-menu-btn {
    display: none !important;
  }

  .content-area {
    padding: 8px 24px 32px;
    background: transparent;
  }

  .app-toast {
    bottom: 28px;
  }

  .bk-modal-overlay,
  .acc-composer-overlay {
    align-items: center;
    justify-content: center;
    padding: 28px;
  }

  .bk-modal-content.bk-sheet,
  .bk-modal-content {
    width: min(640px, 100%);
    max-height: min(88dvh, 860px);
    border-radius: 24px !important;
    margin: 0;
  }
}

/* ——— True PC desk ≥1024 ——— */
@media (min-width: 1024px) {
  .sidebar {
    flex-basis: 88px;
    width: 88px;
    max-width: 88px;
  }

  .sidebar:hover,
  .sidebar:focus-within {
    flex-basis: 260px;
    width: 260px;
    max-width: 260px;
  }

  .content-area {
    padding: 4px 28px 36px;
  }

  .bookings-view {
    --bk-desk-cols: minmax(200px, 1.3fr) minmax(150px, 0.95fr) minmax(220px, 1.2fr) minmax(150px, 0.9fr);
    max-width: none;
    margin: 0;
    width: 100%;
  }

  .bookings-view .bk-hours-chrome {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  /* 1) Summary cards on top */
  .bookings-view .bk-desk-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .bookings-view .bk-desk-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-height: 118px;
    padding: 22px 22px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.06);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
  }

  body.dark-mode .bookings-view .bk-desk-stat {
    background: #1a1a22;
    border-color: rgba(255, 255, 255, 0.06);
  }

  .bookings-view .bk-desk-stat-label {
    font-size: 13px;
    font-weight: 700;
    color: #9ca3af;
  }

  .bookings-view .bk-desk-stat-value {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #111827;
    font-variant-numeric: tabular-nums;
    line-height: 1;
  }

  body.dark-mode .bookings-view .bk-desk-stat-value {
    color: #f9fafb;
  }

  .bookings-view .bk-desk-stat--paid .bk-desk-stat-value {
    color: #059669;
  }

  .bookings-view .bk-desk-stat--due .bk-desk-stat-value {
    color: #e11d48;
  }

  .bookings-view .bk-desk-stat--total {
    background: linear-gradient(135deg, #7c5cfc, #6366f1);
    border-color: transparent;
  }

  .bookings-view .bk-desk-stat--total .bk-desk-stat-label,
  .bookings-view .bk-desk-stat--total .bk-desk-stat-value {
    color: #fff;
  }

  /* 2) Search + written Add section, then 3) Days */
  .bookings-view .bk-desk-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .bookings-view .bk-search-row--persistent {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    min-width: 0;
    max-width: none;
  }

  /* One clean search control — no double box / bottom gap */
  .bookings-view .bk-desk-toolbar .search-wrap {
    flex: 1 1 auto;
    position: relative;
    display: flex;
    align-items: center;
    height: 56px;
    min-height: 56px;
    margin: 0 !important;
    padding: 0;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
    overflow: hidden;
  }

  .bookings-view .bk-desk-toolbar .search-wrap > i.fa-search {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
  }

  .bookings-view .bk-desk-toolbar .search-wrap input {
    flex: 1 1 auto;
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0 48px 0 48px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
  }

  .bookings-view .bk-desk-toolbar .search-wrap input:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none;
  }

  .bookings-view .bk-desk-toolbar .search-wrap input[type='search']::-webkit-search-decoration,
  .bookings-view .bk-desk-toolbar .search-wrap input[type='search']::-webkit-search-cancel-button,
  .bookings-view .bk-desk-toolbar .search-wrap input[type='search']::-webkit-search-results-button,
  .bookings-view .bk-desk-toolbar .search-wrap input[type='search']::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
  }

  .bookings-view .bk-desk-toolbar .search-wrap input[type='search']::-ms-clear {
    display: none;
    width: 0;
    height: 0;
  }

  .bookings-view .bk-desk-toolbar .search-wrap .bk-search-clear {
    left: 12px;
    width: 34px;
    height: 34px;
  }

  body.dark-mode .bookings-view .bk-desk-toolbar .search-wrap {
    background: #1a1a22;
    border-color: rgba(255, 255, 255, 0.1);
  }

  body.dark-mode .bookings-view .bk-desk-toolbar .search-wrap input {
    color: #f3f4f6;
  }

  .bookings-view .bk-desk-toolbar .search-wrap input::placeholder {
    color: #9ca3af;
    opacity: 1;
    font-weight: 600;
  }

  .bookings-view .bk-desk-toolbar .search-wrap:focus-within {
    border-color: rgba(124, 92, 252, 0.5);
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.16);
  }

  .bookings-view .bk-add-section-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 56px;
    min-height: 56px;
    padding: 0 24px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
  }

  .bookings-view .bk-add-section-fab {
    display: none !important;
  }

  .bookings-view .bk-add-section-btn:focus-visible {
    outline: 2px solid #7c5cfc;
    outline-offset: 2px;
  }

  .bookings-view .bk-day-toolbar {
    width: 100%;
    justify-content: center;
    min-height: 132px;
    padding: 22px 24px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.06);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  }

  .bookings-view .bk-day-toolbar--today {
    background: linear-gradient(180deg, #f5f2ff 0%, #ffffff 70%);
    border-color: rgba(124, 92, 252, 0.28);
    box-shadow: 0 12px 28px rgba(124, 92, 252, 0.12);
  }

  body.dark-mode .bookings-view .bk-day-toolbar {
    background: #1a1a22;
    border-color: rgba(255, 255, 255, 0.06);
  }

  body.dark-mode .bookings-view .bk-day-toolbar--today {
    background: linear-gradient(180deg, rgba(124, 92, 252, 0.22) 0%, #1a1a22 70%);
    border-color: rgba(124, 92, 252, 0.4);
  }

  .bookings-view .bk-day-heading {
    align-items: center;
    width: 100%;
  }

  .bookings-view .bk-day-meta {
    display: none;
  }

  .bookings-view .bk-day-title-row,
  .bookings-view .bk-day-switcher {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    justify-content: center;
    gap: 28px;
    width: 100%;
  }

  .bookings-view .bk-day-switcher-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 11rem;
  }

  .bookings-view .bk-day-cal {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
  }

  .bookings-view .bk-day-num {
    font-size: 52px;
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: #111827;
    font-variant-numeric: tabular-nums;
  }

  .bookings-view .bk-day-toolbar--today .bk-day-num {
    color: #7c5cfc;
  }

  body.dark-mode .bookings-view .bk-day-num {
    color: #f9fafb;
  }

  body.dark-mode .bookings-view .bk-day-toolbar--today .bk-day-num {
    color: #c4b5fd;
  }

  .bookings-view .bk-day-month {
    font-size: 20px;
    font-weight: 800;
    color: #6b7280;
  }

  .bookings-view .bk-day-toolbar--today .bk-day-month {
    color: #5b45d6;
  }

  .bookings-view .bk-day-switcher-date {
    display: none;
  }

  .bookings-view .bk-day-title {
    font-size: 18px !important;
    font-weight: 800;
    color: #6b7280 !important;
    letter-spacing: -0.01em;
    text-align: center;
    line-height: 1.2;
    margin: 0;
  }

  body.dark-mode .bookings-view .bk-day-title {
    color: #d1d5db !important;
  }

  .bookings-view .bk-day-today-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    background: #7c5cfc;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
  }

  .bookings-view .bk-day-jump-today {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 14px;
    border: 1px solid rgba(124, 92, 252, 0.28);
    border-radius: 999px;
    background: #f3f0ff;
    color: #5b45d6;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
  }

  .bookings-view .bk-day-jump-today:hover {
    background: #7c5cfc;
    color: #fff;
    border-color: transparent;
  }

  .bookings-view .bk-date-nav-btn,
  .bookings-view .bk-date-nav-btn--desk {
    width: 56px !important;
    height: 56px !important;
    flex: 0 0 56px !important;
    border-radius: 16px !important;
    background: #f3f0ff !important;
    color: #5b45d6 !important;
    border: 1px solid rgba(124, 92, 252, 0.16) !important;
    font-size: 20px !important;
    box-shadow: none !important;
    transition: background 160ms ease-out, color 160ms ease-out;
  }

  .bookings-view .bk-date-nav-btn:hover,
  .bookings-view .bk-date-nav-btn--desk:hover {
    background: #7c5cfc !important;
    color: #fff !important;
    border-color: transparent !important;
  }

  .bookings-view .bk-search-title {
    margin: 0;
    color: #6b7280;
    text-align: center;
  }

  .bookings-view .bk-desk-board {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 2px 8px;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
  }

  body.dark-mode .bookings-view .bk-desk-board {
    background: transparent;
    border: none;
  }

  .bookings-view .bk-desk-board--search {
    padding: 4px 2px 8px;
  }

  /* Desk bookings: phone-like cards (no table headers / columns) */
  .bookings-view .bk-list-head,
  .bookings-view .bk-list-cols {
    display: none !important;
  }

  .bookings-view .bk-hours-grid,
  .bookings-view .hours-grid,
  .bookings-view .bk-hours-grid--grouped {
    display: flex;
    flex-direction: column;
    gap: 22px;
  }

  .bookings-view .bk-shift-group {
    display: block;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .bookings-view .bk-shift-group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 12px;
    background: transparent;
  }

  .bookings-view .bk-shift-group-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #7c5cfc;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
  }

  .bookings-view .bk-shift-group--evening .bk-shift-group-mark {
    background: #a855f7;
  }

  .bookings-view .bk-shift-group--custom .bk-shift-group-mark {
    background: #6b7280;
  }

  .bookings-view .bk-shift-group-title {
    margin: 0;
    font-size: 15px;
    font-weight: 900;
    color: #111827;
  }

  body.dark-mode .bookings-view .bk-shift-group-title {
    color: #f3f4f6;
  }

  .bookings-view .bk-shift-group-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .bookings-view .bk-hour-box.available,
  .bookings-view button.bk-hour-box.available {
    position: relative;
    min-height: 0;
    padding: 16px 18px 14px;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff !important;
    color: #111827 !important;
    box-shadow: 0 10px 28px rgba(99, 80, 180, 0.08) !important;
    overflow: hidden;
    transition: filter 160ms ease-out;
  }

  .bookings-view .bk-hour-box.available .bk-avail-status-corner {
    display: inline-flex !important;
  }

  .bookings-view .bk-hour-box.available .bk-card-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .bookings-view .bk-hour-box.available .bk-row-section {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
  }

  .bookings-view .bk-hour-box.available .bk-period-mark,
  .bookings-view .bk-hour-box.available .bk-row-status,
  .bookings-view .bk-desk-avail-tag {
    display: none !important;
  }

  .bookings-view .bk-hour-box.available .bk-shift-chip {
    display: inline-flex;
  }

  .bookings-view .bk-hour-box.available .bk-avail-name {
    font-size: 18px;
    font-weight: 900;
    margin: 0;
    color: #111827 !important;
    padding-left: 78px;
  }

  .bookings-view .daily-section-delete {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    border-radius: 14px;
    font-size: 17px;
  }

  .bookings-view .bk-hour-box.available .bk-avail-hint {
    width: 100%;
    margin: 4px 0 0;
    padding: 12px 16px;
    border-radius: 14px;
    background: #7c5cfc;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked,
  .bookings-view .bk-hour-box.bk-hero-card.shift-1-booked,
  .bookings-view .hour-box.bk-hero-card.shift-1-booked,
  .bookings-view .bk-hour-box.bk-hero-card.shift-2-booked,
  .bookings-view .hour-box.bk-hero-card.shift-2-booked,
  .bookings-view .bk-hero-card.period-morning,
  .bookings-view .bk-hero-card.period-evening,
  .bookings-view .bk-hero-card.period-custom,
  .bookings-view .bk-hero-card.bk-search-card {
    position: relative;
    min-height: 0;
    border-radius: 20px !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(67, 56, 202, 0.22) !important;
    overflow: hidden;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked::before,
  .bookings-view .bk-hero-card.period-morning::before,
  .bookings-view .bk-hero-card.period-evening::before,
  .bookings-view .bk-hero-card.period-custom::before,
  .bookings-view .bk-hero-card.shift-1-booked::before,
  .bookings-view .bk-hero-card.shift-2-booked::before {
    display: none !important;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px 14px;
    color: inherit;
    text-align: right;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-main,
  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-top {
    display: flex;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-main {
    flex-direction: column;
    gap: 10px;
  }

  .bookings-view .bk-hero-time-col {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
  }

  .bookings-view .bk-hero-money {
    flex-direction: column;
    align-items: flex-end;
    text-align: left;
    gap: 4px;
  }

  .bookings-view .bk-hero-bottom {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .bookings-view .bk-hero-section--mobile {
    display: inline-flex;
  }

  .bookings-view .bk-hero-status-row--mobile {
    display: flex;
  }

  .bookings-view .bk-hero-status-row--desk,
  .bookings-view .bk-hero-phone-desk {
    display: none !important;
  }

  .bookings-view .bk-hero-contact .bk-hero-phone {
    display: inline;
  }

  .bookings-view .bk-hero-name {
    font-size: 22px;
    font-weight: 900;
    margin: 0;
    color: inherit;
  }

  .bookings-view .bk-hero-price-label {
    display: block;
    font-size: 14px;
  }

  .bookings-view .bk-hero-price-value {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
    color: inherit;
  }

  .bookings-view .bk-hero-deposit {
    font-size: 14px;
    padding: 5px 12px;
  }

  .bookings-view .bk-hero-badge {
    font-size: 14px;
    padding: 6px 12px;
  }

  .bookings-view .bk-hero-time {
    font-size: 16px;
  }

  .bookings-view .bk-hero-card .bk-contact-wa {
    background: #22c55e !important;
    color: #fff !important;
  }

  .bookings-view .bk-hero-card .bk-contact-call-on-booked {
    background: #ede9fe !important;
    color: #5b45d6 !important;
  }

  .bookings-view .bk-hero-card .bk-contact-call-on-booked i {
    color: #5b45d6 !important;
  }

  .bookings-view .bk-paid-soft {
    background: rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
  }

  .bookings-view .bk-paid-soft.is-paid {
    background: #22c55e;
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.28);
  }

  .bookings-view .bk-hero-badge--paid {
    background: #ecfdf5;
    color: #059669;
  }

  .bookings-view .bk-hero-badge--due {
    background: #fff1f2;
    color: #e11d48;
  }

  body.dark-mode .bookings-view .bk-hero-badge--paid {
    background: rgba(5, 150, 105, 0.18);
    color: #6ee7b7;
  }

  body.dark-mode .bookings-view .bk-hero-badge--due {
    background: rgba(225, 29, 72, 0.18);
    color: #fda4af;
  }

  /* Other pages: use the desk width, not a phone column */
  .reports-page,
  .ads-view,
  .calendar-view,
  .acc-page,
  .settings-stack {
    max-width: none;
    margin-inline: 0;
    width: 100%;
  }

  .settings-stack {
    max-width: 920px;
  }

  /* Reports desk board is owned by reports.css (≥1024) to win cascade */

  .calendar-view .cal-wrapper {
    padding: 0;
  }

  /* Accounting desk: lock page height; only ledger list scrolls */
  .content-area:has(.shell-pane:not([hidden]) #accounting-view) {
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .content-area:has(.shell-pane:not([hidden]) #accounting-view) > .shell-pane:not([hidden]) {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* ——— Accounts board: centered totals, actions below, side ledger ——— */
  #accounting-view.acc-page,
  .acc-page {
    display: grid !important;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.72fr);
    grid-template-rows: auto auto auto minmax(0, 1fr);
    grid-template-areas:
      'toolbar toolbar'
      'hero side'
      'quick side'
      'wallets side';
    column-gap: 18px;
    row-gap: 14px;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    padding-bottom: 8px;
    box-sizing: border-box;
  }

  #accounting-view.acc-page .acc-day-toolbar,
  .acc-page .acc-day-toolbar {
    grid-area: toolbar;
    margin: 0;
    padding: 2px 2px 0;
  }

  #accounting-view.acc-page .acc-page-title,
  .acc-page .acc-page-title {
    font-size: 28px;
    letter-spacing: -0.03em;
  }

  #accounting-view.acc-page .acc-hero,
  .acc-page .acc-hero {
    grid-area: hero;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 28px 28px;
    border-radius: 28px;
  }

  #accounting-view.acc-page .acc-hero-label,
  #accounting-view.acc-page .acc-hero-totals,
  #accounting-view.acc-page .acc-hero-value,
  .acc-page .acc-hero-label,
  .acc-page .acc-hero-totals,
  .acc-page .acc-hero-value {
    text-align: center;
    align-items: center;
  }

  #accounting-view.acc-page .acc-hero-label,
  .acc-page .acc-hero-label {
    font-size: 15px;
  }

  #accounting-view.acc-page .acc-hero-totals,
  .acc-page .acc-hero-totals {
    margin: 0;
    gap: 6px;
  }

  #accounting-view.acc-page .acc-hero-value,
  .acc-page .acc-hero-value {
    font-size: 52px;
    letter-spacing: -0.04em;
    line-height: 1.05;
  }

  #accounting-view.acc-page .acc-quick-actions,
  .acc-page .acc-quick-actions {
    grid-area: quick;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
  }

  #accounting-view.acc-page .acc-quick-btn,
  .acc-page .acc-quick-btn {
    min-height: 56px;
    border-radius: 16px;
    font-size: 15px;
    gap: 8px;
    box-shadow: none;
  }

  #accounting-view.acc-page .acc-quick-btn i,
  .acc-page .acc-quick-btn i {
    font-size: 15px;
  }

  #accounting-view.acc-page .acc-quick-in,
  .acc-page .acc-quick-in {
    background: #ecfdf5;
    color: #047857;
    border-color: rgba(5, 150, 105, 0.16);
  }

  #accounting-view.acc-page .acc-quick-out,
  .acc-page .acc-quick-out {
    background: #fff1f2;
    color: #be123c;
    border-color: rgba(225, 29, 72, 0.16);
  }

  #accounting-view.acc-page .acc-quick-move,
  .acc-page .acc-quick-move {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.16);
  }

  #accounting-view.acc-page .acc-wallets,
  .acc-page .acc-wallets {
    grid-area: wallets;
    margin: 0;
    padding: 16px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: 24px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  body.dark-mode #accounting-view.acc-page .acc-wallets,
  body.dark-mode .acc-page .acc-wallets {
    background: #1a1a22;
    border-color: rgba(255, 255, 255, 0.08);
  }

  #accounting-view.acc-page .acc-wallets-title,
  .acc-page .acc-wallets-title {
    font-size: 15px;
    margin: 0;
    flex: 0 0 auto;
  }

  /* Scroll only the accounts list; title + add stay fixed */
  #accounting-view.acc-page .acc-wallets-feed,
  .acc-page .acc-wallets-feed {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-inline-end: 2px;
  }

  #accounting-view.acc-page .acc-wallets-list,
  .acc-page .acc-wallets-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
  }

  #accounting-view.acc-page .acc-wallet-swipe,
  .acc-page .acc-wallet-swipe {
    flex: 0 0 auto;
    overflow: visible;
    border-radius: 16px;
  }

  #accounting-view.acc-page .acc-wallet-row,
  #accounting-view.acc-page .acc-wallet-swipe .acc-wallet-row,
  .acc-page .acc-wallet-row,
  .acc-page .acc-wallet-swipe .acc-wallet-row {
    border: 1px solid rgba(17, 24, 39, 0.06) !important;
    border-top: 1px solid rgba(17, 24, 39, 0.06) !important;
    border-radius: 16px;
    padding: 14px 14px;
    background: #f8f9fc;
    box-shadow: none;
    gap: 12px;
    transform: none !important;
    flex: 0 0 auto;
    min-height: 64px;
  }

  #accounting-view.acc-page .acc-wallet-row + .acc-wallet-row,
  .acc-page .acc-wallet-row + .acc-wallet-row {
    border-top: 1px solid rgba(17, 24, 39, 0.06) !important;
  }

  #accounting-view.acc-page .acc-wallet-reveal,
  .acc-page .acc-wallet-reveal {
    display: none !important;
  }

  #accounting-view.acc-page .acc-wallet-desk-actions,
  .acc-page .acc-wallet-desk-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease;
  }

  #accounting-view.acc-page .acc-wallet-row:hover .acc-wallet-desk-actions,
  #accounting-view.acc-page .acc-wallet-row:focus-within .acc-wallet-desk-actions,
  .acc-page .acc-wallet-row:hover .acc-wallet-desk-actions,
  .acc-page .acc-wallet-row:focus-within .acc-wallet-desk-actions {
    opacity: 1;
    pointer-events: auto;
  }

  #accounting-view.acc-page .acc-wallet-desk-btn,
  .acc-page .acc-wallet-desk-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 92, 252, 0.12);
    color: #7c5cfc;
    cursor: pointer;
    font-size: 13px;
  }

  #accounting-view.acc-page .acc-wallet-desk-btn.is-danger,
  .acc-page .acc-wallet-desk-btn.is-danger {
    background: rgba(225, 29, 72, 0.12);
    color: #e11d48;
  }

  #accounting-view.acc-page .acc-balance-icon,
  .acc-page .acc-balance-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 15px;
  }

  #accounting-view.acc-page .acc-balance-label,
  .acc-page .acc-balance-label {
    font-size: 15px;
  }

  #accounting-view.acc-page .acc-balance-value,
  #accounting-view.acc-page .acc-currency-line,
  .acc-page .acc-balance-value,
  .acc-page .acc-currency-line {
    font-size: 15px;
  }

  #accounting-view.acc-page .acc-wallet-add,
  .acc-page .acc-wallet-add {
    flex: 0 0 auto;
    min-height: 56px;
    border-radius: 16px;
    font-size: 20px;
  }

  body.dark-mode #accounting-view.acc-page .acc-wallet-row,
  body.dark-mode #accounting-view.acc-page .acc-wallet-swipe .acc-wallet-row,
  body.dark-mode .acc-page .acc-wallet-row,
  body.dark-mode .acc-page .acc-wallet-swipe .acc-wallet-row {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08) !important;
  }

  body.dark-mode #accounting-view.acc-page .acc-wallet-desk-btn,
  body.dark-mode .acc-page .acc-wallet-desk-btn {
    background: rgba(124, 92, 252, 0.22);
    color: #c4b5fd;
  }

  body.dark-mode #accounting-view.acc-page .acc-wallet-desk-btn.is-danger,
  body.dark-mode .acc-page .acc-wallet-desk-btn.is-danger {
    background: rgba(225, 29, 72, 0.22);
    color: #fda4af;
  }

  #accounting-view.acc-page .acc-side,
  .acc-page .acc-side {
    grid-area: side;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    align-self: stretch;
  }

  #accounting-view.acc-page .acc-period-panel,
  .acc-page .acc-period-panel {
    margin: 0;
    flex: 0 0 auto;
  }

  #accounting-view.acc-page .acc-period-trigger,
  .acc-page .acc-period-trigger {
    min-height: 44px;
    border-radius: 14px;
    font-size: 14px;
    padding: 8px 12px;
  }

  #accounting-view.acc-page .acc-ledger,
  .acc-page .acc-ledger {
    margin: 0;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #accounting-view.acc-page .acc-ledger-head,
  #accounting-view.acc-page .acc-search-wrap,
  #accounting-view.acc-page .acc-filter-row,
  .acc-page .acc-ledger-head,
  .acc-page .acc-search-wrap,
  .acc-page .acc-filter-row {
    flex: 0 0 auto;
  }

  #accounting-view.acc-page .acc-ledger-feed,
  .acc-page .acc-ledger-feed {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-inline-end: 2px;
  }

  body.dark-mode #accounting-view.acc-page .acc-ledger,
  body.dark-mode .acc-page .acc-ledger {
    background: #1a1a22;
    border-color: rgba(255, 255, 255, 0.06);
  }

  #accounting-view.acc-page .acc-ledger-head h4,
  .acc-page .acc-ledger-head h4 {
    font-size: 15px;
    margin: 0 0 10px;
  }

  #accounting-view.acc-page .acc-search-wrap,
  .acc-page .acc-search-wrap {
    margin-bottom: 8px;
  }

  #accounting-view.acc-page .acc-search-wrap .form-control,
  .acc-page .acc-search-wrap .form-control {
    min-height: 40px;
    border-radius: 12px;
    font-size: 13px;
  }

  #accounting-view.acc-page .acc-filter-row,
  .acc-page .acc-filter-row {
    gap: 6px;
    margin-bottom: 10px;
  }

  #accounting-view.acc-page .acc-filter-btn,
  .acc-page .acc-filter-btn {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: 999px;
  }

  #accounting-view.acc-page .acc-day-title,
  .acc-page .acc-day-title {
    font-size: 11px;
  }

  #accounting-view.acc-page .acc-tx-card,
  .acc-page .acc-tx-card {
    padding: 10px;
    border-radius: 12px;
    gap: 8px;
  }

  #accounting-view.acc-page .acc-tx-title,
  .acc-page .acc-tx-title {
    font-size: 13px;
    margin: 0 0 4px;
  }

  #accounting-view.acc-page .acc-tx-meta,
  .acc-page .acc-tx-meta {
    gap: 4px;
    font-size: 11px;
  }

  #accounting-view.acc-page .acc-chip,
  .acc-page .acc-chip {
    padding: 1px 6px;
    font-size: 11px;
  }

  #accounting-view.acc-page .acc-tx-amount,
  .acc-page .acc-tx-amount {
    font-size: 14px;
  }

  #accounting-view.acc-page .acc-delete-btn,
  .acc-page .acc-delete-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 12px;
    font-size: 14px;
  }

  #accounting-view.acc-page .page-skeleton,
  #accounting-view.acc-page .acc-load-error,
  .acc-page .page-skeleton,
  .acc-page .acc-load-error {
    grid-column: 1 / -1;
  }

  .acc-composer-overlay {
    padding: 32px;
    align-items: center;
    justify-content: center;
  }

  .acc-composer-sheet {
    width: min(640px, 100%);
    max-width: 640px;
    max-height: min(88vh, 760px);
    border-radius: 28px;
    padding: 22px 24px 18px;
    gap: 0;
  }

  .acc-composer-sheet::before {
    right: 24px;
    left: 24px;
  }

  .acc-composer-top {
    margin-bottom: 14px;
  }

  .acc-composer-top h4 {
    font-size: 22px;
    font-weight: 900;
  }

  .acc-composer-overlay .icon-btn {
    width: 40px;
    height: 40px;
  }

  .acc-composer-overlay .acc-type-seg {
    margin-bottom: 18px;
    padding: 5px;
    border-radius: 16px;
  }

  .acc-composer-overlay .acc-type-seg-btn {
    min-height: 44px;
    border-radius: 12px;
    font-size: 14px;
  }

  .acc-composer-overlay .acc-composer-body {
    gap: 16px;
    padding-bottom: 4px;
  }

  .acc-composer-overlay .acc-composer-group {
    gap: 12px;
  }

  .acc-composer-overlay .acc-field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .acc-composer-overlay .acc-field-label {
    font-size: 13px;
  }

  .acc-composer-overlay .form-control {
    min-height: 48px;
    border-radius: 14px;
    font-size: 15px;
    padding: 10px 14px;
  }

  .acc-composer-overlay .acc-composer-hint {
    font-size: 13px;
  }

  .acc-composer-overlay .acc-save-btn {
    margin-top: 16px;
    min-height: 52px;
    border-radius: 16px;
    font-size: 16px;
  }

  body.dark-mode .acc-composer-sheet {
    background: #1a1a22;
    border-color: rgba(255, 255, 255, 0.08);
  }

  /* Period search modal — desk board instead of phone sheet */
  .acc-dialog-overlay:has(.acc-period-modal) {
    align-items: center;
    justify-content: center;
    padding: 32px;
  }

  .acc-dialog-sheet.acc-period-modal {
    width: min(720px, 100%);
    max-width: 720px;
    max-height: min(88vh, 820px);
    padding: 28px 28px 22px;
    border-radius: 28px;
    gap: 18px;
    text-align: start;
  }

  .acc-period-modal-head {
    gap: 6px;
  }

  .acc-period-modal-head .acc-dialog-title {
    font-size: 24px;
    font-weight: 900;
    text-align: start;
  }

  .acc-period-modal-sub {
    font-size: 14px;
  }

  .acc-period-mode-tabs {
    gap: 8px;
    padding: 6px;
    border-radius: 16px;
  }

  .acc-period-mode-tab {
    min-height: 44px;
    border-radius: 12px;
    font-size: 14px;
  }

  .acc-period-section {
    gap: 10px;
  }

  .acc-period-section-title {
    font-size: 13px;
  }

  .acc-period-year-stepper {
    gap: 12px;
  }

  .acc-period-year-select {
    min-height: 52px;
    font-size: 22px;
    border-radius: 16px;
  }

  .acc-period-modal .acc-period-year-stepper .acc-period-nav-btn {
    width: 42px;
    height: 42px;
  }

  .acc-period-modal .acc-period-month-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .acc-period-modal .acc-period-month-chip {
    min-height: 52px;
    border-radius: 14px;
    font-size: 14px;
  }

  .acc-period-modal .acc-period-cal-nav {
    gap: 12px;
  }

  .acc-period-modal .acc-period-nav-btn {
    width: 42px;
    height: 42px;
  }

  .acc-period-modal .acc-period-month-name {
    font-size: 18px;
  }

  .acc-period-modal .acc-period-weekday {
    font-size: 12px;
  }

  .acc-period-modal .acc-period-day-grid {
    gap: 6px;
  }

  .acc-period-modal .acc-period-day-empty,
  .acc-period-modal .acc-period-day-chip {
    min-height: 42px;
    font-size: 14px;
  }

  .acc-period-modal-preview {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    text-align: start;
  }

  .acc-period-modal-preview-label {
    font-size: 13px;
  }

  .acc-period-modal-preview strong {
    font-size: 18px;
  }

  .acc-period-modal-actions {
    grid-template-columns: 1fr 1.2fr;
    gap: 12px;
  }

  .acc-period-modal-actions .btn {
    min-height: 48px;
    border-radius: 14px;
    font-size: 15px;
  }

  body.dark-mode .acc-dialog-sheet.acc-period-modal {
    background: #1a1a22;
    border-color: rgba(255, 255, 255, 0.08);
  }
}

/* Wide monitors */
@media (min-width: 1280px) {
  .sidebar {
    flex-basis: 92px;
    width: 92px;
    max-width: 92px;
  }

  .sidebar:hover,
  .sidebar:focus-within {
    flex-basis: 272px;
    width: 272px;
    max-width: 272px;
  }

  .content-area {
    padding: 4px 32px 40px;
  }

  .bookings-view .bk-hour-box.available,
  .bookings-view button.bk-hour-box.available {
    padding: 18px 20px 16px;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-body {
    padding: 18px 20px 16px;
  }

  .admin-main {
    width: min(1100px, 100%);
  }
}

/* Booking add/edit modal — desk two-column; body scrolls, scrollbar hidden */
@media (min-width: 1024px) {
  .bk-modal-overlay {
    padding: 32px 40px;
    align-items: center;
  }

  .bk-modal-content.bk-sheet,
  .bk-modal-content {
    width: min(920px, calc(100vw - 64px)) !important;
    max-width: 920px !important;
    max-height: min(90dvh, 900px) !important;
    height: auto !important;
    border-radius: 28px !important;
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.16) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .bk-modal-content.bk-sheet .bk-add-form {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .bk-modal-content.bk-sheet .bk-modal-header {
    padding: 20px 28px 16px !important;
    flex: 0 0 auto !important;
  }

  .bk-modal-content.bk-sheet .bk-modal-header::before {
    right: 28px;
    left: 28px;
    height: 4px;
  }

  .bk-modal-header h3 {
    font-size: 24px !important;
    font-weight: 900;
    letter-spacing: -0.03em;
  }

  .bk-modal-close {
    width: 48px !important;
    height: 48px !important;
    font-size: 20px !important;
  }

  .bk-modal-content.bk-sheet .bk-modal-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    grid-template-areas:
      'error error'
      'name schedule'
      'price schedule'
      'notes schedule'
      'phone schedule';
    align-content: start;
    column-gap: 22px;
    row-gap: 14px;
    padding: 8px 28px 20px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .bk-modal-content.bk-sheet .bk-modal-body::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
  }

  .bk-modal-content.bk-sheet .bk-form-error {
    grid-area: error;
  }

  .bk-modal-content.bk-sheet .bk-field-group-name {
    grid-area: name;
  }

  .bk-modal-content.bk-sheet .bk-field-group-price {
    grid-area: price;
  }

  .bk-modal-content.bk-sheet .bk-field-group-notes {
    grid-area: notes;
  }

  .bk-modal-content.bk-sheet .bk-field-group-contact {
    grid-area: phone;
  }

  .bk-modal-content.bk-sheet .bk-field-group-time {
    grid-area: schedule;
    align-self: stretch;
    height: 100%;
    margin: 0;
  }

  .bk-modal-content.bk-sheet .bk-field-group {
    margin: 0;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fafafa;
    border: 1px solid rgba(17, 24, 39, 0.06);
  }

  body.dark-mode .bk-modal-content.bk-sheet .bk-field-group {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
  }

  .bk-modal-content.bk-sheet .bk-field-group-time {
    background: #f5f2ff;
    border-color: rgba(124, 92, 252, 0.22);
    display: flex;
    flex-direction: column;
  }

  body.dark-mode .bk-modal-content.bk-sheet .bk-field-group-time {
    background: rgba(124, 92, 252, 0.12);
    border-color: rgba(124, 92, 252, 0.28);
  }

  .bk-modal-content.bk-sheet .bk-field-group-title {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .bk-modal-content.bk-sheet .bk-form-control,
  .bk-modal-content.bk-sheet .bk-money-field,
  .bk-modal-content.bk-sheet .bk-phone-input-row {
    min-height: 52px;
  }

  .bk-modal-content.bk-sheet .bk-form-control {
    font-size: 15px;
    border-radius: 14px;
  }

  .bk-modal-content.bk-sheet .bk-notes-input {
    min-height: 88px;
    resize: vertical;
  }

  .bk-modal-content.bk-sheet .bk-time-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .bk-modal-content.bk-sheet .bk-schedule-slot {
    flex: 1;
    padding: 14px;
    border-radius: 16px;
    background: #ffffff;
  }

  body.dark-mode .bk-modal-content.bk-sheet .bk-schedule-slot {
    background: rgba(0, 0, 0, 0.2);
  }

  .bk-modal-content.bk-sheet .bk-time-row {
    gap: 10px;
  }

  .bk-modal-content.bk-sheet .bk-modal-actions {
    padding: 16px 28px 22px !important;
    flex-direction: row;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 auto !important;
  }

  .bk-modal-content.bk-sheet .bk-save-btn {
    min-width: 220px;
    min-height: 54px;
    width: auto;
    max-width: none;
    padding: 0 28px;
    font-size: 16px;
    font-weight: 800;
    border-radius: 16px;
  }
}

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .bookings-view .bk-hour-box.available:hover {
    filter: brightness(0.985);
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked:hover {
    filter: brightness(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bookings-view .bk-hour-box.available,
  .bookings-view .bk-hour-box.bk-hero-card.booked,
  .bookings-view .bk-date-nav-btn,
  .bookings-view .bk-date-nav-btn--desk {
    transition: none !important;
  }
}
/* Calendar — production cal-wrapper / cal-day availability only.
   Section create + day booking cards live on the bookings timeline. */

.calendar-view {
  padding-bottom: 0;
}

.cal-wrapper {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-card);
  border: 1px solid var(--border-color);
}

.cal-month-nav {
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: var(--space-4);
  background: transparent;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-1);
  text-align: center;
}

.cal-weekdays {
  margin-bottom: var(--space-2);
}

.cal-day-header {
  font-size: var(--font-size-xs);
  font-weight: 800;
  color: var(--text-muted);
  padding: var(--space-1) 0;
}

.cal-board-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: var(--space-4);
}

.cal-day-num {
  display: block;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-md);
  font-weight: 700;
  cursor: pointer;
  background: var(--bg-color);
  border: 2px solid transparent;
  color: var(--text-dark);
  font-family: inherit;
  padding: 0;
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.cal-day-empty {
  cursor: default;
  background: transparent;
  pointer-events: none;
  border: none;
}

.cal-day:active:not(.cal-day-empty) {
  transform: scale(0.97);
}

.cal-day.shift-1-only {
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.4) 50%,
    var(--bg-color) 50%
  ) !important;
  border-color: rgba(79, 70, 229, 0.3) !important;
}

.cal-day.shift-2-only {
  background: linear-gradient(
    135deg,
    var(--bg-color) 50%,
    rgba(168, 85, 247, 0.4) 50%
  ) !important;
  border-color: rgba(168, 85, 247, 0.3) !important;
}

.cal-day.both-booked {
  background: #4f46e5 !important;
  color: white !important;
  border-color: #4f46e5 !important;
}

.cal-day.today {
  border-color: #7c5cfc !important;
  font-weight: 900;
  box-shadow:
    0 0 0 2px #ede9fe,
    0 0 0 4px #7c5cfc;
  position: relative;
  z-index: 1;
}

/* Keep today’s ring visible even when the day has booking fills */
.cal-day.today.shift-1-only,
.cal-day.today.shift-2-only,
.cal-day.today.both-booked {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #7c5cfc;
}

.cal-day.today:not(.shift-1-only):not(.shift-2-only):not(.both-booked) {
  background: #ede9fe;
  color: #7c5cfc;
}

body.dark-mode .cal-wrapper {
  background: var(--card-bg);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

body.dark-mode .cal-day {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dark);
  border-color: transparent;
}

body.dark-mode .cal-day.today {
  box-shadow:
    0 0 0 2px rgba(124, 92, 252, 0.28),
    0 0 0 4px #7c5cfc;
}

body.dark-mode .cal-day.today.shift-1-only,
body.dark-mode .cal-day.today.shift-2-only,
body.dark-mode .cal-day.today.both-booked {
  box-shadow:
    0 0 0 2px rgba(30, 30, 38, 0.95),
    0 0 0 4px #7c5cfc;
}

body.dark-mode .cal-day.today:not(.shift-1-only):not(.shift-2-only):not(.both-booked) {
  background: rgba(124, 92, 252, 0.22);
  color: #c4b5fd;
}

body.dark-mode .cal-day-header {
  color: #e5e7eb;
}

body.dark-mode .cal-legend {
  border-top-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .cal-legend-copy strong {
  color: #f3f4f6;
}

body.dark-mode .cal-legend-copy span {
  color: #d1d5db;
}

/* Fail-closed: unknown availability must not look like a free day. */
.cal-day.cal-day-pending {
  background: var(--surface);
  color: var(--text-muted);
  border-color: var(--border-color);
}

.cal-legend {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: var(--space-4) 0 0;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
}

.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.cal-legend-swatch {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.cal-legend-swatch--morning {
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.4) 50%,
    var(--bg-color) 50%
  );
  border-color: rgba(79, 70, 229, 0.3);
}

.cal-legend-swatch--evening {
  background: linear-gradient(
    135deg,
    var(--bg-color) 50%,
    rgba(168, 85, 247, 0.4) 50%
  );
  border-color: rgba(168, 85, 247, 0.3);
}

.cal-legend-swatch--fullday {
  background: #4f46e5;
  border-color: #4f46e5;
}

.cal-legend-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  line-height: 1.2;
}

.cal-legend-copy strong {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-dark);
}

.cal-legend-copy span {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

body.dark-mode .cal-legend-swatch--morning {
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.55) 50%,
    var(--bg-color) 50%
  );
}

body.dark-mode .cal-legend-swatch--evening {
  background: linear-gradient(
    135deg,
    var(--bg-color) 50%,
    rgba(168, 85, 247, 0.55) 50%
  );
}

.cal-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cal-state-error {
  color: #b91c1c;
}

.cal-retry-btn {
  width: auto;
  min-width: 140px;
}

/* Add / delete daily-section modals (opened from timeline) */
.cal-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-scrim, rgba(15, 23, 42, 0.42));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal-elevated, 2100);
  padding: 16px;
  animation: calOverlayIn 180ms ease;
}

.cal-modal-overlay.active {
  display: flex;
}

.cal-modal-overlay.is-exiting {
  animation: calOverlayOut 180ms ease forwards;
  pointer-events: none;
}

.cal-modal-content {
  background: var(--card-bg);
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-xl);
  padding: 0;
  box-shadow: var(--shadow-md);
  max-height: min(90vh, 90dvh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  flex: 0 1 auto;
  border: 1px solid var(--border-color);
  animation: calSheetIn 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cal-modal-content.is-exiting,
.cal-sheet.is-exiting,
.cal-confirm-sheet.is-exiting {
  animation: calSheetOut 180ms ease forwards;
}

.daily-section-modal-content,
.cal-sheet-compact {
  max-width: 340px;
  flex: 0 0 auto;
  max-height: min(70vh, 420px);
}

.daily-section-modal-content.cal-dialog-card {
  max-width: 400px;
  width: 100%;
  max-height: min(86vh, 86dvh);
  border-radius: 28px;
  border: 1px solid rgba(124, 92, 252, 0.1);
  box-shadow: 0 18px 48px rgba(99, 80, 180, 0.14);
  position: relative;
  overflow: hidden;
}

.daily-section-modal-content.cal-dialog-card::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  right: 16px;
  left: 16px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c5cfc, #a78bfa);
  pointer-events: none;
  z-index: 3;
}

.cal-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 2px 14px 8px;
}

.cal-modal-body-compact {
  flex: 0 0 auto;
  overflow: visible;
  padding: 2px 14px 6px;
}

@keyframes calOverlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes calOverlayOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes calSheetIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes calSheetOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.cal-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 10px 14px 6px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--card-bg);
}

.daily-section-modal-content .cal-modal-header,
.cal-sheet-compact .cal-modal-header {
  padding-top: 14px;
  position: relative;
}

.daily-section-modal-content.cal-dialog-card .cal-modal-header {
  padding: 16px 16px 8px;
  align-items: center;
}

.daily-section-modal-content .cal-modal-header::before,
.cal-sheet-compact .cal-modal-header::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border-color) 75%, var(--text-muted));
  transform: translateX(-50%);
  pointer-events: none;
}

.daily-section-modal-content.cal-dialog-card .cal-modal-header::before {
  display: none;
}

.cal-modal-heading {
  min-width: 0;
}

.cal-modal-header h3 {
  font-size: 15px;
  color: var(--text-dark);
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.daily-section-modal-content.cal-dialog-card .cal-modal-header h3 {
  font-size: 18px;
  font-weight: 900;
}

.cal-modal-subtitle {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.3;
}

.cal-modal-close {
  background: var(--bg-color);
  border: 1px solid color-mix(in srgb, var(--border-color) 90%, transparent);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.daily-section-modal-content.cal-dialog-card .cal-modal-close {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: #ede9fe;
  color: #7c5cfc;
  font-size: 18px;
  box-shadow: none;
}

.cal-modal-close:hover,
.cal-modal-close:focus-visible {
  background: var(--surface);
  color: var(--text-dark);
}

.daily-section-modal-content.cal-dialog-card .cal-modal-close:hover,
.daily-section-modal-content.cal-dialog-card .cal-modal-close:focus-visible {
  background: #ddd6fe;
  color: #6d4eef;
}

.cal-field-group {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.cal-field-group-title {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
}

.cal-field-group-hint {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.4;
}

.daily-section-time-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(124, 92, 252, 0.14);
  border-radius: 20px;
  background: #ede9fe;
}

body.dark-mode .daily-section-time-block {
  background: rgba(124, 92, 252, 0.14);
  border-color: rgba(124, 92, 252, 0.22);
}

.daily-section-time-slot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: var(--card-bg, #fff);
  border: 1px solid rgba(15, 23, 42, 0.04);
  box-sizing: border-box;
  overflow: hidden;
}

body.dark-mode .daily-section-time-slot {
  border-color: rgba(255, 255, 255, 0.06);
}

.daily-section-time-slot-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.daily-section-time-slot-head .cal-form-label {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

.daily-section-time-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.daily-section-time-dot.is-start {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.daily-section-time-dot.is-end {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22);
}

.daily-section-time-field {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.daily-section-time-input,
.daily-section-modal-content.cal-dialog-card .daily-section-time-input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  padding: 8px 12px;
  border: 1.5px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  box-sizing: border-box;
  direction: ltr;
  text-align: center;
  overflow: hidden;
}

.daily-section-time-input::-webkit-datetime-edit,
.daily-section-time-input::-webkit-calendar-picker-indicator {
  max-width: 100%;
}

.daily-section-time-input:focus,
.daily-section-modal-content.cal-dialog-card .daily-section-time-input:focus {
  border-color: #7c5cfc;
  box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.16);
}

body.dark-mode .daily-section-time-input,
body.dark-mode .daily-section-modal-content.cal-dialog-card .daily-section-time-input {
  background: #16161d;
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-dark);
}

.cal-form-group {
  margin-bottom: 0;
  min-width: 0;
}

.cal-form-label {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.cal-form-control {
  width: 100%;
  min-height: 34px;
  height: 34px;
  padding: 4px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--surface);
  color: var(--text-dark);
  font-family: inherit;
  font-weight: 600;
  box-sizing: border-box;
  box-shadow: none;
  outline: none;
}

.daily-section-modal-content.cal-dialog-card .cal-form-control {
  min-height: 46px;
  height: 46px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1.5px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  font-size: 14px;
}

.cal-form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}

.daily-section-modal-content.cal-dialog-card .cal-form-control:focus {
  border-color: #7c5cfc;
  box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.16);
}

.cal-modal-error {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: rgba(185, 28, 28, 0.08);
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cal-confirm-overlay {
  z-index: var(--z-modal-elevated);
}

.cal-confirm-sheet {
  max-width: 320px;
  width: min(100%, 320px);
  text-align: center;
  flex: 0 0 auto;
  max-height: none;
}

.cal-confirm-body {
  padding: 20px 18px 6px;
}

.cal-confirm-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--danger);
  background: var(--danger-light);
  line-height: 1;
  animation: calConfirmPop 220ms ease;
}

@keyframes calConfirmPop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.cal-confirm-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-dark);
}

.cal-confirm-target {
  margin: 0 auto 4px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger-light) 70%, var(--surface));
  border: none;
  text-align: center;
}

.cal-confirm-target-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-dark);
}

.cal-confirm-target-meta {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.cal-confirm-message {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.45;
}

.daily-section-modal-actions,
.cal-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 0;
  padding: 8px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
  background: var(--card-bg);
  border-top: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
}

.daily-section-modal-content.cal-dialog-card .daily-section-modal-actions {
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: none;
}

.daily-section-modal-actions .btn,
.cal-modal-actions .btn {
  min-height: 34px;
  font-size: 12px;
  justify-content: center;
}

.daily-section-modal-content.cal-dialog-card .cal-add-section-save {
  min-height: 48px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  gap: 8px;
  background: #7c5cfc !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 12px 28px rgba(124, 92, 252, 0.3) !important;
}

.daily-section-modal-content.cal-dialog-card .cal-add-section-cancel {
  min-height: 48px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  background: #fff;
  color: #7c5cfc;
  border: 1.5px solid rgba(124, 92, 252, 0.28);
  box-shadow: none;
}

.cal-confirm-actions {
  border-top: none;
  padding: 12px 16px 16px;
  background: transparent;
}

.cal-confirm-actions.is-single {
  grid-template-columns: 1fr;
}

.cal-btn-secondary {
  background: var(--surface);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  box-shadow: none;
  justify-content: center;
}

.cal-btn-danger {
  background: var(--danger);
  color: #fff;
  border: 1.5px solid var(--danger);
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.22);
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  min-height: 48px;
  font-size: 15px;
  padding-inline: 18px;
}

.cal-btn-danger:hover,
.cal-btn-danger:focus-visible {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.cal-btn-danger:active {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
  transform: scale(0.98);
}

.btn.is-saving {
  opacity: 0.9;
}

.daily-section-delete {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin-inline-start: 8px;
  flex-shrink: 0;
  border: 1.5px solid color-mix(in srgb, var(--danger) 50%, transparent);
  border-radius: 12px;
  background: var(--danger-light);
  color: var(--danger);
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  padding: 0;
  opacity: 1;
  position: relative;
  z-index: 2;
  touch-action: manipulation;
}

.daily-section-delete:hover,
.daily-section-delete:focus-visible {
  background: color-mix(in srgb, var(--danger) 16%, var(--danger-light));
  border-color: var(--danger);
  color: #b91c1c;
}

.daily-section-delete:active {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  transform: scale(0.96);
}

@media (min-width: 768px) {
  .cal-wrapper {
    padding: 16px;
  }

  .cal-month-nav {
    margin-bottom: 20px;
  }

  .cal-grid {
    gap: 8px;
  }

  .cal-weekdays {
    margin-bottom: 10px;
  }

  .cal-day-header {
    font-size: 13px;
    padding: 10px 0;
  }

  .cal-day {
    font-size: 16px;
  }

  .cal-form-control {
    min-height: 40px;
    height: 40px;
    padding: 8px 12px;
    font-size: 14px;
  }

  .daily-section-modal-actions .btn,
  .cal-modal-actions .btn {
    min-height: 40px;
    font-size: 13px;
  }

  .daily-section-modal-content .cal-modal-header::before,
  .cal-sheet-compact .cal-modal-header::before {
    display: none;
  }
}

@media (max-width: 767px) {
  /* Overlay fills visual viewport above bottom nav (nav stays visible). */
  .cal-modal-overlay {
    top: var(--app-vv-offset-top, 0px);
    right: 0;
    bottom: auto;
    left: 0;
    height: calc(
      var(--app-vv-height, 100dvh) - var(--app-bottom-nav-height, 58px) -
        var(--app-safe-bottom, 0px)
    );
    max-height: calc(
      var(--app-vv-height, 100dvh) - var(--app-bottom-nav-height, 58px) -
        var(--app-safe-bottom, 0px)
    );
    padding: max(52px, 18%) 10px 8px;
    align-items: flex-end;
    justify-content: center;
    box-sizing: border-box;
  }

  .cal-modal-overlay--centered {
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    /* Cover full viewport — nav is hidden while overlay is open, so no white gap */
    height: var(--app-vv-height, 100dvh) !important;
    max-height: var(--app-vv-height, 100dvh) !important;
  }

  body.feature-overlay-open .cal-modal-overlay {
    height: var(--app-vv-height, 100dvh);
    max-height: var(--app-vv-height, 100dvh);
  }

  .cal-confirm-overlay {
    align-items: center;
    justify-content: center;
    padding: 16px 18px;
  }

  body.keyboard-open .cal-modal-overlay {
    height: var(--app-vv-height, 100dvh);
    max-height: var(--app-vv-height, 100dvh);
    padding-top: max(8px, 4%);
    padding-bottom: max(8px, var(--app-safe-bottom, 0px));
  }

  .cal-modal-content {
    max-height: min(
      70dvh,
      70%,
      calc(
        (
            var(--app-vv-height, 100dvh) - var(--app-bottom-nav-height, 58px) -
              var(--app-safe-bottom, 0px)
          ) * 0.7
      )
    );
    height: fit-content;
    width: 100%;
    flex: 0 1 auto;
    align-self: auto;
    border-radius: var(--radius-xl) var(--radius-xl) var(--radius-md) var(--radius-md);
    animation: calSheetUp 220ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .daily-section-modal-content,
  .cal-sheet-compact {
    width: 100%;
    max-width: none;
    max-height: min(
      58dvh,
      58%,
      calc(
        (
            var(--app-vv-height, 100dvh) - var(--app-bottom-nav-height, 58px) -
              var(--app-safe-bottom, 0px)
          ) * 0.58
      )
    );
    height: fit-content;
    flex: 0 1 auto;
    align-self: auto;
    animation: calSheetUp 220ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .daily-section-modal-content.cal-dialog-card {
    max-width: 400px;
    width: 100%;
    max-height: min(86vh, 86dvh);
    border-radius: 28px;
    animation: calSheetIn 200ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  body.keyboard-open .cal-modal-content,
  body.keyboard-open .daily-section-modal-content,
  body.keyboard-open .cal-sheet-compact {
    max-height: min(88dvh, 88%, calc(var(--app-vv-height, 100dvh) * 0.88));
  }

  .cal-confirm-sheet {
    width: min(100%, 320px);
    max-height: none;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    animation: calConfirmIn 200ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .cal-modal-content.is-exiting:not(.cal-confirm-sheet):not(.cal-dialog-card) {
    animation: calSheetDown 180ms ease forwards;
  }

  .daily-section-modal-content.cal-dialog-card.is-exiting {
    animation: calSheetOut 180ms ease forwards;
  }

  .cal-confirm-sheet.is-exiting {
    animation: calConfirmOut 160ms ease forwards;
  }

  @keyframes calSheetUp {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes calSheetDown {
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(24px);
    }
  }

  @keyframes calConfirmIn {
    from {
      opacity: 0;
      transform: scale(0.96) translateY(8px);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }

  @keyframes calConfirmOut {
    from {
      opacity: 1;
      transform: scale(1);
    }
    to {
      opacity: 0;
      transform: scale(0.97);
    }
  }

  .cal-modal-header {
    padding: 8px 12px 4px;
  }

  .cal-modal-header h3 {
    font-size: 14px;
  }

  .cal-modal-subtitle {
    font-size: 10px;
  }

  .cal-modal-close {
    width: 28px;
    height: 28px;
  }

  .daily-section-modal-content.cal-dialog-card .cal-modal-close {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .cal-modal-body,
  .cal-modal-body-compact {
    padding: 2px 12px 6px;
  }

  .daily-section-modal-content.cal-dialog-card .cal-modal-body-compact {
    padding: 4px 16px 8px;
  }

  .daily-section-time-block {
    padding: 10px;
    gap: 10px;
  }

  .cal-form-control {
    min-height: 34px;
    height: 34px;
    font-size: 13px;
  }

  .daily-section-modal-content.cal-dialog-card .cal-form-control,
  .daily-section-modal-content.cal-dialog-card .daily-section-time-input {
    min-height: 44px;
    height: 44px;
    font-size: 14px;
  }

  .cal-modal-actions,
  .daily-section-modal-actions {
    padding: 6px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-section-modal-actions .btn,
  .cal-modal-actions .btn {
    min-height: 34px;
  }

  .cal-confirm-body {
    padding: 18px 16px 4px;
  }

  .cal-confirm-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
    margin-bottom: 8px;
  }

  .cal-confirm-title {
    font-size: 16px;
    margin: 0 0 6px;
  }

  .cal-confirm-message {
    font-size: 13px;
    line-height: 1.4;
    margin: 0 0 10px;
  }

  .cal-confirm-actions {
    padding: 10px 14px 14px;
  }
}

/* ——— Dark mode: add-section modal ——— */
body.dark-mode .daily-section-modal-content.cal-dialog-card .cal-add-section-cancel {
  background: rgba(124, 92, 252, 0.14);
  color: #c4b5fd;
  border-color: rgba(124, 92, 252, 0.35);
}

body.dark-mode .daily-section-modal-content.cal-dialog-card .cal-modal-close {
  background: rgba(124, 92, 252, 0.22);
  color: #c4b5fd;
}

body.dark-mode .daily-section-modal-content.cal-dialog-card .cal-modal-close:hover,
body.dark-mode .daily-section-modal-content.cal-dialog-card .cal-modal-close:focus-visible {
  background: rgba(124, 92, 252, 0.32);
  color: #ddd6fe;
}

body.dark-mode .daily-section-time-input,
body.dark-mode .daily-section-modal-content.cal-dialog-card .daily-section-time-input {
  color-scheme: dark;
}

body.dark-mode .daily-section-time-input::-webkit-calendar-picker-indicator,
body.dark-mode
  .daily-section-modal-content.cal-dialog-card
  .daily-section-time-input::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.35);
  opacity: 0.85;
  cursor: pointer;
}

/* ——— Desktop calendar board ——— */
@media (min-width: 1024px) {
  .calendar-view {
    width: 100%;
    max-width: none;
    min-height: calc(100dvh - 108px);
    display: flex;
    flex-direction: column;
  }

  .cal-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 28px;
    border: 1px solid rgba(17, 24, 39, 0.07);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    background: #ffffff;
  }

  body.dark-mode .cal-wrapper {
    background: #1a1a22;
    border-color: rgba(255, 255, 255, 0.06);
  }

  .cal-board-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0;
    padding: 20px 28px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
    background: linear-gradient(180deg, #f8f7ff 0%, #ffffff 100%);
  }

  body.dark-mode .cal-board-head {
    background: linear-gradient(180deg, rgba(124, 92, 252, 0.12) 0%, #1a1a22 100%);
    border-bottom-color: rgba(255, 255, 255, 0.06);
  }

  .cal-month-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    flex: 0 1 auto;
    justify-content: center;
  }

  .cal-month-title,
  .cal-month-nav h3 {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #111827;
    min-width: 12rem;
    text-align: center;
  }

  body.dark-mode .cal-month-title,
  body.dark-mode .cal-month-nav h3 {
    color: #f9fafb;
  }

  .cal-month-nav-btn.icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #f3f0ff;
    color: #5b45d6;
    border: 1px solid rgba(124, 92, 252, 0.16);
    box-shadow: none;
  }

  .cal-month-nav-btn.icon-btn:hover {
    background: #7c5cfc;
    color: #fff;
    border-color: transparent;
  }

  .cal-board-head {
    flex: 0 0 auto;
  }

  .cal-board {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 14px 24px 10px;
  }

  .cal-weekdays {
    flex: 0 0 auto;
    margin-bottom: 8px;
    gap: 8px;
  }

  .cal-day-header {
    padding: 10px 0;
    font-size: 13px;
    font-weight: 800;
    color: #9ca3af;
    letter-spacing: 0.02em;
    border-radius: 12px;
    background: #fafafa;
  }

  body.dark-mode .cal-day-header {
    background: rgba(255, 255, 255, 0.06);
    color: #e5e7eb !important;
  }

  .cal-days {
    flex: 1 1 auto;
    min-height: 0;
    gap: 8px;
    /* Stretch week rows to fill the board — kills bottom whitespace */
    grid-auto-rows: 1fr;
    align-content: stretch;
  }

  .cal-day {
    aspect-ratio: auto;
    min-height: 0;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    background: #fafafa;
    box-shadow: none;
    transition:
      background 160ms ease,
      border-color 160ms ease,
      transform 160ms ease,
      box-shadow 160ms ease;
  }

  .cal-day-empty {
    background: transparent !important;
    border: none !important;
    min-height: 0;
    height: 100%;
  }

  .cal-day-num {
    position: relative;
    z-index: 1;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #111827;
  }

  body.dark-mode .cal-day {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
  }

  body.dark-mode .cal-day-num {
    color: #f3f4f6;
  }

  /* Same phone fills on desk cells */
  .cal-day.shift-1-only {
    background: linear-gradient(
      135deg,
      rgba(79, 70, 229, 0.4) 50%,
      #fafafa 50%
    ) !important;
    border-color: rgba(79, 70, 229, 0.3) !important;
  }

  .cal-day.shift-2-only {
    background: linear-gradient(
      135deg,
      #fafafa 50%,
      rgba(168, 85, 247, 0.4) 50%
    ) !important;
    border-color: rgba(168, 85, 247, 0.3) !important;
  }

  .cal-day.both-booked {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #fff !important;
  }

  .cal-day.both-booked .cal-day-num {
    color: #fff;
  }

  body.dark-mode .cal-day.shift-1-only {
    background: linear-gradient(
      135deg,
      rgba(79, 70, 229, 0.45) 50%,
      rgba(255, 255, 255, 0.04) 50%
    ) !important;
  }

  body.dark-mode .cal-day.shift-2-only {
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.04) 50%,
      rgba(168, 85, 247, 0.45) 50%
    ) !important;
  }

  /* Desk: today = clear ring; stronger when day is booked (purple-on-purple) */
  .cal-day.today {
    border: 2px solid #7c5cfc !important;
    box-shadow:
      0 0 0 3px rgba(124, 92, 252, 0.2),
      0 8px 18px rgba(124, 92, 252, 0.12) !important;
    position: relative;
    z-index: 3;
    font-weight: 900;
    outline: none;
  }

  /* Booked today: white gap + thick purple outer ring so it pops on fill */
  .cal-day.today.shift-1-only,
  .cal-day.today.shift-2-only,
  .cal-day.today.both-booked {
    border: 3px solid #ffffff !important;
    box-shadow:
      0 0 0 3px #7c5cfc,
      0 0 0 7px rgba(124, 92, 252, 0.35),
      0 12px 28px rgba(15, 23, 42, 0.22) !important;
  }

  .cal-day.today:not(.shift-1-only):not(.shift-2-only):not(.both-booked) {
    background: #fafafa !important;
    color: #111827 !important;
  }

  .cal-day.today .cal-day-num {
    color: #5b45d6;
    font-weight: 900;
  }

  .cal-day.today.shift-1-only .cal-day-num,
  .cal-day.today.shift-2-only .cal-day-num,
  .cal-day.today.both-booked .cal-day-num {
    color: #fff;
    text-shadow: 0 1px 3px rgba(15, 23, 42, 0.45);
  }

  body.dark-mode .cal-day.today {
    border-color: #c4b5fd !important;
    box-shadow:
      0 0 0 3px rgba(196, 181, 253, 0.28),
      0 8px 18px rgba(124, 92, 252, 0.22) !important;
  }

  body.dark-mode .cal-day.today.shift-1-only,
  body.dark-mode .cal-day.today.shift-2-only,
  body.dark-mode .cal-day.today.both-booked {
    border: 3px solid #0f0f14 !important;
    box-shadow:
      0 0 0 3px #e9e0ff,
      0 0 0 7px rgba(167, 139, 250, 0.55),
      0 12px 28px rgba(0, 0, 0, 0.45) !important;
  }

  body.dark-mode .cal-day.today:not(.shift-1-only):not(.shift-2-only):not(.both-booked) {
    background: rgba(255, 255, 255, 0.03) !important;
    color: #f3f4f6 !important;
  }

  body.dark-mode .cal-day.today .cal-day-num {
    color: #c4b5fd;
  }

  body.dark-mode .cal-day.today.shift-1-only .cal-day-num,
  body.dark-mode .cal-day.today.shift-2-only .cal-day-num,
  body.dark-mode .cal-day.today.both-booked .cal-day-num {
    color: #fff;
  }

  .cal-day:hover:not(.cal-day-empty) {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(124, 92, 252, 0.1);
  }

  .cal-day.today:hover:not(.cal-day-empty) {
    box-shadow:
      0 0 0 3px rgba(124, 92, 252, 0.3),
      0 12px 26px rgba(124, 92, 252, 0.2) !important;
  }

  .cal-day.today.shift-1-only:hover:not(.cal-day-empty),
  .cal-day.today.shift-2-only:hover:not(.cal-day-empty),
  .cal-day.today.both-booked:hover:not(.cal-day-empty) {
    box-shadow:
      0 0 0 3px #7c5cfc,
      0 0 0 8px rgba(124, 92, 252, 0.42),
      0 14px 30px rgba(15, 23, 42, 0.28) !important;
  }

  .cal-legend {
    flex: 0 0 auto;
    margin: 0;
    padding: 14px 28px 18px;
    border-top: 1px solid rgba(17, 24, 39, 0.06);
    justify-content: center;
    gap: 14px 20px;
    background: transparent;
  }

  body.dark-mode .cal-legend {
    background: transparent;
    border-top-color: rgba(255, 255, 255, 0.06);
  }

  .cal-legend-item {
    padding: 8px 14px;
    border-radius: 14px;
    background: #fafafa;
    border: 1px solid rgba(17, 24, 39, 0.06);
  }

  body.dark-mode .cal-legend-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
  }

  .cal-legend-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 12px;
    text-align: start;
  }

  .cal-legend-copy strong {
    font-size: 13px;
    color: #111827;
  }

  body.dark-mode .cal-legend-copy strong {
    color: #f3f4f6;
  }
}

@media (min-width: 1280px) {
  .cal-day {
    padding: 14px;
  }

  .cal-day-num {
    font-size: 20px;
  }

  .cal-month-title,
  .cal-month-nav h3 {
    font-size: 30px;
  }
}

/* ——— Desktop: add-section dialog ——— */
@media (min-width: 1024px) {
  .cal-modal-overlay.cal-modal-overlay--centered {
    padding: 32px 40px;
    align-items: center;
    justify-content: center;
  }

  .daily-section-modal-content,
  .daily-section-modal-content.cal-dialog-card {
    width: min(560px, calc(100vw - 64px)) !important;
    max-width: 560px !important;
    max-height: none !important;
    border-radius: 28px !important;
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.16) !important;
  }

  .daily-section-modal-content.cal-dialog-card::before {
    right: 24px;
    left: 24px;
    height: 4px;
  }

  .daily-section-modal-content.cal-dialog-card .cal-modal-header {
    padding: 22px 28px 12px !important;
    gap: 16px;
  }

  .daily-section-modal-content.cal-dialog-card .cal-modal-header h3 {
    font-size: 24px !important;
    font-weight: 900;
    letter-spacing: -0.03em;
  }

  .daily-section-modal-content.cal-dialog-card .cal-modal-subtitle {
    font-size: 14px;
    margin-top: 4px;
  }

  .daily-section-modal-content.cal-dialog-card .cal-modal-close {
    width: 48px !important;
    height: 48px !important;
    font-size: 18px !important;
  }

  .daily-section-modal-content.cal-dialog-card .cal-modal-body-compact {
    padding: 8px 28px 12px !important;
  }

  .daily-section-modal-content.cal-dialog-card .daily-section-time-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
  }

  .daily-section-modal-content.cal-dialog-card .daily-section-time-slot {
    min-width: 0;
  }

  .daily-section-modal-content.cal-dialog-card .daily-section-time-input,
  .daily-section-modal-content.cal-dialog-card .cal-form-control {
    min-height: 56px !important;
    height: 56px !important;
    font-size: 16px !important;
    border-radius: 16px !important;
  }

  .daily-section-modal-content.cal-dialog-card .daily-section-modal-actions {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px 28px 24px !important;
  }

  .daily-section-modal-content.cal-dialog-card .cal-add-section-save,
  .daily-section-modal-content.cal-dialog-card .cal-add-section-cancel {
    flex: 1 1 0;
    min-height: 54px;
    font-size: 15px;
    font-weight: 800;
    border-radius: 16px;
  }
}
/* Bookings / timeline — purple soft cards (hours screenshot law). */

.bookings-view {
  --bk-purple: #7c5cfc;
  --bk-purple-soft: #ede9fe;
  --bk-purple-mid: #c4b5fd;
  --bk-mint: #ecfdf5;
  --bk-mint-text: #059669;
  --bk-peach: #fff7ed;
  --bk-peach-text: #ea580c;
  --bk-morning: #3b82f6;
  --bk-morning-soft: #e3f2fd;
  --bk-morning-text: #1d4ed8;
  --bk-evening: #a855f7;
  --bk-evening-soft: #f3e5f5;
  --bk-evening-text: #7c3aed;
  --bk-custom: #8b5cf6;
  --bk-custom-soft: #f3e8ff;
  --bk-custom-text: #7c3aed;
}

.bookings-view .bk-hours-grid,
.bookings-view .hours-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  user-select: none;
}

.bk-hours-chrome {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
}

/* Desk-only pieces — revealed in desktop.css / bookings.css ≥1024 */
.bk-desk-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bk-search-row--persistent {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Desk: text button. Mobile: + fab only (beats .bk-tool-btn display) */
.bk-tool-btn.bk-add-section-btn,
.bk-add-section-btn {
  display: none !important;
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  height: var(--control-height, 48px);
  padding: 0 16px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.bk-desk-stats,
.bk-list-head,
.bk-list-cols,
.bk-list-heading,
.bk-period-mark,
.bk-day-switcher-date,
.bk-day-cal,
.bk-day-today-chip,
.bk-day-jump-today,
.bk-row-status,
.bk-desk-avail-tag,
.bk-hero-phone-desk,
.bk-shift-group-head {
  display: none;
}

/* Must beat later .bk-hero-status-row { display:flex } or desk badge duplicates on phone */
.bk-hero-status-row.bk-hero-status-row--desk {
  display: none !important;
}

.bk-desk-board {
  display: contents;
}

.bk-shift-group,
.bk-shift-group-rows {
  display: contents;
}

.bk-row-section {
  display: contents;
}

.bk-hero-time-col {
  display: contents;
}

.bk-day-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.bk-day-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: max-content;
}

.bk-add-section-icon {
  flex: 0 0 auto;
  width: var(--control-height, 48px);
  height: var(--control-height, 48px);
}

.bk-day-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin-bottom: 6px;
}

.bk-day-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: #6d4eef;
  background: #ede9fe;
  border: 1px solid rgba(124, 92, 252, 0.18);
  box-shadow: 0 4px 12px rgba(124, 92, 252, 0.1);
}

.bk-day-eyebrow--today {
  color: #fff;
  background: #7c5cfc;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(124, 92, 252, 0.28);
  font-size: 13px;
  font-weight: 900;
  min-height: 30px;
  padding: 5px 14px;
}

.bk-day-back {
  width: max-content;
  font-family: inherit;
  cursor: pointer;
  transition:
    transform var(--transition-fast, 140ms ease),
    background var(--transition-fast, 140ms ease),
    color var(--transition-fast, 140ms ease);
}

.bk-day-back:active {
  transform: scale(0.97);
}

.bk-day-title-row {
  /* Fixed side columns so arrows stay put when weekday text length changes */
  display: grid;
  grid-template-columns: 40px 9rem 40px;
  align-items: center;
  justify-content: center;
  column-gap: 8px;
}

.bk-day-title {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  color: var(--text-dark);
  line-height: 1.15;
  white-space: nowrap;
  text-align: center;
  justify-self: stretch;
  min-width: 0;
}

.bk-day-actions {
  display: none;
}

.bk-tool-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition:
    transform var(--transition-fast, 140ms ease),
    background var(--transition-fast, 140ms ease),
    opacity var(--transition-fast, 140ms ease);
}

.bk-tool-btn:active {
  transform: scale(0.96);
}

.bk-tool-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bk-tool-btn--primary {
  background: var(--bk-purple);
  color: #fff;
  box-shadow: 0 10px 22px rgba(124, 92, 252, 0.28);
}

.bk-tool-btn--ghost {
  background: var(--bk-purple-soft);
  color: var(--bk-purple);
}

.bk-date-nav-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: none;
  border-radius: 14px;
  background: var(--bk-purple-soft);
  color: var(--bk-purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 8px 18px rgba(99, 80, 180, 0.08);
  transition:
    transform var(--motion-fast, 120ms) var(--ease-press, ease),
    background var(--transition-fast, 120ms ease),
    filter var(--transition-fast, 120ms ease);
  -webkit-tap-highlight-color: transparent;
}

.bk-date-nav-btn:active {
  transform: scale(var(--press-scale, 0.97));
  filter: brightness(0.96);
}

@media (hover: hover) {
  body:not(.dark-mode) .bk-date-nav-btn:hover {
    background: #e4dcff;
  }

  body.dark-mode .bk-date-nav-btn:hover {
    background: rgba(124, 92, 252, 0.34);
  }
}

@media (max-width: 380px) {
  .bk-day-title-row {
    grid-template-columns: 36px 8rem 36px;
    column-gap: 6px;
  }

  .bk-day-title {
    font-size: 22px;
  }

  .bk-date-nav-btn {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

}

.bk-date-nav-btn:focus-visible,
.bk-day-back:focus-visible {
  outline: 2px solid var(--bk-purple);
  outline-offset: 2px;
}

.bk-hour-box,
.hour-box.bk-hour-box {
  background: var(--card-bg);
  border: 1px solid rgba(26, 26, 26, 0.05);
  border-radius: 20px;
  min-height: 0;
  height: auto;
  padding: 12px 14px 10px;
  display: flex;
  align-items: stretch;
  margin-bottom: 0;
  box-shadow: 0 10px 24px rgba(99, 80, 180, 0.07);
  position: relative;
  width: 100%;
  text-align: right;
  font-family: inherit;
  color: inherit;
  cursor: default;
  overflow: hidden;
}

.bk-hour-box.booked::before {
  display: none;
}

.bk-hour-box.available::before {
  display: none;
}

button.bk-hour-box {
  cursor: pointer;
  transition:
    transform var(--transition-fast, 160ms ease),
    box-shadow var(--transition-fast, 160ms ease),
    border-color var(--transition-fast, 160ms ease);
}

button.bk-hour-box:active {
  transform: scale(0.985);
}

.bk-hour-box.available,
.bk-hour-box.shift-1-avail,
.hour-box.shift-1-avail,
.bk-hour-box.shift-2-avail,
.hour-box.shift-2-avail {
  position: relative;
  color: #111827 !important;
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 10px 28px rgba(99, 80, 180, 0.08) !important;
}

/* Available — white cards (not colored) */
.bk-hour-box.available.period-morning,
.bk-hour-box.available.shift-1-avail,
.bk-hour-box.shift-1-avail,
.hour-box.shift-1-avail,
.bk-hour-box.shift-1-avail.period-morning,
.hour-box.shift-1-avail.period-morning,
.bk-hour-box.available.period-evening,
.bk-hour-box.available.shift-2-avail,
.bk-hour-box.shift-2-avail,
.hour-box.shift-2-avail,
.bk-hour-box.shift-2-avail.period-evening,
.hour-box.shift-2-avail.period-evening,
.bk-hour-box.available.period-custom {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 10px 28px rgba(99, 80, 180, 0.08) !important;
  color: #111827 !important;
}

/* ——— Booked hero cards — blue / purple gradients (phone law) ——— */
.bk-hour-box.bk-hero-card.booked,
.bk-hour-box.bk-hero-card.shift-1-booked,
.hour-box.bk-hero-card.shift-1-booked,
.bk-hour-box.bk-hero-card.shift-2-booked,
.hour-box.bk-hero-card.shift-2-booked {
  color: #fff !important;
  border: none !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(67, 56, 202, 0.22) !important;
}

.bk-hero-card.period-morning,
.bk-hero-card.shift-1-booked {
  background: linear-gradient(115deg, #2563eb 0%, #3b82f6 45%, #60a5fa 100%) !important;
}

.bk-hero-card.period-evening,
.bk-hero-card.shift-2-booked {
  background: linear-gradient(115deg, #6d28d9 0%, #7c3aed 42%, #a855f7 100%) !important;
}

.bk-hero-card.period-custom,
.bk-hero-card.bk-search-card {
  background: linear-gradient(115deg, #5b21b6 0%, #7c3aed 50%, #8b5cf6 100%) !important;
}

.bk-hero-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 14px;
  width: 100%;
  min-width: 0;
  text-align: right;
  color: inherit;
}

/* Phone: clear stacked rows — identity | money, notes, status+time, contacts */
.bk-hero-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.bk-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.bk-hero-search-date {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bk-hero-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.bk-hero-guest {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.bk-hero-guest .bk-hero-notes {
  margin-top: 6px;
  width: 100%;
}

.bk-hero-money {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: 0 0 auto;
  text-align: left;
  max-width: 46%;
}

.bk-hero-time-col {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

.bk-hero-identity-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.bk-hero-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.bk-hero-section {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: inherit;
  opacity: 0.9;
}

.bk-hero-section i {
  font-size: 13px;
  opacity: 0.95;
}

.bk-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.bk-hero-badge--due {
  background: rgba(255, 237, 213, 0.95);
  color: #9a3412;
}

.bk-hero-badge--paid {
  background: rgba(220, 252, 231, 0.95);
  color: #15803d;
}

.bk-hero-price-label {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
}

.bk-hero-price-value {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.bk-hero-deposit {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  font-size: 11px;
  font-weight: 800;
}

.bk-hero-name {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  word-break: break-word;
}

.bk-hero-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.92;
}

.bk-hero-notes {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

.bk-hero-notes span {
  min-width: 0;
  word-break: break-word;
}

.bk-hero-notes i {
  margin-top: 2px;
  flex: 0 0 auto;
  font-size: 12px;
}

.bk-hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.bk-hero-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.bk-hero-phone {
  font-size: 14px;
  font-weight: 800;
  direction: ltr;
  unicode-bidi: plaintext;
}

.bk-hero-card .bk-contact-btn {
  width: 38px;
  height: 38px;
  font-size: 15px;
}

.bk-hero-card .bk-contact-wa {
  background: #22c55e;
  color: #fff;
}

.bk-hero-card .bk-contact-call-on-booked {
  background: #ede9fe;
  color: #5b45d6;
}

.bk-hero-card .bk-contact-call-on-booked i {
  color: #5b45d6;
}

/* Soft paid checkbox — no frame */
.bk-paid-soft {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  position: relative;
  z-index: 2;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.bk-paid-soft:active:not(:disabled) {
  transform: scale(0.94);
}

.bk-paid-soft:disabled {
  opacity: 0.7;
  cursor: wait;
}

.bk-paid-soft.is-paid {
  background: #22c55e;
  color: #fff;
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
}

.bk-paid-soft.is-paid i {
  font-size: 14px;
}

.bk-card-stack--interactive {
  cursor: pointer;
  outline: none;
  transition:
    transform var(--motion-fast, 120ms) var(--ease-press, ease),
    filter var(--transition-fast, 120ms ease),
    box-shadow var(--transition-fast, 120ms ease);
  -webkit-tap-highlight-color: transparent;
}

.bk-card-stack--interactive:active {
  transform: scale(var(--press-scale-soft, 0.985));
  filter: brightness(0.97);
}

.bk-card-stack--interactive:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45);
  border-radius: 20px;
}

.bk-hour-box.booked .daily-section-delete {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.bk-hour-box.booked .bk-guest-name,
.bk-hour-box.booked .bk-guest-name.booked {
  color: inherit;
}

.bk-hour-box.booked .bk-section-name,
.bk-hour-box.booked .bk-meta-row,
.bk-hour-box.booked .bk-meta-item,
.bk-hour-box.booked .bk-phone-text {
  color: inherit;
}

.bk-hour-box.booked .bk-money-cell {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.bk-hour-box.booked .bk-notes-booked {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.bk-card-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.bk-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.bk-card-identity {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.bk-card-subrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.bk-section-name {
  font-size: 12px;
  font-weight: 700;
  color: #9ca3af;
}

.bk-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  flex-shrink: 0;
}

.bk-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.bk-status-pill--confirmed {
  background: var(--bk-purple-soft);
  color: var(--bk-purple);
}

.bk-status-pill--pending {
  background: #f3e8ff;
  color: #7c3aed;
}

.bk-status-pill--booked {
  background: rgba(255, 255, 255, 0.55);
  color: #5b21b6;
  border: 1px solid rgba(91, 33, 182, 0.2);
}

.bk-status-pill--available {
  background: #ecfdf5;
  color: #059669;
}

.bk-shift-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: var(--bk-purple-soft);
  color: var(--bk-purple);
}

.bk-shift-chip.period-morning {
  background: rgba(77, 139, 255, 0.14);
  color: #2563eb;
}

.bk-shift-chip.period-evening {
  background: rgba(168, 85, 247, 0.14);
  color: #7c3aed;
}

.bk-shift-chip.period-custom {
  background: rgba(139, 92, 246, 0.14);
  color: #7c3aed;
}

/* Available — white (JS also paints these) */
.bk-hour-box.available.bk-tone-avail.period-morning,
.bk-hour-box.available.bk-tone-live.period-morning,
button.bk-hour-box.available.period-morning,
.bk-hour-box.available.bk-tone-avail.period-evening,
.bk-hour-box.available.bk-tone-live.period-evening,
button.bk-hour-box.available.period-evening,
.bk-hour-box.available.bk-tone-avail.period-custom,
.bk-hour-box.available.bk-tone-live.period-custom,
button.bk-hour-box.available.period-custom {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 10px 28px rgba(99, 80, 180, 0.08) !important;
  color: #111827 !important;
}

.bk-hour-box.available .bk-avail-name,
.bk-hour-box.available .bk-meta-row,
.bk-hour-box.available .bk-meta-item,
.bk-hour-box.available .bk-meta-item i {
  color: #111827 !important;
}

.bk-hour-box.available .bk-meta-item,
.bk-hour-box.available .bk-meta-item i {
  color: #6b7280 !important;
}

.bk-hour-box.available .bk-shift-chip.period-morning {
  background: rgba(37, 99, 235, 0.12) !important;
  color: #2563eb !important;
}

.bk-hour-box.available .bk-shift-chip.period-evening,
.bk-hour-box.available .bk-shift-chip.period-custom {
  background: rgba(124, 58, 237, 0.12) !important;
  color: #7c3aed !important;
}

.bk-hour-box.available .bk-period-mark {
  color: var(--bk-purple) !important;
}

.bk-hour-box.available .bk-avail-hint {
  color: #9ca3af !important;
}

/* «متاح» top-left of the available card */
.bk-hour-box.available .bk-avail-status-corner {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  margin: 0;
  background: #ecfdf5 !important;
  color: #047857 !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.12);
}

.bk-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.bk-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bk-meta-item i {
  color: #9ca3af;
  font-size: 12px;
}

.bk-money-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.bk-money-cell {
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.bk-money-label {
  font-size: 11px;
  font-weight: 800;
  color: #6b7280;
}

.bk-money-value {
  font-size: 15px;
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.02em;
}

.bk-money-price {
  background: var(--bk-purple-soft);
}

.bk-money-price .bk-money-value {
  color: var(--bk-purple);
}

.bk-money-deposit {
  background: var(--bk-mint);
}

.bk-money-deposit .bk-money-value {
  color: var(--bk-mint-text);
}

.bk-money-remaining {
  background: var(--bk-peach);
}

.bk-money-remaining .bk-money-value {
  color: var(--bk-peach-text);
}

.bk-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.bk-period-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  background: var(--bk-purple-soft);
  color: var(--bk-purple);
}

.bk-period-tag.period-morning {
  background: var(--bk-morning-soft);
  color: var(--bk-morning-text);
}

.bk-period-tag.period-evening {
  background: var(--bk-evening-soft);
  color: var(--bk-evening-text);
}

.bk-period-tag.period-custom {
  background: var(--bk-custom-soft);
  color: var(--bk-custom-text);
}

.bk-period-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  flex-shrink: 0;
}

.bk-card-chevron {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #f3f3f3;
  color: #1a1a1a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
}

.bk-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.bk-card-identity {
  flex: 1;
  min-width: 0;
}

.bk-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.bk-card-footer-spacer {
  flex: 1;
}

.bk-search-card {
  background: var(--card-bg);
  border: 1px solid rgba(26, 26, 26, 0.05);
  color: var(--text-dark);
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(99, 80, 180, 0.07);
}

.bk-search-card-inner {
  width: 100%;
  padding: 0 16px 14px;
}

.bk-search-date-bar {
  background: var(--bk-purple, #7c5cfc);
  color: #fff;
  padding: 10px 16px;
  margin: 0 -16px 14px;
  border-radius: 28px 28px 0 0;
  font-weight: 800;
  font-size: var(--font-size-sm, 12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.dark-mode .bk-search-date-bar {
  color: #fff;
}

.bk-search-paid-chip {
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
}

.bk-guest-name {
  font-size: 20px;
  font-weight: 900;
  margin: 0;
  color: var(--text-dark);
  line-height: 1.25;
  word-break: break-word;
  letter-spacing: -0.02em;
}

.bk-guest-name.booked {
  font-size: 20px;
  color: var(--text-dark);
}

.bk-time-line {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}

.bk-time-line.booked {
  color: var(--text-muted);
  opacity: 1;
}

.bk-time-line i {
  margin-top: 2px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.bk-time-sep {
  margin: 0 4px;
  opacity: 0.7;
}

.bk-notes {
  font-size: var(--font-size-sm, 12px);
  font-weight: 700;
  margin: 0;
  padding-right: 8px;
  line-height: 1.4;
}

.bk-notes-search {
  color: var(--text-muted);
  border-right: none;
  background: var(--bk-peach, #fff7ed);
  border-radius: 14px;
  padding: 10px 12px;
}

.bk-notes-booked {
  opacity: 1;
  border-right: none;
  color: #9a3412;
  background: #fff7ed;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
}

.bk-notes i {
  margin-left: 5px;
  color: #ea580c;
}

.bk-notes-booked i {
  color: #ea580c;
}

.bk-contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
  width: 100%;
}

.bk-contact-btns {
  display: flex;
  gap: 8px;
}

.bk-contact-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
  font-size: 18px;
}

.bk-contact-call {
  background: var(--bk-purple, #7c5cfc);
}

.bk-contact-call-on-booked {
  background: #dbeafe;
  color: #2563eb;
  box-shadow: none;
}

.bk-contact-wa {
  background: #dcfce7;
  color: #16a34a;
  box-shadow: none;
}

.bk-phone-text {
  font-size: var(--font-size-md, 14px);
  font-weight: 800;
  color: var(--text-dark);
}

.bk-phone-text.booked {
  color: var(--text-dark);
}

/* Payment status: السعر / المتبقي — amount stronger than label */
.bk-pay-status {
  text-align: left;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 96px;
}

.bk-pay-line {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  line-height: 1.15;
}

.bk-pay-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.9;
}

.bk-pay-status.booked .bk-pay-label {
  color: var(--text-muted);
}

.bk-pay-value {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}

.bk-pay-status.booked .bk-pay-value {
  color: var(--text-dark);
}

.bk-pay-value.due {
  font-size: 19px;
  color: var(--danger);
}

.bk-pay-status.booked .bk-pay-value.due {
  color: var(--danger);
}

.bk-pay-due .bk-pay-label {
  color: var(--danger);
  font-weight: 800;
}

.bk-pay-status.booked .bk-pay-due .bk-pay-label {
  color: var(--danger);
}

.bk-pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.bk-pay-chip-paid {
  background: var(--pastel-mint);
  color: var(--accent-green);
}

.bk-pay-chip-partial {
  background: var(--pastel-peach);
  color: #b86a2a;
}

.bk-pay-chip-unpaid {
  background: var(--pastel-rose);
  color: var(--danger);
}

.bk-pay-chip-paid {
  background: var(--pastel-mint);
  color: var(--accent-green);
  border: none;
}

.bk-pay-chip-paid.on-booked {
  background: var(--pastel-mint);
  color: var(--accent-green);
  border: none;
}

.bk-deposit-chip {
  font-size: 11px;
  background: var(--primary-light);
  color: var(--text-dark);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  display: inline-block;
  line-height: 1.2;
  font-weight: 800;
}

.badge {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.badge-paid {
  background: var(--pastel-mint);
  color: var(--accent-green);
}

.badge-pending {
  background: var(--pastel-peach);
  color: #b86a2a;
}

.badge-on-booked {
  background: var(--pastel-purple);
  color: #6b5bb3;
  border: none;
}

.badge-paid-on {
  background: var(--pastel-mint);
  color: var(--accent-green);
}

.badge-pending-on {
  background: var(--pastel-peach);
  color: #b86a2a;
}

/* Available section card */
.bk-avail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}

.bk-avail-main {
  min-width: 0;
  flex: 1;
}

.bk-avail-name {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bk-period-icon {
  font-size: 13px;
  opacity: 0.75;
  color: var(--primary);
}

.period-evening .bk-period-icon {
  color: #8b7ec8;
}

.period-custom .bk-period-icon {
  color: #e08a4a;
}

.bk-avail-label {
  font-size: var(--font-size-sm, 12px);
  color: var(--text-muted);
  font-weight: 700;
}

.bk-avail-status {
  text-align: left;
  flex-shrink: 0;
}

.bk-avail-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-green);
  background: var(--pastel-mint);
  border: none;
  line-height: 1.2;
}

.bk-avail-hint {
  font-size: 11px;
  opacity: 0.65;
  margin-top: 4px;
  font-weight: 700;
  color: var(--text-muted);
}

.bk-empty,
.bk-state {
  text-align: center;
  padding: 28px 14px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
}

.bk-state-error {
  color: var(--danger);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.bk-retry-btn {
  width: auto;
  min-width: 140px;
}

.bk-search-title {
  font-weight: 800;
  color: var(--text-dark);
}

/* ——— Sheets / modals ——— */
.bk-modal-overlay {
  position: fixed;
  top: var(--app-vv-offset-top, 0px);
  left: 0;
  right: 0;
  bottom: auto;
  height: var(--app-vv-height, 100dvh);
  max-height: var(--app-vv-height, 100dvh);
  /* Match finance composer frosted overlay */
  background: var(--overlay-scrim, rgba(15, 23, 42, 0.42));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: 16px;
  box-sizing: border-box;
  animation: bkOverlayIn 180ms ease;
}

.bk-modal-overlay.active {
  display: flex;
}

.bk-modal-overlay.is-exiting {
  animation: bkOverlayOut 180ms ease forwards;
  pointer-events: none;
}

.bk-modal-content {
  background: var(--card-bg);
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-xl);
  padding: 0;
  box-shadow: 0 18px 48px rgba(99, 80, 180, 0.14);
  max-height: min(90vh, 90dvh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  flex: 0 1 auto;
  border: 1px solid rgba(124, 92, 252, 0.1);
  outline: none;
  animation: bkSheetIn 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bk-modal-content:focus,
.bk-modal-content:focus-visible {
  outline: none;
  box-shadow: var(--shadow-md);
}

/* Booking add/edit: centered dialog — definite flex height so body scrolls on iOS */
.bk-modal-content.bk-sheet {
  max-width: 420px;
  max-height: min(88vh, 88dvh);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.bk-modal-content.is-exiting,
.bk-sheet.is-exiting,
.bk-confirm-content.is-exiting {
  animation: bkSheetOut 180ms ease forwards;
}

.bk-add-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

/* Form fills remaining dialog height under the header; only .bk-modal-body scrolls */
.bk-modal-content.bk-sheet .bk-add-form {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bk-modal-content.bk-sheet .bk-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  /* Keep last schedule fields clear of the fixed actions footer */
  padding: 2px 14px 28px;
}

.bk-modal-body {
  flex: 0 1 auto;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bk-modal-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--card-bg);
  border-top: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
}

.bk-modal-content.bk-sheet .bk-modal-actions {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.bk-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 14px 8px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--card-bg);
}

/* Centered dialog header — no bottom-sheet grabber */
.bk-modal-content.bk-sheet .bk-modal-header {
  padding-top: 12px;
  position: relative;
}

.bk-modal-content.bk-sheet .bk-modal-header::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  right: 16px;
  left: 16px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c5cfc, #a78bfa);
}

.bk-modal-header h3 {
  font-size: 16px;
  color: var(--text-dark);
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.bk-modal-close {
  background: #ede9fe;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 18px;
  color: #7c5cfc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.bk-modal-close:hover,
.bk-modal-close:focus-visible {
  background: #ddd6fe;
  color: #6d4eef;
}

.bk-modal-close:active {
  transform: scale(0.96);
}

@keyframes bkOverlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bkOverlayOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes bkSheetIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bkSheetOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

@keyframes bkSavePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.98);
  }
}

.bk-field-group {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.bk-field-group:last-child {
  margin-bottom: 0;
}

.bk-field-group-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bk-field-group-title i {
  color: #7c5cfc !important;
  font-size: 12px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ede9fe;
  text-align: center;
  flex: 0 0 auto;
  line-height: 1;
}

.bk-field-group-notes .bk-field-group-title i,
.bk-field-group-time .bk-field-group-title i,
.bk-field-group-name .bk-field-group-title i {
  color: #7c5cfc !important;
  background: #ede9fe;
}

.bk-field-group .bk-form-group:last-child,
.bk-form-group-last {
  margin-bottom: 0;
}

.bk-field-group-time,
.bk-field-group-notes,
.bk-field-group-name {
  margin-bottom: 0;
}

.bk-form-group {
  margin-bottom: 0;
}

.bk-form-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.bk-label-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bk-label-tight {
  font-size: 12px;
  white-space: nowrap;
}

.bk-label-start,
.bk-label-end {
  color: var(--text-dark);
  font-weight: 800;
  margin-bottom: 0;
}

.bk-readonly-field {
  width: 100%;
  min-height: var(--control-height);
  padding: 12px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: var(--bg-color);
  color: var(--text-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
}

.bk-notes-field {
  min-height: 80px;
  align-items: flex-start;
  white-space: pre-wrap;
}

.bk-remaining-hint {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid rgba(194, 65, 12, 0.18);
  color: #c2410c;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.bk-remaining-hint.is-settled {
  background: #ecfdf5;
  border-color: rgba(5, 150, 105, 0.2);
  color: #047857;
}

body.dark-mode .bk-remaining-hint {
  background: rgba(194, 65, 12, 0.16);
  border-color: rgba(251, 146, 60, 0.28);
  color: #fdba74;
}

body.dark-mode .bk-remaining-hint.is-settled {
  background: rgba(5, 150, 105, 0.16);
  border-color: rgba(52, 211, 153, 0.28);
  color: #6ee7b7;
}

.bk-price-deposit-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 0;
  width: 100%;
}

.bk-money-field {
  position: relative;
  display: flex;
  align-items: center;
  direction: ltr;
  gap: 10px;
  min-width: 0;
  width: 100%;
  border: 1.5px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: var(--card-bg);
  box-shadow: none;
  overflow: hidden;
  padding-inline: 12px;
  box-sizing: border-box;
}

.bk-money-field:focus-within {
  border-color: #7c5cfc;
  box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.16);
}

.bk-money-field .bk-form-control {
  border: none;
  box-shadow: none;
  border-radius: 0;
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  padding-inline: 0;
  background: transparent;
}

.bk-money-field .bk-form-control:focus {
  border: none;
  box-shadow: none;
}

.bk-money-affix {
  position: static;
  flex: 0 0 auto;
  transform: none;
  inset: auto;
  padding: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-muted);
  pointer-events: none;
  line-height: 1;
  background: transparent;
}

.bk-flex-1 {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.bk-flex-2 {
  flex: 1.65;
  min-width: 0;
}

.bk-payment-status {
  margin-bottom: 16px;
}

.bk-phone-readonly-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.bk-phone-code {
  flex: 0 0 110px;
  justify-content: center;
  direction: ltr;
  font-size: 14px;
}

.bk-phone-local {
  flex: 1;
  min-width: 100px;
  direction: ltr;
}

.bk-modal-contact-btns {
  display: flex;
  gap: 6px;
}

.bk-field-group-time {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.bk-time-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: visible;
  border: 1px solid rgba(124, 92, 252, 0.14);
  border-radius: 20px;
  background: #ede9fe;
}

body.dark-mode .bk-time-block {
  background: rgba(124, 92, 252, 0.14);
  border-color: rgba(124, 92, 252, 0.22);
}

.bk-schedule-slot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 10px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid rgba(15, 23, 42, 0.04);
}

body.dark-mode .bk-schedule-slot {
  border-color: rgba(255, 255, 255, 0.06);
}

.bk-schedule-slot-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-dark);
}

.bk-schedule-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bk-schedule-dot.is-start {
  background: #7c5cfc;
  box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.22);
}

.bk-schedule-dot.is-end {
  background: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.25);
}

/* Always stack date above time — native date/time controls blow out grids on iOS. */
.bk-time-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  direction: ltr;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.bk-time-cell {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.bk-time-cell .bk-form-control,
.bk-time-row .bk-form-control {
  display: block;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--border-color);
}

.bk-input-date,
.bk-input-time {
  height: auto;
  min-height: 40px;
  padding-inline: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.bk-input-date::-webkit-datetime-edit,
.bk-input-time::-webkit-datetime-edit {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.bk-input-name {
  min-height: 48px;
  height: 48px;
  font-size: 16px;
  font-weight: 700;
}

.bk-input-date {
  font-size: 13px;
}

.bk-input-time {
  font-size: 13px;
  text-align: start;
}

.bk-input-date::-webkit-calendar-picker-indicator,
.bk-input-time::-webkit-calendar-picker-indicator {
  opacity: 0.55;
  cursor: pointer;
  margin-inline-start: 2px;
  flex-shrink: 0;
}

.bk-input-money {
  direction: ltr;
  text-align: start;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}

.bk-input-money::-webkit-outer-spin-button,
.bk-input-money::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.bk-readonly-notice {
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.bk-edit-open-btn {
  width: 100%;
  min-height: var(--control-height);
  justify-content: center;
  gap: 8px;
}

.bk-delete-open-btn {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  background: transparent;
  border: 1.5px solid color-mix(in srgb, var(--danger) 40%, transparent);
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
  border-radius: var(--radius-pill);
}

.bk-delete-open-btn i {
  color: inherit;
  font-size: 13px;
}

.bk-delete-open-btn:hover,
.bk-delete-open-btn:focus-visible {
  background: color-mix(in srgb, var(--danger) 16%, var(--danger-light));
  border-color: var(--danger);
  color: #b91c1c;
}

.bk-delete-open-btn:active {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  transform: scale(0.98);
}

.bk-delete-open-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.bk-btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid rgba(37, 99, 235, 0.35);
  box-shadow: none;
}

.bk-btn-outline:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.bk-btn-danger {
  background: var(--danger);
  color: #fff;
  border: 1.5px solid var(--danger);
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.22);
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.bk-btn-danger:hover,
.bk-btn-danger:focus-visible {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.bk-btn-danger:active {
  background: #b91c1c;
  border-color: #b91c1c;
  transform: scale(0.98);
}

.bk-btn-danger:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.bk-confirm-overlay {
  z-index: var(--z-modal-elevated);
  align-items: center;
  justify-content: center;
}

.bk-confirm-content {
  max-width: 320px;
  width: min(100%, 320px);
  text-align: center;
  padding-bottom: 0;
  flex: 0 0 auto;
  max-height: none;
}

.bk-confirm-body {
  flex: 0 0 auto;
  overflow: visible;
  padding: 20px 18px 6px;
}

.bk-confirm-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--danger);
  background: var(--danger-light);
  line-height: 1;
  animation: bkConfirmPop 220ms ease;
}

@keyframes bkConfirmPop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.bk-confirm-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-dark);
}

.bk-confirm-message {
  color: var(--text-muted);
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.bk-confirm-target {
  margin: 0 auto 4px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger-light) 70%, var(--surface));
  border: none;
  text-align: center;
  max-width: 100%;
}

.bk-confirm-target-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-dark);
  word-break: break-word;
}

.bk-confirm-target-meta {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.bk-confirm-actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: none;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

.bk-confirm-actions .btn {
  flex: 1;
  min-height: 40px;
  justify-content: center;
  font-size: 13px;
}

.bk-confirm-body .bk-form-error {
  margin-bottom: 0;
  margin-top: 10px;
}

.bk-form-control {
  width: 100%;
  min-height: 44px;
  height: 44px;
  padding: 8px 14px;
  border: 1.5px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  font-size: 14px;
  background: var(--card-bg);
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
  color: var(--text-dark);
  font-weight: 600;
  font-family: inherit;
  box-shadow: none;
  box-sizing: border-box;
}

.bk-form-control::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.bk-form-control:focus {
  border-color: #7c5cfc;
  box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.16);
  background: var(--card-bg);
}

.bk-form-control:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.bk-notes-input {
  height: auto;
  min-height: 52px;
  max-height: 52px;
  resize: none;
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.4;
  font-weight: 600;
}

.bk-phone-input-row {
  display: grid;
  grid-template-columns: 6.75rem minmax(0, 1fr);
  gap: 8px;
  direction: ltr;
  width: 100%;
}

.bk-phone-code-select {
  width: 100%;
  padding: 8px 6px;
  font-size: 12px;
  text-align: center;
  direction: ltr;
  appearance: auto;
}

.bk-phone-input-row .bk-form-control:not(.bk-phone-code-select) {
  min-width: 0;
  width: 100%;
  letter-spacing: 0.02em;
}

.bk-form-error {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 22%, transparent);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 0;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bk-save-btn {
  width: 100%;
  min-height: 50px;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  border-radius: 999px;
  gap: 8px;
  background: #7c5cfc !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 12px 28px rgba(124, 92, 252, 0.3) !important;
}

.bk-save-btn.is-saving {
  opacity: 0.85;
}

.bk-save-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.timeline-section-toolbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.bk-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  min-width: 0;
  width: 100%;
}

.bk-search-row--persistent {
  margin-bottom: 0;
}

.bk-search-row .search-wrap {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  width: 100%;
}

.bk-search-row .search-wrap input {
  padding-left: 44px;
}

/* Hide native clear — we already render .bk-search-clear */
.bk-search-row .search-wrap input[type='search']::-webkit-search-decoration,
.bk-search-row .search-wrap input[type='search']::-webkit-search-cancel-button,
.bk-search-row .search-wrap input[type='search']::-webkit-search-results-button,
.bk-search-row .search-wrap input[type='search']::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.bk-search-row .search-wrap input[type='search']::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}

.bk-search-clear {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bk-search-clear:active {
  transform: translateY(-50%) scale(0.94);
  color: var(--text-dark);
}

.bk-add-section-fab {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 14px;
  background: #7c5cfc;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(124, 92, 252, 0.28);
  font-size: 18px;
  transition:
    transform var(--transition-fast, 140ms ease),
    opacity var(--transition-fast, 140ms ease),
    background var(--transition-fast, 140ms ease);
}

body.dark-mode .bk-add-section-fab {
  color: #fff;
  background: #7c5cfc;
  box-shadow: 0 10px 22px rgba(124, 92, 252, 0.35);
}

.bk-add-section-fab:active {
  transform: scale(0.96);
}

.bk-add-section-fab:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.timeline-add-section-btn {
  width: auto;
  min-height: 40px;
  padding: 9px 16px;
}

.daily-section-delete {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin-inline-start: 8px;
  border: 1.5px solid color-mix(in srgb, var(--danger) 50%, transparent);
  border-radius: 12px;
  background: var(--danger-light);
  color: var(--danger);
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  cursor: pointer;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  opacity: 1;
  position: relative;
  z-index: 2;
  touch-action: manipulation;
}

.daily-section-delete:hover,
.daily-section-delete:focus-visible {
  background: color-mix(in srgb, var(--danger) 16%, var(--danger-light));
  border-color: var(--danger);
  color: #b91c1c;
}

.daily-section-delete:active {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  transform: scale(0.96);
}

.bk-hour-box.booked .daily-section-delete {
  background: rgba(254, 226, 226, 0.95);
  border-color: rgba(254, 202, 202, 0.95);
  color: #dc2626;
}

.bk-hour-box.booked .daily-section-delete:active {
  background: #fff;
  color: #b91c1c;
}

@media (min-width: 768px) {
  .bk-guest-name,
  .bk-guest-name.booked {
    font-size: 21px;
  }

  .bk-pay-value {
    font-size: 19px;
  }

  .bk-pay-value.due {
    font-size: 20px;
  }

  .bk-hour-box,
  .hour-box.bk-hour-box {
    padding: 16px 18px;
  }

  .bk-modal-content {
    padding: 0;
  }

  .bk-modal-content.bk-sheet .bk-modal-header::before {
    display: none;
  }

  .bk-modal-content.bk-sheet .bk-modal-header {
    padding-top: 10px;
  }

  .bk-form-control {
    min-height: 40px;
    height: 40px;
    padding: 8px 12px;
  }
}

@media (max-width: 767px) {
  .bookings-view .bk-hours-grid,
  .bookings-view .hours-grid {
    gap: 10px;
  }

  .bk-hour-box,
  .hour-box.bk-hour-box {
    padding: 13px 14px;
    border-radius: var(--radius-md);
  }

  .bk-search-card {
    padding: 13px 14px;
  }

  .bk-search-date-bar {
    margin: -13px -14px 10px;
    padding: 6px 12px;
  }

  .bk-guest-name,
  .bk-guest-name.booked {
    font-size: 19px;
  }

  .bk-time-line,
  .bk-time-line.booked {
    font-size: 13px;
  }

  .bk-pay-value {
    font-size: 17px;
  }

  .bk-pay-value.due {
    font-size: 18px;
  }

  .bk-contact-btn,
  .bk-contact-call-on-booked,
  .bk-contact-wa {
    width: 34px;
    height: 34px;
  }

  .bk-phone-text,
  .bk-phone-text.booked {
    font-size: 13.5px;
  }

  .bk-avail-name {
    font-size: 15px;
  }

  .bk-empty,
  .bk-state {
    padding: 24px 12px;
  }

  .timeline-section-toolbar {
    margin-bottom: 8px;
  }

  .bk-search-row {
    gap: 8px;
    margin-bottom: 8px;
  }

  .bk-add-section-fab {
    width: 46px;
    height: 46px;
    font-size: 17px;
  }

  /* Centered modal — middle of screen, not bottom sheet */
  .bk-modal-overlay {
    top: var(--app-vv-offset-top, 0px);
    right: 0;
    bottom: auto;
    left: 0;
    height: var(--app-vv-height, 100dvh);
    max-height: var(--app-vv-height, 100dvh);
    padding: 12px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    z-index: var(--z-modal-elevated, 2100);
    background: var(--overlay-scrim, rgba(15, 23, 42, 0.42));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .bk-confirm-overlay {
    top: var(--app-vv-offset-top, 0px);
    right: 0;
    bottom: auto;
    left: 0;
    height: var(--app-vv-height, 100dvh);
    max-height: var(--app-vv-height, 100dvh);
    padding: 16px 18px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    z-index: var(--z-modal-elevated, 2100);
    background: var(--overlay-scrim, rgba(15, 23, 42, 0.42));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  /* Keep sheet above keyboard — never pin to the top of the screen */
  body.keyboard-open .bk-modal-overlay,
  body.keyboard-open .bk-confirm-overlay {
    align-items: flex-end;
    padding-top: 8px;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }

  /* Centered dialog — explicit height chain so iOS Safari scrolls .bk-modal-body */
  .bk-modal-content.bk-sheet {
    max-height: min(88dvh, calc(var(--app-vv-height, 100dvh) - 28px));
    height: auto;
    width: 100%;
    margin: 0;
    flex: 0 1 auto;
    align-self: auto;
    border-radius: var(--radius-xl);
    animation: bkSheetIn 200ms cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    outline: none;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
    box-shadow: var(--shadow-md);
  }

  body.keyboard-open .bk-modal-content.bk-sheet {
    height: auto;
    max-height: calc(var(--app-vv-height, 100dvh) - 16px);
  }

  .bk-modal-content.bk-sheet .bk-add-form {
    flex: 1 1 0%;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .bk-modal-content.bk-sheet .bk-modal-body {
    flex: 1 1 0%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: 2px 12px 32px;
  }

  .bk-modal-content.bk-sheet .bk-modal-actions {
    flex-shrink: 0;
    background: var(--card-bg);
  }

  body.keyboard-open .bk-modal-actions {
    padding-bottom: 10px;
  }

  .bk-modal-content:not(.bk-sheet):not(.bk-confirm-content) {
    max-height: calc(var(--app-vv-height, 100dvh) - 36px);
    width: 100%;
    height: fit-content;
    flex: 0 1 auto;
    align-self: auto;
    border-radius: var(--radius-xl) var(--radius-xl) var(--radius-lg) var(--radius-lg);
    animation: bkSheetUp 220ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .bk-confirm-content {
    width: min(100%, 320px);
    max-height: none;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    animation: bkConfirmIn 200ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .bk-modal-content.is-exiting {
    animation: bkSheetDown 180ms ease forwards;
  }

  .bk-confirm-content.is-exiting {
    animation: bkConfirmOut 160ms ease forwards;
  }

  @keyframes bkSheetUp {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes bkSheetDown {
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(24px);
    }
  }

  @keyframes bkConfirmIn {
    from {
      opacity: 0;
      transform: scale(0.96) translateY(8px);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }

  @keyframes bkConfirmOut {
    from {
      opacity: 1;
      transform: scale(1);
    }
    to {
      opacity: 0;
      transform: scale(0.97);
    }
  }

  .bk-modal-header {
    padding: 8px 12px 6px;
  }

  .bk-modal-content.bk-sheet .bk-modal-header {
    padding: 10px 12px 8px;
  }

  .bk-modal-header h3 {
    font-size: 15px;
  }

  .bk-modal-close {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .bk-modal-body {
    padding: 2px 12px 8px;
  }

  .bk-modal-content.bk-sheet .bk-modal-body {
    padding: 2px 12px 32px;
  }

  .bk-modal-actions {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
  }

  .bk-confirm-body {
    padding: 18px 16px 4px;
  }

  .bk-confirm-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
    margin-bottom: 8px;
  }

  .bk-confirm-title {
    margin: 0 0 6px;
    font-size: 16px;
  }

  .bk-confirm-message {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.4;
  }

  .bk-confirm-actions {
    padding: 10px 14px 14px;
    gap: 8px;
  }

  .bk-field-group {
    margin-bottom: 0;
    padding: 0;
  }

  .bk-field-group-title {
    margin-bottom: 5px;
    font-size: 12px;
  }

  .bk-form-group {
    margin-bottom: 0;
  }

  .bk-form-label {
    margin-bottom: 3px;
    font-size: 11px;
  }

  .bk-form-control {
    min-height: 40px;
    height: 40px;
    padding: 7px 11px;
    font-size: 14px;
  }

  .bk-input-name {
    min-height: 46px;
    height: 46px;
    font-size: 16px;
  }

  .bk-input-date,
  .bk-input-time {
    min-height: 40px;
    height: auto;
  }

  .bk-notes-input {
    min-height: 48px;
    max-height: 48px;
    height: auto;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .bk-phone-input-row {
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 8px;
  }

  .bk-price-deposit-row {
    gap: 8px;
  }

  .bk-time-block {
    gap: 8px;
    padding: 8px;
    overflow: visible;
  }

  .bk-time-row {
    flex-direction: column;
    gap: 6px;
  }

  .bk-input-time {
    text-align: start;
  }

  .bk-modal-actions {
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 7px;
  }

  .bk-save-btn,
  .bk-delete-open-btn {
    min-height: 44px;
    font-size: 14px;
  }
}

/* ——— Dark mode: hours cards + strip stay on theme tokens ——— */
body.dark-mode .bk-hour-box,
body.dark-mode .hour-box.bk-hour-box,
body.dark-mode .bk-hour-box.available,
body.dark-mode .bk-hour-box.shift-1-avail,
body.dark-mode .hour-box.shift-1-avail,
body.dark-mode .bk-hour-box.shift-2-avail,
body.dark-mode .hour-box.shift-2-avail,
body.dark-mode .bk-search-card {
  background: var(--card-bg) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28) !important;
  color: var(--text-dark);
}

body.dark-mode .bk-hour-box.available.period-morning,
body.dark-mode .bk-hour-box.available.period-evening,
body.dark-mode .bk-hour-box.available.period-custom {
  background: #1e1e28 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28) !important;
  color: #f3f4f6 !important;
}

body.dark-mode .bk-hour-box.available .bk-avail-name,
body.dark-mode .bk-hour-box.available .bk-meta-row,
body.dark-mode .bk-hour-box.available .bk-meta-item {
  color: #f3f4f6 !important;
}

body.dark-mode .bk-hour-box.available .bk-meta-item,
body.dark-mode .bk-hour-box.available .bk-meta-item i {
  color: #a1a1aa !important;
}

body.dark-mode .bk-hour-box.available .bk-avail-status-corner {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
}

body.dark-mode .bk-hour-box.available .bk-shift-chip.period-morning {
  background: rgba(59, 130, 246, 0.22) !important;
  color: #93c5fd !important;
}

body.dark-mode .bk-hour-box.available .bk-shift-chip.period-evening,
body.dark-mode .bk-hour-box.available .bk-shift-chip.period-custom {
  background: rgba(168, 85, 247, 0.22) !important;
  color: #d8b4fe !important;
}

body.dark-mode .bk-hero-card.period-morning,
body.dark-mode .bk-hero-card.shift-1-booked {
  background: linear-gradient(115deg, #1d4ed8 0%, #2563eb 45%, #3b82f6 100%) !important;
  color: #fff !important;
}

body.dark-mode .bk-hero-card.period-evening,
body.dark-mode .bk-hero-card.shift-2-booked {
  background: linear-gradient(115deg, #5b21b6 0%, #6d28d9 42%, #7c3aed 100%) !important;
  color: #fff !important;
}

body.dark-mode .bk-hero-card.period-custom,
body.dark-mode .bk-hero-card.bk-search-card {
  background: linear-gradient(115deg, #4c1d95 0%, #6d28d9 50%, #7c3aed 100%) !important;
  color: #fff !important;
}

body.dark-mode .bk-date-nav-btn {
  background: rgba(124, 92, 252, 0.22);
  color: #c4b5fd;
  box-shadow: none;
}

body.dark-mode .bk-guest-name,
body.dark-mode .bk-guest-name.booked {
  color: var(--text-dark);
}

body.dark-mode .bk-day-title {
  color: var(--text-dark);
}

body.dark-mode .bk-day-eyebrow {
  color: #c4b5fd;
  background: rgba(124, 92, 252, 0.22);
  border-color: rgba(124, 92, 252, 0.35);
  box-shadow: none;
}

body.dark-mode .bk-day-eyebrow--today {
  color: #fff;
  background: #7c5cfc;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(124, 92, 252, 0.35);
}

body.dark-mode .bk-modal-content,
body.dark-mode .bk-modal-content.bk-sheet {
  background: var(--card-bg);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .bk-form-control {
  background: #16161d;
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-dark);
}

body.dark-mode .bk-form-control:focus {
  background: #1a1a24;
  border-color: var(--primary);
}

body.dark-mode .bk-modal-overlay,
body.dark-mode .bk-confirm-overlay {
  background: rgba(0, 0, 0, 0.62);
}

body.dark-mode .bk-status-pill--available,
body.dark-mode .bk-avail-pill {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

body.dark-mode .bk-status-pill--pending {
  background: rgba(124, 92, 252, 0.2);
  color: #c4b5fd;
}

body.dark-mode .bk-status-pill--booked {
  background: rgba(255, 255, 255, 0.08);
  color: #ddd6fe;
  border-color: rgba(167, 139, 250, 0.28);
}

body.dark-mode .bk-avail-hint {
  color: #a1a1aa;
  opacity: 1;
}

body.dark-mode .bk-shift-chip {
  background: rgba(124, 92, 252, 0.2);
  color: #c4b5fd;
}

body.dark-mode .bk-section-name {
  color: #a1a1aa;
}

/* ——— PC desk overrides (beats earlier mobile rules in this file) ——— */
@media (min-width: 1024px) {
  .bookings-view .bk-tool-btn.bk-add-section-btn,
  .bookings-view .bk-add-section-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 56px;
    min-height: 56px;
  }

  .bookings-view .bk-add-section-fab {
    display: none !important;
  }

  .bookings-view .bk-desk-toolbar .search-wrap {
    display: flex !important;
    align-items: center;
    height: 56px !important;
    min-height: 56px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
  }

  .bookings-view .bk-desk-toolbar .search-wrap input {
    height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding-inline: 48px !important;
  }

  .bookings-view .bk-desk-toolbar .search-wrap input[type='search']::-webkit-search-cancel-button,
  .bookings-view .bk-desk-toolbar .search-wrap input[type='search']::-webkit-search-decoration {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: none !important;
  }

  .bookings-view .bk-desk-board {
    display: flex !important;
    flex-direction: column;
  }

  .bookings-view .bk-desk-stats {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  /* No table headers — cards only */
  .bookings-view .bk-list-head,
  .bookings-view .bk-list-cols {
    display: none !important;
  }

  .bookings-view .bk-shift-group {
    display: block !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  .bookings-view .bk-shift-group-head {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 12px !important;
    background: transparent !important;
    border: none !important;
  }

  .bookings-view .bk-shift-group-rows {
    display: flex !important;
    flex-direction: column;
    gap: 12px !important;
  }

  .bookings-view .bk-day-cal,
  .bookings-view .bk-day-today-chip {
    display: flex !important;
  }

  .bookings-view .bk-day-jump-today {
    display: inline-flex !important;
  }

  .bookings-view .bk-day-switcher-date {
    display: none !important;
  }

  .bookings-view .bk-day-meta {
    display: none !important;
  }

  .bookings-view .bk-date-nav-btn,
  .bookings-view .bk-date-nav-btn--desk {
    width: 56px !important;
    height: 56px !important;
    flex: 0 0 56px !important;
    font-size: 20px !important;
  }

  .bookings-view .bk-day-title {
    font-size: 18px !important;
  }

  /* Desk cards use phone stacking — show mobile rows, hide table-desk bits */
  .bookings-view .bk-hero-status-row--mobile {
    display: flex !important;
  }

  .bookings-view .bk-hero-section--mobile {
    display: inline-flex !important;
  }

  .bookings-view .bk-hero-status-row--desk {
    display: none !important;
  }

  .bookings-view .bk-hero-phone-desk {
    display: none !important;
  }

  .bookings-view .bk-hero-time-col {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
  }

  .bookings-view .bk-day-title-row,
  .bookings-view .bk-day-switcher {
    display: flex !important;
    grid-template-columns: none !important;
  }

  .bookings-view .bk-hours-grid,
  .bookings-view .bk-hours-grid--grouped {
    gap: 18px;
  }

  /* Available — white phone-style cards */
  .bookings-view .bk-hour-box.available,
  .bookings-view button.bk-hour-box.available {
    min-height: 0 !important;
    padding: 16px 18px 14px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    background: #ffffff !important;
    color: #111827 !important;
    box-shadow: 0 10px 28px rgba(99, 80, 180, 0.08) !important;
  }

  .bookings-view .bk-hour-box.available.period-morning,
  .bookings-view .bk-hour-box.available.shift-1-avail,
  .bookings-view button.bk-hour-box.available.period-morning,
  .bookings-view .bk-hour-box.available.period-evening,
  .bookings-view .bk-hour-box.available.shift-2-avail,
  .bookings-view button.bk-hour-box.available.period-evening,
  .bookings-view .bk-hour-box.available.period-custom,
  .bookings-view button.bk-hour-box.available.period-custom {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 10px 28px rgba(99, 80, 180, 0.08) !important;
  }

  .bookings-view .bk-hour-box.available .bk-avail-status-corner {
    display: inline-flex !important;
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
  }

  .bookings-view .bk-hour-box.available::before {
    display: none !important;
  }

  .bookings-view .bk-hour-box.available .bk-card-stack {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    padding-top: 4px;
  }

  .bookings-view .bk-hour-box.available .bk-row-section {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
  }

  .bookings-view .bk-hour-box.available .bk-period-mark {
    display: none !important;
  }

  .bookings-view .bk-hour-box.available .bk-shift-chip {
    display: inline-flex !important;
  }

  .bookings-view .bk-hour-box.available .bk-status-pill--available:not(.bk-avail-status-corner) {
    display: none !important;
  }

  .bookings-view .bk-hour-box.available .bk-row-status,
  .bookings-view .bk-desk-avail-tag {
    display: none !important;
  }

  .bookings-view .bk-hour-box.available .bk-avail-name {
    color: #111827 !important;
    font-size: 18px !important;
    font-weight: 900;
    padding-left: 78px;
  }

  .bookings-view .bk-hour-box.available .bk-meta-row,
  .bookings-view .bk-hour-box.available .bk-meta-item {
    color: #6b7280 !important;
  }

  .bookings-view .bk-hour-box.available .bk-meta-item i {
    color: #9ca3af !important;
  }

  .bookings-view .bk-hour-box.available .bk-avail-hint {
    width: 100%;
    margin: 4px 0 0 !important;
    padding: 12px 16px !important;
    border-radius: 14px !important;
    background: #7c5cfc !important;
    color: #fff !important;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
  }

  .bookings-view .bk-hour-box.available:hover {
    filter: brightness(0.99);
  }

  /* Booked — full gradient phone-style cards */
  .bookings-view .bk-hour-box.bk-hero-card.booked,
  .bookings-view .bk-hour-box.bk-hero-card.shift-1-booked,
  .bookings-view .bk-hour-box.bk-hero-card.shift-2-booked {
    min-height: 0 !important;
    border-radius: 20px !important;
    border: none !important;
    box-shadow: 0 12px 28px rgba(67, 56, 202, 0.22) !important;
    overflow: hidden;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked::before {
    display: none !important;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-body {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 16px 18px 14px !important;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-main,
  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-top {
    display: flex !important;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-main {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-top {
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    width: 100%;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-guest {
    flex: 1 1 auto;
    min-width: 0;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-name {
    font-size: 22px !important;
    line-height: 1.25 !important;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-money {
    flex-direction: column !important;
    align-items: flex-end !important;
    text-align: left;
    gap: 6px !important;
    max-width: 46%;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-price-label {
    display: block !important;
    font-size: 14px !important;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-price-value {
    font-size: 28px !important;
    line-height: 1.1 !important;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-deposit {
    font-size: 14px !important;
    padding: 5px 12px !important;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-badge {
    font-size: 14px !important;
    padding: 6px 12px !important;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-time {
    font-size: 16px !important;
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-bottom {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-guest .bk-hero-notes {
    margin-top: 6px;
    max-width: 100%;
  }

  .bookings-view .bk-hero-card .bk-contact-call-on-booked {
    background: #ede9fe !important;
    color: #5b45d6 !important;
  }

  .bookings-view .bk-hero-card .bk-contact-call-on-booked i {
    color: #5b45d6 !important;
  }

  .bookings-view .bk-hero-contact .bk-hero-phone {
    display: inline !important;
  }

  .bookings-view .bk-paid-soft {
    background: rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
  }

  .bookings-view .bk-paid-soft.is-paid {
    background: #22c55e;
    color: #fff;
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.28);
  }

  /* Add/Edit booking — desk two-column; body scrolls, scrollbar hidden */
  .bk-modal-overlay {
    padding: 32px 40px !important;
    align-items: center !important;
  }

  .bk-modal-content.bk-sheet,
  .bk-modal-content {
    width: min(920px, calc(100vw - 64px)) !important;
    max-width: 920px !important;
    max-height: min(90dvh, 900px) !important;
    height: auto !important;
    border-radius: 28px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .bk-modal-content.bk-sheet .bk-add-form {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  .bk-modal-content.bk-sheet .bk-modal-header {
    padding: 20px 28px 16px !important;
    flex: 0 0 auto !important;
  }

  .bk-modal-content.bk-sheet .bk-modal-header::before {
    display: block !important;
    right: 28px;
    left: 28px;
    height: 4px;
  }

  .bk-modal-header h3 {
    font-size: 24px !important;
  }

  .bk-modal-close {
    width: 48px !important;
    height: 48px !important;
  }

  .bk-modal-content.bk-sheet .bk-modal-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr) !important;
    grid-template-areas:
      'error error'
      'name schedule'
      'price schedule'
      'notes schedule'
      'phone schedule' !important;
    align-content: start !important;
    column-gap: 22px;
    row-gap: 14px;
    padding: 8px 28px 20px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .bk-modal-content.bk-sheet .bk-modal-body::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
  }

  .bk-modal-content.bk-sheet .bk-form-error {
    grid-area: error;
  }

  .bk-modal-content.bk-sheet .bk-field-group-name {
    grid-area: name;
  }

  .bk-modal-content.bk-sheet .bk-field-group-price {
    grid-area: price;
  }

  .bk-modal-content.bk-sheet .bk-field-group-notes {
    grid-area: notes;
  }

  .bk-modal-content.bk-sheet .bk-field-group-contact {
    grid-area: phone;
  }

  .bk-modal-content.bk-sheet .bk-field-group-time {
    grid-area: schedule;
    align-self: stretch;
    height: 100%;
    background: #f5f2ff;
    border: 1px solid rgba(124, 92, 252, 0.22);
    border-radius: 18px;
    padding: 14px 16px;
  }

  .bk-modal-content.bk-sheet .bk-field-group-name,
  .bk-modal-content.bk-sheet .bk-field-group-price,
  .bk-modal-content.bk-sheet .bk-field-group-notes,
  .bk-modal-content.bk-sheet .bk-field-group-contact {
    margin: 0;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fafafa;
    border: 1px solid rgba(17, 24, 39, 0.06);
  }

  .bk-modal-content.bk-sheet .bk-field-group-title {
    font-size: 15px !important;
    margin-bottom: 10px !important;
  }

  .bk-modal-content.bk-sheet .bk-form-control {
    min-height: 52px !important;
    height: auto !important;
    font-size: 15px !important;
    border-radius: 14px !important;
  }

  .bk-modal-content.bk-sheet .bk-notes-input {
    min-height: 88px !important;
    height: auto !important;
    resize: vertical !important;
  }

  .bk-modal-content.bk-sheet .bk-money-field,
  .bk-modal-content.bk-sheet .bk-phone-input-row {
    min-height: 52px !important;
  }

  .bk-modal-content.bk-sheet .bk-time-block {
    gap: 14px !important;
  }

  .bk-modal-content.bk-sheet .bk-schedule-slot {
    padding: 14px !important;
    border-radius: 16px !important;
  }

  .bk-modal-content.bk-sheet .bk-modal-actions {
    padding: 16px 28px 22px !important;
    flex-direction: row;
    justify-content: flex-end;
    flex: 0 0 auto !important;
    gap: 12px;
  }

  .bk-modal-content.bk-sheet .bk-save-btn {
    min-width: 220px;
    min-height: 54px;
    width: auto;
    font-size: 16px;
    border-radius: 16px;
  }
}

/* Desk shift labels + card tones (no table sheet) */
@media (min-width: 1024px) {
  .bookings-view .bk-hours-grid--grouped {
    gap: 22px !important;
  }

  .bookings-view .bk-shift-group--morning,
  .bookings-view .bk-shift-group--evening,
  .bookings-view .bk-shift-group--custom {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .bookings-view .bk-shift-group--morning .bk-shift-group-head,
  .bookings-view .bk-shift-group--evening .bk-shift-group-head,
  .bookings-view .bk-shift-group--custom .bk-shift-group-head {
    background: transparent !important;
    border: none !important;
  }

  .bookings-view .bk-shift-group--morning .bk-shift-group-mark {
    background: #2563eb !important;
    box-shadow: none;
  }

  .bookings-view .bk-shift-group--evening .bk-shift-group-mark {
    background: #a855f7 !important;
    box-shadow: none;
  }

  .bookings-view .bk-shift-group--custom .bk-shift-group-mark {
    background: #8b5cf6 !important;
    box-shadow: none;
  }

  .bookings-view .bk-shift-group--morning .bk-shift-group-title,
  .bookings-view .bk-shift-group--evening .bk-shift-group-title,
  .bookings-view .bk-shift-group--custom .bk-shift-group-title {
    color: #111827 !important;
  }

  .bookings-view .bk-shift-group--morning .bk-hour-box.available,
  .bookings-view .bk-shift-group--morning button.bk-hour-box.available,
  .bookings-view .bk-shift-group--evening .bk-hour-box.available,
  .bookings-view .bk-shift-group--evening button.bk-hour-box.available,
  .bookings-view .bk-shift-group--custom .bk-hour-box.available,
  .bookings-view .bk-shift-group--custom button.bk-hour-box.available {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 28px rgba(99, 80, 180, 0.08) !important;
  }

  .bookings-view .bk-shift-group--morning .bk-hour-box.bk-hero-card.booked,
  .bookings-view .bk-shift-group--morning .bk-hour-box.bk-hero-card.shift-1-booked,
  .bookings-view .bk-shift-group--morning .bk-hero-card.period-morning {
    background: linear-gradient(115deg, #2563eb 0%, #3b82f6 45%, #60a5fa 100%) !important;
    color: #fff !important;
    border-radius: 20px !important;
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.28) !important;
  }

  .bookings-view .bk-shift-group--evening .bk-hour-box.bk-hero-card.booked,
  .bookings-view .bk-shift-group--evening .bk-hour-box.bk-hero-card.shift-2-booked,
  .bookings-view .bk-shift-group--evening .bk-hero-card.period-evening {
    background: linear-gradient(115deg, #6d28d9 0%, #7c3aed 42%, #a855f7 100%) !important;
    color: #fff !important;
    border-radius: 20px !important;
    box-shadow: 0 16px 40px rgba(124, 58, 237, 0.28) !important;
  }

  .bookings-view .bk-shift-group--custom .bk-hour-box.bk-hero-card.booked,
  .bookings-view .bk-shift-group--custom .bk-hero-card.period-custom {
    background: linear-gradient(115deg, #5b21b6 0%, #7c3aed 50%, #8b5cf6 100%) !important;
    color: #fff !important;
    border-radius: 20px !important;
    box-shadow: 0 16px 40px rgba(124, 58, 237, 0.28) !important;
  }

  .bookings-view .bk-shift-group--morning .bk-hour-box.available:hover,
  .bookings-view .bk-shift-group--morning button.bk-hour-box.available:hover,
  .bookings-view .bk-shift-group--evening .bk-hour-box.available:hover,
  .bookings-view .bk-shift-group--evening button.bk-hour-box.available:hover,
  .bookings-view .bk-shift-group--custom .bk-hour-box.available:hover,
  .bookings-view .bk-shift-group--custom button.bk-hour-box.available:hover {
    background: #fafafa !important;
  }

  body.dark-mode .bookings-view .bk-shift-group--morning,
  body.dark-mode .bookings-view .bk-shift-group--evening,
  body.dark-mode .bookings-view .bk-shift-group--custom {
    background: transparent !important;
    border: none !important;
  }

  body.dark-mode .bookings-view .bk-shift-group--morning .bk-shift-group-head,
  body.dark-mode .bookings-view .bk-shift-group--evening .bk-shift-group-head,
  body.dark-mode .bookings-view .bk-shift-group--custom .bk-shift-group-head {
    background: transparent !important;
  }

  body.dark-mode .bookings-view .bk-shift-group--morning .bk-shift-group-title,
  body.dark-mode .bookings-view .bk-shift-group--evening .bk-shift-group-title,
  body.dark-mode .bookings-view .bk-shift-group--custom .bk-shift-group-title {
    color: var(--text-dark) !important;
  }

  body.dark-mode .bookings-view .bk-shift-group--morning .bk-hour-box.available,
  body.dark-mode .bookings-view .bk-shift-group--morning button.bk-hour-box.available,
  body.dark-mode .bookings-view .bk-shift-group--evening .bk-hour-box.available,
  body.dark-mode .bookings-view .bk-shift-group--evening button.bk-hour-box.available,
  body.dark-mode .bookings-view .bk-shift-group--custom .bk-hour-box.available,
  body.dark-mode .bookings-view .bk-shift-group--custom button.bk-hour-box.available {
    background: #1e1e28 !important;
    color: #f3f4f6 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28) !important;
  }

  body.dark-mode .bookings-view .bk-shift-group-title {
    color: #f3f4f6 !important;
  }

  body.dark-mode .bookings-view .bk-shift-group--morning .bk-hour-box.bk-hero-card.booked {
    background: linear-gradient(115deg, #1d4ed8 0%, #2563eb 45%, #3b82f6 100%) !important;
    color: #fff !important;
  }

  body.dark-mode .bookings-view .bk-shift-group--evening .bk-hour-box.bk-hero-card.booked {
    background: linear-gradient(115deg, #5b21b6 0%, #6d28d9 42%, #7c3aed 100%) !important;
    color: #fff !important;
  }

  body.dark-mode .bookings-view .bk-shift-group--custom .bk-hour-box.bk-hero-card.booked {
    background: linear-gradient(115deg, #4c1d95 0%, #6d28d9 50%, #7c3aed 100%) !important;
    color: #fff !important;
  }
}

/* ——— Phone color lock (last in file) ——— */
@media (max-width: 1023px) {
  html body .bookings-view button.bk-hour-box.available.period-morning,
  html body .bookings-view .bk-hour-box.available.period-morning,
  html body .bookings-view .bk-hour-box.available.shift-1-avail,
  html body .bookings-view button.bk-hour-box.available.period-evening,
  html body .bookings-view .bk-hour-box.available.period-evening,
  html body .bookings-view .bk-hour-box.available.shift-2-avail,
  html body .bookings-view button.bk-hour-box.available.period-custom,
  html body .bookings-view .bk-hour-box.available.period-custom {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 10px 28px rgba(99, 80, 180, 0.08) !important;
    color: #111827 !important;
  }

  html body.dark-mode .bookings-view button.bk-hour-box.available.period-morning,
  html body.dark-mode .bookings-view .bk-hour-box.available.period-morning,
  html body.dark-mode .bookings-view .bk-hour-box.available.shift-1-avail,
  html body.dark-mode .bookings-view button.bk-hour-box.available.period-evening,
  html body.dark-mode .bookings-view .bk-hour-box.available.period-evening,
  html body.dark-mode .bookings-view .bk-hour-box.available.shift-2-avail,
  html body.dark-mode .bookings-view button.bk-hour-box.available.period-custom,
  html body.dark-mode .bookings-view .bk-hour-box.available.period-custom {
    background: #1e1e28 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28) !important;
    color: #f3f4f6 !important;
  }

  html body.dark-mode .bookings-view .bk-hour-box.available .bk-avail-name {
    color: #f3f4f6 !important;
  }

  html body.dark-mode .bookings-view .bk-hour-box.available .bk-meta-item,
  html body.dark-mode .bookings-view .bk-hour-box.available .bk-meta-item i {
    color: #a1a1aa !important;
  }

  html body .bookings-view .bk-hour-box.available .bk-avail-status-corner {
    display: inline-flex !important;
  }

  html body .bookings-view .bk-hour-box.available .bk-card-stack {
    padding-top: 4px;
  }

  html body .bookings-view .bk-hour-box.available .bk-avail-name {
    padding-left: 72px;
  }

  html body .bookings-view .bk-hero-card.period-morning,
  html body .bookings-view .bk-hero-card.shift-1-booked {
    background: linear-gradient(115deg, #2563eb 0%, #3b82f6 45%, #60a5fa 100%) !important;
    color: #fff !important;
  }

  html body .bookings-view .bk-hero-card.period-evening,
  html body .bookings-view .bk-hero-card.shift-2-booked {
    background: linear-gradient(115deg, #6d28d9 0%, #7c3aed 42%, #a855f7 100%) !important;
    color: #fff !important;
  }

  html body .bookings-view .bk-hero-card.period-custom {
    background: linear-gradient(115deg, #5b21b6 0%, #7c3aed 50%, #8b5cf6 100%) !important;
    color: #fff !important;
  }
}

/* Desktop card lock — no table rows; available white cards; booked full gradient */
@media (min-width: 1024px) {
  html body .bookings-view .bk-list-head,
  html body .bookings-view .bk-list-cols {
    display: none !important;
  }

  html body .bookings-view .bk-shift-group--morning,
  html body .bookings-view .bk-shift-group--evening,
  html body .bookings-view .bk-shift-group--custom {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  html body .bookings-view .bk-shift-group--morning .bk-shift-group-head,
  html body .bookings-view .bk-shift-group--evening .bk-shift-group-head,
  html body .bookings-view .bk-shift-group--custom .bk-shift-group-head {
    background: transparent !important;
  }

  html body .bookings-view .bk-shift-group-rows {
    gap: 12px !important;
  }

  html body .bookings-view button.bk-hour-box.available,
  html body .bookings-view .bk-hour-box.available,
  html body .bookings-view button.bk-hour-box.available.period-morning,
  html body .bookings-view .bk-hour-box.available.period-morning,
  html body .bookings-view .bk-hour-box.available.shift-1-avail,
  html body .bookings-view button.bk-hour-box.available.period-evening,
  html body .bookings-view .bk-hour-box.available.period-evening,
  html body .bookings-view .bk-hour-box.available.shift-2-avail,
  html body .bookings-view button.bk-hour-box.available.period-custom,
  html body .bookings-view .bk-hour-box.available.period-custom {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 28px rgba(99, 80, 180, 0.08) !important;
  }

  html body.dark-mode .bookings-view button.bk-hour-box.available,
  html body.dark-mode .bookings-view .bk-hour-box.available,
  html body.dark-mode .bookings-view button.bk-hour-box.available.period-morning,
  html body.dark-mode .bookings-view .bk-hour-box.available.period-morning,
  html body.dark-mode .bookings-view .bk-hour-box.available.shift-1-avail,
  html body.dark-mode .bookings-view button.bk-hour-box.available.period-evening,
  html body.dark-mode .bookings-view .bk-hour-box.available.period-evening,
  html body.dark-mode .bookings-view .bk-hour-box.available.shift-2-avail,
  html body.dark-mode .bookings-view button.bk-hour-box.available.period-custom,
  html body.dark-mode .bookings-view .bk-hour-box.available.period-custom {
    background: #1e1e28 !important;
    color: #f3f4f6 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28) !important;
  }

  html body.dark-mode .bookings-view .bk-hour-box.available .bk-avail-name {
    color: #f3f4f6 !important;
  }

  html body.dark-mode .bookings-view .bk-hour-box.available .bk-meta-item,
  html body.dark-mode .bookings-view .bk-hour-box.available .bk-meta-item i {
    color: #a1a1aa !important;
  }

  html body .bookings-view .bk-hour-box.available .bk-card-stack {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
  }

  html body .bookings-view .bk-hour-box.available .bk-avail-status-corner {
    display: inline-flex !important;
  }

  html body .bookings-view .bk-hour-box.available .bk-row-status,
  html body .bookings-view .bk-desk-avail-tag {
    display: none !important;
  }

  html body .bookings-view .bk-hour-box.available .bk-avail-name {
    color: #111827 !important;
  }

  html body .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-body {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
  }

  html body .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-main,
  html body .bookings-view .bk-hour-box.bk-hero-card.booked .bk-hero-top {
    display: flex !important;
  }

  html body .bookings-view .bk-hour-box.bk-hero-card.booked,
  html body .bookings-view .bk-hour-box.bk-hero-card.shift-1-booked,
  html body .bookings-view .bk-hour-box.bk-hero-card.shift-2-booked {
    border-radius: 20px !important;
  }

  html body.dark-mode .bookings-view button.bk-hour-box.available,
  html body.dark-mode .bookings-view .bk-hour-box.available {
    background: #1e1e28 !important;
    color: #f3f4f6 !important;
  }
}

/* Auth / login — gradient hero + overlapping white sheet (reference principle). */

.auth-view {
  --auth-purple: #7c5cfc;
  --auth-purple-deep: #5b45d6;
  --auth-blue: #4f7cff;
  --auth-input-bg: #f3f4f6;
  --auth-muted: #9ca3af;
  --auth-title: #1f2937;

  /* Login layout stays LTR; only copy changes with locale. */
  direction: ltr;
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f8fafc;
  caret-color: var(--auth-purple);
}

.auth-view ::selection {
  background: rgba(124, 92, 252, 0.22);
  color: #1e1b4b;
}

.auth-hero {
  position: relative;
  flex: 0 0 auto;
  min-height: clamp(200px, 34vh, 280px);
  padding:
    calc(28px + env(safe-area-inset-top, 0px))
    24px
    72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 70% at 18% 20%, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(125deg, #6d4ef2 0%, #7c5cfc 42%, #4f7cff 100%);
  animation: authHeroIn 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-hero-glow {
  position: absolute;
  inset: auto -20% -40% 20%;
  height: 70%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 65%);
  pointer-events: none;
}

.auth-hero-brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.brand-logo-img,
.brand-logo-mark {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 20px;
  margin-bottom: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(30, 27, 75, 0.22);
  overflow: hidden;
}

body.dark-mode .brand-logo-mark {
  background: #1c1c1e;
}

.text-logo {
  margin: 0;
  font-size: 34px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.2px;
  line-height: 1.1;
  text-shadow: 0 8px 24px rgba(30, 27, 75, 0.18);
}

.text-logo-sub {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

.auth-sheet {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: -48px;
  padding: 0 0 calc(16px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  animation: authSheetIn 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-card {
  width: min(100%, 440px);
  margin: 0 auto;
  padding: 28px 22px 22px;
  background: #ffffff;
  border-radius: 36px 36px 0 0;
  box-shadow: 0 -8px 40px rgba(79, 70, 180, 0.12);
  text-align: center;
}

.auth-title {
  margin: 0 0 22px;
  font-size: 26px;
  font-weight: 900;
  color: var(--auth-title);
  letter-spacing: -0.02em;
}

.auth-error {
  color: var(--danger, #dc2626);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 14px;
}

.auth-field-error {
  margin: 6px 2px 0;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}

.auth-form-group {
  text-align: left;
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #6b7280;
  margin-bottom: 8px;
}

.auth-input-shell {
  position: relative;
}

.auth-input-shell.is-invalid {
  box-shadow: 0 0 0 1.5px rgba(220, 38, 38, 0.35);
  border-radius: 16px;
}

.auth-input-shell.is-invalid .auth-input {
  background: #fff5f5;
}

.auth-input-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #a5b0c2;
  font-size: 15px;
  pointer-events: none;
  z-index: 1;
}

.auth-input-icon--start {
  inset-inline-start: 14px;
}

.auth-input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  background: var(--auth-input-bg);
  border: 1px solid transparent;
  border-radius: 16px;
  font-size: 15px;
  outline: none;
  transition:
    border-color var(--transition-fast, 140ms ease),
    box-shadow var(--transition-fast, 140ms ease),
    background var(--transition-fast, 140ms ease);
  color: #111827;
  text-align: left;
  font-weight: 600;
  font-family: inherit;
  box-shadow: none;
}

.auth-input--with-start {
  padding-inline-start: 42px;
}

.auth-input--with-end {
  padding-inline-end: 48px;
}

.auth-input::placeholder {
  color: #b0b5bd;
  font-weight: 500;
}

.auth-input:focus {
  border-color: rgba(124, 92, 252, 0.4);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.12);
}

@keyframes authAutofillTick {
  to {
    opacity: 1;
  }
}

.auth-input:-webkit-autofill {
  animation-name: authAutofillTick;
  animation-duration: 0.001s;
}

.auth-password-field {
  position: relative;
}

.auth-password-field:not(.auth-password-field--with-lock) .auth-input {
  padding-inline-end: 48px;
}

.auth-password-toggle {
  position: absolute;
  inset-inline-end: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c0c4cc;
  display: grid;
  place-items: center;
  font-size: 16px;
  cursor: pointer;
  touch-action: manipulation;
  z-index: 1;
}

.auth-password-toggle:focus-visible {
  outline: 2px solid var(--auth-purple);
  outline-offset: 1px;
}

.auth-password-toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 14px;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.auth-remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-purple);
  cursor: pointer;
}

.auth-forgot-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--auth-blue);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.auth-forgot-link:hover {
  text-decoration: underline;
}

.auth-forgot-link:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-auth {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  background: #c4b5fd;
  color: #5b45d6;
  font-size: 16px;
  font-weight: 800;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  transition:
    background 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease,
    transform 140ms ease,
    filter 140ms ease;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

.btn-auth:hover:not(:disabled) {
  filter: brightness(0.98);
}

.btn-auth.is-ready,
#auth-form:has(
    #auth-email:is(:not(:placeholder-shown), :autofill, :-webkit-autofill)
  ):has(
    #auth-password:is(:not(:placeholder-shown), :autofill, :-webkit-autofill)
  )
  .btn-auth {
  background: linear-gradient(135deg, #7c5cfc 0%, #4f7cff 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(79, 124, 255, 0.32);
}

.btn-auth.is-ready:hover:not(:disabled),
#auth-form:has(
    #auth-email:is(:not(:placeholder-shown), :autofill, :-webkit-autofill)
  ):has(
    #auth-password:is(:not(:placeholder-shown), :autofill, :-webkit-autofill)
  )
  .btn-auth:hover:not(:disabled) {
  filter: brightness(1.03);
  color: #fff;
}

.btn-auth:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-auth:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-auth:focus-visible,
.auth-forgot-link:focus-visible {
  outline: 2px solid var(--auth-purple);
  outline-offset: 2px;
}

.auth-footer {
  margin: 16px 0 0;
  padding-inline: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--auth-muted);
  text-align: center;
}

@keyframes authHeroIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authSheetIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.dark-mode .auth-view {
  background: #0f1117;
}

body.dark-mode .auth-card {
  background: #171923;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.35);
}

body.dark-mode .auth-title {
  color: #f5f5f5;
}

body.dark-mode .auth-label,
body.dark-mode .auth-remember {
  color: #c7cdd8;
}

body.dark-mode .auth-input {
  background: #222636;
  color: #f5f5f5;
}

body.dark-mode .auth-footer {
  color: #8b93a7;
}

.auth-subtitle {
  display: none;
}

.auth-desk-top,
.auth-desk-brand {
  display: none;
}

.auth-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.auth-lang-toggle--hero {
  position: absolute;
  z-index: 2;
  top: max(12px, env(safe-area-inset-top, 0px));
  inset-inline-end: 14px;
}

.auth-lang-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.auth-lang-btn.is-active {
  background: #fff;
  color: #7c5cfc;
  box-shadow: 0 4px 12px rgba(30, 27, 75, 0.16);
}

.auth-lang-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.auth-showcase {
  display: none;
}

.auth-stage {
  display: contents;
}

@media (min-width: 768px) {
  .auth-view {
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    overflow-y: auto;
  }

  .auth-hero--mobile {
    width: min(100%, 440px);
    min-height: 240px;
    border-radius: 36px 36px 0 0;
    padding-bottom: 80px;
  }

  .auth-sheet {
    width: min(100%, 440px);
    margin-top: -48px;
    overflow: visible;
  }

  .auth-card {
    border-radius: 36px;
    padding: 32px 28px 28px;
    box-shadow:
      0 24px 60px rgba(79, 70, 180, 0.16),
      0 4px 16px rgba(15, 23, 42, 0.06);
  }

  .brand-logo-img {
    width: 80px;
    height: 80px;
  }
}

/* ——— PC desk login (Sellora-style split + Rentoo purple) ——— */
@media (min-width: 1024px) {
  .auth-view {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 28px;
    overflow: auto;
    background:
      radial-gradient(ellipse 55% 45% at 12% 18%, rgba(124, 92, 252, 0.1), transparent 60%),
      radial-gradient(ellipse 45% 40% at 88% 82%, rgba(79, 124, 255, 0.08), transparent 55%),
      #eef0f5;
  }

  .auth-hero--mobile {
    display: none;
  }

  .auth-lang-toggle--hero {
    display: none;
  }

  .auth-stage {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: min(1280px, 96vw);
    min-height: min(820px, 92dvh);
    background: #ffffff;
    border-radius: 32px;
    overflow: hidden;
    box-shadow:
      0 32px 80px rgba(15, 23, 42, 0.12),
      0 4px 16px rgba(15, 23, 42, 0.04);
    animation: authStageIn 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  /* Login is forced LTR: form left, showcase right — locale only changes copy. */
  .auth-sheet {
    flex: 1 1 48%;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 32px 48px 28px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    animation: authPaneIn 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .auth-desk-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
  }

  .auth-desk-brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .auth-desk-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 6px 16px rgba(124, 92, 252, 0.18);
  }

  .auth-desk-name {
    font-size: 24px;
    font-weight: 900;
    color: #111827;
    letter-spacing: -0.02em;
  }

  .auth-lang-toggle {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .auth-lang-btn {
    min-height: 36px;
    padding: 0 14px;
    color: #6b7280;
    font-size: 13px;
  }

  .auth-lang-btn.is-active {
    background: #fff;
    color: #7c5cfc;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  }

  .auth-lang-btn:hover:not(.is-active) {
    color: #111827;
  }

  .auth-lang-btn:focus-visible {
    outline: 2px solid #7c5cfc;
    outline-offset: 2px;
  }

  .auth-card {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    text-align: center;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .auth-title {
    margin: 0 0 10px;
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.03em;
  }

  .auth-subtitle {
    display: block;
    margin: 0 0 32px;
    font-size: 15px;
    font-weight: 600;
    color: #9ca3af;
    line-height: 1.5;
  }

  .auth-form-group {
    margin-bottom: 20px;
  }

  .auth-label {
    font-size: 13px;
  }

  .auth-input {
    min-height: 56px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 16px;
  }

  .auth-input:focus {
    border-color: rgba(124, 92, 252, 0.45);
  }

  .btn-auth {
    border-radius: 16px;
    min-height: 56px;
    margin-top: 10px;
    font-size: 17px;
  }

  .btn-auth.is-ready,
  #auth-form:has(
      #auth-email:is(:not(:placeholder-shown), :autofill, :-webkit-autofill)
    ):has(
      #auth-password:is(:not(:placeholder-shown), :autofill, :-webkit-autofill)
    )
    .btn-auth {
    background: #7c5cfc;
    box-shadow: 0 14px 28px rgba(124, 92, 252, 0.28);
  }

  .auth-footer {
    margin-top: 24px;
    padding: 0;
    text-align: start;
  }

  .auth-forgot-link {
    color: #7c5cfc;
  }

  /* Left animated brand panel */
  .auth-showcase {
    display: flex;
    flex-direction: column;
    flex: 1 1 52%;
    position: relative;
    margin: 16px;
    border-radius: 26px;
    overflow: hidden;
    padding: 42px 36px 32px;
    color: #fff;
    background:
      radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.18), transparent 42%),
      radial-gradient(circle at 88% 78%, rgba(79, 70, 229, 0.45), transparent 48%),
      linear-gradient(145deg, #6d4ef2 0%, #7c5cfc 48%, #4f46e5 100%);
    animation: authShowcaseIn 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .auth-showcase-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.1);
    filter: blur(2px);
  }

  .auth-showcase-orb--a {
    width: 180px;
    height: 180px;
    top: -40px;
    inset-inline-end: -50px;
    animation: authOrbDrift 12s ease-in-out infinite;
  }

  .auth-showcase-orb--b {
    width: 120px;
    height: 120px;
    bottom: 18%;
    inset-inline-start: -30px;
    animation: authOrbDrift 15s ease-in-out infinite reverse;
  }

  .auth-showcase-orb--c {
    width: 64px;
    height: 64px;
    top: 42%;
    inset-inline-end: 18%;
    animation: authOrbPulse 6s ease-in-out infinite;
  }

  .auth-showcase-copy {
    position: relative;
    z-index: 2;
    max-width: 360px;
    margin-bottom: 28px;
  }

  .auth-showcase-title {
    margin: 0 0 12px;
    font-size: clamp(26px, 2.4vw, 34px);
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -0.02em;
  }

  .auth-showcase-text {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.86);
  }

  .auth-float-stack {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    min-height: 280px;
  }

  .auth-float-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.96);
    color: #111827;
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow:
      0 18px 40px rgba(30, 27, 75, 0.22),
      0 2px 8px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
  }

  .auth-float-card--stats {
    inset-inline-start: 4%;
    top: 8%;
    width: min(200px, 48%);
    animation: authFloatA 5.5s ease-in-out infinite;
  }

  .auth-float-card--booking {
    inset-inline-end: 2%;
    top: 28%;
    width: min(230px, 56%);
    animation: authFloatB 6.2s ease-in-out infinite;
  }

  .auth-float-card--paid {
    inset-inline-start: 12%;
    bottom: 6%;
    width: min(240px, 62%);
    animation: authFloatC 7s ease-in-out infinite;
  }

  .auth-float-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #9ca3af;
  }

  .auth-float-value {
    display: block;
    margin-top: 2px;
    font-size: 28px;
    font-weight: 900;
    color: #7c5cfc;
    line-height: 1.1;
  }

  .auth-float-hint {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
  }

  .auth-float-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 36px;
    margin-top: 10px;
  }

  .auth-float-bars i {
    display: block;
    flex: 1;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, #a78bfa, #7c5cfc);
    animation: authBarPulse 2.4s ease-in-out infinite;
  }

  .auth-float-bars i:nth-child(1) { height: 40%; animation-delay: 0s; }
  .auth-float-bars i:nth-child(2) { height: 65%; animation-delay: 0.15s; }
  .auth-float-bars i:nth-child(3) { height: 48%; animation-delay: 0.3s; }
  .auth-float-bars i:nth-child(4) { height: 80%; animation-delay: 0.45s; }
  .auth-float-bars i:nth-child(5) { height: 55%; animation-delay: 0.6s; }
  .auth-float-bars i:nth-child(6) { height: 70%; animation-delay: 0.75s; }
  .auth-float-bars i:nth-child(7) { height: 90%; animation-delay: 0.9s; }

  .auth-float-booking-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
  }

  .auth-float-pill {
    padding: 4px 10px;
    border-radius: 999px;
    background: #fef9c3;
    color: #a16207;
    font-size: 11px;
    font-weight: 800;
  }

  .auth-float-status {
    font-size: 11px;
    font-weight: 800;
    color: #059669;
  }

  .auth-float-guest {
    display: block;
    font-size: 15px;
    font-weight: 900;
    margin-bottom: 4px;
  }

  .auth-float-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
  }

  .auth-float-paid-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
  }

  .auth-float-paid-row strong {
    font-size: 18px;
    font-weight: 900;
    color: #111827;
  }

  .auth-float-wave {
    margin-top: 12px;
    height: 36px;
    border-radius: 12px;
    background:
      linear-gradient(90deg, transparent 0%, transparent 8%, #ede9fe 8%, #ede9fe 12%, transparent 12%),
      radial-gradient(ellipse 80% 100% at 20% 80%, #c4b5fd 0%, transparent 55%),
      radial-gradient(ellipse 70% 90% at 55% 40%, #a78bfa 0%, transparent 50%),
      radial-gradient(ellipse 60% 80% at 85% 70%, #7c5cfc 0%, transparent 45%),
      #f5f3ff;
    animation: authWaveShift 4.5s ease-in-out infinite;
  }

  body.dark-mode .auth-view {
    background: #0f1117;
  }

  body.dark-mode .auth-stage {
    background: #171923;
  }

  body.dark-mode .auth-desk-name,
  body.dark-mode .auth-title {
    color: #f5f5f5;
  }

  body.dark-mode .auth-input {
    background: #222636;
    border-color: #2f3548;
    color: #f5f5f5;
  }

  body.dark-mode .auth-lang-toggle {
    background: #222636;
    border-color: #2f3548;
  }

  body.dark-mode .auth-lang-btn {
    color: #9ca3af;
  }

  body.dark-mode .auth-lang-btn.is-active {
    background: #2a2f42;
    color: #c4b5fd;
  }
}

@media (min-width: 1280px) {
  .auth-stage {
    width: min(1360px, 96vw);
    min-height: min(880px, 92dvh);
  }

  .auth-sheet {
    padding: 36px 56px 32px;
  }

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

  .auth-title {
    font-size: 40px;
  }
}

@keyframes authStageIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes authPaneIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes authShowcaseIn {
  from {
    opacity: 0;
    transform: translateX(-16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes authFloatA {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes authFloatB {
  0%,
  100% {
    transform: translateY(0) rotate(-0.4deg);
  }
  50% {
    transform: translateY(-14px) rotate(0.6deg);
  }
}

@keyframes authFloatC {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes authOrbDrift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(12px, -16px);
  }
}

@keyframes authOrbPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.12);
  }
}

@keyframes authBarPulse {
  0%,
  100% {
    filter: brightness(1);
    transform: scaleY(1);
  }
  50% {
    filter: brightness(1.15);
    transform: scaleY(1.08);
  }
}

@keyframes authWaveShift {
  0%,
  100% {
    background-position: 0% 50%, 20% 80%, 55% 40%, 85% 70%, 0 0;
  }
  50% {
    background-position: 8% 50%, 28% 70%, 48% 50%, 78% 60%, 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-stage,
  .auth-sheet,
  .auth-showcase,
  .auth-float-card,
  .auth-showcase-orb,
  .auth-float-bars i,
  .auth-float-wave {
    animation: none !important;
  }
}
/* Settings hub — soft purple screenshot layout (Brand Identity styles below) */

.settings-view {
  --settings-purple: #7c5cfc;
  --settings-purple-soft: #ede9fe;
  --settings-orange-bg: #fff7ed;
  --settings-orange: #ea580c;
  --settings-rose-bg: #fff1f2;
  --settings-rose: #e11d48;
  direction: inherit;
}

.settings-language-options {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--settings-purple-soft);
}

.settings-currency-select-wrap {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(220px, 48vw);
}

.settings-currency-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--settings-purple-soft);
  color: var(--settings-purple);
  padding: 9px 34px 9px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

html[dir='rtl'] .settings-currency-select {
  padding: 9px 14px 9px 34px;
}

.settings-currency-select:focus-visible {
  outline: 2px solid var(--settings-purple);
  outline-offset: 2px;
}

.settings-currency-select-caret {
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--settings-purple);
  pointer-events: none;
}

body.dark-mode .settings-currency-select {
  background: rgba(124, 92, 252, 0.22);
  color: #c4b5fd;
}

body.dark-mode .settings-currency-select-caret {
  color: #c4b5fd;
}

.settings-language-chip {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--settings-purple);
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.settings-language-chip:active {
  transform: scale(var(--press-scale-soft, 0.97));
}

.settings-language-chip:focus-visible {
  outline: 2px solid var(--settings-purple);
  outline-offset: 2px;
}

.settings-language-chip.is-active {
  background: var(--settings-purple);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(124, 92, 252, 0.28);
}

.settings-view .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 8px;
}

.settings-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-section-label {
  margin: 0;
  padding-inline: 4px;
  font-size: 13px;
  font-weight: 800;
  color: #9ca3af;
}

.settings-card {
  background: var(--card-bg);
  border: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: 26px;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.settings-card--grouped {
  padding: 6px 10px;
}

.settings-link-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 4px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  border-radius: 16px;
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.settings-link-row:hover {
  background: color-mix(in srgb, var(--text-dark) 3%, transparent);
}

.settings-link-row:active {
  transform: scale(var(--press-scale-soft, 0.985));
}

.settings-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 12px;
}

.settings-icon-tile {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 15px;
}

.settings-icon-tile.is-purple {
  background: var(--settings-purple-soft);
  color: var(--settings-purple);
}

.settings-icon-tile.is-orange {
  background: var(--settings-orange-bg);
  color: var(--settings-orange);
}

.settings-icon-tile.is-rose {
  background: var(--settings-rose-bg);
  color: var(--settings-rose);
}

.settings-link-row--danger .settings-pref-copy strong,
.settings-link-action--danger {
  color: var(--settings-rose);
}

.settings-pref-copy {
  min-width: 0;
  flex: 1 1 auto;
  text-align: start;
}

.settings-pref-copy strong {
  display: block;
  color: var(--text-dark);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.settings-pref-copy span {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-pref-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
}

.settings-pref-row--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.settings-pref-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-pref-divider {
  height: 1px;
  margin: 2px 4px;
  background: #f3f4f6;
}

.settings-switch {
  position: relative;
  width: 48px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: #d1d5db;
  padding: 0;
  flex: 0 0 auto;
  cursor: pointer;
  transition: background 160ms ease;
  direction: ltr; /* knob always left=off, right=on */
}

.settings-switch.is-on {
  background: var(--settings-purple);
}

.settings-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  transition: transform 160ms ease;
}

.settings-switch.is-on .settings-switch-knob {
  transform: translateX(20px);
}

.settings-nav-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.settings-nav-order-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--settings-purple-soft) 55%, transparent);
  border: 1px solid rgba(124, 92, 252, 0.06);
  border-radius: 16px;
}

.settings-nav-order-pos {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--settings-purple);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  flex: 0 0 auto;
}

.settings-nav-order-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--settings-purple-soft);
  color: var(--settings-purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex: 0 0 auto;
}

.settings-nav-order-icon .assistant-mark {
  font-size: inherit;
  line-height: 1;
}

.settings-nav-order-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.settings-nav-order-label {
  color: var(--text-dark);
  font-size: 15px;
  font-weight: 800;
}

.settings-nav-order-moves {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 0 auto;
}

.settings-nav-move {
  width: 40px;
  height: 32px;
  border: 1.5px solid rgba(124, 92, 252, 0.22);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--settings-purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    opacity 140ms ease;
}

.settings-nav-move:hover:not(:disabled) {
  background: var(--settings-purple-soft);
  border-color: var(--settings-purple);
}

.settings-nav-move:active:not(:disabled) {
  transform: scale(0.96);
}

.settings-nav-move:disabled {
  opacity: 0.35;
  cursor: default;
}

.settings-nav-order-reset {
  width: 100%;
  margin-top: 12px;
  min-height: 46px;
  border: 1.5px solid var(--settings-purple);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--settings-purple);
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.settings-nav-order-reset:active {
  transform: scale(0.99);
}

.settings-nav-order-reset:hover {
  background: var(--settings-purple-soft);
}

/* Booking periods modal */
.settings-periods-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.settings-periods-overlay.active {
  display: flex;
}

.settings-periods-sheet {
  width: min(100%, 420px);
  max-height: min(92vh, 740px);
  overflow: auto;
  border-radius: 28px 28px 22px 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
  animation: settings-periods-rise 220ms ease;
}

@keyframes settings-periods-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.settings-periods-hero {
  position: relative;
  padding: 22px 20px 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.22), transparent 42%),
    linear-gradient(135deg, #6d5efc 0%, #7c5cfc 48%, #5b8def 100%);
  color: #fff;
  text-align: center;
}

.settings-periods-hero.is-nav {
  background:
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.2), transparent 40%),
    linear-gradient(135deg, #5b8def 0%, #7c5cfc 55%, #6d5efc 100%);
}

.settings-nav-modal-body {
  padding-top: 12px;
}

.settings-nav-sheet .settings-nav-order-list {
  margin: 0;
  padding: 0;
}

.settings-nav-sheet .settings-nav-order-reset {
  display: none;
}

.settings-periods-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
}

.settings-periods-hero-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
  font-size: 20px;
}

.settings-periods-hero-title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}

.settings-periods-hero-sub {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.settings-periods-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.settings-periods-shift {
  border-radius: 20px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.settings-periods-shift.is-morning {
  background: linear-gradient(180deg, #fff8eb 0%, #fff 70%);
}

.settings-periods-shift.is-evening {
  background: linear-gradient(180deg, #eef2ff 0%, #fff 70%);
}

.settings-periods-shift-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.settings-periods-shift-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 16px;
}

.settings-periods-shift.is-morning .settings-periods-shift-badge {
  background: #ffedd5;
  color: #ea580c;
}

.settings-periods-shift.is-evening .settings-periods-shift-badge {
  background: #ede9fe;
  color: #6d28d9;
}

.settings-periods-shift-title {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: #111827;
}

.settings-periods-shift-range {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}

.settings-periods-shift-fields {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: end;
}

.settings-periods-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #6b7280;
}

.settings-periods-field input[type='time'] {
  min-height: 46px;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 8px 10px;
  background: #fff;
  color: #111827;
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  font-weight: 800;
}

.settings-periods-arrow {
  padding-bottom: 12px;
  color: #9ca3af;
  font-weight: 900;
}

.settings-periods-note {
  margin: 0;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  line-height: 1.45;
}

.settings-periods-error {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #dc2626;
}

.settings-periods-ok {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #059669;
}

.settings-periods-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 8px;
  padding: 0 16px 16px;
}

.settings-periods-btn {
  min-height: 48px;
  border-radius: 999px;
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.settings-periods-btn.is-ghost {
  border: 1.5px solid #7c5cfc;
  background: #fff;
  color: #7c5cfc;
}

.settings-periods-btn.is-primary {
  border: none;
  background: #7c5cfc;
  color: #fff;
  box-shadow: 0 10px 22px rgba(124, 92, 252, 0.28);
}

@media (min-width: 640px) {
  .settings-periods-overlay {
    align-items: center;
  }

  .settings-periods-sheet {
    border-radius: 28px;
  }
}

body.dark-mode .settings-periods-sheet {
  background: #17181f;
}

body.dark-mode .settings-periods-shift.is-morning,
body.dark-mode .settings-periods-shift.is-evening {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .settings-periods-shift-title {
  color: #f3f4f6;
}

body.dark-mode .settings-periods-field input[type='time'] {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
}

body.dark-mode .settings-periods-btn.is-ghost {
  background: transparent;
  border-color: rgba(124, 92, 252, 0.45);
  color: #c4b5fd;
}

body.dark-mode .settings-periods-shift.is-morning .settings-periods-shift-badge {
  background: rgba(234, 88, 12, 0.2);
  color: #fb923c;
}

body.dark-mode .settings-periods-shift.is-evening .settings-periods-shift-badge {
  background: rgba(124, 92, 252, 0.22);
  color: #c4b5fd;
}

body.dark-mode .settings-periods-shift-range,
body.dark-mode .settings-periods-field,
body.dark-mode .settings-periods-note,
body.dark-mode .settings-periods-arrow {
  color: #a1a1aa;
}

body.dark-mode .settings-periods-field input[type='time'] {
  color-scheme: dark;
}

body.dark-mode .settings-periods-field input[type='time']::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.35);
  opacity: 0.85;
  cursor: pointer;
}

.settings-chalet-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-chalet-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: start;
}

.settings-chalet-field > span {
  font-size: 0.86rem;
  font-weight: 700;
  color: #4b5563;
}

.settings-chalet-field input,
.settings-chalet-field textarea {
  width: 100%;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  color: #111827;
  background: #fff;
  resize: vertical;
}

.settings-chalet-field input:focus,
.settings-chalet-field textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.settings-chalet-loading {
  margin: 0;
  color: #6b7280;
  font-size: 0.92rem;
}

body.dark-mode .settings-chalet-field > span {
  color: #d1d5db;
}

body.dark-mode .settings-chalet-field input,
body.dark-mode .settings-chalet-field textarea {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
}

.settings-link-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  text-align: start;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.settings-link-card:active {
  transform: scale(var(--press-scale-soft, 0.985));
  filter: brightness(0.97);
}

.settings-link-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--settings-purple);
  font-size: 13px;
  font-weight: 800;
}

.settings-link-action i {
  font-size: 11px;
}

body.dark-mode .settings-view {
  --settings-purple: #9b87ff;
  --settings-purple-soft: rgba(124, 92, 252, 0.22);
  --settings-orange-bg: rgba(234, 88, 12, 0.16);
  --settings-orange: #fb923c;
  --settings-rose-bg: rgba(225, 29, 72, 0.16);
  --settings-rose: #fb7185;
}

body.dark-mode .settings-card {
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

body.dark-mode .settings-nav-order-item {
  background: rgba(124, 92, 252, 0.12);
  border-color: rgba(124, 92, 252, 0.14);
}

body.dark-mode .settings-switch:not(.is-on) {
  background: #3f3f46;
}

body.dark-mode .settings-nav-move {
  background: #2a2a33;
  border-color: rgba(167, 139, 250, 0.28);
  color: #c4b5fd;
}

body.dark-mode .settings-nav-order-pos {
  background: #7c5cfc;
}

@media (min-width: 768px) {
  .settings-nav-order-section {
    display: none;
  }
}

/* Logout confirmation dialog — always centered in the viewport */
.settings-logout-overlay {
  position: fixed;
  top: var(--app-vv-offset-top, 0px);
  right: 0;
  bottom: auto;
  left: 0;
  z-index: var(--z-modal-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--app-vv-height, 100dvh);
  max-height: var(--app-vv-height, 100dvh);
  padding: var(--space-6);
  box-sizing: border-box;
  background: var(--overlay-scrim, rgba(15, 23, 42, 0.42));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.settings-logout-sheet {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-6) var(--space-5) var(--space-5);
  text-align: center;
  direction: inherit;
}

.settings-logout-title {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--text-dark);
}

.settings-logout-message {
  margin: 0 0 var(--space-5);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.6;
}

.settings-logout-actions {
  display: flex;
  gap: var(--space-2);
}

.settings-logout-actions .btn {
  flex: 1;
  min-height: var(--control-height);
  justify-content: center;
}

.settings-logout-confirm {
  box-shadow: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.settings-action {
  width: auto;
  min-width: 120px;
  padding: 10px 14px;
  /* Phase 1 .btn radius-sm wins over base 10px */
  border-radius: var(--radius-sm);
  font-size: 13px;
  justify-content: center;
}

/* Change password view — production #password-view */
.password-view {
  direction: inherit;
  max-width: 520px;
  margin: 0 auto;
}

.password-shell {
  display: grid;
  gap: var(--space-card-gap);
}

.password-card.auth-card {
  margin: 0 auto;
  width: 100%;
  max-width: 450px;
  padding: var(--space-card);
  text-align: center;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  animation: settingsSubpageIn 240ms ease-out both;
}

.password-hero-icon {
  width: calc(var(--control-box) + var(--space-6));
  height: calc(var(--control-box) + var(--space-6));
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  font-size: var(--icon-size-lg);
  color: white;
  background: var(--primary);
  box-shadow: none;
}

.password-title {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-lg);
  text-align: center;
  font-weight: 800;
  color: var(--text-dark);
}

.password-policy-hints {
  margin: 0 0 var(--space-5);
  padding: 0 18px 0 0;
  list-style: disc;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  text-align: start;
}

.password-msg {
  font-size: var(--font-size-md);
  font-weight: bold;
  margin-bottom: var(--space-5);
  text-align: center;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  animation: settingsMsgIn var(--motion-normal) var(--ease-out) both;
}

.password-msg.danger {
  color: #b91c1c;
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
}

.password-msg.success {
  color: #15803d;
  background-color: #f0fdf4;
  border: 1px solid #86efac;
}

.password-form-group {
  margin-bottom: 16px;
  text-align: start;
}

.password-form-group-last {
  margin-bottom: 25px;
}

.password-form-label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-dark);
}

.password-form-control {
  width: 100%;
  min-height: var(--control-height);
  padding: 12px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast);
  color: var(--text-dark);
  font-weight: 700;
  font-family: inherit;
  box-sizing: border-box;
}

.password-form-control::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.password-form-control:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-focus);
}

.password-save-btn {
  width: 100%;
  justify-content: center;
  min-height: var(--control-height);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    opacity var(--transition-fast);
}

.password-save-btn:not(:disabled):active {
  transform: scale(0.99);
}

.password-save-btn.is-saving {
  opacity: 0.92;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid rgba(37, 99, 235, 0.35);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.22);
}


.brand-identity-view {
  direction: inherit;
}

.brand-identity-shell {
  display: grid;
  gap: var(--space-4);
  max-width: 880px;
  margin: 0 auto;
  padding-top: 0;
}

.brand-identity-form {
  display: grid;
  gap: var(--space-4);
}

/* Sticky back — AppHeader owns the feature title */
.settings-sticky-back {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: calc(-1 * var(--space-page)) calc(-1 * var(--space-page))
    var(--space-3);
  padding: var(--space-2) var(--space-page);
  padding-top: calc(var(--space-2) + env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border-color) 80%, transparent);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.settings-sticky-back--solo {
  justify-content: flex-start;
}

.settings-sticky-back-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.settings-sticky-back-title i {
  width: var(--control-box);
  height: var(--control-box);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: var(--primary);
  box-shadow: var(--shadow-xs);
  flex: 0 0 auto;
}

.settings-sticky-back-title h3 {
  margin: 0;
  color: var(--text-dark);
  font-size: var(--font-size-lg);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-sticky-back-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: none;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.settings-sticky-back-btn:hover {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary-light) 70%, transparent);
}

.settings-sticky-back-btn:active {
  transform: none;
  opacity: 0.85;
}

.brand-sticky-back {
  margin-bottom: var(--space-3);
  padding-block: var(--space-2);
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  box-shadow: none;
}

body.dark-mode .brand-sticky-back {
  background: transparent;
  box-shadow: none;
}

.brand-sticky-back-btn {
  min-height: 34px;
  padding: 6px 8px;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--text-dark);
}

.brand-sticky-back-btn i {
  font-size: 13px;
  line-height: 1;
}

body.dark-mode .brand-sticky-back-btn {
  background: transparent;
  border: none;
  color: var(--text-dark);
}

.brand-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand-page-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.brand-page-title i {
  width: var(--control-box);
  height: var(--control-box);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: var(--primary);
  box-shadow: var(--shadow-xs);
  flex: 0 0 auto;
  font-size: var(--icon-size-md);
}

.brand-page-title h3 {
  margin: 0;
  color: var(--text-dark);
  font-size: var(--font-size-lg);
  font-weight: 800;
}

@keyframes settingsSubpageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes settingsMsgIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Flat sections — no nested card chrome */
.brand-section,
.brand-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0 0 var(--space-3);
  box-shadow: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.brand-section:last-of-type,
.brand-card:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.brand-section h4,
.brand-card h4 {
  margin: 0 0 12px;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.brand-form-grid .full,
.brand-form-grid .brand-form-group.full {
  grid-column: 1 / -1;
}

.brand-form-grid .form-group {
  margin-bottom: 0;
}

.brand-media-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
}

.brand-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand-upload-box {
  min-height: 100px;
  padding: 14px;
  border: 1.5px dashed rgba(37, 99, 235, 0.32);
  border-radius: var(--radius-md);
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-dark);
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.brand-upload-box:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.brand-upload-box i {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  border: 1px solid var(--border-color);
}

.brand-upload-box span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.brand-logo-preview,
.brand-photo-thumb {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  border-radius: var(--radius-md);
}

.brand-logo-preview {
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-weight: 800;
  text-align: center;
}

.brand-logo-preview img,
.brand-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.brand-photo-thumb {
  aspect-ratio: 1 / 1;
}

.brand-photos-empty {
  min-height: 88px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  grid-column: 1 / -1;
}

.brand-remove-media {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.7);
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-color-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dark);
  font-weight: 800;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 13px;
}

.brand-color-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

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

.brand-color-input {
  min-height: 44px;
  padding: 4px;
}

.brand-status {
  display: none;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
  border: 1px solid transparent;
}

.brand-status.success {
  display: block;
  color: var(--accent-green);
  background: var(--accent-green-light);
  border-color: rgba(22, 163, 74, 0.22);
}

.brand-status.warning {
  display: block;
  color: #b45309;
  background: var(--warning-light);
  border-color: rgba(245, 158, 11, 0.25);
}

.brand-status.danger {
  display: block;
  color: var(--danger);
  background: var(--danger-light);
  border-color: rgba(239, 68, 68, 0.22);
}

.brand-load-state,
.brand-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 12px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  margin: 0;
}

.brand-load-state {
  min-height: 100px;
  border-style: solid;
}

.brand-load-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  border-radius: var(--radius-md);
  background: var(--danger-light);
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  margin: 0;
}

.brand-retry-btn {
  width: auto;
  min-width: 140px;
}

.brand-field-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.brand-form-group {
  margin-bottom: 0;
}

.brand-form-label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
}

.brand-form-control {
  width: 100%;
  min-height: var(--control-height);
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  color: var(--text-dark);
  font-weight: 700;
  font-family: inherit;
  resize: vertical;
}

.brand-form-control::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.brand-form-control:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-focus);
}

.brand-form-control:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.brand-save-btn {
  width: 100%;
  justify-content: center;
  min-height: var(--control-height);
  margin-top: var(--space-2);
  transition: opacity var(--transition-fast);
}

.brand-save-btn:not(:disabled):active {
  opacity: 0.92;
}

.brand-save-btn.is-saving {
  opacity: 0.92;
}

@media (max-width: 560px) {
  .settings-logout-actions {
    flex-direction: column-reverse;
  }

  .brand-media-layout,
  .brand-form-grid,
  .brand-color-row {
    grid-template-columns: 1fr;
  }

  .brand-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-sticky-back {
    margin-inline: calc(-1 * var(--space-page));
  }
}

@media (min-width: 768px) {
  .settings-stack {
    gap: var(--space-card-gap);
  }

  .settings-card {
    padding: var(--space-card);
  }

  .settings-card h3 {
    margin: 0 0 var(--space-5);
    font-size: var(--font-size-lg);
  }

  .settings-row {
    gap: var(--space-5);
    padding: var(--space-4);
  }

  .password-card.auth-card {
    padding: var(--space-card);
  }

  .password-hero-icon {
    width: calc(var(--control-box) + var(--space-8));
    height: calc(var(--control-box) + var(--space-8));
    font-size: var(--icon-size-lg);
    margin-bottom: var(--space-5);
  }

  .password-title {
    margin: 0 0 var(--space-8);
    font-size: var(--font-size-xl);
  }

  .brand-identity-shell {
    gap: var(--space-5);
  }

  .settings-sticky-back-title h3 {
    font-size: var(--font-size-xl);
  }

  .brand-page-title h3 {
    font-size: var(--font-size-xl);
  }

  .brand-section,
  .brand-card {
    padding: 0 0 var(--space-4);
  }

  .settings-density-option {
    min-height: calc(var(--row-height) + var(--space-8));
  }
}

/* LTR: flip RTL-oriented chevrons */
html[dir='ltr'] .settings-link-action .fa-chevron-left,
html[dir='ltr'] .app-menu-item-chevron {
  transform: scaleX(-1);
}
/* Platform admin console — Operate surface, Rentoo purple system, RTL */
/* Scroll lives inside .admin-main — html/body/#root stay overflow:hidden. */

/* Tokens on BOTH shell + portaled overlay (modal mounts on document.body). */
.admin-app,
.admin-overlay {
  --admin-purple: #7c5cfc;
  --admin-purple-soft: #ede9fe;
  --admin-canvas: #f4f4f7;
  --admin-ink: #111827;
  --admin-muted: #6b7280;
  --admin-line: rgba(17, 24, 39, 0.08);
  --admin-danger: #be123c;
  --admin-danger-soft: #fff1f2;
  --admin-ok: #059669;
  --admin-ok-soft: #ecfdf5;
}

.admin-app {
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  background: var(--admin-canvas);
  color: var(--admin-ink);
  direction: rtl;
  font-family: 'Cairo', sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@supports (height: 100dvh) {
  .admin-app {
    height: 100dvh;
    max-height: 100dvh;
  }
}

.admin-topbar {
  flex: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top, 0px));
  background: #fff;
  border-bottom: 1px solid var(--admin-line);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-brand img,
.admin-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  overflow: hidden;
}

.admin-brand-text {
  min-width: 0;
}

.admin-brand-text strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.admin-brand-text span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.admin-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  border-radius: 14px;
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 120ms ease;
}

.admin-btn:active {
  transform: scale(0.97);
}

.admin-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.admin-btn-ghost {
  background: transparent;
  color: var(--admin-muted);
}

.admin-btn-ghost:hover {
  background: rgba(17, 24, 39, 0.04);
  color: var(--admin-ink);
}

.admin-btn-soft {
  background: var(--admin-purple-soft);
  color: var(--admin-purple);
}

.admin-btn-soft:hover {
  background: #e0d7ff;
}

.admin-btn-primary {
  background: var(--admin-purple);
  color: #fff;
}

.admin-btn-danger {
  background: var(--admin-danger);
  color: #fff;
}

.admin-btn-ok {
  background: var(--admin-ok);
  color: #fff;
}

.admin-btn-block {
  width: 100%;
}

.admin-icon-btn {
  appearance: none;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f3f4f6;
  color: var(--admin-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.admin-icon-btn:active {
  transform: scale(0.96);
}

.admin-main {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  margin: 0 auto;
  padding: 16px 14px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.admin-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.22), transparent 42%),
    linear-gradient(135deg, #7c5cfc 0%, #5b3fd4 100%);
  color: #fff;
  box-shadow: 0 16px 36px rgba(124, 92, 252, 0.28);
  flex-shrink: 0;
}

.admin-hero-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.admin-hero-eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.86;
}

.admin-hero-title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}

.admin-hero-sub {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0.9;
}

.admin-hero-stat {
  flex: 0 0 auto;
  min-width: 88px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  text-align: center;
  backdrop-filter: blur(8px);
}

.admin-hero-stat strong {
  display: block;
  font-size: 28px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.admin-hero-stat span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.9;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .admin-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.admin-summary-item {
  background: #fff;
  border-radius: 18px;
  padding: 14px 12px;
  border: 1px solid var(--admin-line);
}

.admin-summary-item.is-subscribers strong {
  color: var(--admin-purple);
}

.admin-create-card {
  background: #fff;
  border-radius: 22px;
  border: 1px solid var(--admin-line);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.admin-create-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-create-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.admin-create-head p {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-muted);
  line-height: 1.4;
}

.admin-create-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-create-passwords {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .admin-create-passwords {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--admin-muted);
}

.admin-field input {
  min-height: 46px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: #fafafa;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--admin-ink);
  outline: none;
}

.admin-field input:focus {
  border-color: color-mix(in srgb, var(--admin-purple) 45%, transparent);
  box-shadow: 0 0 0 3px var(--admin-purple-soft);
  background: #fff;
}

.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-muted);
  cursor: pointer;
}

.admin-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--admin-purple);
}

.admin-banner {
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.admin-banner-ok {
  background: var(--admin-ok-soft);
  color: var(--admin-ok);
}

.admin-banner-error {
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.admin-summary-item strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.admin-summary-item span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--admin-muted);
}

.admin-summary-item.is-active strong {
  color: var(--admin-ok);
}

.admin-summary-item.is-warn strong {
  color: #d97706;
}

.admin-summary-item.is-disabled strong {
  color: var(--admin-danger);
}

.admin-toolbar {
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--admin-line);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.admin-toolbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-toolbar-row .admin-search {
  flex: 1;
  min-width: 0;
}

.admin-search {
  position: relative;
}

.admin-search i {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--admin-muted);
  font-size: 14px;
  pointer-events: none;
}

.admin-search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: #fafafa;
  padding: 10px 40px 10px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--admin-ink);
  outline: none;
}

.admin-search input:focus {
  border-color: color-mix(in srgb, var(--admin-purple) 45%, transparent);
  box-shadow: 0 0 0 3px var(--admin-purple-soft);
  background: #fff;
}

.admin-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-filter {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--admin-line);
  background: #fff;
  color: var(--admin-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.admin-filter.is-active {
  background: var(--admin-purple-soft);
  border-color: transparent;
  color: var(--admin-purple);
}

.admin-list {
  background: #fff;
  border-radius: 22px;
  border: 1px solid var(--admin-line);
  overflow: visible;
  flex-shrink: 0;
}

.admin-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 8px;
}

.admin-list-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.admin-list-head span {
  font-size: 12px;
  font-weight: 700;
  color: var(--admin-muted);
}

.admin-owner-row {
  width: 100%;
  border-top: 1px solid var(--admin-line);
  background: #fff;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  transition: background 140ms ease;
}

.admin-owner-row:last-child {
  border-radius: 0 0 22px 22px;
}

.admin-owner-row:hover,
.admin-owner-row.is-selected {
  background: #faf9ff;
}

.admin-owner-main-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  text-align: right;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
}

.admin-owner-main-btn:focus-visible {
  outline: 2px solid var(--admin-purple);
  outline-offset: 2px;
  border-radius: 8px;
}

.admin-owner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.admin-btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 12px;
}

.admin-hint {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--admin-muted);
}

.admin-owner-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-owner-title strong {
  font-size: 14px;
  font-weight: 800;
  word-break: break-word;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.admin-badge-ok {
  background: var(--admin-ok-soft);
  color: var(--admin-ok);
}

.admin-badge-off {
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.admin-owner-meta {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.admin-owner-chevron {
  align-self: center;
  color: #c4b5fd;
  font-size: 14px;
}

.admin-state {
  padding: 28px 18px;
  text-align: center;
  color: var(--admin-muted);
  font-size: 14px;
  font-weight: 700;
}

.admin-state-error {
  color: var(--admin-danger);
}

.admin-state-ok {
  color: var(--admin-ok);
  background: var(--admin-ok-soft);
  border-radius: 14px;
  padding: 12px;
}

/* Full-screen-friendly overlay — buttons live inside scroll, never clipped */
.admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  direction: rtl;
  font-family: 'Cairo', sans-serif;
  color: var(--admin-ink);
}

.admin-overlay-bg {
  position: absolute;
  inset: 0;
  border: none;
  margin: 0;
  padding: 0;
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
}

.admin-sheet {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  height: min(92dvh, 900px);
  max-height: min(92dvh, 900px);
  background: #fff;
  border-radius: 28px 28px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -16px 48px rgba(15, 23, 42, 0.22);
  animation: adminSheetUp 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes adminSheetUp {
  from {
    opacity: 0.65;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-sheet-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(124, 92, 252, 0.12), transparent 46%),
    linear-gradient(180deg, #f7f5ff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--admin-line);
}

.admin-sheet-head-main {
  min-width: 0;
  flex: 1 1 auto;
}

.admin-sheet-title {
  min-width: 0;
}

.admin-sheet-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  word-break: break-word;
  line-height: 1.35;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(145deg, #7c5cfc, #5b3fd4);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 10px 22px rgba(124, 92, 252, 0.28);
}

.admin-profile-copy {
  min-width: 0;
}

.admin-profile-copy h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  word-break: break-word;
  line-height: 1.35;
}

.admin-profile-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-sheet-sub {
  font-size: 12px;
  font-weight: 700;
  color: var(--admin-muted);
}

.admin-detail-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-detail-hero-item {
  background: linear-gradient(180deg, #f8f7ff 0%, #ffffff 100%);
  border: 1px solid rgba(124, 92, 252, 0.12);
  border-radius: 16px;
  padding: 12px 10px;
  text-align: center;
}

.admin-detail-hero-item span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--admin-muted);
}

.admin-detail-hero-item strong {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 900;
  color: var(--admin-ink);
  line-height: 1.35;
  word-break: break-word;
}

.admin-panel {
  background: #fff;
  border: 1px solid var(--admin-line);
  border-radius: 22px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.admin-panel-danger {
  border-color: rgba(190, 18, 60, 0.14);
  background: linear-gradient(180deg, #fff8f9 0%, #ffffff 100%);
}

.admin-panel-danger.is-locked {
  border-color: rgba(5, 150, 105, 0.16);
  background: linear-gradient(180deg, #f3fdf7 0%, #ffffff 100%);
}

.admin-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.admin-panel-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}

.admin-panel-icon.is-purple {
  background: rgba(124, 92, 252, 0.14);
  color: #7c5cfc;
}

.admin-panel-icon.is-violet {
  background: rgba(109, 40, 217, 0.12);
  color: #7c3aed;
}

.admin-panel-icon.is-indigo {
  background: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
}

.admin-panel-icon.is-rose {
  background: rgba(190, 18, 60, 0.12);
  color: #be123c;
}

.admin-panel-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: var(--admin-ink);
}

.admin-panel-head p {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-muted);
  line-height: 1.45;
}

.admin-pass-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.admin-pill.is-on {
  background: var(--admin-ok-soft);
  color: var(--admin-ok);
}

.admin-pill.is-off {
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.admin-sheet-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px 14px calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-banner {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.admin-banner.is-ok {
  background: var(--admin-ok-soft);
  color: var(--admin-ok);
}

.admin-banner.is-err {
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.admin-pass-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-pass-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--admin-muted);
}

.admin-pass-field input {
  min-height: 48px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: #fafafa;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--admin-ink);
  outline: none;
}

.admin-pass-field input:focus {
  border-color: color-mix(in srgb, var(--admin-purple) 50%, transparent);
  box-shadow: 0 0 0 3px var(--admin-purple-soft);
  background: #fff;
}

.admin-pass-show {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-muted);
  cursor: pointer;
}

.admin-pass-show input {
  width: 18px;
  height: 18px;
  accent-color: var(--admin-purple);
}

.admin-pass-details {
  border-radius: 12px;
  background: #f8f7ff;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--admin-muted);
}

.admin-pass-details summary {
  cursor: pointer;
  color: var(--admin-purple);
}

.admin-pass-details ul {
  margin: 8px 0 4px;
  padding: 0 16px 0 0;
  line-height: 1.55;
}

.admin-cta {
  appearance: none;
  border: none;
  width: 100%;
  min-height: 50px;
  border-radius: 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease, opacity 120ms ease;
}

.admin-cta:active {
  transform: scale(0.98);
}

.admin-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.admin-cta-primary {
  background: #7c5cfc !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(124, 92, 252, 0.28);
}

.admin-cta-danger {
  background: #be123c !important;
  color: #ffffff !important;
}

.admin-cta-ok {
  background: #059669 !important;
  color: #ffffff !important;
}

.admin-cta-ghost {
  background: #f3f4f6 !important;
  color: #111827 !important;
}

.admin-confirm-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: var(--admin-danger-soft);
}

.admin-confirm-box p {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-danger);
  line-height: 1.45;
}

.admin-chalet-meta {
  margin: 0;
  display: grid;
  gap: 10px;
}

.admin-chalet-meta > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.04);
}

.admin-chalet-meta dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: #6b7280;
}

.admin-chalet-meta dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  white-space: pre-wrap;
  word-break: break-word;
}

body.dark-mode .admin-chalet-meta dt {
  color: #9ca3af;
}

body.dark-mode .admin-chalet-meta dd {
  color: #f3f4f6;
}

.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.admin-stats-row > div {
  background: #f8f7ff;
  border-radius: 14px;
  padding: 12px 6px;
  text-align: center;
  border: 1px solid rgba(124, 92, 252, 0.1);
}

.admin-stats-row strong {
  display: block;
  font-size: 17px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--admin-purple);
}

.admin-stats-row span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 800;
  color: var(--admin-muted);
}

@media (max-width: 767px) {
  .admin-summary-item strong {
    font-size: 18px;
  }

  .admin-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-detail-hero {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 640px) {
  .admin-pass-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .admin-main {
    width: min(920px, 100%);
    padding: 22px 20px calc(32px + env(safe-area-inset-bottom, 0px));
  }

  .admin-toolbar {
    flex-direction: column;
  }

  .admin-overlay {
    align-items: center;
    padding: 24px;
  }

  .admin-sheet {
    border-radius: 28px;
    height: min(86dvh, 820px);
    max-height: min(86dvh, 820px);
  }

  .admin-detail-hero {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

body.dark-mode .admin-sheet {
  background: #1a1a22;
}

body.dark-mode .admin-sheet-head {
  background:
    radial-gradient(circle at 100% 0%, rgba(124, 92, 252, 0.22), transparent 46%),
    linear-gradient(180deg, #221f2e 0%, #1a1a22 100%);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .admin-detail-hero-item,
body.dark-mode .admin-panel,
body.dark-mode .admin-chalet-meta > div,
body.dark-mode .admin-stats-row > div {
  background: #22222c;
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .admin-panel-danger {
  background: linear-gradient(180deg, rgba(190, 18, 60, 0.12) 0%, #22222c 100%);
}

body.dark-mode .admin-panel-danger.is-locked {
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.12) 0%, #22222c 100%);
}

body.dark-mode .admin-detail-hero-item strong,
body.dark-mode .admin-panel-head h3,
body.dark-mode .admin-profile-copy h2 {
  color: #f3f4f6;
}

body.dark-mode .admin-pass-field input {
  background: #16161d;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
}

body.dark-mode .admin-pass-details {
  background: rgba(124, 92, 252, 0.14);
}

body.dark-mode .admin-cta-ghost {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f3f4f6 !important;
}

.admin-panel-icon.is-teal {
  background: rgba(13, 148, 136, 0.14);
  color: #0d9488;
}

.admin-days-left {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  color: #d97706;
}

.admin-wa-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #ecfdf5;
  border: 1px solid rgba(5, 150, 105, 0.18);
  color: #047857;
  text-decoration: none;
  font-weight: 800;
}

.admin-wa-link i {
  font-size: 20px;
  color: #25d366;
}

.admin-wa-link span {
  flex: 1;
  font-size: 13px;
}

.admin-wa-link strong {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.85;
  direction: ltr;
}

.admin-sub-form,
.admin-sub-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-sub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 640px) {
  .admin-sub-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-pass-field select,
.admin-pass-field textarea {
  min-height: 48px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: #fafafa;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--admin-ink);
  outline: none;
  resize: vertical;
}

.admin-pass-field select:focus,
.admin-pass-field textarea:focus {
  border-color: color-mix(in srgb, var(--admin-purple) 50%, transparent);
  box-shadow: 0 0 0 3px var(--admin-purple-soft);
  background: #fff;
}

.admin-extend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-extend-row > span {
  width: 100%;
  font-size: 12px;
  font-weight: 800;
  color: var(--admin-muted);
}

.admin-alerts {
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: 22px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.admin-alerts-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: #92400e;
}

.admin-alerts-head span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: #b45309;
}

.admin-alerts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-alerts-list > li {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.admin-alert-row {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: start;
  border: 1px solid rgba(217, 119, 6, 0.16);
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.admin-alert-row strong {
  display: block;
  font-size: 13px;
  font-weight: 900;
}

.admin-alert-row span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--admin-muted);
}

.admin-alert-wa {
  width: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ecfdf5;
  color: #25d366;
  text-decoration: none;
  font-size: 18px;
  border: 1px solid rgba(5, 150, 105, 0.16);
}

.admin-badge-warn {
  background: #fffbeb;
  color: #d97706;
}

.admin-badge-pay.is-trial {
  background: #eef2ff;
  color: #4f46e5;
}

.admin-badge-pay.is-paid {
  background: var(--admin-ok-soft);
  color: var(--admin-ok);
}

.admin-badge-pay.is-overdue,
.admin-badge-pay.is-expired {
  background: #fff7ed;
  color: #c2410c;
}

.admin-badge-pay.is-stopped {
  background: #f3f4f6;
  color: #6b7280;
}

.admin-pill.is-pay.is-trial {
  background: #eef2ff;
  color: #4f46e5;
}

.admin-pill.is-pay.is-paid {
  background: var(--admin-ok-soft);
  color: var(--admin-ok);
}

.admin-pill.is-pay.is-overdue,
.admin-pill.is-pay.is-expired {
  background: #fff7ed;
  color: #c2410c;
}

.admin-pill.is-pay.is-stopped {
  background: #f3f4f6;
  color: #6b7280;
}

.admin-owner-row.is-expiring {
  border-color: rgba(217, 119, 6, 0.28);
  box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.08);
}

.admin-wa-btn {
  color: #25d366 !important;
  min-width: 40px;
  padding-inline: 10px;
}

.admin-admins-list,
.admin-audit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-admins-list li,
.admin-audit-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fafafa;
  border: 1px solid var(--admin-line);
}

.admin-admins-list strong,
.admin-audit-list strong {
  display: block;
  font-size: 13px;
  font-weight: 900;
}

.admin-admins-list span,
.admin-audit-list span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--admin-muted);
}

.admin-audit-list li {
  flex-direction: column;
  align-items: stretch;
}

.admin-audit-list em {
  margin-top: 4px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--admin-muted);
}

.admin-admins-body,
.admin-audit-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.dark-mode .admin-alerts {
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.14) 0%, #22222c 100%);
  border-color: rgba(217, 119, 6, 0.28);
}

body.dark-mode .admin-alerts-head h2 {
  color: #fbbf24;
}

body.dark-mode .admin-alerts-head span,
body.dark-mode .admin-alert-row span {
  color: #d1d5db;
}

body.dark-mode .admin-alert-row,
body.dark-mode .admin-admins-list li,
body.dark-mode .admin-audit-list li {
  background: #1a1a22;
  border-color: rgba(255, 255, 255, 0.08);
  color: #f3f4f6;
}

body.dark-mode .admin-wa-link {
  background: rgba(5, 150, 105, 0.16);
  border-color: rgba(5, 150, 105, 0.28);
  color: #6ee7b7;
}

body.dark-mode .admin-pass-field select,
body.dark-mode .admin-pass-field textarea {
  background: #16161d;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
}

