/*
==============================================================================
PORTAL CLIENTE — CSS LIMPIO

Usado únicamente por:
- templates/portal-cliente.php
- public/js/crp-cliente.js

No contiene estilos del portal de referidores ni del hero de bienvenida.
==============================================================================
*/

/* ==========================================================================
   01. BASE Y AISLAMIENTO
   ========================================================================== */

.crpc-clientes-portal {
  --crpc-bg: #ffffff;
  --crpc-surface: #e9eff6;
  --crpc-surface-light: #f9fcff;
  --crpc-navy: #073566;
  --crpc-blue: #267fc8;
  --crpc-cyan: #27c4c7;
  --crpc-text: #102944;
  --crpc-muted: #6d7d91;
  --crpc-success: #22c55e;
  --crpc-danger: #ef4444;
  --crpc-shadow-dark: rgba(104, 122, 145, 0.24);
  --crpc-shadow-light: rgba(255, 255, 255, 0.95);

  width: 100%;
 
  padding: 15px 22px 80px;
  overflow-x: hidden;

  background: var(--crpc-bg) !important;
  color: var(--crpc-text);
}

.crpc-clientes-portal,
.crpc-clientes-portal *,
.crpc-clientes-portal *::before,
.crpc-clientes-portal *::after {
  box-sizing: border-box;
}

.crpc-clientes-portal::before,
.crpc-clientes-portal::after,
.crpc-clientes-portal .portal-consulta-card::before,
.crpc-clientes-portal .portal-consulta-card::after {
  content: none !important;
  display: none !important;
}

.crpc-clientes-portal .crpc-clientes-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto !important;
  padding: 0 !important;

  font-family:
    "Montserrat",
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
}

.crpc-clientes-portal .crpc-panel {
  display: none;
}

.crpc-clientes-portal .crpc-panel.is-active {
  display: block;
}

/* Evita estilos globales del tema sobre botones del plugin. */
.crpc-clientes-portal button {
  margin: 0;
  text-transform: none;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
}

/* ==========================================================================
   02. FORMULARIO
   ========================================================================== */

.crpc-clientes-portal .portal-consulta-card {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 38px;
  padding: 56px 68px 38px;

  border: 3px solid rgba(255, 255, 255, 0.75) !important;
  border-radius: 32px !important;

  background:
    linear-gradient(
      145deg,
      #f8fbff,
      #e8eef6
    ) !important;

  box-shadow:
    18px 18px 34px var(--crpc-shadow-dark),
    -14px -14px 30px var(--crpc-shadow-light),
    inset 0 5px 8px rgba(255, 255, 255, 0.72),
    inset 0 -6px 12px rgba(126, 144, 166, 0.09) !important;
}

.crpc-clientes-portal .portal-consulta-row {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: end;
  gap: 22px;
}

