/* =========================================================
   Zona Azul - CSS maestro base
   Aplicaciones: Contribuyente, Facilitador, Fiscalizador, Educador
   Base inicial: Contribuyente
   ========================================================= */

/* =========================================================
   1. Variables globales
   ========================================================= */

:root {
  /* Colores institucionales */
  --za-primary: #274679;
  --za-primary-dark: #213b67;

  /* Fondos */
  --za-bg: #eaeaea;
  --za-bg-desktop: #d8d8d8;
  --za-card: #ffffff;
  --za-white: #ffffff;

  /* Textos */
  --za-text: #495057;
  --za-muted: #6c757d;

  /* Bordes y estados */
  --za-border: #d9d9d9;
  --za-success: #2f8f5b;
  --za-warning: #b7791f;
  --za-danger: #b83232;

  /* Fondos de estado */
  --za-success-bg: #d4edda;
  --za-success-text: #155724;
  --za-warning-bg: #fff3cd;
  --za-warning-text: #856404;
  --za-danger-bg: #f8d7da;
  --za-danger-text: #721c24;
  --za-info-bg: #dbe4ff;
  --za-info-text: #274679;

  /* UI */
  --za-radius: 4px;
  --za-shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);

  /* Layout */
  --za-app-max-width: 420px;
  --za-content-padding: 16px;
  --za-stack-gap: 14px;
  --za-header-height: 64px;
  --za-footer-min-height: 58px;
}

/* =========================================================
   2. Reset y estructura mobile-first
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--za-bg);
}

body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  background: var(--za-bg);
  color: var(--za-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol";
  overflow-x: hidden;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

/* Contenedor general de la aplicación mobile-first */
.za-app-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  background: var(--za-bg);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Área principal de contenido */
.za-content {
  width: 100%;
  flex: 1;
  padding: var(--za-content-padding);
}

/* Contenidos apilados con separación estándar */
.za-stack,
.za-home-content,
.za-onboarding-content,
.za-vehicles-content,
.za-movements-content,
.za-start-content,
.za-recharge-content {
  display: flex;
  flex-direction: column;
  gap: var(--za-stack-gap);
}

/* Espaciado por gap: sin margen inferior redundante en hijos directos */
.za-stack > .za-balance-card,
.za-home-content > .za-balance-card,
.za-vehicles-content > .za-balance-card,
.za-movements-content > .za-balance-card,
.za-start-content > .za-balance-card,
.za-start-content > .za-start-form-card,
.za-start-content > .za-start-info-card,
.za-start-content > .za-start-debt-card,
.za-vehicles-content > .za-vehicles-form-card,
.za-movements-content > .za-movements-filter-card,
.za-recharge-content > .za-recharge-form-card,
.za-recharge-content > .za-start-info-card {
  margin-bottom: 0;
}

/* Fallback gap para WebViews sin soporte flex gap */
.za-stack > * + *,
.za-home-content > * + *,
.za-onboarding-content > * + *,
.za-vehicles-content > * + *,
.za-movements-content > * + *,
.za-start-content > * + *,
.za-recharge-content > * + * {
  margin-top: var(--za-stack-gap);
}

@supports (gap: 1rem) {
  .za-stack > * + *,
  .za-home-content > * + *,
  .za-onboarding-content > * + *,
  .za-vehicles-content > * + *,
  .za-movements-content > * + *,
  .za-start-content > * + *,
  .za-recharge-content > * + * {
    margin-top: 0;
  }
}

/* En desktop se mantiene como web-app centrada */
@media (min-width: 576px) {
  body {
    background: var(--za-bg-desktop);
  }

  .za-app-shell {
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
  }

  body:not(.page-splash) .za-app-shell {
    margin-top: 16px;
    margin-bottom: 16px;
    min-height: calc(100vh - 32px);
    min-height: calc(100dvh - 32px);
    max-width: var(--za-app-max-width);
  }
}

/* Elevación en cards y acciones principales */
.za-balance-card,
.za-welcome-card,
.za-help-card,
.za-shortcut-card,
.za-movement-card,
.za-vehicle-card,
.za-start-info-card,
.za-start-debt-card,
.za-video-card,
.za-start-form-card {
  box-shadow: var(--za-shadow-soft);
}

.za-action-primary {
  box-shadow: var(--za-shadow-soft);
}

@media (hover: hover) {
  .za-shortcut-card,
  .za-vehicle-card,
  .za-movement-card,
  .za-help-card,
  .za-action-primary,
  .za-small-action {
    transition: box-shadow 180ms ease, transform 180ms ease;
  }

  .za-shortcut-card:hover,
  .za-vehicle-card:hover,
  .za-movement-card:hover,
  .za-help-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
  }

  .za-action-primary:hover,
  .za-small-action:hover {
    box-shadow: 0 4px 12px rgba(39, 70, 121, 0.18);
  }
}

.za-header-back:focus-visible,
.za-mobile-back:focus-visible,
.za-shortcut-card:focus-visible,
.za-help-link:focus-visible,
.za-secondary-link:focus-visible {
  outline: 2px solid var(--za-primary);
  outline-offset: 2px;
}

/* =========================================================
   3. Header común
   ========================================================= */

/* Header estándar recomendado para las 4 apps */
.za-header {
  width: 100%;
  min-height: var(--za-header-height);
  background: var(--za-primary);
  color: var(--za-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(10px + env(safe-area-inset-top, 0)) 16px 10px;
  flex-shrink: 0;
}

.za-header-logo-img,
.za-header-brand {
  display: block;
  width: auto;
  max-height: 42px;
  object-fit: contain;
}

/* Variante heredada: contenedor de header con logo */
.za-header-logo {
  width: 100%;
  min-height: var(--za-header-height);
  background: var(--za-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(10px + env(safe-area-inset-top, 0))
    16px
    10px;
  flex-shrink: 0;
}

/* Variante heredada: header textual */
.za-header-text {
  width: 100%;
  background: var(--za-primary);
  color: var(--za-white);
  padding: 22px 20px 18px;
}

.za-header-title {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 500;
  margin: 0;
}

.za-header-subtitle {
  font-size: 15px;
  font-weight: 400;
  margin: 4px 0 0;
  opacity: 0.9;
}

/* Header contextual con volver integrado */
.za-header-contextual {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0)) 12px 12px;
}

.za-header-back {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--za-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0;
  flex-shrink: 0;
}

/* Ícono circular de volver (reutilizable) */
.za-back-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--za-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.za-back-icon i {
  display: block;
  font-size: 11px;
  line-height: 1;
  transform: translateX(-1px);
}

