/* ============================================================
   VIEWS — estilos específicos de cada vista (facial, vehículos)
============================================================ */

/* ==========================================================
   Vista "Infracciones por regiones"
========================================================== */
.regiones-hero {
  margin: 0 0 clamp(18px, 2vw, 24px);
  max-width: 760px;
}
.regiones-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 400;
  color: var(--c-primary);
  letter-spacing: -.4px;
  line-height: 1.15;
  margin: 6px 0 8px;
}
.regiones-sub {
  font-size: clamp(13px, 1.1vw, 14px);
  color: var(--c-muted);
  line-height: 1.55;
  margin: 0;
  max-width: 620px;
}

.regiones-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.regiones-toolbar .regiones-search {
  flex: 1;
  max-width: 360px;
  min-width: 220px;
}
.regiones-count {
  font-size: 12.5px;
  color: var(--c-muted);
}
.regiones-count strong {
  color: var(--c-primary);
  font-weight: 600;
}

.regiones-grid-view {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 900px) {
  .regiones-grid-view { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile — 2 columnas con layout vertical (icono arriba, nombre abajo) */
@media (max-width: 640px) {
  .regiones-grid-view { gap: 8px; }
  .regiones-toolbar .regiones-search { max-width: none; width: 100%; }
  .regiones-grid-view .region-card {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 16px 10px;
    min-height: 118px;
  }
  .regiones-grid-view .region-flag {
    width: 40px;
    height: 40px;
  }
  .regiones-grid-view .region-flag svg { width: 20px; height: 20px; }
  .regiones-grid-view .region-info {
    align-items: center;
    text-align: center;
    flex: 0 0 auto;
  }
  .regiones-grid-view .region-info strong {
    font-size: 12.5px;
    line-height: 1.3;
  }
  .regiones-grid-view .region-info small { display: none; }
}

/* ==========================================================
   Servicios disponibles (home / filter) — 21 cards grid
========================================================== */
.services-section {
  margin-top: clamp(20px, 3vw, 30px);
}
.services-head {
  text-align: center;
  margin-bottom: clamp(18px, 2vw, 24px);
  position: relative;
}
.services-title {
  font-size: clamp(15px, 1.5vw, 17px);
  font-weight: 500;
  color: var(--c-primary);
  letter-spacing: .1px;
  line-height: 1.35;
  margin: 0;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.service-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, transform .12s, box-shadow .15s;
  font-family: inherit;
  color: inherit;
  min-height: 72px;
}
.service-card:hover {
  border-color: var(--c-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31, 42, 40,.06);
}
.service-card:active { transform: translateY(0); }

.service-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.service-icon svg { width: 22px; height: 22px; }
.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}
/* Soporte para imágenes dentro del region-flag del modal de regiones */
.region-flag { position: relative; overflow: hidden; }
.region-flag img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

/* Indicador de imagen subida */
.service-card.has-image .service-icon,
.region-card.has-image .region-flag {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
}

/* Card destacada — "Infracciones por regiones" (abre el modal con 17 regiones) */
.service-card[data-nav="regiones"] {
  background: #8BC34A;
  border-color: #8BC34A;
  color: #ffffff;
}
.service-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.service-stack .service-name { flex: initial; }
.service-card[data-nav="regiones"] .service-name { color: #ffffff; line-height: 1.25; }
.service-card[data-nav="regiones"] .service-meta {
  font-size: 11.5px;
  font-weight: 400;
  color: rgba(255,255,255,.65);
  letter-spacing: .1px;
  line-height: 1.2;
}
.service-card[data-nav="regiones"] .service-icon {
  background: rgba(255,255,255,.1);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,.15);
}
.service-card[data-nav="regiones"] .service-ext { color: rgba(255,255,255,.6); }
.service-card[data-nav="regiones"]:hover {
  background: #7CB342;
  border-color: #7CB342;
  transform: translateY(-2px);
  box-shadow: none;
}
.service-card[data-nav="regiones"]:hover .service-ext { color: #ffffff; }
.service-card[data-nav="regiones"].has-image .service-icon {
  background: #ffffff;
  border-color: rgba(255,255,255,.3);
}

.service-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-primary);
  line-height: 1.3;
  min-width: 0;
}

.service-ext {
  width: 14px;
  height: 14px;
  color: var(--c-muted);
  opacity: .5;
  transition: opacity .15s, color .15s;
  flex-shrink: 0;
}
.service-card:hover .service-ext {
  opacity: 1;
  color: var(--c-primary);
}

