/* Odera Studio — shared application foundation. Booking themes own their palettes. */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f7f8fc;
  --surface-hover: #eef1fa;
  --text: #1c243b;
  --muted: #5f6b84;
  --subtle: #8791a5;
  --border: #e7eaf3;
  --border-strong: #d9deec;
  --primary: #4f5fe8;
  --primary-hover: #3c4bd2;
  --primary-soft: #eef0ff;
  --primary-text: #4755cb;
  --primary-ink: #ffffff;
  --purple: #8a62cd;
  --purple-soft: #f2edfc;
  --blue: #3d7cc4;
  --blue-soft: #eaf3fe;
  --orange: #a56a22;
  --orange-soft: #fff3e1;
  --red: #bf5267;
  --red-soft: #ffedf0;
  --shadow: 0 3px 16px rgb(39 49 89 / 3%);
  --shadow-raised: 0 14px 45px rgb(34 43 85 / 11%);
  --radius: 20px;
  --sidebar-width: 256px;
  --studio-sidebar: #151c35;
  --studio-sidebar-soft: #202a47;
  --studio-sidebar-text: #b7c0d8;
  --studio-focus: #8592ff;
}

html[data-theme='dark'] {
  --bg: #0e1425;
  --surface: #171f33;
  --surface-soft: #1c263d;
  --surface-hover: #252f48;
  --text: #edf1ff;
  --muted: #a4afc8;
  --subtle: #8e9ab7;
  --border: #2a344e;
  --border-strong: #3a4766;
  --primary: #8693ff;
  --primary-hover: #a2adff;
  --primary-soft: #293254;
  --primary-text: #b4bdff;
  --primary-ink: #111a3d;
  --purple: #bea0ef;
  --purple-soft: #32294b;
  --blue: #8dc2ff;
  --blue-soft: #23334e;
  --orange: #edbc77;
  --orange-soft: #413426;
  --red: #f49aaa;
  --red-soft: #462b3d;
  --shadow: 0 3px 20px rgb(0 0 0 / 8%);
  --shadow-raised: 0 16px 50px rgb(0 0 0 / 26%);
  --studio-sidebar: #11172b;
  --studio-sidebar-soft: #1c2742;
  --studio-sidebar-text: #bdc7e0;
}

.app-shell, .auth-screen, .access-screen { font-size: 14px; line-height: 1.6; }
.app-shell { min-height: 100dvh; background: var(--bg); }
.studio-skip { position: fixed; top: -80px; left: 20px; z-index: 200; padding: 12px 18px; border: 1px solid var(--primary); border-radius: 10px; color: var(--primary-ink); background: var(--primary); box-shadow: var(--shadow-raised); font-size: 13px; font-weight: 600; }
.studio-skip:focus { top: 14px; color: var(--primary-ink); }
.app-shell :where(h1, h2, h3, h4):not(.editor-preview *) { font-weight: 700; letter-spacing: -.035em; }
.app-shell :where(button, a, input, select, textarea):focus-visible,
.auth-screen :where(button, a, input, select, textarea):focus-visible,
.access-screen :where(button, a, input, select, textarea):focus-visible,
dialog.modal :where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid var(--studio-focus);
  outline-offset: 3px;
}