.za-back-icon-light {
  background: var(--za-bg);
  color: var(--za-primary);
}

.za-mobile-back:hover .za-back-icon-light,
.za-mobile-back:focus .za-back-icon-light,
.za-mobile-back:active .za-back-icon-light {
  background: var(--za-bg);
  color: var(--za-primary-dark);
}

.za-header-back:hover,
.za-header-back:focus,
.za-header-back:active {
  background: rgba(255, 255, 255, 0.2);
  color: var(--za-white);
  text-decoration: none;
  outline: none;
}

.za-header-page-title {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  color: var(--za-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  padding: 0 0 2px;
}

.za-header-spacer {
  width: 44px;
  height: 44px;
}

.za-page-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--za-muted);
}

/* =========================================================
   4. Footer común
   ========================================================= */

/* Footer: hijo directo de .za-app-shell, mismo ancho que header y cuerpo */
.za-app-shell > .za-footer {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-self: stretch;
  flex: 0 0 auto;
  margin-left: 0;
  margin-right: 0;
}

.za-footer {
  width: 100%;
  min-height: var(--za-footer-min-height);
  background: var(--za-primary);
  padding-top: calc(8px + env(safe-area-inset-bottom, 0px) * 0.35);
  padding-right: var(--za-content-padding);
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  padding-left: var(--za-content-padding);
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.za-footer-logos {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: calc(var(--za-footer-min-height) - 16px);
}

.za-footer-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 30px;
  margin: 0;
  align-self: center;
  object-fit: contain;
  object-position: center center;
}

.za-footer-logo-left {
  max-width: 52%;
  max-height: 38px;
}

.za-footer-logo-right {
  max-width: 44%;
  max-height: 24px;
}

/* =========================================================
   5. Componentes comunes
   ========================================================= */

/* Cards */
.za-card {
  background: var(--za-card);
  border-radius: var(--za-radius);
  padding: 16px;
}

.za-card-compact {
  padding: 12px 14px;
}

.za-card-lg {
  padding: 20px 18px;
}

/* Títulos de sección */
.za-section-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--za-text);
  margin: 0 0 8px;
}

/* Botones base */
.za-btn {
  min-height: 44px;
  border-radius: var(--za-radius);
  border: 0;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.za-btn:hover,
.za-btn:focus,
.za-btn:active {
  text-decoration: none;
  outline: none;
}

.za-btn-primary {
  background: var(--za-primary);
  color: var(--za-white);
}

.za-btn-primary:hover,
.za-btn-primary:focus,
.za-btn-primary:active {
  background: var(--za-primary-dark);
  color: var(--za-white);
}

.za-btn-secondary {
  background: var(--za-card);
  color: var(--za-text);
  border: 1px solid var(--za-border);
}

.za-btn-secondary:hover,
.za-btn-secondary:focus,
.za-btn-secondary:active {
  background: var(--za-bg);
  color: var(--za-text);
}

.za-btn-block {
  width: 100%;
}

.za-btn-sm {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 14px;
}

/* Acción pequeña heredada */
.za-small-action {
  background: var(--za-primary);
  color: var(--za-white);
  border-radius: var(--za-radius);
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

button.za-small-action {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.za-form-submit-action,
.za-vehicles-submit,
.za-movements-submit {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.za-form-submit-action i,
.za-vehicles-submit i,
.za-movements-submit i {
  margin-right: 8px;
  font-size: 14px;
}

.za-small-action:hover,
.za-small-action:focus,
.za-small-action:active {
  background: var(--za-primary-dark);
  color: var(--za-white);
  text-decoration: none;
  outline: none;
}

/* Formularios */
.za-form-group {
  margin-bottom: 12px;
}

.za-label,
.za-form-label,
.za-vehicles-label,
.za-movements-label,
.za-start-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--za-text);
  margin-bottom: 6px;
}

.za-input,
.za-select,
.za-vehicles-input,
.za-movements-input,
.za-start-select,
.za-recharge-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 46px;
  min-height: 46px;
  border-radius: var(--za-radius);
  border: 1px solid var(--za-border);
  color: var(--za-text);
  font-size: 16px;
  line-height: 1.25;
  padding: 10px 12px;
  background-color: var(--za-white);
  box-sizing: border-box;
}

.za-select,
.za-start-select,
.za-recharge-select {
  display: block;
  width: 100%;
  padding: 10px 36px 10px 12px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--za-white);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23495057' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 8px 10px;
}

