/* ============================================================
   FINANCEL DESIGN SYSTEM v3.2
   Base híbrida: Azul profundo + Verde + Dourado (Padrão C)
   ============================================================ */

/* -------------------------
   RESET BÁSICO
-------------------------- */
:root {
  --financel-yellow: #FACC15;
  --financel-yellow-glow: rgba(250, 204, 21, 0.65);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
}

body {
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

input,
select,
textarea {
  font-family: inherit;
  outline: none;
}

/* -------------------------
   TOKENS GLOBAIS
-------------------------- */
:root {
  /* Base azul */
  --blue-950: #020617;
  --blue-900: #02091f;
  --blue-850: #031024;
  --blue-800: #041227;
  --blue-700: #0b162c;

  /* Verde / teal */
  --green-400: #34d399;
  --green-500: #22c55e;
  --teal-400: #2dd4bf;

  /* Dourado */
  --gold-200: #fef3c7;
  --gold-300: #fde68a;
  --gold-400: #facc15;
  --gold-500: #eab308;

  /* Azul-ciano de destaque */
  --cyan-300: #7dd3fc;
  --cyan-400: #38bdf8;

  /* Cinzas / slate */
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5f5;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Texto */
  --text-main: #e5e7eb;
  --text-soft: #9ca3af;
  --text-muted: #6b7280;
  --text-strong: #f9fafb;

  /* Vidro / superfícies */
  --glass-deep: rgba(4, 18, 39, 0.97);
  --glass-soft: rgba(4, 18, 39, 0.92);
  --glass-thin: rgba(15, 23, 42, 0.72);
  --border-soft: rgba(148, 163, 184, 0.32);
  --border-strong: rgba(148, 163, 184, 0.65);

  /* Gradientes padrão C */
  --grad-app-bg:
    radial-gradient(circle at 0% 0%, rgba(56,189,248,0.16), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(34,197,94,0.18), transparent 55%),
    linear-gradient(145deg, #020617 0%, #02091f 40%, #020617 100%);

  --grad-header:
    radial-gradient(circle at 0% 0%, rgba(248,250,252,0.06), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(250,204,21,0.14), transparent 55%),
    linear-gradient(135deg, rgba(4,18,39,0.98), rgba(4,18,39,0.96));

  --grad-card:
    radial-gradient(circle at 0% 0%, rgba(248,250,252,0.05), transparent 55%),
    radial-gradient(circle at 120% 140%, rgba(56,189,248,0.18), transparent 55%),
    linear-gradient(145deg, rgba(4,18,39,0.99), rgba(4,18,39,0.94));

  --grad-gold-cta: linear-gradient(90deg, #fbbf24, #facc15, #f97316);

  /* Raios / espaçamento */
  --radius-xs: 0.35rem;
  --radius-sm: 0.6rem;
  --radius-md: 0.9rem;
  --radius-lg: 1.3rem;
  --radius-xl: 1.8rem;
  --radius-full: 999px;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  /* Sombras */
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.78);
  --shadow-strong: 0 22px 70px rgba(0, 0, 0, 0.92);
  --shadow-gold: 0 0 28px rgba(250, 204, 21, 0.85);

  /* Transições */
  --transition-fast: 0.15s ease-out;
  --transition-normal: 0.2s ease-out;
  --transition-slow: 0.3s ease-out;

  /* Z-index */
  --z-bg: 0;
  --z-aurora: 1;
  --z-page: 2;
  --z-header: 20;
  --z-nav: 25;
  --z-modal: 50;
  --z-toast: 60;
}

/* -------------------------
   TIPOGRAFIA / UTILITÁRIOS
-------------------------- */

.text-xs { font-size: 0.72rem; }
.text-sm { font-size: 0.82rem; }
.text-md { font-size: 0.9rem; }
.text-lg { font-size: 1.05rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.45rem; }
.text-hero { font-size: 1.65rem; }

.text-muted  { color: var(--text-muted); }
.text-soft   { color: var(--text-soft); }
.text-main   { color: var(--text-main); }
.text-strong { color: var(--text-strong); }
.text-gold   { color: var(--gold-300); }

.font-regular { font-weight: 400; }
.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }
.font-bold    { font-weight: 700; }
.font-black   { font-weight: 800; }

.uppercase     { text-transform: uppercase; }
.tracking-wide { letter-spacing: .08em; }

/* Layout helpers */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding-inline: 1.2rem;
}