.crpc-clientes-portal .portal-id-field {
  width: 100%;
  margin: 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crpc-clientes-portal .portal-field-label {
  display: block;
  margin-left: 5px;

  color: var(--crpc-text);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-align: left;
}

.crpc-clientes-portal .portal-id-field input[type="text"] {
  width: 100%;
  height: 62px;
  padding: 0 22px;

  border: 2px solid rgba(255, 255, 255, 0.65) !important;
  border-radius: 17px !important;
  outline: none;

  background: var(--crpc-surface) !important;
  color: var(--crpc-text) !important;

  font: inherit;
  font-size: 20px;
  font-weight: 500;
  line-height: 62px;

  box-shadow:
    inset 7px 7px 13px rgba(100, 119, 143, 0.20),
    inset -7px -7px 13px rgba(255, 255, 255, 0.90) !important;

  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.crpc-clientes-portal .portal-id-field input[type="text"]::placeholder {
  color: #8796a8;
  opacity: 1;
}

.crpc-clientes-portal .portal-id-field input[type="text"]:focus {
  border-color: rgba(38, 127, 200, 0.44) !important;
  background: #edf4fa !important;

  box-shadow:
    inset 4px 4px 9px rgba(100, 119, 143, 0.16),
    inset -4px -4px 9px rgba(255, 255, 255, 0.96),
    0 0 0 4px rgba(38, 127, 200, 0.12) !important;
}

.crpc-clientes-portal .portal-consulta-btn {
  width: 250px;
  height: 62px;
  padding: 0 25px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  border: 3px solid rgba(255, 255, 255, 0.24) !important;
  border-radius: 18px !important;

  background:
    linear-gradient(
      145deg,
      #0b4a83,
      #052d59
    ) !important;

  color: #ffffff !important;
  font: inherit;
  font-size: 17px;
  line-height: 1;
  font-weight: 800;

  cursor: pointer;

  box-shadow:
    9px 11px 18px rgba(5, 45, 89, 0.30),
    -5px -5px 13px rgba(255, 255, 255, 0.80),
    inset 4px 4px 7px rgba(255, 255, 255, 0.17),
    inset -5px -6px 9px rgba(0, 23, 48, 0.24) !important;

  transition:
    transform 0.2s ease,
    filter 0.2s ease,
    box-shadow 0.2s ease;
}

.crpc-clientes-portal .portal-consulta-btn:hover {
  transform: translateY(-4px);
  filter: brightness(1.07);
}

.crpc-clientes-portal .portal-consulta-btn:active {
  transform: translateY(1px) scale(0.98);
}

.crpc-clientes-portal .portal-consulta-btn:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.crpc-clientes-portal .portal-btn-arrow {
  font-size: 26px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.crpc-clientes-portal .portal-consulta-btn:hover .portal-btn-arrow {
  transform: translateX(5px);
}

.crpc-clientes-portal .portal-form-note {
  max-width: 760px;
  margin: 25px auto 0;

  color: #8492a5;
  font-size: 17px;
  line-height: 1.5;
  text-align: center;
}

/* ==========================================================================
   03. RESULTADOS Y ENCABEZADO
   ========================================================================== */

.crpc-clientes-portal #crpc-results-area {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 30px !important;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;

  background: transparent !important;
  box-shadow: none !important;
}

.crpc-clientes-portal .crpc-cli-title-row {
  width: 100%;
  margin: 0 0 30px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.crpc-clientes-portal .crpc-cli-title-heading {
  position: relative;
  width: 100%;

  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
}

.crpc-clientes-portal
.crpc-cli-title-heading
.crpc-title {
  margin: 5px 0 0 !important;
}

.crpc-clientes-portal .crpc-title {
  margin: 5px 0 28px !important;

  color: var(--crpc-navy);
  font-size: 18px !important;
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: 1.1px;
  text-align: center;
  text-transform: uppercase;
}

.crpc-clientes-portal .crpc-title::after {
  content: "";
  display: block;
  width: 58px;
  height: 7px;
  margin: 11px auto 0;

  border-radius: 999px;

  background:
    linear-gradient(
      145deg,
      var(--crpc-cyan),
      var(--crpc-blue)
    );

  box-shadow:
    3px 4px 7px rgba(57, 128, 182, 0.26),
    inset 2px 2px 3px rgba(255, 255, 255, 0.42);
}

.crpc-clientes-portal .crpc-cli-reload-btn {
  align-self: center;
  min-width: 190px;
  height: 48px;
  padding: 0 19px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  border: 0 !important;
  border-radius: 16px !important;

  background:
    linear-gradient(
      145deg,
      #0a477e,
      #052d59
    ) !important;

  color: #ffffff !important;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  font-weight: 800;

  cursor: pointer;

  box-shadow:
    6px 7px 12px rgba(5, 45, 89, 0.20),
    inset 4px 4px 7px rgba(255, 255, 255, 0.12),
    inset -5px -6px 9px rgba(0, 20, 43, 0.22) !important;

  transition:
    transform 0.2s ease,
    filter 0.2s ease,
    box-shadow 0.2s ease;
}

.crpc-clientes-portal .crpc-cli-reload-btn svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;

  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;

  transition: transform 0.45s ease;
}

.crpc-clientes-portal .crpc-cli-reload-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
}

.crpc-clientes-portal .crpc-cli-reload-btn:hover svg {
  transform: rotate(360deg);
}

.crpc-clientes-portal .crpc-cli-reload-btn:active {
  transform: translateY(1px) scale(0.97);
}


/* ==========================================================================
   INFORMACIÓN GENERAL DE PÓLIZAS Y CONTACTO POR WHATSAPP
   ========================================================================== */

.crpc-clientes-portal .crpc-cli-info {
  position: relative;
  flex: 0 0 auto;
  margin-top: 2px;
}

.crpc-clientes-portal .crpc-cli-info-btn {
  width: 25px;
  min-width: 25px;
  height: 25px;
  min-height: 25px;
  margin: 0;
  padding: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 2px solid rgba(255, 255, 255, 0.82) !important;
  border-radius: 50% !important;

  background:
    linear-gradient(
      145deg,
      #3985d3,
      #0b4f86
    ) !important;

  color: #ffffff !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  font-style: italic;

  cursor: help;

  box-shadow:
    4px 5px 9px rgba(58, 91, 126, 0.24),
    -3px -3px 7px rgba(255, 255, 255, 0.92),
    inset 2px 2px 3px rgba(255, 255, 255, 0.22);

  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}

.crpc-clientes-portal .crpc-cli-info-btn:hover,
.crpc-clientes-portal .crpc-cli-info-btn:focus-visible {
  transform: translateY(-2px) scale(1.05);
  filter: brightness(1.08);
}

.crpc-clientes-portal .crpc-cli-info-popover {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  z-index: 100;

  width: 340px;
  max-width: calc(100vw - 32px);
  padding: 15px;

  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 17px;

  background:
    linear-gradient(
      145deg,
      #f9fcff,
      #e6edf5
    );

  color: #31465d;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 600;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform:
    translateX(-50%)
    translateY(-4px);

  box-shadow:
    12px 15px 28px rgba(58, 78, 101, 0.23),
    -7px -7px 16px rgba(255, 255, 255, 0.94),
    inset 2px 2px 4px rgba(255, 255, 255, 0.70);

  transition:
    opacity 0.18s ease,
    visibility 0.18s ease,
    transform 0.18s ease;
}

.crpc-clientes-portal .crpc-cli-info-popover::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;

  width: 14px;
  height: 14px;

  border-left: 2px solid rgba(255, 255, 255, 0.82);
  border-top: 2px solid rgba(255, 255, 255, 0.82);

  background: #f7fbff;

  transform:
    translateX(-50%)
    rotate(45deg);
}