/* Cards bloqueadas para usuarios anónimos:
   se muestran grises con un candado en la esquina superior derecha. */
body.is-anonymous .service-card.is-locked-anon {
  opacity: .55;
  cursor: pointer;
  position: relative;
}
body.is-anonymous .service-card.is-locked-anon:hover {
  opacity: .75;
  border-color: var(--c-border);
  transform: none;
  box-shadow: none;
}
body.is-anonymous .service-card.is-locked-anon .service-ext {
  display: none;
}
body.is-anonymous .service-card.is-locked-anon::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 14px;
  height: 14px;
  background: var(--c-muted);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='11' width='16' height='10' rx='2'/><path d='M8 11V7a4 4 0 0 1 8 0v4'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='11' width='16' height='10' rx='2'/><path d='M8 11V7a4 4 0 0 1 8 0v4'/></svg>") no-repeat center / contain;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile — 2 columnas con layout vertical (icono arriba, nombre abajo) */
@media (max-width: 640px) {
  .services-grid { gap: 8px; }
  .service-card {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 16px 10px;
    min-height: 118px;
  }
  .service-card .service-icon {
    width: 40px;
    height: 40px;
  }
  .service-card .service-icon svg { width: 20px; height: 20px; }
  .service-card .service-name {
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
    flex: 0 0 auto;
  }
  .service-card .service-ext { display: none; }
  .service-card .service-meta { display: none; }
  .service-card .service-stack {
    align-items: center;
    text-align: center;
  }
}

/* ==========================================================
   Títulos simples de vistas secundarias (cuenta, saldo, etc.)
========================================================== */
.compact-hero { margin: 0 0 clamp(14px, 1.8vw, 20px); }
.simple-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 400;
  color: var(--c-primary);
  letter-spacing: -.3px;
  line-height: 1.15;
  margin: 0;
}

/* Título del Dashboard — más grande que los demás títulos simples */
#dashTitle {
  font-size: clamp(30px, 4.8vw, 52px);
  letter-spacing: -.5px;
  line-height: 1.1;
}
@media (max-width: 720px) {
  /* Hero del dashboard más compacto en móvil */
  #view-dashboard .compact-hero { margin-bottom: 10px; }
  #view-dashboard .hero-eyebrow { margin-bottom: 4px; font-size: 10px; letter-spacing: 1.4px; }
  /* Título en una sola fila, prominente y ajustado al ancho */
  #dashTitle {
    font-size: clamp(23px, 7.6vw, 36px);
    letter-spacing: -.7px;
    line-height: 1.12;
    white-space: nowrap;
    width: 100%;
    display: block;
    overflow: hidden;
    text-overflow: clip;
  }
}
/* En pantallas muy estrechas (≤ 360px) se permite partir en 2 líneas balanceadas */
@media (max-width: 360px) {
  #dashTitle {
    white-space: normal;
    text-wrap: balance;
    font-size: clamp(22px, 8vw, 30px);
  }
}

/* ==========================================================
   Dashboard
========================================================== */
.dash-grid {
  display: grid;
  grid-template-columns: minmax(320px, 380px) 1fr;
  gap: 14px;
  margin-bottom: 14px;
  align-items: start;
}
.dash-col { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 1024px) {
  .dash-grid { grid-template-columns: 1fr; }
}