/* -------------------------
   BOTÕES
-------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: var(--transition-normal);
}

.btn svg {
  width: 14px;
  height: 14px;
}

/* Primário (gold CTA) */
.btn-primary {
  background: var(--grad-gold-cta);
  color: #111827;
  border-color: rgba(250, 204, 21, 0.78);
  box-shadow:
    0 10px 26px rgba(0,0,0,0.9),
    0 0 18px rgba(250,204,21,0.65);
}
.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

/* Secundário (vidro escuro) */
.btn-secondary {
  background: rgba(4,18,39,0.96);
  border-color: var(--border-soft);
  color: var(--text-soft);
}
.btn-secondary:hover {
  background: rgba(4,18,39,0.98);
  border-color: var(--border-strong);
  color: var(--gold-300);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  border-color: rgba(148,163,184,0.45);
  color: var(--gold-300);
}
.btn-ghost:hover {
  background: rgba(148,163,184,0.08);
}

/* Botão em pill informativo */
.btn-pill {
  padding-inline: 0.8rem;
  padding-block: 0.35rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148,163,184,0.45);
  font-size: 0.78rem;
  color: var(--text-soft);
  background: rgba(4,18,39,0.92);
}

/* Frase da direita no bottom-nav */
.bottom-right {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  margin-left: 0.3rem;
  opacity: 0.65;
}

.bottom-right span {
  color: var(--gold);
}

/* -------------------------
   RESPONSIVIDADE
-------------------------- */

@media (max-width: 640px) {
  .bottom-right {
    display: none;
  }
}

/* Alias para versões antigas */
.financel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-full);
  background: var(--grad-gold-cta);
  color: #111827;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgba(250, 204, 21, 0.78);
  box-shadow:
    0 10px 26px rgba(0,0,0,0.9),
    0 0 18px rgba(250,204,21,0.65);
  transition: var(--transition-normal);
}
.financel-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* Tamanhos */
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.76rem; }
.btn-lg { padding: 0.7rem 1.5rem; font-size: 0.9rem; }

/* -------------------------
   INPUTS / FORM
-------------------------- */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-label {
  font-size: 0.8rem;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.input,
.select,
.textarea,
.financel-input {
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid rgba(148,163,184,0.32);
  background:
    radial-gradient(circle at 0% 0%, rgba(148,163,184,0.18), transparent 55%),
    rgba(4,18,39,0.97);
  color: var(--text-main);
  padding: 0.58rem 0.9rem;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.input::placeholder,
.textarea::placeholder,
.financel-input::placeholder {
  color: var(--text-muted);
}

.input:focus,
.select:focus,
.textarea:focus,
.financel-input:focus {
  border-color: var(--cyan-400);
  box-shadow: 0 0 0 1px rgba(56,189,248,0.5);
}

/* Estados */
.input-error   { border-color: #ef4444; }
.input-success { border-color: var(--green-500); }

/* -------------------------
   BADGES / PILLS / TAGS
-------------------------- */

.badge,
.pill-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  border: 1px solid rgba(148,163,184,0.4);
  background: rgba(4,18,39,0.96);
  color: var(--text-soft);
}

.badge-gold {
  border-color: rgba(250,204,21,0.78);
  background: rgba(250,204,21,0.12);
  color: var(--gold-300);
}

.badge-success {
  border-color: rgba(34,197,94,0.78);
  background: rgba(22,163,74,0.22);
  color: #bbf7d0;
}

.badge-danger {
  border-color: rgba(248,113,113,0.78);
  background: rgba(127,29,29,0.7);
  color: #fecaca;
}

/* -------------------------
   CARDS GENÉRICOS
-------------------------- */

.card {
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem;
  background: var(--grad-card);
  border: 1px solid rgba(15,23,42,0.96);
  box-shadow: var(--shadow-strong);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--gold-300);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* -------------------------
   UTILITÁRIOS DE GRID
-------------------------- */

.grid-2-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.8rem;
}

.grid-3-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.grid-1-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.grid-form-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.9rem;
}

/* -------------------------
   ANIMAÇÕES GLOBAIS
-------------------------- */

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulseSoft {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.96; }
  100% { transform: scale(1); opacity: 1; }
}