.crpc-clientes-portal .crpc-cli-info:hover .crpc-cli-info-popover,
.crpc-clientes-portal .crpc-cli-info:focus-within .crpc-cli-info-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform:
    translateX(-50%)
    translateY(0);
}

.crpc-clientes-portal .crpc-cli-info-text {
  margin: 0 0 11px;
}

.crpc-clientes-portal .crpc-cli-whatsapp-link {
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  border: 0;
  border-radius: 12px;

  background:
    linear-gradient(
      145deg,
      #2bd46f,
      #159447
    );

  color: #ffffff !important;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 800;
  text-align: center;
  text-decoration: none !important;

  box-shadow:
    5px 7px 12px rgba(21, 148, 71, 0.24),
    inset 2px 2px 4px rgba(255, 255, 255, 0.20);

  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}

.crpc-clientes-portal .crpc-cli-whatsapp-link:hover {
  color: #ffffff !important;
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* ==========================================================================
   04. CATEGORÍAS, DONAS Y RAMOS
   ========================================================================== */

.crpc-clientes-portal #crpc-ramos,
.crpc-clientes-portal #crpc-ramos.crpc-insurance-map {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 30px !important;
  padding: 0 !important;

  display: grid !important;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(160px, 205px)
    ) !important;

  justify-content: center !important;
  align-items: stretch !important;
  gap: 18px !important;
}

.crpc-clientes-portal .crpc-category-pillar {
  --crpc-accent: #267fc8;
  --crpc-donut-progress: 0%;

  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 205px;
  min-height: 365px;
  margin: 0 auto;
  padding: 21px 13px 18px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  border: 3px solid rgba(255, 255, 255, 0.76) !important;
  border-radius: 28px !important;
  outline: none;

  background:
    linear-gradient(
      145deg,
      #f8fbff,
      #e4ebf3
    ) !important;

  color: var(--crpc-text);
  text-align: center;

  box-shadow:
    10px 12px 22px rgba(99, 118, 141, 0.21),
    -8px -8px 19px rgba(255, 255, 255, 0.94),
    inset 3px 3px 6px rgba(255, 255, 255, 0.75),
    inset -4px -5px 9px rgba(116, 134, 155, 0.09) !important;

  cursor: pointer;

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.crpc-clientes-portal .crpc-category-pillar:hover {
  transform: translateY(-7px) scale(1.015);

  box-shadow:
    15px 18px 29px rgba(99, 118, 141, 0.24),
    -9px -9px 21px rgba(255, 255, 255, 0.96),
    inset 3px 3px 6px rgba(255, 255, 255, 0.77),
    inset -4px -5px 9px rgba(116, 134, 155, 0.09) !important;
}

.crpc-clientes-portal .crpc-category-pillar.active,
.crpc-clientes-portal .crpc-category-pillar[aria-pressed="true"] {
  transform: translateY(-4px);

  box-shadow:
    0 0 0 5px rgba(38, 127, 200, 0.11),
    13px 15px 27px rgba(99, 118, 141, 0.23),
    -9px -9px 21px rgba(255, 255, 255, 0.96),
    inset 3px 3px 6px rgba(255, 255, 255, 0.76) !important;
}

.crpc-clientes-portal .crpc-category-name {
  min-height: 36px;
  margin: 0 0 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--crpc-navy);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0.45px;
  text-transform: uppercase;
}