/* Card del plan */
.plan-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.plan-card:hover,
.credits-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.plan-cover {
  width: 100%;
  height: 110px;
  background:
    linear-gradient(135deg, #253330 0%, #2E3D3A 50%, #1A2421 100%);
}
.plan-avatar {
  margin-top: -48px;
  padding: 0 0 4px;
}
.plan-avatar .avatar {
  border: 4px solid var(--c-surface);
  box-shadow: 0 4px 12px rgba(31, 42, 40,.12);
}
.plan-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--c-primary);
  margin: 10px 0 2px;
}
.plan-email {
  font-size: 12.5px;
  color: var(--c-muted);
  margin-bottom: 16px;
}
.plan-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
  margin-bottom: 16px;
}
.plan-stat { display: flex; flex-direction: column; gap: 2px; }
.plan-stat strong {
  font-size: 22px;
  color: var(--c-primary);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.2px;
}
.plan-stat span {
  font-size: 11.5px;
  color: var(--c-muted);
  letter-spacing: .2px;
}
.plan-divider {
  width: 1px;
  height: 28px;
  background: var(--c-border);
}
.plan-cta {
  margin: 0 20px 20px;
  width: calc(100% - 40px);
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.plan-cta svg { width: 14px; height: 14px; }

/* Credits ring card */
.credits-card { padding: 20px 22px; }
.credits-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.credits-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-primary);
  margin: 0;
  letter-spacing: .1px;
}
.period-chip {
  font-size: 11px;
  font-weight: 500;
  color: var(--c-muted);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--c-bg);
  letter-spacing: .2px;
}
.credits-body {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}
.credits-info { flex: 1; min-width: 0; }
.credits-label {
  font-size: 12px;
  color: var(--c-muted);
  display: block;
  margin-bottom: 2px;
}
.credits-total {
  font-size: 28px;
  font-weight: 500;
  color: var(--c-primary);
  line-height: 1;
  display: block;
  margin-bottom: 12px;
  letter-spacing: -.4px;
}
.btn-sm {
  padding: 7px 12px;
  font-size: 12px;
  min-height: auto;
}
.credits-ring {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}
.credits-ring svg { width: 100%; height: 100%; }
.gauge-tick {
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke .25s;
}
.gauge-tick.off { stroke: #DADADA; }
.gauge-tick.on { stroke: var(--c-primary); }
.credits-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.credits-ring-text strong {
  font-size: 19px;
  font-weight: 500;
  color: var(--c-primary);
  line-height: 1;
  letter-spacing: -.2px;
}
.credits-ring-text span {
  font-size: 10.5px;
  color: var(--c-muted);
  letter-spacing: .3px;
  text-transform: uppercase;
  margin-top: 2px;
}
.credits-note {
  font-size: 11.5px;
  color: var(--c-muted);
  line-height: 1.5;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--c-border);
}

/* Stats panel + chart */
.stats-panel { padding: 18px 20px; }
.period-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.period-card {
  background: var(--c-bg);
  border-radius: 9px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.period-card span {
  font-size: 11px;
  color: var(--c-muted);
  letter-spacing: .2px;
}
.period-card strong {
  font-size: 20px;
  font-weight: 500;
  color: var(--c-primary);
  line-height: 1;
  margin-top: 4px;
  letter-spacing: -.2px;
}
.stats-chart {
  position: relative;
  display: flex;
  flex-direction: column;
}
.stats-chart svg {
  width: 100%;
  height: 120px;
  display: block;
}
.chart-months {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--c-muted);
  padding-top: 8px;
  letter-spacing: .2px;
}

/* Consumo por módulo */
.modules-panel { padding: 18px 20px; }
.modules-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.module-row {
  display: grid;
  grid-template-columns: 22px auto 1fr 28px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.module-ico {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-muted);
}
.module-ico svg { width: 16px; height: 16px; }
.module-name {
  font-weight: 500;
  color: var(--c-primary);
  min-width: 80px;
}
.module-bar {
  height: 6px;
  background: var(--c-bg);
  border-radius: 999px;
  overflow: hidden;
}
.module-bar span {
  display: block;
  height: 100%;
  background: var(--c-primary);
  border-radius: 999px;
  min-width: 6px;
  transition: width .4s ease;
}
.module-count {
  text-align: right;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-primary);
  line-height: 1;
}

/* Tarjeta de promoción / upgrade */
.promo-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #F7F7F5 0%, #ffffff 100%);
  border: 1px solid var(--c-border);
}
.promo-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--c-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.promo-icon svg { width: 22px; height: 22px; }
.promo-text { flex: 1; min-width: 0; }
.promo-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-primary);
  margin-bottom: 2px;
}
.promo-text p {
  margin: 0;
  font-size: 12.5px;
  color: var(--c-muted);
  line-height: 1.45;
}
.promo-card .btn { flex-shrink: 0; white-space: nowrap; }

@media (max-width: 560px) {
  .promo-card { flex-wrap: wrap; }
  .promo-card .btn { width: 100%; justify-content: center; }
}

/* Accesos rápidos compactos */
.quick-panel { padding: 18px 22px; }
.quick-actions-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.quick-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: 9px;
  cursor: pointer;
  color: var(--c-primary);
  transition: background .15s, border-color .15s, transform .12s;
}
.quick-compact:hover {
  background: var(--c-bg);
  border-color: #b8c0cc;
}
.quick-compact:active { transform: scale(.97); }
.quick-compact svg { width: 20px; height: 20px; }
.quick-compact span {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .2px;
}