.za-field-select,
.za-field-date {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/*
  Selects nativos + custom-select Bootstrap.
  El popup desplegado lo controla el SO/navegador; acá se dimensiona el campo cerrado.
*/
.za-app-shell select.custom-select.za-start-select,
.za-app-shell select.custom-select.za-recharge-select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.za-app-shell form {
  min-width: 0;
  max-width: 100%;
}

.za-app-shell .form-group {
  min-width: 0;
  max-width: 100%;
}

.za-app-shell input[type="date"].za-movements-input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.za-app-shell .za-balance-card,
.za-app-shell .za-start-form-card,
.za-app-shell .za-movements-filter-card,
.za-app-shell .za-recharge-form-card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.za-input:focus,
.za-select:focus,
.za-vehicles-input:focus,
.za-movements-input:focus,
.za-start-select:focus,
.za-recharge-select:focus {
  border-color: var(--za-primary);
  box-shadow: 0 0 0 0.15rem rgba(39, 70, 121, 0.15);
  outline: none;
  background-color: var(--za-white);
}

.za-input-plate,
.za-vehicles-input {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.za-form-help,
.form-text.text-muted {
  font-size: 13px;
  color: var(--za-muted);
  line-height: 1.35;
}

.za-form-help {
  margin-top: 0;
}

.form-text.text-muted {
  margin-top: 6px;
}

.za-form-feedback {
  border-radius: var(--za-radius);
  padding: 9px 10px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.3;
}

.za-form-feedback.is-error {
  background: var(--za-danger-bg);
  color: var(--za-danger-text);
}

.za-form-feedback.is-success {
  background: var(--za-success-bg);
  color: var(--za-success-text);
}

/* Badges */
.za-badge {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.za-badge-paid {
  background: var(--za-success-bg);
  color: var(--za-success-text);
}

.za-badge-pending {
  background: var(--za-warning-bg);
  color: var(--za-warning-text);
}

.za-badge-active {
  background: var(--za-info-bg);
  color: var(--za-info-text);
}

.za-badge-scheduled {
  background: var(--za-info-bg);
  color: var(--za-info-text);
}

/* Botón volver mobile */
.za-mobile-back {
  align-self: flex-start;
  min-height: 44px;
  padding: 7px 12px 7px 8px;
  border-radius: 999px;
  background: var(--za-white);
  color: var(--za-primary);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
}

.za-mobile-back-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: var(--za-bg);
  color: var(--za-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* heredado: usar .za-back-icon en su lugar */

.za-mobile-back:hover,
.za-mobile-back:focus,
.za-mobile-back:active {
  background: var(--za-white);
  color: var(--za-primary-dark);
  text-decoration: none;
  outline: none;
}

.za-mobile-back:hover .za-mobile-back-icon,
.za-mobile-back:focus .za-mobile-back-icon,
.za-mobile-back:active .za-mobile-back-icon {
  color: var(--za-primary-dark);
}

/* Menú base */
.za-menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.za-menu-card {
  width: 100%;
  min-height: 56px;
  padding: 12px 20px;
  background: var(--za-card);
  border-radius: var(--za-radius);
  border: 0;
  color: var(--za-text);
  font-size: 20px;
  font-weight: 400;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.za-menu-card:hover,
.za-menu-card:focus,
.za-menu-card:active {
  text-decoration: none;
  color: var(--za-text);
  outline: none;
}

.za-menu-left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.za-menu-icon {
  color: var(--za-primary);
  font-size: 20px;
  width: 28px;
  margin-right: 12px;
  text-align: center;
}

.za-menu-arrow {
  color: var(--za-primary);
  font-size: 14px;
  margin-left: 12px;
}

.za-menu-card-primary {
  background: var(--za-primary);
  color: var(--za-white);
}

.za-menu-card-primary:hover,
.za-menu-card-primary:focus,
.za-menu-card-primary:active {
  color: var(--za-white);
  background: var(--za-primary-dark);
}

.za-menu-card-primary .za-menu-icon,
.za-menu-card-primary .za-menu-arrow {
  color: var(--za-white);
}

.za-menu-card-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.za-menu-card-disabled .za-menu-icon,
.za-menu-card-disabled .za-menu-arrow {
  color: var(--za-muted);
}

/* Acción tipo card (finalizar estacionamiento en movimientos) */
.za-action-card {
  width: 100%;
  min-height: 74px;
  padding: 14px 16px;
  margin-top: 4px;
  background: var(--za-card);
  border-radius: var(--za-radius);
  border: 0;
  box-shadow: var(--za-shadow-soft);
  color: var(--za-text);
  font-size: 15px;
  font-weight: 400;
  display: flex;
  align-items: center;
  text-align: left;
}

.za-action-card .za-menu-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: var(--za-bg);
  color: var(--za-primary);
  font-size: 16px;
  margin-right: 14px;
}

.za-action-card .za-action-text strong {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
}

.za-action-card .za-action-text small {
  font-size: 13px;
  color: var(--za-muted);
  line-height: 1.25;
  margin-top: 3px;
}

.za-action-card.za-action-disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.za-action-card.za-action-disabled .za-menu-icon {
  color: var(--za-muted);
}

/* Acciones principales */
.za-main-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.za-action-primary,
.za-action-secondary {
  width: 100%;
  min-height: 82px;
  border: 0;
  border-radius: var(--za-radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  text-align: left;
  text-decoration: none;
}

.za-action-primary {
  background: var(--za-primary);
  color: var(--za-white);
}

.za-action-primary:hover,
.za-action-primary:focus,
.za-action-primary:active {
  background: var(--za-primary-dark);
  color: var(--za-white);
  text-decoration: none;
  outline: none;
}

.za-action-secondary {
  background: var(--za-card);
  color: var(--za-text);
  position: relative;
}

.za-action-secondary:hover,
.za-action-secondary:focus,
.za-action-secondary:active {
  color: var(--za-text);
  text-decoration: none;
  outline: none;
}

.za-action-primary *,
.za-action-secondary * {
  text-decoration: none;
}

.za-action-disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.za-action-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  font-size: 16px;
}

.za-action-primary .za-action-icon {
  background: rgba(255, 255, 255, 0.16);
  color: var(--za-white);
}

.za-action-secondary .za-action-icon {
  background: var(--za-bg);
  color: var(--za-muted);
}

.za-action-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.za-action-text strong {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.2;
}

.za-action-text small {
  font-size: 13px;
  line-height: 1.25;
  margin-top: 4px;
  opacity: 0.9;
}

.za-action-lock {
  color: var(--za-muted);
  font-size: 14px;
  margin-left: auto;
  padding-left: 10px;
}

/* Accesos rápidos */
.za-shortcuts {
  margin-top: 2px;
}

.za-shortcut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.za-shortcut-card {
  min-height: 88px;
  background: var(--za-card);
  border-radius: var(--za-radius);
  padding: 14px 10px;
  color: var(--za-text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.za-shortcut-card i {
  color: var(--za-primary);
  font-size: 22px;
  margin-bottom: 8px;
}

.za-shortcut-card span {
  font-size: 16px;
  font-weight: 400;
  text-align: center;
}

.za-shortcut-card:hover,
.za-shortcut-card:focus,
.za-shortcut-card:active {
  color: var(--za-text);
  text-decoration: none;
  background: var(--za-white);
  outline: none;
}

/* Card de ayuda */
.za-help-card {
  background: var(--za-card);
  border-radius: var(--za-radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.za-help-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--za-bg);
  color: var(--za-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  font-size: 17px;
}

.za-help-icon i {
  display: block;
  line-height: 1;
  font-size: 17px;
}

.za-help-icon i::before {
  display: block;
  line-height: 1;
}

.za-help-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.za-help-text strong {
  font-size: 15px;
  font-weight: 500;
  color: var(--za-text);
  line-height: 1.2;
}

.za-help-text span {
  font-size: 13px;
  color: var(--za-muted);
  line-height: 1.25;
  margin-top: 2px;
}

.za-help-link {
  background: var(--za-primary);
  color: var(--za-white);
  border-radius: var(--za-radius);
  padding: 8px 12px;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.za-help-link:hover,
.za-help-link:focus,
.za-help-link:active {
  background: var(--za-primary-dark);
  color: var(--za-white);
  text-decoration: none;
  outline: none;
}

.za-help-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.za-help-card-link:hover,
.za-help-card-link:focus,
.za-help-card-link:active {
  text-decoration: none;
  color: inherit;
  outline: none;
}

@media (hover: hover) {
  .za-help-card-link:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
  }
}

.za-help-card-link:focus-visible {
  outline: 2px solid var(--za-primary);
  outline-offset: 2px;
}

.za-help-card-link .za-help-link {
  pointer-events: none;
}

/* Modales */
.za-modal .modal-dialog {
  margin: 16px;
}

.za-modal-dialog {
  max-width: min(var(--za-app-max-width), calc(100vw - 32px));
}

.za-modal-content {
  border: 0;
  border-radius: var(--za-radius);
  background: var(--za-white);
  overflow: hidden;
}

.za-modal-header {
  padding: 18px 16px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--za-border);
}

.za-modal-header-centered {
  align-items: center;
}

.za-modal-header-centered .za-modal-icon {
  margin-top: 0;
}

.za-modal-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: var(--za-bg);
  color: var(--za-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.za-modal-header h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 500;
  color: var(--za-text);
  line-height: 1.2;
}

.za-modal-header p {
  margin: 0;
  font-size: 13px;
  color: var(--za-muted);
  line-height: 1.35;
}

.za-modal-body {
  padding: 16px;
}

.za-modal-body-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--za-muted);
}

.za-modal-summary {
  background: var(--za-bg);
  border-radius: var(--za-radius);
  padding: 4px 12px;
}

.za-modal-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--za-border);
  padding: 9px 0;
}

.za-modal-summary-row:last-child {
  border-bottom: 0;
}

.za-modal-summary-row span {
  font-size: 13px;
  color: var(--za-muted);
}

.za-modal-summary-row strong {
  font-size: 14px;
  font-weight: 500;
  color: var(--za-text);
  text-align: right;
}

.za-modal-note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--za-muted);
}

