/* Premium auth — fintech 2030, fast and restrained */

.auth-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(37, 99, 235, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(14, 165, 233, 0.14), transparent 50%),
    linear-gradient(165deg, #0b1220 0%, #111827 42%, #0f172a 100%);
  color: #e5e7eb;
}

.auth-shell-premium {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  overflow: hidden;
}

.auth-glow {
  position: absolute;
  inset: auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 70%);
  filter: blur(40px);
  top: 8%;
  right: 12%;
  pointer-events: none;
  animation: authGlow 8s ease-in-out infinite alternate;
}

@keyframes authGlow {
  from { transform: translate(0, 0) scale(1); opacity: 0.55; }
  to { transform: translate(-40px, 30px) scale(1.12); opacity: 0.85; }
}

.auth-card-premium {
  position: relative;
  width: min(440px, 100%);
  padding: 28px 26px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: authCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.auth-card-premium .brand-name { color: #f8fafc; font-weight: 700; letter-spacing: -0.02em; }
.auth-card-premium .brand-sub { color: rgba(226, 232, 240, 0.65); }
.auth-card-premium .auth-brand { text-decoration: none; color: inherit; }

.auth-premium .auth-hero { margin-bottom: 18px; }
.auth-premium .auth-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #93c5fd;
  font-weight: 600;
}
.auth-premium h1 {
  margin: 0 0 8px;
  font-family: "Instrument Sans", "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: clamp(1.55rem, 4vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #f8fafc;
}
.auth-premium .auth-lead {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.95rem;
  line-height: 1.5;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin: 18px 0 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-tabs:has(.auth-tab:only-child) { grid-template-columns: 1fr; }
.auth-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.7);
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.auth-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.auth-tab:hover:not(.active) { color: #fff; }

.auth-panel[hidden] { display: none !important; }
.auth-panel.active { display: block; animation: authPanelIn 0.28s ease both; }
@keyframes authPanelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.auth-form .field label { color: rgba(241, 245, 249, 0.88); font-weight: 600; font-size: 0.86rem; }
.auth-form input,
.auth-form select,
.auth-card-premium input,
.auth-card-premium select {
  background: rgba(15, 23, 42, 0.55) !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  color: #f8fafc !important;
  border-radius: 12px !important;
  min-height: 46px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.auth-form input:focus,
.auth-form select:focus {
  outline: none;
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
  background: rgba(15, 23, 42, 0.75) !important;
}
.auth-form input::placeholder { color: rgba(148, 163, 184, 0.75); }

.phone-row { display: flex; gap: 8px; }
.phone-row select { max-width: 108px; flex: 0 0 108px; }

.auth-cta {
  margin-top: 8px;
  min-height: 48px;
  border-radius: 14px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  border: 0 !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
.auth-cta:hover { transform: translateY(-1px); filter: brightness(1.05); }
.auth-cta:active { transform: translateY(0); }
.auth-cta.is-loading,
.auth-cta:disabled { opacity: 0.75; cursor: wait; transform: none; }

.otp-boxes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 14px 0 10px;
}
.otp-boxes input {
  text-align: center !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  padding: 10px 0 !important;
  min-height: 52px !important;
}

.auth-otp-copy { color: rgba(226, 232, 240, 0.8); margin: 0 0 4px; }
.auth-back {
  appearance: none;
  border: 0;
  background: transparent;
  color: #93c5fd;
  font: inherit;
  font-weight: 600;
  padding: 0;
  margin: 0 0 12px;
  cursor: pointer;
}
.auth-or {
  text-align: center;
  color: rgba(148, 163, 184, 0.8);
  margin: 14px 0;
  font-size: 0.85rem;
}
.auth-error { min-height: 1.25em; margin-top: 10px; }
.auth-switch, .signup-footer { color: rgba(203, 213, 225, 0.8); text-align: center; margin-top: 18px; }
.auth-switch a, .signup-footer a { color: #93c5fd; font-weight: 600; }

.auth-success {
  text-align: center;
  padding: 28px 8px 12px;
  animation: authPanelIn 0.35s ease both;
}
.auth-success h3 { margin: 14px 0 6px; color: #f8fafc; }
.auth-success-ring {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid rgba(34, 197, 94, 0.35);
  border-top-color: #22c55e;
  animation: authSpin 0.7s linear infinite;
}
@keyframes authSpin { to { transform: rotate(360deg); } }

.auth-card-premium .alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}
.auth-card-premium .alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #bbf7d0;
}
.auth-card-premium .help { color: rgba(203, 213, 225, 0.7); }
.auth-card-premium .password-toggle {
  color: #93c5fd;
  background: transparent;
  border: 0;
}

@media (max-width: 480px) {
  .auth-card-premium { padding: 22px 18px 18px; border-radius: 20px; }
  .otp-boxes { gap: 6px; }
  .otp-boxes input { min-height: 46px !important; font-size: 1.1rem !important; }
}

/* Force dark premium shell even if app.css .auth-shell is light */
.auth-shell.auth-shell-premium {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(37, 99, 235, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(14, 165, 233, 0.14), transparent 50%),
    linear-gradient(165deg, #0b1220 0%, #111827 42%, #0f172a 100%) !important;
}

/* ---- Light onboarding (readable contrast) ---- */
.auth-body-light {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.auth-shell-light {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(255, 106, 0, 0.12), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(37, 99, 235, 0.1), transparent 50%),
    #f1f5f9 !important;
}
.auth-card-light {
  position: relative;
  width: min(960px, 100%);
  padding: 28px 26px 24px;
  border-radius: 24px;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  color: #0f172a !important;
  animation: authCardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.auth-card-light .brand-name { color: #0f172a !important; font-weight: 800; letter-spacing: -0.02em; }
.auth-card-light .brand-sub { color: #64748b !important; }
.auth-card-light .auth-brand { color: inherit; text-decoration: none; }
.auth-card-light h1,
.auth-card-light h2,
.auth-card-light h3 {
  color: #0f172a !important;
  letter-spacing: -0.03em;
}
.auth-card-light .help,
.auth-card-light p {
  color: #475569 !important;
}
.auth-card-light .lang-row a {
  color: #64748b;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 8px;
}
.auth-card-light .lang-row a.active {
  background: rgba(255, 106, 0, 0.12);
  color: #c2410c;
}
.auth-card-light input:not([type="hidden"]):not([type="radio"]):not(.mba-cat-radio),
.auth-card-light select,
.auth-card-light textarea {
  background: #fff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
  border-radius: 12px !important;
}
.auth-card-light input::placeholder,
.auth-card-light textarea::placeholder {
  color: #94a3b8 !important;
}
.auth-card-light input:not([type="hidden"]):not([type="radio"]):not(.mba-cat-radio):focus,
.auth-card-light select:focus,
.auth-card-light textarea:focus {
  outline: none;
  border-color: #ff6a00 !important;
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.18);
}
.auth-card-light .field label { color: #334155 !important; }
.auth-card-light .btn-ghost {
  background: #fff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}
.auth-card-light .btn-primary {
  background: linear-gradient(135deg, #ff6a00, #f97316) !important;
  color: #fff !important;
  border: 0 !important;
}
.auth-card-light .onboard-steps span {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
}
.auth-card-light .onboard-steps span.done {
  background: #fff7ed !important;
  color: #9a3412 !important;
  border-color: #fed7aa !important;
}
.auth-card-light .onboard-steps span.on {
  background: #ff6a00 !important;
  color: #fff !important;
  border-color: #ff6a00 !important;
}
.auth-card-light .country-tile {
  background: #fff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
.auth-card-light .country-tile strong { color: #0f172a !important; }
.auth-card-light .country-tile .help { color: #64748b !important; }
.auth-card-light .country-tile.selected {
  border-color: #ff6a00 !important;
  background: #fff7ed !important;
}
.auth-card-light .category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 960px;
  margin: 16px auto 8px;
}
.auth-card-light .category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 170px;
  height: 100%;
  padding: 24px 20px 20px;
  border: 2px solid #cbd5e1;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  color: #0f172a;
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}
.auth-card-light .category-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.auth-card-light .category-card-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ff6a00;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 22px;
  display: none;
}
.auth-card-light .category-card-icon {
  display: flex;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  max-width: 56px;
  max-height: 56px;
  flex: 0 0 56px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #fff7ed;
  color: #ff6a00;
}
.auth-card-light .category-card-icon svg,
.auth-card-light .category-card svg,
.auth-card-light svg.category-card-svg {
  display: block;
  width: 48px;
  height: 48px;
  max-width: 48px;
  max-height: 48px;
  flex: none;
}
.auth-card-light .category-card-name {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}
.auth-card-light .category-card-desc {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}
.auth-card-light .category-card:hover {
  border-color: #fb923c;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}
.auth-card-light .category-card.selected,
.auth-card-light .category-card:has(.category-radio:checked) {
  border-color: #ff6a00;
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.22), 0 8px 20px rgba(255, 106, 0, 0.12);
}
.auth-card-light .category-card.selected .category-card-check,
.auth-card-light .category-card:has(.category-radio:checked) .category-card-check {
  display: block;
}
.auth-card-light .alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.auth-card-light .alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

/* hidden must beat .btn display */
.auth-card-light [hidden],
.auth-card-premium [hidden],
#onboardForm [hidden],
.btn[hidden] {
  display: none !important;
}

.onboard-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  align-items: center;
}
.onboard-actions .btn-block { flex: 1; }

@media (max-width: 720px) {
  .auth-card-light .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .auth-card-light { padding: 20px 16px 16px; border-radius: 20px; }
  .onboard-actions { flex-wrap: wrap; }
  .onboard-actions .btn-ghost { width: 100%; order: 2; }
}
@media (max-width: 520px) {
  .auth-card-light .category-grid { grid-template-columns: 1fr; }
}

/* Invoice / bill format picker on onboarding (light) */
.auth-card-light .tpl-chooser {
  border: 1.5px solid #e2e8f0 !important;
  background: #fff !important;
  border-radius: 16px !important;
  overflow: hidden;
}
.auth-card-light .tpl-chooser-current {
  color: #0f172a !important;
}
.auth-card-light .tpl-chooser-kicker { color: #64748b !important; }
.auth-card-light .tpl-chooser-name { color: #0f172a !important; font-weight: 800; }
.auth-card-light .tpl-chooser-badge {
  background: #fff7ed !important;
  color: #c2410c !important;
  border: 1px solid #fed7aa;
}
.auth-card-light .tpl-chooser-thumb {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
.auth-card-light .tpl-card {
  background: #fff !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #0f172a !important;
}
.auth-card-light .tpl-card.is-selected {
  border-color: #ff6a00 !important;
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.18) !important;
}
.auth-card-light .tpl-card-meta strong { color: #0f172a !important; }
.auth-card-light .tpl-card-meta span { color: #64748b !important; }
.auth-card-light .tpl-card-meta em { color: #c2410c !important; font-style: normal; font-weight: 700; }
.auth-card-light .tpl-chooser-preview { display: none !important; }
.auth-card-light .tpl-chooser-panel[hidden] { display: none !important; }
.auth-card-light .tpl-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 640px) {
  .auth-card-light .tpl-picker { grid-template-columns: 1fr; }
}
