:root {
  --auth-navy: #0b1a6e;
  --auth-blue: #1e3fcc;
  --auth-blue-hover: #1731bb;
  --auth-ice: #eef1ff;
  --auth-page: #f2f4ff;
  --auth-line: #dfe5ff;
  --auth-text: #111827;
  --auth-muted: #667085;
  --auth-danger: #c92a3c;
}

[data-auth-slot] {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  justify-self: end;
  min-width: 0;
}

.nexoria-auth-trigger {
  align-items: center;
  background: #f8f9ff;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  box-shadow: 0 5px 16px rgba(30, 63, 204, .08);
  color: var(--auth-blue);
  cursor: pointer;
  display: inline-flex;
  font: 800 14px/1 'Outfit', sans-serif;
  gap: 9px;
  max-width: 190px;
  min-height: 42px;
  padding: 9px 14px 9px 9px;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.nexoria-auth-trigger:hover { background: #fff; border-color: #bac7ff; box-shadow: 0 8px 22px rgba(30, 63, 204, .14); transform: translateY(-1px); }
.nexoria-auth-trigger__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nexoria-auth-trigger__mark {
  align-items: center;
  display: inline-flex;
  flex: 0 0 30px;
  height: 30px;
  justify-content: center;
  width: 30px;
}
.nexoria-auth-trigger__logo { display: block; height: 30px; object-fit: contain; width: 30px; }

.nexoria-auth-overlay {
  align-items: center;
  background: rgba(8, 18, 65, .58);
  display: flex;
  font-family: 'Outfit', sans-serif;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 2147483000;
}

.nexoria-auth-overlay[hidden] { display: none; }
.nexoria-auth-overlay::before {
  backdrop-filter: blur(8px);
  content: '';
  inset: 0;
  position: absolute;
}

.nexoria-auth-dialog {
  background: #fff;
  border: 1px solid var(--auth-line);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(11, 26, 110, .26);
  display: grid;
  grid-template-columns: 218px minmax(0, 430px);
  max-height: min(760px, calc(100vh - 48px));
  max-width: 648px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.nexoria-auth-brand {
  background-color: var(--auth-navy);
  background-image: linear-gradient(155deg, #10258f, #2149d8 68%, #4e7cff);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  overflow: hidden;
  padding: 27px 25px;
  position: relative;
}

.nexoria-auth-resources {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.nexoria-auth-resource {
  animation: nexoria-resource-fall var(--resource-duration) linear var(--resource-delay) infinite;
  filter: drop-shadow(0 8px 10px rgba(4, 11, 62, .26));
  height: var(--resource-size);
  left: var(--resource-x);
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  transform: translate(-50%, -70px) rotate(0deg);
  width: var(--resource-size);
  will-change: transform, opacity;
}

@keyframes nexoria-resource-fall {
  0% { opacity: 0; transform: translate(-50%, -76px) rotate(0deg); }
  10% { opacity: .7; }
  84% { opacity: .58; }
  100% { opacity: 0; transform: translate(calc(-50% + 16px), 590px) rotate(var(--resource-turn)); }
}

.nexoria-auth-brand__logo {
  align-items: center;
  display: flex;
  font-size: 17px;
  font-weight: 900;
  gap: 9px;
  letter-spacing: -.4px;
  position: relative;
  z-index: 2;
}

.nexoria-auth-brand__crest {
  align-items: center;
  background: #fff;
  border-radius: 10px;
  color: var(--auth-blue);
  display: inline-flex;
  font-size: 16px;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.nexoria-auth-brand__copy { margin: auto 0 42px; position: relative; z-index: 2; }
.nexoria-auth-brand__copy strong { display: block; font-size: 23px; letter-spacing: -.6px; line-height: 1.12; }
.nexoria-auth-brand__copy span { color: rgba(255, 255, 255, .76); display: block; font-size: 13px; line-height: 1.45; margin-top: 11px; }

.nexoria-auth-main {
  -ms-overflow-style: none;
  max-height: min(760px, calc(100vh - 48px));
  overflow-y: auto;
  padding: 34px 38px 36px;
  scrollbar-width: none;
  transition: opacity .16s ease, transform .16s ease;
  view-transition-name: nexoria-auth-content;
}

.nexoria-auth-main::-webkit-scrollbar { display: none; }

.nexoria-auth-main.is-leaving { opacity: 0; transform: translateY(3px); }
.nexoria-auth-main.is-entering { animation: nexoria-auth-view-in .28s cubic-bezier(.22, .75, .24, 1); }

@keyframes nexoria-auth-view-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

::view-transition-group(nexoria-auth-content) {
  animation-duration: .28s;
  animation-timing-function: cubic-bezier(.22, .75, .24, 1);
}

::view-transition-old(nexoria-auth-content) { animation: nexoria-auth-view-old .28s cubic-bezier(.22, .75, .24, 1) both; }
::view-transition-new(nexoria-auth-content) { animation: nexoria-auth-view-new .28s cubic-bezier(.22, .75, .24, 1) both; }

@keyframes nexoria-auth-view-old {
  to { opacity: 0; transform: translateY(-3px); }
}

@keyframes nexoria-auth-view-new {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.nexoria-auth-close {
  align-items: center;
  background: var(--auth-ice);
  border: 0;
  border-radius: 10px;
  color: var(--auth-navy);
  cursor: pointer;
  display: flex;
  font: 700 20px/1 'Outfit', sans-serif;
  height: 36px;
  justify-content: center;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 36px;
  z-index: 2;
}

.nexoria-auth-close:hover { background: #dfe5ff; }
.nexoria-auth-title { color: var(--auth-text); font-size: 28px; font-weight: 900; letter-spacing: -.8px; line-height: 1.1; margin: 5px 44px 8px 0; }
.nexoria-auth-lead { color: var(--auth-muted); font-size: 14px; line-height: 1.5; margin: 0 0 24px; }
.nexoria-auth-tabs { background: var(--auth-ice); border-radius: 13px; display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 22px; padding: 4px; }
.nexoria-auth-tab { background: transparent; border: 0; border-radius: 10px; color: #667085; cursor: pointer; font: 800 14px/1 'Outfit', sans-serif; padding: 11px 10px; transition: background-color .18s ease, box-shadow .18s ease, color .18s ease; }
.nexoria-auth-tab[aria-selected="true"] { background: #fff; box-shadow: 0 3px 12px rgba(30, 63, 204, .1); color: var(--auth-blue); }
.nexoria-auth-form { display: grid; gap: 15px; }
.nexoria-auth-field { display: grid; gap: 7px; }
.nexoria-auth-field label { color: #344054; font-size: 13px; font-weight: 800; }
.nexoria-auth-field input {
  background: #f8f9ff;
  border: 1.5px solid var(--auth-line);
  border-radius: 13px;
  color: var(--auth-text);
  font: 600 15px/1.2 'Outfit', sans-serif;
  min-height: 48px;
  outline: none;
  padding: 13px 15px;
  width: 100%;
}
.nexoria-auth-field input:focus { background: #fff; border-color: var(--auth-blue); box-shadow: 0 0 0 3px rgba(30, 63, 204, .1); }
.nexoria-auth-field input[readonly] { color: var(--auth-muted); cursor: default; }
.nexoria-auth-input-wrap { position: relative; }
.nexoria-auth-input-wrap input { padding-right: 52px; }
.nexoria-auth-password-toggle { background: transparent; border: 0; border-radius: 9px; cursor: pointer; height: 36px; padding: 0; position: absolute; right: 7px; top: 6px; width: 38px; }
.nexoria-auth-password-toggle::before { border: 2px solid #7783aa; border-radius: 70% 20%; content: ''; height: 13px; left: 11px; position: absolute; top: 10px; transform: rotate(45deg); width: 17px; }
.nexoria-auth-password-toggle::after { background: #7783aa; border: 2px solid #f8f9ff; border-radius: 50%; content: ''; height: 7px; left: 16px; position: absolute; top: 15px; width: 7px; }
.nexoria-auth-password-toggle:hover { background: var(--auth-ice); }
.nexoria-auth-password-toggle[aria-pressed="true"]::before { border-color: var(--auth-blue); }
.nexoria-auth-password-toggle[aria-pressed="true"]::after { background: var(--auth-blue); }
.nexoria-auth-field__error { color: var(--auth-danger); font-size: 12px; font-weight: 700; min-height: 0; }
.nexoria-auth-check { align-items: flex-start; color: #667085; display: flex; font-size: 12px; gap: 9px; line-height: 1.45; }
.nexoria-auth-check input { accent-color: var(--auth-blue); flex: 0 0 auto; height: 18px; margin: 1px 0 0; width: 18px; }
.nexoria-auth-check a, .nexoria-auth-link { color: var(--auth-blue); font-weight: 800; text-decoration: none; }
.nexoria-auth-check a:hover, .nexoria-auth-link:hover { text-decoration: underline; }
.nexoria-auth-primary, .nexoria-auth-provider {
  align-items: center;
  border-radius: 13px;
  cursor: pointer;
  display: flex;
  font: 800 14px/1 'Outfit', sans-serif;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  width: 100%;
}
.nexoria-auth-primary { background: var(--auth-blue); border: 1px solid var(--auth-blue); color: #fff; }
.nexoria-auth-primary:hover { background: var(--auth-blue-hover); box-shadow: 0 10px 24px rgba(30, 63, 204, .2); transform: translateY(-1px); }
.nexoria-auth-primary:disabled { cursor: wait; opacity: .62; transform: none; }
.nexoria-auth-provider { background: #fff; border: 1.5px solid var(--auth-line); color: #344054; gap: 9px; }
.nexoria-auth-provider:hover:not(:disabled) { background: #f8f9ff; border-color: #bbc8ff; }
.nexoria-auth-provider:disabled { background: #f7f8fc; color: #98a2b3; cursor: not-allowed; }
.nexoria-auth-provider__badge { background: var(--auth-ice); border-radius: 999px; color: var(--auth-blue); font-size: 10px; margin-left: auto; padding: 5px 8px; }
.nexoria-auth-divider { align-items: center; color: #98a2b3; display: flex; font-size: 11px; font-weight: 700; gap: 10px; margin: 2px 0; }
.nexoria-auth-divider::before, .nexoria-auth-divider::after { background: var(--auth-line); content: ''; height: 1px; width: 100%; }
.nexoria-auth-actions { align-items: center; display: flex; justify-content: space-between; margin-top: -3px; }
.nexoria-auth-actions button { background: transparent; border: 0; color: var(--auth-blue); cursor: pointer; font: 800 12px/1.3 'Outfit', sans-serif; padding: 3px 0; }
.nexoria-auth-message { border-radius: 12px; display: none; font-size: 13px; font-weight: 650; line-height: 1.45; padding: 11px 13px; }
.nexoria-auth-message:not(:empty) { display: block; }
.nexoria-auth-message[data-tone="error"] { background: #fff0f1; color: #a61e2d; }
.nexoria-auth-message[data-tone="success"] { background: #eaf8ef; color: #17703a; }
.nexoria-auth-profile-card { background: var(--auth-ice); border: 1px solid var(--auth-line); border-radius: 16px; margin-bottom: 20px; padding: 16px; }
.nexoria-auth-profile-card strong { color: var(--auth-navy); display: block; font-size: 16px; }
.nexoria-auth-profile-card span { color: var(--auth-muted); display: block; font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.nexoria-auth-secondary { background: transparent; border: 0; color: var(--auth-danger); cursor: pointer; font: 800 13px/1 'Outfit', sans-serif; justify-self: center; padding: 8px; }
.nexoria-auth-secondary-button { align-items: center; background: #fff; border: 1.5px solid var(--auth-line); border-radius: 13px; color: var(--auth-blue); cursor: pointer; display: flex; font: 800 14px/1 'Outfit', sans-serif; justify-content: center; min-height: 46px; padding: 12px 16px; width: 100%; }
.nexoria-auth-secondary-button:hover { background: var(--auth-ice); border-color: #bbc8ff; transform: translateY(-1px); }
.nexoria-auth-note { background: var(--auth-ice); border-left: 3px solid var(--auth-blue); border-radius: 4px 12px 12px 4px; color: #405080; font-size: 13px; line-height: 1.5; padding: 13px 14px; }
.nexoria-auth-mail-icon { align-items: center; background: var(--auth-ice); border: 1px solid var(--auth-line); border-radius: 16px; color: var(--auth-blue); display: flex; font-size: 27px; height: 58px; justify-content: center; margin-bottom: 20px; width: 58px; }
.nexoria-auth-email-card { background: #f8f9ff; border: 1px solid var(--auth-line); border-radius: 15px; display: grid; gap: 4px; margin-bottom: 14px; padding: 15px 16px; }
.nexoria-auth-email-card span { color: var(--auth-muted); font-size: 12px; font-weight: 700; }
.nexoria-auth-email-card strong { color: var(--auth-navy); font-size: 14px; overflow-wrap: anywhere; }
.nexoria-auth-confirm-form { margin-top: 17px; }
.nexoria-auth-confirm-form .nexoria-auth-link { background: transparent; border: 0; cursor: pointer; font: 800 13px/1.3 'Outfit', sans-serif; justify-self: center; padding: 7px; }

.nexoria-auth-trigger:focus-visible,
.nexoria-auth-dialog button:focus-visible,
.nexoria-auth-dialog a:focus-visible,
.nexoria-auth-dialog input:focus-visible {
  outline: 3px solid #8fa7ff;
  outline-offset: 3px;
}

body.nexoria-auth-open { overflow: hidden !important; }

@media (max-width: 820px) {
  [data-auth-slot] { margin-left: 8px; }
  .nexoria-auth-trigger { padding-right: 11px; }
  .nexoria-auth-trigger__name { display: none; }
}

@media (max-width: 640px) {
  [data-auth-slot] { margin: 0; position: absolute; right: 12px; top: 12px; }
  .nexoria-auth-overlay { align-items: flex-end; padding: 0; }
  .nexoria-auth-dialog { border-radius: 24px 24px 0 0; display: block; max-height: 94vh; max-width: none; }
  .nexoria-auth-brand { display: none; }
  .nexoria-auth-main { max-height: 94vh; padding: 30px 24px calc(28px + env(safe-area-inset-bottom)); }
  .nexoria-auth-title { font-size: 25px; }
}

@media (max-width: 420px) {
  .nexoria-auth-main { padding-left: 18px; padding-right: 18px; }
  .nexoria-auth-overlay { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .nexoria-auth-overlay *, .nexoria-auth-trigger { scroll-behavior: auto !important; transition: none !important; }
  .nexoria-auth-main.is-entering { animation: none; }
  .nexoria-auth-resource { animation: none; opacity: .22; transform: translate(-50%, calc(70px + var(--resource-x))) rotate(8deg); }
  ::view-transition-group(nexoria-auth-content),
  ::view-transition-old(nexoria-auth-content),
  ::view-transition-new(nexoria-auth-content) { animation-duration: .01ms !important; }
}