@media (max-width: 640px) {
  .plan-stats { flex-direction: row; gap: 14px; }
  .credits-body { flex-direction: column-reverse; gap: 16px; }
  .credits-ring { width: 120px; height: 120px; margin: 0 auto; }
  .credits-info { text-align: center; }
  .btn-sm { width: 100%; }
  .period-stats { grid-template-columns: 1fr; gap: 6px; }
  .period-card { flex-direction: row; align-items: center; justify-content: space-between; padding: 10px 14px; }
  .period-card strong { font-size: 22px; margin-top: 0; }
}

/* Mi cuenta */
.account-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: start;
}
.avatar-lg {
  width: 96px;
  height: 96px;
  font-size: 32px;
  border-radius: 50%;
}
.account-info { display: flex; flex-direction: column; gap: 2px; }
.account-info .input.is-editing {
  background: #ffffff;
  border-color: var(--c-primary);
}
.account-info .input[readonly] {
  background: var(--c-bg);
  color: var(--c-text);
  cursor: default;
}
@media (max-width: 640px) {
  .account-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .account-info { width: 100%; }
}

/* Mi saldo */
.saldo-panel {
  text-align: center;
  padding: clamp(28px, 4vw, 48px) 24px;
  margin-bottom: 28px;
}
.saldo-amount { display: flex; flex-direction: column; gap: 6px; }
.saldo-label {
  font-size: 12px;
  color: var(--c-muted);
  letter-spacing: .4px;
  text-transform: uppercase;
  font-weight: 500;
}
.saldo-value {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(40px, 6vw, 72px);
  color: var(--c-primary);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -1px;
}
.saldo-credits {
  font-size: 13px;
  color: var(--c-muted);
}

/* Configuración — toggles */
.settings-list { display: flex; flex-direction: column; }
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-border);
}
.setting-row:last-child { border-bottom: none; }
.setting-info strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-primary);
  margin-bottom: 3px;
}
.setting-info span {
  font-size: 12.5px;
  color: var(--c-muted);
  line-height: 1.45;
}
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute;
  inset: 0;
  background: #D5D5D5;
  border-radius: 999px;
  transition: background .2s;
  cursor: pointer;
}
.switch span::before {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform .2s;
}
.switch input:checked + span { background: var(--c-primary); }
.switch input:checked + span::before { transform: translateX(16px); }

/* ==========================================================
   Hero — título editorial con Instrument Serif
   Adaptable de 320px a 1920px+ con escalado fluido
========================================================== */

.hero {
  margin: 0 0 clamp(18px, 2.2vw, 24px);
  max-width: 920px;
}

.hero-eyebrow {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--c-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: clamp(10px, 1.2vw, 14px);
}

.hero-title {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 6.4vw, 68px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.5px;
  color: var(--c-primary);
  margin: 0;
  text-wrap: balance;
  hyphens: manual;
}
.hero-title em {
  font-style: italic;
  font-weight: 500;
  font-size: 1.18em;
  color: var(--c-accent);
  line-height: 1;
}

/* Desktop grandes (≥ 1280px): letter-spacing más apretado tipo editorial */
@media (min-width: 1280px) {
  .hero-title { letter-spacing: -1px; }
}

/* Tablet (768px–1023px) */
@media (max-width: 1023px) {
  .hero-title { font-size: clamp(38px, 6.5vw, 60px); }
}

/* Mobile (480px–767px) */
@media (max-width: 767px) {
  .hero-title { font-size: clamp(36px, 9.5vw, 52px); letter-spacing: -.5px; line-height: 1.08; }
  .hero-eyebrow { font-size: 10.5px; letter-spacing: 1.6px; margin-bottom: 10px; }
}

/* Mobile chico (≤ 380px) */
@media (max-width: 380px) {
  .hero-title { font-size: 34px; }
}

@media (max-width: 640px) {
  .hero { padding: 22px 20px; }
  .hero-title { letter-spacing: -.5px; }
}

/* Section header */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  margin-bottom: 16px;
}
.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--c-primary);
  text-transform: uppercase;
  margin: 0;
  line-height: 1.35;
}

/* Panel principal */
.panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: clamp(18px, 2.5vw, 24px);
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.panel-head-left { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.panel-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--c-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-primary);
  flex-shrink: 0;
}
.panel-icon svg { width: 19px; height: 19px; }
.panel-head h3 { font-size: 15px; font-weight: 500; color: var(--c-primary); margin: 0 0 4px; }
.panel-head p { font-size: 13px; color: var(--c-muted); margin: 0; }
.panel-desc {
  font-size: 13.5px;
  color: #374151;
  line-height: 1.55;
  margin: 0 0 16px;
}

