/* =============================================================================
   auth.v1.css  —  Estilos para /login.html, /verificar.html y /perfil.html
   Paleta y tipografías coherentes con el resto del diario
   ============================================================================= */

.auth-main {
  min-height: calc(100vh - 80px);
  background: #f4f4f1;
  padding: 48px 20px 80px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border: 1px solid #d8d8d2;
  padding: 40px 36px 32px;
}

.auth-eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: #1f3828;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.auth-card h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: #1a1f23;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.auth-lede {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  color: #565d62;
  font-style: italic;
  line-height: 1.5;
  margin: 0 0 28px;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field span {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1a1f23;
  letter-spacing: 0.02em;
}
.auth-field input {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid #c8c8c2;
  background: #ffffff;
  color: #1a1f23;
  outline: none;
  transition: border-color .15s ease;
}
.auth-field input:focus { border-color: #1f3828; }

.auth-btn {
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 20px;
  background: #1f3828;
  color: #ffffff;
  border: none;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background .15s ease, transform .05s ease;
}
.auth-btn:hover  { background: #2a4a35; }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled { background: #8a9094; cursor: not-allowed; }

.auth-alt {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.92rem;
  color: #565d62;
  text-align: center;
  margin: 22px 0 0;
}
.auth-alt a { color: #1f3828; text-decoration: none; font-weight: 600; }
.auth-alt a:hover { text-decoration: underline; }

.auth-msg {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  padding: 10px 14px;
  margin: 0;
  display: none;
}
.auth-msg.is-ok    { display: block; background: #e8efe9; color: #1f3828; border-left: 3px solid #1f3828; }
.auth-msg.is-error { display: block; background: #fde8ec; color: #8a0e2c; border-left: 3px solid #db0954; }

/* ---- PIN: 6 cajitas compactas y centradas ---- */
.pin-inputs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: nowrap;
}
.pin-inputs input {
  width: 52px;
  height: 60px;
  flex: 0 0 52px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  padding: 0;
  border: 1px solid #c8c8c2;
  background: #f4f4f1;
  color: #1f3828;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
  -moz-appearance: textfield;
  box-sizing: border-box;
}
/* En móvil, cajitas un pelín más pequeñas para que entren las 6 */
@media (max-width: 420px) {
  .pin-inputs { gap: 6px; }
  .pin-inputs input { width: 44px; height: 54px; flex: 0 0 44px; font-size: 1.35rem; }
}
.pin-inputs input::-webkit-outer-spin-button,
.pin-inputs input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pin-inputs input:focus { border-color: #1f3828; background: #ffffff; }

.pin-hint {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.85rem;
  color: #8a9094;
  font-style: italic;
  margin: 12px 0 0;
  text-align: center;
}
.pin-hint .resend-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: #1f3828; font-weight: 700; font-style: normal;
  font-family: "Inter", sans-serif; font-size: 0.85rem;
  text-decoration: underline;
}
.pin-hint .resend-btn:disabled { color: #8a9094; cursor: not-allowed; text-decoration: none; }

/* ---- Perfil ---- */
.profile-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid #ececec;
}
.profile-row:last-of-type { border-bottom: none; }
.profile-row .label {
  font-family: "Inter", sans-serif; font-size: 0.78rem; font-weight: 700;
  color: #8a9094; letter-spacing: 0.06em; text-transform: uppercase;
}
.profile-row .value {
  font-family: "Source Serif 4", Georgia, serif; font-size: 1rem; color: #1a1f23;
}

.btn-ghost {
  font-family: "Inter", sans-serif; font-size: 0.9rem; font-weight: 700;
  padding: 12px 18px; background: transparent; color: #1f3828;
  border: 1px solid #1f3828; cursor: pointer; margin-top: 24px;
}
.btn-ghost:hover { background: #1f3828; color: #ffffff; }

/* ---- Checkbox términos ---- */
.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  cursor: pointer;
  user-select: none;
}
.terms-row input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: #1f3828;
  cursor: pointer;
}
.terms-row span {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.88rem;
  color: #3a3f43;
  line-height: 1.45;
}
.terms-row span a { color: #1f3828; font-weight: 700; text-decoration: none; }
.terms-row span a:hover { text-decoration: underline; }
.terms-row.is-error span { color: #8a0e2c; }
.terms-row.is-error input[type="checkbox"] { outline: 2px solid #db0954; outline-offset: 2px; }

/* ---- Teléfono con bandera real (PNG) + prefijo compacto ---- */
.tel-group {
  display: flex;
  align-items: stretch;
  border: 1px solid #c8c8c2;
  background: #ffffff;
  transition: border-color .15s ease;
}
.tel-group:focus-within { border-color: #1f3828; }

.tel-group .tel-flag {
  display: block;
  width: 28px;
  height: 20px;
  object-fit: cover;
  align-self: center;
  margin-left: 10px;
  margin-right: 4px;
  border: 1px solid #ececec;
  flex: 0 0 28px;
}

.tel-group select {
  flex: 0 0 auto;
  width: 80px;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 22px 12px 6px;
  border: none;
  background: transparent;
  color: #1a1f23;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%231f3828' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px 6px;
}

.tel-group .tel-sep {
  width: 1px;
  background: #ececec;
  margin: 8px 0;
  flex: 0 0 1px;
}

.tel-group input[type="tel"] {
  flex: 1 1 auto;
  min-width: 0;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: #1a1f23;
  outline: none;
}

/* ---- Dropdown personalizado de prefijo (con banderas + buscador) ---- */
.tel-picker { position: relative; display: flex; align-items: stretch; }
.tel-picker-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1f23;
  height: 100%;
}
.tel-picker-btn:focus { outline: none; }
.tel-picker-btn .tel-flag {
  display: block; width: 28px; height: 20px;
  object-fit: cover; border: 1px solid #ececec;
  flex: 0 0 28px;
}
.tel-picker-btn .tel-picker-code {
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: left;
}
.tel-picker-btn .tel-picker-caret { display: block; }

.tel-picker-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: -1px;
  z-index: 50;
  width: 300px;
  max-height: 340px;
  background: #ffffff;
  border: 1px solid #c8c8c2;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  display: flex;
  flex-direction: column;
}
.tel-picker-panel[hidden] { display: none; }

.tel-picker-search {
  border: none;
  border-bottom: 1px solid #ececec;
  padding: 10px 12px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  outline: none;
  background: #f9f9f6;
}
.tel-picker-search:focus { background: #ffffff; border-bottom-color: #1f3828; }

.tel-picker-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  flex: 1 1 auto;
}
.tel-picker-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  color: #1a1f23;
}
.tel-picker-list li:hover,
.tel-picker-list li.is-active { background: #f4f4f1; }
.tel-picker-list li.is-selected { font-weight: 700; }
.tel-picker-list li img {
  width: 24px; height: 18px;
  object-fit: cover;
  border: 1px solid #ececec;
  flex: 0 0 24px;
}
.tel-picker-list .picker-name { flex: 1 1 auto; }
.tel-picker-list .picker-code {
  color: #565d62;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}
.tel-picker-empty {
  padding: 16px 12px;
  color: #8a9094;
  text-align: center;
  font-style: italic;
  font-family: "Source Serif 4", Georgia, serif;
}

/* ---- Botón "ver contraseña" (ojo) ---- */
.pass-wrap { position: relative; display: block; }
.pass-wrap input { width: 100%; padding-right: 44px; }
.pass-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #8a9094;
  transition: color .15s ease;
  padding: 0;
}
.pass-toggle:hover { color: #1f3828; }
.pass-toggle svg { display: block; width: 20px; height: 20px; }
.pass-toggle .icon-eye-off { display: none; }
.pass-toggle.is-visible .icon-eye    { display: none; }
.pass-toggle.is-visible .icon-eye-off { display: block; }

/* ---- Casilla "Ver contraseña" ---- */
.pass-show-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.pass-show-row input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px; height: 16px;
  accent-color: #1f3828;
  cursor: pointer;
  margin: 0;
}
.pass-show-row span {
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  color: #565d62;
  font-weight: 500;
}
.pass-show-row:hover span { color: #1f3828; }

/* =============================================================================
   PERFIL  (panel editorial — rejilla 3×3 uniforme)
   ============================================================================= */
.perfil-main {
  min-height: calc(100vh - 80px);
  background: #f4f4f1;
  padding: 36px 20px 60px;
}
.perfil-loading {
  max-width: 1100px;
  margin: 80px auto;
  text-align: center;
  font-family: "Source Serif 4", Georgia, serif;
  color: #8a9094;
  font-style: italic;
}
.perfil-wrap { max-width: 1100px; margin: 0 auto; }

/* ---- HERO compacto: solo identidad + verificación ---- */
.perfil-hero {
  background: transparent;
  border: 0;
  padding: 4px 0 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid #d8d8d2;
}
.perfil-eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  color: #8a9094;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.perfil-hero h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.85rem;
  font-weight: 900;
  color: #1a1f23;
  letter-spacing: -0.012em;
  line-height: 1;
  margin: 0;
  text-transform: capitalize;
}
.perfil-hero-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.perfil-rule { display: none; } /* legacy */
.perfil-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 22px 28px;
}
.meta-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.meta-label {
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  color: #8a9094;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.meta-value {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  color: #1a1f23;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}
.badge-verif {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1f3828;
  background: #e8efe9;
  border: 1px solid #1f3828;
  padding: 3px 10px;
}
.badge-verif.no {
  color: #8a0e2c;
  background: #fde8ec;
  border-color: #db0954;
}

/* ---- DASHBOARD — paneles funcionales ---- */
.perfil-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 12px;
}
.perfil-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) {
  .perfil-grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 880px) {
  .perfil-grid,
  .perfil-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .perfil-grid,
  .perfil-grid-4 { grid-template-columns: 1fr; }
}

.perfil-card {
  background: #ffffff;
  border: 1px solid #d8d8d2;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  transition: border-color .15s ease, transform .15s ease;
}
.perfil-card:hover { border-color: #1f3828; transform: translateY(-1px); }
.perfil-card.card-muted { background: #f9f9f6; }
.perfil-card.card-muted:hover { transform: none; border-color: #d8d8d2; }

.card-eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  color: #8a9094;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
}
.perfil-card h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #1a1f23;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.card-text {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.92rem;
  color: #565d62;
  line-height: 1.5;
  margin: 0;
}
.card-muted .card-text {
  font-style: italic;
}
.big-num {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #1f3828;
  margin-right: 4px;
}
.card-cta {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1f3828;
  text-decoration: none;
  letter-spacing: 0.02em;
  margin-top: auto;
  padding-top: 4px;
  display: inline-block;
}
.card-cta:hover { text-decoration: underline; }

/* ---- Datos de cuenta (dl dentro de tarjeta) ---- */
.card-dl {
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card-dl > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #ececec;
}
.card-dl > div:last-child { border-bottom: 0; }
.card-dl dt {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8a9094;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}
.card-dl dd {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.88rem;
  color: #1a1f23;
  font-weight: 600;
  margin: 0;
  text-align: right;
  word-break: break-word;
  min-width: 0;
}

/* ---- Seguridad (lista de acciones dentro de tarjeta) ---- */
.card-actions {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.card-actions a,
.card-actions .link-btn {
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1f3828;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.card-actions a:hover,
.card-actions .link-btn:hover { text-decoration: underline; }
.card-actions .link-btn.danger { color: #8a0e2c; }

/* ---- LOGOUT al final ---- */
.perfil-footer { margin-top: 24px; text-align: center; }
.btn-logout {
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 28px;
  background: transparent;
  color: #1f3828;
  border: 1px solid #1f3828;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background .15s ease, color .15s ease;
}
.btn-logout:hover { background: #1f3828; color: #ffffff; }

@media (max-width: 560px) {
  .perfil-hero { padding: 24px; }
  .perfil-hero h1 { font-size: 1.9rem; }
}

/* ---- CTA como botón sin estilos nativos ---- */
.card-cta.as-button {
  background: none;
  border: none;
  padding: 4px 0 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: #1f3828;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

.prefs-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.prefs-modal[hidden] { display: none; }
.prefs-backdrop {
  position: absolute; inset: 0;
  background: rgba(26, 31, 35, 0.62);
  backdrop-filter: blur(3px);
}
.prefs-dialog {
  position: relative;
  width: 100%; max-width: 540px;
  background: #ffffff;
  border: 1px solid #d8d8d2;
  border-top: 4px solid #1f3828;   /* acento editorial del diario */
  box-shadow: 0 24px 70px rgba(0,0,0,0.30);
  padding: 30px 36px 28px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  animation: prefs-pop .2s ease-out;
}
@keyframes prefs-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.prefs-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ececec;
}
.prefs-eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  color: #1f3828;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 4px;
}
.prefs-dialog h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #1a1f23;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}
.prefs-x {
  background: none; border: none; cursor: pointer;
  font-size: 1.6rem; color: #8a9094;
  line-height: 1; padding: 4px 8px;
  font-family: "Inter", sans-serif;
}
.prefs-x:hover { color: #1a1f23; }

.prefs-lede {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.95rem;
  color: #565d62;
  line-height: 1.5;
  margin: 0 0 22px;
  font-style: italic;
}

.prefs-list {
  border: 1px solid #ececec;
  padding: 8px 16px;
  margin: 0 0 18px;
  background: #f9f9f6;
}
.prefs-list label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #ececec;
  cursor: pointer;
  user-select: none;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.95rem;
  color: #1a1f23;
}
.prefs-list label:last-child { border-bottom: 0; }
.prefs-list label:hover { color: #1f3828; }
.prefs-list input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px; height: 18px;
  accent-color: #1f3828;
  cursor: pointer;
  margin: 0;
}

.prefs-msg {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  padding: 10px 14px;
  margin: 0 0 14px;
  display: none;
}
.prefs-msg.is-ok    { display: block; background: #e8efe9; color: #1f3828; border-left: 3px solid #1f3828; }
.prefs-msg.is-error { display: block; background: #fde8ec; color: #8a0e2c; border-left: 3px solid #db0954; }

.prefs-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #ececec;
}

/* Selects dentro de los modales: mismo estilo editorial que los inputs */
.prefs-dialog .auth-field select {
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  color: #1a1f23;
  background: #ffffff;
  border: 1px solid #d8d8d2;
  padding: 11px 12px;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%231f3828' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
}
.prefs-dialog .auth-field select:focus { outline: none; border-color: #1f3828; }
.prefs-dialog .auth-field { margin-bottom: 16px; }
.prefs-dialog .auth-form > .pass-show-row { margin-bottom: 16px; }
.btn-ghost-sm, .btn-primary-sm {
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 20px;
  cursor: pointer;
  letter-spacing: 0.02em;
  border: 1px solid #1f3828;
  transition: background .15s ease, color .15s ease;
}
.btn-ghost-sm { background: transparent; color: #1f3828; }
.btn-ghost-sm:hover { background: #f4f4f1; }
.btn-primary-sm { background: #1f3828; color: #fff; }
.btn-primary-sm:hover { background: #2a4a35; }
.btn-primary-sm:disabled { background: #8a9094; border-color: #8a9094; cursor: not-allowed; }

/* =============================================================================
   PERFIL DASHBOARD v2 (Opción A) — sustituye al diseño de cards uniformes
   ============================================================================= */
.perfil-wrap { display: flex; flex-direction: column; gap: 0; }

/* Cada sección/módulo separada por una línea fina */
.perfil-wrap > * + * {
  border-top: 1px solid #d8d8d2;
  margin-top: 34px;
  padding-top: 34px;
}

/* HERO mínimo */
.dash-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 4px;
  flex-wrap: wrap;
}
.dash-hero-eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  color: #8a9094;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 6px;
}
.dash-hero h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 2rem;
  font-weight: 900;
  color: #1a1f23;
  letter-spacing: -0.015em;
  line-height: 1;
  margin: 0;
  text-transform: capitalize;
}

/* Bloque genérico — sin recuadro blanco: transparente, integrado con el diario.
   La jerarquía la dan los encabezados (h2 con filete verde) y la separación. */
.dash-block {
  background: transparent;
  border: 0;
  padding: 0;
}
.dash-h2 {
  font-family: "Inter", sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  color: #1f3828;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #1f3828;
  display: inline-block;
}
.dash-block-head { margin-bottom: 18px; }
.dash-block-head .dash-h2 { margin-bottom: 8px; }
.dash-sub {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.95rem;
  color: #565d62;
  font-style: italic;
  margin: 0;
  line-height: 1.5;
}
.dash-block-foot {
  display: flex;
  align-items: center;
  justify-content: center;     /* botones centrados en su sección */
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #ececec;
}
.dash-block-foot:has(.dash-status) { justify-content: center; }
.dash-status {
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  color: #565d62;
  min-height: 18px;
}
.dash-status.is-ok    { color: #1f3828; font-weight: 700; }
.dash-status.is-error { color: #8a0e2c; font-weight: 700; }

/* Stats: 4 números grandes */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
@media (max-width: 640px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
}
.dash-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 10px;
  text-decoration: none;
  color: inherit;
  border-right: 1px solid #ececec;
  transition: background .15s ease;
}
.dash-stat:last-child { border-right: 0; }
.dash-stat:hover { background: #f9f9f6; }
.dash-stat-num {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: #1f3828;
  letter-spacing: -0.02em;
  line-height: 1;
}
.dash-stat-label {
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  color: #565d62;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Checkboxes para personalizar portada — 2 columnas, relleno POR COLUMNAS
   (Economía, Finanzas, Empresas, Política en la izquierda; el resto en la
   derecha) para respetar el orden del listado leyendo hacia abajo. */
.dash-prefs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  gap: 12px 20px;
  margin-top: 8px;
}
.dash-prefs-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #ececec;
  cursor: pointer;
  user-select: none;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.95rem;
  color: #1a1f23;
  transition: border-color .15s ease, background .15s ease;
}
.dash-prefs-grid label:hover { border-color: #1f3828; background: #f9f9f6; }
.dash-prefs-grid label:has(input:checked) {
  border-color: #1f3828;
  background: #f4f8f5;
}
.dash-prefs-grid input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px; height: 18px;
  accent-color: #1f3828;
  cursor: pointer;
  margin: 0;
}
@media (max-width: 560px) {
  .dash-prefs-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }
}

/* Filas multicolumna */
.dash-row { display: grid; gap: 34px 40px; }
.dash-row-2 { grid-template-columns: 1fr 1fr; column-gap: 0; }
.dash-row-3 { grid-template-columns: repeat(3, 1fr); }
/* Divisores verticales finos entre columnas (escritorio) */
@media (min-width: 761px) {
  .dash-row-2 > article:first-child { padding-right: 48px; }
  .dash-row-2 > article:last-child  { padding-left: 48px; border-left: 1px solid #e2e2dc; }
}
@media (min-width: 881px) {
  .dash-row-3 { column-gap: 0; }
  .dash-row-3 > article { padding: 0 40px; }
  .dash-row-3 > article:first-child { padding-left: 0; }
  .dash-row-3 > article:last-child  { padding-right: 0; }
  .dash-row-3 > article + article   { border-left: 1px solid #e2e2dc; }
}
@media (max-width: 880px) {
  .dash-row-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .dash-row-2,
  .dash-row-3 { grid-template-columns: 1fr; }
}

/* Definition list para "Datos de cuenta" */
.dash-dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.dash-dl > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #ececec;
}
.dash-dl > div:last-child { border-bottom: 0; }
.dash-dl dt {
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  color: #8a9094;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
}
.dash-dl dd {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.95rem;
  color: #1a1f23;
  font-weight: 600;
  margin: 0;
  text-align: right;
  word-break: break-word;
}

/* Acciones lista (Seguridad) */
.dash-actions { list-style: none; padding: 0; margin: 0; }
.dash-actions li {
  border-bottom: 1px solid #ececec;
}
.dash-actions li:last-child { border-bottom: 0; }
.dash-actions a,
.dash-actions button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  color: #1a1f23;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
}
.dash-actions a:hover,
.dash-actions button:hover {
  color: #1f3828;
}
.dash-actions .action-arrow {
  color: #8a9094;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  transition: transform .15s ease, color .15s ease;
}
.dash-actions a:hover .action-arrow,
.dash-actions button:hover .action-arrow {
  color: #1f3828;
  transform: translateX(3px);
}
.dash-actions .action-danger { color: #8a0e2c; }
.dash-actions .action-danger:hover { color: #db0954; }
.dash-actions .action-danger:hover .action-arrow { color: #db0954; }

/* Acciones secundarias en una línea */
.dash-misc {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding: 16px 24px;
  background: #f9f9f6;
  border: 1px solid #ececec;
}
.dash-misc a {
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1f3828;
  text-decoration: none;
}
.dash-misc a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .dash-hero h1 { font-size: 1.65rem; }
  .dash-stat-num { font-size: 1.7rem; }
  .dash-misc { gap: 14px; padding: 14px 18px; }
}

/* =============================================================================
   ALERTAS — lista dentro del modal
   ============================================================================= */
.al-add-row { display: flex; justify-content: flex-end; margin-top: 2px; }
/* Cabecera del listado */
.al-list-head {
  font-family: "Inter", sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a9094;
  margin: 18px 0 8px;
}
/* Listado: altura fija con scroll → el modal NO cambia de tamaño al añadir */
.al-list {
  list-style: none;
  margin: 0;
  padding: 2px 4px 2px 0;
  height: 158px;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Cada alerta: tarjeta con acento verde a la izquierda */
.al-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f9f9f6;
  border: 1px solid #ececec;
  border-left: 3px solid #1f3828;
}
.al-term {
  flex: 1 1 auto;
  min-width: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.98rem;
  color: #1a1f23;
  font-weight: 600;
  word-break: break-word;
}
.al-amb {
  flex: 0 0 auto;
  font-family: "Inter", sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #565d62;
  background: #ffffff;
  border: 1px solid #e2e2dc;
  padding: 3px 8px;
}
.al-del {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border: 1px solid #d8d8d2;
  background: #ffffff;
  color: #8a9094;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  border-radius: 50%;
  transition: all .15s ease;
}
.al-del:hover { border-color: #8a0e2c; color: #8a0e2c; background: #f7e7eb; }
/* Estado vacío: centrado, ocupa la zona sin parecer hueco muerto */
.al-empty {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Source Serif 4", Georgia, serif;
  font-style: italic;
  color: #a2a8ac;
  border: 1px dashed #e2e2dc;
  margin: 0;
}
