/* ==========================================
   PANTALLA DE CARGA - VERSIÓN SIN SCROLL
   ========================================== */

/* Bloquear scroll globalmente al cargar la página */
html, body {
    overflow: hidden; /* Esto evita el scroll desde el inicio */
}

#pantallaCarga {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #1272E9;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999; /* Muy alto para estar encima de todo */
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
    overflow: hidden;
    
    /* CRÍTICO: Compensar el zoom del body */
    transform: scale(1.111) !important; /* 1 / 0.9 = 1.111 */
    transform-origin: top left !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Asegurar que el contenido interno no se vea afectado por el scale */
.contenido-carga {
    text-align: center;
    position: relative;
    animation: float 2s infinite ease-in-out;
    transform: scale(0.9) !important; /* Compensar el scale del padre */
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(0.9); }
    50% { transform: translateY(-15px) scale(0.9); }
}

.contenido-carga img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    transform: scale(0.5);
}

.contenido-carga p {
    margin-top: 10px;
    font-size: 20px;
    color: #ffffff;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Clase para bloquear scroll cuando sea necesario */
.no-scroll {
    overflow: hidden !important;
    height: 100% !important;
    margin: 0 !important;
}

/* Cuando la pantalla de carga se oculta, restaurar el scroll */
body:not(.loading) {
    overflow: auto; /* Restaurar scroll normal */
}

html:not(.loading) {
    overflow: auto; /* Restaurar scroll normal */
}

/* ==========================================
   MODAL PRINCIPAL - PRIMERA VERSIÓN
   ========================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: rgba(115, 145, 104, 0.623);
    border-radius: 10px;
    width: 60%;
    max-width: 800px; /* Más ancho */
    max-height: 80vh; /* Altura máxima */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background-color: #28a745; /* Verde más atractivo */
    color: #fcfcfc; /* Verde para el texto del título */
    padding: 8px 15px; /* Padding más compacto */
    font-size: 18px;
    font-weight: bold;
    display: flex;
    justify-content: space-between; /* Título centrado, botón a la derecha */
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid #e9ecef; /* Borde inferior sutil */
}

/* Añade este estilo para centrar el título */
.modal-header h4 {
    flex-grow: 1; /* Ocupa todo el espacio disponible */
    text-align: center; /* Centra el texto */
    margin: 0; /* Elimina el margen predeterminado */
}

.modal-body {
    padding: 15px;
    overflow-y: auto; /* Permite el desplazamiento */
    flex-grow: 1;
    background-color: rgb(255, 255, 255); /* Fondo blanco para el cuerpo */
}

.modal-body p {
    margin: 10px 0;
    line-height: 1.6;
    color: #333; /* Color de texto más oscuro para mejor contraste */
}

.modal-body strong {
    color: #28a745; /* Verde para los títulos (etiquetas <strong>) */
}

.close {
    font-size: 30px;
    cursor: pointer;
    color: #000000; /* Gris para el botón de cerrar */
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: #dc3535; /* Rojo al pasar el mouse */
}

/* ==========================================
   MODAL - SEGUNDA VERSIÓN (E1)
   ========================================== */
/* E1 */

/* Estilos para el modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: rgba(115, 145, 104, 0.623);
    padding: 20px;
    border-radius: 10px;
    width: 50%;
    max-width: 600px; /* Ancho máximo para evitar que sea demasiado grande */
    text-align: left; /* Alineación del texto a la izquierda */
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Estilos para el texto dentro del modal */
#infoTexto {
    white-space: pre-line; /* Mantiene los saltos de línea */
    line-height: 1.6; /* Espaciado entre líneas */
    font-size: 16px;
    color: #333;
}

/* Estilos para el botón de información */
.info-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #007BFF;
}

.info-btn:hover {
    color: #0056b3;
}

/* ==========================================
   CONTENEDOR PRINCIPAL
   ========================================== */
/* Estilos para el contenedor principal */
.main-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

/* ========================================== PANEL DE MULTAS - DISEÑO MEJORADO ========================================== */
:root {
    /* Color palette - Manteniendo los colores originales */
    --primary-color: #cc4593;         /* Color rosa original */
    --primary-dark: #a83578;          /* Rosa oscuro original */
    --primary-light: #f8d7e7;         /* Rosa claro original */
    --primary-gradient: linear-gradient(135deg, #cc4593, #a83578);
    --accent-color: #d32f2f;          /* Color de acento original */
    --danger-color: #f44336;          /* Color rojo peligro original */
    --text-light: #ffffff;
    --text-dark: #333333;             /* Color texto original */
    --bg-light: #ffffff;
    --bg-gray: #f5f7fa;               /* Gris de fondo original */
    --border-color: #e0e0e0;
    
    /* Sombras mejoradas para profundidad */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    
    /* Bordes redondeados */
    --border-radius-sm: 6px;
    --border-radius-md: 10px;
    --border-radius-lg: 16px;
    
    /* Transiciones */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
    
    /* Tipografía */
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  }
  
  /* Aplicar tipografía base a todos los elementos */
  * {
    font-family: var(--font-family);
  }
  
  .panel-multas {
    width: 100%;
    max-width: 850px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    margin: 30px auto;
    transition: var(--transition-normal);
    overflow: hidden;
  }
  
  .panel-multas:hover {
    box-shadow: var(--shadow-lg);
  }
  
  .multas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: var(--primary-gradient);
    color: var(--text-light);
    border-radius: 11px 11px 0 0;
    position: relative;
  }
  
  .multas-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .multas-content {
    padding: 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
  }
  
  .multas-content.expanded {
    max-height: 700px;
  }
  
  .multa-control {
    margin-bottom: 22px;
    background-color: var(--bg-gray);
    padding: 20px;
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
  }
  
  .multa-header-control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .multa-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    min-width: 150px;
  }
  
  .select-wrapper {
    position: relative;
    min-width: 120px;
  }
  
  .select-wrapper::after {
    content: '▼';
    font-size: 12px;
    top: 50%;
    right: 10px;
    position: absolute;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6c757d;
  }
  
  .multa-select {
    appearance: none;
    padding: 10px 35px 10px 15px;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius-sm);
    background-color: white;
    font-size: 16px;
    color: var(--text-dark);
    cursor: pointer;
    width: 100%;
    transition: var(--transition-fast);
  }
  
  .multa-select:hover {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(204,69,147,0.2);
  }
  
  .multa-select:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(204,69,147,0.2);
  }
  
  .multa-item {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
    padding: 12px 14px;
    background-color: var(--bg-gray);
    border-radius: var(--border-radius-md);
    transition: var(--transition-fast);
    border: 1px solid transparent;
  }
  
  .multa-item:hover {
    background-color: var(--primary-light);
    transform: translateX(3px);
    border-color: var(--border-color);
  }
  
.multa-valor {
    width: 130px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 10px 12px;
    font-size: 15px;
    transition: var(--transition-fast);
    box-sizing: border-box; /* ← AGREGAR ESTA LÍNEA */
}
  
  .multa-valor:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(204,69,147,0.2);
  }
  
.btn-container {
    display: flex;
    gap: 12px; /* Reducido de 16px para menos separación */
    margin: 20px 0;
    padding: 0 4px; /* Agregar padding para dar espacio interno */
}
#agregarMultaBtn, #calcularTotalBtn {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 10px 16px; /* Reducido de 12px 20px */
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 14px; /* Reducido de 15px */
    flex: 1;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px; /* Reducido de 0.7px */
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    box-sizing: border-box; /* Agregar para evitar desbordamiento */
}
  
  #agregarMultaBtn::after, #calcularTotalBtn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s;
  }
  
  #agregarMultaBtn:hover::after, #calcularTotalBtn:hover::after {
    left: 100%;
  }
  
  #calcularTotalBtn {
    background-color: var(--primary-dark);
    font-weight: 600;
  }
  
  #agregarMultaBtn:hover, #calcularTotalBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(204, 69, 147, 0.4);
  }
  
  #agregarMultaBtn:active, #calcularTotalBtn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
  }
  
  .delete-multa {
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    width: 30px;
    height: 30px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
    opacity: 0.9;
  }
  
  .delete-multa:hover {
    background-color: #e53935;
    transform: scale(1.08);
    opacity: 1;
    box-shadow: 0 3px 8px rgba(229, 57, 53, 0.4);
  }
  
  .delete-multa:active {
    transform: scale(0.95);
    box-shadow: none;
  }
  
  .resumen-multas {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    padding: 25px;
  }
  
  .resumen-multas h4 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
  }
  
  .resumen-multas h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
  }
  
  .resumen-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 14px 16px;
    background-color: var(--bg-gray);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
  }
  
  .resumen-item:hover {
    background-color: var(--primary-light);
    border-left-color: var(--primary-color);
    transform: translateX(3px);
  }
  
  .resumen-item .resumen-label {
    font-weight: 500;
    color: var(--text-dark);
  }
  
  .resumen-item .resumen-value {
    font-weight: 600;
    color: var(--primary-dark);
  }
  
  .total-final {
    margin-top: 25px;
    margin-bottom: 10px;
    padding: 18px 20px;
    border-top: 2px dashed #ccc;
    font-weight: bold;
    font-size: 1.3em;
    display: flex;
    justify-content: space-between;
    background: linear-gradient(to right, #fef0f7, #fff);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--accent-color);
    position: relative;
    overflow: hidden;
  }
  
  .total-final::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(204, 69, 147, 0.05) 25%, transparent 25%, transparent 50%, 
                rgba(204, 69, 147, 0.05) 50%, rgba(204, 69, 147, 0.05) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
    opacity: 0.4;
  }
  
  .special-final {
    color: var(--accent-color);
    font-weight: 800;
    font-size: 1.1em;
    position: relative;
  }
  
  /* Estilo para el tipo de negocio */
  .business-type {
    margin-top: 35px;
    margin-bottom: 20px;
    padding: 16px 20px;
    background-color: var(--primary-light);
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--primary-color);
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1.1em;
    box-shadow: var(--shadow-sm);
  }
  
  #refreshMultasBtn {
    background: rgba(204,69,147,0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
    margin-left: 10px;
    font-size: 20px;
    color: var(--primary-color);
  }
  
  #refreshMultasBtn:hover {
    background: rgba(204,69,147,0.2);
    transform: rotate(180deg);
  }
  
  /* Versión del botón para el header */
  .multas-header #refreshMultasBtn {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.2);
    font-size: 22px;
  }
  
  .multas-header #refreshMultasBtn:hover {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
  }
  
  /* Etiquetas para mejor experiencia de usuario */
  .multa-item label {
    font-weight: 500;
    color: var(--text-dark);
    min-width: 70px;
  }
  
  /* Ajustes responsivos */
  @media (max-width: 768px) {
    .btn-container {
      flex-direction: column;
    }
    
    .multa-item {
      flex-wrap: wrap;
    }
  }
  
/* ==========================================
   PANEL DE DESCUENTOS - VERSIÓN AMARILLA
   ========================================== */
/* barra */

   .porcentaje-control {
    margin-bottom: 15px;
}

.porcentaje-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.porcentaje-header label {
    margin-right: 5px;
    font-weight: 600;
}

.input-number-wrapper {
    display: flex;
    align-items: center;
    background-color: white;
    border: 2px solid #f4a414;
    border-radius: var(--border-radius-sm);
    padding: 0 5px;
    height: 28px;
    transition: all 0.2s ease;
}

.input-number-wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(244, 164, 20, 0.2);
    border-color: #c4d304;
}

.input-number-wrapper input[type="number"] {
    width: 40px;
    border: none;
    outline: none;
    text-align: right;
    font-size: 16px;
    font-weight: bold;
    color: #f4a414;
    background: transparent;
}

.input-number-wrapper input[type="number"]::-webkit-inner-spin-button,
.input-number-wrapper input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-number-wrapper span {
    color: #f4a414;
    font-weight: bold;
    margin-left: 2px;
}

/* Estilos para el panel de descuentos */
.panel-descuentos {
    width: 100%;
    max-width: 850px; /* Igualado al tamaño del panel-multas */
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    margin: 30px auto; /* Centrado igual que el panel de multas */
    transition: var(--transition-normal);
    overflow: hidden;
}

