:root {
  --navy: #132941;
  --navy-2: #1c3a58;
  --navy-3: #0d1f33;
  --paper: #f5f7fa;
  --card: #ffffff;
  --ink: #17293f;
  --muted: #667085;
  --border: #e3e7ee;
  --gold: #b8925a;
  --gold-dark: #96723f;
  --green: #2f8f5b;
  --red: #c23b3b;
}

[data-theme="dark"] {
  --paper: #0f1621;
  --card: #182233;
  --ink: #e7ecf3;
  --muted: #93a0b4;
  --border: #2a3648;
  --navy: #1c3a58;
  --navy-2: #274a6d;
  --navy-3: #0a1420;
}
[data-theme="dark"] body { background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px); }
[data-theme="dark"] .brand-bar { background: linear-gradient(135deg, #16283e 0%, #060c14 100%); }
[data-theme="dark"] .option-btn { background: #1f2b3d; }
[data-theme="dark"] .option-btn.selected { background: #3a2f1e; }
[data-theme="dark"] .pill { background: #1f2b3d; }
[data-theme="dark"] .form-card { background: #1a2536; }
[data-theme="dark"] .repaso-block { background: #0a1420; }
[data-theme="dark"] .folder-index { background: #22314a; color: #cfe0f5; }
[data-theme="dark"] .progress-bar-track { background: #22314a; }
[data-theme="dark"] .stat-chip { background: #182233; }
[data-theme="dark"] .exam-timer-badge { background: #22314a; color: #e7ecf3; }
[data-theme="dark"] .question-text,
[data-theme="dark"] .section-title,
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .expediente-label,
[data-theme="dark"] .progress-row-pct,
[data-theme="dark"] .history-id,
[data-theme="dark"] .field-label,
[data-theme="dark"] .field-label-sm {
  color: #cfe0f5;
}
[data-theme="dark"] .auth-error, [data-theme="dark"] .error-banner { background: #3a1f1f; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  min-height: 100%;
  transition: background-color 0.25s ease, color 0.25s ease;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 48px;
}

button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.view-enter { animation: viewFade 0.35s ease both; padding: 0 18px; }
@keyframes viewFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Cabecera ---------- */
.brand-bar {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #fff;
  padding: 18px 18px 14px;
}
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0; display: block; }
.brand-text-wrap { flex: 1; min-width: 0; }
.brand-name { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 18px; line-height: 1.15; letter-spacing: 0.2px; }
.brand-sub { font-size: 11.5px; color: #b9c6d6; letter-spacing: 0.6px; text-transform: uppercase; margin-top: 2px; }
.theme-toggle {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16);
  color: #fff; display: flex; align-items: center; justify-content: center; position: relative;
}
.theme-toggle-sun, .theme-toggle-moon { position: absolute; display: flex; transition: opacity 0.2s ease, transform 0.2s ease; }
.theme-toggle-moon { opacity: 0; transform: scale(0.6) rotate(-40deg); }
[data-theme="dark"] .theme-toggle-sun { opacity: 0; transform: scale(0.6) rotate(40deg); }
[data-theme="dark"] .theme-toggle-moon { opacity: 1; transform: scale(1) rotate(0); }
.module-title { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 21px; margin-top: 16px; line-height: 1.25; }

.user-row { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12.5px; color: #cfd9e6; }
.user-tag { display: flex; align-items: center; gap: 6px; font-weight: 500; color: #fff; }
.logout-btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid rgba(255,255,255,0.28); background: rgba(255,255,255,0.06);
  border-radius: 7px; padding: 6px 11px; color: #e8edf3; font-size: 12px;
}
.nav-row {
  display: flex; gap: 2px; margin-top: 16px; overflow-x: auto;
  border-bottom: none;
}
.nav-tab {
  font-size: 13px; font-weight: 500; color: #b9c6d6;
  background: transparent; border: none; border-bottom: 2px solid transparent;
  padding: 9px 12px; white-space: nowrap; display: flex; align-items: center; gap: 5px;
}
.nav-tab.active { color: #fff; border-bottom-color: var(--gold); font-weight: 600; }

/* ---------- Tarjetas y bloques ---------- */
.paper-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: 0 1px 2px rgba(19,41,65,0.04), 0 8px 24px -16px rgba(19,41,65,0.18);
  margin-top: 18px;
}
.section-title {
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 19px;
  margin: 4px 0 14px; color: var(--navy);
}
.back-link {
  background: none; border: none; color: var(--muted); font-size: 13px;
  display: flex; align-items: center; gap: 5px; margin-bottom: 14px; padding: 0;
}

/* ---------- Inicio ---------- */
.mode-picker-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.mode-picker-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; border: none; border-radius: 14px; padding: 14px 12px;
  box-shadow: 0 8px 20px -12px rgba(19,41,65,0.5);
}
.mode-picker-exam { background: linear-gradient(135deg, #5c2f2f 0%, #3a1d1d 100%); }
.mode-picker-icon {
  width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,0.14);
  display: flex; align-items: center; justify-content: center;
}
.mode-picker-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.mode-picker-sub { font-size: 10.5px; color: #d7e0ea; line-height: 1.3; }
.home-intro { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 18px 0 12px; font-weight: 500; }

.daily-details { margin-top: 18px; }
.daily-summary {
  cursor: pointer; list-style: none; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 13px;
  color: var(--gold-dark); display: flex; align-items: center; gap: 6px; padding: 4px 0;
}
.daily-summary::-webkit-details-marker { display: none; }
.daily-summary-hint { font-family: 'Inter', sans-serif; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.daily-details .daily-card { margin-top: 10px; }

.stats-row { display: flex; gap: 8px; margin-bottom: 20px; }
.stat-chip {
  flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px;
}
.stat-num { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 17px; color: var(--navy); }
[data-theme="dark"] .stat-num { color: #cfe0f5; }
.stat-label { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.link-btn { background: none; border: none; padding: 0; color: var(--gold-dark); text-decoration: underline; font-size: 14px; font-weight: 600; }
.folder-row { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.folder-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 17px 18px; box-shadow: 0 1px 2px rgba(19,41,65,0.04);
  display: flex; align-items: flex-start; gap: 14px;
}
.folder-index {
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13px;
  color: var(--navy); background: #eef2f7; border-radius: 8px;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.folder-body { flex: 1; min-width: 0; }
.folder-title { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 15.5px; margin-bottom: 3px; color: var(--ink); }
.folder-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.folder-failed { font-size: 12.5px; color: var(--red); font-weight: 500; margin-bottom: 6px; }
.folder-btn { margin-top: 6px; background: none; border: none; padding: 0; color: var(--gold-dark); font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 3px; }
.folder-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.folder-btn-alt { color: var(--muted); font-weight: 500; }

.repaso-block {
  background: var(--navy); color: #fff; border-radius: 14px; padding: 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
}
.repaso-title { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 15.5px; margin-bottom: 3px; }
.repaso-text { font-size: 12.5px; color: #c3cedd; max-width: 340px; }
.custom-note { margin-top: 14px; font-size: 12.5px; color: var(--muted); font-style: italic; }

.daily-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; margin-top: 18px;
}
.daily-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.daily-badge {
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 11px; color: var(--gold-dark);
  display: flex; align-items: center; gap: 5px; text-transform: uppercase; letter-spacing: 0.5px;
}
.daily-question { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 15px; margin-bottom: 12px; color: var(--ink); line-height: 1.4; }
.option-btn.opt-correct { background: #eaf6ee; border-color: var(--green); }
.option-btn.opt-wrong { background: #fbeaea; border-color: var(--red); }
[data-theme="dark"] .option-btn.opt-correct { background: #16301f; }
[data-theme="dark"] .option-btn.opt-wrong { background: #3a1f1f; }
.option-btn[disabled] { cursor: default; opacity: 0.92; }

.answer-feedback { margin-top: 16px; padding: 14px 16px; border-radius: 12px; animation: viewFade 0.25s ease both; }
.answer-feedback.correct { background: #eaf6ee; border: 1px solid var(--green); }
.answer-feedback.incorrect { background: #fbeaea; border: 1px solid var(--red); }
[data-theme="dark"] .answer-feedback.correct { background: #16301f; }
[data-theme="dark"] .answer-feedback.incorrect { background: #3a1f1f; }
.answer-feedback-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.answer-feedback-title.correct-text { color: var(--green); }
.answer-feedback-title.incorrect-text { color: var(--red); }
.answer-feedback-correct-line { font-size: 13px; color: var(--ink); margin-bottom: 6px; font-weight: 600; }
.answer-feedback-explain { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-bottom: 10px; }
.answer-feedback-mnemo {
  font-size: 12.5px; color: var(--ink); line-height: 1.55;
  background: rgba(184, 146, 90, 0.14); border-left: 3px solid var(--gold);
  padding: 9px 11px; border-radius: 6px;
}
.answer-feedback-mnemo-label {
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 11px; color: var(--gold-dark);
  text-transform: uppercase; letter-spacing: 0.4px; display: flex; align-items: center; gap: 5px; margin-bottom: 5px;
}
[data-theme="dark"] .answer-feedback-mnemo-label { color: #e0b978; }
[data-theme="dark"] .answer-feedback-mnemo { background: rgba(184, 146, 90, 0.1); }

.summary-section { margin-bottom: 22px; }
.summary-section-title {
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13.5px; color: var(--gold-dark);
  text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 10px;
  border-bottom: 1px solid var(--border); padding-bottom: 6px;
}
.summary-list { padding-left: 20px; margin: 0; }
.summary-list li { font-size: 13.5px; line-height: 1.75; color: var(--ink); margin-bottom: 10px; }

/* ---------- Botones ---------- */
.btn-primary {
  font-weight: 600; font-size: 14px; background: var(--navy); color: #fff; border: none;
  border-radius: 9px; padding: 12px 18px; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { background: var(--navy-2); }
.btn-secondary {
  font-weight: 600; font-size: 14px; background: transparent; color: var(--navy);
  border: 1.5px solid var(--border); border-radius: 9px; padding: 10.5px 16px; display: inline-flex; align-items: center; gap: 6px;
}
.btn-secondary-sm {
  font-weight: 500; font-size: 12.5px; background: transparent; color: var(--muted);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px;
}
.btn-danger { font-weight: 600; font-size: 12.5px; background: var(--red); color: #fff; border: none; border-radius: 8px; padding: 7px 12px; }
.btn-danger-sm { font-weight: 600; font-size: 12px; background: var(--red); color: #fff; border: none; border-radius: 8px; padding: 5px 10px; }
.btn-disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.icon-btn { background: none; border: 1px solid var(--border); border-radius: 8px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }

/* ---------- Formularios / pills ---------- */
.field-label { font-size: 13px; font-weight: 600; margin: 18px 0 8px; color: var(--navy); }
.field-label-sm { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-size: 13px; font-weight: 500; border: 1.5px solid var(--border); border-radius: 999px;
  padding: 8px 14px; background: #fff; color: var(--ink);
}
.pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pill-plain { font-family: inherit; }
.setup-summary { font-size: 12.5px; color: var(--muted); margin: 18px 0; }

textarea, .text-input {
  width: 100%; font-size: 14px; padding: 10px 12px; border-radius: 9px; border: 1.5px solid var(--border);
  background: #fff; color: var(--ink); box-sizing: border-box;
}
textarea { resize: vertical; }
.form-card { background: #f8f9fb; border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin: 14px 0 20px; }
.form-row { margin-bottom: 14px; }
.option-input-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.correct-marker {
  width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--border); background: #fff;
  font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 700; color: var(--muted); flex-shrink: 0;
}
.correct-marker.active { background: var(--green); border-color: var(--green); color: #fff; }
.nav-btn-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Test ---------- */
.test-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.test-top-right { display: flex; align-items: center; gap: 10px; }
.test-counter { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 12px; color: var(--muted); }
.exam-timer-badge {
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 12.5px;
  background: #eef2f7; color: var(--navy); padding: 4px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
}
.exam-timer-badge.danger { background: #fbeaea; color: var(--red); animation: pulse 1s ease infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.dot-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--border); background: transparent; padding: 0; }
.dot.active { border-color: var(--navy); transform: scale(1.3); }
.dot.answered { background: var(--gold); border-color: var(--gold); }
.dot.dot-ok { background: var(--green); border-color: var(--green); }
.dot.dot-bad { background: var(--red); border-color: var(--red); }
.topic-tag { font-family: 'Poppins', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.5px; color: var(--gold-dark); text-transform: uppercase; margin-bottom: 8px; }
.question-text { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 600; line-height: 1.4; margin-bottom: 18px; color: var(--navy); }
.options-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 20px; }
.option-btn {
  display: flex; align-items: center; gap: 10px; text-align: left; font-size: 14px;
  background: #fff; border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 14px; color: var(--ink);
  width: 100%;
}
.option-btn.selected { background: #fbf3e9; border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.option-letter {
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ---------- Resultado ---------- */
.result-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 12px; }
.expediente-label { font-family: 'Poppins', sans-serif; font-size: 12.5px; font-weight: 700; color: var(--navy); }
.result-date { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.badge {
  border-radius: 50%; width: 84px; height: 84px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; flex-shrink: 0; border: 3px solid;
  font-family: 'Poppins', sans-serif; animation: badgePop 0.5s cubic-bezier(.2,1.5,.4,1) both;
}
.badge-pct { font-weight: 700; font-size: 18px; line-height: 1; }
.badge-label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; margin-top: 2px; }
@keyframes badgePop { 0% { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
.result-summary { font-size: 14px; color: var(--muted); margin: 14px 0 18px; }
.breakdown-block { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 6px; }
.breakdown-row { display: flex; align-items: center; margin-bottom: 10px; }
.breakdown-name { font-size: 12.5px; color: var(--ink); flex-shrink: 0; width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breakdown-score { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 12.5px; color: var(--navy); flex-shrink: 0; width: 34px; text-align: right; }
[data-theme="dark"] .breakdown-score { color: #cfe0f5; }
.result-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.result-item { border-top: 1px solid var(--border); padding-top: 12px; }
.result-item-head { display: flex; gap: 8px; margin-bottom: 6px; }
.result-item-text { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.result-item-answer { font-size: 12.5px; color: var(--muted); margin-left: 24px; }
.result-item-correct { font-size: 12.5px; color: var(--green); margin-left: 24px; font-weight: 500; }
.result-item-explain { font-size: 12.5px; color: var(--muted); margin-left: 24px; margin-top: 4px; line-height: 1.5; }
.icon-ok { color: var(--green); flex-shrink: 0; margin-top: 2px; }
.icon-bad { color: var(--red); flex-shrink: 0; margin-top: 2px; }

/* ---------- Progreso ---------- */
.progress-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 26px; }
.progress-row-head { display: flex; justify-content: space-between; margin-bottom: 5px; }
.progress-row-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.progress-row-pct { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13px; color: var(--navy); }
.progress-bar-track { height: 7px; background: #eef1f5; border-radius: 999px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--gold)); border-radius: 999px; }
.progress-row-meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.empty-state { font-size: 13px; color: var(--muted); font-style: italic; padding: 10px 0; }
.history-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.history-id { font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 700; color: var(--navy); }
.history-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.history-pct { font-family: 'Poppins', sans-serif; font-size: 15px; font-weight: 700; }
.reset-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.backup-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.import-success { font-size: 12.5px; color: var(--green); background: #eaf6ee; border: 1px solid var(--green); border-radius: 8px; padding: 8px 11px; }
[data-theme="dark"] .import-success { background: #16301f; }
.reset-confirm-text { font-size: 12.5px; color: var(--red); }

/* ---------- Mis preguntas / temas ---------- */
.manage-intro { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
.custom-item { display: flex; justify-content: space-between; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.custom-item-topic { font-family: 'Poppins', sans-serif; font-size: 10.5px; font-weight: 700; color: var(--gold-dark); text-transform: uppercase; margin-bottom: 3px; letter-spacing: 0.4px; }
.custom-item-text { font-size: 13.5px; line-height: 1.4; color: var(--ink); }
.custom-item-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.topic-locked-tag { font-size: 10.5px; color: var(--muted); font-style: italic; margin-left: 6px; }

/* ---------- Autenticación ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 40px 18px; }
.auth-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 30px 24px; max-width: 380px; width: 100%; box-shadow: 0 20px 50px -24px rgba(19,41,65,0.3); }
.auth-logo-row { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 22px; }
.auth-logo { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 12px; }
.auth-brand { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 19px; color: var(--navy); }
.auth-brand-sub { font-size: 11.5px; color: var(--muted); letter-spacing: 0.5px; text-transform: uppercase; margin-top: 2px; }
.auth-subtitle { font-size: 13.5px; color: var(--muted); margin: 6px 0 20px; line-height: 1.5; text-align: center; }
.input-with-icon { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 12px; background: #fff; }
.input-bare { border: none; outline: none; font-size: 14px; flex: 1; background: transparent; color: var(--ink); }
.auth-error { font-size: 12.5px; color: var(--red); background: #fbeaea; border: 1px solid var(--red); border-radius: 8px; padding: 9px 11px; margin-bottom: 6px; }
.auth-switch { display: block; width: 100%; text-align: center; background: none; border: none; color: var(--gold-dark); font-size: 12.5px; margin-top: 14px; text-decoration: underline; font-weight: 600; }
.auth-note { font-size: 11px; color: var(--muted); margin-top: 18px; line-height: 1.5; border-top: 1px solid var(--border); padding-top: 12px; }

.error-banner { margin: 16px 18px 0; font-size: 12px; color: var(--red); background: #fbeaea; border: 1px solid var(--red); border-radius: 8px; padding: 8px 12px; }
.loading-wrap { display: flex; justify-content: center; padding: 90px 18px; }
.loading-stamp { font-family: 'Poppins', sans-serif; color: var(--muted); font-size: 13px; letter-spacing: 0.5px; }

svg.icon { vertical-align: middle; }

.app-footer {
  margin-top: 34px; padding: 18px; border-top: 1px solid var(--border);
  text-align: center;
}
.app-footer-brand { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 11.5px; color: var(--muted); }
.app-footer-note { font-size: 10.5px; color: var(--muted); margin-top: 4px; max-width: 420px; margin-left: auto; margin-right: auto; line-height: 1.5; }
.app-footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 10px; }
.app-footer-links a { font-size: 11px; color: var(--muted); text-decoration: underline; }
[data-theme="dark"] .app-footer-links a { color: #93a0b4; }

/* ---------- Consentimiento de cookies / anuncios ---------- */
.consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--navy); color: #fff;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.18);
}
.consent-text { flex: 1; min-width: 220px; font-size: 12.5px; line-height: 1.5; color: #dbe3ec; }
.consent-text a { color: #f0d8b8; }
.consent-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- Huecos de anuncio (Google AdSense) ---------- */
.ad-block { margin-top: 20px; text-align: center; }
.ad-label {
  font-size: 10px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted);
  margin-bottom: 6px;
}
