/* Consulta pública — A&Z Sin Límites */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --cz-bg0: #030712;
  --cz-bg1: #0f172a;
  --cz-accent: #22d3ee;
  --cz-accent2: #a78bfa;
  --cz-glass: rgba(15, 23, 42, 0.65);
  --cz-border: rgba(148, 163, 184, 0.18);
  --cz-text: #f8fafc;
  --cz-muted: #94a3b8;
  --cz-ok: #4ade80;
  --cz-warn: #fbbf24;
  --cz-bad: #f87171;
  --cz-radius: 20px;
  --cz-font: "Plus Jakarta Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.cz-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--cz-font);
  color: var(--cz-text);
  overflow-x: hidden;
}

/* Fondo vivo */
.cz-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--cz-bg0);
  overflow: hidden;
}

.cz-aurora::before,
.cz-aurora::after {
  content: "";
  position: absolute;
  width: 140%;
  height: 140%;
  top: -20%;
  left: -20%;
  background: radial-gradient(
      ellipse at 20% 20%,
      rgba(34, 211, 238, 0.18) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 30%,
      rgba(167, 139, 250, 0.2) 0%,
      transparent 45%
    ),
    radial-gradient(
      ellipse at 50% 90%,
      rgba(14, 165, 233, 0.12) 0%,
      transparent 40%
    );
  animation: cz-float 22s ease-in-out infinite alternate;
}

.cz-aurora::after {
  animation-delay: -8s;
  animation-duration: 28s;
  opacity: 0.85;
  filter: blur(2px);
}

@keyframes cz-float {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    transform: translate(-4%, 3%) rotate(2deg);
  }
}

.cz-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  background-image: linear-gradient(
      rgba(148, 163, 184, 0.06) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  pointer-events: none;
}

.cz-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px 48px;
}

/* Tarjeta principal */
.cz-card {
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 0;
  border-radius: var(--cz-radius);
  background: var(--cz-glass);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--cz-border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
}

.cz-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(34, 211, 238, 0.45),
    rgba(167, 139, 250, 0.35),
    rgba(34, 211, 238, 0.2)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.cz-card__inner {
  position: relative;
  padding: 22px 20px 26px;
}

.cz-card::-webkit-scrollbar {
  width: 6px;
}
.cz-card::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.35);
  border-radius: 10px;
}

/* Timer ring */
.cz-timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.cz-timer-svg {
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.35));
}

.cz-timer-svg circle.bg {
  fill: none;
  stroke: rgba(148, 163, 184, 0.2);
  stroke-width: 4;
}
.cz-timer-svg circle.fg {
  fill: none;
  stroke: url(#czGrad);
  stroke-width: 4;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.35s linear;
}

.cz-timer-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cz-muted);
}
.cz-timer-value {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #22d3ee, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Brand */
.cz-brand {
  text-align: center;
  margin-bottom: 16px;
}
.cz-brand__logo {
  width: 72px;
  height: auto;
  border-radius: 14px;
  margin-bottom: 8px;
  filter: drop-shadow(0 8px 24px rgba(34, 211, 238, 0.25));
}
.cz-brand__title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
  background: linear-gradient(90deg, #e0f2fe, #a5f3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cz-brand__sub {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cz-muted);
}

.cz-name {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 18px;
  line-height: 1.25;
  color: #fff;
}

/* Bloques */
.cz-section {
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  padding: 14px 14px;
  margin-bottom: 12px;
}

.cz-section h4 {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cz-muted);
}

.cz-kv {
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 6px;
  color: #e2e8f0;
}
.cz-kv b {
  color: #fff;
}

.cz-msg-ok {
  color: var(--cz-ok);
  font-size: 13px;
  margin: 8px 0 0;
}

.cz-form-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.cz-input {
  flex: 1;
  min-width: 120px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
}
.cz-input:focus {
  outline: none;
  border-color: var(--cz-accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

/* Plan */
.cz-plan-premium {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ca8a04, #fde047, #b45309);
  color: #1c1917;
  box-shadow: 0 0 20px rgba(253, 224, 71, 0.35);
  overflow: hidden;
}
.cz-plan-premium::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 40%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 60%
  );
  animation: cz-shine 2.8s ease-in-out infinite;
}
@keyframes cz-shine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
.cz-plan-basico {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}
.cz-vip {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #0f172a;
  color: #fde047;
}