.panel-descuentos:hover {
    box-shadow: var(--shadow-lg);
}

.descuentos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px; /* Igualado al padding del header de multas */
    background: linear-gradient(135deg, #f4a414, #c4d304); /* Nuevo gradiente amarillo/dorado */
    color: white;
    border-radius: 11px 11px 0 0;
    position: relative;
}

.descuentos-header h3 {
    margin: 0;
    font-size: 20px; /* Igualado al tamaño del texto en multas-header */
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.descuento-control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 24px;
    background-color: var(--bg-gray);
    padding: 20px;
    border-radius: var(--border-radius-md);
    border-left: 4px solid #f4a414; /* Color amarillo/dorado */
    box-shadow: var(--shadow-sm);
}

.descuento-control label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    min-width: 150px;
}

.descuento-control .select-wrapper {
    position: relative;
    min-width: 120px;
}

.descuento-control .select-wrapper::after {
    content: '▼';
    font-size: 12px;
    top: 50%;
    right: 10px;
    position: absolute;
    transform: translateY(-50%);
    pointer-events: none;
    color: #f4a414; /* Color amarillo/dorado */
}

.descuento-control select {
    appearance: none;
    padding: 10px 35px 10px 15px;
    border: 2px solid #f4a414; /* Color amarillo/dorado */
    border-radius: var(--border-radius-sm);
    background-color: white;
    font-size: 16px;
    color: var(--text-dark);
    cursor: pointer;
    width: 100%;
    transition: var(--transition-fast);
}

.descuento-control select:hover {
    border-color: #c4d304; /* Color amarillo alternativo */
    box-shadow: 0 0 0 3px rgba(244, 164, 20, 0.2);
}

.descuento-control select:focus {
    outline: none;
    border-color: #c4d304; /* Color amarillo alternativo */
    box-shadow: 0 0 0 3px rgba(244, 164, 20, 0.2);
}

.slider-container {
    margin: 20px 24px;
}

.slider-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 14px; /* Incrementado de 12px */
    color: var(--text-dark);
}

input[type="range"] {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #f4a414, #c4d304); /* Nuevo gradiente amarillo/dorado */
    outline: none;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f4a414; /* Color amarillo/dorado */
    cursor: pointer;
}

.monto-container {
    margin: 24px;
    padding: 20px;
    background-color: #fffbeb; /* Fondo amarillo claro */
    border-radius: var(--border-radius-md);
    border: 1px dashed #f4a414; /* Color amarillo/dorado */
    box-shadow: var(--shadow-sm);
}

.monto-item {
    display: flex;
    justify-content: space-between;
    margin: 12px 0; /* Igualado al espaciado de resumen-item */
    padding: 14px 16px;
    background-color: var(--bg-gray);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
    font-size: 15px;
}

.monto-item:hover {
    background-color: #fff8e1; /* Versión amarillo claro para hover */
    border-left-color: #f4a414; /* Color amarillo/dorado */
    transform: translateX(3px);
}

.btn-aplicar-descuento {
    background-color: #f4a414; /* Color amarillo/dorado */
    color: var(--text-light);
    border: none;
    padding: 12px 20px; /* Igualado al padding de botones de multas */
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 15px; /* Igualado al tamaño de botones de multas */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    display: block;
    width: calc(100% - 48px); /* Ajustado para mantener márgenes consistentes */
    margin: 20px 24px; /* Igualado al margen de btn-container */
}

.btn-aplicar-descuento::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s;
}

.btn-aplicar-descuento:hover::after {
    left: 100%;
}

.btn-aplicar-descuento:hover {
    background-color: #c4d304; /* Color amarillo alternativo */
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(244, 164, 20, 0.4);
}

.btn-aplicar-descuento:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.resumen-descuentos {
    margin: 30px 24px; /* Igualado al margen de resumen-multas */
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    padding: 25px;
}

.resumen-descuentos h4 {
    margin: 0 0 20px 0;
    font-size: 20px; /* Igualado al tamaño del texto en resumen-multas h4 */
    color: #f4a414; /* Color amarillo/dorado */
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
}

.resumen-descuentos h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 50px;
    height: 3px;
    background-color: #f4a414; /* Color amarillo/dorado */
    border-radius: 2px;
}

/* Estilos específicos para los elementos de resumen en el panel de descuentos */
.resumen-descuentos .resumen-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 14px 16px;
    background-color: var(--bg-gray);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.resumen-descuentos .resumen-item:hover {
    background-color: #fff8e1 !important; /* Amarillo claro para hover */
    border-left-color: #f4a414 !important; /* Color amarillo/dorado */
    transform: translateX(3px);
}

.resumen-descuentos .resumen-item .resumen-label {
    font-weight: 500;
    color: var(--text-dark);
}

.resumen-descuentos .resumen-item .resumen-value {
    font-weight: 600;
    color: #f4a414; /* Color amarillo/dorado */
}

.descuento-final {
    margin-top: 25px;
    margin-bottom: 10px;
    padding: 18px 20px;
    border-top: 2px dashed #ccc;
    font-weight: bold;
    font-size: 1.3em;
    display: flex;
    justify-content: space-between;
    background: linear-gradient(to right, #fff8e1, #fff); /* Degradado amarillo claro */
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    border-left: 5px solid #f4a414; /* Color amarillo/dorado */
    position: relative;
    overflow: hidden;
}

.descuento-final::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(244, 164, 20, 0.05) 25%, transparent 25%, transparent 50%, 
                rgba(244, 164, 20, 0.05) 50%, rgba(244, 164, 20, 0.05) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
    opacity: 0.4;
}

#refreshDescuentosBtn {
    background-color: rgba(244, 164, 20, 0.1); /* Color amarillo/dorado con transparencia */
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
    margin-left: 10px;
    font-size: 20px;
    color: #f4a414; /* Color amarillo/dorado */
}

#refreshDescuentosBtn:hover {
    background-color: rgba(244, 164, 20, 0.2); /* Color amarillo/dorado con transparencia */
    transform: rotate(180deg);
}

/* Versión del botón para el header */
.descuentos-header #refreshDescuentosBtn {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.2);
    font-size: 22px;
}

.descuentos-header #refreshDescuentosBtn:hover {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

/* Para asegurar que TODOS los elementos dentro del panel de descuentos 
   mantengan la paleta de amarillos */
.panel-descuentos .resumen-item:hover {
    background-color: #fff8e1 !important;
    border-left-color: #f4a414 !important;
}

/* Asegúrate de que los valores en hover también mantengan el color correcto */
.panel-descuentos .resumen-item:hover .resumen-value {
    color: #c4d304 !important;
}

/* Ajustes responsivos */
@media (max-width: 768px) {
    .descuento-control {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .descuento-control .select-wrapper {
        width: 100%;
    }
    
    .monto-container {
        margin: 15px;
    }
    
    .btn-aplicar-descuento {
        width: calc(100% - 30px);
        margin: 15px;
    }
}

/* ==========================================
   MEDIA QUERIES Y RESPONSIVIDAD
   ========================================== */
/* Ajustes responsivos para móviles */
@media (max-width: 480px) {
    /* Modal más ancho en móviles */
    .modal-content {
        width: 90%;
        max-width: none;
    }
    
    /* Ajuste de tamaño de fuente para móviles */
    .modal-header {
        padding: 6px 10px;
        font-size: 16px;
    }
    
    .modal-body {
        padding: 10px;
    }
    
    .modal-body p {
        font-size: 14px;
    }
    
    /* Ajustes para panel de multas y descuentos */
    .panel-multas, .panel-descuentos {
        width: 95%;
        margin: 15px auto;
    }
    
    /* Ajustes para los elementos de multa */
    .multa-item {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 10px;
        border-bottom: 1px solid #eee;
    }
    
    .multa-valor {
        width: 100%;
        margin-top: 5px;
    }
    
    /* Botones más grandes para mejor uso táctil */
    #agregarMultaBtn, #calcularTotalBtn, .btn-aplicar-descuento {
        padding: 10px;
        font-size: 16px;
    }
    
    .delete-multa {
        width: 25px;
        height: 25px;
        font-size: 14px;
    }
    
    /* Mejoras en los deslizadores para uso táctil */
    input[type="range"] {
        height: 20px;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        width: 25px;
        height: 25px;
    }
    
    /* Asegurar que los contenedores de texto se adapten */
    #infoTexto {
        font-size: 14px;
    }
    
    /* Pantalla de carga responsiva */
    .contenido-carga p {
        font-size: 16px;
    }
}

/* Ajustes para tabletas */
@media (min-width: 481px) and (max-width: 768px) {
    .modal-content {
        width: 80%;
    }
    
    .panel-multas, .panel-descuentos {
        width: 90%;
        margin: 15px auto;
    }
}

/* Ajustes para orientación landscape en móviles */
@media (max-height: 480px) and (orientation: landscape) {
    .modal-content {
        max-height: 90vh;
    }
    
    .multas-content.expanded {
        max-height: 300px;
    }
}

/* Asegurar que los inputs y controles sean más fáciles de usar en táctil */
@media (pointer: coarse) {
    button, 
    input[type="button"],
    input[type="submit"],
    .close,
    .info-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    input[type="text"],
    input[type="number"] {
        height: 44px;
        font-size: 16px; /* Previene el zoom en iOS */
    }
}

/* ==========================================
   EFECTOS ANIMADOS Y ESTILO TOTAL MENSUAL
   ========================================== */
/* Efecto animado para la clase total-mensual existente */
.total-mensual {
    position: relative;
    color: #0078D4;
    font-weight: bold;
    padding: 8px 0;
    margin: 10px 0;
    display: inline-block;
}

/* Efecto de línea de agua debajo del texto */
.total-mensual::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #0078D4;
    border-radius: 2px;
    overflow: hidden;
}

/* Onda animada en la línea */
.total-mensual::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.7), 
        transparent);
    z-index: 1;
    animation: waterFlow 2s infinite linear;
}

/* Animación del texto */
.total-mensual strong, .total-mensual {
    position: relative;
}

/* Añadir animación de color al valor */
.total-mensual {
    animation: colorPulse 3s infinite;
}

/* Gota de agua animada */
.water-drop {
    position: absolute;
    top: -5px;
    right: -10px;
    font-size: 22px;
    opacity: 0;
    animation: drip 3s infinite;
    line-height: 0;
}

/* Estilos para los totales adicionales - solo separación, sin color verde */
.additional-totals {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
}

/* ==========================================
   KEYFRAMES PARA ANIMACIONES
   ========================================== */