/* ==========================================================
   Caja oscura de búsqueda rápida (Inicio)
========================================================== */
.filter-search-box {
  background: var(--c-primary);
  color: #ffffff;
  border-radius: 14px;
  padding: 32px 36px 28px;
  margin-bottom: 28px;
  border: 1px solid var(--c-primary);
}
.filter-search-head {
  max-width: 720px;
  margin-bottom: 22px;
}
.filter-search-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  margin-bottom: 8px;
  font-weight: 600;
}
.filter-search-title {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #ffffff;
}
.filter-search-sub {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,.82);
  margin: 0;
}
/* Los selector-card y .panel adentro mantienen su blanco, pero sin margen inferior
   doble (el wrapper ya se encarga) y sin border propio para que la caja se vea
   como una unidad visual con los inputs flotando sobre el dark bg. */
.filter-search-box .selector-card {
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,.06);
}
.filter-search-box > .panel {
  background: #ffffff;
  border: 1px solid rgba(255,255,255,.06);
  padding: 16px 20px;
}

@media (max-width: 720px) {
  .filter-search-box {
    padding: 22px 20px 20px;
    margin-bottom: 20px;
  }
  .filter-search-head { margin-bottom: 16px; }
  .filter-search-title { font-size: 19px; line-height: 1.25; }
  .filter-search-sub { font-size: 13px; }
  .filter-search-eyebrow { font-size: 10.5px; }
}

/* Selector superior */
.selector-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.selector-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--c-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* Consumo + credits row (Vehículos) */
.consumo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.consumo-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-primary);
}

/* Form row (input + botones inline) */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.form-row .input {
  flex: 1 1 260px;
  min-width: 0;
  height: 44px;
}
.form-row .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  flex: 0 0 auto;
  height: 44px;
  min-height: 44px;
}
.form-row .btn svg { width: 16px; height: 16px; }

@media (min-width: 768px) {
  .form-row .input { height: 40px; }
  .form-row .btn { height: 40px; min-height: 40px; padding: 0 16px; }
}
@media (max-width: 640px) {
  .form-row { flex-direction: column; align-items: stretch; }
  .form-row .input { flex: 0 0 44px; width: 100%; height: 44px; }
  .form-row .btn { width: 100%; flex: 0 0 44px; }
}

/* Espaciado vistas — gap proporcional unificado */
.view > .panel,
.view > .view-header,
.view > .selector-card { margin-bottom: clamp(14px, 1.6vw, 18px); }
.view > :last-child { margin-bottom: 0; }


/* Extras combined IMG + TXT */
.extras-combined {
  padding: 28px;
  background: #F5F5F5;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  min-height: 440px;
}
.extras-img-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.extras-img-slot .img-slot-inner {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--c-surface);
  border: 1px dashed var(--c-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  opacity: .6;
  box-shadow: 0 4px 10px rgba(31, 42, 40,.04);
}
.extras-img-slot .img-slot-inner svg { width: 48px; height: 48px; }
.extras-txt-sheet {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 22px 26px;
  box-shadow: 0 4px 10px rgba(31, 42, 40,.04);
  min-height: 320px;
}
.extras-txt-sheet .txt-content {
  margin: 0;
  font-family: "SF Mono", "Cascadia Mono", "Consolas", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--c-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 768px) {
  .extras-combined { grid-template-columns: 1fr; }
  .extras-img-slot { max-width: 220px; margin: 0 auto; }
}

/* Maintenance panel */
.maintenance-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 56px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  margin-bottom: 14px;
}
.maintenance-panel[hidden] { display: none; }
.maintenance-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: #FFF4E5;
  color: #D97706;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.maintenance-icon svg { width: 36px; height: 36px; }
.maintenance-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--c-primary);
  margin: 0;
  letter-spacing: -.2px;
}
.maintenance-desc {
  font-size: 13.5px;
  color: var(--c-muted);
  max-width: 480px;
  line-height: 1.55;
  margin: 0;
}
.maintenance-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #FFF4E5;
  color: #B45309;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-top: 6px;
}
.maintenance-chip .status-dot {
  background: #D97706;
  animation: pulse 1.5s ease-in-out infinite;
}