.za-modal-actions {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--za-border);
}

.za-modal-primary,
.za-modal-secondary {
  width: 100%;
  min-height: 44px;
  border-radius: var(--za-radius);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.za-modal-primary {
  border: 0;
  background: var(--za-primary);
  color: var(--za-white);
}

.za-modal-primary:hover,
.za-modal-primary:focus,
.za-modal-primary:active {
  background: var(--za-primary-dark);
  color: var(--za-white);
  outline: none;
}

.za-modal-secondary {
  border: 1px solid var(--za-border);
  background: var(--za-white);
  color: var(--za-text);
}

.za-modal-secondary:hover,
.za-modal-secondary:focus,
.za-modal-secondary:active {
  background: var(--za-bg);
  outline: none;
}

.za-modal-primary:disabled,
.za-modal-primary:disabled:hover,
.za-modal-primary:disabled:focus,
.za-modal-primary:disabled:active {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--za-primary);
  color: var(--za-white);
}

.za-modal-link {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.za-modal-link:hover,
.za-modal-link:focus,
.za-modal-link:active {
  text-decoration: none;
  color: var(--za-text);
}

.za-modal-danger {
  background: var(--za-danger);
}

.za-modal-danger:hover,
.za-modal-danger:focus,
.za-modal-danger:active {
  background: #9a2a2a;
  color: var(--za-white);
}

button.za-movement-pay-button {
  width: 100%;
  border: 0;
  cursor: pointer;
}

@media (min-width: 576px) {
  .za-modal .modal-dialog {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Utilidades */
.za-text-primary {
  color: var(--za-primary);
}

.za-muted {
  color: var(--za-muted);
}

.za-text-center {
  text-align: center;
}

.za-mb-0 {
  margin-bottom: 0;
}

.za-mt-0 {
  margin-top: 0;
}

/* Fallback si Bootstrap CDN no carga */
.d-none {
  display: none !important;
}

.form-control:focus-visible,
.za-action-primary:focus-visible,
.za-action-secondary:focus-visible,
.za-small-action:focus-visible {
  outline: 2px solid var(--za-primary);
  outline-offset: 2px;
}

/* =========================================================
   6. Splash
   ========================================================= */

body.page-splash {
  background: var(--za-primary);
}

.za-splash-screen {
  background: var(--za-primary);
  color: var(--za-white);
  align-items: stretch;
  justify-content: flex-start;
  text-align: center;
  overflow: hidden;
  transition: opacity 650ms ease, transform 650ms ease;
}

@media (min-width: 576px) {
  body.page-splash .za-app-shell {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: none;
  }
}

.za-splash-content {
  width: 100%;
  flex: 1;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zaSplashEnterFromLeft 850ms ease-out both;
}

.za-footer-splash {
  margin-top: 0;
  background: transparent;
  min-height: auto;
  padding-top: 0;
  padding-left: 28px;
  padding-right: 28px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}

.za-splash-brand {
  width: min(78vw, 360px);
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
  object-fit: contain;
}

.za-splash-screen.za-splash-exit {
  opacity: 0;
  transform: translateX(18px);
}

@keyframes zaSplashEnterFromLeft {
  from {
    opacity: 0;
    transform: translateX(-70px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =========================================================
   7. Pantallas comunes de bienvenida / onboarding
   ========================================================= */

.za-welcome-card {
  background: var(--za-card);
  border-radius: var(--za-radius);
  padding: 20px 18px;
  text-align: center;
}

.za-welcome-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--za-bg);
  color: var(--za-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 12px;
}

.za-welcome-title {
  font-size: 24px;
  font-weight: 500;
  color: var(--za-text);
  margin: 0 0 8px;
  line-height: 1.2;
}

.za-welcome-text {
  font-size: 15px;
  color: var(--za-muted);
  line-height: 1.4;
  margin: 0;
}

.za-video-card {
  background: var(--za-card);
  border-radius: var(--za-radius);
  padding: 10px;
}

.za-video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--za-radius);
  background: var(--za-bg);
}

.za-video-wrapper.za-video-placeholder {
  height: auto;
  padding-bottom: 0;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--za-border);
  background: var(--za-bg);
}

.za-video-placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 20px;
  color: var(--za-muted);
}

.za-video-placeholder-content i {
  color: var(--za-primary);
  font-size: 42px;
  margin-bottom: 12px;
}

.za-video-placeholder-content strong {
  display: block;
  color: var(--za-text);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
}

.za-video-placeholder-content span {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  max-width: 280px;
}

.za-video-wrapper iframe,
.za-video-wrapper video {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.za-onboarding-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.za-onboarding-main-action {
  min-height: 78px;
}

.za-secondary-link {
  color: var(--za-primary);
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  padding: 6px 0;
}

.za-secondary-link:hover,
.za-secondary-link:focus,
.za-secondary-link:active {
  color: var(--za-primary-dark);
  text-decoration: none;
  outline: none;
}

/* =========================================================
   8. Contribuyente - Inicio / Dashboard
   ========================================================= */

.za-balance-card {
  background: var(--za-card);
  border-radius: var(--za-radius);
  padding: 18px 20px;
  margin-bottom: 0;
}


/* Inicio - Recuadro de saldo */
.za-home-balance {
    display: block;
    margin-bottom: 0;
}

/* Fila superior: saldo y botón */
.za-home-balance-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.za-home-balance-row > div {
    min-width: 0;
}

/* Botón alineado arriba */
.za-home-balance-row #btnCargarSaldo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    flex-shrink: 0;
    align-self: center;
}

/* Información de recargas presenciales */
.za-home-recharge-info {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e5e9ef;
    text-align: center;
    font-size: 15px;
    line-height: 1.45;
    color: #596575;
}

.za-home-recharge-info strong {
    display: block;
    margin-bottom: 4px;
    color: #274679;
    font-weight: 500;
}

.za-home-recharge-info span {
    display: block;
}


.za-balance-label {
  font-size: 15px;
  color: var(--za-muted);
  margin: 0 0 4px;
}

.za-balance-amount {
  color: var(--za-primary);
  font-size: 32px;
  font-weight: 500;
  margin: 0;
}

.za-balance-help {
  font-size: 13px;
  color: var(--za-muted);
  line-height: 1.35;
  margin: 8px 0 0;
}

/* Pago pendiente en dashboard */
.za-pending-payment-card {
  width: 100%;
  min-width: 0;
  background: var(--za-warning-bg);
  border: 1px solid rgba(183, 121, 31, 0.45);
  border-radius: var(--za-radius);
  box-shadow: var(--za-shadow-soft);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.za-pending-payment-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: rgba(183, 121, 31, 0.12);
  color: var(--za-warning);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.za-pending-payment-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.za-pending-payment-title {
  color: var(--za-text);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
}

.za-pending-payment-amount {
  color: var(--za-primary);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 3px;
}

.za-pending-payment-date {
  color: var(--za-text);
  font-size: 13px;
  line-height: 1.3;
  margin-top: 3px;
}

.za-pending-payment-content small {
  color: var(--za-muted);
  font-size: 12px;
  line-height: 1.3;
  margin-top: 3px;
}

.za-pending-payment-action {
  align-self: center;
}

/* Estacionamiento activo (dashboard) */
.za-active-parking-section {
  width: 100%;
}

.za-active-parking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.za-active-parking-list > * + * {
  margin-top: 10px;
}

@supports (gap: 10px) {
  .za-active-parking-list > * + * {
    margin-top: 0;
  }
}

.za-active-parking-card {
  background: var(--za-card);
  border-radius: var(--za-radius);
  border-left: 4px solid var(--za-primary);
  padding: 18px 18px 16px;
  box-shadow: 0 4px 16px rgba(39, 70, 121, 0.14);
}

.za-active-parking-card-compact {
  padding: 14px 16px 12px;
  box-shadow: var(--za-shadow-soft);
}

.za-active-parking-card-compact .za-active-parking-main {
  margin-bottom: 10px;
}

.za-active-parking-card-compact .za-active-parking-plate {
  font-size: 22px;
}

.za-active-parking-card-compact .za-active-parking-meta {
  margin-bottom: 12px;
}

.za-active-parking-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.za-active-parking-plate {
  font-size: 28px;
  font-weight: 600;
  color: var(--za-text);
  line-height: 1.1;
  margin-bottom: 0;
  min-width: 0;
}

.za-active-parking-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-bottom: 0;
}

.za-active-parking-notice {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--za-border);
  font-size: 13px;
  line-height: 1.4;
  color: var(--za-muted);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.za-active-parking-cancel-button {
  margin-top: 14px;
  width: 100%;
}

.za-active-parking-card-compact .za-active-parking-cancel-button {
  margin-top: 12px;
}

.za-active-parking-card-compact:has(.za-active-parking-cancel-button) {
  padding-bottom: 16px;
}

.za-active-parking-meta-item span {
  display: block;
  font-size: 12px;
  color: var(--za-muted);
  margin-bottom: 3px;
}

.za-active-parking-meta-item strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--za-text);
}