/* Animación de goteo */
@keyframes drip {
    0%, 100% {
        opacity: 0;
        transform: translateY(0);
    }
    5% {
        opacity: 1;
        transform: translateY(0);
    }
    15% {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Adaptación para móviles */
@media (max-width: 480px) {
    .total-mensual {
        font-size: 16px;
    }
}


/* ==========================================
   ESTILOS DEL FOOTER
   ========================================== */
   .footer-container {
    background: linear-gradient(to right, #0078D4, #005EA6);
    color: white;
    padding: 30px 20px 15px;
    margin-top: 40px;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
}

.footer-info {
    flex: 2;
    min-width: 300px;
}

.footer-text p {
    margin: 0 0 5px 0;
    font-size: 14px;
    line-height: 1.4;
}

.footer-text p:first-child {
    margin-top: 0;
    margin-bottom: 8px;
}

.footer-links {
    flex: 1;
    min-width: 200px;
}

.footer-links h4, .social-container h4 {
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after, .social-container h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: #78CDD7;
    border-radius: 2px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #e6e6e6;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-block;
    position: relative;
}

.footer-links ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #78CDD7;
    transition: width 0.3s;
}

.footer-links ul li a:hover {
    color: #78CDD7;
}

.footer-links ul li a:hover::after {
    width: 100%;
}

.social-container {
    flex: 1;
    min-width: 200px;
}

.social-icons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    transform: translateY(-5px);
    background-color: #78CDD7;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

/* Animación para íconos al pasar el mouse */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.social-icons a:hover i {
    animation: bounce 0.6s ease;
}

/* Estilos responsivos para el footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }
    
    .footer-info, .footer-links, .social-container {
        width: 100%;
        text-align: center;
        min-width: auto;
    }
    
    .footer-text {
        text-align: center;
    }
    
    .footer-links h4::after, .social-container h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-icons {
        justify-content: center;
    }
}


/* ==========================================
   REDISEÑO DE LA PRIMERA SECCIÓN - CALCULADORA (VERSIÓN MEJORADA)
   ========================================== */

/* Contenedor principal para la calculadora */
.calculadora-container {
    background: linear-gradient(135deg, #ffffff, #f5f9ff);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 120, 212, 0.2), 
                0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 35px;
    max-width: 800px;
    margin: 40px auto;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(120, 205, 215, 0.3);
}

/* Efectos decorativos con pseudo-elementos */


/* Título principal con efecto de agua */
.calculadora-titulo-container {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.calculadora-titulo {
    color: #0078D4;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 0;
    display: inline-block;
    position: relative;
}


.calculadora-titulo::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #0078D4, #78CDD7);
    border-radius: 4px;
    overflow: hidden;
    z-index: 0;
}

.calculadora-titulo::before {
    content: '';
    position: absolute;
    left: -30%;
    bottom: -8px;
    width: 30%;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.8), 
        transparent
    );
    border-radius: 4px;
    animation: shimmerContenido 5s linear infinite;
    z-index: 1;
}

@keyframes shimmerContenido {
    0% {
        left: -30%;
    }
    100% {
        left: 100%;
    }
}
*/

/* Gota de agua decorativa para el título */
.titulo-icon {
    font-size: 24px;
    margin-left: 10px;
    display: inline-block;
    vertical-align: middle;
    animation: bounce 2s infinite ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Contenedor para los controles de selección */
.controles-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

/* Estilizar cada grupo de control */
.control-grupo {
    position: relative;
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 120, 212, 0.1);
}

.control-grupo:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Encabezado del grupo de control con ícono de información */
.control-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

/* Estilos para las etiquetas */
.control-label {
    color: #0078D4;
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}

/* Botón de información ahora al lado del título */
/* Botón de información ahora al lado del título */
.info-btn {
    font-size: 0;  /* Oculta el texto existente */
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0078D4;  /* Fondo azul */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
    border: none;
    margin-left: 8px;
}

/* Icono de información con i blanca */
.info-btn::before {
    content: "i";
    font-size: 18px;
    font-weight: bold;
    color: white;  /* Texto blanco */
    font-style: italic;
    position: absolute;
    font-family: serif;
}

/* Efecto hover para el botón */
.info-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 120, 212, 0.4);
    background: #005ea6;  /* Azul más oscuro en hover */
}

/* Estilos para los selects con efecto flotante al focus */
.control-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e8f0;
    border-radius: 12px;
    background-color: white;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%230078D4' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.control-select:focus, .control-input:focus {
    outline: none;
    border-color: #0078D4;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.2), 0 5px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Input para metros cúbicos con efecto de brillo */
.control-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e8f0;
    border-radius: 12px;
    background-color: white;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    box-sizing: border-box; /* ← AGREGAR ESTA LÍNEA */
}
.control-input:focus {
    background-image: linear-gradient(to right, white, #f9fcff);
}

/* Contenedor para el medidor */
.medidor-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.medidor-container .control-select {
    flex: 1;
}

/* Botón de actualización con efecto de giro */
.reset-btn {
    background: #0078D4;  /* Fondo azul sólido */
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 0; /* Ocultar el texto original */
    position: relative;
}

/* Ícono de refresh blanco */
.reset-btn::before {
    content: "↻";
    font-size: 22px;
    font-weight: bold;
    color: white;  /* Ícono blanco */
    position: absolute;
}

/* Efecto hover */
.reset-btn:hover {
    background: #005ea6;  /* Azul más oscuro en hover */
    transform: rotate(180deg);
    box-shadow: 0 3px 8px rgba(0, 120, 212, 0.4);
}
/* 



*/

/* Enlace para consultar nivel */
.nivel-link {
    text-align: center;
    margin: 15px 0;
    position: relative;
}

.nivel-link::before, .nivel-link::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 120, 212, 0.3));
    transform: translateY(-50%);
}

.nivel-link::before {
    left: 20%;
}

.nivel-link::after {
    right: 20%;
    background: linear-gradient(90deg, rgba(0, 120, 212, 0.3), transparent);
}

.nivel-link-btn {
    background: none;
    border: none;
    font-size: 15px;
    font-weight: bold;
    color: #0078D4;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    padding: 8px 15px;
    border-radius: 20px;
    z-index: 1;
    display: inline-block;
}

.nivel-link-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 120, 212, 0.1);
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nivel-link-btn:hover {
    color: #008000;
    transform: translateY(-2px);
}

.nivel-link-btn:hover::before {
    opacity: 1;
}

/* Botón de calcular con efecto de onda */
.calcular-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 30px auto 20px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #0078D4, #005EA6);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(0, 120, 212, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.calcular-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.7s ease;
}

.calcular-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 120, 212, 0.4);
    background: linear-gradient(135deg, #0086eb, #0078D4);
}

.calcular-btn:hover::before {
    left: 100%;
}

.calcular-btn:active {
    transform: translateY(-2px);
}

/* Divisor estilizado con efecto de agua */
.divisor {
    height: 4px;
    background: linear-gradient(90deg, transparent, #78CDD7, #0078D4, transparent);
    margin: 35px 0;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.divisor::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.7), 
        transparent);
    animation: waterDivisor 2s infinite linear;
}

@keyframes waterDivisor {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}

/* Sección de resultado */
.resultado-heading {
    font-size: 22px;
    color: #0078D4;
    margin: 25px 0 15px;
    text-align: center;
    font-weight: bold;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.resultado-heading::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 25%;
    width: 50%;
    height: 3px;
    background: #78CDD7;
    border-radius: 3px;
}

/* Mejoras para móviles */
@media (max-width: 767px) {
    .calculadora-container {
        padding: 25px 20px;
        margin: 20px 15px;
        border-radius: 15px;
    }
    
    .calculadora-titulo {
        font-size: 26px;
    }
    
    .control-grupo {
        padding: 15px;
    }
    
    .control-select, .control-input {
        padding: 12px 15px;
    }
    
    .calcular-btn {
        padding: 14px 22px;
        font-size: 16px;
    }
    
    .nivel-link::before, .nivel-link::after {
        width: 40px;
    }
}

/* Para pantallas más grandes, podemos hacer una distribución en 2 columnas */
@media (min-width: 768px) {
    .controles-container {
        grid-template-columns: 1fr 1fr;
        gap: 25px 30px;
    }
}


/* ==========================================
   ESTILOS MEJORADOS PARA LA SECCIÓN DE RESULTADOS
   ========================================== */

/* Estilo para el contenedor de resultados */
#resultado {
    background: linear-gradient(135deg, #f8fcff, #f0f8ff);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 120, 212, 0.1);
    border: 1px solid rgba(120, 205, 215, 0.2);
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    line-height: 1.7;
    position: relative;
    overflow: hidden;
}

/* Efecto decorativo para el fondo - CORREGIDO */
#resultado::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(120, 205, 215, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1; /* Cambiado de 0 a -1 para que esté detrás del texto */
    pointer-events: none; /* Asegura que no interfiera con clics */
}

/* Título principal del servicio - MÁS DESTACADO */
#resultado strong:first-of-type {
    display: block;
    color: #004b85;
    font-size: 19px;
    font-weight: 700;
    border-bottom: 2px solid rgba(0, 120, 212, 0.3);
    padding-bottom: 12px;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* Contenedor para los detalles del servicio */
#resultado > div:not(.total-mensual):not(.additional-totals) {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

/* Filas de datos */
#resultado > strong + br {
    display: block;
    margin-bottom: 10px;
}

/* Etiquetas de datos - MÁS DESTACADAS */
#resultado strong:not(:first-of-type):not(.total-mensual strong) {
    color: #0066b8;
    font-weight: 600;
    display: inline-block;
    min-width: 150px;
    position: relative;
    z-index: 1;
    font-size: 1.02em;
}

/* Mejora la visualización en múltiples dispositivos */
@media (max-width: 767px) {
    #resultado {
        padding: 20px 15px;
    }
    
    #resultado strong:not(:first-of-type):not(.total-mensual strong) {
        min-width: auto;
        display: block;
        margin-bottom: 2px;
    }
    
    .total-mensual {
        font-size: 18px;
        padding: 10px;
    }
}

/* Resaltado para valores importantes - MÁS DESTACADOS */
#resultado strong:not(:first-of-type) + span,
#resultado strong:not(:first-of-type) + br + span {
    font-weight: 500;
    color: #222;
    position: relative;
    z-index: 1;
    font-size: 1.02em;
}

/* RESULTADO TOTAL MENSUAL - DESTACADO CON ANCHO COMPLETO */
.total-mensual {
    position: relative;
    color: #0066b8;
    font-weight: bold;
    padding: 10px 15px;
    margin: 15px 0;
    display: block; /* Cambiado a block para que ocupe el ancho completo */
    background-color: rgba(230, 243, 255, 0.7);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 102, 184, 0.15);
    border-left: 4px solid #0078D4;
    width: 100%; /* Mantiene el ancho completo */
    box-sizing: border-box; /* Asegura que el padding no afecte el ancho total */
}

.total-mensual strong {
    font-size: 1.1em;
    color: #004b85;
}

/* Opción alternativa con borde limitado */
.total-mensual-borde-parcial {
    position: relative;
    color: #0066b8;
    font-weight: bold;
    padding: 10px 15px;
    margin: 15px 0;
    display: block;
    background-color: rgba(230, 243, 255, 0.7);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 102, 184, 0.15);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Para el pseudo-elemento */
}

.total-mensual-borde-parcial::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%; /* Solo el 60% de la altura, ajusta según necesites */
    background-color: #0078D4;
    border-radius: 0 2px 2px 0;
}



/* Efecto de línea de agua debajo del texto - MEJORADO */
.total-mensual::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #0078D4;
    border-radius: 2px;
    overflow: hidden;
}

/* Onda animada en la línea */
.total-mensual::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.7), 
        transparent);
    z-index: 1;
    animation: waterFlow 2s infinite linear;
}

/* Animación del texto para el total mensual */
.total-mensual {
    animation: colorPulse 3s infinite;
}

/* Gota de agua animada - MEJORADA */
.water-drop {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 24px;
    opacity: 0;
    animation: drip 3s infinite;
    line-height: 0;
}

/* Estilo para el detalle especial (nota para restaurantes, etc.) */
#resultado div[style="margin-top: 20px;"] {
    margin-top: 25px !important;
    background-color: #fffbf5;
    border-left: 4px solid #ff9800;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

#resultado div[style="margin-top: 20px;"] strong {
    color: #ff9800;
    display: block;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

/* ==========================================
   ESTILOS MEJORADOS PARA LA SECCIÓN DE EXTRAS - TEMA VERDOSO
   ========================================== */
   .additional-totals {
    background-color: #f5f9f7; /* Fondo verde muy claro */
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 25px;
    border: 1px solid rgba(76, 175, 80, 0.2); /* Borde verde sutil */
    position: relative;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.07); /* Sombra verdosa sutil */
    z-index: 1;
    font-size: 0.95em; /* Tamaño base */
    transition: all 0.2s ease;
}

/* Hover effect para el contenedor */
.additional-totals:hover {
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.3);
    background-color: #f7fbf9; /* Ligeramente más claro en hover */
}