.crpc-clientes-portal
.crpc-category-pillar.active
.crpc-category-name,
.crpc-clientes-portal
.crpc-category-pillar[aria-pressed="true"]
.crpc-category-name {
  color: var(--crpc-accent);
}

.crpc-clientes-portal .crpc-category-donut {
  position: relative;
  width: 108px;
  height: 108px;
  flex: 0 0 108px;

  display: flex;
  align-items: center;
  justify-content: center;

  /*
   * El borde es opaco y el gradiente se recorta al padding.
   * Esto evita que el color se vea a través del borde como una mancha
   * en los puntos donde termina la parte activa.
   */
  border: 4px solid #f8fbff;
  border-radius: 50%;

  background:
    conic-gradient(
      from 0deg,
      var(--crpc-accent) 0 var(--crpc-donut-progress),
      #d8e3ed var(--crpc-donut-progress) 100%
    ) !important;

  background-clip: padding-box !important;

  box-shadow:
    8px 10px 16px rgba(85, 104, 127, 0.24),
    -6px -6px 14px rgba(255, 255, 255, 0.96),
    inset 4px 4px 6px rgba(255, 255, 255, 0.30),
    inset -4px -5px 7px rgba(43, 72, 102, 0.15);

  transition:
    transform 0.22s ease,
    filter 0.22s ease;
}

.crpc-clientes-portal
.crpc-category-pillar:hover
.crpc-category-donut {
  transform: scale(1.05);
  filter: brightness(1.03);
}

.crpc-clientes-portal .crpc-category-donut::before {
  content: "";
  position: absolute;
  inset: 9px;
  z-index: 1;

  border-radius: 50%;

  background:
    linear-gradient(
      145deg,
      #f9fcff,
      #e5edf5
    ) !important;

  box-shadow:
    inset 5px 5px 9px rgba(104, 122, 145, 0.16),
    inset -5px -5px 9px rgba(255, 255, 255, 0.94);
}

.crpc-clientes-portal .crpc-category-donut-center {
  position: relative;
  z-index: 2;
  width: 74px;
  height: 74px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.crpc-clientes-portal .crpc-category-count {
  display: block;

  color: var(--crpc-accent);
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -1px;
  white-space: nowrap;
}

.crpc-clientes-portal .crpc-category-count-label {
  display: block;
  margin-top: 5px;

  color: #67768a;
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.crpc-clientes-portal .crpc-category-icon {
  position: relative;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  margin: 42px auto 14px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 3px solid rgba(255, 255, 255, 0.42) !important;
  border-radius: 50% !important;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.22),
      transparent
    ),
    var(--crpc-accent) !important;

  color: #ffffff;
  font-size: 22px;

  box-shadow:
    7px 9px 14px rgba(76, 95, 117, 0.25),
    -5px -5px 12px rgba(255, 255, 255, 0.90),
    inset 4px 4px 6px rgba(255, 255, 255, 0.24),
    inset -4px -5px 7px rgba(29, 48, 70, 0.18) !important;
}

.crpc-clientes-portal
.crpc-category-donut
+
.crpc-category-icon::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;

  width: 4px;
  height: 40px;
  border-radius: 999px;

  background:
    linear-gradient(
      to bottom,
      rgba(116, 135, 157, 0.20),
      var(--crpc-accent)
    );

  transform: translateX(-50%);
}

