/*
  Stable Liquid Glass
  -------------------
  This deliberately uses painted gradients, borders and inset highlights—not
  backdrop-filter, large fixed blur layers or animated pseudo-elements. Those
  effects were the cause of the iPad/mobile compositing stalls and displaced
  surface edges. The visual remains dimensional while the rendering path stays
  predictable on every device.
*/

body[data-theme="liquid"] {
  --red: #ff5d67;
  --maroon: #f4dce0;
  --ink: #f9f7f9;
  --charcoal: #e4dfe5;
  --pink: #4a343b;
  --white: #242329;
  --line: rgba(255,255,255,.17);
  --glass: #3e3d44;
  --glass-soft: #34333a;
  --shadow: 0 16px 34px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.18);
  color: #f9f7f9;
  background: radial-gradient(circle at 87% 4%, rgba(255,255,255,.12) 0 1px, rgba(120,118,126,.12) 12%, transparent 28%), radial-gradient(circle at 7% 91%, rgba(16,16,20,.24), transparent 27%), #343337;
}

body[data-theme="liquid"]::before,
body[data-theme="liquid"] :is(.glass-card,.portal-panel,.content-studio,.admin-directory-management,.modal-sheet)::after {
  content: none !important;
  display: none !important;
  animation: none !important;
  filter: none !important;
}