/* Título para la sección */
.additional-totals::before {
    content: 'OTRAS OPCIONES DE PAGO';
    position: absolute;
    top: -10px;
    left: 20px;
    background-color: #4CAF50; /* Verde principal */
    color: white;
    font-size: 14px; /* Corregido "14x" a "14px" */
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
    z-index: 2;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Elementos de descuento */
.additional-totals .discount-item {
    margin-bottom: 12px;
    padding-bottom: 10px;
    display: flex;
    flex-direction: row;
    position: relative;
    z-index: 1;
    align-items: baseline;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(76, 175, 80, 0.1); /* Separador verde sutil */
}

/* Eliminar el borde del último elemento */
.additional-totals .discount-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Estilo para el texto descriptivo - AJUSTADO PARA COINCIDIR CON LA SECCIÓN DE RESULTADOS */
.additional-totals .discount-item strong {
    display: inline-block;
    color: #2E7D32; /* Verde oscuro para texto */
    font-weight: 600; /* Ajustado al mismo peso que en resultados */
    margin-bottom: 0;
    position: relative;
    padding-left: 12px;
    font-size: 1.02em; /* Ajustado para coincidir con sección de resultados */
    line-height: 1.5;
    margin-right: 10px;
    flex: 1;
    text-transform: none;
    font-family: inherit;
}

/* Borde izquierdo como indicador */
.additional-totals .discount-item strong::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 3px;
    background-color: #8BC34A; /* Verde lima más claro por defecto */
}

/* Valor del precio - AJUSTADO PARA COINCIDIR CON LA SECCIÓN DE RESULTADOS */
.additional-totals .discount-item span {
    color: #1B5E20; /* Verde más oscuro para los valores */
    font-weight: 500; /* Ajustado al mismo peso que en resultados */
    font-size: 1.02em; /* Ajustado para coincidir con sección de resultados */
    line-height: 1.5;
    text-align: right;
    white-space: nowrap;
    padding: 2px 8px;
    background-color: rgba(76, 175, 80, 0.08); /* Fondo verde muy sutil */
    border-radius: 4px;
}

/* Colores para cada tipo de descuento - Diferentes tonalidades de verde */
.additional-totals .discount-item:nth-child(1) strong::before {
    background-color: #66BB6A; /* Verde claro */
}

.additional-totals .discount-item:nth-child(2) strong::before {
    background-color: #4CAF50; /* Verde medio */
}

.additional-totals .discount-item:nth-child(3) strong::before {
    background-color: #43A047; /* Verde oscuro */
}

/* Tooltips informativos con estilo verdoso */
.additional-totals .discount-item strong::after {
    content: 'i';
    display: inline-block;
    width: 16px; /* Corregido "16x" a "16px" */
    height: 16px;
    background-color: rgba(76, 175, 80, 0.15);
    color: #2E7D32;
    border-radius: 50%;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    margin-left: 5px;
    cursor: help;
    font-style: italic;
    font-weight: bold;
    opacity: 0.7;
}

.additional-totals .discount-item:hover strong::after {
    opacity: 1;
    background-color: rgba(76, 175, 80, 0.25);
}

/* Efectos hover para mejorar la interactividad */
.additional-totals .discount-item:hover {
    background-color: rgba(76, 175, 80, 0.03); /* Fondo muy sutil en hover */
    border-radius: 4px;
}

.additional-totals .discount-item:hover span {
    background-color: rgba(76, 175, 80, 0.12);
}

/* Ajustes para móviles */
@media (max-width: 767px) {
    .additional-totals {
        padding: 14px 12px;
        margin-top: 20px;
    }
    
    .additional-totals::before {
        font-size: 12px;
        padding: 2px 10px;
    }
    
    .additional-totals .discount-item {
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    
    .additional-totals .discount-item strong, 
    .additional-totals .discount-item span {
        font-size: 1em;
    }
}







/*necesito mejorar el apartado de multas  que tenga un mejor diseño y que este en el medio dale colores rojos 
claros#cc4593  
como esto masomenos pero hazlo mejor dime que agrego o que remplazo en el codigo  
que sea gradable intuitivo e inovador solo dame el css no hagas cambions ni html ni nada solo puro 
diseño 
*/





body {
    background-image: url('/Calculadora DEF/img calculadora/17580.jpg');
    background-size: cover; 
    background-position: center;  
    background-repeat: no-repeat; 
    background-attachment: fixed;
}



/* Estilos para el botón de refrescar todo */
/* Estilos para el botón de refrescar todo - VERSIÓN CORREGIDA */
.scroll-to-top-container {
    display: flex;
    justify-content: center;
    margin: 30px auto 50px;
    position: relative;
    z-index: 5; /* Valor bajo para que quede detrás del modal */
}

.refresh-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.refresh-all-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.7s ease;
}

/* Efecto de ondas al hacer clic */
.refresh-all-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.refresh-all-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #2dbd4e, #28a745);
}

.refresh-all-btn:hover::after {
    left: 100%;
}

.refresh-all-btn:active {
    transform: translateY(-2px);
}

/* Ícono de refrescar - CORREGIDO */
.refresh-all-btn .refresh-icon {
    font-size: 22px;
    display: inline-block !important;
    transition: transform 0.4s ease;
    opacity: 1 !important; /* Asegura que sea visible */
    visibility: visible !important;
    color: white;
}

/* Texto del botón - CORREGIDO */
.refresh-all-btn .refresh-text {
    transition: opacity 0.3s ease;
    opacity: 1 !important; /* Asegura que sea visible */
    visibility: visible !important;
}

.refresh-all-btn:hover .refresh-icon {
    transform: rotate(180deg);
}

/* Efecto de animación cuando se hace clic */
.refresh-all-btn.refreshing .refresh-icon {
    animation: rotate-refresh 1s ease;
}

@keyframes rotate-refresh {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.refresh-all-btn.refreshing::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0) translate(-50%, -50%);
        opacity: 0.5;
    }
    100% {
        transform: scale(20) translate(-50%, -50%);
        opacity: 0;
    }
}

/* Alternativa con ::before para el ícono si el actual no funciona */
.refresh-all-btn.use-before-icon {
    padding-left: 50px; /* Espacio para el ícono */
    position: relative;
}

.refresh-all-btn.use-before-icon::before {
    content: "↻";
    font-size: 22px;
    font-weight: bold;
    color: white;
    position: absolute;
    left: 25px;
    transition: transform 0.4s ease;
}

.refresh-all-btn.use-before-icon:hover::before {
    transform: rotate(180deg);
}

/* Adaptaciones responsivas */
@media (max-width: 768px) {
    .refresh-all-btn {
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .refresh-all-btn .refresh-icon {
        font-size: 20px;
    }
    
    .refresh-all-btn.use-before-icon::before {
        font-size: 20px;
        left: 20px;
    }
}

@media (max-width: 480px) {
    .refresh-all-btn {
        padding: 12px 20px;
        font-size: 15px;
        width: 85%;
    }
    
    .refresh-all-btn .refresh-icon {
        font-size: 18px;
    }
    
    .refresh-all-btn.use-before-icon::before {
        font-size: 18px;
        left: 15px;
    }
}

/* Esta regla anula específicamente cualquier otra regla */
.refresh-icon {
    opacity: 1 !important; 
    visibility: visible !important;
}


/* Solo ajustamos el z-index del modal sin tocar su diseño */
.modal {
    z-index: 1000 !important; /* Aseguramos que esté por encima del botón */
}

/*errror*/

/* Estilos para mensajes de error */
.error-mensaje {
    display: flex;
    align-items: flex-start;
    background-color: #fff8e6;
    border-left: 5px solid #ff9800;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: fadeInError 0.3s ease-out forwards;
    max-width: 100%;
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-icon {
    font-size: 2.5rem;
    margin-right: 15px;
    color: #ff9800;
}

.error-texto {
    flex: 1;
}

.error-texto h3 {
    color: #ff9800;
    margin: 0 0 8px 0;
    font-size: 1.3rem;
}

.error-texto p {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Efecto para el input con error */
.input-error {
    animation: shake 0.5s ease-in-out;
    border-color: #ff5252 !important;
    box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.2) !important;
    background-color: #fff8f8 !important;
}

@keyframes shake {
    0%, 100% {transform: translateX(0);}
    10%, 30%, 50%, 70%, 90% {transform: translateX(-5px);}
    20%, 40%, 60%, 80% {transform: translateX(5px);}
}

/* Estilos para el apartado de notas especiales (restaurantes, cremerías, etc.) */
/* Estilos mejorados para la sección de tarifa especial */
.nota-especial {
    background: linear-gradient(to right, #fff9f0, #ffffff);
    border: 1px solid #ff9800;
    border-left: 5px solid #ff9800;
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px !important;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.15);
    position: relative;
    overflow: hidden;
    display: block !important; /* Forzar visualización */
    z-index: 5; /* Asegurar que esté por encima de otros elementos */
}

.nota-especial::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #ff9800, #ffb74d, #ff9800);
}

.nota-especial-titulo {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #e65100;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nota-especial-titulo-icon {
    margin-right: 10px;
    font-size: 1.5rem;
}

.nota-especial-descripcion {
    font-size: 1.05rem;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.5;
    border-bottom: 1px dashed rgba(255, 152, 0, 0.3);
    padding-bottom: 10px;
}

.nota-especial-tabla {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 15px;
    margin: 15px 0;
}

.nota-especial-concepto {
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.nota-especial-concepto::before {
    content: '•';
    color: #ff9800;
    font-weight: bold;
    margin-right: 8px;
    font-size: 1.2rem;
}

.nota-especial-valor {
    text-align: right;
    font-weight: 600;
    color: #e65100;
    background-color: rgba(255, 152, 0, 0.08);
    padding: 4px 10px;
    border-radius: 4px;
}

.nota-especial-total {
    margin-top: 15px;
    padding: 12px 15px;
    background-color: #fff3e0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #e65100;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
}

.nota-especial-total-label {
    position: relative;
    padding-left: 30px;
}

.nota-especial-total-label::before {
    content: '💰';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.nota-especial-total-valor {
    font-size: 1.25rem;
}


/* Personalización de los iconos de información */

/* Estilo base para los botones de información */
.multas-header .info-btn, .descuentos-header .info-btn {
    font-size: 0;  /* Oculta el texto existente */
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
    border: none;
    margin-left: 10px;
}

/* Icono de información para multas (rosa) */
.multas-header .info-btn::before {
    content: "i";
    font-size: 18px;
    font-weight: bold;
    color: #cc4593; /* Color rosa */
    font-style: italic;
    position: absolute;
    font-family: serif;
}

/* Icono de información para descuentos (amarillo) */
.descuentos-header .info-btn::before {
    content: "i";
    font-size: 18px;
    font-weight: bold;
    color: #f4a414; /* Color amarillo */
    font-style: italic;
    position: absolute;
    font-family: serif;
}

/* Efecto hover para los botones */
.multas-header .info-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(204, 69, 147, 0.3);
}

.descuentos-header .info-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(244, 164, 20, 0.3);
}


/* Personalización de los botones de refresh */

/* Estilo base para los botones de refresh */
#refreshMultasBtn, #refreshDescuentosBtn {
    background-color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s ease;
    margin-left: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 0; /* Ocultar el texto original */
    position: relative;
}

/* Ícono de refresh para multas (rosa) */
#refreshMultasBtn::before {
    content: "↻";
    font-size: 22px;
    font-weight: bold;
    color: #cc4593; /* Color rosa */
    position: absolute;
}

/* Ícono de refresh para descuentos (amarillo) */
#refreshDescuentosBtn::before {
    content: "↻";
    font-size: 22px;
    font-weight: bold;
    color: #f4a414; /* Color amarillo */
    position: absolute;
}

/* Efectos hover */
#refreshMultasBtn:hover {
    transform: rotate(180deg);
    box-shadow: 0 3px 8px rgba(204, 69, 147, 0.3);
}

#refreshDescuentosBtn:hover {
    transform: rotate(180deg);
    box-shadow: 0 3px 8px rgba(244, 164, 20, 0.3);
}

/* Anular estilos específicos de la paleta original */
.refresh-button {
    background-color: white !important; 
}

/* Asegurar que el contenido original se oculte */
.refresh-icon {
    opacity: 0;
}