.crpc-clientes-portal .crpc-category-list {
  width: 100%;
  margin: 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  gap: 9px;
}

.crpc-clientes-portal .crpc-category-ramo-btn,
.crpc-clientes-portal .crpc-vehiculo-inline-btn {
  width: 100%;
  min-height: 39px;
  padding: 8px 9px !important;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;

  border: 2px solid rgba(255, 255, 255, 0.70) !important;
  border-left: 5px solid var(--crpc-accent) !important;
  border-radius: 14px !important;

  background:
    linear-gradient(
      145deg,
      #f8fbff,
      #e4ebf3
    ) !important;

  color: #132841 !important;
  font: inherit;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
  text-align: left;

  box-shadow:
    5px 6px 10px rgba(99, 118, 141, 0.17),
    -4px -4px 9px rgba(255, 255, 255, 0.95),
    inset 2px 2px 3px rgba(255, 255, 255, 0.65) !important;

  cursor: pointer;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.crpc-clientes-portal .crpc-category-ramo-btn:hover,
.crpc-clientes-portal .crpc-vehiculo-inline-btn:hover {
  transform: translateY(-3px);

  box-shadow:
    7px 9px 14px rgba(99, 118, 141, 0.20),
    -5px -5px 11px rgba(255, 255, 255, 0.97),
    inset 2px 2px 3px rgba(255, 255, 255, 0.68) !important;
}

.crpc-clientes-portal .crpc-category-ramo-btn.is-active,
.crpc-clientes-portal .crpc-vehiculo-inline-btn.active,
.crpc-clientes-portal
.crpc-vehiculo-inline-btn[aria-pressed="true"] {
  transform: translateY(1px);

  background: #e7edf4 !important;
  color: var(--crpc-accent) !important;

  box-shadow:
    inset 5px 5px 9px rgba(99, 118, 141, 0.17),
    inset -5px -5px 9px rgba(255, 255, 255, 0.91) !important;
}

.crpc-clientes-portal .crpc-ramo-name {
  display: block;
  overflow-wrap: anywhere;
}

.crpc-clientes-portal .crpc-ramo-count {
  flex: 0 0 auto;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;

  border: 2px solid rgba(255, 255, 255, 0.30);
  border-radius: 999px;

  background: var(--crpc-accent);
  color: #ffffff;

  font-size: 11px;
  line-height: 22px;
  font-weight: 900;
  text-align: center;

  box-shadow:
    3px 4px 7px rgba(75, 94, 117, 0.23),
    inset 2px 2px 3px rgba(255, 255, 255, 0.27),
    inset -2px -3px 4px rgba(20, 40, 63, 0.15);
}

/* Lista de vehículos que se abre dentro de la tarjeta VEHÍCULOS. */
.crpc-clientes-portal .crpc-vehiculos-inline {
  display: none;
  width: 100%;
  margin: 9px auto 0;

  flex-direction: column;
  gap: 9px;
}

.crpc-clientes-portal .crpc-vehiculos-inline.is-open {
  display: flex;
}

.crpc-clientes-portal .crpc-vehiculo-inline-btn {
  justify-content: center;
  text-align: center;
}

/* ==========================================================================
   05. INFORMACIÓN DEL VEHÍCULO Y CERTIFICADOS
   ========================================================================== */

.crpc-clientes-portal .crpc-card {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 27px !important;

  border: 3px solid rgba(255, 255, 255, 0.74) !important;
  border-radius: 27px !important;

  background:
    linear-gradient(
      145deg,
      #f8fbff,
      #e5ecf4
    ) !important;

  box-shadow:
    13px 15px 28px rgba(101, 120, 143, 0.20),
    -10px -10px 23px rgba(255, 255, 255, 0.94),
    inset 3px 3px 6px rgba(255, 255, 255, 0.69),
    inset -4px -5px 9px rgba(113, 132, 154, 0.08) !important;
}

.crpc-clientes-portal .crpc-iv-grid {
  margin: 0 0 25px;

  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 13px;
}

.crpc-clientes-portal .crpc-iv-grid > div {
  min-height: 72px;
  padding: 13px 14px;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;

  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 16px;

  background: var(--crpc-surface);

  box-shadow:
    inset 5px 5px 9px rgba(100, 119, 142, 0.15),
    inset -5px -5px 9px rgba(255, 255, 255, 0.92);
}

.crpc-clientes-portal .crpc-iv-grid strong {
  color: #65758a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.crpc-clientes-portal .crpc-iv-grid span {
  color: #102f4d;
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   06. TABLAS
   ========================================================================== */

.crpc-clientes-portal .crpc-table-wrap {
  width: 100%;
  margin-top: 10px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;

  border: 3px solid rgba(255, 255, 255, 0.73);
  border-radius: 18px;

  background: var(--crpc-surface);

  box-shadow:
    inset 5px 5px 10px rgba(100, 119, 142, 0.14),
    inset -5px -5px 10px rgba(255, 255, 255, 0.92);
}

.crpc-clientes-portal .crpc-table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0;
}

.crpc-clientes-portal #crpc-certificados {
  min-width: 860px;
}

