/* ==========================================================================
   FXB AUTH — split-screen auth (login / register / forgot password)
   --------------------------------------------------------------------------
   Flat amber-fintech look ported from the reference app (E:\wep_apps\sakthinew
   auth UI). COLOR comes from css/fxb-tokens.css — every palette + light/medium/
   dark mode from the appearance panel recolors this screen. Dark hero on the
   left, clean light form panel on the right. Keeps every .fxa-* class the
   login/Register/fogpass markup depends on. Overrides assets/css/login.css.
   ========================================================================== */

/* ---------- Self-hosted Poppins (auth pages only) ------------------------
   The font stack lists 'Inter','Poppins' but neither was bundled — auth pages
   pulled Poppins from the Google CDN (fails on an offline server), so inputs
   fell back to a mismatched system font. Self-host Poppins from /fonts so the
   auth screens render identically online or offline. Weights map to the .ttf
   files already present in the /fonts folder.
   ------------------------------------------------------------------------- */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/Poppins-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/Poppins-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/Poppins-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/Poppins-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/Poppins-ExtraBold.ttf') format('truetype'); }

* { box-sizing: border-box; }

body.fxb-auth {
  margin: 0;
  font-family: 'Inter', 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif !important;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
}

.fxa-wrap { display: flex; min-height: 100vh; }

/* ---------- Left decorative hero panel ----------------------------------- */
.fxa-hero {
  position: relative;
  width: 50%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 52px;
  color: #fdf6ee;
  background:
    radial-gradient(900px 600px at 18% 8%, hsl(var(--primary) / 0.34), transparent 60%),
    radial-gradient(700px 520px at 86% 94%, hsl(var(--primary) / 0.22), transparent 60%),
    linear-gradient(140deg, hsl(24 90% 12%) 0%, hsl(20 18% 6%) 55%, hsl(30 40% 10%) 100%);
}
.fxa-orb { position: absolute; border-radius: 9999px; filter: blur(80px); opacity: 0.5; pointer-events: none; animation: fxa-float 14s ease-in-out infinite; }
.fxa-orb.o1 { width: 420px; height: 420px; background: hsl(var(--primary) / 0.85); top: -120px; right: -110px; }
.fxa-orb.o2 { width: 360px; height: 360px; background: hsl(var(--primary)); bottom: -130px; left: -80px; animation-delay: 2s; }
.fxa-orb.o3 { width: 240px; height: 240px; background: hsl(var(--primary) / 0.55); top: 36%; left: 46%; opacity: 0.38; animation-delay: 4s; }
@keyframes fxa-float { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(14px,-24px,0); } }

.fxa-hero__grid {
  position: absolute; inset: 0; opacity: 0.06; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.5) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000, transparent 75%);
}

.fxa-brand { position: relative; display: flex; align-items: center; gap: 14px; }
.fxa-brand__logo { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--primary)), hsl(38 95% 58%)); box-shadow: 0 14px 30px -8px hsl(var(--primary) / 0.5); }
.fxa-brand__logo img { width: 34px; height: 34px; }
.fxa-brand__name { font-size: 1.4rem; font-weight: 700; line-height: 1; }
.fxa-brand__name b { color: hsl(38 95% 70%); }
.fxa-brand__tag { margin-top: 4px; font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,236,214,.72); }

.fxa-hero__center { position: relative; }
.fxa-hero__center h2 { font-size: clamp(1.6rem, 2.4vw, 2.3rem); font-weight: 800; line-height: 1.18; margin: 0 0 10px; }
.fxa-hero__center h2 span { background: linear-gradient(135deg, hsl(38 95% 62%), #ffe0a3); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.fxa-hero__center p { color: rgba(255,243,230,.78); max-width: 420px; margin: 0 0 26px; }

.fxa-feature { display: flex; align-items: flex-start; gap: 14px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); backdrop-filter: blur(6px); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; border-left: 4px solid hsl(var(--primary)); }
.fxa-feature i { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: hsl(var(--primary) / 0.18); color: hsl(38 95% 64%); }
.fxa-feature b { display: block; font-size: .95rem; }
.fxa-feature span { font-size: .82rem; color: rgba(255,243,230,.7); }

.fxa-hero__foot { position: relative; display: flex; align-items: center; justify-content: space-between; font-size: .8rem; color: rgba(255,236,214,.6); }
.fxa-online { display: inline-flex; align-items: center; gap: 8px; }
.fxa-online .dot { position: relative; width: 8px; height: 8px; }
.fxa-online .dot::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: hsl(var(--success)); animation: fxa-ping 1.6s ease-out infinite; }
.fxa-online .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: hsl(var(--success)); }
@keyframes fxa-ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }

/* ---------- Right form panel --------------------------------------------- */
.fxa-panel {
  width: 50%;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 700px at 100% 0%, hsl(var(--accent) / 0.6) 0%, transparent 55%),
    linear-gradient(180deg, hsl(var(--background)), hsl(var(--card)));
}
.fxa-panel__top { display: flex; align-items: center; justify-content: flex-end; padding: 22px 30px; }
.fxa-back { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; color: hsl(var(--muted-foreground)); text-decoration: none; transition: color .15s ease; }
.fxa-back:hover { color: hsl(var(--primary)); }

