/* ========= MaestroFinanzas — Estilos globales ========= */
/* Paleta v2: azul/verde vibrantes — energía médica, claridad, bienestar */

:root {
  /* Azules vibrantes (trust, medical) */
  --primary:    #1E88E5;
  --primary-d:  #1565C0;
  --primary-l:  #4FC3F7;
  --primary-xl: #81D4FA;

  /* Verdes wellness */
  --accent:     #7CB342;
  --accent-d:   #558B2F;
  --accent-l:   #A0CE4E;

  /* Acento mint/medical */
  --mint:       #26C6DA;
  --mint-d:     #00ACC1;

  /* Detalle dorado / advertencia suave */
  --gold:       #FFB300;

  /* Sistema de estado */
  --green:      #43A047;
  --orange:     #FB8C00;
  --red:        #E53935;

  /* Soft fills */
  --soft:       #E3F2FD;       /* azul claro */
  --soft-warm:  #F1F8E9;       /* verde claro */
  --soft-mint:  #E0F7FA;       /* mint claro */
  --bg:         #F5F9FC;
  --text:       #1A2332;
  --text-soft:  #64748B;
  --border:     #E2E8F0;
  --white:      #FFFFFF;

  /* Gradientes */
  --grad-hero:    linear-gradient(135deg, #1E88E5 0%, #26C6DA 100%);
  --grad-wellness: linear-gradient(135deg, #7CB342 0%, #26C6DA 100%);
  --grad-trust:   linear-gradient(135deg, #1565C0 0%, #1E88E5 100%);
  --grad-soft:    linear-gradient(135deg, #E3F2FD 0%, #F1F8E9 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: 36px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; border: none; }

/* ========= Componentes ========= */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px;
  font-weight: 600; font-size: 14px; transition: all .2s ease;
  border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-d); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(30,136,229,0.3); }
.btn-secondary { background: var(--white); color: var(--primary); border-color: var(--border); }
.btn-secondary:hover { background: var(--soft); }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-d); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(124,179,66,0.3); }
.btn-mint { background: var(--mint); color: var(--white); }
.btn-mint:hover { background: var(--mint-d); }
.btn-ghost { background: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: var(--bg); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(15,30,50,0.04);
  padding: 24px;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.pill-green   { background: #E8F5E9; color: var(--accent-d); }
.pill-mint    { background: var(--soft-mint); color: var(--mint-d); }
.pill-orange  { background: #FFF3E0; color: #E65100; }
.pill-red     { background: #FFEBEE; color: var(--red); }
.pill-blue    { background: var(--soft); color: var(--primary-d); }
.pill-gold    { background: #FFF8E1; color: #B7791F; }

input, select, textarea {
  font-family: inherit; font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  width: 100%;
  background: var(--white);
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,136,229,0.18);
}

/* ========= Layout helpers ========= */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.mobile-frame {
  max-width: 420px;
  margin: 0 auto;
  background: var(--white);
  min-height: 100vh;
  box-shadow: 0 0 32px rgba(15,30,50,0.06);
}

.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}

.app-header .left { display: flex; align-items: center; gap: 12px; }
.app-header .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad-hero); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-soft);
  background: var(--bg);
  border-radius: 8px;
}
.back-link:hover { background: var(--border); text-decoration: none; }

.score-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: #FFF3E0; color: #E65100;
}
.score-badge.good { background: #E8F5E9; color: var(--accent-d); }

/* ========= Animaciones ========= */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .4s ease both; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
.pulse { animation: pulse 1.5s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.float { animation: float 3.5s ease-in-out infinite; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ========= Utilidades ========= */
.text-soft { color: var(--text-soft); }
.text-green { color: var(--accent-d); }
.text-red { color: var(--red); }
.text-orange { color: var(--orange); }
.text-primary { color: var(--primary); }
.text-mint { color: var(--mint-d); }
.text-accent { color: var(--accent-d); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.bold { font-weight: 700; }
.semibold { font-weight: 600; }