/*/*
/* ESTILOS DEL ENCABEZADO - Con prefijo "capas-" para evitar conflictos */
:root {
    /* Variables específicas para el encabezado con prefijo */
    --capas-green-dark: #1976d2;     /* Azul muy oscuro */
    --capas-green-medium: #1976d2;   /* Azul medio */
    --capas-green-light: #1976d2;    /* Azul claro */
    --capas-green-accent: #1976d2;   /* Azul oscuro */

    --capas-active-bg: rgba(7, 56, 20, 0.6);
    --capas-hover-bg: rgba(6, 46, 17, 0.5);
    --capas-text-primary: #ffffff;
    --capas-shadow: rgba(0, 0, 0, 0.1);
    --capas-shadow-dark: rgba(0, 0, 0, 0.3);
    --capas-bubble-light: rgba(255, 255, 255, 0.15);
    --capas-bubble-green: rgba(170, 255, 200, 0.15);
    --capas-bubble-border: rgba(255, 255, 255, 0.05);
    
    /* Variables de tamaño específicas del encabezado */
    --capas-nav-height: 95px;
    --capas-border-radius: 12px;
    --capas-logo-width: 270px;
    --capas-logo-height: 70px;
    --capas-icon-size: 20px;
    --capas-bubble-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    --capas-nav-shadow: 0 10px 30px var(--capas-shadow);
    
    /* Variables de animación específicas */
    --capas-transition: all 0.3s ease;
    --capas-transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --capas-animation-duration: 0.8s;
    
    /* Variables de espaciado específicas */
    --capas-padding: 20px;
    --capas-menu-gap: 8px;
    --capas-menu-padding: 15px 12px;
}

/* Prevenir desbordamiento horizontal en todo el documento */
.capas-header {
    width: 100%;
    max-width: 100%;
    margin: 0 !important; /* ← SIN MARGEN */
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
    transition: all 0.3s ease;
    position: relative;
    z-index: 100;
}

.capas-navbar {
    position: relative;
    height: var(--capas-nav-height);
    display: flex;
    align-items: center;
    overflow: visible;
    border-radius: 3px;
    box-shadow: var(--capas-nav-shadow);
    width: 100% !important; /* ← ANCHO COMPLETO */
    margin: 0 !important; /* ← SIN MARGEN */
    animation: capasNavFadeIn var(--capas-animation-duration) ease-in-out;
    box-sizing: border-box;
}

@keyframes capasNavFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.capas-navbar-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #1976d2 15%, #1976d2 50%, #1976d2 85%);
    z-index: 0;
}

.capas-navbar-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0 var(--capas-padding);
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.capas-logo {
    display: flex;
    align-items: center;
    width: var(--capas-logo-width);
    height: var(--capas-logo-height);
    transition: var(--capas-transition);
    margin-left: 25px;
    box-sizing: border-box;
}

.capas-logo:hover {
    transform: scale(1.03);
}

.capas-logo-container {
    display: flex;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
}

.capas-logo-image {
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Placeholder para cuando el logo no está disponible */
.capas-logo-placeholder {
    display: flex;
    align-items: center;
    color: var(--capas-text-primary);
    font-weight: bold;
    font-size: 20px;
    height: 100%;
}

.capas-menu {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
    box-sizing: border-box;
}

.capas-menu-item {
    color: var(--capas-text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: var(--capas-menu-padding);
    height: var(--capas-nav-height);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--capas-transition-smooth);
    text-align: center;
    flex-direction: column;
    gap: var(--capas-menu-gap);
    box-sizing: border-box;
}

.capas-menu-item:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--capas-text-primary);
    transition: var(--capas-transition);
    transform: translateX(-50%);
}

.capas-menu-item:hover {
    background-color: var(--capas-hover-bg);
    color: var(--capas-text-primary);
    transform: translateY(-2px);
}

.capas-menu-item:hover:before {
    width: 70%;
}

.capas-menu-item:hover .capas-icon svg {
    transform: translateY(-2px);
}

.capas-menu-item.active {
    background-color: var(--capas-active-bg);
    font-weight: 600;
    color: var(--capas-text-primary);
    box-shadow: inset 0 0 15px var(--capas-shadow-dark);
    border-bottom: 3px solid var(--capas-text-primary);
}

.capas-menu-item.active svg {
    stroke: var(--capas-text-primary);
}

.capas-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.capas-icon svg {
    transition: var(--capas-transition);
    width: calc(var(--capas-icon-size) + 2px);
    height: calc(var(--capas-icon-size) + 2px);
    max-width: 100%;
}

/* Burbujas Mejoradas - CORREGIDAS PARA NO SALIRSE */
.capas-bubble {
    position: absolute;
    border-radius: 50%;
    background: var(--capas-bubble-light);
    z-index: 1;
    animation: capasFloat 8s ease-in-out infinite;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    border: 1px solid var(--capas-bubble-border);
    box-shadow: var(--capas-bubble-shadow);
}

.capas-bubble:nth-child(odd) {
    background: var(--capas-bubble-green);
}

/* BURBUJAS CORREGIDAS - Ajustadas para mantenerse dentro del header */
.capas-bubble:nth-child(1) {
    width: 45px;
    height: 45px;
    left: 8%;
    top: 40%; /* Movida más arriba */
    animation-delay: 0s;
    animation-duration: 6s;
}

.capas-bubble:nth-child(2) {
    width: 28px;
    height: 28px;
    left: 22%;
    top: 50%; /* Movida más arriba */
    animation-delay: 0.5s;
    animation-duration: 7s;
}

.capas-bubble:nth-child(3) {
    width: 35px;
    height: 35px;
    left: 38%;
    top: 45%; /* Movida más arriba */
    animation-delay: 1s;
    animation-duration: 5s;
}

.capas-bubble:nth-child(4) {
    width: 32px;
    height: 32px;
    left: 58%;
    top: 45%; /* Movida más arriba */
    animation-delay: 1.5s;
    animation-duration: 6.5s;
}

.capas-bubble:nth-child(5) {
    width: 40px;
    height: 40px;
    left: 72%;
    top: 35%; /* Movida más arriba */
    animation-delay: 2s;
    animation-duration: 7.5s;
}

.capas-bubble:nth-child(6) {
    width: 26px;
    height: 26px;
    left: 85%;
    top: 50%; /* Movida más arriba */
    animation-delay: 2.5s;
    animation-duration: 5.5s;
}

.capas-bubble:nth-child(7) {
    width: 20px;
    height: 20px;
    left: 18%;
    top: 25%; /* Movida más arriba */
    animation-delay: 3s;
    animation-duration: 4.5s;
}

.capas-bubble:nth-child(8) {
    width: 23px;
    height: 23px;
    left: 68%;
    top: 25%; /* Movida más arriba */
    animation-delay: 1.2s;
    animation-duration: 6.2s;
}

/* Animación ajustada para que las burbujas no se salgan */
@keyframes capasFloat {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.5;
    }
    25% {
        transform: translateY(-5px) translateX(2px) scale(1.05); /* Reducido aún más el movimiento vertical */
        opacity: 0.8;
    }
    50% {
        transform: translateY(-8px) translateX(-2px) scale(1.1); /* Reducido aún más el movimiento vertical */
        opacity: 0.6;
    }
    75% {
        transform: translateY(-3px) translateX(3px) scale(1.05); /* Reducido aún más el movimiento vertical */
        opacity: 0.7;
    }
    100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.5;
    }
}


/* Menú hamburguesa para móviles */
.capas-toggle {
    display: none;
    position: absolute;
    right: var(--capas-padding);
    cursor: pointer;
    z-index: 10;
}

/* Solo cuando está activo (X para cerrar), se mantiene fijo en la pantalla */
.capas-toggle.active {
    position: fixed;
    top: 25px;
    right: var(--capas-padding);
    z-index: 100;
}

.capas-toggle-bar {
    width: 25px;
    height: 3px;
    background-color: var(--capas-text-primary);
    margin: 5px 0;
    transition: 0.4s;
    border-radius: 2px;
}

/* Clase que se agregará con JavaScript para hacer el encabezado fijo */
.capas-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    margin: 0;
    width: 100%;
    background: linear-gradient(90deg, #1976d2 15%, #1976d2 50%, #1976d2 85%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Ajustamos el navbar cuando está en modo sticky */
.capas-header.sticky .capas-navbar {
    margin: 0;
    width: 100%;
    border-radius: 0;
    box-shadow: none;
}

/* Header más pequeño cuando está sticky - TANTO EN PC COMO MÓVILES */
.capas-header.sticky .capas-navbar {
    height: 70px; /* Reducido de 95px */
    transition: height 0.3s ease;
}

.capas-header.sticky .capas-logo {
    height: 50px; /* Reducido de 70px */
    width: auto;
    transition: all 0.3s ease;
}

.capas-header.sticky .capas-logo-image {
    height: 50px !important; /* Logo más pequeño */
    transition: height 0.3s ease;
}

/* SOLO para elementos del menú en PC (no móviles) */
.capas-header.sticky .capas-menu-item:not(.capas-menu-item-inicio) {
    height: 70px; /* Ajustar altura de los elementos del menú */
    font-size: 14px; /* Texto ligeramente más pequeño */
    padding: 12px 10px; /* Padding reducido */
    transition: all 0.3s ease;
}

/* Mantener el enlace principal del menú inicio en tamaño sticky */
.capas-header.sticky .capas-main-link {
    height: 70px;
    font-size: 14px;
    padding: 12px 10px;
    transition: all 0.3s ease;
}

/* Añadimos un elemento para compensar el espacio cuando el header se vuelve fixed */
.header-spacer {
    display: none;
    height: var(--capas-nav-height);
    transition: all 0.3s ease;
}

.header-spacer.active {
    display: block;
}


/* Ajustar espacio entre el nuevo título y el contenedor */
.container {
    margin-top: 20px;
}




/* DROPDOWN MEJORADO - SIN CONFLICTOS Y OPTIMIZADO */

.capas-menu-item-inicio {
    position: relative;
    /* Heredar todos los estilos de .capas-menu-item */
}

.capas-main-link {
    color: inherit;
    text-decoration: none;
    font-size: inherit;
    font-weight: inherit;
    padding: 0;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--capas-transition-smooth);
    text-align: center;
    flex-direction: column;
    gap: var(--capas-menu-gap);
    box-sizing: border-box;
}

/* TRIÁNGULO INDICADOR PARA PC Y MÓVILES */
.capas-main-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid rgba(255, 255, 255, 0.7);
    transition: transform 0.3s ease, border-top-color 0.3s ease;
    z-index: 1;
}

/* Efectos hover en PC */
.capas-menu-item-inicio:hover .capas-main-link::after {
    border-top-color: rgba(255, 255, 255, 1);
    transform: translateX(-50%) rotate(180deg);
}

.capas-main-link:before {
    display: none; /* Quitar la línea del main-link */
}

/* MANTENER efectos hover originales del menu-item */
.capas-menu-item-inicio:hover {
    background-color: var(--capas-hover-bg);
    color: var(--capas-text-primary);
    transform: translateY(-2px);
}

.capas-menu-item-inicio:hover:before {
    width: 70%;
}

.capas-menu-item-inicio:hover .capas-icon svg {
    transform: translateY(-2px);
}

/* QUITAR efectos hover duplicados del main-link */
.capas-menu-item-inicio:hover .capas-main-link {
    background-color: transparent; /* Sin fondo extra */
    color: inherit; /* Heredar color del padre */
    transform: none; /* Sin movimiento extra */
}

.capas-menu-item-inicio:hover .capas-main-link .capas-icon svg {
    transform: none; /* El ícono ya se mueve con el padre */
}

.capas-menu-item-inicio.active .capas-main-link {
    background-color: var(--capas-active-bg);
    font-weight: 600;
    color: var(--capas-text-primary);
    box-shadow: inset 0 0 15px var(--capas-shadow-dark);
    border-bottom: 3px solid var(--capas-text-primary);
}

/* Dropdown específico para Inicio - SIN MOVIMIENTO VERTICAL */
.capas-menu-item-inicio .capas-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 280px;
    background: linear-gradient(135deg, var(--capas-green-dark), var(--capas-green-medium));
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    /* ELIMINADO: transform: translateX(-50%) translateY(-15px); */
    transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 9999;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    overflow: hidden;
    pointer-events: none;
}

.capas-menu-item-inicio:hover .capas-dropdown {
    opacity: 1;
    visibility: visible;
    /* MANTENIDO SOLO: transform: translateX(-50%); SIN translateY */
    transform: translateX(-50%);
    pointer-events: auto;
}

