/* Aethel auth cards: verify / 2FA / needsub — local only, no external URLs. */
.ax-body {
  min-height: 100vh;
}
.ax-wrap {
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 18px 60px;
  position: relative;
  z-index: 1;
}
.ax-card {
  width: 100%;
  max-width: 460px;
  background: rgba(16, 16, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  box-shadow: 0 24px 70px -24px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(56, 56, 167, 0.12), 0 0 44px -18px rgba(56, 56, 167, 0.55);
  padding: 30px 28px 28px;
  text-align: center;
  backdrop-filter: blur(12px);
  animation: ax-rise 0.45s ease both;
}
@keyframes ax-rise {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: none; }
}
.ax-gif {
  width: 132px;
  height: 132px;
  object-fit: contain;
  margin: 0 auto 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px;
}
.ax-gif-sm {
  width: 84px;
  height: 84px;
  border-radius: 18px;
}
.ax-title {
  font-size: 24px;
  line-height: 1.2;
  margin: 6px 0 8px;
  color: #e7e7fd;
  letter-spacing: -0.02em;
}
.ax-sub {
  color: #a7a7b8;
  font-size: 14.5px;
  margin: 0 0 14px;
}
.ax-hint {
  color: #71717b;
  font-size: 13px;
  margin: 0 0 16px;
}
.ax-hint b { color: #c9c9e6; font-weight: 600; }
.ax-timer {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 2px 0 14px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(56, 56, 167, 0.14);
  border: 1px solid rgba(56, 56, 167, 0.4);
  color: #e7e7fd;
  font-variant-numeric: tabular-nums;
}
.ax-timer b { font-size: 22px; letter-spacing: 0.04em; }
.ax-timer span { font-size: 12.5px; color: #a7a7b8; }
.ax-timer.is-low { border-color: rgba(255, 92, 122, 0.6); background: rgba(255, 92, 122, 0.1); }
.ax-timer.is-low b { color: #ff8ba0; }
/* username field */
.ax-field {
  text-align: left;
  display: block;
  margin: 0 0 16px;
  font-size: 13.5px;
  color: #c9c9e6;
}
.ax-field input {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.ax-field input:focus {
  border-color: #3838a7;
  box-shadow: 0 0 0 3px rgba(56, 56, 167, 0.3);
}
/* OTP boxes */
.ax-otp {
  display: flex;
  gap: 9px;
  justify-content: center;
  margin: 6px 0 16px;
}
.ax-otp input {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  caret-color: #9090d2;
}
.ax-otp input:focus {
  border-color: #6a6ae0;
  box-shadow: 0 0 0 3px rgba(56, 56, 167, 0.35);
  transform: translateY(-1px);
}
.ax-otp input.filled {
  border-color: rgba(55, 224, 138, 0.55);
}
.ax-card.shake { animation: ax-shake 0.35s ease; }
@keyframes ax-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}
/* buttons */
.ax-actions { display: grid; gap: 10px; margin-top: 4px; }
.ax-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 16px;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.ax-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #3838a7 33%, #6f6fd0 100%);
  box-shadow: 0 10px 26px -10px rgba(56, 56, 167, 0.8);
}
.ax-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(56, 56, 167, 0.9); }
.ax-btn-ghost {
  color: #d7d7f2;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}
.ax-btn-ghost:hover { background: rgba(255, 255, 255, 0.09); }
.ax-alt { margin-top: 14px; font-size: 13.5px; color: #71717b; }
.ax-alt a { color: #9090d2; font-weight: 600; }
/* pure-CSS lock + envelope fallback (no image needed) */
.ax-lock {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  color: #9090d2;
  background: rgba(56, 56, 167, 0.12);
  border: 1px solid rgba(56, 56, 167, 0.4);
  border-radius: 50%;
}
.ax-lock-ring {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #6a6ae0;
  animation: ax-spin 1.6s linear infinite;
}
@keyframes ax-spin { to { transform: rotate(360deg); } }
.ax-env {
  width: 96px;
  height: 68px;
  margin: 0 auto 14px;
  position: relative;
  perspective: 400px;
}
.ax-env-body {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #26264f, #3838a7);
  border: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.ax-env-flap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 50%;
  background: linear-gradient(135deg, #4a4ac2, #9090d2);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  animation: ax-flap 2.6s ease-in-out infinite;
}
@keyframes ax-flap {
  0%, 100% { transform: rotateX(0deg); }
  50% { transform: rotateX(32deg); }
}
.ax-env-dot {
  position: absolute;
  left: 50%;
  top: 56%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: #37e08a;
  box-shadow: 0 0 12px #37e08a;
  animation: ax-blink 1.8s ease-in-out infinite;
}
@keyframes ax-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
/* 2FA inline variants (login split layout + settings cabinet card) */
.ax-otp-compact input { width: 46px; height: 54px; font-size: 21px; border-radius: 12px; }
.ax-mini {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(16, 16, 24, 0.7);
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  margin: 0 0 14px;
}
.ax-mini .ax-timer { margin-bottom: 10px; }
.ax-secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  letter-spacing: 0.08em;
  word-break: break-all;
  margin: 10px 0;
  font-size: 15px;
}
.ax-token {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  color: #71717b;
  word-break: break-all;
  margin: 0 0 12px;
}
/* alerts inside ax cards (falls back if global .alert missing) */
.ax-card .alert {
  text-align: left;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 13.5px;
  margin: 0 0 14px;
}
.alert-ok { background: rgba(55, 224, 138, 0.1); border: 1px solid rgba(55, 224, 138, 0.4); color: #7df0ae; }
.alert-error { background: rgba(255, 92, 122, 0.09); border: 1px solid rgba(255, 92, 122, 0.4); color: #ff9db1; }
.ax-needsub { max-width: 500px; }
@media (max-width: 520px) {
  .ax-card { padding: 24px 18px 22px; border-radius: 18px; }
  .ax-otp { gap: 7px; }
  .ax-otp input { width: 44px; height: 54px; font-size: 21px; }
  .ax-gif { width: 108px; height: 108px; }
}
/* light theme: same cards, paper surfaces + ink text */
html[data-theme="light"] .ax-card { background: #ffffff; border-color: rgba(20, 22, 40, 0.1); box-shadow: 0 24px 60px -30px rgba(30, 32, 70, 0.35); }
html[data-theme="light"] .ax-title { color: #15151d; }
html[data-theme="light"] .ax-sub { color: #5b5e72; }
html[data-theme="light"] .ax-hint { color: #8a8da0; }
html[data-theme="light"] .ax-hint b { color: #33364d; }
html[data-theme="light"] .ax-gif { background: rgba(56, 56, 167, 0.06); border-color: rgba(56, 56, 167, 0.18); }
html[data-theme="light"] .ax-timer { background: rgba(56, 56, 167, 0.07); border-color: rgba(56, 56, 167, 0.2); color: #33364d; }
html[data-theme="light"] .ax-timer span { color: #8a8da0; }
html[data-theme="light"] .ax-timer.is-low { border-color: rgba(220, 60, 90, 0.55); background: rgba(220, 60, 90, 0.08); }
html[data-theme="light"] .ax-timer.is-low b { color: #d63c5a; }
html[data-theme="light"] .ax-field { color: #33364d; }
html[data-theme="light"] .ax-field input { background: #f1f2f7; border-color: rgba(20, 22, 40, 0.12); color: #15151d; }
html[data-theme="light"] .ax-field input:focus { border-color: #6a6ae0; }
html[data-theme="light"] .ax-otp input { background: #f1f2f7; border-color: rgba(20, 22, 40, 0.12); color: #15151d; }
html[data-theme="light"] .ax-otp input:focus { border-color: #6a6ae0; }
html[data-theme="light"] .ax-otp input.filled { border-color: rgba(20, 160, 90, 0.6); }
html[data-theme="light"] .ax-btn-ghost { color: #33364d; background: rgba(20, 22, 40, 0.04); border-color: rgba(20, 22, 40, 0.14); }
html[data-theme="light"] .ax-btn-ghost:hover { background: rgba(20, 22, 40, 0.08); }
html[data-theme="light"] .ax-alt { color: #8a8da0; }
html[data-theme="light"] .ax-lock { color: #4a4ac2; background: rgba(56, 56, 167, 0.08); border-color: rgba(56, 56, 167, 0.3); }
html[data-theme="light"] .ax-mini { background: rgba(255, 255, 255, 0.85); border-color: rgba(20, 22, 40, 0.1); }
html[data-theme="light"] .ax-secret { background: #f1f2f7; border-color: rgba(20, 22, 40, 0.2); color: #15151d; }
html[data-theme="light"] .ax-token { color: #8a8da0; }
html[data-theme="light"] .alert-ok { background: rgba(20, 160, 90, 0.1); border-color: rgba(20, 160, 90, 0.45); color: #147a45; }
html[data-theme="light"] .alert-error { background: rgba(220, 60, 90, 0.08); border-color: rgba(220, 60, 90, 0.45); color: #c03252; }