/* Deuda row */
.cz-deuda-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.cz-deuda-val {
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Pills estado servicio */
.cz-pill {
  text-align: center;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
}
.cz-pill--ok {
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.25),
    rgba(34, 197, 94, 0.08)
  );
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #bbf7d0;
}
.cz-pill--bad {
  background: linear-gradient(
    135deg,
    rgba(248, 113, 113, 0.25),
    rgba(248, 113, 113, 0.08)
  );
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

/* Vehículo / SOAT */
.cz-v-card {
  border-radius: 12px;
  padding: 12px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.cz-v-card--ok {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(74, 222, 128, 0.25);
}
.cz-v-card--warn {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
}
.cz-v-card--err {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.3);
}
.cz-v-card--void {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
}

.cz-soat-banner {
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
}

/* Pagos timeline */
.cz-pay {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(2, 6, 23, 0.35);
  font-size: 13px;
}
.cz-pay--puntual {
  border-left: 3px solid var(--cz-ok);
}
.cz-pay--pago_atraso {
  border-left: 3px solid var(--cz-warn);
}
.cz-pay--atrasado {
  border-left: 3px solid var(--cz-bad);
}
.cz-pay--cuota_actual {
  border-left: 3px solid var(--cz-muted);
}

.cz-btn-mini {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
  border: 1px solid rgba(74, 222, 128, 0.35);
  white-space: nowrap;
}

/* Botones grandes */
.cz-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 16px;
  margin-top: 10px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.cz-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}
.cz-btn--primary {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.35);
}
.cz-btn--wa {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 10px 28px rgba(34, 197, 94, 0.3);
}
.cz-btn--ghost {
  margin-top: 12px;
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.cz-btn--citv {
  margin-top: 12px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border: 1px solid rgba(125, 211, 252, 0.55);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

/* Historial colapsable */
.cz-pay-fold {
  margin: 8px 0 4px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.35);
  overflow: hidden;
}
.cz-pay-fold__sum {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
  user-select: none;
}
.cz-pay-fold__sum::-webkit-details-marker {
  display: none;
}
.cz-pay-fold__sum::before {
  content: "▸ ";
  color: #38bdf8;
}
.cz-pay-fold[open] > .cz-pay-fold__sum::before {
  content: "▾ ";
}
.cz-pay-fold__body {
  padding: 0 8px 8px;
}

/* Asistente voz */
.cz-voice {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 16px -4px -8px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.cz-voice-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.4);
  background: linear-gradient(
    135deg,
    rgba(167, 139, 250, 0.15),
    rgba(34, 211, 238, 0.12)
  );
  color: #e0e7ff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.cz-voice-btn:hover {
  box-shadow: 0 0 24px rgba(167, 139, 250, 0.25);
  transform: translateY(-1px);
}
.cz-voice-btn .cz-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #a78bfa;
  animation: cz-pulse 1.8s ease-in-out infinite;
}
@keyframes cz-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

/* Estados especiales (retirado / bloqueo / cooldown) */
.cz-state {
  text-align: center;
  padding: 28px 20px 24px;
}
.cz-state__icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 12px;
  filter: drop-shadow(0 8px 20px rgba(248, 113, 113, 0.35));
}
.cz-state h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 800;
}
.cz-state p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--cz-muted);
}
.cz-state p strong {
  color: #e2e8f0;
}

@media (max-width: 380px) {
  .cz-card__inner {
    padding: 18px 14px 22px;
  }
  .cz-name {
    font-size: 1.15rem;
  }
}

@media (min-width: 768px) {
  .cz-shell {
    padding: 32px 24px 56px;
  }
  .cz-card {
    max-width: 560px;
    max-height: calc(100vh - 64px);
  }
}

@media (min-width: 1100px) {
  .cz-card {
    max-width: 640px;
  }
}
