/* ============================================================
   RapiPrestamos YA — Auth premium (login / register)
   ============================================================ */

/* ===== LAYOUT ===== */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* ===== SIDE PANEL (premium) ===== */
.auth-side {
  position: relative;
  background: #0B1A3A;
  color: white;
  padding: 48px 56px;
  display: flex; flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.auth-side::before {
  content: '';
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 50% at 80% 0%,  rgba(99, 102, 241, 0.55) 0%, transparent 60%),
    radial-gradient(50% 45% at 0% 100%, rgba(16, 185, 129, 0.30) 0%, transparent 60%),
    radial-gradient(80% 80% at 50% 50%, rgba(139, 92, 246, 0.18) 0%, transparent 70%),
    linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #0B1A3A 100%);
  background-size: 200% 200%, 200% 200%, 200% 200%, 100% 100%;
  animation: meshFloat 24s ease-in-out infinite;
}
.auth-side::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 80%);
  pointer-events: none;
}
@keyframes meshFloat {
  0%, 100% { background-position: 0% 0%, 0% 100%, 0% 0%, 0% 0%; }
  50%      { background-position: 60% 30%, 30% 60%, 50% 50%, 0% 0%; }
}

/* Floating decorative orbs */
.auth-side .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}
.auth-side .orb-1 {
  width: 300px; height: 300px;
  top: -80px; right: -60px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.40), transparent 70%);
  animation: orbDrift 18s ease-in-out infinite;
}
.auth-side .orb-2 {
  width: 240px; height: 240px;
  bottom: 80px; left: -40px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.32), transparent 70%);
  animation: orbDrift 22s ease-in-out infinite reverse;
}
@keyframes orbDrift {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(30px, -20px); }
  66%      { transform: translate(-20px, 30px); }
}

.auth-brand {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 18px; font-weight: 800; letter-spacing: -0.01em;
  color: white;
  text-decoration: none;
  align-self: flex-start;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s, border-color 0.2s;
}
.auth-brand:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.20);
}
.auth-brand .logo-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
}

.auth-side-content {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 520px;
  padding: 56px 0;
}
.auth-side h1 {
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
  color: white;
}
.auth-side h1 .accent {
  background: linear-gradient(135deg, #A5B4FC 0%, #6EE7B7 50%, #FCD34D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-side .lead {
  font-size: 17px;
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.55;
  margin-bottom: 36px;
  max-width: 460px;
}

/* Stat card (social proof) */
.auth-stat-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 32px;
  max-width: 460px;
}
.auth-stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.30), rgba(99, 102, 241, 0.30));
  display: flex; align-items: center; justify-content: center;
  color: #6EE7B7;
  flex-shrink: 0;
}
.auth-stat-num {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: white;
  line-height: 1.1;
}
.auth-stat-label {
  font-size: 13px;
  color: rgba(226, 232, 240, 0.70);
  margin-top: 2px;
}

.auth-features {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 14px;
  max-width: 460px;
}
.auth-features li {
  display: flex; align-items: flex-start; gap: 14px;
  font-size: 14px;
  color: rgba(226, 232, 240, 0.92);
  line-height: 1.5;
}
.auth-features svg {
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(110, 231, 183, 0.25), rgba(34, 197, 94, 0.20));
  color: #6EE7B7;
  border-radius: 50%;
  padding: 5px;
  width: 24px; height: 24px;
  border: 1px solid rgba(110, 231, 183, 0.20);
}
.auth-features strong {
  color: white;
  font-weight: 700;
}

/* Trust strip */
.auth-side-footer {
  position: relative; z-index: 2;
  display: flex; gap: 24px; flex-wrap: wrap; align-items: center;
  padding-top: 24px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(226, 232, 240, 0.55);
  font-weight: 600;
}
.auth-trust-item {
  display: inline-flex; align-items: center; gap: 6px;
}
.auth-trust-item svg {
  color: #6EE7B7;
  width: 14px; height: 14px;
}

/* ===== FORM SIDE ===== */
.auth-main {
  padding: 40px 48px;
  display: flex; flex-direction: column;
  background: var(--bg);
  overflow-y: auto;
  position: relative;
}
.auth-main-top {
  display: flex; justify-content: flex-end; align-items: center; gap: 14px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}
.auth-main-top a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  transition: background 0.15s;
}
.auth-main-top a:hover { background: var(--primary-50); }