@media (max-width: 360px) {
  .za-active-parking-meta {
    grid-template-columns: 1fr;
  }

  .za-active-parking-main {
    align-items: flex-start;
  }
}

/* =========================================================
   9. Contribuyente - Mis vehículos
   ========================================================= */

.za-vehicles-title-card {
  padding: 20px 18px;
}

.za-vehicles-title-card .za-welcome-icon {
  margin-bottom: 12px;
}

.za-vehicles-title-card .za-welcome-title {
  font-size: 24px;
  margin-bottom: 8px;
}

.za-vehicles-title-card .za-welcome-text {
  font-size: 15px;
}

.za-vehicles-form-card {
  margin-bottom: 0;
}

.za-vehicles-section {
  margin-top: 0;
}

.za-vehicles-empty {
  margin-bottom: 0;
}

.za-vehicles-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.za-vehicle-card {
  background: var(--za-card);
  border-radius: var(--za-radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.za-vehicle-info {
  display: flex;
  align-items: center;
  min-width: 0;
}

.za-vehicle-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--za-bg);
  color: var(--za-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.za-vehicle-main {
  min-width: 0;
}

.za-vehicle-plate {
  display: block;
  font-size: 19px;
  font-weight: 500;
  color: var(--za-text);
  letter-spacing: 0.7px;
  line-height: 1.1;
}

.za-vehicle-label {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--za-muted);
}

.za-vehicle-label-active {
  color: var(--za-primary);
  font-weight: 500;
}

.za-vehicle-delete {
  width: 44px;
  height: 44px;
  min-width: 36px;
  border: 0;
  border-radius: var(--za-radius);
  background: transparent;
  color: var(--za-danger);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.za-vehicle-delete:hover,
.za-vehicle-delete:focus,
.za-vehicle-delete:active {
  background: var(--za-danger-bg);
  color: var(--za-danger);
  outline: none;
}

/* =========================================================
   10. Contribuyente - Movimientos
   ========================================================= */

.za-movements-title-card {
  padding: 20px 18px;
}

.za-movements-title-card .za-welcome-icon {
  margin-bottom: 12px;
}

.za-movements-title-card .za-welcome-title {
  font-size: 24px;
  margin-bottom: 8px;
}

.za-movements-title-card .za-welcome-text {
  font-size: 15px;
}

.za-movements-filter-card {
  margin-bottom: 0;
}

.za-movements-filter-card form {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.za-movements-filter-grid {
  display: grid;
  /* minmax(0, …) evita que input[type="date"] fuerce ancho mínimo intrínseco */
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.za-movements-filter-grid .za-movements-form-group {
  margin-bottom: 0;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.za-movements-filter-grid .za-field-date {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/*
  iOS Safari: input[type="date"] tiene ancho mínimo intrínseco elevado.
  Flex + min-width 0 + ajustes webkit evitan desborde fuera de la card.
*/
.za-movements-filter-grid input[type="date"].za-movements-input {
  flex: 1 1 0%;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  -webkit-min-logical-width: 0;
  height: 40px;
  min-height: 40px;
  font-size: 16px;
  line-height: 40px;
  padding: 0 8px 0 12px;
}

.za-movements-filter-grid input[type="date"].za-movements-input::-webkit-date-and-time-value {
  display: inline-block;
  min-width: 0;
  height: 40px;
  line-height: 40px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  vertical-align: middle;
}

.za-movements-filter-grid input[type="date"].za-movements-input::-webkit-calendar-picker-indicator {
  margin: 0;
  padding: 0;
  vertical-align: middle;
}

.za-movements-filter-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 14px;
}

.za-movements-filter-actions .za-movements-clear {
  margin: 0;
  padding: 4px 0;
}

.za-help-link-button {
  border: 0;
  background: var(--za-primary);
  color: var(--za-white);
  border-radius: var(--za-radius);
  padding: 8px 12px;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  font: inherit;
}

.za-help-link-button:hover,
.za-help-link-button:focus,
.za-help-link-button:active {
  background: var(--za-primary-dark);
  color: var(--za-white);
  outline: none;
}

.za-help-link-button:focus-visible {
  outline: 2px solid var(--za-primary);
  outline-offset: 2px;
}

.za-movements-form-group {
  margin-bottom: 12px;
}

.za-movements-section {
  margin: 0;
}

.za-movements-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.za-movement-card {
  background: var(--za-card);
  border-radius: var(--za-radius);
  padding: 14px;
}

.za-movement-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.za-movement-plate {
  display: block;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.7px;
  line-height: 1.1;
  color: var(--za-text);
}

.za-movement-subtitle {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.2;
  color: var(--za-muted);
}

.za-movement-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.za-movement-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--za-border);
  padding-top: 8px;
}

.za-movement-detail span {
  font-size: 13px;
  color: var(--za-muted);
}

.za-movement-detail strong {
  font-size: 14px;
  font-weight: 500;
  color: var(--za-text);
  text-align: right;
}

.za-movement-pay-button {
  width: 100%;
  min-height: 44px;
  border-radius: var(--za-radius);
  background: var(--za-primary);
  color: var(--za-white);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.za-movement-pay-button i {
  margin-right: 8px;
  font-size: 14px;
}

.za-movement-pay-button:hover,
.za-movement-pay-button:focus,
.za-movement-pay-button:active {
  background: var(--za-primary-dark);
  color: var(--za-white);
  text-decoration: none;
  outline: none;
}

.za-movement-notice {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--za-border);
  font-size: 13px;
  line-height: 1.4;
  color: var(--za-muted);
}

.za-movements-empty {
  margin-bottom: 0;
}

.za-movements-help {
  margin-top: 0;
}

/* =========================================================
   11. Contribuyente - Iniciar estacionamiento
   ========================================================= */

.za-start-title-card {
  padding: 20px 18px;
}

.za-start-title-card .za-welcome-icon {
  margin-bottom: 12px;
}

.za-start-title-card .za-welcome-title {
  font-size: 24px;
  margin-bottom: 8px;
}

.za-start-title-card .za-welcome-text {
  font-size: 15px;
}

/* Aviso deuda */
.za-start-debt-card {
  background: var(--za-warning-bg);
  border-radius: var(--za-radius);
  padding: 16px;
  color: var(--za-warning-text);
}

.za-start-active-card {
  background: var(--za-info-bg);
  color: var(--za-info-text);
}

.za-start-active-card .za-start-alert-icon {
  background: rgba(39, 70, 121, 0.12);
  color: var(--za-info-text);
}

.za-start-active-card .za-start-alert-text h2,
.za-start-active-card .za-start-alert-text p {
  color: var(--za-info-text);
}

.za-start-active-card .za-start-alert-button {
  background: var(--za-primary);
  color: var(--za-white);
}

.za-start-active-card .za-start-alert-button:hover,
.za-start-active-card .za-start-alert-button:focus,
.za-start-active-card .za-start-alert-button:active {
  background: var(--za-primary-dark);
  color: var(--za-white);
}

.za-start-schedule-card {
  background: var(--za-warning-bg);
  color: var(--za-warning-text);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.za-start-schedule-card .za-start-alert-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}

.za-start-schedule-card .za-start-alert-text {
  flex: 1;
  min-width: 0;
}

.za-start-schedule-card .za-start-alert-text p {
  color: var(--za-warning-text);
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.za-start-alert-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(133, 100, 4, 0.12);
  color: var(--za-warning-text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 18px;
}

.za-start-alert-text h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 500;
  color: var(--za-warning-text);
}

.za-start-alert-text p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--za-warning-text);
}

.za-start-alert-button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: var(--za-radius);
  background: var(--za-primary);
  color: var(--za-white);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.za-start-alert-button i {
  margin-right: 8px;
  font-size: 14px;
}

.za-start-alert-button:hover,
.za-start-alert-button:focus,
.za-start-alert-button:active {
  background: var(--za-primary-dark);
  color: var(--za-white);
  text-decoration: none;
  outline: none;
}

/* Info horario */
.za-start-info-card {
  background: var(--za-card);
  border-radius: var(--za-radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.za-start-info-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--za-bg);
  color: var(--za-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.za-start-info-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.za-start-info-text strong {
  font-size: 15px;
  font-weight: 500;
  color: var(--za-text);
  line-height: 1.2;
}

.za-start-info-text span {
  font-size: 13px;
  color: var(--za-muted);
  line-height: 1.3;
  margin-top: 2px;
}

/* Formulario */
.za-start-form-card {
  margin-bottom: 0;
}

.za-start-form-group {
  margin-bottom: 12px;
}

.za-start-summary {
  background: var(--za-bg);
  border-radius: var(--za-radius);
  padding: 4px 12px;
  margin-bottom: 12px;
}

.za-start-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--za-border);
  padding: 9px 0;
}

.za-start-summary-row:last-child {
  border-bottom: 0;
}

.za-start-summary-row span {
  font-size: 13px;
  color: var(--za-muted);
}

.za-start-summary-row strong {
  font-size: 14px;
  font-weight: 500;
  color: var(--za-text);
  text-align: right;
}

.za-start-submit {
  min-height: 74px;
}

.za-start-submit.za-action-disabled,
.za-start-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

.za-start-empty {
  margin-bottom: 0;
}

.za-start-help {
  margin-top: 0;
}

/* Matrícula y forma de pago */
.za-start-plate-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.za-start-plate-row .za-field-select {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.za-start-plate-row .za-start-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 46px;
  min-height: 46px;
  margin: 0;
  padding: 10px 36px 10px 12px;
  line-height: normal;
}

.za-add-plate-button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  flex-shrink: 0;
  box-sizing: border-box;
  border-radius: var(--za-radius);
  background: var(--za-primary);
  color: var(--za-white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.za-add-plate-button i {
  display: block;
  line-height: 1;
  font-size: 16px;
}

.za-add-plate-button:hover,
.za-add-plate-button:focus,
.za-add-plate-button:active {
  background: var(--za-primary-dark);
  color: var(--za-white);
  text-decoration: none;
  outline: none;
}

.za-payment-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.za-payment-option {
  background: var(--za-bg);
  border: 1px solid var(--za-border);
  border-radius: var(--za-radius);
  padding: 11px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  cursor: pointer;
}

.za-payment-option input {
  margin-top: 3px;
}

.za-payment-option span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.za-payment-option strong {
  font-size: 15px;
  font-weight: 500;
  color: var(--za-text);
  line-height: 1.2;
}

.za-payment-option small {
  font-size: 13px;
  color: var(--za-muted);
  line-height: 1.25;
  margin-top: 3px;
}

.za-action-primary.za-action-disabled,
.za-action-primary.za-action-disabled:hover,
.za-action-primary.za-action-disabled:focus,
.za-action-primary.za-action-disabled:active {
  background: var(--za-primary);
  color: var(--za-white);
  text-decoration: none;
}

#btnIniciarEstacionamiento,
#btnIniciarEstacionamiento:hover,
#btnIniciarEstacionamiento:focus,
#btnIniciarEstacionamiento:active {
  text-decoration: none;
}

#btnFinalizarEstacionamiento,
#btnFinalizarEstacionamiento:hover,
#btnFinalizarEstacionamiento:focus,
#btnFinalizarEstacionamiento:active {
  text-decoration: none;
}