/* A compact, deliberate navigation rail with a distinct night palette. */
.app-shell .sidebar {
  width: var(--sidebar-width);
  padding: 29px 18px 19px;
  color: var(--studio-sidebar-text);
  background: var(--studio-sidebar);
  border-right: 1px solid rgb(255 255 255 / 4%);
  scrollbar-color: #3d4868 transparent;
}
.app-shell .sidebar .brand { margin: 0 0 34px; padding: 0 12px; color: #fff; gap: 12px; }
.app-shell .sidebar .brand-mark,
.auth-story .brand-mark { width: 41px; height: 41px; border-radius: 13px; background: #6976f6; color: #fff; box-shadow: 0 6px 22px rgb(88 103 242 / 25%); }
.app-shell .sidebar .brand-name { font-size: 19px; letter-spacing: -.055em; }
.app-shell .sidebar .brand-name > span { font-weight: 400; }
.app-shell .sidebar .brand-sub { margin-top: 5px; color: #99a7cd; font-size: 8px; letter-spacing: .15em; }
.studio-sidebar-head { display: flex; align-items: center; gap: 6px; margin-bottom: 31px; }
.app-shell .studio-sidebar-head .brand { flex: 1; min-width: 0; gap: 9px; padding: 0; margin: 0; }
.app-shell .studio-sidebar-head .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
.app-shell .studio-sidebar-head .brand-name { font-size: 17px; white-space: nowrap; }
.app-shell .studio-sidebar-head .brand-sub { display: none; }
.app-shell .studio-sidebar-head .studio-rail-toggle { width: 28px; min-width: 28px; height: 36px; border-radius: 8px; color: #9badd3; }
.app-shell .studio-sidebar-head .studio-rail-toggle:hover { background: #2a3553; color: #fff; }
.app-shell .studio-sidebar-head .studio-rail-toggle svg { width: 16px; height: 16px; }
.app-shell .studio-sidebar-head .studio-mobile-close { display: none; }
.app-shell .sidebar .workspace-picker {
  margin: 0 0 28px;
  padding: 15px 14px;
  border: 1px solid #313b59;
  border-radius: 13px;
  background: #202941;
  box-shadow: inset 0 1px rgb(255 255 255 / 3%);
}
.app-shell .sidebar .workspace-picker label { margin-bottom: 6px; color: #97a5c8; font-size: 9px; letter-spacing: .12em; font-weight: 650; }
.app-shell .sidebar .workspace-picker select { min-height: 26px; color: #f5f7ff; font-size: 12px; line-height: 1.5; font-weight: 650; }
.app-shell .sidebar .workspace-picker select + select { color: #bcc6df; margin-top: 5px; font-size: 11px; font-weight: 500; }
.app-shell .sidebar .workspace-picker select option { color: #f5f7ff; background: #202941; }
.app-shell .sidebar nav { flex-shrink: 0; }
.studio-nav-group + .studio-nav-group { margin-top: 23px; }
.app-shell .sidebar .nav-label,
.app-shell .studio-nav-label { display: block; margin: 0 13px 9px; color: #8d9aba; font-size: 9px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.app-shell .sidebar .nav-item { position: relative; gap: 12px; min-height: 45px; margin: 4px 0; padding: 11px 13px; border-radius: 10px; color: #b5c0db; font-size: 12px; font-weight: 500; }
.app-shell .sidebar .nav-item svg { width: 19px; height: 19px; stroke-width: 1.65; color: #95a4c7; }
.app-shell .sidebar .nav-item:hover { color: #fff; background: #222d4a; }
.app-shell .sidebar .nav-item:hover svg { color: #d5dbff; }
.app-shell .sidebar .nav-item.active { color: #fff; background: #4f5fe8; font-weight: 650; box-shadow: 0 5px 15px rgb(5 10 38 / 12%); }
.app-shell .sidebar .nav-item.active svg { color: #fff; }
.app-shell .sidebar .nav-count { min-width: 23px; height: 23px; border-radius: 7px; background: rgb(255 255 255 / 10%); color: #e0e6ff; font-size: 10px; }
.app-shell .sidebar .nav-item.active .nav-count { background: rgb(255 255 255 / 18%); color: #fff; }
.app-shell .sidebar-bottom { padding-top: 24px; }
.app-shell .sidebar .public-link-card { min-height: 0; margin: 9px 0 20px; padding: 17px 15px; border: 1px solid #354165; border-radius: 13px; background: #212b49; }
.app-shell .sidebar .public-link-card > svg { color: #a9b0ff; width: 20px; height: 20px; margin-bottom: 11px; }
.app-shell .sidebar .public-link-card > strong,
.app-shell .sidebar .public-link-card h3 { color: #f0f3ff; font-size: 12px; margin-bottom: 5px; }
.app-shell .sidebar .public-link-card p { color: #b2bddd; line-height: 1.7; font-size: 10px; }
.app-shell .sidebar .public-link-card .btn { min-height: 36px; padding: 7px 11px; font-size: 10px; color: #edf0ff; background: #354165; border-color: #48557e; border-radius: 8px; }
.app-shell .sidebar .public-link-card .btn:hover { background: #435380; }
.app-shell .sidebar .profile { gap: 10px; padding: 19px 2px 0; border-color: #303a57; }
.app-shell .sidebar .profile strong { font-size: 11px; color: #edf0fa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 136px; }
.app-shell .sidebar .profile small { font-size: 9px; color: #9cabc9; margin-top: 4px; }
.app-shell .sidebar .profile .avatar { width: 37px; height: 37px; border-radius: 11px; color: #d8dcff; background: #394268; border: 1px solid #515c86; }
.app-shell .sidebar .profile .icon-button { width: 36px; min-width: 36px; height: 44px; color: #a3afca; }
.app-shell .sidebar .profile .icon-button:hover { color: #fff; background: #273351; }
.studio-plan-badge { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 3px 0; color: #a7b4d4; font-size: 9px; }
.studio-plan-badge strong { font-size: 9px; font-weight: 600; color: #b5c0ff; padding: 3px 7px; background: #2b3557; border: 1px solid #3b4770; border-radius: 5px; }

/* Quiet topbar; page content carries the visual hierarchy. */
.app-shell .main-shell { min-width: 0; margin-left: var(--sidebar-width); }
.app-shell .topbar { position: sticky; top: 0; z-index: 30; height: 84px; gap: 18px; padding: 0 34px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(16px); }
.app-shell .topbar-title { min-width: 0; gap: 8px; }
.app-shell .topbar-title > div { min-width: 0; }
.studio-breadcrumb { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--muted); font-size: 12px; }
.studio-breadcrumb > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-breadcrumb strong { color: var(--text); font-size: 12px; font-weight: 600; }
.studio-breadcrumb svg { width: 14px; height: 14px; color: var(--subtle); }
.studio-topbar-date { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); }
.app-shell .studio-current-page { display: block; margin-top: 4px; font-size: 13px; color: var(--text); font-weight: 600; }
.app-shell .topbar-actions { gap: 10px; min-width: 0; }
.app-shell .topbar-divider { height: 26px; margin-inline: 5px; }
.app-shell .topbar-actions > .avatar { width: 38px; height: 38px; border-radius: 12px; color: var(--primary-text); background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border)); }
.studio-command-trigger { display: flex; align-items: center; gap: 9px; width: 240px; min-height: 42px; padding: 9px 12px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--border); border-radius: 10px; font-size: 11px; text-align: left; transition: border-color .16s, box-shadow .16s; }
.studio-command-trigger > svg { width: 17px; height: 17px; color: var(--subtle); }
.studio-command-trigger:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); box-shadow: 0 0 0 3px var(--primary-soft); }
.studio-command-trigger kbd { margin-left: auto; padding: 1px 5px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; font-family: inherit; font-size: 9px; color: var(--subtle); white-space: nowrap; }
.app-shell .studio-quick-create { min-height: 42px; }
.app-shell .main-content { max-width: 1740px; padding: 32px 34px 42px; }
.app-shell .page-heading { align-items: flex-end; gap: 20px; margin-bottom: 27px; }
.app-shell .page-heading > div:first-child { min-width: 0; }
.app-shell .page-heading h1 { font-size: clamp(27px, 2.4vw, 35px); line-height: 1.2; letter-spacing: -.045em; margin-bottom: 8px; }
.app-shell .page-heading .eyebrow { margin-bottom: 9px; font-size: 10px; letter-spacing: .15em; color: var(--primary-text); }
.app-shell .subtitle { font-size: 12px; line-height: 1.7; color: var(--muted); }
.app-shell .heading-actions { gap: 10px; flex-wrap: wrap; }
.app-shell .app-footer { padding: 0 34px 24px; font-size: 10px; color: var(--subtle); }
.app-shell .app-footer > span { color: var(--muted); }

/* Shared controls intentionally exclude the booking editor preview. */
:is(.app-shell, .auth-screen, .access-screen, .modal) .btn:not(.editor-preview *) { min-height: 44px; padding: 11px 16px; border-radius: 10px; font-size: 12px; font-weight: 600; line-height: 1.35; gap: 8px; }
:is(.app-shell, .auth-screen, .access-screen, .modal) .btn.primary:not(.editor-preview *) { background: var(--primary); color: var(--primary-ink); box-shadow: 0 4px 10px rgb(73 88 205 / 14%); }
:is(.app-shell, .auth-screen, .access-screen, .modal) .btn.primary:not(.editor-preview *):hover { background: var(--primary-hover); color: var(--primary-ink); box-shadow: 0 6px 18px rgb(73 88 205 / 22%); }
:is(.app-shell, .auth-screen, .access-screen, .modal) .btn.secondary:not(.editor-preview *) { color: var(--text); background: var(--surface); border-color: var(--border-strong); box-shadow: 0 2px 3px rgb(25 33 66 / 2%); }
:is(.app-shell, .auth-screen, .access-screen, .modal) .btn.secondary:not(.editor-preview *):hover { color: var(--primary-text); border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); background: var(--primary-soft); }
:is(.app-shell, .auth-screen, .access-screen, .modal) .btn.ghost:not(.editor-preview *) { color: var(--muted); box-shadow: none; }
:is(.app-shell, .auth-screen, .access-screen, .modal) .btn.ghost:not(.editor-preview *):hover { color: var(--primary-text); background: var(--primary-soft); }
:is(.app-shell, .auth-screen, .access-screen, .modal) .btn.small:not(.editor-preview *) { min-height: 36px; padding: 8px 11px; font-size: 11px; border-radius: 8px; }
:is(.app-shell, .auth-screen, .access-screen, .modal) .icon-button:not(.editor-preview *) { width: 40px; height: 40px; border-radius: 10px; }
:is(.app-shell, .auth-screen, .access-screen, .modal) .icon-button:not(.editor-preview *):hover { color: var(--primary-text); background: var(--primary-soft); }
.app-shell .topbar-actions .icon-button { min-width: 40px; }
.app-shell .search-box:not(.editor-preview *) { min-height: 44px; gap: 9px; padding: 10px 13px; border-radius: 10px; background: var(--surface); border-color: var(--border-strong); }
.app-shell .search-box input:not(.editor-preview *) { font-size: 12px; line-height: 1.5; }
.app-shell .search-box:focus-within:not(.editor-preview *) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.app-shell .search-box input:focus-visible { outline: none; }
:is(.app-shell, .auth-screen, .access-screen, .modal) .field label:not(.editor-preview *) { margin-bottom: 8px; font-size: 12px; font-weight: 600; }
:is(.app-shell, .auth-screen, .access-screen, .modal) .field input:not([type='checkbox'], [type='radio'], .editor-preview *),
:is(.app-shell, .auth-screen, .access-screen, .modal) .field select:not(.editor-preview *),
:is(.app-shell, .auth-screen, .access-screen, .modal) .field textarea:not(.editor-preview *) { min-height: 46px; padding: 11px 13px; border-radius: 10px; border-color: var(--border-strong); background: var(--surface); color: var(--text); font-size: 13px; }
:is(.app-shell, .auth-screen, .access-screen, .modal) .field input::placeholder,
:is(.app-shell, .auth-screen, .access-screen, .modal) .field textarea::placeholder { color: var(--subtle); font-size: inherit; }
:is(.app-shell, .auth-screen, .access-screen, .modal) .field input:focus:not(.editor-preview *),
:is(.app-shell, .auth-screen, .access-screen, .modal) .field select:focus:not(.editor-preview *),
:is(.app-shell, .auth-screen, .access-screen, .modal) .field textarea:focus:not(.editor-preview *) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
:is(.app-shell, .auth-screen, .access-screen, .modal) .field input[readonly]:not(.editor-preview *),
:is(.app-shell, .auth-screen, .access-screen, .modal) .field input:disabled:not(.editor-preview *),
:is(.app-shell, .auth-screen, .access-screen, .modal) .field select:disabled:not(.editor-preview *) { color: var(--muted); background: var(--surface-soft); }
:is(.app-shell, .auth-screen, .access-screen, .modal) .field.has-error input,
:is(.app-shell, .auth-screen, .access-screen, .modal) .field.has-error select,
:is(.app-shell, .auth-screen, .access-screen, .modal) .field.has-error textarea,
:is(.app-shell, .auth-screen, .access-screen, .modal) .field [aria-invalid='true'] { border-color: var(--red); }
:is(.app-shell, .auth-screen, .access-screen, .modal) .field-hint { font-size: 11px; margin-top: 7px; line-height: 1.65; }
:is(.app-shell, .auth-screen, .access-screen, .modal) .field-error { font-size: 12px; margin-top: 7px; }
:is(.app-shell, .auth-screen, .access-screen, .modal) .form-grid { gap: 20px; }
:is(.app-shell, .auth-screen, .access-screen, .modal) .form-section h3 { font-size: 13px; margin-bottom: 17px; }
:is(.app-shell, .access-screen, .modal) .setting-row { padding: 18px 0; }
:is(.app-shell, .access-screen, .modal) .setting-row strong { font-size: 12px; }
:is(.app-shell, .access-screen, .modal) .setting-row small { font-size: 11px; line-height: 1.6; }
:is(.app-shell, .modal) .setting-row input[type='checkbox'] { width: 19px; height: 19px; margin: 10px 0 10px 10px; }
:is(.app-shell, .access-screen, .modal) .notice { padding: 14px 16px; border-radius: 12px; font-size: 12px; line-height: 1.75; }
:is(.app-shell, .access-screen, .modal) .summary-box { padding: 17px 19px; border-radius: 12px; font-size: 12px; }
:is(.app-shell, .access-screen, .modal) .summary-box strong { font-size: 20px; }

/* The same card rhythm runs from the schedule to company settings. */
.app-shell :is(.panel, .detail-card, .service-card, .staff-card, .settings-card):not(.editor-preview *) { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.app-shell :is(.detail-card, .service-card, .staff-card, .settings-card):not(.editor-preview *) { padding: 25px; }
.app-shell .panel-heading { min-height: 76px; padding: 22px 24px 18px; gap: 14px; }
.app-shell .panel-heading h2 { font-size: 16px; letter-spacing: -.03em; }
.app-shell .panel-subtitle { font-size: 11px; line-height: 1.7; }
.app-shell .panel-heading .btn { margin-left: auto; }
.app-shell :is(.settings-card, .detail-card) > h2 { font-size: 18px; }
.app-shell :is(.settings-card, .detail-card) > h3 { font-size: 16px; }
.app-shell .settings-card > p { font-size: 12px; line-height: 1.75; margin-bottom: 24px; }
.app-shell .card-icon { width: 46px; height: 46px; border-radius: 14px; }
.app-shell .toolbar { gap: 14px; margin-bottom: 22px; }
.app-shell .toolbar .search-box { width: min(340px, 100%); }
.app-shell .toolbar select,
.app-shell .toolbar input[type='date'] { min-height: 44px; padding: 10px 12px; border-radius: 10px; border-color: var(--border-strong); font-size: 12px; }
.app-shell .view-toggle { gap: 3px; padding: 4px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft); }
.app-shell .view-toggle button { min-height: 35px; min-width: 48px; gap: 7px; padding: 8px 12px; border-radius: 8px; font-size: 11px; color: var(--muted); }
.app-shell .view-toggle button svg { width: 14px; height: 14px; }
.app-shell .view-toggle button:hover { color: var(--primary-text); background: var(--primary-soft); }
.app-shell .view-toggle button.active { color: var(--primary-text); background: var(--surface); box-shadow: 0 2px 7px rgb(24 36 72 / 8%); font-weight: 650; }
.app-shell .filter-chip { min-height: 36px; gap: 8px; padding: 8px 12px; border-radius: 9px; font-size: 11px; color: var(--muted); background: var(--surface); border-color: var(--border-strong); }
.app-shell .filter-chip:hover { color: var(--primary-text); border-color: var(--primary); }
.app-shell .filter-chip.active { color: var(--primary-text); border-color: color-mix(in srgb, var(--primary) 25%, var(--border)); background: var(--primary-soft); font-weight: 600; }
.app-shell .filter-chip .swatch { width: 7px; height: 7px; }
.app-shell .table-wrap { border-radius: 0 0 var(--radius) var(--radius); overscroll-behavior-x: contain; }
.app-shell table th { padding: 14px 22px; font-size: 10px; font-weight: 650; letter-spacing: .025em; background: var(--surface-soft); color: var(--muted); border-color: var(--border); }
.app-shell table td { padding: 18px 22px; font-size: 12px; border-color: var(--border); }
.app-shell table tbody tr { transition: background-color .15s ease; }
.app-shell table tbody tr:hover { background: var(--surface-soft); }
.app-shell .cell-main,
.app-shell .person-cell strong { font-size: 12px; font-weight: 600; }
.app-shell .cell-sub { font-size: 11px; margin-top: 4px; }
.app-shell .cell-profile .avatar { width: 36px; height: 36px; border-radius: 11px; font-size: 11px; }
.app-shell .cell-actions { gap: 4px; }
.app-shell .cell-actions .icon-button { width: 36px; height: 36px; }
.app-shell .cell-actions .icon-button svg { width: 16px; height: 16px; }
.app-shell .badge:not(.editor-preview *) { padding: 5px 9px; border-radius: 6px; font-size: 10px; font-weight: 550; }
.app-shell .badge.confirmed { color: #25745e; background: #e8f5ee; }
html[data-theme='dark'] .app-shell .badge.confirmed { color: #8bd6b5; background: #223e38; }
.app-shell .table-footer { padding: 17px 22px; gap: 12px; font-size: 11px; }
.app-shell .empty-state { padding: 68px 28px; }
.app-shell .empty-state > svg { width: 47px; height: 47px; padding: 10px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-text); margin-bottom: 16px; }
.app-shell .empty-state h3 { margin-bottom: 7px; font-size: 18px; }
.app-shell .empty-state p { max-width: 380px; font-size: 12px; line-height: 1.75; margin-bottom: 20px; }
.app-shell .loading-state { min-height: 250px; color: var(--muted); font-size: 13px; }
.app-shell .skeleton { border-radius: 10px; }

/* Dialogs retain native focus management and remain usable on short screens. */
dialog.modal { width: min(660px, calc(100% - 40px)); max-height: calc(100dvh - 48px); border-radius: 21px; border-color: var(--border-strong); box-shadow: 0 28px 100px rgb(12 20 48 / 28%); }
dialog.modal::backdrop { background: rgb(12 18 39 / 58%); backdrop-filter: blur(6px); }
dialog.modal .modal-heading { padding: 25px 28px 22px; }
dialog.modal .modal-heading h2 { margin-bottom: 5px; font-size: 22px; line-height: 1.3; letter-spacing: -.04em; }
dialog.modal .modal-heading p { font-size: 12px; line-height: 1.7; }
dialog.modal .modal-close { width: 40px; height: 40px; border-radius: 11px; }
dialog.modal .modal-close svg { width: 18px; height: 18px; }
dialog.modal .modal-body { padding: 25px 28px 28px; }
dialog.modal .modal-footer { padding: 18px 28px; gap: 10px; border-radius: 0 0 21px 21px; }
dialog.modal .modal-body .modal-footer { padding: 22px 0 0; margin-top: 25px; border-radius: 0; }
dialog.modal .detail-customer .avatar { border-radius: 14px; }
dialog.modal .detail-customer h3 { font-size: 18px; }
dialog.modal .detail-customer p { font-size: 12px; }
dialog.modal .service-checklist { padding: 18px; border-radius: 12px; gap: 10px 20px; }
dialog.modal .service-checklist legend { font-size: 12px; }
dialog.modal .service-checklist label { min-height: 32px; font-size: 12px; }
dialog.modal .service-checklist input { width: 17px; height: 17px; }
dialog.modal .detail-notes { padding: 15px 18px; border-radius: 0 9px 9px 0; font-size: 12px; line-height: 1.75; background: var(--surface-soft); }
.toast-container { z-index: 110; bottom: 26px; right: 28px; }
.toast { min-height: 56px; max-width: 420px; padding: 16px 19px; border-radius: 13px; font-size: 12px; line-height: 1.6; border-left-width: 4px; box-shadow: 0 12px 35px rgb(20 30 60 / 16%); }
.toast svg { width: 20px; height: 20px; }

/* An editorial welcome: authentic salon imagery and a focused sign-in form. */
.auth-screen { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); min-height: 100dvh; padding: 18px; gap: 18px; background: var(--bg); }
.auth-screen .auth-story,
html[data-theme='dark'] .auth-screen .auth-story {
  min-height: calc(100dvh - 36px);
  padding: 40px clamp(32px, 4vw, 68px) 32px;
  border-radius: 23px;
  background: linear-gradient(180deg, rgb(15 22 44 / 40%) 0%, rgb(15 22 44 / 65%) 35%, #141d37 88%), url('/assets/booking-studio.webp') 54% 35% / cover;
  color: #fff;
  isolation: isolate;
}
.auth-screen .auth-story::before { inset: 0; width: auto; height: auto; border: 0; border-radius: 23px; background: linear-gradient(110deg, rgb(45 43 91 / 30%), transparent 68%); pointer-events: none; }
.auth-screen .auth-story::after { width: 380px; height: 380px; top: auto; bottom: -240px; right: -110px; border: 1px solid rgb(155 169 255 / 24%); box-shadow: 0 0 0 85px rgb(155 169 255 / 3%), 0 0 0 165px rgb(155 169 255 / 2%); }
html[data-theme='dark'] .auth-screen .auth-story::after { border-color: rgb(155 169 255 / 24%); }
.auth-screen .auth-story .brand { color: #fff; gap: 13px; }
.auth-screen .auth-story .brand-name { font-size: 22px; }
.auth-screen .auth-story .brand-sub { color: #c1c9e4; font-size: 8px; letter-spacing: .15em; }
.auth-screen .auth-story > div:not(.brand) { max-width: 480px; padding: 100px 0 56px; }
.auth-screen .auth-story .eyebrow { width: fit-content; margin-bottom: 23px; padding: 7px 11px; border: 1px solid rgb(177 188 239 / 30%); border-radius: 6px; color: #d2d9ff; background: rgb(106 120 205 / 12%); font-size: 9px; font-weight: 600; letter-spacing: .15em; }
.auth-screen .auth-story h1 { color: #fff; font-size: clamp(38px, 4vw, 58px); line-height: 1.12; letter-spacing: -.055em; font-weight: 650; margin-bottom: 25px; }
.auth-screen .auth-story p,
html[data-theme='dark'] .auth-screen .auth-story p { max-width: 370px; color: #c7d0e9; font-size: 14px; line-height: 1.9; }
.auth-screen .auth-metrics,
html[data-theme='dark'] .auth-screen .auth-metrics { gap: 36px; margin-top: 34px; padding-top: 27px; border-color: rgb(181 195 243 / 22%); }
.auth-screen .auth-metric { flex: 1; min-width: 0; }
.auth-screen .auth-metric > svg { color: #aeb7ff; width: 24px; height: 24px; margin-bottom: 13px; }
.auth-screen .auth-metric strong { color: #eff2ff; font-size: 16px; font-weight: 600; }
.auth-screen .auth-metric span { color: #a9b6d6; font-size: 10px; line-height: 1.8; margin-top: 6px; }
.auth-screen .auth-story > small { color: #a4b2d4; font-size: 10px; letter-spacing: .02em; }
.auth-screen .auth-card { min-width: 0; width: 100%; max-width: 550px; padding: 60px clamp(26px, 4.5vw, 66px); }
.auth-screen .auth-card > .eyebrow { color: var(--primary-text); font-size: 10px; letter-spacing: .14em; margin-bottom: 15px; }
.auth-screen .auth-card h2 { font-size: clamp(28px, 2.5vw, 37px); line-height: 1.18; margin-bottom: 12px; letter-spacing: -.05em; }
.auth-screen .auth-card > p { font-size: 13px; line-height: 1.8; margin-bottom: 33px; }
.auth-screen .auth-card .field { margin-bottom: 22px; }
.auth-screen .auth-card .field input { min-height: 51px; background: var(--surface); border-radius: 11px; }
.auth-screen .auth-card .btn.primary { min-height: 51px; margin-top: 6px; font-size: 13px; border-radius: 11px; }
.auth-screen .btn { transition: box-shadow .16s, border-color .16s, transform .16s; }
.auth-screen .auth-card .auth-footer { font-size: 11px; line-height: 1.9; margin-top: 26px; margin-bottom: 0; }
.auth-screen .demo-note { margin-top: 30px; padding: 19px; border: 1px dashed var(--border-strong); border-radius: 13px; color: var(--muted); background: var(--surface); font-size: 12px; }
.auth-screen .demo-note strong { font-size: 12px; margin-bottom: 3px; }
.auth-screen .demo-note .btn { width: 100%; margin-top: 13px; }
.auth-screen .auth-tabs { border-radius: 11px; padding: 5px; }
.auth-screen .auth-tabs button { min-height: 42px; border-radius: 8px; font-size: 12px; }
.auth-screen .auth-card .form-grid { gap: 16px; }
.auth-screen .auth-card:has(#register-form) { max-width: 650px; padding-inline: clamp(22px, 3vw, 42px); }
.auth-screen #register-form .form-grid .field { margin-bottom: 7px; }

.access-screen { width: min(840px, calc(100% - 40px)); margin: 0 auto; min-height: 100dvh; padding: 70px 0; }
.access-screen > .brand { margin-bottom: 34px; }
.access-screen > .settings-card { padding: clamp(24px, 5vw, 46px); border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-raised); }
.access-screen h1 { margin: 12px 0 16px; font-size: clamp(27px, 4vw, 39px); line-height: 1.22; letter-spacing: -.05em; }
.access-screen p { font-size: 14px; line-height: 1.85; color: var(--muted); }
.access-screen .heading-actions { margin-top: 25px; flex-wrap: wrap; }

/* Layout responds before controls have to squeeze. */
@media (min-width: 761px) {
  .studio-shell.is-compact { --sidebar-width: 84px; }
  .studio-shell.is-compact .sidebar { padding: 25px 13px 18px; }
  .studio-shell.is-compact .studio-sidebar-head { flex-direction: column; gap: 13px; margin-bottom: 19px; }
  .studio-shell.is-compact .studio-sidebar-head .brand { flex: 0; padding: 0; }
  .studio-shell.is-compact .studio-sidebar-head .brand-mark { width: 40px; height: 40px; }
  .studio-shell.is-compact .studio-sidebar-head .brand > :not(.brand-mark),
  .studio-shell.is-compact .sidebar .workspace-picker,
  .studio-shell.is-compact .sidebar .studio-nav-label,
  .studio-shell.is-compact .sidebar .nav-label,
  .studio-shell.is-compact .sidebar .studio-nav-text,
  .studio-shell.is-compact .sidebar .public-link-card,
  .studio-shell.is-compact .sidebar .studio-plan-badge,
  .studio-shell.is-compact .sidebar .profile > div:not(.avatar) { display: none; }
  .studio-shell.is-compact .studio-sidebar-head .studio-rail-toggle { width: 36px; height: 32px; }
  .studio-shell.is-compact .studio-sidebar-head .studio-rail-toggle svg { transform: rotate(180deg); }
  .studio-shell.is-compact .sidebar .nav-item { justify-content: center; min-height: 47px; padding: 12px; gap: 0; font-size: 0; }
  .studio-shell.is-compact .sidebar .nav-item svg { width: 21px; height: 21px; }
  .studio-shell.is-compact .sidebar .nav-count { position: absolute; top: 5px; right: 4px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 5px; font-size: 8px; }
  .studio-shell.is-compact .sidebar .studio-nav-group + .studio-nav-group { margin-top: 18px; padding-top: 18px; border-top: 1px solid #2a3551; }
  .studio-shell.is-compact .sidebar .profile { flex-direction: column; gap: 9px; padding: 18px 0 0; }
  .studio-shell.is-compact .sidebar .profile .icon-button { margin: 0; }
}
@media (min-width: 1700px) {
  .app-shell .main-content { padding-inline: 46px; padding-top: 38px; }
  .app-shell .topbar { padding-inline: 46px; }
  .app-shell .app-footer { padding-inline: 46px; }
}
@media (max-width: 1280px) {
  :root { --sidebar-width: 232px; }
  .app-shell .sidebar { padding-inline: 14px; }
  .app-shell .sidebar .brand { padding-inline: 10px; }
  .app-shell .main-content { padding-inline: 26px; }
  .app-shell .topbar { padding-inline: 26px; }
  .studio-command-trigger { width: 200px; }
  .app-shell .page-heading { gap: 16px; }
  .app-shell .page-heading h1 { font-size: 30px; }
  .app-shell .app-footer { padding-inline: 26px; }
}
@media (max-width: 1100px) {
  .studio-command-trigger { width: 42px; min-width: 42px; justify-content: center; padding: 9px; }
  .studio-command-trigger > span, .studio-command-trigger kbd { display: none; }
  .app-shell .topbar-actions { gap: 7px; }
  .app-shell .page-heading { align-items: flex-start; }
  .app-shell .heading-actions { padding-top: 0; }
  .app-shell .page-heading .heading-actions .btn.secondary { display: inline-flex; }
  .auth-screen .auth-story { padding-inline: 32px; }
  .auth-screen .auth-story h1 { font-size: 44px; }
  .auth-screen .auth-card { padding-inline: 26px; }
}
@media (max-width: 900px) {
  :root { --sidebar-width: 224px; }
  .app-shell .main-content { padding: 28px 22px 36px; }
  .app-shell .topbar { height: 76px; padding-inline: 22px; }
  .app-shell .studio-quick-create { width: 42px; min-width: 42px; padding: 10px; }
  .studio-quick-create > span { display: none; }
  .app-shell .page-heading { flex-wrap: wrap; }
  .app-shell .page-heading .heading-actions { width: auto; }
  .app-shell .page-heading h1 { font-size: 29px; }
  .auth-screen { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 12px; gap: 10px; }
  .auth-screen .auth-story { min-height: calc(100dvh - 24px); padding: 31px 27px; border-radius: 19px; }
  .auth-screen .auth-story h1 { font-size: 38px; }
  .auth-screen .auth-story p { font-size: 13px; }
  .auth-screen .auth-metrics { gap: 18px; }
  .auth-screen .auth-metric strong { font-size: 13px; }
  .auth-screen .auth-card { padding: 40px 21px; }
  .auth-screen .auth-card h2 { font-size: 30px; }
  .auth-screen .auth-card:has(#register-form) .form-grid { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 760px) {
  .app-shell .sidebar { width: min(286px, calc(100vw - 44px)); padding: 28px 19px 22px; transform: translateX(-100%); z-index: 50; }
  .app-shell .sidebar.open { transform: translateX(0); box-shadow: 15px 0 70px rgb(8 15 39 / 35%); }
  .app-shell .sidebar .nav-item { min-height: 47px; font-size: 13px; }
  .app-shell .sidebar .workspace-picker select { min-height: 30px; }
  .app-shell .studio-sidebar-head .studio-rail-toggle { display: none; }
  .app-shell .studio-sidebar-head .studio-mobile-close { display: inline-flex; width: 44px; height: 44px; min-width: 44px; color: #bfcaf0; }
  .app-shell .studio-sidebar-head .studio-mobile-close:hover { color: #fff; background: #273351; }
  .app-shell .main-shell { margin-left: 0; }
  .app-shell .topbar { height: 72px; gap: 9px; padding: 0 16px; }
  .app-shell .topbar-title { gap: 9px; }
  .app-shell .mobile-menu { display: inline-flex; width: 40px; min-width: 40px; }
  .studio-breadcrumb { gap: 6px; font-size: 11px; }
  .studio-breadcrumb strong { font-size: 11px; }
  .studio-topbar-date { font-size: 9px; margin-top: 3px; }
  .app-shell .topbar-actions { gap: 5px; }
  .app-shell .topbar-divider { display: none; }
  .app-shell .topbar-actions > .avatar { display: none; }
  .app-shell .main-content { padding: 25px 20px 34px; }
  .app-shell .page-heading { gap: 17px; margin-bottom: 23px; }
  .app-shell .page-heading h1 { font-size: 30px; }
  .app-shell .subtitle { font-size: 12px; }
  .app-shell .page-heading .heading-actions { width: 100%; }
  .app-shell .app-footer { padding: 0 20px 24px; font-size: 9px; }
  .app-shell .toolbar .search-box { min-width: 0; flex-basis: 100%; }
  .app-shell .toolbar-filters { gap: 9px; }
  .app-shell :is(.settings-card, .service-card, .staff-card, .detail-card) { padding: 22px; }
  .app-shell .panel-heading { min-height: 70px; padding: 20px; }
  .app-shell table th { padding: 13px 18px; }
  .app-shell table td { padding: 16px 18px; }
  .app-shell .cell-actions .icon-button { width: 44px; height: 44px; }
  .app-shell .view-toggle button { min-height: 44px; }
  .app-shell .filter-chip { min-height: 44px; }
  .app-shell .table-footer { padding: 17px 18px; flex-wrap: wrap; }
  .app-shell .overlay { background: rgb(10 17 37 / 55%); backdrop-filter: blur(5px); }
  :is(.app-shell, .auth-screen, .access-screen, .modal) .btn.small:not(.editor-preview *) { min-height: 44px; }
  .app-shell .topbar-actions .icon-button,
  .app-shell .mobile-menu { width: 44px; min-width: 44px; height: 44px; }
  .studio-command-trigger { width: 44px; min-width: 44px; height: 44px; }
  .app-shell .studio-quick-create { width: 44px; min-width: 44px; height: 44px; }
  .app-shell input:not([type='checkbox']):not([type='radio']):not(.editor-preview *),
  .app-shell select:not(.editor-preview *),
  .app-shell textarea:not(.editor-preview *),
  .auth-screen input:not([type='checkbox']):not([type='radio']),
  .auth-screen select, .auth-screen textarea,
  .access-screen input:not([type='checkbox']):not([type='radio']),
  .access-screen select, .access-screen textarea,
  dialog.modal input:not([type='checkbox']):not([type='radio']),
  dialog.modal select, dialog.modal textarea { font-size: 16px !important; }
  .auth-screen { display: flex; flex-direction: column; padding: 12px; gap: 0; }
  .auth-screen .auth-story,
  html[data-theme='dark'] .auth-screen .auth-story { min-height: 310px; padding: 26px 28px 30px; border-radius: 18px; background-position: center, center 45%; }
  .auth-screen .auth-story .brand { margin-bottom: 0; }
  .auth-screen .auth-story .brand-name { font-size: 20px; }
  .auth-screen .auth-story .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .auth-screen .auth-story > div:not(.brand) { padding: 42px 0 0; max-width: 530px; }
  .auth-screen .auth-story .eyebrow { display: none; }
  .auth-screen .auth-story h1 { font-size: 36px; margin-bottom: 15px; }
  .auth-screen .auth-story p { max-width: 430px; font-size: 12px; line-height: 1.75; margin-bottom: 0; }
  .auth-screen .auth-metrics, .auth-screen .auth-story > small { display: none; }
  .auth-screen .auth-card { max-width: 530px; padding: 36px 22px 33px; }
  .auth-screen .auth-card > .eyebrow { margin-bottom: 12px; font-size: 9px; }
  .auth-screen .auth-card h2 { font-size: 29px; }
  .auth-screen .auth-card > p { font-size: 12px; margin-bottom: 28px; }
  .auth-screen .auth-card .field { margin-bottom: 19px; }
  .auth-screen .auth-card:has(#register-form) { max-width: 560px; padding-inline: 22px; }
  .auth-screen .auth-card:has(#register-form) .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .access-screen { width: calc(100% - 32px); padding-top: 35px; }
  .access-screen .heading-actions { gap: 9px; }
}
@media (max-width: 480px) {
  .app-shell .topbar { padding-inline: 10px; gap: 4px; }
  .app-shell .topbar-title { gap: 4px; }
  .studio-breadcrumb > span:first-child:not(:last-child),
  .studio-breadcrumb > svg { display: none; }
  .studio-topbar-date { display: none; }
  .app-shell .topbar-actions { gap: 2px; }
  .app-shell .studio-quick-create { display: none; }
  .app-shell .main-content { padding: 23px 16px 32px; }
  .app-shell .page-heading h1 { font-size: 28px; line-height: 1.22; }
  .app-shell .page-heading .eyebrow { font-size: 9px; margin-bottom: 8px; }
  .app-shell .page-heading .heading-actions { gap: 8px; flex-wrap: wrap; }
  .app-shell .heading-actions .btn { font-size: 11px; padding: 11px 13px; }
  .app-shell .page-heading .heading-actions .btn.primary { flex-grow: 1; }
  .app-shell .app-footer { padding-inline: 16px; font-size: 9px; line-height: 1.7; }
  .app-shell :is(.settings-card, .service-card, .staff-card, .detail-card) { padding: 20px; border-radius: 17px; }
  .app-shell .panel { border-radius: 17px; }
  .app-shell .panel-heading { padding: 20px 18px; gap: 10px; }
  .app-shell .panel-heading h2 { font-size: 15px; }
  .app-shell .panel-heading .btn { padding-inline: 10px; font-size: 10px; }
  .app-shell .toolbar-filters { width: 100%; }
  .app-shell .toolbar-filters > select,
  .app-shell .toolbar-filters > input { min-width: 0; flex: 1; }
  .app-shell .table-footer { padding-inline: 18px; font-size: 10px; }
  :is(.app-shell, .auth-screen, .access-screen, .modal) .form-grid { grid-template-columns: 1fr; gap: 18px; }
  :is(.app-shell, .auth-screen, .access-screen, .modal) .form-grid > .full { grid-column: auto; }
  :is(.app-shell, .access-screen, .modal) .summary-box { padding: 15px; flex-wrap: wrap; }
  :is(.app-shell, .access-screen, .modal) .setting-row { gap: 16px; }
  dialog.modal { width: calc(100% - 20px); max-height: calc(100dvh - 24px); border-radius: 18px; }
  dialog.modal .modal-heading { padding: 21px 20px 18px; }
  dialog.modal .modal-heading h2 { font-size: 20px; }
  dialog.modal .modal-heading p { font-size: 11px; }
  dialog.modal .modal-close { width: 44px; height: 44px; }
  dialog.modal .modal-body { padding: 21px 20px 24px; }
  dialog.modal .modal-footer { padding: 17px 20px; flex-wrap: wrap; }
  dialog.modal .modal-footer .btn { flex: 1; }
  dialog.modal .detail-customer { flex-wrap: wrap; }
  .toast-container { right: 14px; left: 14px; bottom: 16px; align-items: stretch; }
  .toast { max-width: none; font-size: 12px; padding: 14px 16px; }
  .auth-screen { padding: 9px; }
  .auth-screen .auth-story,
  html[data-theme='dark'] .auth-screen .auth-story { min-height: 289px; padding: 24px 24px 26px; }
  .auth-screen .auth-story > div:not(.brand) { padding-top: 36px; }
  .auth-screen .auth-story h1 { font-size: 33px; letter-spacing: -.05em; }
  .auth-screen .auth-story p { font-size: 12px; }
  .auth-screen .auth-card { padding: 32px 19px; }
  .auth-screen .auth-card h2 { font-size: 27px; }
  .auth-screen .auth-card:has(#register-form) { padding-inline: 19px; }
  .auth-screen .auth-card:has(#register-form) .form-grid { grid-template-columns: 1fr; gap: 0; }
  .auth-screen .demo-note { padding: 17px; }
  .access-screen > .settings-card { padding: 25px 21px; border-radius: 20px; }
  .access-screen .heading-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell *, .auth-screen *, .access-screen *, dialog.modal *, .toast { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .app-shell .sidebar, .app-shell .topbar { display: none !important; }
  .app-shell .main-shell { margin-left: 0; }
  .app-shell .main-content { padding: 0; }
}