.auth-form-wrap {
  max-width: 440px;
  width: 100%;
  margin: auto;
  padding: 16px 0 32px;
}

.auth-form-header { margin-bottom: 32px; }
.auth-form-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--primary);
  font-size: 12px; font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 16px;
  padding: 5px 12px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: 999px;
}
.auth-form-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  60%      { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.auth-form-title {
  font-size: clamp(28px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 10px;
  color: var(--ink);
}
.auth-form-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
}
.auth-form-sub a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.auth-form-sub a:hover { text-decoration: underline; }

/* ===== FIELDS premium ===== */
.auth-field {
  margin-bottom: 18px;
}
.auth-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.auth-label .req { color: var(--danger); }
.auth-label-optional {
  margin-left: auto;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}

.auth-input-wrap {
  position: relative;
  display: flex; align-items: stretch;
}
.auth-input,
.auth-select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: white;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.auth-input::placeholder { color: var(--muted); font-weight: 400; }
.auth-input:focus,
.auth-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.auth-input:hover:not(:focus):not(.is-error):not(.is-valid) {
  border-color: #CBD5E1;
}
.auth-input.has-icon { padding-left: 44px; }
.auth-input.has-action { padding-right: 44px; }

.auth-input-icon {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  transition: color 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.auth-input-wrap:focus-within .auth-input-icon { color: var(--primary); }

.auth-input.is-valid {
  border-color: var(--accent);
  background: linear-gradient(0deg, rgba(16, 185, 129, 0.02), rgba(16, 185, 129, 0.02)), white;
  padding-right: 44px;
}
.auth-input.is-error {
  border-color: var(--danger);
  background: linear-gradient(0deg, rgba(239, 68, 68, 0.02), rgba(239, 68, 68, 0.02)), white;
  padding-right: 44px;
}
.auth-input.is-error:focus { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12); }

.auth-input-status {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s, transform 0.25s var(--ease-out);
}
.auth-input.is-valid + .auth-input-status,
.auth-input.is-valid ~ .auth-input-status {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  color: var(--accent);
}
.auth-input.is-error + .auth-input-status,
.auth-input.is-error ~ .auth-input-status {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  color: var(--danger);
}

.password-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: transparent; border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 6px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  z-index: 1;
}
.password-toggle:hover {
  color: var(--primary);
  background: var(--bg-soft);
}

.auth-hint {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.45;
}
.auth-hint svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--primary);
}
.auth-error-msg {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px;
  color: var(--danger-700);
  font-weight: 600;
  margin-top: 7px;
  animation: shake 0.3s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-3px); }
  40%, 80% { transform: translateX(3px); }
}

/* Compose 2-column row */
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.doc-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
}
.doc-row .auth-select {
  padding: 13px 12px;
  font-weight: 700;
}