/* Columna ESTADO */
.crpc-clientes-portal #crpc-certificados th:nth-child(3),
.crpc-clientes-portal #crpc-certificados td:nth-child(3) {
  min-width: 110px;
  width: 110px;
  white-space: nowrap;
}

.crpc-clientes-portal .crpc-table th {
  padding: 14px 11px;

  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18) !important;

  background:
    linear-gradient(
      145deg,
      #0a477e,
      #052d59
    );

  color: #ffffff;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-align: left;
  vertical-align: middle;

  box-shadow:
    inset 0 4px 7px rgba(255, 255, 255, 0.10),
    inset 0 -4px 7px rgba(0, 20, 43, 0.18);
}

.crpc-clientes-portal .crpc-table th:first-child {
  border-top-left-radius: 15px;
}

.crpc-clientes-portal .crpc-table th:last-child {
  border-top-right-radius: 15px;
}

.crpc-clientes-portal .crpc-table td {
  padding: 12px 11px;

  border: 0 !important;
  border-bottom: 1px solid rgba(201, 213, 225, 0.70) !important;

  background: rgba(249, 252, 255, 0.72);
  color: #34495f;

  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  vertical-align: middle;
}

.crpc-clientes-portal .crpc-table tbody tr:hover td {
  background: #edf7ff;
}

.crpc-clientes-portal .crpc-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.crpc-clientes-portal .crpc-cert-alert td {
  background: rgba(254, 226, 226, 0.72);
}

.crpc-clientes-portal .crpc-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;

  border-radius: 50%;
  vertical-align: middle;
}

.crpc-clientes-portal .crpc-dot.green {
  background: var(--crpc-success);
}

.crpc-clientes-portal .crpc-dot.red {
  background: var(--crpc-danger);
}

.crpc-clientes-portal .crpc-estado {
  font-weight: 500;
}

.crpc-clientes-portal .estado-vigente {
  color: #15803d;
}

.crpc-clientes-portal .estado-vencido,
.crpc-clientes-portal .estado-cancelado,
.crpc-clientes-portal .estado-anulado,
.crpc-clientes-portal .estado-no-vigente {
  color: #b91c1c;
}

/* ==========================================================================
   07. CUOTAS
   ========================================================================== */