/* ÁREA EXTENDIDA INVISIBLE PARA EVITAR GLITCHES */
.capas-menu-item-inicio::before {
    content: '';
    position: absolute;
    top: 0;
    left: -15px;
    right: -15px;
    bottom: -15px;
    z-index: -1;
    background: transparent;
    pointer-events: none;
}

/* ÁREA INVISIBLE ENTRE MENÚ Y DROPDOWN PARA EVITAR GLITCHES */
.capas-menu-item-inicio::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 5px;
    background: transparent;
    z-index: 10;
    pointer-events: auto;
}

.capas-menu-item-inicio .capas-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--capas-green-dark);
    z-index: 1;
}

.capas-menu-item-inicio .capas-dropdown-item {
    display: block;
    color: var(--capas-text-primary);
    text-decoration: none;
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    background: transparent;
    pointer-events: auto;
}

.capas-menu-item-inicio .capas-dropdown-item:last-child {
    border-bottom: none;
    border-radius: 0 0 13px 13px;
}

.capas-menu-item-inicio .capas-dropdown-item:first-child {
    border-radius: 13px 13px 0 0;
}

.capas-menu-item-inicio .capas-dropdown-item:hover {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    color: var(--capas-text-primary);
    padding-left: 28px;
    transform: translateX(3px);
    box-shadow: inset 4px 0 0 rgba(255, 255, 255, 0.4);
}

/* Animación suave para el dropdown SIN MOVIMIENTO VERTICAL */
@keyframes dropdownSlide {
    from {
        opacity: 0;
        /* ELIMINADO: transform: translateX(-50%) translateY(-20px) scale(0.95); */
        transform: translateX(-50%) scale(0.95);
    }
    to {
        opacity: 1;
        /* ELIMINADO: transform: translateX(-50%) translateY(0) scale(1); */
        transform: translateX(-50%) scale(1);
    }
}

.capas-menu-item-inicio:hover .capas-dropdown {
    animation: dropdownSlide 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* DELAYS AJUSTADOS PARA EVITAR GLITCHES */
.capas-menu-item-inicio .capas-dropdown {
    transition-delay: 0s, 0.15s; /* Delay solo en visibility para evitar glitches */
}

.capas-menu-item-inicio:hover .capas-dropdown {
    transition-delay: 0s;
}

/* Media queries para dispositivos móviles */
@media screen and (max-width: 768px) {
    /* RESETEAR áreas invisibles en móviles */
    .capas-menu-item-inicio::before,
    .capas-menu-item-inicio::after {
        display: none !important;
    }
    
    .capas-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: linear-gradient(135deg, var(--capas-green-dark) 0%, var(--capas-green-light) 100%);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 70px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px var(--capas-shadow);
        z-index: 5;
        box-sizing: border-box;
        
        /* CORRECCIÓN CRÍTICA: Permitir scroll interno */
        overflow-y: auto;
        overflow-x: hidden;
        
        /* Asegurar que el scroll funcione suavemente */
        -webkit-overflow-scrolling: touch;
        
        /* Padding inferior para evitar que el último elemento quede oculto */
        padding-bottom: 80px;
    }
    
    .capas-menu.active {
        right: 0;
    }
    
    .capas-menu-item {
        width: 100%;
        height: auto;
        padding: 15px 20px;
        flex-shrink: 0; /* Evitar que se compriman */
        min-height: 50px; /* Altura mínima para toque */
    }
    
    .capas-toggle {
        display: block;
    }
    
    .capas-toggle.active .capas-toggle-bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .capas-toggle.active .capas-toggle-bar:nth-child(2) {
        opacity: 0;
    }
    
    .capas-toggle.active .capas-toggle-bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    /* Ajustes adicionales para móviles */
    .capas-navbar {
        width: calc(100% - 10px);
        margin: 0 5px;
    }
    
    .capas-logo {
        margin-left: 0;
        max-width: 280px;
        width: auto;
    }
    
    .capas-logo-image {
        height: 80px !important;
        width: auto;
    }

    /* Header sticky más pequeño en móviles */
    .capas-header.sticky {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    
    .capas-header.sticky .capas-navbar {
        height: 65px;
    }
    
    .capas-header.sticky .capas-logo {
        height: 45px;
    }
    
    .capas-header.sticky .capas-logo-image {
        height: 45px !important;
    }

    /* Ajustes responsivos para el título */
    .titulo-principal-container {
        padding: 30px 15px 15px;
    }
    
    .titulo-referencia {
        font-size: 24px;
    }
    
    .subtitle-decoration .line {
        width: 30px;
    }

    .mc-logo-container {
        margin-top: 20px;
    }
    
    .mc-footer-logo {
        max-width: 200px;
    }

    .scroll-top-btn {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }

    /* Ajustes para móviles del menú inicio */
    .capas-menu-item-inicio {
        width: 100%;
        display: block;
    }
    
    .capas-main-link {
        width: 100%;
        height: auto;
        padding: 15px 20px;
        position: relative; /* Agregar para posicionar el triángulo */
    }
    
    /* TRIÁNGULO INDICADOR SOLO EN MÓVILES */
    .capas-main-link::after {
        content: '';
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 4px solid rgba(255, 255, 255, 0.7);
        transition: transform 0.3s ease, border-top-color 0.3s ease;
        z-index: 1;
    }
    
    /* Rotar triángulo cuando está activo */
    .capas-menu-item-inicio.mobile-dropdown-active .capas-main-link::after {
        transform: translateX(-50%) rotate(180deg);
        border-top-color: rgba(255, 255, 255, 1);
    }
    
    /* ANULAR efectos sticky en móviles - mantener tamaño original */
    .capas-header.sticky .capas-menu-item,
    .capas-header.sticky .capas-menu-item-inicio,
    .capas-header.sticky .capas-main-link {
        height: auto !important;
        font-size: 15px !important;
        padding: 15px 20px !important;
    }
    
    /* CORREGIR posicionamiento del dropdown en móviles */
    .capas-menu-item-inicio .capas-dropdown {
        position: static !important; /* Forzar posición estática */
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        left: auto !important;
        top: auto !important;
        box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15);
        background: rgba(0, 0, 0, 0.15);
        margin-top: 8px;
        border-radius: 8px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
        border: 1px solid rgba(255, 255, 255, 0.1);
        min-width: auto;
        width: 100%;
        
        /* NUEVO: Scroll interno para el dropdown si es necesario */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        pointer-events: auto;
    }
    
    .capas-menu-item-inicio .capas-dropdown::before {
        display: none;
    }
    
    .capas-menu-item-inicio.mobile-dropdown-active .capas-dropdown {
        max-height: 300px; /* Altura máxima limitada para permitir scroll */
    }
    
    .capas-menu-item-inicio .capas-dropdown-item {
        padding: 12px 20px;
        font-size: 13px;
        border-radius: 0;
        flex-shrink: 0; /* Evitar compresión */
    }
    
    .capas-menu-item-inicio .capas-dropdown-item:hover {
        padding-left: 20px;
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
    }
    
    .capas-menu-item-inicio .capas-dropdown-item:first-child {
        border-radius: 8px 8px 0 0;
    }
    
    .capas-menu-item-inicio .capas-dropdown-item:last-child {
        border-radius: 0 0 8px 8px;
    }
}

/* Para pantallas más pequeñas */
@media screen and (max-width: 480px) {
    .capas-menu {
        width: 280px; /* Menú más ancho en pantallas pequeñas */
        padding-bottom: 90px; /* Espacio extra en pantallas pequeñas */
    }
    
    .capas-logo {
        max-width: 230px;
    }
    
    .capas-logo-image {
        height: 65px !important;
    }

    /* Header sticky aún más pequeño */
    .capas-header.sticky .capas-navbar {
        height: 60px;
    }
    
    .capas-header.sticky .capas-logo {
        height: 40px;
    }
    
    .capas-header.sticky .capas-logo-image {
        height: 40px !important;
    }

    .scroll-top-btn {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }
}

/* Para pantallas muy pequeñas */
@media screen and (max-width: 360px) {
    .capas-logo {
        max-width: 200px;
    }
    
    .capas-logo-image {
        height: 60px !important;
    }
}

/* Ajuste específico para pantallas muy pequeñas en altura */
@media screen and (max-width: 768px) and (max-height: 600px) {
    .capas-menu {
        padding-top: 60px; /* Menos padding superior en pantallas cortas */
        padding-bottom: 100px; /* Más espacio inferior en pantallas cortas */
    }
    
    .capas-menu-item {
        padding: 12px 20px; /* Padding reducido en pantallas cortas */
        min-height: 45px;
    }
}

/* Indicador visual de scroll para el menú */
.capas-menu::-webkit-scrollbar {
    width: 4px;
}

.capas-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.capas-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.capas-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Scrollbar para el dropdown también */
.capas-menu-item-inicio .capas-dropdown::-webkit-scrollbar {
    width: 3px;
}

.capas-menu-item-inicio .capas-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}s

.capas-menu-item-inicio .capas-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* Nueva clase SOLO para desktop */
@media screen and (min-width: 769px) {
    .capas-menu-item-inicio.dropdown-open .capas-dropdown {
        opacity: 1 !important;
        visibility: visible !important;
        /* SIN MOVIMIENTO VERTICAL */
        transform: translateX(-50%) !important;
        pointer-events: auto !important;
    }
}

/* Asegurar que en móviles no se aplique */
@media screen and (max-width: 768px) {
    .capas-menu-item-inicio.dropdown-open .capas-dropdown {
        /* Anular cualquier efecto en móviles */
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        pointer-events: auto !important;
    }
}


/*@media (min-width: 769px) and (max-width: 1400px) {
   body {
       zoom: 0.8;
   }
   }
   */


  /*uwu/
   /*uwu/
    /*uwu/
     /*uwu/
/* ==========================================
   MEJORAS PARA DISPOSITIVOS MÓVILES
   ========================================== */

