
/* ============================================================
   NexVault — Global Stylesheet
   Brand: Trust Wallet-inspired design language
   ============================================================ */

/* ── Color Variables ─────────────────────────────────────── */
:root {
  --background:      #ffffff;
  --primary:         #0A64BC;   /* Trust Blue  */
  --secondary:       #58DB23;   /* Trust Green */

  /* Derived / Supporting */
  --primary-dark:    #0851a0;
  --primary-light:   #e8f1fb;
  --primary-xlight:  #f0f6ff;
  --secondary-dark:  #45b81b;
  --secondary-light: #edfbe3;

  --text-dark:       #0d1117;
  --text-mid:        #3a4151;
  --text-muted:      #7c8594;
  --text-light:      #b0b8c5;

  --border:          #e8ecf2;
  --border-strong:   #cdd4df;
  --surface:         #f7f9fc;
  --surface-alt:     #f0f4f9;

  --danger:          #e53935;
  --danger-light:    #fdecea;
  --warning:         #f59e0b;
  --success:         var(--secondary);
  --success-light:   var(--secondary-light);

  --shadow-sm:   0 1px 4px rgba(10,100,188,.07);
  --shadow-md:   0 4px 16px rgba(10,100,188,.10);
  --shadow-lg:   0 8px 32px rgba(10,100,188,.13);
  --shadow-card: 0 2px 12px rgba(13,17,23,.08);

  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-pill: 999px;

  --font-main:  'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Mono', monospace;

  --ease:       cubic-bezier(.4,0,.2,1);
  --ease-out:   cubic-bezier(0,0,.2,1);
  --transition: .22s var(--ease);
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--background);
  color: var(--text-dark);
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout Utilities ────────────────────────────────────── */
.page-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* ── Animated Mesh Background ────────────────────────────── */
.page-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 10% 0%,   rgba(10,100,188,.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 90% 100%,  rgba(88,219,35,.06)  0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 80% 10%,   rgba(10,100,188,.04) 0%, transparent 50%),
    var(--background);
}

