/* Shared Randevunolsun visual language. Tenant booking themes keep their own palette. */
body:has(.app-shell, .auth-screen, .access-screen) {
  --bg: var(--brand-paper);
  --surface: #fff;
  --surface-soft: #f3f6ee;
  --surface-hover: #eaf1e4;
  --text: var(--brand-ink);
  --muted: var(--brand-muted);
  --subtle: #718176;
  --border: var(--brand-line);
  --border-strong: #cfdacb;
  --primary: var(--brand-forest);
  --primary-hover: var(--brand-forest-hover);
  --primary-soft: var(--brand-soft);
  --primary-text: #315d42;
  --primary-ink: #fff;
  --shadow: var(--brand-shadow);
  --shadow-raised: var(--brand-shadow-raised);
  --radius: var(--brand-radius);
  --font: var(--brand-font);
  --studio-sidebar: var(--brand-forest);
  --studio-sidebar-soft: #234c3e;
  --studio-sidebar-text: #cfddd0;
  --studio-focus: #79a34c;
}
html[data-theme='dark'] body:has(.app-shell, .auth-screen, .access-screen) {
  --bg: #101b17;
  --surface: #192820;
  --surface-soft: #203328;
  --surface-hover: #2b4231;
  --text: #eef4e9;
  --muted: #adbdad;
  --subtle: #92a58f;
  --border: #304735;
  --border-strong: #49614a;
  --primary: var(--brand-lime);
  --primary-hover: #def6ad;
  --primary-soft: #2c432a;
  --primary-text: #d2e8ad;
  --primary-ink: #173728;
  --shadow: 0 8px 32px rgb(0 0 0 / 10%);
  --shadow-raised: 0 20px 60px rgb(0 0 0 / 24%);
  --studio-sidebar: #142e25;
  --studio-sidebar-soft: #234333;
  --studio-focus: #a7d76b;
}