body[data-theme="liquid"] * {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

body[data-theme="liquid"] :is(
  .sidebar, .sidebar-support, .sidebar-workspace-card, .sidebar-theme-button,
  .glass-card, .profile-stat, .appointment-card, .quick-card:not(.featured),
  .dentist-card, .trusted-tag, .directory-count, .directory-toolbar,
  .featured-article, .map-legend, .map-status, .map-caption, .care-notice,
  .opportunity-grid article, .portal-panel, .student-panel, .content-studio,
  .admin-queue, .admin-published, .admin-directory-management,
  .directory-admin-form, .directory-import-panel, .admin-metric-grid article,
  .member-stat-grid article, .admin-kpi, .admin-actions button, .modal-sheet,
  .notice-panel, .verification-panel, .form-panel, .mini-result, .event-row,
  .article-card, .directory-row, .theme-choice, .admin-article-item,
  .admin-directory-list article, .workflow-item, .experience-switcher,
  .location-pill, .icon-button, .secure-admin-badge, .mobile-nav,
  .next-step-list button, .path-list button, .file-drop, .admin-directory-empty
) {
  border-color: rgba(255,255,255,.18) !important;
  color: #f9f7f9;
  background: linear-gradient(140deg, #5c5b62 0%, #414046 48%, #2b2a30 100%) !important;
  box-shadow: 0 14px 30px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.25), inset 0 -1px 0 rgba(0,0,0,.24) !important;
}

body[data-theme="liquid"] :is(.sidebar, .mobile-nav) {
  background: linear-gradient(160deg, #4c4b52, #2a292f 80%) !important;
}

body[data-theme="liquid"] .hero-card {
  border-color: rgba(255,255,255,.19);
  background: radial-gradient(circle at 78% 24%, rgba(255,255,255,.14) 0 6%, transparent 22%), linear-gradient(125deg, #5b5a61, #3b3a40 60%, #28272d) !important;
  box-shadow: 0 19px 38px rgba(0,0,0,.29), inset 0 1px 0 rgba(255,255,255,.25), inset 0 -1px 0 rgba(0,0,0,.24) !important;
}

body[data-theme="liquid"] .hero-card::before,
body[data-theme="liquid"] .hero-card::after {
  display: none !important;
}

body[data-theme="liquid"] :is(h1,h2,h3,b,strong,.directory-main h3,.event-info h3,.admin-queue b,.profile-menu button span,.field-label) {
  color: #fff !important;
}

body[data-theme="liquid"] :is(p,.modal-subtitle,.directory-meta p,.event-info p,.event-detail,.article-meta,.admin-queue small,.theme-choice small,.field-label small,.admin-data-note,.workspace-preview-note p,.sidebar-footer,.admin-directory-list small,.workflow-item small,.launch-note) {
  color: #ded9df !important;
}

body[data-theme="liquid"] :is(.secondary-button,.outline-button,.sheet-search,.filter-button,.view-switch button,.chip,.topic-chip,.specialty-chip,.location-action,.sheet-close,.save-button,.appearance-toolbar-button,.directory-search) {
  border-color: rgba(255,255,255,.2) !important;
  color: #f9f7f9 !important;
  background: linear-gradient(145deg, #4b4a51, #302f35) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.19), 0 7px 16px rgba(0,0,0,.18) !important;
}

body[data-theme="liquid"] :is(.nav-item,.profile-menu button,.admin-actions button) {
  color: #e0dbe1 !important;
}

body[data-theme="liquid"] :is(.nav-item:hover,.profile-menu button:hover,.admin-actions button:hover,.theme-choice:hover,.theme-choice.active,.filter-button:hover,.view-switch button:hover,.chip:hover,.topic-chip:hover,.specialty-chip:hover,.location-action:hover,.save-button:hover) {
  color: #fff !important;
  border-color: rgba(255,255,255,.34) !important;
  background: linear-gradient(145deg, #6a6871, #45434b) !important;
}

body[data-theme="liquid"] .nav-item.active {
  color: #fff !important;
  background: linear-gradient(105deg, #b9434d, #5c555c) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 8px 16px rgba(0,0,0,.19) !important;
}

body[data-theme="liquid"] :is(.field-label input,.field-label select,.field-label textarea,.sheet-search input,.directory-search input) {
  border-color: rgba(255,255,255,.17) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  background: #24232a !important;
}

body[data-theme="liquid"] :is(.field-label input,.field-label textarea,.sheet-search input,.directory-search input)::placeholder {
  color: #bdb7c0 !important;
  opacity: 1;
}

body[data-theme="liquid"] select option { color: #fff; background: #24232a; }
body[data-theme="liquid"] :is(.article-image,.article-thumb) { filter: none !important; }
body[data-theme="liquid"] .theme-swatch-liquid { background: linear-gradient(145deg, #77757d, #28272d); }
body[data-theme="liquid"] .appearance-toolbar-button .appearance-icon { background: radial-gradient(circle at 33% 25%, #e4e2e7, #807e87 34%, #2e2d34 75%) !important; }

/* First launch and account-routing pattern. */
.launch-overlay {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  place-items: center;
  overflow: auto;
  background: radial-gradient(circle at 84% 9%, rgba(224,0,0,.13), transparent 27%), radial-gradient(circle at 12% 88%, rgba(165,0,22,.08), transparent 30%), #fffafa;
  transition: opacity .34s ease, visibility .34s ease;
}

.launch-overlay.is-closing { visibility: hidden; opacity: 0; pointer-events: none; }
.launch-card { width: min(100%, 560px); padding: clamp(26px, 6vw, 52px); border: 1px solid rgba(165,0,22,.12); border-radius: 32px; background: rgba(255,255,255,.97); box-shadow: 0 28px 70px rgba(89,19,28,.16), inset 0 1px 0 rgba(255,255,255,.95); outline: none; }
.launch-splash { display: grid; min-height: min(540px, 76dvh); align-content: center; justify-items: center; text-align: center; }
.launch-pulse-mark { position: relative; display: grid; width: 184px; height: 184px; margin-bottom: 27px; place-items: center; }
.launch-pulse-mark span { position: absolute; width: 100%; height: 100%; border: 1px solid rgba(224,0,0,.24); border-radius: 50%; animation: gda-launch-pulse 2.3s ease-out infinite; }
.launch-pulse-mark span:nth-child(2) { animation-delay: 1.15s; }
.launch-pulse-mark img { position: relative; z-index: 1; width: 136px; max-height: 136px; object-fit: contain; border: 1px solid rgba(224,0,0,.1); border-radius: 32px; background: #fff; box-shadow: 0 16px 31px rgba(131,20,31,.16); }
.launch-splash h1, .launch-flow h1 { margin-bottom: 13px; font-size: clamp(29px, 6vw, 45px); }
.launch-splash > p:not(.eyebrow) { margin-bottom: 25px; }
.launch-loading { display: flex; gap: 7px; align-items: center; }
.launch-loading i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: gda-loading-dot .8s ease-in-out infinite alternate; }
.launch-loading i:nth-child(2) { animation-delay: .16s; }.launch-loading i:nth-child(3) { animation-delay: .32s; }
@keyframes gda-launch-pulse { 0% { transform: scale(.62); opacity: .7; } 78%, 100% { transform: scale(1.15); opacity: 0; } }
@keyframes gda-loading-dot { to { transform: translateY(-5px); opacity: .35; } }
.launch-flow { display: grid; }
.launch-mini-brand { display: flex; height: 40px; margin-bottom: 27px; align-items: center; }.launch-mini-brand img { width: 124px; max-height: 40px; object-fit: contain; object-position: left; }
.launch-intro { max-width: 460px; margin-bottom: 24px; font-size: 14px; }
.launch-role-grid { display: grid; gap: 12px; }
.launch-role-card { display: grid; width: 100%; min-height: 98px; padding: 15px; grid-template-columns: 46px minmax(0,1fr) 20px; gap: 13px; align-items: center; border: 1px solid rgba(165,0,22,.12); border-radius: 20px; color: var(--ink); background: linear-gradient(135deg, #fff, #fff5f5); text-align: left; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.launch-role-card:hover { border-color: rgba(224,0,0,.38); box-shadow: 0 13px 28px rgba(101,21,30,.1); transform: translateY(-2px); }.launch-role-card:focus-visible,.launch-back:focus-visible,.launch-google:focus-visible { outline: 3px solid rgba(224,0,0,.32); outline-offset: 3px; }
.launch-role-icon { display: grid; width: 45px; height: 45px; place-items: center; border-radius: 15px; color: var(--red); background: #ffe8e8; font-family: var(--font-head); font-size: 22px; }.launch-role-card b,.launch-role-card small { display: block; }.launch-role-card b { font-size: 13px; }.launch-role-card small { margin-top: 5px; color: #80686c; font-size: 10px; line-height: 1.4; }.launch-role-card i { color: var(--red); font-size: 20px; font-style: normal; }.launch-note { margin: 18px 0 0; font-size: 10px; line-height: 1.5; }
.launch-form-flow { position: relative; }.launch-back { width: max-content; margin: -6px 0 25px; padding: 0; border: 0; color: #896e73; background: transparent; font-size: 11px; font-weight: 800; }.launch-back:hover { color: var(--red); }.launch-google { display: flex; width: 100%; min-height: 48px; margin-bottom: 17px; align-items: center; justify-content: center; gap: 10px; border: 1px solid rgba(42,35,37,.14); border-radius: 12px; color: #463438; background: #fff; font-weight: 800; }.launch-google b { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: #4285f4; font-size: 12px; }.launch-divider { position: relative; margin: 4px 0 17px; border-top: 1px solid rgba(103,71,76,.13); text-align: center; }.launch-divider span { position: relative; top: -8px; padding: 0 9px; color: #8b7478; background: #fff; font-size: 9px; }.launch-form { display: grid; gap: 13px; }.launch-form label { display: grid; gap: 6px; color: #5a4246; font-size: 10px; font-weight: 800; }.launch-form input { width: 100%; min-height: 45px; padding: 0 12px; border: 1px solid rgba(108,69,76,.17); border-radius: 11px; color: var(--ink); background: #fffafa; font: inherit; font-size: 13px; font-weight: 500; }.launch-form input:focus { border-color: var(--red); outline: 3px solid rgba(224,0,0,.12); }.launch-form .primary-button { margin-top: 5px; }.launch-record { display: grid; margin: 4px 0 19px; padding: 14px; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; border: 1px solid rgba(25,166,106,.22); border-radius: 17px; background: #f1faf5; }.launch-record-avatar { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; color: #fff; background: linear-gradient(145deg, var(--red), var(--maroon)); font-size: 12px; font-weight: 800; }.launch-record h2 { margin: 0 0 3px; font-size: 16px; }.launch-record p { margin: 0; font-size: 10px; line-height: 1.4; }.launch-record small { display: block; margin-top: 3px; color: #39735a; font-size: 9px; font-weight: 700; }

@media (max-width: 560px) {
  .launch-overlay { padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); align-items: start; }
  .launch-card { min-height: calc(100dvh - 28px); padding: 28px 22px; border-radius: 24px; }
  .launch-splash { min-height: calc(100dvh - 84px); }.launch-pulse-mark { width: 154px; height: 154px; }.launch-pulse-mark img { width: 116px; max-height: 116px; }
  .launch-role-card { min-height: 94px; }.launch-role-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .launch-pulse-mark span,.launch-loading i { animation: none; }
  .launch-overlay,.launch-role-card { transition: none; }
}
