/* ============================================================
   Alívio do Endividado — Design System "Dark Premium"
   Tema: dark sofisticado, dourado discreto, serifa elegante
   ============================================================ */

:root {
  --bg: #0a0e1a;
  --card: #12172a;
  --card-hover: #1a2038;

  --gold: #d4a843;
  --gold-dim: rgba(212, 168, 67, 0.12);
  --gold-border: rgba(212, 168, 67, 0.20);

  --green: #10b981;
  --green-dim: rgba(16, 185, 129, 0.12);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.12);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.12);
  --orange: #f59e0b;
  --orange-dim: rgba(245, 158, 11, 0.12);
  --purple: #a78bfa;
  --purple-dim: rgba(167, 139, 250, 0.12);

  --gray-light: #94a3b8;
  --indigo: #4f46e5;

  --text: #e4e8f1;
  --text-dim: #6b7a99;
  --border: rgba(255, 255, 255, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ============= SCROLLBAR ============= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

/* ============= LAYOUT BASE ============= */
.app-container {
  max-width: 520px;
  margin: 0 auto;
  padding: 12px;
  min-height: 100vh;
}

/* ============= TIPOGRAFIA RESET ============= */
h1, h2, h3, h4, h5, h6, p { margin: 0; }

/* ============= APP HEADER (PAINEL) ============= */
.app-header {
  text-align: center;
  padding: 16px 0 20px 0;
}

.app-header h1 {
  font-family: 'Playfair Display', serif;
  color: var(--gold);
  font-size: 1.6em;
  font-weight: 700;
  margin: 0 0 6px 0;
  letter-spacing: 0.5px;
}

.app-header .subtitulo {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-dim);
  font-size: 0.78em;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

/* ============= LEMA CARD (frase do herói) ============= */
.lema-card {
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.10), rgba(212, 168, 67, 0.03));
  border: 1px solid var(--gold-border);
  border-radius: 14px;
  padding: 14px 18px;
  text-align: center;
  margin-bottom: 16px;
}

.lema-card .icone {
  font-size: 1.3em;
  margin-bottom: 4px;
  display: block;
}

.lema-card .texto {
  font-family: 'DM Sans', sans-serif;
  color: var(--gold);
  font-size: 0.92em;
  font-weight: 600;
  font-style: italic;
}

/* ============= SECTION CARD (cards de navegação) ============= */
.section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: 0.15s;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

.section-card:hover {
  background: var(--card-hover);
}

.section-card:active {
  transform: scale(0.98);
}

.section-card h3 {
  font-family: 'Playfair Display', serif;
  color: var(--gold);
  font-size: 1.05em;
  margin: 0 0 6px 0;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-card p {
  color: var(--text-dim);
  font-size: 0.82em;
  margin: 0;
  line-height: 1.4;
}

/* ============= GRID DOS CARDS DO PAINEL (responsivo) ============= */
#cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
}

#cards-grid .section-card {
  margin-bottom: 0;
  text-align: center;
}

#cards-grid .section-card h3 {
  justify-content: center;
}

@media (min-width: 520px) {
  #cards-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============= DADOS LOCAIS (backup) ============= */
.dados-locais {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 16px;
}

.dados-locais h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin: 0 0 6px 0;
}

.dados-locais .descricao {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8em;
  color: var(--text-dim);
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.dados-locais .botoes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ============= BOTÕES ============= */
.btn-primario {
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.88em;
  cursor: pointer;
  transition: 0.15s;
  min-height: 44px;
}
.btn-primario:hover { background: #c19838; }
.btn-primario:active { transform: scale(0.97); }

.btn-secundario {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.88em;
  cursor: pointer;
  transition: 0.15s;
  min-height: 44px;
}
.btn-secundario:hover { background: var(--card-hover); border-color: rgba(255, 255, 255, 0.12); }
.btn-secundario:active { transform: scale(0.97); }

.btn-perigo {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red-dim);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.88em;
  cursor: pointer;
  transition: 0.15s;
  min-height: 44px;
}
.btn-perigo:hover { background: var(--red-dim); }
.btn-perigo:active { transform: scale(0.97); }

/* ============= BOTÃO VOLTAR ============= */
.btn-voltar {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82em;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.btn-voltar:hover { background: var(--card-hover); color: var(--text); }
.btn-voltar:active { transform: scale(0.97); }

/* ============= TÍTULOS DE TELA INTERNA ============= */
.tela-titulo {
  font-family: 'Playfair Display', serif;
  color: var(--gold);
  font-size: 1.6em;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.tela-subtitulo {
  font-family: 'DM Sans', sans-serif;
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.9em;
  margin: 0 0 20px 0;
}

/* ============= PLACEHOLDER DE FASE ============= */
.placeholder-fase {
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.06), rgba(212, 168, 67, 0.02));
  border: 1px solid var(--gold-border);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  color: var(--text-dim);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88em;
  font-style: italic;
  margin-top: 24px;
}

.placeholder-fase .icone {
  font-size: 1.5em;
  display: block;
  margin-bottom: 8px;
  opacity: 0.6;
}

/* ============= RODAPÉ ============= */
.rodape-frase {
  text-align: center;
  padding: 24px 16px;
  font-family: 'DM Sans', sans-serif;
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.82em;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

/* ============= ESTADOS DE TOQUE UNIVERSAL ============= */
.touchable:active { transform: scale(0.98); }
button:active { transform: scale(0.97); }

/* ============= UTILS ============= */
.hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