/* ── Card ────────────────────────────────────────────────── */
.card-auth {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.75rem 2.5rem;
  width: 100%;
  max-width: 440px;
  position: relative; z-index: 1;
  animation: cardIn .5s var(--ease-out) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* ── Logo / Brand ────────────────────────────────────────── */
.brand-wrap {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 2rem; text-align: center;
}

.brand-shield {
  width: 60px; height: 60px; margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(10,100,188,.30);
  position: relative; overflow: hidden;
}
.brand-shield::after {
  content: '';
  position: absolute; top: -30%; left: -30%;
  width: 70%; height: 70%;
  background: rgba(255,255,255,.18);
  border-radius: 50%;
  filter: blur(8px);
}
.brand-shield svg { width: 32px; height: 32px; fill: #fff; position: relative; z-index:1; }

.brand-name {
  font-size: 1.45rem; font-weight: 700; letter-spacing: -.03em;
  color: var(--text-dark);
}
.brand-name span { color: var(--primary); }

.brand-tagline {
  font-size: .78rem; color: var(--text-muted); margin-top: .2rem;
  letter-spacing: .03em;
}

/* ── Headings ────────────────────────────────────────────── */
.auth-title {
  font-size: 1.35rem; font-weight: 700; letter-spacing: -.025em;
  color: var(--text-dark); margin-bottom: .35rem;
}
.auth-subtitle {
  font-size: .85rem; color: var(--text-muted); margin-bottom: 1.75rem;
  line-height: 1.55;
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  height: 1px; background: var(--border); margin: 1.5rem 0;
}

/* ── Form Controls ───────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }

.form-label {
  display: block; font-size: .78rem; font-weight: 600;
  color: var(--text-mid); margin-bottom: .45rem;
  letter-spacing: .02em;
}

.input-wrap {
  position: relative;
}
.input-icon {
  position: absolute; left: .95rem; top: 50%; transform: translateY(-50%);
  color: var(--text-light); pointer-events: none;
  display: flex; align-items: center;
  transition: color var(--transition);
}
.input-wrap:focus-within .input-icon { color: var(--primary); }

.form-control-custom {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: .78rem .95rem .78rem 2.75rem;
  font-family: var(--font-main); font-size: .9rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.form-control-custom::placeholder { color: var(--text-light); }
.form-control-custom:focus {
  border-color: var(--primary);
  background: var(--background);
  box-shadow: 0 0 0 3.5px rgba(10,100,188,.12);
}
.form-control-custom.is-error {
  border-color: var(--danger);
  background: var(--background);
  box-shadow: 0 0 0 3.5px rgba(229,57,53,.10);
}

/* ── Error Message ───────────────────────────────────────── */
.msg-error {
  display: flex; align-items: center; gap: .5rem;
  background: var(--danger-light);
  border: 1px solid rgba(229,57,53,.2);
  border-radius: var(--radius-sm);
  padding: .7rem .9rem;
  font-size: .82rem; color: var(--danger);
  margin-bottom: 1rem;
  animation: msgIn .25s var(--ease-out) both;
}
.msg-error svg { flex-shrink: 0; width: 15px; height: 15px; }

.msg-success {
  display: flex; align-items: center; gap: .5rem;
  background: var(--success-light);
  border: 1px solid rgba(88,219,35,.25);
  border-radius: var(--radius-sm);
  padding: .7rem .9rem;
  font-size: .82rem; color: var(--secondary-dark);
  margin-bottom: 1rem;
  animation: msgIn .25s var(--ease-out) both;
}
.msg-success svg { flex-shrink: 0; width: 15px; height: 15px; }

@keyframes msgIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Primary Button ──────────────────────────────────────── */
.btn-primary-tw {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; border: none;
  border-radius: var(--radius-pill);
  padding: .85rem 1.5rem;
  font-family: var(--font-main); font-size: .92rem; font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer; position: relative; overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), filter var(--transition);
  box-shadow: 0 4px 14px rgba(10,100,188,.30);
}
.btn-primary-tw::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to right, transparent 0%, rgba(255,255,255,.12) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform .5s var(--ease);
}
.btn-primary-tw:hover {
  box-shadow: 0 6px 20px rgba(10,100,188,.38);
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.btn-primary-tw:hover::after { transform: translateX(100%); }
.btn-primary-tw:active { transform: translateY(0); filter: brightness(.97); }
.btn-primary-tw:disabled {
  opacity: .6; cursor: not-allowed; transform: none;
  box-shadow: none; filter: none;
}

/* Spinner inside button */
.btn-primary-tw .spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin .7s linear infinite;
  vertical-align: middle; margin-right: .4rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Secondary Button ────────────────────────────────────── */
.btn-secondary-tw {
  width: 100%;
  background: transparent;
  color: var(--primary); border: 1.5px solid var(--primary);
  border-radius: var(--radius-pill);
  padding: .82rem 1.5rem;
  font-family: var(--font-main); font-size: .92rem; font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.btn-secondary-tw:hover {
  background: var(--primary-light);
}

/* ── Network Badge (bottom of card) ─────────────────────── */
.network-badge {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  margin-top: 1.75rem;
  font-size: .75rem; color: var(--text-muted);
}
.network-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 0 2px rgba(88,219,35,.25);
  animation: networkPulse 2.4s ease-in-out infinite;
}
@keyframes networkPulse {
  0%,100% { box-shadow: 0 0 0 2px rgba(88,219,35,.25); }
  50%      { box-shadow: 0 0 0 5px rgba(88,219,35,.10); }
}

/* ── Footer Note ─────────────────────────────────────────── */
.auth-footer {
  text-align: center; margin-top: 1.5rem;
  font-size: .75rem; color: var(--text-muted);
}
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Ambient floating shapes ─────────────────────────────── */
.ambient { position: fixed; z-index: 0; pointer-events: none; border-radius: 50%; filter: blur(60px); }
.ambient-1 {
  width: 380px; height: 380px; top: -120px; left: -100px;
  background: rgba(10,100,188,.06);
  animation: drift1 14s ease-in-out infinite alternate;
}
.ambient-2 {
  width: 300px; height: 300px; bottom: -100px; right: -80px;
  background: rgba(88,219,35,.05);
  animation: drift2 18s ease-in-out infinite alternate;
}
.ambient-3 {
  width: 200px; height: 200px; top: 40%; left: 60%;
  background: rgba(10,100,188,.04);
  animation: drift1 22s ease-in-out infinite alternate-reverse;
}
@keyframes drift1 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(30px,20px) scale(1.08); }
}
@keyframes drift2 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-20px,-30px) scale(1.06); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .card-auth { padding: 2rem 1.35rem; border-radius: var(--radius-lg); margin: 1rem; }
  .brand-shield { width: 52px; height: 52px; border-radius: 15px; }
}