.fxa-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 10px 24px 48px; }
.fxa-card {
  position: relative;
  width: 100%; max-width: 440px;
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 8px);
  box-shadow: 0 30px 70px -28px hsl(var(--foreground) / 0.22);
  padding: 38px 36px;
  animation: fxa-rise .5s cubic-bezier(.21, .6, .35, 1) both;
}
.fxa-card.fxa-card-wide { max-width: 540px; }
@keyframes fxa-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* mobile brand (shown only on small screens) */
.fxa-mbrand { display: none; align-items: center; gap: 10px; margin-bottom: 22px; }
.fxa-mbrand .fxa-brand__logo { width: 44px; height: 44px; border-radius: 14px; }
.fxa-mbrand .fxa-brand__logo img { width: 26px; height: 26px; }
.fxa-mbrand span { font-weight: 700; font-size: 18px; color: hsl(var(--foreground)); }
.fxa-mbrand b { color: hsl(var(--primary)); }

.fxa-badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid hsl(var(--primary) / 0.25); background: hsl(var(--primary) / 0.09);
  color: hsl(var(--accent-foreground)); font-size: 12px; font-weight: 600; letter-spacing: .02em;
  padding: 6px 13px; border-radius: 999px; margin-bottom: 18px;
}
.fxa-title { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; color: hsl(var(--foreground)); }
.fxa-sub { color: hsl(var(--muted-foreground)); font-size: 15px; margin: 0 0 26px; }

/* fields */
.fxa-field { margin-bottom: 17px; }
.fxa-field label { display: block; font-size: 13px; font-weight: 600; color: hsl(var(--foreground)); margin-bottom: 7px; }
.fxa-field label .req { color: hsl(var(--destructive)); }
.fxa-input { position: relative; }
.fxa-input > i.fxa-lead {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: hsl(var(--muted-foreground)); font-size: 15px; pointer-events: none;
  transition: color .15s ease;
}
.fxa-input input,
.fxa-input select {
  width: 100%; height: 48px; border-radius: var(--radius);
  border: 1px solid hsl(var(--input));
  background: hsl(var(--card));
  padding: 0 16px 0 42px;
  font-family: 'Poppins', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 14px; font-weight: 500; letter-spacing: .01em; line-height: 1.2;
  color: hsl(var(--foreground));
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-appearance: none; appearance: none;
}
.fxa-input select { padding-right: 40px; cursor: pointer; }
.fxa-input input::placeholder { color: hsl(var(--muted-foreground)); font-weight: 400; font-size: 14px; }
/* strip the native number-input spinners (Mobile / Aadhar fields) so they
   line up with the text inputs instead of reserving room for step arrows */
.fxa-input input[type="number"] { -moz-appearance: textfield; }
.fxa-input input[type="number"]::-webkit-outer-spin-button,
.fxa-input input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* keep browser autofill from repainting the field white with a serif font */
.fxa-input input:-webkit-autofill,
.fxa-input input:-webkit-autofill:hover,
.fxa-input input:-webkit-autofill:focus {
  -webkit-text-fill-color: hsl(var(--foreground));
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  -webkit-box-shadow: 0 0 0 1000px hsl(var(--card)) inset;
  caret-color: hsl(var(--foreground));
}
.fxa-input input:focus,
.fxa-input select:focus { outline: 0; border-color: hsl(var(--ring)); background: hsl(var(--card)); box-shadow: 0 0 0 .22rem hsl(var(--ring) / 0.2); }
.fxa-input:focus-within > i.fxa-lead { color: hsl(var(--primary)); }
.fxa-eye {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: hsl(var(--muted-foreground)); cursor: pointer; padding: 6px; line-height: 0; font-size: 15px;
}
.fxa-eye:hover { color: hsl(var(--primary)); }
.fxa-hint { display: block; margin-top: 6px; font-size: 12px; }

.fxa-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.fxa-link { color: hsl(var(--accent-foreground)); font-size: 13px; font-weight: 600; text-decoration: none; }
.fxa-link:hover { text-decoration: underline; }

/* Custom combo chevron (matches member selects) */
.fxa-input select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 13px;
}
:root[data-theme='dark'] .fxa-input select,
:root[data-theme='medium'] .fxa-input select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
.fxa-input select::-ms-expand { display: none; }

.fxa-btn {
  position: relative;
  overflow: hidden;
  width: 100%; height: 50px; border: 0; border-radius: var(--radius); cursor: pointer;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); font-family: inherit; font-size: 16px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 14px 30px -10px hsl(var(--primary) / 0.45);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.fxa-btn:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 18px 38px -12px hsl(var(--primary) / 0.5); }
.fxa-btn:disabled { filter: grayscale(.3) opacity(.7); cursor: not-allowed; transform: none; }
.fxa-btn::after {
  content: "";
  position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-18deg);
  transition: left .6s ease;
  pointer-events: none;
}
.fxa-btn:hover::after { left: 130%; }

.fxa-foot { margin-top: 22px; text-align: center; font-size: 14px; color: hsl(var(--muted-foreground)); }
.fxa-foot a { color: hsl(var(--accent-foreground)); font-weight: 600; text-decoration: none; }
.fxa-foot a:hover { text-decoration: underline; }

/* two-column field grid for the wider register card */
.fxa-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* ---------- Responsive ---------------------------------------------------- */
@media (max-width: 992px) {
  .fxa-hero { display: none; }
  .fxa-panel { width: 100%; }
  .fxa-mbrand { display: flex; }
}
@media (max-width: 540px) {
  .fxa-card { padding: 30px 22px; }
  .fxa-grid2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .fxa-card, .fxa-orb { animation: none !important; }
  .fxa-btn::after { display: none; }
  .fxa-btn:hover { transform: none; }
}