/* ===== PASSWORD STRENGTH ===== */
.auth-strength {
  display: flex; gap: 4px;
  margin-top: 8px;
}
.auth-strength-bar {
  flex: 1; height: 4px;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.25s, transform 0.18s;
}
.auth-strength-bar.is-on-1 { background: #EF4444; transform: scaleY(1.15); }
.auth-strength-bar.is-on-2 { background: #F59E0B; transform: scaleY(1.15); }
.auth-strength-bar.is-on-3 { background: #10B981; transform: scaleY(1.15); }
.auth-strength-bar.is-on-4 { background: var(--accent); transform: scaleY(1.15); }
.auth-strength-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
  font-weight: 600;
}
.auth-strength-label.is-strong { color: var(--accent-700); }
.auth-strength-label.is-medium { color: #B45309; }
.auth-strength-label.is-weak   { color: var(--danger-700); }

/* Inline rule chips */
.auth-rules {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 8px;
}
.auth-rule {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  transition: all 0.2s;
}
.auth-rule.is-met {
  color: var(--accent-700);
  background: var(--accent-50);
  border-color: #A7F3D0;
}
.auth-rule svg {
  width: 11px; height: 11px;
  opacity: 0.6;
}
.auth-rule.is-met svg { opacity: 1; }

/* ===== CONSENT ===== */
.auth-consent {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 24px 0 8px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.auth-consent:hover {
  border-color: var(--primary-100);
  background: var(--primary-50);
}
.auth-consent input {
  margin-top: 2px;
  flex-shrink: 0;
  width: 18px; height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}
.auth-consent strong { color: var(--ink); font-weight: 700; }
.auth-consent a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--primary-100);
  text-underline-offset: 2px;
}
.auth-consent a:hover { text-decoration-color: var(--primary); }

/* Inline link helpers */
.auth-link-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: -4px; margin-bottom: 8px;
}
.auth-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.auth-link:hover { text-decoration: underline; }

.auth-checkbox-line {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 600;
  cursor: pointer;
}
.auth-checkbox-line input {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ===== BUTTON ===== */
.auth-submit {
  margin-top: 22px;
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 100%);
  color: white;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.30);
  transition: transform 0.15s, box-shadow 0.25s, opacity 0.2s;
  border: none; cursor: pointer;
  letter-spacing: -0.005em;
}
.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.40);
}
.auth-submit:active { transform: translateY(0); }
.auth-submit svg { transition: transform 0.2s; }
.auth-submit:hover svg { transform: translateX(3px); }
.auth-submit:disabled {
  opacity: 0.65; cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== DIVIDER ===== */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 26px 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ===== ERROR BOX ===== */
.auth-error {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(0deg, var(--danger-50), white);
  border: 1px solid #FECACA;
  border-radius: var(--radius);
  color: var(--danger-700);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 22px;
  line-height: 1.5;
  animation: shake 0.4s ease;
}
.auth-error svg { flex-shrink: 0; margin-top: 2px; }
.auth-error strong { font-weight: 700; }

.auth-success {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(0deg, var(--accent-50), white);
  border: 1px solid #A7F3D0;
  color: #065F46;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 22px;
  line-height: 1.5;
}
.auth-success svg { flex-shrink: 0; margin-top: 2px; }

/* ===== FOOTER LINK ===== */
.auth-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.auth-footer a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side {
    display: none;
  }
  .auth-side-mobile {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, #6366F1 100%);
    color: white;
    font-size: 13px;
    font-weight: 600;
  }
  .auth-side-mobile .logo-mark {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.20);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
  }
  .auth-main { padding: 32px 24px; min-height: calc(100vh - 56px); }
}

@media (max-width: 480px) {
  .auth-main { padding: 24px 20px; }
  .auth-row { grid-template-columns: 1fr; gap: 0; }
  .auth-form-title { font-size: 26px; }
  .doc-row { grid-template-columns: 100px 1fr; }
}

/* ============================================================
   USER PANEL (sin cambios)
   ============================================================ */

body.dashboard {
  background: var(--bg-soft);
  min-height: 100vh;
}

.dash-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.dash-greeting {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.dash-avatar {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, #6366F1 100%);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.30);
  flex-shrink: 0;
}
.dash-greeting-text { flex: 1; min-width: 0; }
.dash-greeting-eyebrow {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.dash-greeting-name {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.dash-stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.25s;
}
.dash-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.dash-stat-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.dash-stat-label svg {
  width: 16px; height: 16px;
  color: var(--primary);
}
.dash-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.dash-stat-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: flex-start;
}

.dash-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 16px;
}
.dash-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}
.dash-card-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.dash-card-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.dash-card-link:hover { text-decoration: underline; }

.dash-cta-card {
  background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 50%, #6366F1 100%);
  border-radius: var(--radius-xl);
  padding: 36px;
  color: white;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.20);
}
.dash-cta-card::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
}
.dash-cta-card h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
  position: relative; z-index: 1;
}
.dash-cta-card p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 22px;
  max-width: 520px;
  position: relative; z-index: 1;
}
.dash-cta-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  position: relative; z-index: 1;
}
.dash-cta-actions .btn-primary {
  background: white;
  color: var(--primary);
  font-weight: 700;
}
.dash-cta-actions .btn-primary:hover {
  background: white;
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.20);
}
.dash-cta-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.10);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s;
}
.dash-cta-ghost:hover { background: rgba(255, 255, 255, 0.18); }

.app-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 12px;
}
.app-item {
  display: flex; gap: 16px; align-items: center;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}
.app-item:hover {
  border-color: var(--primary-100);
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
}
.app-item-status {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--primary-50);
  color: var(--primary);
}
.app-item-status.approved { background: var(--accent-50); color: var(--accent-700); }
.app-item-status.rejected { background: var(--danger-50); color: var(--danger-700); }
.app-item-status.review   { background: var(--warn-50);   color: var(--warn-700); }
.app-item-status.pending  { background: var(--primary-50); color: var(--primary); }