/* Result panels (Datos / Documentos) */
.result-panel { padding: 0; overflow: hidden; }
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--c-border);
  background: linear-gradient(180deg, #FAFAFA 0%, #ffffff 100%);
}
.result-header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.result-header-left > svg { width: 18px; height: 18px; color: var(--c-primary); }
.result-header h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-primary);
  margin: 0;
  letter-spacing: .2px;
}
.result-header-actions { display: flex; gap: 4px; }

/* Lista de datos */
.data-list { display: flex; flex-direction: column; margin: 0; padding: 0; }
.data-row {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 32px;
  padding: 14px 20px;
  border-bottom: 1px solid #E8E8E8;
  font-size: 13.5px;
  transition: background .12s;
}
.data-row:last-child { border-bottom: none; }
.data-row:hover { background: #FAFAFA; }
.data-row dt {
  font-weight: 500;
  color: var(--c-muted);
  font-size: 12.5px;
  letter-spacing: .2px;
}
.data-row dd {
  margin: 0;
  color: var(--c-primary);
  font-weight: 500;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

/* Skeleton loader */
.skeleton {
  display: inline-block;
  min-width: 180px;
  height: 14px;
  background: linear-gradient(90deg, #E5E5E5 0%, #F0F0F0 50%, #E5E5E5 100%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (max-width: 640px) {
  .data-row { grid-template-columns: 1fr; gap: 4px; }
  .data-row dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; }
  .skeleton { min-width: 140px; }
}

/* Dropzone (Facial) */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: clamp(36px, 6vw, 56px) 20px;
  border: 2px dashed #CCCCCC;
  border-radius: 10px;
  background: linear-gradient(180deg, #FAFAFA 0%, #F3F3F3 100%);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: center;
}
.dropzone:hover { border-color: var(--c-accent); background: #F5F5F5; }
.dropzone.dragover { border-color: var(--c-accent); background: #E8F4F4; }
.dz-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #E5E5E5;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-primary);
  margin-bottom: 4px;
}
.dz-icon svg { width: 26px; height: 26px; }
.dz-title { font-size: 15px; font-weight: 600; color: var(--c-primary); }
.dz-sub { font-size: 13px; color: var(--c-muted); }
.dz-sub strong { color: var(--c-primary); font-weight: 600; }
.dz-hint {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #E0F5F5;
  color: #0BA3A3;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 999px;
}
.dz-hint svg { width: 13px; height: 13px; }

/* PDF Preview */
.pdf-preview {
  min-height: 440px;
  background:
    linear-gradient(135deg, #EEEEEE 25%, transparent 25%) -10px 0 / 20px 20px,
    linear-gradient(225deg, #EEEEEE 25%, transparent 25%) -10px 0 / 20px 20px,
    linear-gradient(315deg, #EEEEEE 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(45deg, #EEEEEE 25%, transparent 25%) 0 0 / 20px 20px,
    #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.pdf-placeholder-page {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 3 / 4;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(31, 42, 40,.08), 0 4px 8px rgba(31, 42, 40,.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
  gap: 14px;
  position: relative;
}
.pdf-placeholder-page::before,
.pdf-placeholder-page::after {
  content: "";
  position: absolute;
  top: 22px;
  left: 24px; right: 24px;
  height: 5px;
  background: #E8E8E8;
  border-radius: 3px;
}
.pdf-placeholder-page::after { top: 34px; right: 60px; }
.pdf-ph-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: var(--c-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-primary);
  margin-top: 20px;
}
.pdf-ph-icon svg { width: 28px; height: 28px; }
.pdf-ph-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-primary);
}
.pdf-ph-sub {
  font-size: 12.5px;
  color: var(--c-muted);
  line-height: 1.5;
  max-width: 240px;
}

/* Format tag (PDF / TXT / IMG) */
.format-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--c-primary);
  color: #ffffff;
  text-transform: uppercase;
}

/* TXT preview — hoja blanca tipo documento */
.txt-preview {
  min-height: 440px;
  background:
    linear-gradient(135deg, #EEEEEE 25%, transparent 25%) -10px 0 / 20px 20px,
    linear-gradient(225deg, #EEEEEE 25%, transparent 25%) -10px 0 / 20px 20px,
    linear-gradient(315deg, #EEEEEE 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(45deg, #EEEEEE 25%, transparent 25%) 0 0 / 20px 20px,
    #F5F5F5;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px;
}
.txt-sheet {
  width: 100%;
  max-width: 720px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(31, 42, 40,.08), 0 4px 8px rgba(31, 42, 40,.04);
  padding: 28px 32px;
  min-height: 380px;
}
.txt-content {
  margin: 0;
  font-family: "SF Mono", "Cascadia Mono", "Consolas", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--c-primary);
  white-space: pre-wrap;
  word-break: break-word;
}
.txt-content:empty::before,
.txt-content.placeholder {
  color: rgba(31, 42, 40, .35);
  font-style: italic;
  font-weight: 400;
}

/* IMG preview */
.img-preview {
  min-height: 440px;
  background:
    linear-gradient(135deg, #EEEEEE 25%, transparent 25%) -10px 0 / 20px 20px,
    linear-gradient(225deg, #EEEEEE 25%, transparent 25%) -10px 0 / 20px 20px,
    linear-gradient(315deg, #EEEEEE 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(45deg, #EEEEEE 25%, transparent 25%) 0 0 / 20px 20px,
    #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.img-placeholder {
  background: var(--c-surface);
  border: 1px dashed var(--c-border);
  border-radius: 10px;
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 360px;
  text-align: center;
  color: var(--c-muted);
}
.img-placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--c-primary);
  opacity: .55;
}
.img-ph-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-primary);
}
.img-ph-sub {
  font-size: 12.5px;
  line-height: 1.5;
  max-width: 260px;
}

/* Respeta el atributo HTML `hidden` — necesario porque varios displays lo anulan */
[hidden] { display: none !important; }


/* Empty query state — reemplaza los placeholders antes de la consulta */
.empty-query-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
  gap: 6px;
  min-height: 200px;
}
.empty-query-state[hidden] { display: none; }
.empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-muted);
  margin-bottom: 4px;
  opacity: .85;
}
.empty-icon svg { width: 22px; height: 22px; stroke-width: 1.5; }
.empty-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--c-primary);
  letter-spacing: -.1px;
  margin: 0;
}
.empty-desc {
  font-size: 13px;
  color: var(--c-muted);
  max-width: 440px;
  line-height: 1.5;
  margin: 0;
}
.empty-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  font-size: 11.5px;
  color: var(--c-muted);
  font-weight: 400;
  margin-top: 4px;
}
.empty-chip svg { width: 14px; height: 14px; }