.crpc-clientes-portal .crpc-cuotas-btn {
  display: inline-block;
  padding: 7px 12px;

  border: 2px solid rgba(255, 255, 255, 0.27) !important;
  border-radius: 13px !important;

  background:
    linear-gradient(
      145deg,
      #1686d0,
      #07518e
    ) !important;

  color: #ffffff !important;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;

  cursor: pointer;

  box-shadow:
    6px 7px 12px rgba(6, 65, 115, 0.25),
    inset 3px 3px 5px rgba(255, 255, 255, 0.18),
    inset -3px -4px 6px rgba(0, 31, 61, 0.17);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.crpc-clientes-portal .crpc-cuotas-btn:hover {
  transform: translateY(-3px);
}

.crpc-clientes-portal .crpc-cuotas-btn:active {
  transform: translateY(1px);
}

.crpc-clientes-portal .crpc-cuotas-ok {
  display: inline-block;

  color: var(--crpc-success);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.crpc-clientes-portal .crpc-cuotas-loading {
  display: inline-block;

  color: var(--crpc-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* ==========================================================================
   08. MODAL DE CUOTAS
   ========================================================================== */

.crpc-clientes-portal #crpc-cuotas-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 20px;
}

.crpc-clientes-portal #crpc-cuotas-modal.is-visible {
  display: flex;
}

.crpc-clientes-portal
#crpc-cuotas-modal
.crpc-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;

  background: rgba(5, 27, 51, 0.60);
}

.crpc-clientes-portal
#crpc-cuotas-modal
.crpc-modal-dialog {
  position: relative;
  z-index: 1;

  width: min(960px, 100%);
  max-height: calc(100vh - 40px);
  margin: 0;
  padding: 24px 18px 18px;
  overflow: auto;

  border: 3px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;

  background:
    linear-gradient(
      145deg,
      #f8fbff,
      #e4ebf3
    );

  box-shadow:
    22px 27px 55px rgba(0, 19, 40, 0.34),
    inset 4px 4px 7px rgba(255, 255, 255, 0.68),
    inset -4px -5px 9px rgba(108, 127, 149, 0.10);
}

.crpc-clientes-portal
#crpc-cuotas-modal
.crpc-table {
  min-width: 760px;
}

.crpc-clientes-portal
#crpc-cuotas-modal
.crpc-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;

  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 2px solid rgba(255, 255, 255, 0.80) !important;
  border-radius: 50% !important;
  outline: none;

  background:
    linear-gradient(
      145deg,
      #f8fbff,
      #dfe8f1
    ) !important;

  color: var(--crpc-navy) !important;
  font-family: Arial, sans-serif;
  font-size: 27px;
  line-height: 1;
  font-weight: 400;

  cursor: pointer;

  box-shadow:
    7px 8px 14px rgba(82, 103, 128, 0.24),
    -5px -5px 12px rgba(255, 255, 255, 0.96),
    inset 3px 3px 5px rgba(255, 255, 255, 0.78),
    inset -3px -4px 6px rgba(101, 121, 145, 0.12) !important;

  transition:
    transform 0.18s ease,
    color 0.18s ease,
    background 0.18s ease;
}

.crpc-clientes-portal
#crpc-cuotas-modal
.crpc-modal-close:hover {
  color: #ffffff !important;

  background:
    linear-gradient(
      145deg,
      #1686d0,
      #07518e
    ) !important;

  transform: translateY(-2px) rotate(90deg);
}

.crpc-clientes-portal
#crpc-cuotas-modal
.crpc-modal-close:active {
  transform: translateY(1px) scale(0.94) rotate(90deg);
}

.crpc-clientes-portal
#crpc-cuotas-modal
#crpc-cuotas-modal-title {
  padding-left: 56px;
  padding-right: 56px;
}

/* ==========================================================================
   09. MENSAJE SIN RESULTADOS
   ========================================================================== */

.crpc-clientes-portal .crpc-no-results {
  max-width: 900px;
  margin: 24px auto;
  padding: 22px;

  border: 3px solid rgba(255, 255, 255, 0.72) !important;
  border-radius: 21px !important;

  background:
    linear-gradient(
      145deg,
      #f7fbff,
      #e4ebf3
    ) !important;

  color: #68788c;
  text-align: center;

  box-shadow:
    9px 11px 20px rgba(100, 119, 142, 0.18),
    -7px -7px 16px rgba(255, 255, 255, 0.94),
    inset 2px 2px 4px rgba(255, 255, 255, 0.65);
}

/* ==========================================================================
   10. OVERLAY DE CARGA

   El JavaScript lo agrega directamente dentro de <body>, por eso no lleva
   el prefijo .crpc-clientes-portal.
   ========================================================================== */

#crpc-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 20px;
  background: rgba(246, 249, 252, 0.90) !important;
}

#crpc-loading-overlay.is-visible {
  display: flex;
}

#crpc-loading-overlay .crpc-loading-box {
  margin: 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;

  border: 0;
  border-radius: 0;

  background: transparent !important;
  box-shadow: none !important;

  color: #102944;
  font-family:
    "Montserrat",
    Inter,
    system-ui,
    sans-serif;
  font-weight: 800;
  text-align: center;
}

#crpc-loading-overlay .crpc-loading-gif {
  display: block;
  width: 460px;
  max-width: min(90vw, 460px);
  height: auto;

  border: 0 !important;
  border-radius: 0 !important;

  background: transparent !important;
  box-shadow: none !important;

  object-fit: contain;
}

/* ==========================================================================
   11. ACCESIBILIDAD
   ========================================================================== */