.app-item-body { flex: 1; min-width: 0; }
.app-item-amount {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.app-item-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.app-item-meta .ref {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.app-item-meta .dot { color: var(--line); }
.app-item-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.app-item-tag.approved { background: var(--accent-50); color: var(--accent-700); }
.app-item-tag.rejected { background: var(--danger-50); color: var(--danger-700); }
.app-item-tag.review   { background: var(--warn-50);   color: var(--warn-700); }
.app-item-tag.pending  { background: var(--primary-50); color: var(--primary-dark); }

.app-list-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.app-list-empty-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-soft);
  color: var(--muted);
  margin-bottom: 14px;
}
.app-list-empty h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}

/* ===== USER MENU ===== */
.user-menu {
  position: relative;
  display: inline-flex;
}
.user-menu-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 6px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.user-menu-btn:hover { background: var(--bg-soft); border-color: var(--line); }
.user-menu-btn .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #6366F1 100%);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.user-menu-btn .name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.user-menu-btn .chevron {
  width: 14px; height: 14px;
  color: var(--muted);
  transition: transform 0.15s;
}
.user-menu.is-open .user-menu-btn .chevron { transform: rotate(180deg); }
.user-menu-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 240px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  padding: 8px;
  display: none;
  z-index: 60;
}
.user-menu.is-open .user-menu-dropdown { display: block; }
.user-menu-dropdown a, .user-menu-dropdown button {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.user-menu-dropdown a svg, .user-menu-dropdown button svg {
  color: var(--muted);
  flex-shrink: 0;
  transition: color 0.15s;
}
.user-menu-dropdown a:hover, .user-menu-dropdown button:hover {
  background: var(--bg-soft);
  color: var(--primary);
}
.user-menu-dropdown a:hover svg, .user-menu-dropdown button:hover svg { color: var(--primary); }
.user-menu-divider {
  height: 1px; margin: 6px 0;
  background: var(--line);
}
.user-menu-header {
  padding: 12px;
  border-radius: 8px;
  background: var(--bg-soft);
  margin-bottom: 6px;
}
.user-menu-header .name { font-weight: 800; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.user-menu-header .email { font-size: 12px; color: var(--muted); word-break: break-all; }

@media (max-width: 980px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .dash-cta-card { padding: 28px 24px; }
  .dash-cta-card h2 { font-size: 22px; }
  .dash-cta-actions { flex-direction: column; }
  .dash-cta-actions > * { width: 100%; }
  .dash-card { padding: 22px; }
  .user-menu-btn .name { display: none; }
}

/* ============================================================
   PROGRAMA DE REFERIDOS
   ============================================================ */
.referral-hero {
  position: relative;
  background: linear-gradient(135deg, #1E1B4B 0%, #2563EB 50%, #6366F1 100%);
  color: white;
  border-radius: var(--radius-xl);
  padding: 40px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.30);
}
.referral-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 50% at 100% 0%, rgba(110, 231, 183, 0.30) 0%, transparent 60%),
    radial-gradient(50% 40% at 0% 100%, rgba(252, 211, 77, 0.25) 0%, transparent 60%);
}
.referral-hero::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
}
.referral-hero-content {
  position: relative;
  z-index: 1;
}
.referral-amount {
  font-size: clamp(56px, 10vw, 96px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #FFFFFF 0%, #C7D2FE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.referral-description {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 26px;
  line-height: 1.55;
  max-width: 480px;
}
.referral-description strong { color: #FCD34D; font-weight: 800; }

.referral-code-box {
  background: rgba(255, 255, 255, 0.10);
  border: 1px dashed rgba(255, 255, 255, 0.30);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.referral-code-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.70);
  margin-bottom: 8px;
}
.referral-code-row {
  display: flex; align-items: center; gap: 12px;
}
.referral-code {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: white;
  background: transparent;
  text-shadow: 0 0 20px rgba(165, 180, 252, 0.6);
}
.referral-copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: white;
  color: var(--ink);
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.2s;
  flex-shrink: 0;
}
.referral-copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.20);
}
.referral-copy-btn.copied { background: var(--accent); color: white; }

.referral-share {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.referral-share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.referral-share-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.referral-share-btn.whatsapp:hover { background: #25D366; border-color: #25D366; }
.referral-share-btn.copied { background: var(--accent); border-color: var(--accent); }

.referral-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.referral-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.referral-step-num {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}
.referral-step-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.referral-step-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