/* The same forest-green rail identifies the firm and management workspaces. */
.app-shell .sidebar { background: var(--studio-sidebar); scrollbar-color: #56745b transparent; }
.app-shell .sidebar .brand-sub { color: #b2c7b3; }
.app-shell .sidebar .workspace-picker, .app-shell .platform-workspace {
  border-color: #41614c; background: #234c3e; border-radius: 14px;
}
.app-shell .sidebar .workspace-picker label, .app-shell .sidebar .workspace-picker select + select,
.app-shell .platform-workspace small { color: #c6d6c6; }
.app-shell .sidebar .workspace-picker select, .app-shell .platform-workspace strong { color: #f7f8f2; }
.app-shell .sidebar .workspace-picker select option { background: var(--brand-forest); color: #fff; }
.app-shell .platform-workspace > span { color: var(--brand-lime); }
.app-shell .sidebar .nav-label, .app-shell .studio-nav-label { color: #b0c7b4; letter-spacing: .12em; }
.app-shell .sidebar .nav-item { color: #d1dfd1; min-height: 46px; border-radius: 12px; font-size: 12px; }
.app-shell .sidebar .nav-item svg { color: #b2c9b7; }
.app-shell .sidebar .nav-item:hover { color: #fff; background: #2d5442; }
.app-shell .sidebar .nav-item:hover svg { color: #e5f0d5; }
.app-shell .sidebar .nav-item.active { background: var(--brand-lime); color: var(--brand-forest); box-shadow: none; }
.app-shell .sidebar .nav-item.active svg { color: var(--brand-forest); }
.app-shell .sidebar .nav-count { background: #3c624a; color: #ecf4dc; }
.app-shell .sidebar .nav-item.active .nav-count { background: rgb(22 59 50 / 12%); color: var(--brand-forest); }
.app-shell .sidebar .public-link-card { background: #234c3e; border-color: #41614c; border-radius: 15px; }
.app-shell .sidebar .public-link-card > svg { color: var(--brand-lime); }
.app-shell .sidebar .public-link-card > strong, .app-shell .sidebar .public-link-card h3,
.app-shell .platform-sidebar-note strong { color: #f7f8f2; }
.app-shell .sidebar .public-link-card p, .app-shell .platform-sidebar-note p { color: #c3d5c1; }
.app-shell .sidebar .public-link-card .btn { color: #f7f8f2; background: #355d47; border-color: #527354; }
.app-shell .sidebar .public-link-card .btn:hover { background: #436d50; }
.app-shell .platform-sidebar-note > svg { color: var(--brand-lime); }
.app-shell .sidebar .profile { border-color: #3f5e49; }
.app-shell .sidebar .profile strong { color: #f7f8f2; }
.app-shell .sidebar .profile small { color: #bdd0bb; }
.app-shell .sidebar .profile .avatar { background: #3a6148; border-color: #577953; color: #e9f7cc; }
.app-shell .sidebar .profile .icon-button, .app-shell .studio-sidebar-head .studio-rail-toggle,
.app-shell .studio-sidebar-head .studio-mobile-close { color: #d0e0c8; }
.app-shell .sidebar .profile .icon-button:hover, .app-shell .studio-sidebar-head .studio-rail-toggle:hover,
.app-shell .studio-sidebar-head .studio-mobile-close:hover { background: #32563f; color: #fff; }
.studio-plan-badge { color: #bdd0bb; }
.studio-plan-badge strong { background: #304e34; border-color: #56744c; color: #e2f4bb; }
.studio-shell.is-compact .sidebar .studio-nav-group + .studio-nav-group { border-color: #3a5945; }

.app-shell .topbar { border-bottom-color: var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.app-shell .topbar .search-box, .app-shell .studio-command-trigger { background: var(--surface); border-color: var(--border-strong); }
.app-shell .topbar-actions > .avatar { border-radius: 50%; }
.app-shell .main-content { max-width: 1920px; margin-inline: auto; width: 100%; }
.app-shell .page-heading h1 { letter-spacing: -.045em; }
.app-shell :is(.panel, .settings-card, .stat-card, .platform-plan-card) { box-shadow: var(--shadow); border-color: var(--border); }
.app-shell :is(.panel, .settings-card, .platform-plan-card) { border-radius: var(--brand-radius); }
.app-shell .stat-card { border-radius: 16px; }
.app-shell .table-wrap { max-width: 100%; overscroll-behavior-x: contain; }
.app-shell table th { color: var(--muted); }
.app-shell .app-footer { gap: 12px; flex-wrap: wrap; color: var(--muted); border-top: 1px solid var(--border); }
:is(.app-shell, .auth-screen, .access-screen, .modal) .btn.primary:not(.editor-preview *) { box-shadow: 0 4px 12px rgb(22 59 50 / 10%); }
:is(.app-shell, .auth-screen, .access-screen, .modal) .btn.primary:not(.editor-preview *):hover { box-shadow: 0 6px 18px rgb(22 59 50 / 15%); }
:is(.app-shell, .auth-screen, .access-screen, .modal) :is(.btn, .field input, .field select, .field textarea):not(.editor-preview *) { border-radius: var(--brand-control-radius); }
.studio-shell .studio-overview-hero { background: var(--brand-forest); box-shadow: none; border: 1px solid #345845; }
.studio-shell .studio-overview-hero::before, .studio-shell .studio-overview-hero::after { border-color: rgb(206 239 131 / 16%); }
.studio-shell .studio-overview-hero .eyebrow { color: #d5efad; }
.studio-shell .studio-overview-hero h2 { color: #f7f8f2; }
.studio-shell .studio-overview-hero-copy p { color: #d1dfcb; }
.studio-shell .studio-overview-pill { color: #e0efc6; }
.studio-shell .studio-overview-pill i { background: var(--brand-lime); box-shadow: 0 0 0 4px rgb(206 239 131 / 10%); }
.studio-shell .studio-overview-orbit { border-color: rgb(206 239 131 / 16%); box-shadow: 0 0 0 45px rgb(206 239 131 / 4%), 0 0 0 90px rgb(206 239 131 / 2%); }
.studio-shell .studio-overview-next { border-color: #577151; }
.studio-shell .studio-overview-next > span { color: #d9e7cb; }
.studio-shell .studio-overview-next strong small { color: #c9dabe; }
.studio-shell .studio-overview-next p { color: #d1dfcb; }
.studio-shell .studio-overview-next .btn { color: var(--brand-forest); background: var(--brand-lime); border-color: var(--brand-lime); }
.studio-shell .studio-overview-next .btn:hover { color: var(--brand-forest); background: #e0f5b4; border-color: #e0f5b4; }
.studio-shell .studio-overview-share { background: var(--surface-soft); border-color: var(--border-strong); }
.studio-shell .studio-overview-share > svg { color: var(--primary-text); }
.studio-skip { background: var(--primary); color: var(--primary-ink); }
.studio-skip:focus { color: var(--primary-ink); }

/* Account entry continues the public site's typography, materials and spacing. */
.auth-screen { padding: 20px; gap: 0; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--bg); }
.auth-screen .auth-story, html[data-theme='dark'] .auth-screen .auth-story {
  min-height: calc(100dvh - 40px); padding: 40px clamp(28px, 4vw, 64px); border-radius: 24px;
  background: linear-gradient(180deg, rgb(22 59 50 / 64%), rgb(22 59 50 / 91%) 58%, #163b32), url('/assets/booking-studio.webp') center / cover;
}
.auth-screen .auth-story::before { background: none; }
.auth-screen .auth-story::after, html[data-theme='dark'] .auth-screen .auth-story::after { border-color: rgb(206 239 131 / 30%); box-shadow: 0 0 0 85px rgb(206 239 131 / 4%), 0 0 0 165px rgb(206 239 131 / 3%); }
.auth-screen .auth-story .brand-sub { color: #cfdec8; }
.auth-screen .auth-story > .auth-story-content { max-width: 470px; padding: 70px 0 55px; }
.auth-screen .auth-story .eyebrow { border: 1px solid #839c69; color: #e3f4bf; background: rgb(22 59 50 / 40%); padding: 8px 12px; border-radius: 100px; font-size: 9px; letter-spacing: .12em; }
.auth-screen .auth-story h1 { font-size: clamp(40px, 4.4vw, 66px); line-height: 1.08; font-weight: 650; }
.auth-screen .auth-story h1 > span { color: var(--brand-lime); }
.auth-screen .auth-story p, html[data-theme='dark'] .auth-screen .auth-story p { color: #d4e1cd; max-width: 400px; line-height: 1.85; }
.auth-screen .auth-metrics, html[data-theme='dark'] .auth-screen .auth-metrics { border-color: #67805b; gap: 24px; padding-top: 24px; margin-top: 34px; }
.auth-screen .auth-metric > svg { color: var(--brand-lime); }
.auth-screen .auth-metric strong { color: #f7f8f2; font-size: 15px; }
.auth-screen .auth-metric span, .auth-screen .auth-story > small { color: #d2dfc7; }
.auth-screen .auth-card { max-width: 560px; padding: 48px clamp(28px, 4.5vw, 64px); }
.auth-screen .auth-card h2 { font-size: clamp(29px, 2.5vw, 37px); color: var(--text); line-height: 1.18; }
.auth-screen .auth-card > p { line-height: 1.8; }
.auth-screen .auth-card .btn.primary { color: var(--primary-ink); background: var(--primary); border-color: var(--primary); min-height: 52px; }
.auth-screen .auth-card .btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.auth-screen .auth-card .field input { min-height: 52px; background: var(--surface); }
.auth-entry-label { display: flex; align-items: center; gap: 9px; color: var(--primary-text); font-size: 11px; font-weight: 600; margin-bottom: 24px; }
.auth-entry-label > svg { width: 18px; height: 18px; }
.auth-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 22px; margin-top: 24px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.auth-switch .btn { flex-shrink: 0; }
.auth-screen .auth-home { margin-top: 28px; width: fit-content; color: var(--muted); text-decoration: none; }
.auth-home:hover { color: var(--primary-text); text-decoration: underline; text-underline-offset: 4px; }
.auth-platform-link { margin-top: 17px; color: var(--muted); font-size: 11px; width: fit-content; }
.auth-platform-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.auth-screen .demo-note { background: var(--surface-soft); border-style: solid; margin-top: 24px; }
.auth-screen .auth-card .auth-footer { display: flex; align-items: flex-start; justify-content: center; gap: 8px; text-align: left; margin-top: 23px; font-size: 11px; }
.auth-footer svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--primary-text); }
.auth-screen .signup-plans { border-radius: 15px; background: var(--surface-soft); border-color: var(--border); }
.auth-screen .signup-plan { border-radius: 12px; background: var(--surface); }
.auth-screen .signup-plan:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
.auth-screen .signup-plan strong { color: var(--text); }
.auth-screen .signup-plan small { color: var(--muted); }

@media (max-width: 1100px) {
  .auth-screen .auth-story h1 { font-size: 46px; }
  .auth-screen .auth-story { padding-inline: 32px; }
  .auth-screen .auth-card { padding-inline: 28px; }
  .auth-screen .auth-metric strong { font-size: 13px; }
}
@media (max-width: 760px) {
  .app-shell .sidebar { padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .app-shell .sidebar .nav-item { min-height: 48px; }
  .app-shell .topbar { padding-inline: 16px; }
  .app-shell .main-content { padding-inline: 16px; }
  .app-shell .app-footer { padding: 20px 16px max(25px, env(safe-area-inset-bottom)); }
  .app-shell .topbar-title { min-width: 0; }
  .platform-shell .topbar-title > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-shell :is(input, select, textarea):not([type=checkbox], [type=radio]) { font-size: 16px; }
  .auth-screen { padding: 12px; }
  .auth-screen .auth-story, html[data-theme='dark'] .auth-screen .auth-story { min-height: auto; padding: 25px 25px 27px; border-radius: 20px; }
  .auth-screen .auth-story > .auth-story-content { padding: 29px 0 0; }
  .auth-screen .auth-story h1 { font-size: clamp(32px, 7vw, 44px); margin-bottom: 12px; }
  .auth-screen .auth-story p { font-size: 12px; max-width: 480px; margin: 0; }
  .auth-screen .auth-story .brand-name { font-size: 22px; }
  .auth-screen .auth-card, .auth-screen .auth-card:has(#register-form) { max-width: 560px; padding: 32px 16px 42px; }
  .auth-screen .auth-card h2 { font-size: 29px; }
  .auth-screen .auth-card > p { font-size: 13px; margin-bottom: 25px; }
  .auth-screen .auth-card input:not([type=radio],[type=checkbox]) { font-size: 16px; }
  .auth-entry-label { margin-bottom: 17px; }
  .auth-screen .auth-card .auth-footer { justify-content: flex-start; }
  .auth-switch { margin-top: 22px; padding-top: 16px; flex-wrap: wrap; gap: 4px 10px; }
}
@media (max-width: 390px) {
  .auth-screen { padding: 8px; }
  .auth-screen .auth-story, html[data-theme='dark'] .auth-screen .auth-story { padding: 23px 21px; }
  .auth-screen .auth-card, .auth-screen .auth-card:has(#register-form) { padding-inline: 13px; }
  .app-shell .main-content { padding-inline: 12px; }
  .app-shell .topbar { padding-inline: 12px; }
}
@media (max-width: 360px) {
  /* Keep currency amounts together on narrow phones by giving each metric a full row. */
  .studio-shell .stats-grid, .workspace-v2 .v2-metrics { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-screen *, .app-shell * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