.crpc-clientes-portal button:focus-visible,
.crpc-clientes-portal input:focus-visible,
.crpc-clientes-portal [role="button"]:focus-visible {
  outline: 4px solid rgba(39, 196, 199, 0.40);
  outline-offset: 3px;
}

/* ==========================================================================
   12. RESPONSIVE
   ========================================================================== */

@media (max-width: 820px) {
  .crpc-clientes-portal {
    padding: 38px 16px 60px;
  }

  .crpc-clientes-portal .portal-consulta-card {
    padding: 38px 26px 30px;
    border-radius: 27px !important;
  }

  .crpc-clientes-portal .portal-consulta-row {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .crpc-clientes-portal .portal-consulta-btn {
    width: 100%;
  }

  .crpc-clientes-portal .crpc-iv-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }
}

@media (max-width: 520px) {

  .crpc-clientes-portal .crpc-cli-title-heading {
    gap: 8px;
  }

  .crpc-clientes-portal .crpc-cli-info-popover {
    width: 300px;
  }

  .crpc-clientes-portal {
    padding: 24px 10px 45px;
  }

  .crpc-clientes-portal .portal-consulta-card {
    margin-bottom: 25px;
    padding: 29px 17px 24px;
    border-radius: 23px !important;
  }

  .crpc-clientes-portal .portal-field-label {
    font-size: 12px;
  }

  .crpc-clientes-portal .portal-id-field input[type="text"] {
    height: 55px;
    padding: 0 16px;

    border-radius: 14px !important;

    font-size: 17px;
    line-height: 55px;
  }

  .crpc-clientes-portal .portal-consulta-btn {
    height: 55px;

    border-radius: 15px !important;

    font-size: 15px;
  }

  .crpc-clientes-portal .portal-form-note {
    margin-top: 20px;
    font-size: 14px;
  }

  .crpc-clientes-portal .crpc-cli-reload-btn {
    width: 100%;
  }

  .crpc-clientes-portal #crpc-ramos,
  .crpc-clientes-portal #crpc-ramos.crpc-insurance-map {
    grid-template-columns:
      repeat(
        auto-fit,
        minmax(140px, 205px)
      ) !important;

    gap: 14px !important;
  }

  .crpc-clientes-portal .crpc-category-pillar {
    min-height: 325px;
    padding: 17px 8px 14px;
    border-radius: 22px !important;
  }

  .crpc-clientes-portal .crpc-category-name {
    min-height: 31px;
    font-size: 11px;
  }

  .crpc-clientes-portal .crpc-category-donut {
    width: 88px;
    height: 88px;
    flex-basis: 88px;
  }

  .crpc-clientes-portal .crpc-category-donut::before {
    inset: 8px;
  }

  .crpc-clientes-portal .crpc-category-donut-center {
    width: 64px;
    height: 64px;
  }

  .crpc-clientes-portal .crpc-category-count {
    font-size: 20px;
  }

  .crpc-clientes-portal .crpc-category-icon {
    width: 43px;
    height: 43px;
    flex-basis: 43px;
    margin-top: 36px;
    font-size: 19px;
  }

  .crpc-clientes-portal .crpc-category-ramo-btn,
  .crpc-clientes-portal .crpc-vehiculo-inline-btn {
    min-height: 37px;
    padding: 7px 6px !important;

    font-size: 9px;
  }

  .crpc-clientes-portal .crpc-ramo-count {
    min-width: 23px;
    height: 23px;
    padding: 0 5px;

    font-size: 10px;
    line-height: 19px;
  }

  .crpc-clientes-portal .crpc-card {
    padding: 17px 12px !important;
    border-radius: 22px !important;
  }

  .crpc-clientes-portal .crpc-iv-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .crpc-clientes-portal .crpc-iv-grid > div {
    min-height: 59px;
  }

  .crpc-clientes-portal #crpc-cuotas-modal {
    padding: 12px;
  }

  .crpc-clientes-portal
  #crpc-cuotas-modal
  .crpc-modal-dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 22px 12px 14px;
    border-radius: 20px;
  }
}

@media (max-width: 340px) {
  .crpc-clientes-portal #crpc-ramos,
  .crpc-clientes-portal #crpc-ramos.crpc-insurance-map {
    grid-template-columns: minmax(0, 205px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .crpc-clientes-portal *,
  .crpc-clientes-portal *::before,
  .crpc-clientes-portal *::after,
  #crpc-loading-overlay * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}