/* ═══ FINLEARN — app-extra.css ══════════════════════════════════
   Overflow de app.css. Cargado después de app.css.
   Contiene: estilos de features añadidas (GUIDES, INCOME PANEL, etc.)
   Prefijos: .guide-  .income-
   Seguir añadiendo aquí estilos nuevos.
══════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════
   GUIDES — Pantalla de artículos de lectura libre
   Prefijo: .guide-
══════════════════════════════════════════════════════════════════ */

/* ── Contenedor principal ── */
.guide-screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

/* ── Barra de progreso ── */
.guide-progress-bar {
  height: 4px;
  background: var(--surface2);
  margin: 0;
}
.guide-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  transition: width .4s ease;
}

/* ── Chips de categoría ── */
.guide-cats {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.guide-cats::-webkit-scrollbar { display: none; }
.guide-cat-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--surface2);
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  transition: all .15s;
}
.guide-cat-btn.active,
.guide-cat-btn:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
body.light-mode .guide-cat-btn { border-color: #ddd; background: #f5f5f5; color: #555; }
body.light-mode .guide-cat-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }

/* ── Lista de artículos ── */
.guide-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 16px 100px;
}
.guide-empty {
  text-align: center;
  color: var(--text2);
  padding: 40px 0;
  font-size: 15px;
}

/* ── Tarjeta de artículo ── */
.guide-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid var(--surface2);
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.guide-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.guide-card-read { opacity: .7; }
.guide-card-read::after {
  content: '';
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0,229,160,.04) 0%, transparent 60%);
  pointer-events: none;
}
body.light-mode .guide-card { background: #fff; border-color: #e0e0e0; }
body.light-mode .guide-card:hover { border-color: var(--accent); }

.guide-card-icon { font-size: 26px; flex-shrink: 0; }
.guide-card-body { flex: 1; min-width: 0; }
.guide-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 3px;
}
.guide-card-summary {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.guide-card-status {
  font-size: 18px;
  color: var(--text2);
  flex-shrink: 0;
}
body.light-mode .guide-card-title { color: #111; }
body.light-mode .guide-card-summary { color: #666; }

/* ── Modal Lector ── */
.guide-modal-overlay {
  align-items: flex-end;
  padding: 0;
}
.guide-reader-box {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 32px;
  position: relative;
  background: var(--bg);
}
body.light-mode .guide-reader-box { background: #fff; }

.guide-reader-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--surface2);
  border: none;
  color: var(--text2);
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.guide-reader-cat-badge {
  display: inline-block;
  background: var(--surface2);
  color: var(--text2);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.guide-reader-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 20px;
}
body.light-mode .guide-reader-title { color: #111; }

.guide-reader-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text2);
}
.guide-reader-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 8px;
}
.guide-reader-body p {
  margin: 0 0 14px;
}
body.light-mode .guide-reader-body { color: #333; }
body.light-mode .guide-reader-body h3 { color: #111; }

/* ══════════════════════════════════════════════════════════════════
   INCOME PANEL — Panel de ingresos simulados en home
   Prefijo: .income-
══════════════════════════════════════════════════════════════════ */

.income-panel {
  border-radius: 14px;
  background: linear-gradient(135deg, var(--surface) 0%, rgba(0,229,160,.06) 100%);
  border: 1.5px solid rgba(0,229,160,.2);
  padding: 0;
  overflow: hidden;
  transition: border-color .15s, transform .1s;
}
.income-panel:hover { border-color: var(--accent); transform: translateY(-1px); }
body.light-mode .income-panel {
  background: linear-gradient(135deg, #fff 0%, rgba(0,200,140,.06) 100%);
  border-color: rgba(0,200,140,.25);
}

.income-panel-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  gap: 12px;
}
.income-panel-left { display: flex; align-items: center; gap: 12px; }
.income-panel-icon { font-size: 28px; flex-shrink: 0; }
.income-panel-amount {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--accent);
  line-height: 1;
}
.income-panel-period { font-size: 13px; font-weight: 400; color: var(--text2); margin-left: 2px; }
.income-panel-source { font-size: 11px; color: var(--text2); margin-top: 3px; }
body.light-mode .income-panel-source { color: #777; }

.income-panel-right { flex-shrink: 0; }
.income-panel-passive {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent2);
  line-height: 1.2;
}
.income-panel-passive span { font-size: 10px; font-weight: 400; color: var(--text2); }
.income-panel-info {
  font-size: 20px;
  opacity: .5;
}

/* Modal ingresos */
.income-modal-rows { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
.income-modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text2);
  border-bottom: 1px solid var(--surface2);
}
.income-modal-row strong { color: var(--text); font-weight: 700; }
.income-modal-divider { height: 1px; background: var(--surface2); margin: 4px 0; }
.income-modal-total { padding: 10px 0 4px; }
.income-modal-total span { font-weight: 700; color: var(--text); }
.income-modal-total strong { color: var(--accent); font-size: 18px; }
.income-modal-tip {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text2);
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid var(--surface2);
}
body.light-mode .income-modal-tip { background: #f5f5f5; color: #555; }
