:root {
  --auth-ink: #eef8f4;
  --auth-muted: #a9bbb5;
  --auth-line: rgba(167, 238, 213, 0.16);
  --auth-accent: #6ce7c3;
  --auth-deep: #06100d;
}

body.customer-auth-locked {
  min-height: 100vh;
  overflow: hidden;
  background: #030907;
}

body.customer-auth-locked > :not(#customerAuthShell):not(#customerPlanCheckoutDialog):not(script) { display: none !important; }

.customer-auth-shell {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: clamp(1rem, 4vw, 3rem);
  color: var(--auth-ink);
  background:
    radial-gradient(circle at 18% 16%, rgba(50, 142, 111, 0.17), transparent 32rem),
    radial-gradient(circle at 84% 86%, rgba(21, 91, 73, 0.22), transparent 30rem),
    linear-gradient(145deg, #030907 0%, #07120f 54%, #020605 100%);
}

.customer-auth-shell[hidden] { display: none; }

.customer-auth-atmosphere { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.customer-auth-atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .28;
  background-image: linear-gradient(rgba(131, 229, 196, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(131, 229, 196, .05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
}
.customer-auth-atmosphere i { position: absolute; border-radius: 999px; border: 1px solid rgba(108, 231, 195, .1); }
.customer-auth-atmosphere i:nth-child(1) { width: 32rem; height: 32rem; left: -15rem; top: 14%; }
.customer-auth-atmosphere i:nth-child(2) { width: 19rem; height: 19rem; right: -6rem; bottom: -5rem; }
.customer-auth-atmosphere i:nth-child(3) { width: .45rem; height: .45rem; left: 75%; top: 18%; background: var(--auth-accent); box-shadow: 0 0 3rem var(--auth-accent); }

.customer-auth-card {
  position: relative;
  width: min(100%, 31rem);
  min-height: 32rem;
  padding: clamp(1.5rem, 5vw, 2.75rem);
  border: 1px solid var(--auth-line);
  border-radius: 1.75rem;
  background: linear-gradient(160deg, rgba(13, 28, 23, .94), rgba(5, 13, 11, .9));
  box-shadow: 0 2rem 7rem rgba(0, 0, 0, .52), inset 0 1px rgba(255, 255, 255, .035);
  backdrop-filter: blur(22px);
}

.customer-auth-brand { display: flex; align-items: center; gap: 1rem; padding-bottom: 1.7rem; border-bottom: 1px solid var(--auth-line); }
.customer-auth-mark { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border: 1px solid rgba(108, 231, 195, .42); border-radius: 50%; color: var(--auth-accent); font: 500 1rem/1 Georgia, serif; }
.customer-auth-brand small, .customer-auth-kicker { color: var(--auth-accent); font: 600 .68rem/1.2 ui-monospace, monospace; letter-spacing: .18em; }
.customer-auth-brand h1 { margin: .32rem 0 0; font: 400 clamp(1.2rem, 4vw, 1.55rem)/1.3 "Iowan Old Style", "Yu Mincho", serif; letter-spacing: .04em; }
.customer-auth-card section { padding: 2.3rem 0 1rem; }
.customer-auth-card section[hidden] { display: none; }
.customer-auth-card h2 { margin: .55rem 0 .8rem; font: 400 clamp(1.65rem, 6vw, 2.2rem)/1.28 "Iowan Old Style", "Yu Mincho", serif; letter-spacing: .02em; }
.customer-auth-card p { margin: 0 0 1.4rem; color: var(--auth-muted); font-size: .92rem; line-height: 1.8; }
.customer-auth-card form { display: grid; gap: .75rem; }
.customer-auth-card label { color: #d6e6e0; font-size: .82rem; font-weight: 650; letter-spacing: .04em; }
.customer-auth-card input {
  width: 100%;
  min-height: 3.35rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(180, 225, 209, .22);
  border-radius: .8rem;
  color: var(--auth-ink);
  background: rgba(0, 0, 0, .22);
  font: inherit;
  outline: none;
}
.customer-auth-card input:focus { border-color: var(--auth-accent); box-shadow: 0 0 0 3px rgba(108, 231, 195, .13); }
.customer-auth-card button {
  min-height: 3.2rem;
  margin-top: .45rem;
  padding: .8rem 1.2rem;
  border: 1px solid transparent;
  border-radius: .8rem;
  color: #042019;
  background: var(--auth-accent);
  font: 700 .88rem/1 sans-serif;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}
.customer-auth-card button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.07); }
.customer-auth-card button:focus-visible { outline: 3px solid rgba(108, 231, 195, .28); outline-offset: 3px; }
.customer-auth-card button:disabled { cursor: not-allowed; opacity: .42; }
.customer-auth-card .customer-auth-text-button { width: 100%; color: var(--auth-muted); border-color: var(--auth-line); background: transparent; }
.customer-turnstile { min-height: 4.4rem; margin: 1.2rem 0 .6rem; }
.customer-auth-status { min-height: 1.45rem; margin: 1rem 0 -1rem !important; color: #f1caa8 !important; font-weight: 650; }
.customer-auth-countdown { margin: 1.1rem 0 0 !important; text-align: center; font-size: .78rem !important; }
.customer-auth-pulse { width: 2.3rem; height: 2.3rem; margin-bottom: 1.2rem; border: 1px solid rgba(108, 231, 195, .4); border-radius: 50%; box-shadow: inset 0 0 0 .5rem rgba(108, 231, 195, .05); animation: customer-auth-breathe 1.9s ease-in-out infinite; }
.customer-auth-card footer { display: flex; gap: .65rem; align-items: flex-start; padding-top: 1.2rem; border-top: 1px solid var(--auth-line); }
.customer-auth-card footer span { flex: 0 0 auto; width: .42rem; height: .42rem; margin-top: .47rem; border-radius: 50%; background: var(--auth-accent); box-shadow: 0 0 .8rem rgba(108, 231, 195, .65); }
.customer-auth-card footer p { margin: 0; font-size: .72rem; line-height: 1.65; }
.customer-legacy-panel { padding-top: 1.5rem !important; }
.customer-legacy-panel h2 { font-size: clamp(1.45rem, 5vw, 1.9rem); }
.customer-legacy-panel p { margin-bottom: .85rem; font-size: .82rem; line-height: 1.65; }
.customer-legacy-actions { display: grid; gap: .7rem; margin-top: 1.15rem; }
.customer-legacy-actions > button { margin: 0; }
.customer-legacy-warning { padding: .8rem .9rem; border: 1px solid rgba(241, 202, 168, .2); border-radius: .7rem; color: #e7c9ae !important; background: rgba(91, 58, 35, .15); }
.customer-legacy-actions fieldset { display: grid; gap: .75rem; margin: .25rem 0 0; padding: .9rem; border: 1px solid var(--auth-line); border-radius: .8rem; }
.customer-legacy-actions legend { padding: 0 .35rem; color: #d6e6e0; font-size: .78rem; font-weight: 700; }
.customer-legacy-confirm { display: grid; grid-template-columns: 1.1rem 1fr; gap: .65rem; align-items: start; font-weight: 500 !important; line-height: 1.55; }
.customer-auth-card .customer-legacy-confirm input { width: 1.05rem; min-height: 1.05rem; margin: .15rem 0 0; padding: 0; accent-color: var(--auth-accent); }
.customer-auth-card .customer-legacy-delete { margin: 0; color: #f7e8e0; border-color: rgba(242, 142, 122, .35); background: rgba(111, 36, 28, .5); }
.customer-legacy-status { min-height: 1.5rem; margin: 0 !important; color: #d6e6e0 !important; }

@keyframes customer-auth-breathe { 50% { transform: scale(.82); opacity: .5; } }

@media (max-width: 520px) {
  .customer-auth-shell { place-items: end center; padding: .65rem; }
  .customer-auth-card { min-height: min(42rem, calc(100dvh - 1.3rem)); padding: 1.35rem; border-radius: 1.45rem; }
  .customer-auth-card section { padding-top: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .customer-auth-pulse { animation: none; }
  .customer-auth-card button { transition: none; }
}

.customer-commerce-notice a { display: inline-flex; align-items: center; min-height: 44px; color: #8fe1ca; text-underline-offset: 4px; font-size: .85rem; }
.customer-commerce-notice a:focus-visible { outline: 2px solid #d5ba7a; outline-offset: 4px; }
