/* Fase 9: focused access, first welcome and one shared profile intersection. */

/* 2.9.0: scoped contrast fixes and natural auth height, including mobile keyboard. */
.phase-nine .business-profile #productos .section-heading .catalog-add-product,
.phase-nine .business-profile #productos .section-heading .catalog-add-product:visited {
  color: #fff !important;
  background: #2563eb !important;
}
.phase-nine .business-profile #productos .section-heading .catalog-add-product:hover { background: #1d4ed8 !important; }
.phase-nine .business-profile #productos .section-heading .catalog-add-product:active { background: #1e40af !important; }
.phase-nine .business-profile #productos .section-heading .catalog-add-product:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.phase-nine .modern-profile .person-header h1 { color: var(--hc-text, #182c41) !important; text-shadow: none !important; overflow-wrap: anywhere; }

body.phase-nine.focus-route { padding-bottom: 0 !important; display: flex; flex-direction: column; min-height: var(--auth-visible-height,100vh); }
@supports (height: 100dvh) { body.phase-nine.focus-route { min-height: var(--auth-visible-height,100dvh); } }
.phase-nine.focus-route > .app-header-focus { flex-shrink: 0; }
.phase-nine.focus-route > #page-content { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.phase-nine.focus-route :is(.auth-neumorphic-page,.auth-simple-page) {
  min-height: 0; flex: 1;
  padding-block: 44px 24px;
  overflow: visible;
}
.phase-nine .email-code-input { text-align: center; letter-spacing: .35em; font-size: 22px; }
.phase-nine :is(.code-resend,.code-correction) { margin-top: 18px; }
.phase-nine .code-resend small { display: block; margin-top: 8px; color: var(--hc-text-2, #647384); }
.phase-nine .auth-return { display: inline-block; margin-bottom: 18px; font-weight: 750; }
@media (max-width: 767px) {
  .phase-nine.focus-route :is(.auth-neumorphic-page,.auth-simple-page) {
    min-height: 0;
    padding-block: 44px 20px;
  }
}

.phase-nine.focus-route {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 18% 15%, rgb(37 99 235 / .14), transparent 29rem),
    radial-gradient(circle at 84% 78%, rgb(15 118 110 / .13), transparent 27rem),
    #e9f0f6;
}

.phase-nine .app-header-focus,
.phase-nine .app-header-focus .topbar-inner {
  min-height: 64px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.phase-nine .app-header-focus .topbar-inner {
  display: flex !important;
  grid-template-columns: none !important;
  justify-content: center;
}

.phase-nine .app-header-focus .brand {
  color: var(--hc-text, #18334a);
}

.phase-nine .auth-neumorphic-page,
.phase-nine .auth-simple-page,
.phase-nine .onboarding-page {
  display: grid;
  min-height: calc(100dvh - 64px);
  place-items: center;
  padding: 36px 18px 54px;
}

.phase-nine .auth-neumorphic-card,
.phase-nine .onboarding-card,
.phase-nine .auth-simple-page .auth-box {
  width: min(100%, 430px);
  padding: 34px;
  border: 1px solid rgb(255 255 255 / .72);
  border-radius: 30px;
  background: #e9f0f6;
  box-shadow: 18px 18px 38px rgb(119 139 156 / .22), -16px -16px 34px rgb(255 255 255 / .82);
}

.phase-nine .auth-neumorphic-card {
  text-align: center;
}

.phase-nine .auth-neumorphic-brand,
.phase-nine .onboarding-brand > span {
  display: grid;
  width: 76px;
  height: 76px;
  margin: -68px auto 20px;
  place-items: center;
  overflow: hidden;
  border: 6px solid #e9f0f6;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #d6e0e9);
  box-shadow: 8px 8px 18px rgb(123 143 160 / .23), -8px -8px 18px #fff;
}

.phase-nine .auth-neumorphic-brand img,
.phase-nine .onboarding-brand img {
  width: 52px;
  height: 52px;
}

.phase-nine .auth-neumorphic-copy h1,
.phase-nine .onboarding-card h1,
.phase-nine .auth-simple-page .auth-box h1 {
  margin: 5px 0 7px;
  color: #1a3854;
  font-size: clamp(27px, 5vw, 34px);
  line-height: 1.1;
  letter-spacing: -.045em;
}

.phase-nine .auth-neumorphic-copy > p,
.phase-nine .onboarding-card > p,
.phase-nine .auth-simple-page .auth-box > p {
  margin: 0 auto 23px;
  color: #6f8191;
  font-size: 14px;
  line-height: 1.55;
}

.phase-nine .auth-kicker,
.phase-nine .onboarding-brand > small {
  display: block;
  margin: 0;
  color: #168c8b;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.phase-nine .auth-neumorphic-form,
.phase-nine .onboarding-form {
  display: grid;
  gap: 14px;
  text-align: left;
}

.phase-nine .auth-field {
  position: relative;
  display: block;
}

.phase-nine .auth-input-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 17px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  color: #6e8ba1;
  transform: translateY(-50%);
}

.phase-nine .auth-input-icon .app-icon { width: 19px; height: 19px; }

.phase-nine .auth-field :is(input, select) {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px 14px 49px;
  color: #28455d;
  border: 0 !important;
  border-radius: 14px;
  outline: 0;
  background: #e9f0f6 !important;
  box-shadow: inset 5px 5px 10px rgb(134 154 170 / .22), inset -5px -5px 10px rgb(255 255 255 / .87);
  font-size: 15px;
}

.phase-nine .auth-field select { appearance: auto; }
.phase-nine .auth-field :is(input, select):focus-visible { box-shadow: inset 3px 3px 8px rgb(134 154 170 / .18), inset -3px -3px 8px #fff, 0 0 0 3px rgb(29 148 146 / .27); }
.phase-nine .auth-field input::placeholder { color: #8294a3; }

.phase-nine .auth-submit {
  width: 100%;
  min-height: 53px;
  margin-top: 4px;
  color: #fff !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #168f98, #2563eb) !important;
  box-shadow: 7px 8px 15px rgb(37 99 235 / .25), -3px -3px 8px rgb(255 255 255 / .65) !important;
  font-size: 15px;
  font-weight: 850;
}

.phase-nine .auth-submit:hover { filter: saturate(1.08) brightness(1.03); transform: translateY(-1px); }
.phase-nine .forgot-password-link { margin: -2px 2px 1px; color: #24709a; font-size: 13px; font-weight: 750; text-align: right; }
.phase-nine .auth-switch { margin: 21px 0 0; color: #718190; font-size: 13px; }
.phase-nine .auth-switch a { color: #177d97; font-weight: 850; }
.phase-nine .terms { display: block; margin: 18px 2px 0; color: #7f8e99; font-size: 11px; line-height: 1.5; }
.phase-nine .terms a { color: #52768d; }

.phase-nine .auth-form-message {
  margin: 0 0 16px;
  text-align: left;
  font-size: 13px;
}

.phase-nine .auth-options {
  margin: 0;
  color: #6c7d8b;
  font-size: 12px;
}

.phase-nine .auth-options summary {
  padding: 7px 2px;
  cursor: pointer;
  color: #50718a;
  font-weight: 800;
}

.phase-nine .auth-options summary small { margin-left: 4px; color: #8999a5; font-weight: 650; }
.phase-nine .auth-options > div { padding: 10px 0 0; }
.phase-nine .auth-options .marketing-consent { display: grid; gap: 9px; margin: 0; padding: 12px; border: 0; border-radius: 12px; background: rgb(255 255 255 / .36); }
.phase-nine .auth-options .marketing-consent legend { padding: 0; color: #557084; font-size: 12px; font-weight: 750; }
.phase-nine .auth-options .marketing-consent > label { display: flex; gap: 7px; align-items: flex-start; }
.phase-nine .auth-options .marketing-consent > label input { margin-top: 2px; }

.phase-nine .auth-simple-page .auth-box { margin: 0; }
.phase-nine .auth-simple-page .auth-box .mobile-auth-brand { display: none; }
.phase-nine .auth-simple-page .auth-box .stack-form { display: grid; gap: 14px; }
.phase-nine .auth-simple-page .auth-box .stack-form label { display: grid; gap: 6px; color: #4f6b80; font-size: 13px; font-weight: 750; }
.phase-nine .auth-simple-page .auth-box .stack-form :is(input, textarea) { border-radius: 13px; background: #edf3f7; }

.phase-nine .onboarding-card { width: min(100%, 520px); text-align: center; }
.phase-nine .onboarding-brand { display: grid; justify-items: center; margin-bottom: 5px; }
.phase-nine .onboarding-brand > span { margin: -68px 0 11px; }
.phase-nine .onboarding-form > label:not(.onboarding-avatar) { display: grid; gap: 6px; color: #4f6b80; font-size: 13px; font-weight: 800; text-align: left; }
.phase-nine .onboarding-form label small { color: #7e8d98; font-size: 11px; font-weight: 600; }
.phase-nine .onboarding-form :is(input, select, textarea) { width: 100%; border: 0 !important; border-radius: 13px; background: #e9f0f6 !important; box-shadow: inset 4px 4px 9px rgb(134 154 170 / .2), inset -4px -4px 9px #fff; }
.phase-nine .onboarding-form :is(input, select) { min-height: 46px; padding: 11px 13px; }
.phase-nine .onboarding-form textarea { min-height: 86px; padding: 12px 13px; resize: vertical; }
.phase-nine .onboarding-avatar { display: grid; justify-items: center; gap: 4px; padding: 5px 0 2px; cursor: pointer; color: #26738b; }
.phase-nine .onboarding-avatar > span { width: 78px; height: 78px; overflow: hidden; border: 4px solid #fff; border-radius: 50%; background: #dbe6ed; box-shadow: 5px 5px 12px rgb(134 154 170 / .25), -5px -5px 12px #fff; }
.phase-nine .onboarding-avatar img { width: 100%; height: 100%; object-fit: cover; }
.phase-nine .onboarding-avatar input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.phase-nine .onboarding-form [data-profile-upload-status] { min-height: 16px; color: #647a8d; font-size: 11px; text-align: center; }
.phase-nine .onboarding-explore { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px 12px; margin-top: 19px; color: #718390; font-size: 12px; }
.phase-nine .onboarding-explore a { color: #177d97; font-weight: 800; }
.phase-nine .onboarding-skip { margin-top: 15px; }
.phase-nine .onboarding-skip button { border: 0; background: transparent; color: #688093; cursor: pointer; font-size: 13px; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }

/* The owner and visitors use one anchor point. The old cascade applied two
   negative offsets to business profiles, which left the avatar visually below
   the cover in some mobile cases. */
.phase-nine .modern-profile .person-cover { height: 250px !important; margin-bottom: 0 !important; }
.phase-nine .modern-profile .person-header { margin-top: -66px !important; position: relative; z-index: 4; }
.phase-nine .modern-profile .person-avatar-wrap { z-index: 5; }
.phase-nine .business-profile { overflow: visible; }
.phase-nine .business-profile .business-profile-cover { height: 270px !important; min-height: 270px; overflow: visible; }
.phase-nine .business-profile .business-profile-main { margin-top: -70px !important; position: relative; z-index: 4; }
.phase-nine .business-profile .profile-identity { margin-top: 0 !important; position: relative; z-index: 5; }
.phase-nine .business-profile .page-avatar-wrap { z-index: 6; }
.phase-nine .business-profile .profile-name-line h1 { color: var(--hc-text, #182c41) !important; text-shadow: none !important; }
.phase-nine .business-profile .profile-identity > div:nth-child(2) > p,
.phase-nine .business-profile .profile-rating > span { color: var(--hc-text-2, #647384) !important; }

@media (max-width: 767px) {
  .phase-nine .auth-neumorphic-page,
  .phase-nine .auth-simple-page,
  .phase-nine .onboarding-page { min-height: calc(100dvh - 58px); padding: 48px 14px 34px; }
  .phase-nine .app-header-focus,
  .phase-nine .app-header-focus .topbar-inner { min-height: 58px; }
  .phase-nine .auth-neumorphic-card,
  .phase-nine .onboarding-card,
  .phase-nine .auth-simple-page .auth-box { padding: 28px 20px 24px; border-radius: 25px; }
  .phase-nine .auth-neumorphic-brand,
  .phase-nine .onboarding-brand > span { width: 68px; height: 68px; margin-top: -62px; }
  .phase-nine .auth-neumorphic-brand img,
  .phase-nine .onboarding-brand img { width: 46px; height: 46px; }
  .phase-nine .auth-field :is(input, select) { min-height: 52px; font-size: 16px; }
  .phase-nine .auth-neumorphic-copy h1,
  .phase-nine .onboarding-card h1 { font-size: 29px; }
  .phase-nine .business-profile .business-profile-cover { height: 185px !important; min-height: 185px; }
  .phase-nine .business-profile .business-profile-main { margin-top: -57px !important; }
  .phase-nine .business-profile .profile-logo { width: 108px !important; height: 108px !important; }
  .phase-nine .modern-profile .person-cover { height: 180px !important; }
  .phase-nine .modern-profile .person-header { margin-top: -56px !important; }
}

html[data-theme="dark"] .phase-nine.focus-route {
  background: radial-gradient(circle at 20% 10%, rgb(53 106 180 / .23), transparent 27rem), #101a25;
}

html[data-theme="dark"] .phase-nine :is(.auth-neumorphic-card, .onboarding-card, .auth-simple-page .auth-box) {
  border-color: #293849;
  background: #172534;
  box-shadow: 14px 14px 28px #0c141d, -8px -8px 22px #213346;
}

html[data-theme="dark"] .phase-nine :is(.auth-neumorphic-copy h1, .onboarding-card h1, .auth-simple-page .auth-box h1) { color: #eef7ff; }
html[data-theme="dark"] .phase-nine :is(.auth-neumorphic-copy > p, .onboarding-card > p, .auth-switch, .terms, .onboarding-explore) { color: #aec0d0; }
html[data-theme="dark"] .phase-nine :is(.auth-neumorphic-brand, .onboarding-brand > span) { border-color: #172534; background: #203447; box-shadow: 6px 6px 15px #0e1721, -5px -5px 14px #294057; }
html[data-theme="dark"] .phase-nine .auth-field :is(input, select),
html[data-theme="dark"] .phase-nine .onboarding-form :is(input, select, textarea) { color: #edf6fc; background: #172534 !important; box-shadow: inset 4px 4px 9px #0e1721, inset -3px -3px 8px #203448; }
html[data-theme="dark"] .phase-nine .auth-field input::placeholder { color: #91a7b9; }

@media (prefers-reduced-motion: reduce) {
  .phase-nine .auth-submit { transition: none; }
  .phase-nine .auth-submit:hover { transform: none; }
}

/* Only the voluntary support dialog changes; payment content remains server supplied. */
.phase-nine .support-modal { padding: 16px; z-index: 1000; }
.phase-nine .support-modal-card {
  width: min(380px,100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto;
  overscroll-behavior: contain; padding: 18px; border-radius: 20px;
  color: var(--hc-text,#18334a); background: var(--hc-surface,#fff);
  border: 1px solid var(--hc-border,#dbe4ed); box-shadow: 0 24px 80px rgb(0 0 0 / .25);
}
.phase-nine .support-modal-card h2 { margin: 8px 22px 10px; font-size: 21px; line-height: 1.2; color: var(--hc-text,#18334a); }
.phase-nine .support-modal-card :is(p,small) { color: var(--hc-text-2,#647384); line-height: 1.45; }
.phase-nine .support-modal-kicker { color: var(--hc-brand,#2563eb); font-size: 10px; }
.phase-nine .support-close { width: 40px; height: 40px; top: 8px; right: 8px; color: var(--hc-text,#18334a); background: var(--hc-surface-2,#edf3f8); }
.phase-nine .support-qr-frame { width: fit-content; padding: 10px; margin: 12px auto; border-radius: 14px; background: #fff; border: 1px solid #dbe4ed; }
.phase-nine .support-qr-frame img { display: block; width: min(210px,55vw); margin: 0; border-radius: 8px; box-shadow: none; }
.phase-nine .support-modal-actions { display: grid; gap: 8px; margin-top: 12px; }
.phase-nine .support-modal-actions .btn { width: 100%; min-height: 44px; }