/* =========================================================
   12. Responsive avanzado (Fase D)
   ========================================================= */

@media (min-width: 768px) {
  .za-app-shell {
    max-width: var(--za-app-max-width);
  }

  :root {
    --za-content-padding: 20px;
    --za-stack-gap: 16px;
  }

  .za-shortcut-grid {
    gap: 12px;
  }

  .za-movements-filter-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 12px;
  }

  .za-movements-filter-actions .za-movements-submit {
    flex: 1 1 auto;
    min-width: 0;
  }

  .za-movements-filter-actions .za-movements-clear {
    flex: 0 0 auto;
    align-self: center;
  }

  .za-main-actions .za-action-primary {
    max-width: 100%;
  }

  .za-movement-details {
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
  }

  .za-movement-detail {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    border-top: 0;
    padding-top: 0;
  }

  .za-movement-detail strong {
    text-align: left;
  }
}

/* Dos columnas solo en desktop con puntero fino (no iPhone apaisado) */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .za-movements-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
  }
}

/* Touch: siempre una columna (portrait y landscape en iPhone/Android) */
@media (hover: none) and (pointer: coarse) {
  .za-movements-filter-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .za-movements-filter-card.za-balance-card {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (min-width: 992px) {
  :root {
    --za-app-max-width: 500px;
    --za-content-padding: 24px;
    --za-stack-gap: 18px;
  }

  body {
    background: linear-gradient(
      180deg,
      #cfcfcf 0%,
      var(--za-bg-desktop) 48%,
      #d4d4d4 100%
    );
  }

  body:not(.page-splash) .za-app-shell {
    margin-top: 24px;
    margin-bottom: 24px;
    min-height: calc(100vh - 48px);
    min-height: calc(100dvh - 48px);
  }

  .za-shortcut-grid {
    gap: 14px;
  }

  .za-modal .modal-dialog {
    margin-top: 32px;
    margin-bottom: 32px;
  }

  .za-recharge-data-grid {
    gap: 12px 14px;
  }
}

@media (min-width: 1200px) {
  body:not(.page-splash) .za-app-shell {
    margin-top: 32px;
    margin-bottom: 32px;
    min-height: calc(100vh - 64px);
    min-height: calc(100dvh - 64px);
  }

  .za-modal .modal-dialog {
    margin-top: 40px;
    margin-bottom: 40px;
  }
}

@media (max-width: 360px) {
  .za-movement-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .za-movement-detail,
  .za-start-summary-row,
  .za-modal-summary-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .za-movement-detail strong,
  .za-start-summary-row strong,
  .za-modal-summary-row strong {
    text-align: left;
  }
}

/* =========================================================
   Contribuyente - Cargar saldo
   ========================================================= */

.za-recharge-content {
  padding-bottom: 18px;
}

.za-recharge-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.za-recharge-topbar .za-mobile-back {
  align-self: center;
  flex-shrink: 0;
}

.za-recharge-balance {
  flex-shrink: 0;
  min-width: 0;
  max-width: 58%;
  text-align: right;
  background: var(--za-card);
  border-radius: var(--za-radius);
  padding: 8px 12px;
  box-shadow: var(--za-shadow-soft);
}

.za-recharge-balance-label {
  display: block;
  margin: 0 0 2px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--za-muted);
}

.za-recharge-balance-amount {
  display: block;
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--za-primary);
  white-space: nowrap;
}