/* Image grid (1 / 2 / 4 slots con label) */
.img-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 28px;
  background:
    linear-gradient(135deg, #EEEEEE 25%, transparent 25%) -10px 0 / 20px 20px,
    linear-gradient(225deg, #EEEEEE 25%, transparent 25%) -10px 0 / 20px 20px,
    linear-gradient(315deg, #EEEEEE 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(45deg, #EEEEEE 25%, transparent 25%) 0 0 / 20px 20px,
    #F5F5F5;
  min-height: 440px;
  justify-items: center;
  align-items: start;
}
.img-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }

.img-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
}
.img-slot-inner {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--c-surface);
  border: 1px dashed var(--c-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  opacity: .6;
  box-shadow: 0 4px 10px rgba(31, 42, 40,.04);
}
.img-slot-inner svg { width: 36px; height: 36px; }
.img-slot-portrait { aspect-ratio: 3 / 4; max-width: 220px; margin: 0 auto; }
.img-slot-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* Preview completo (4 imgs + datos) */
.reniec-full {
  padding: 28px;
  background: #F5F5F5;
}
.reniec-full-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.reniec-full-grid .img-slot { max-width: none; }
.reniec-data {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .reniec-full-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .reniec-full-grid { grid-template-columns: 1fr; }
  .img-grid-2 { grid-template-columns: 1fr; }
}

/* ==========================================================
   CTA anónimo del Dashboard — solo visible sin sesión
========================================================== */
.anon-cta {
  display: none;
  background: var(--c-primary);
  color: #ffffff;
  border-radius: 14px;
  padding: 36px 40px;
  margin-bottom: 22px;
  border: 1px solid var(--c-primary);
}
body.is-anonymous .anon-cta { display: block; }
body.is-logged-in .anon-cta { display: none; }

.anon-cta-body { max-width: 720px; }
.anon-cta-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  margin-bottom: 10px;
  font-weight: 600;
}
.anon-cta-title {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: #ffffff;
}
.anon-cta-sub {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255,255,255,.85);
  margin: 0 0 22px 0;
}
.anon-cta-sub strong { color: #ffffff; font-weight: 700; }

.anon-cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.anon-cta-primary {
  background: #7AC143;
  color: #ffffff;
  border: 1px solid #7AC143;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
}
.anon-cta-primary:hover {
  background: #6BAD38;
  border-color: #6BAD38;
}
.anon-cta .btn-outline {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,.35);
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 500;
}
.anon-cta .btn-outline:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.55);
}