/* Mejoras generales para móviles */
@media (max-width: 767px) {
    
    /* Prevenir desbordamiento horizontal */
    body {
        overflow-x: hidden;
        word-wrap: break-word;
        word-break: break-word;
    }
    
    /* Calculadora principal - títulos más pequeños */
    .calculadora-titulo {
        font-size: 24px !important;
        line-height: 1.2;
        text-align: center;
        word-wrap: break-word;
    }
    
    /* Etiquetas de control más pequeñas */
    .control-label {
        font-size: 15px !important;
        line-height: 1.3;
        word-wrap: break-word;
    }
    
    /* Selects y inputs más compactos */
    .control-select, .control-input {
        font-size: 14px !important;
        padding: 10px 12px !important;
        word-wrap: break-word;
    }
    
    /* Botones más pequeños */
    .calcular-btn {
        font-size: 16px !important;
        padding: 12px 18px !important;
        word-wrap: break-word;
    }
    
    /* Panel de multas - títulos */
    .multas-header h3 {
        font-size: 16px !important;
        line-height: 1.2;
        word-wrap: break-word;
    }
    
    .multa-label {
        font-size: 14px !important;
        min-width: auto !important;
        line-height: 1.3;
        word-wrap: break-word;
    }
    
    /* Panel de descuentos - títulos */
    .descuentos-header h3 {
        font-size: 16px !important;
        line-height: 1.2;
        word-wrap: break-word;
    }
    
    .descuento-control label {
        font-size: 14px !important;
        min-width: auto !important;
        line-height: 1.3;
        word-wrap: break-word;
    }
    
    /* Sección de resultados */
    #resultado {
        font-size: 14px !important;
        line-height: 1.4;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    #resultado strong {
        font-size: 14px !important;
        word-wrap: break-word;
        display: block;
        margin-bottom: 3px;
    }
    
    /* Total mensual */
    .total-mensual {
        font-size: 15px !important;
        padding: 8px 12px !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .total-mensual strong {
        font-size: 15px !important;
    }
    
    /* Totales adicionales */
    .additional-totals {
        font-size: 13px !important;
        padding: 12px 15px !important;
    }
    
    .additional-totals .discount-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
        margin-bottom: 8px !important;
    }
    
    .additional-totals .discount-item strong,
    .additional-totals .discount-item span {
        font-size: 13px !important;
        word-wrap: break-word;
        white-space: normal !important;
        text-align: left !important;
        width: 100%;
    }
    
    /* Resumen de multas */
    .resumen-multas h4 {
        font-size: 16px !important;
        word-wrap: break-word;
    }
    
    .resumen-item {
        font-size: 13px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 3px !important;
        padding: 10px 12px !important;
    }
    
    .resumen-item .resumen-label,
    .resumen-item .resumen-value {
        font-size: 13px !important;
        word-wrap: break-word;
        width: 100%;
    }
    
    /* Total final */
    .total-final {
        font-size: 14px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 3px !important;
        padding: 12px 15px !important;
    }
    
    .total-final span {
        width: 100%;
        text-align: left !important;
    }
    
    /* Resumen de descuentos */
    .resumen-descuentos h4 {
        font-size: 16px !important;
        word-wrap: break-word;
    }
    
    .descuento-final {
        font-size: 14px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 3px !important;
        padding: 12px 15px !important;
    }
    
    /* Nota especial */
    .nota-especial {
        margin: 20px 10px !important;
        padding: 15px !important;
    }
    
    .nota-especial-titulo {
        font-size: 16px !important;
        word-wrap: break-word;
    }
    
    .nota-especial-descripcion {
        font-size: 14px !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .nota-especial-tabla {
        grid-template-columns: 1fr !important;
        gap: 5px !important;
    }
    
    .nota-especial-concepto,
    .nota-especial-valor {
        font-size: 13px !important;
        word-wrap: break-word;
        text-align: left !important;
    }
    
    .nota-especial-total {
        font-size: 14px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
    }
    
    .nota-especial-total-label,
    .nota-especial-total-valor {
        font-size: 14px !important;
        word-wrap: break-word;
    }
    
    /* Input de porcentaje */
    .input-number-wrapper input[type="number"] {
        font-size: 14px !important;
        width: 35px !important;
    }
    
    .input-number-wrapper span {
        font-size: 14px !important;
    }
    
    /* Botones más pequeños en móviles */
    #agregarMultaBtn, #calcularTotalBtn, .btn-aplicar-descuento {
        font-size: 14px !important;
        padding: 10px 15px !important;
        word-wrap: break-word;
    }
    
    /* Contenedores principales */
    .panel-multas, .panel-descuentos {
        margin: 15px 5px !important;
        width: calc(100% - 10px) !important;
    }
    
    .calculadora-container {
        margin: 20px 10px !important;
        padding: 20px 15px !important;
    }
    
    /* Controles más compactos */
    .control-grupo {
        padding: 15px 12px !important;
    }
    
    .multa-control, .descuento-control {
        padding: 15px 12px !important;
        margin: 15px 12px !important;
    }
    
    /* Resultado heading */
    .resultado-heading {
        font-size: 18px !important;
        word-wrap: break-word;
    }
    
    /* Campos de multa */
    .multa-item {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    
    .multa-item label {
        font-size: 13px !important;
        word-wrap: break-word;
    }
    
    .multa-valor {
        font-size: 14px !important;
        width: 100% !important;
    }
    
    /* Botón de refresh todo */
    .refresh-all-btn {
        font-size: 14px !important;
        padding: 12px 20px !important;
        width: 90% !important;
        word-wrap: break-word;
    }
    
    .refresh-all-btn .refresh-text {
        font-size: 14px !important;
    }
}

/* Mejoras adicionales para pantallas muy pequeñas */
@media (max-width: 480px) {
    
    /* Títulos aún más pequeños */
    .calculadora-titulo {
        font-size: 20px !important;
    }
    
    .multas-header h3, .descuentos-header h3 {
        font-size: 14px !important;
    }
    
    /* Reducir padding general */
    .calculadora-container {
        padding: 15px 10px !important;
    }
    
    .panel-multas, .panel-descuentos {
        margin: 10px 3px !important;
    }
    
    /* Resultados más compactos */
    #resultado {
        font-size: 13px !important;
    }
    
    .total-mensual {
        font-size: 14px !important;
    }
    
    /* Botones más pequeños */
    .calcular-btn {
        font-size: 14px !important;
        padding: 10px 15px !important;
    }
    
    /* Campos de entrada */
    .control-select, .control-input {
        font-size: 13px !important;
    }
}

/* Mejoras para pantallas extra pequeñas */
@media (max-width: 360px) {
    
    /* Máxima compactación */
    .calculadora-titulo {
        font-size: 18px !important;
    }
    
    #resultado {
        font-size: 12px !important;
    }
    
    .total-mensual {
        font-size: 13px !important;
        padding: 6px 10px !important;
    }
    
    .additional-totals {
        font-size: 12px !important;
        padding: 10px 8px !important;
    }
    
    .resumen-item {
        font-size: 12px !important;
        padding: 8px 10px !important;
    }
    
    /* Botones muy compactos */
    .calcular-btn {
        font-size: 13px !important;
        padding: 8px 12px !important;
    }
    
    #agregarMultaBtn, #calcularTotalBtn, .btn-aplicar-descuento {
        font-size: 13px !important;
        padding: 8px 12px !important;
    }
}










/* Eliminar efecto de clic/focus en botones de información y refresh */
.info-btn:focus,
.info-btn:active,
.reset-btn:focus,
.reset-btn:active,
#refreshMultasBtn:focus,
#refreshMultasBtn:active,
#refreshDescuentosBtn:focus,
#refreshDescuentosBtn:active {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
    -moz-outline: none !important;
}

/* También eliminar en todos los botones en general */
button:focus,
button:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Eliminar el highlight azul en móviles para todos los elementos tocables */
* {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -khtml-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Permitir selección de texto solo donde sea necesario */
input[type="text"],
input[type="number"],
textarea,
p,
span:not(.refresh-icon) {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}











/* ==========================================
  AJUSTES ESPECÍFICOS PARA BOTONES EN SECCIONES CALCULADORA - MÁS GRANDES MÓVILES
  ========================================== */

@media (max-width: 767px) {
   
   /* Solo los botones dentro de la calculadora principal - MÁS GRANDES */
   .calculadora-container .info-btn {
       width: 24px !important;
       height: 24px !important;
       margin-left: 5px !important;
       box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
       min-width: 24px !important;
       min-height: 24px !important;
   }
   
   .calculadora-container .info-btn::before {
       font-size: 14px !important;
   }
   
   .calculadora-container .reset-btn {
       width: 30px !important;
       height: 30px !important;
       box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
       min-width: 30px !important;
       min-height: 30px !important;
   }
   
   .calculadora-container .reset-btn::before {
       font-size: 16px !important;
   }
   
   /* Reducir efectos hover solo en esta sección */
   .calculadora-container .info-btn:hover,
   .calculadora-container .reset-btn:hover {
       transform: scale(1.05) !important;
   }
}

/* Para pantallas muy pequeñas */
@media (max-width: 480px) {
   
   .calculadora-container .info-btn {
       width: 22px !important;
       height: 22px !important;
       margin-left: 4px !important;
       min-width: 22px !important;
       min-height: 22px !important;
   }
   
   .calculadora-container .info-btn::before {
       font-size: 13px !important;
   }
   
   .calculadora-container .reset-btn {
       width: 28px !important;
       height: 28px !important;
       min-width: 28px !important;
       min-height: 28px !important;
   }
   
   .calculadora-container .reset-btn::before {
       font-size: 15px !important;
   }
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}


/* Estilo específico SOLO para el ícono de metros cúbicos */
#consumoInput .control-header {
    position: relative;
}

#consumoInput .control-header .info-btn {
    position: absolute;
    right: 0;
    top: -5px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: colorRotate 7s infinite;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#consumoInput .control-header .info-btn:hover {
    transform: scale(1.1);
    animation-play-state: paused;
    background: linear-gradient(45deg, #6cc428, #0ba0d8) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Animación de rotación de colores */
@keyframes colorRotate {
    0% { background: #6cc428; }
    20% { background: #0ba0d8; }
    40% { background: #d04092; }
    60% { background: #0554bb; }
    80% { background: #fbc708; }
    100% { background: #6cc428; }
}

/* Asegurar que el label tenga espacio para el ícono - solo metros cúbicos */
#consumoInput .control-header .control-label {
    padding-right: 40px;
    display: block;
}



/* ==========================================
   FIX PARA PROBLEMAS DE HOVER - ANTI-FLICKERING
   ========================================== */

/* Desactivar transiciones en hover para botones problemáticos */
@media (hover: hover) and (pointer: fine) {
    /* Prevenir flickering en todos los botones */
    button,
    .info-btn,
    .reset-btn,
    #refreshMultasBtn,
    #refreshDescuentosBtn,
    .refresh-all-btn,
    .calcular-btn,
    #agregarMultaBtn,
    #calcularTotalBtn,
    .btn-aplicar-descuento,
    .delete-multa,
    .nivel-link-btn,
    .capas-menu-item {
        transition: all 0.3s ease !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
        will-change: auto !important;
    }
    
    /* Crear una zona muerta alrededor de los botones para evitar re-triggers */
    button::after,
    .info-btn::after,
    .reset-btn::after,
    #refreshMultasBtn::after,
    #refreshDescuentosBtn::after {
        content: '';
        position: absolute;
        top: -5px;
        left: -5px;
        right: -5px;
        bottom: -5px;
        z-index: -1;
        pointer-events: none;
    }
}

/* Reducir la sensibilidad del hover en botones pequeños */
.info-btn:hover,
.reset-btn:hover,
#refreshMultasBtn:hover,
#refreshDescuentosBtn:hover {
    transition-delay: 0.1s !important;
}

/* Desactivar animaciones continuas en hover */
.reset-btn:hover,
#refreshMultasBtn:hover,
#refreshDescuentosBtn:hover {
    animation: none !important;
    transform: rotate(180deg) !important;
}

/* Simplificar efectos hover para evitar recálculos */
.calcular-btn:hover,
#agregarMultaBtn:hover,
#calcularTotalBtn:hover,
.btn-aplicar-descuento:hover {
    transform: translateY(-3px) !important;
}

/* Evitar animaciones infinitas en hover */
.refresh-all-btn:hover .refresh-icon {
    animation: none !important;
    transform: rotate(180deg) !important;
}

/* Desactivar efectos hover complejos en móviles y tablets */
@media (hover: none) and (pointer: coarse) {
    button:hover,
    .info-btn:hover,
    .reset-btn:hover,
    #refreshMultasBtn:hover,
    #refreshDescuentosBtn:hover,
    .refresh-all-btn:hover,
    .calcular-btn:hover,
    #agregarMultaBtn:hover,
    #calcularTotalBtn:hover,
    .btn-aplicar-descuento:hover {
        transform: none !important;
        box-shadow: none !important;
        animation: none !important;
    }
}

/* Fix específico para el botón de refresh que rota */
.reset-btn,
#refreshMultasBtn,
#refreshDescuentosBtn {
    transition: transform 0.4s ease, box-shadow 0.3s ease !important;
}

/* Estabilizar el botón de información con colores animados */
#consumoInput .control-header .info-btn {
    animation-play-state: running !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

#consumoInput .control-header .info-btn:hover {
    animation-play-state: paused !important;
}

/* ==========================================
   BOTÓN VER TARIFAS - Estilo similar al refresh
   ========================================== */
.ver-tarifas-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #1272E9, #0d5bb8);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(18, 114, 233, 0.3);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    margin-left: 15px; /* Separación del botón anterior */
}

.ver-tarifas-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.7s ease;
}

.ver-tarifas-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.ver-tarifas-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(18, 114, 233, 0.4);
    background: linear-gradient(135deg, #2688f5, #1272E9);
}

.ver-tarifas-btn:hover::after {
    left: 100%;
}

.ver-tarifas-btn:active {
    transform: translateY(-2px);
}

.ver-tarifas-btn .tarifas-icon {
    font-size: 22px;
    display: inline-block !important;
    transition: transform 0.4s ease;
    opacity: 1 !important;
    visibility: visible !important;
    color: white;
}

.ver-tarifas-btn .tarifas-text {
    transition: opacity 0.3s ease;
    opacity: 1 !important;
    visibility: visible !important;
}

.ver-tarifas-btn:hover .tarifas-icon {
    transform: scale(1.1) rotate(5deg);
}