.za-recharge-form-card {
  padding: 16px;
  margin-bottom: 0;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.za-recharge-section {
  margin-bottom: 16px;
}

.za-recharge-help {
  margin: 0 0 12px;
  color: var(--za-muted);
  font-size: 14px;
  line-height: 1.35;
}

.za-recharge-personal-card {
  background: var(--za-bg);
  border-radius: var(--za-radius);
  padding: 12px;
}

.za-recharge-person-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--za-border);
}

.za-recharge-person-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: var(--za-white);
  color: var(--za-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.za-recharge-person-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.za-recharge-person-text strong {
  color: var(--za-text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  word-break: break-word;
}

.za-recharge-person-text span {
  margin-top: 3px;
  color: var(--za-muted);
  font-size: 13px;
  line-height: 1.2;
}

.za-recharge-data-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.za-recharge-data-item {
  min-width: 0;
  background: var(--za-white);
  border-radius: var(--za-radius);
  padding: 9px 10px;
}

.za-recharge-data-item span {
  display: block;
  margin-bottom: 3px;
  color: var(--za-muted);
  font-size: 12px;
  line-height: 1.2;
}

.za-recharge-data-item strong {
  display: block;
  color: var(--za-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  word-break: break-word;
}

.za-recharge-solicitante-group,
.za-recharge-amount-group {
  margin-bottom: 0;
  min-width: 0;
  max-width: 100%;
}

.za-recharge-section + .za-recharge-section {
  margin-top: 4px;
}

.za-recharge-notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: var(--za-radius);
  background: var(--za-info-bg);
  color: var(--za-info-text);
  font-size: 13px;
  line-height: 1.35;
}

.za-recharge-submit {
  min-height: 74px;
  width: 100%;
}

@media (max-width: 360px) {
  .za-recharge-balance {
    max-width: 52%;
    padding: 7px 10px;
  }

  .za-recharge-balance-amount {
    font-size: 15px;
  }
}

@media (min-width: 380px) {
  .za-recharge-data-grid {
    grid-template-columns: 1fr 1fr;
  }

  .za-recharge-data-item-wide {
    grid-column: 1 / -1;
  }
}
/* Ciudadano: acceso al mapa oficial y horario tarifado */
.za-map-access { margin: 16px 0; }
.za-map-access-button {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 49px; padding: 12px 14px; border-radius: var(--za-radius);
  background: #274679; color: #fff; text-align: center;
  text-decoration: none; font-size: 15px; font-weight: 600;
}
.za-map-access-button:hover, .za-map-access-button:focus {
  color: #fff; text-decoration: none; background: #1d365e;
}
.za-map-access-button:focus-visible { outline: 3px solid #5b9bff; outline-offset: 2px; }
.za-map-access-hours { margin: 9px 3px 0; font-size: 12px; line-height: 1.5; text-align: center; color: var(--za-text); }
.za-map-image { display: block; width: 100%; height: auto; border-radius: var(--za-radius); }
.za-map-image-link { display: block; text-decoration: none; }
.za-map-hint { font-size: 12px; text-align: center; margin: 10px 0 0; color: var(--za-muted); }

/* Versión 2: lectura accesible en WebView. No aumenta iconos ni insignias compactas. */
.za-header-subtitle,.za-page-lead,.za-btn,.za-btn-sm,.za-small-action,
.form-text.text-muted,.za-form-feedback,.za-mobile-back,.za-action-card,
.za-action-card .za-action-text small,.za-action-text small,.za-help-text strong,
.za-help-text span,.za-help-link,.za-modal-header p,.za-modal-body-text,
.za-modal-summary-row span,.za-modal-summary-row strong,.za-modal-note,
.za-modal-secondary,.za-welcome-text,.za-video-placeholder-content span,
.za-secondary-link,.za-balance-label,.za-balance-help,.za-pending-payment-date,
.za-pending-payment-content small,.za-active-parking-notice,
.za-active-parking-meta-item span,.za-active-parking-meta-item strong,
.za-vehicles-title-card .za-welcome-text,.za-vehicle-label,
.za-movements-title-card .za-welcome-text,.za-help-link-button,
.za-movement-subtitle,.za-movement-detail span,.za-movement-detail strong,
.za-movement-pay-button,.za-movement-notice,
.za-start-title-card .za-welcome-text,.za-start-schedule-card .za-start-alert-text p,
.za-start-alert-text p,.za-start-alert-button,.za-start-info-text strong,
.za-start-info-text span,.za-start-summary-row span,.za-start-summary-row strong,
.za-payment-option strong,.za-payment-option small,.za-recharge-balance-label,
.za-recharge-help,.za-recharge-person-text span,.za-recharge-data-item span,
.za-recharge-data-item strong,.za-recharge-notice,.za-map-access-hours,
.za-map-hint { font-size: 16px; line-height: 1.45; }
.za-map-access-button {font-size: 17px; min-height: 50px;}
.za-header-page-title {font-size: 19px;}
.za-recharge-balance-amount {font-size:16px;}
/* Evitar zoom automático al enfocar campos de texto en iOS WebView. */
input, select, textarea {font-size:16px;}
/* Mantener proporciones naturales y permitir usar la pantalla horizontal cuando el contenedor lo permita. */
.page-mapa-zona-azul .za-app-shell {max-width:none;}
.za-map-viewport {
  overflow:hidden; position:relative; width:100%;
  aspect-ratio: 1.65; min-height:210px;
  background:#fff; border:1px solid var(--za-border);
  border-radius:var(--za-radius); touch-action:pan-y;
  user-select:none; -webkit-user-select:none; overscroll-behavior:contain;
}
.za-map-viewport.is-zoomed {touch-action:none;}
.za-map-viewport .za-map-image {
  display:block; width:100%; height:100%; object-fit:contain;
  transform-origin:center center; will-change:transform;
  pointer-events:none; user-select:none; -webkit-user-drag:none;
}
@media (orientation:landscape) {
  .page-mapa-zona-azul .za-content {padding:10px 16px;gap:8px;}
  .page-mapa-zona-azul .za-map-viewport {height:62vh;height:62dvh;aspect-ratio:auto;min-height:140px;}
}
@media (max-width:360px) {
  .za-map-access-hours {font-size:16px;}
}


/* Nota informativa - Puntos de recarga */
.nota-recarga {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 12px;
    padding: 12px;
    background-color: #eef3f8;
    border-radius: 8px;
    color: #35445b;
    font-size: 15px;
    line-height: 1.5;
}

.nota-recarga-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border-radius: 50%;
    background-color: #274679;
    color: #ffffff;
    font-size: 13px;
    font-weight: bold;
    font-style: normal;
}

.nota-recarga-texto {
    flex: 1;
    min-width: 0;
}

.nota-recarga-texto strong {
    display: block;
    margin-bottom: 3px;
    font-weight: 600;
}

.nota-recarga-texto span {
    display: block;
}