.anon-cta-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.anon-cta-bullets li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: rgba(255,255,255,.88);
}
.anon-cta-bullets svg {
  width: 16px;
  height: 16px;
  color: #7AC143;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .anon-cta { padding: 20px 20px 18px; margin-bottom: 16px; }
  .anon-cta-eyebrow { margin-bottom: 6px; font-size: 10.5px; }
  .anon-cta-title { font-size: 19px; line-height: 1.25; margin-bottom: 6px; }
  .anon-cta-sub { font-size: 13px; line-height: 1.45; margin-bottom: 14px; }
  .anon-cta-actions { flex-direction: column; gap: 8px; margin-bottom: 14px; }
  .anon-cta-actions .btn { width: 100%; padding: 10px 16px; font-size: 13.5px; }
  .anon-cta-bullets { gap: 6px 16px; }
  .anon-cta-bullets li { font-size: 12.5px; }
  .anon-cta-bullets svg { width: 14px; height: 14px; }
}

/* ==========================================================
   Resultado de consulta (docs.json.pe) — ficha limpia
   Ocupa todo el ancho del contenedor. Etiquetas a la izquierda,
   valores a la derecha en desktop; apilado en móvil.
========================================================== */
#filter-preview-data {
  padding: 18px 22px 22px;
  width: 100%;
}
.result-card {
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 14px 4px;
  border-top: 1px solid var(--c-border);
}
.result-row:first-child {
  border-top: none;
  padding-top: 6px;
}
.result-k {
  font-size: 12px;
  letter-spacing: .9px;
  color: var(--c-muted);
  text-transform: uppercase;
  font-weight: 600;
  flex-shrink: 0;
}
.result-v {
  font-size: 15px;
  color: var(--c-text);
  font-weight: 500;
  font-family: inherit;
  text-align: right;
  word-break: break-word;
  line-height: 1.4;
}
.result-foot {
  margin-top: 18px;
  padding: 12px 18px;
  background: var(--c-bg);
  border-radius: 8px;
  font-size: 13px;
  color: var(--c-muted);
  text-align: center;
}
.result-foot strong { color: var(--c-primary); font-weight: 700; }

/* Móvil: etiqueta arriba + valor abajo, ambos alineados a la izquierda */
@media (max-width: 640px) {
  .result-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 0 10px;
  }
  .result-k { font-size: 10.5px; letter-spacing: 1.1px; }
  .result-v { font-size: 14.5px; text-align: left; }
  .result-foot { font-size: 12.5px; padding: 10px 14px; }
}

/* ==========================================================
   Listas de transacciones (Mis compras / Mi historial)
========================================================== */
.tx-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
}
.tx-row:last-child { border-bottom: none; }
.tx-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.tx-meta strong { font-size: 14px; color: var(--c-text); font-weight: 600; }
.tx-sub { font-size: 12.5px; color: var(--c-muted); }
.tx-date { font-size: 11.5px; color: var(--c-muted); }
.tx-amount {
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.tx-amount-pos { color: #0A8A4A; }
.tx-amount-neg { color: #B91C1C; }

/* ==========================================================
   Lista de notificaciones (vista del cliente)
========================================================== */
.notif-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
  position: relative;
  cursor: pointer;
  transition: background .15s;
}
.notif-item:hover { background: var(--c-bg); }
.notif-item:last-child { border-bottom: none; }
.notif-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--c-bg);
  color: var(--c-muted);
}
.notif-icon svg { width: 18px; height: 18px; }
.notif-icon-credits { background: #E6F8F0; color: #0A8A4A; }
.notif-icon-system  { background: #FFF3E6; color: #B5660A; }
.notif-body { flex: 1; min-width: 0; }
.notif-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; margin-bottom: 3px;
}
.notif-head strong { font-size: 14px; color: var(--c-text); font-weight: 600; }
.notif-when { font-size: 11.5px; color: var(--c-muted); flex-shrink: 0; }
.notif-body p { font-size: 13px; color: var(--c-muted); margin: 0; line-height: 1.45; }
.notif-item.is-unread .notif-head strong { color: var(--c-primary); font-weight: 700; }
.notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #0BA3A3;
  flex-shrink: 0;
  align-self: center;
}