.ver-tarifas-btn.refreshing .tarifas-icon {
    animation: pulse-icon 1s ease;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Responsive para botones - CORREGIDO */
@media (max-width: 768px) {
    .scroll-to-top-container {
        flex-direction: column;
        gap: 12px;
        margin: 20px auto 40px;
        padding: 0 15px;
        max-width: 100%;
    }
    
    /* Botón principal (Refrescar todo) - MÁS GRANDE */
    .refresh-all-btn {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
        padding: 14px 24px;
        font-size: 16px;
    }
    
    /* Botón secundario (Ver tarifas) - MÁS PEQUEÑO */
    .ver-tarifas-btn {
        width: 100%;
        max-width: 280px; /* Más pequeño que refresh */
        margin: 0 auto;
        padding: 12px 20px; /* Padding más pequeño */
        font-size: 15px; /* Fuente más pequeña */
    }
    
    .ver-tarifas-btn .tarifas-icon,
    .refresh-all-btn .refresh-icon {
        font-size: 20px;
    }
    
    .ver-tarifas-btn .tarifas-text {
        font-size: 15px;
    }
    
    .refresh-all-btn .refresh-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .scroll-to-top-container {
        padding: 0 10px;
    }
    
    /* Botón principal (Refrescar todo) */
    .refresh-all-btn {
        max-width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }
    
    /* Botón secundario (Ver tarifas) - AÚN MÁS PEQUEÑO */
    .ver-tarifas-btn {
        max-width: 85%; /* Más estrecho */
        padding: 10px 18px; /* Más compacto */
        font-size: 14px;
    }
    
    .ver-tarifas-btn .tarifas-icon {
        font-size: 16px; /* Ícono más pequeño */
    }
    
    .refresh-all-btn .refresh-icon {
        font-size: 18px;
    }
    
    .ver-tarifas-btn .tarifas-text {
        font-size: 14px;
    }
    
    .refresh-all-btn .refresh-text {
        font-size: 15px;
    }
}


/* ==========================================
   PANEL DE SUBSIDIO TERCERA EDAD - TEMA MORADO/VIOLETA
   ========================================== */
.panel-subsidio {
    width: 100%;
    max-width: 850px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    margin: 30px auto;
    transition: var(--transition-normal);
    overflow: hidden;
}

.panel-subsidio:hover {
    box-shadow: var(--shadow-lg);
}

.subsidio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: white;
    border-radius: 11px 11px 0 0;
    position: relative;
}

.subsidio-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.subsidio-control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 24px;
    background-color: var(--bg-gray);
    padding: 20px;
    border-radius: var(--border-radius-md);
    border-left: 4px solid #8e44ad;
    box-shadow: var(--shadow-sm);
}

.subsidio-control label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    min-width: 150px;
}

.subsidio-control .select-wrapper {
    position: relative;
    min-width: 120px;
}

.subsidio-control .select-wrapper::after {
    content: '▼';
    font-size: 12px;
    top: 50%;
    right: 10px;
    position: absolute;
    transform: translateY(-50%);
    pointer-events: none;
    color: #8e44ad;
}

.subsidio-control select {
    appearance: none;
    padding: 10px 35px 10px 15px;
    border: 2px solid #8e44ad;
    border-radius: var(--border-radius-sm);
    background-color: white;
    font-size: 16px;
    color: var(--text-dark);
    cursor: pointer;
    width: 100%;
    transition: var(--transition-fast);
}

.subsidio-control select:hover {
    border-color: #9b59b6;
    box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.2);
}

.subsidio-control select:focus {
    outline: none;
    border-color: #9b59b6;
    box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.2);
}

.subsidio-info-box {
    margin: 20px 24px;
    padding: 20px;
    background: linear-gradient(to right, #f4ecf7, #ffffff);
    border-radius: var(--border-radius-md);
    border: 2px solid #8e44ad;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
}

.subsidio-info-icon {
    font-size: 48px;
    line-height: 1;
}

.subsidio-info-text {
    flex: 1;
    color: var(--text-dark);
}

.subsidio-info-text strong {
    color: #8e44ad;
    font-size: 18px;
}

.subsidio-info-text small {
    color: #666;
    font-size: 13px;
}

.btn-aplicar-subsidio {
    background-color: #8e44ad;
    color: var(--text-light);
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    display: block;
    width: calc(100% - 48px);
    margin: 20px 24px;
}

.btn-aplicar-subsidio::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: all 0.6s;
}

.btn-aplicar-subsidio:hover::after {
    left: 100%;
}

.btn-aplicar-subsidio:hover {
    background-color: #9b59b6;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(142, 68, 173, 0.4);
}

.btn-aplicar-subsidio:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.resumen-subsidio {
    margin: 30px 24px;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    padding: 25px;
}

.resumen-subsidio h4 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #8e44ad;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
}

.resumen-subsidio h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 50px;
    height: 3px;
    background-color: #8e44ad;
    border-radius: 2px;
}

.resumen-subsidio .resumen-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 14px 16px;
    background-color: var(--bg-gray);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.resumen-subsidio .resumen-item:hover {
    background-color: #f4ecf7 !important;
    border-left-color: #8e44ad !important;
    transform: translateX(3px);
}

.resumen-subsidio .resumen-item .resumen-label {
    font-weight: 500;
    color: var(--text-dark);
}

.resumen-subsidio .resumen-item .resumen-value {
    font-weight: 600;
    color: #8e44ad;
}

.subsidio-final {
    margin-top: 25px;
    margin-bottom: 10px;
    padding: 18px 20px;
    border-top: 2px dashed #ccc;
    font-weight: bold;
    font-size: 1.3em;
    display: flex;
    justify-content: space-between;
    background: linear-gradient(to right, #f4ecf7, #fff);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    border-left: 5px solid #8e44ad;
    position: relative;
    overflow: hidden;
}

.subsidio-final::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(142, 68, 173, 0.05) 25%, transparent 25%, transparent 50%, 
                rgba(142, 68, 173, 0.05) 50%, rgba(142, 68, 173, 0.05) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
    opacity: 0.4;
}

.opciones-pago-subsidio {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
}

.opciones-pago-subsidio .pago-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 12px 14px;
    background-color: #faf8fb;
    border-radius: var(--border-radius-sm);
    border-left: 3px solid #8e44ad;
    transition: var(--transition-fast);
}

.opciones-pago-subsidio .pago-item:hover {
    background-color: #f4ecf7;
    transform: translateX(3px);
}

.opciones-pago-subsidio .pago-item span:first-child {
    font-weight: 500;
    color: var(--text-dark);
}

.opciones-pago-subsidio .pago-item span:last-child {
    font-weight: 600;
    color: #8e44ad;
}

/* Botón de refresh para subsidio - Estilo con flecha morada */
#refreshSubsidioBtn {
    background-color: white !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform 0.4s ease, box-shadow 0.3s ease !important;
    margin-left: 10px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
    font-size: 0 !important;
    position: relative !important;
    transform: rotate(0deg) !important;
}

/* Ícono de flecha morada para subsidio */
#refreshSubsidioBtn::before {
    content: "↻" !important;
    font-size: 22px !important;
    font-weight: bold !important;
    color: #8e44ad !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    transition: none !important;
}

/* Efectos hover para el botón de subsidio */
#refreshSubsidioBtn:hover {
    transform: rotate(180deg) !important;
    box-shadow: 0 3px 8px rgba(142, 68, 173, 0.3) !important;
    background-color: white !important;
}

/* Ocultar el emoji original completamente */
#refreshSubsidioBtn .refresh-icon,
#refreshSubsidioBtn span {
    opacity: 0 !important;
    display: none !important;
    visibility: hidden !important;
    font-size: 0 !important;
}

/* Forzar estilos en el control */
.subsidio-control #refreshSubsidioBtn {
    background-color: white !important;
}

.subsidio-control #refreshSubsidioBtn:hover {
    background-color: white !important;
    transform: rotate(180deg) !important;
}

/* Asegurar que no haya otros estilos del header interfiriendo */
.subsidio-header #refreshSubsidioBtn {
    color: #8e44ad !important;
    background-color: white !important;
    font-size: 0 !important;
}

.subsidio-header #refreshSubsidioBtn::before {
    color: #8e44ad !important;
}

.subsidio-header #refreshSubsidioBtn:hover {
    background-color: white !important;
    box-shadow: 0 3px 8px rgba(142, 68, 173, 0.3) !important;
    transform: rotate(180deg) !important;
}

/* Asegurar que la transición funcione */
#refreshSubsidioBtn,
.subsidio-control #refreshSubsidioBtn,
.subsidio-header #refreshSubsidioBtn {
    transition: transform 0.4s ease, box-shadow 0.3s ease !important;
    will-change: transform !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

/* Icono de información para subsidio */
.subsidio-header .info-btn {
    font-size: 0 !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
    cursor: pointer !important;
    position: relative !important;
    border: none !important;
    margin-left: 10px !important;
}

.subsidio-header .info-btn::before {
    content: "i" !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: #8e44ad !important;
    font-style: italic !important;
    position: absolute !important;
    font-family: serif !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.subsidio-header .info-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 3px 8px rgba(142, 68, 173, 0.3) !important;
    background: white !important;
}

/* Ocultar cualquier contenido interno del botón de info */
.subsidio-header .info-btn * {
    display: none !important;
}

/* Ajustes responsivos para móviles */
@media (max-width: 768px) {
    .subsidio-control {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .subsidio-control .select-wrapper {
        width: 100%;
    }
    
    .subsidio-info-box {
        flex-direction: column;
        text-align: center;
        margin: 15px;
    }
    
    .btn-aplicar-subsidio {
        width: calc(100% - 30px);
        margin: 15px;
    }
    
    .panel-subsidio {
        margin: 15px 5px;
    }
    
    .resumen-subsidio .resumen-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .subsidio-final {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .opciones-pago-subsidio .pago-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }
}

@media (max-width: 480px) {
    .subsidio-header h3 {
        font-size: 16px;
    }
    
    .subsidio-info-icon {
        font-size: 36px;
    }
}

/* Eliminar efectos de hover en móviles */
@media (hover: none) and (pointer: coarse) {
    #refreshSubsidioBtn:hover {
        transform: rotate(0deg) !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
    }
}

/* FORZAR animación del botón de subsidio - ÚLTIMA INSTANCIA */
button#refreshSubsidioBtn {
    transform: rotate(0deg) !important;
    transition: all 0.4s ease !important;
}

button#refreshSubsidioBtn:hover {
    transform: rotate(180deg) !important;
}

/* ===== Subsidio: responsive móvil (igual que Multas/Descuentos) ===== */
@media (max-width: 480px) {

  /* Panel */
  .panel-subsidio{
    width: 95%;
    margin: 15px auto;
  }

  /* Header */
  .subsidio-header{
    padding: 14px 16px;
  }
  .subsidio-header h3{
    font-size: 18px;
    gap: 10px;
    flex-wrap: wrap;
  }

  /* Control (select + label) */
  .subsidio-control{
    flex-direction: column;
    align-items: flex-start;
    margin: 15px;
    padding: 15px;
  }
  .subsidio-control label{
    min-width: auto;
    font-size: 16px;
  }
  .subsidio-control .select-wrapper{
    width: 100%;
  }
  .subsidio-control select{
    width: 100%;
  }

  /* Caja informativa */
  .subsidio-info-box{
    margin: 15px;
    padding: 15px;
    flex-direction: column;
    text-align: center;
  }

  /* Botón aplicar */
  .btn-aplicar-subsidio{
    width: calc(100% - 30px);
    margin: 15px;
    padding: 10px;
    font-size: 16px;
  }

  /* Botones circulares (refresh/info) un poco más cómodos */
  .subsidio-header .info-btn{
    width: 26px;
    height: 26px;
  }
  #refreshSubsidioBtn{
    width: 38px;
    height: 38px;
  }
}

/*moviles pantalla centrada  */
@media (max-width: 768px) {
    #pantallaCarga {
        transform: none !important;
        transform-origin: center center !important;
    }
    
    .contenido-carga {
        transform: none !important;
    }
    
    @keyframes float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-15px); }
    }
}