.auth-gate.activation-gate {
  align-items: center;
  justify-items: center;
  padding: 28px;
  overflow: auto;
  background: #f4faf6;
  backdrop-filter: none;
}

.auth-gate .auth-shell {
  box-sizing: border-box;
  width: min(1220px, calc(100vw - 56px));
  min-height: min(760px, calc(100dvh - 56px));
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(430px, .88fr);
  grid-template-rows: 1fr auto;
  overflow: hidden;
  border: 1px solid #dfe8e1;
  border-radius: 30px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 28px 88px rgba(26, 72, 45, .13);
}

.auth-story {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: clamp(38px, 5vw, 68px);
  background: linear-gradient(145deg, #f8fcf9 0%, #eaf8ef 100%);
}

.auth-prism { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.auth-prism::before {
  content: "";
  position: absolute;
  width: 66%;
  aspect-ratio: 1;
  right: -7%;
  top: 12%;
  clip-path: polygon(49% 0, 100% 87%, 57% 100%, 0 70%);
  background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(39,205,98,.32) 55%, rgba(4,86,42,.2));
  filter: drop-shadow(0 28px 38px rgba(16,122,62,.18));
  transform: rotate(-8deg);
}
.auth-prism span { position: absolute; border-radius: 50%; filter: blur(18px); }
.auth-prism span:nth-child(1) { width: 46%; aspect-ratio: 1; right: -10%; bottom: -8%; background: rgba(44,255,115,.2); }
.auth-prism span:nth-child(2) { width: 36%; aspect-ratio: 1; right: 22%; bottom: -20%; background: rgba(11,143,69,.12); }
.auth-prism span:nth-child(3) { width: 42%; height: 3px; right: 4%; top: 48%; background: rgba(255,255,255,.92); transform: rotate(-28deg); }

.auth-brand-row, .auth-story-copy, .auth-capability-list { position: relative; z-index: 1; }
.auth-brand-row { display: flex; align-items: center; gap: 13px; }
.auth-brand-mark { width: 56px; height: 56px; flex: 0 0 auto; }
.auth-brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.auth-brand-copy { display: grid; gap: 3px; }
.auth-brand-copy strong { color: #121712; font-size: 18px; }
.auth-brand-copy small { color: #778178; font-size: 12px; }
.auth-story-copy { max-width: 590px; margin-top: clamp(80px, 12vh, 138px); }
.auth-kicker { margin: 0 0 12px; color: #078a3c; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.auth-story-copy h1 { margin: 0; display: grid; color: #101510; font-size: clamp(43px, 4.6vw, 68px); line-height: 1.08; letter-spacing: -.07em; }
.auth-story-copy h1 span { white-space: nowrap; }
.auth-story-copy h1 em { color: #16a550; font-style: normal; }
.auth-story-copy > p:last-child { max-width: 500px; margin: 22px 0 0; color: #657068; font-size: 17px; line-height: 1.75; }
.auth-capability-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 68px; }
.auth-capability-list span { padding: 9px 14px; border: 1px solid rgba(8,126,56,.16); border-radius: 999px; color: #294134; background: rgba(255,255,255,.62); font-size: 12px; font-weight: 700; }

.auth-panel {
  position: relative;
  align-self: center;
  min-width: 0;
  margin: 24px 28px 24px 0;
  padding: clamp(26px, 3vw, 34px);
  border: 1px solid #e2e9e3;
  border-radius: 24px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 18px 44px rgba(30, 58, 40, .09);
}
.auth-panel .activation-admin-icon { top: 20px; right: 20px; }
.auth-panel-head h2 { margin: 0; color: #101510; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.055em; }
.auth-panel-head > p:last-child { margin: 9px 0 0; color: #778178; font-size: 13px; line-height: 1.6; }
.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 24px; padding: 4px; border: 1px solid #e1e8e2; border-radius: 13px; background: #f6f9f7; }
.auth-tabs button { min-height: 38px; border: 0; border-radius: 9px; color: #748078; background: transparent; cursor: pointer; font: inherit; font-size: 12px; }
.auth-tabs button[aria-selected="true"] { color: #087b38; background: #eaf9ef; font-weight: 800; }
.auth-view-stack { margin-top: 18px; }
.auth-form, .auth-view { display: grid; gap: 13px; }
.auth-form[hidden], .auth-view[hidden] { display: none !important; }
.auth-form label, .auth-code-field label { display: grid; gap: 7px; color: #58635b; font-size: 12px; }
.auth-form input { box-sizing: border-box; width: 100%; height: 50px; border: 1px solid #dce5de; border-radius: 13px; padding: 0 14px; outline: 0; color: #101510; background: #fbfcfb; font: inherit; }
.auth-form input:focus { border-color: #18bd59; box-shadow: 0 0 0 3px rgba(44,255,115,.14); }
.auth-code-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; }
.auth-code-field > button { height: 50px; padding: 0 14px; border: 1px solid #d4e9da; border-radius: 13px; color: #087b38; background: #effaf2; cursor: pointer; font: inherit; white-space: nowrap; }
.auth-code-field > button:disabled { color: #909b92; background: #f5f7f5; cursor: wait; }
.auth-consent { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 8px !important; color: #808a82 !important; font-size: 11px !important; line-height: 1.55; }
.auth-consent input { width: 14px !important; height: 14px !important; flex: 0 0 auto; margin-top: 1px; padding: 0 !important; accent-color: #16aa52; }
.auth-status { min-height: 18px; margin: -2px 0 0; color: #6f7a72; font-size: 11px; line-height: 1.5; }
.auth-status[data-state="success"] { color: #087b38; }
.auth-status[data-state="error"] { color: #bd3027; }
.auth-status[data-state="pending"] { color: #647068; }
.auth-primary-btn, .auth-panel .activate-btn { width: 100%; min-height: 50px; border: 0; border-radius: 13px; color: #081109; background: #2cff73; box-shadow: 0 14px 28px rgba(44,255,115,.18); cursor: pointer; font: inherit; font-weight: 800; }
.auth-inline-note, .auth-panel-bottom { margin: 0; color: #7a857d; font-size: 11px; line-height: 1.6; }
.auth-panel-bottom { margin-top: 18px; text-align: center; }
.auth-panel .activation-card { width: auto; max-width: none; max-height: none; overflow: visible; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.auth-panel .activation-card h1 { margin: 0; font-size: 25px; }
.auth-panel .activation-card .activation-kicker { margin-top: 0; }
.auth-panel .activation-desc { margin: 10px 0 20px; }
.auth-footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; min-height: 58px; border-top: 1px solid #e7ede8; color: #89928b; background: #fbfdfb; font-size: 10px; }
.auth-footer a { color: #087b38; text-decoration: none; }

@media (max-width: 920px) {
  .auth-gate.activation-gate { padding: 0; align-items: stretch; }
  .auth-gate .auth-shell { width: 100%; min-height: 100dvh; grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; border: 0; border-radius: 0; }
  .auth-story { padding: 26px 22px 24px; }
  .auth-prism::before { width: 54%; right: -10%; top: 0; }
  .auth-story-copy { margin-top: 34px; }
  .auth-story-copy h1 { font-size: clamp(34px, 10vw, 48px); }
  .auth-story-copy > p:last-child { margin-top: 12px; font-size: 14px; }
  .auth-capability-list { margin-top: 24px; }
  .auth-panel { align-self: start; margin: 0; padding: 26px 22px 32px; border-width: 1px 0 0; border-radius: 24px 24px 0 0; box-shadow: none; }
}

@media (max-width: 520px) {
  .auth-brand-mark { width: 44px; height: 44px; }
  .auth-brand-copy strong { font-size: 15px; }
  .auth-story-copy { margin-top: 28px; }
  .auth-capability-list { display: none; }
  .auth-tabs button { font-size: 11px; }
  .auth-code-field { grid-template-columns: 1fr; }
  .auth-code-field > button { width: 100%; }
}

/* Approved Emerald Stage visual. The account contract stays in
   global-auth-runtime.js; this layer only restores the confirmed login art. */
.auth-gate.activation-gate {
  box-sizing: border-box;
  min-height: 100dvh;
  padding: clamp(16px, 2.4vw, 36px) !important;
  overflow: auto;
  background: #050c09 !important;
}

.auth-gate .auth-shell {
  position: relative;
  isolation: isolate;
  width: min(1440px, calc(100vw - 48px));
  height: min(860px, calc(100dvh - 48px));
  min-height: 650px;
  grid-template-columns: minmax(0, 1.16fr) minmax(430px, .84fr);
  grid-template-rows: minmax(0, 1fr) auto;
  border-color: rgba(136, 218, 165, .28);
  background: #07120e;
  box-shadow: 0 36px 110px rgba(0, 0, 0, .48), 0 0 0 1px rgba(44, 255, 115, .04);
}

.auth-gate .auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 66% 48%, rgba(44,255,115,.18), transparent 25%), radial-gradient(circle at 12% 100%, rgba(23,129,71,.24), transparent 34%);
}

.auth-gate .auth-story {
  overflow: hidden;
  padding: clamp(32px, 5vw, 72px);
  background: #07120e;
}

.auth-prism-stage {
  position: absolute;
  inset: 0 -10% 0 -1%;
  overflow: hidden;
  pointer-events: none;
  opacity: .9;
}

.auth-prism-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 67% 61%, rgba(44,255,115,.24), transparent 28%), linear-gradient(90deg, rgba(5,12,9,.78), rgba(5,12,9,.08) 48%, transparent 73%);
  mix-blend-mode: screen;
}

.auth-prism-stage::after {
  content: "";
  position: absolute;
  inset: -12% -10% -8% 32%;
  z-index: 2;
  background: linear-gradient(112deg, transparent 24%, rgba(255,255,255,0) 40%, rgba(194,255,215,.42) 49%, rgba(44,255,115,.26) 56%, transparent 70%);
  filter: blur(9px);
  mix-blend-mode: screen;
  animation: authPrismNightSweep 8.6s cubic-bezier(.45,.02,.26,1) infinite;
}

.auth-prism-stage > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .94;
  filter: saturate(1.56) contrast(1.16) brightness(.86);
  mix-blend-mode: multiply;
  transform: scale(1.1);
  animation: authPrismNightBreath 9s ease-in-out infinite;
}

.auth-prism-caustic, .auth-prism-glint { position: absolute; z-index: 3; display: block; pointer-events: none; }
.auth-prism-caustic { border-radius: 50%; filter: blur(14px); mix-blend-mode: screen; }
.auth-prism-caustic-one { width: 46%; aspect-ratio: 1; right: -13%; bottom: 6%; background: radial-gradient(circle, rgba(44,255,115,.24), transparent 67%); animation: authPrismCaustic 15s ease-in-out infinite alternate; }
.auth-prism-caustic-two { width: 34%; aspect-ratio: 1; right: 10%; bottom: -15%; background: radial-gradient(circle, rgba(11,143,69,.24), transparent 70%); animation: authPrismCaustic 17s ease-in-out infinite alternate-reverse; }
.auth-prism-glint { right: 5%; bottom: 9%; width: min(36vw, 340px); aspect-ratio: 1.7; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,255,255,.36), rgba(44,255,115,.12) 35%, transparent 70%); filter: blur(3px); mix-blend-mode: screen; animation: authPrismGlint 12s ease-in-out infinite; }

@keyframes authPrismNightBreath { 0%,100% { filter:saturate(1.46) contrast(1.12) brightness(.74); } 48% { filter:saturate(1.78) contrast(1.2) brightness(.92); } }
@keyframes authPrismNightSweep { 0%,18% { opacity:0; transform:translateX(-44%) skewX(-14deg); } 32% { opacity:.82; } 58% { opacity:.24; transform:translateX(28%) skewX(-14deg); } 72%,100% { opacity:0; transform:translateX(45%) skewX(-14deg); } }
@keyframes authPrismCaustic { from { opacity:.2; transform:scale(.9); } to { opacity:.58; transform:scale(1.08); } }
@keyframes authPrismGlint { 0%,100% { opacity:.1; transform:rotate(-17deg) scale(.92); } 48% { opacity:.54; transform:rotate(-15deg) scale(1.08); } }

.auth-brand-row, .auth-story-copy, .auth-capability-list { position: relative; z-index: 4; }
.auth-brand-copy strong, .auth-story-copy h1 { color: #f6faf7; text-shadow: 0 2px 24px rgba(0,0,0,.34); }
.auth-brand-copy small, .auth-story-copy > p:last-child { color: rgba(226,243,231,.72); }
.auth-story-title-line { display: block; white-space: nowrap; }
.auth-story-copy h1 em { color: #2cff73; text-shadow: 0 0 24px rgba(44,255,115,.3); }
.auth-capability-list span { color: #d8f7df; border-color: rgba(44,255,115,.28); background: rgba(4,26,16,.58); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 8px 22px rgba(0,0,0,.16); }

.auth-gate .auth-panel {
  z-index: 5;
  align-self: center;
  max-height: calc(100% - 36px);
  margin: 18px 22px 18px 0;
  padding: clamp(28px, 3.2vw, 40px);
  overflow-y: auto;
  border-color: rgba(255,255,255,.74);
  border-radius: 28px;
  background: rgba(252,254,252,.97);
  box-shadow: 0 28px 72px rgba(0,0,0,.28), 0 0 0 1px rgba(44,255,115,.06);
}

.auth-social { margin-top: 14px; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: #a0a8a0; font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #e9ede9; }
.auth-provider-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.auth-provider-grid button { display: grid; justify-items: center; gap: 2px; min-height: 56px; border: 1px solid #e1e8e1; border-radius: 12px; color: #7e887f; background: #fff; font: inherit; font-size: 11px; opacity: .78; }
.auth-provider-icon { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #dbe7dc; border-radius: 8px; font-size: 10px; font-weight: 700; }
.auth-provider-grid small { color: #a1aaa2; font-size: 8px; }
.auth-provider-note { margin: 8px 0 0; color: #a0a8a0; font-size: 10px; text-align: center; }
.auth-panel-bottom { margin-top: 10px; }

.auth-gate .auth-footer {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  z-index: 6;
  justify-content: flex-start;
  min-height: 38px;
  margin: 0 24px 16px;
  padding: 0;
  border: 0;
  color: rgba(221,242,227,.7);
  background: transparent;
}
.auth-footer-links { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.auth-footer button, .auth-footer a { border: 0; padding: 0; color: #77e69a; background: transparent; cursor: pointer; font: inherit; text-decoration: none; }

@media (max-width: 900px) {
  .auth-gate.activation-gate { align-items: flex-start !important; padding: 10px !important; overflow-y: auto !important; }
  .auth-gate .auth-shell { width: calc(100vw - 20px); height: auto; min-height: calc(100dvh - 20px); grid-template-columns: 1fr; border-radius: 26px; }
  .auth-gate .auth-story { min-height: 230px; padding: 22px 24px 30px; }
  .auth-prism-stage { inset: 0; }
  .auth-story-copy { margin-top: 28px; }
  .auth-story-copy h1 { font-size: clamp(32px, 8vw, 48px); }
  .auth-story-copy > p:last-child { margin-top: 10px; font-size: 12px; }
  .auth-capability-list { margin-top: 18px; }
  .auth-gate .auth-panel { align-self: start; max-height: none; margin: -12px 12px 14px; padding: 26px 22px; overflow: visible; }
  .auth-gate .auth-footer { grid-column: 1; grid-row: auto; justify-content: center; flex-wrap: wrap; margin: 0 12px 12px; text-align: center; }
}

@media (max-width: 600px) {
  .auth-gate.activation-gate { padding: 8px !important; }
  .auth-gate .auth-shell { width: calc(100vw - 16px); min-height: calc(100dvh - 16px); grid-template-rows: minmax(0,1fr) auto; border-radius: 22px; }
  .auth-gate .auth-story { display: none !important; }
  .auth-gate .auth-panel { align-self: stretch; margin: 0; padding: 22px 18px 16px; border-radius: 22px; }
  .auth-panel-head { margin-top: 22px; }
  .auth-provider-grid { gap: 6px; }
  .auth-gate .auth-footer { min-height: 52px; margin: 0 8px 8px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-prism-stage * { animation: none !important; transition: none !important; }
}
