/* The top bar and My Hair on the standard salon page's design (11-03).
   One type scale (Inter, headings 750 and tight, names 650), the page's ink,
   muted and violet, white cards on soft violet shadows instead of grey
   borders on a faint violet ground, pill buttons (the brand gradient for the
   main action, soft violet for the rest), glass bars, and quick, quiet
   motion: cards lift under the pointer, presses give, and a sub-tab rises in
   once. It only restyles; every page keeps its markup and behaviour.
   Loads after the older customer layers. */

:root {
  --rf-ink: #1d1a24;
  --rf-text: #24212b;
  --rf-muted: #6d6778;
  --rf-soft-text: #4b4556;
  --rf-ground: #fbf9ff;
  --rf-band: #f7f6fa;
  --rf-line: #ebe7f3;
  --rf-line-soft: #f0edf5;
  --rf-violet: #6a48d0;
  --rf-violet-ink: #5236b3;
  --rf-violet-soft: #f4f0fd;
  --rf-violet-soft-2: #ebe3fc;
  --rf-violet-line: #d9cdf8;
  --rf-gradient: linear-gradient(135deg, #4fcfa9 0%, #5468d6 22%, #7a52dd 62%, #6a48d0 100%);
  --rf-shadow: 0 1px 2px rgba(29, 26, 36, 0.05), 0 12px 32px -18px rgba(82, 54, 179, 0.2);
  --rf-shadow-hover: 0 1px 2px rgba(29, 26, 36, 0.06), 0 20px 42px -20px rgba(82, 54, 179, 0.36);
  --rf-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Top bar: a glass bar, the tabs in one pill, Book in the gradient ---- */
html body.customer-mode .customer-topbar {
  border-bottom: 1px solid rgba(235, 231, 243, 0.9);
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
html body.customer-mode .customer-topbar .primary-nav {
  border: 1px solid rgba(199, 182, 230, 0.32);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px -14px rgba(82, 54, 179, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
html body.customer-mode .customer-topbar .primary-nav .nav-link {
  color: #686270;
  font-weight: 650;
  letter-spacing: -0.005em;
}
html body.customer-mode .customer-topbar .primary-nav .nav-link:hover { color: var(--rf-ink); }
html body.customer-mode .customer-topbar .primary-nav .nav-link:hover .icon { transform: translateY(-1px); }
html body.customer-mode .customer-topbar .primary-nav .nav-link.active { color: var(--rf-violet-ink); font-weight: 700; }
html body.customer-mode .customer-topbar .primary-nav .nav-link.active .icon { color: var(--rf-violet); }
html body.customer-mode .customer-topbar .nav-glider {
  background: var(--rf-violet-soft);
  box-shadow: inset 0 0 0 1px var(--rf-violet-soft-2), 0 6px 16px -12px rgba(82, 54, 179, 0.45);
}
html body.customer-mode .customer-topbar .user-chip {
  border: 1px solid var(--rf-line);
  border-radius: 999px;
  background: #fff;
  color: var(--rf-ink);
  font-weight: 650;
  box-shadow: 0 4px 16px rgba(36, 33, 43, 0.06);
}
html body.customer-mode .customer-topbar .user-chip:hover { border-color: var(--rf-violet-line); box-shadow: 0 10px 24px -14px rgba(82, 54, 179, 0.45); }
html body.customer-mode .customer-topbar .user-chip img,
html body.customer-mode .customer-topbar .user-chip .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--rf-violet-soft-2); }
html body.customer-mode .customer-topbar .top-actions .outline-button.customer {
  border-color: var(--rf-line);
  border-radius: 999px;
  background: #fff;
  color: var(--rf-text);
  font-weight: 650;
}

/* The brand gradient on the app's main actions: the top bar's Book and My
   Hair's Book appointment carry a soft light that crosses them now and then,
   like the salon page's Book now. */
html body.customer-mode :is(.customer-topbar .top-actions .solid-button.customer, .me-rail-footer .solid-button.customer) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--rf-gradient);
  background-size: 140% 100%;
  background-position: 0% 50%;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(40, 24, 96, 0.25);
  box-shadow: 0 12px 26px -14px rgba(106, 72, 208, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: background-position 600ms var(--rf-ease), box-shadow 220ms ease, transform 120ms ease;
}
html body.customer-mode :is(.customer-topbar .top-actions .solid-button.customer, .me-rail-footer .solid-button.customer)::after {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: -40%;
  z-index: -1;
  width: 34%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.08) 30%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.08) 70%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(0) skewX(-20deg);
  animation: rf-sheen 6.4s cubic-bezier(0.45, 0, 0.25, 1) 2s infinite;
  pointer-events: none;
}
html body.customer-mode :is(.customer-topbar .top-actions .solid-button.customer, .me-rail-footer .solid-button.customer):hover {
  background-position: 100% 50%;
  box-shadow: 0 18px 32px -14px rgba(106, 72, 208, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
html body.customer-mode :is(.customer-topbar .top-actions .solid-button.customer, .me-rail-footer .solid-button.customer):hover::after { animation: rf-sheen-now 900ms cubic-bezier(0.45, 0, 0.25, 1) both; }
html body.customer-mode :is(.customer-topbar .top-actions .solid-button.customer, .me-rail-footer .solid-button.customer):active { transform: scale(0.97); }
@keyframes rf-sheen {
  0% { transform: translateX(0) skewX(-20deg); opacity: 0; }
  4% { opacity: 1; }
  24% { transform: translateX(520%) skewX(-20deg); opacity: 1; }
  25%, 100% { transform: translateX(520%) skewX(-20deg); opacity: 0; }
}
@keyframes rf-sheen-now {
  from { transform: translateX(0) skewX(-20deg); opacity: 1; }
  to { transform: translateX(520%) skewX(-20deg); opacity: 1; }
}

/* ---- My Hair: the frame ------------------------------------------------ */
html body.me-workspace-mode,
html body.me-workspace-mode :is(#app, .app-shell, .customer-shell, .page-wrap) {
  --native-ground: var(--rf-ground);
  background-color: var(--rf-ground);
}
html body.me-workspace-mode .me-dashboard {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--rf-text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
html body.me-workspace-mode .me-dashboard :is(h1, h2, h3, h4, p, button, a, input, select, textarea, label, strong, span, small) { font-family: inherit; }

/* The rail: a glass card of its own. */
html body.me-workspace-mode .me-account-rail {
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 2px rgba(29, 26, 36, 0.05), 0 28px 60px -34px rgba(82, 54, 179, 0.4);
}
html body.me-workspace-mode .me-rail-profile strong { color: var(--rf-ink); font-size: 15px; font-weight: 750; letter-spacing: -0.01em; }
html body.me-workspace-mode .me-rail-profile span { overflow: visible; color: var(--rf-muted); font-size: 12px; font-weight: 550; text-overflow: clip; white-space: normal; }
html body.me-workspace-mode .me-rail-avatar { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--rf-violet-soft-2), 0 10px 22px -12px rgba(82, 54, 179, 0.5); }
html body.me-workspace-mode .me-rail-group-title { color: var(--rf-violet-ink); font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
html body.me-workspace-mode .me-rail-nav button {
  border-radius: 14px;
  color: #5d5767;
  font-size: 15px;
  font-weight: 620;
  transition: color 180ms ease, background-color 180ms ease, transform 160ms ease;
}
html body.me-workspace-mode .me-rail-nav button .icon { transition: color 180ms ease, transform 260ms var(--rf-ease); }
html body.me-workspace-mode .me-rail-nav button:not(.active):hover { color: var(--rf-ink); background: rgba(244, 240, 253, 0.55); }
html body.me-workspace-mode .me-rail-nav button:not(.active):hover .icon { color: var(--rf-violet); transform: translateX(2px); }
html body.me-workspace-mode .me-rail-nav button:active { transform: scale(0.98); }
html body.me-workspace-mode .me-rail-nav button.active:not(.me-rail-pro-link) { color: var(--rf-violet-ink); font-weight: 700; }
html body.me-workspace-mode .me-rail-nav > .nav-glider {
  border-radius: 14px;
  background: var(--rf-violet-soft);
  box-shadow: inset 3px 0 0 #8a6fe6;
}
html body.me-workspace-mode .me-rail-nav button b {
  min-width: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--rf-gradient);
  color: #fff;
  font-size: 11.5px;
  font-weight: 750;
  box-shadow: 0 6px 14px -8px rgba(106, 72, 208, 0.8);
}
html body.me-workspace-mode .me-rail-pro-link { border-color: var(--rf-violet-line) !important; background: linear-gradient(135deg, rgba(143, 247, 210, 0.12), rgba(145, 107, 232, 0.1)) !important; }
html body.me-workspace-mode .me-rail-footer { border-top-color: var(--rf-line-soft); }

/* ---- Type ------------------------------------------------------------ */
html body.me-workspace-mode .me-workspace :is(.eyebrow, .me-page-eyebrow) {
  color: var(--rf-violet-ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
html body.me-workspace-mode .me-workspace h1 {
  color: var(--rf-ink);
  font-size: clamp(34px, 3.4vw, 44px);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
html body.me-workspace-mode .me-workspace h2:not(.me-native-group > h2) {
  color: var(--rf-ink);
  font-size: 24px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
html body.me-workspace-mode .me-workspace h3:not(.customer-appointment-feature-when) { color: var(--rf-ink); font-weight: 750; letter-spacing: -0.01em; }
html body.me-workspace-mode .me-workspace h3.me-date-rule { color: var(--rf-ink); font-size: 14px; font-weight: 750; }
html body.me-workspace-mode .me-workspace p { color: inherit; }
/* The phone home's group labels stay small capitals, in the kicker violet. */
html body.me-workspace-mode .me-workspace .me-native-group > h2 { color: var(--rf-violet-ink); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---- Cards: white on soft violet shadows; inner rows a hairline -------- */
html body.me-workspace-mode .me-workspace :is(
  .me-content-section,
  .me-featured-services,
  .me-looks-feature,
  .me-settings-panel,
  .me-kpi,
  .customer-chats-layout
) {
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--rf-shadow);
}
html body.me-workspace-mode .me-workspace .me-kpi { border-radius: 20px; transition: box-shadow 260ms ease, transform 320ms var(--rf-ease); }
html body.me-workspace-mode .me-workspace .me-kpi:hover { box-shadow: var(--rf-shadow-hover); transform: translateY(-2px); }
html body.me-workspace-mode .me-workspace .me-kpi :is(.icon, svg) { color: var(--rf-violet); }
html body.me-workspace-mode .me-workspace .me-kpi strong { color: var(--rf-ink); font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
html body.me-workspace-mode .me-workspace .me-booking-feature {
  border: 0;
  border-radius: 22px;
  box-shadow: 0 1px 2px rgba(29, 26, 36, 0.05), 0 22px 50px -26px rgba(82, 54, 179, 0.38);
}
html body.me-workspace-mode .me-workspace .customer-appointment-feature {
  border: 0;
  border-radius: 20px;
  box-shadow: 0 0 0 1px var(--rf-line-soft), 0 14px 34px -22px rgba(82, 54, 179, 0.35);
}
html body.me-workspace-mode .me-workspace :is(.me-waitlist-card, .customer-ai-card, .customer-appointment-policy-timeline) {
  border-color: var(--rf-line-soft);
  border-radius: 18px;
  background: #fff;
  transition: box-shadow 260ms ease, transform 320ms var(--rf-ease), border-color 200ms ease;
}
html body.me-workspace-mode .me-workspace :is(.me-waitlist-card, .customer-ai-card):hover { border-color: transparent; box-shadow: var(--rf-shadow-hover); transform: translateY(-2px); }
html body.me-workspace-mode .me-workspace .customer-appointment-policy-timeline { background: var(--rf-ground); }

/* Rows that open something: a hairline, and under the pointer a lift. */
html body.me-workspace-mode .me-workspace :is(.customer-notification-row, .me-settings-link) {
  border: 1px solid var(--rf-line-soft);
  border-radius: 18px;
  background: #fff;
  transition: box-shadow 260ms ease, transform 320ms var(--rf-ease), border-color 200ms ease, background-color 200ms ease;
}
html body.me-workspace-mode .me-workspace :is(.customer-notification-row, .me-settings-link):hover {
  border-color: transparent;
  box-shadow: var(--rf-shadow-hover);
  transform: translateY(-2px);
}
html body.me-workspace-mode .me-workspace :is(.customer-notification-row, .me-settings-link):active { transform: translateY(0) scale(0.995); }

/* ---- Buttons: pills; gradient for the main action, soft for the rest --- */
html body.me-workspace-mode .me-workspace :is(.solid-button.customer, .outline-button.customer, .ghost-button):not(#rf) {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: normal;
  transition: background-color 200ms ease, background-position 600ms var(--rf-ease), border-color 200ms ease, color 200ms ease, box-shadow 220ms ease, transform 120ms ease;
}
html body.me-workspace-mode .me-workspace .solid-button.customer:not(:disabled):not(#rf) {
  border-color: transparent;
  background: var(--rf-gradient);
  background-size: 140% 100%;
  background-position: 0% 50%;
  color: #fff;
  text-shadow: 0 1px 1px rgba(40, 24, 96, 0.22);
  box-shadow: 0 10px 22px -14px rgba(106, 72, 208, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
html body.me-workspace-mode .me-workspace .solid-button.customer:not(:disabled):not(#rf):hover {
  background-position: 100% 50%;
  box-shadow: 0 16px 28px -14px rgba(106, 72, 208, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
html body.me-workspace-mode .me-workspace :is(.outline-button.customer, .ghost-button):not(:disabled):not(#rf) {
  border: 1px solid var(--rf-violet-line);
  background: #fff;
  color: var(--rf-violet-ink);
}
html body.me-workspace-mode .me-workspace :is(.outline-button.customer, .ghost-button):not(:disabled):not(#rf):hover {
  border-color: #c5b3f4;
  background: var(--rf-violet-soft);
  box-shadow: 0 10px 22px -16px rgba(82, 54, 179, 0.6);
}
html body.me-workspace-mode .me-workspace :is(.solid-button.customer, .outline-button.customer, .ghost-button):not(:disabled):not(#rf):active { transform: scale(0.97); }
html body.me-workspace-mode .me-workspace .me-settings-logout:not(:disabled):not(#rf) { border-color: #f1d3da; color: #b0364f; }
html body.me-workspace-mode .me-workspace .me-settings-logout:not(:disabled):not(#rf):hover { background: #fdf2f4; border-color: #e7b3bf; }
html body.me-workspace-mode .me-workspace .icon-button {
  border-color: var(--rf-line);
  background: #fff;
  color: var(--rf-text);
  box-shadow: 0 4px 14px rgba(36, 33, 43, 0.05);
  transition: border-color 180ms ease, color 180ms ease, box-shadow 200ms ease, transform 120ms ease;
}
html body.me-workspace-mode .me-workspace .icon-button:hover { border-color: var(--rf-violet-line); color: var(--rf-violet-ink); box-shadow: 0 10px 22px -14px rgba(82, 54, 179, 0.5); }
html body.me-workspace-mode .me-workspace .icon-button:active { transform: scale(0.94); }
html body.me-workspace-mode .me-workspace .text-button { color: var(--rf-violet-ink); font-weight: 700; }
html body.me-workspace-mode .me-workspace .text-button:hover { color: var(--rf-violet); }
/* Book on a featured service: soft violet that fills with the gradient. */
html body.me-workspace-mode .me-workspace .me-service-book {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--rf-violet-soft);
  color: var(--rf-violet-ink);
  font-weight: 700;
  transition: color 200ms ease, box-shadow 200ms ease, transform 120ms ease;
}
html body.me-workspace-mode .me-workspace .me-service-book::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--rf-gradient);
  opacity: 0;
  transition: opacity 200ms ease;
}
html body.me-workspace-mode .me-workspace .me-service-book:hover { color: #fff; box-shadow: 0 8px 18px -12px rgba(106, 72, 208, 0.75); }
html body.me-workspace-mode .me-workspace .me-service-book:hover::before { opacity: 1; }
html body.me-workspace-mode .me-workspace .me-service-book:active { transform: scale(0.96); }

/* The workspace itself is the page's ground; its sections are the cards. */
html body.me-workspace-mode .me-workspace { background: transparent; }

/* The Upcoming / Past switch: a white thumb that glides. */
html body.me-workspace-mode .me-workspace .me-segment {
  border-color: transparent;
  background: rgba(235, 231, 243, 0.7);
  box-shadow: inset 0 1px 2px rgba(29, 26, 36, 0.05);
}

/* ---- Fields: white with a quiet border; focus turns it violet --------- */
html body.me-workspace-mode .me-workspace {
  --text-entry-border: #e2dcec;
  --text-entry-focus-surface: #fff;
  --text-entry-focus-accent: var(--rf-violet);
}
html body.me-workspace-mode .me-workspace :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
  border-color: #e2dcec;
  border-radius: 12px;
  background-color: #fff;
  color: var(--rf-ink);
  transition: border-color 180ms ease, box-shadow 200ms ease;
}
html body.me-workspace-mode .me-workspace :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea):hover { border-color: #cfc3e6; }
html body.me-workspace-mode .me-workspace :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea):focus { border-color: #a58ef0 !important; box-shadow: 0 0 0 4px rgba(145, 107, 232, 0.14) !important; }
html body.me-workspace-mode .me-workspace .customer-chat-search { border-color: transparent; background: var(--rf-band); }

/* ---- Motion: a sub-tab rises in once, quietly ------------------------- */
@keyframes customerSurfaceEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html body.customer-mode :is(.customer-topbar .top-actions .solid-button.customer, .me-rail-footer .solid-button.customer)::after { display: none; }
  html body.me-workspace-mode .me-workspace :is(.me-kpi, .me-waitlist-card, .customer-ai-card, .customer-notification-row, .me-settings-link):hover { transform: none; }
}
