* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url("../../imagenes/login4.png") no-repeat center center/cover;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1000px;
    height: auto;
    min-height: 500px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
}

.left {
    background: rgba(59, 57, 57, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 60px 40px 40px 40px;
    min-height: 500px;
}

.left h1 {
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    margin: 40px 0;
    text-align: center;
    font-weight: 500;
    line-height: 1.3;
}

.left p {
    margin: 0 0 30px 0;
    color: #ddd;
    line-height: 1.5;
    text-align: center;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.icons {
    text-align: center;
    margin-top: auto;
}

.icons i {
    margin: 0 10px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.icons i:hover {
    color: #1e8ee9;
}

.right {
    background: rgba(40, 38, 38, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    color: white;
}

.right h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: clamp(1.5rem, 3vw, 1.8rem);
}

.input-box {
    position: relative;
    margin-bottom: 25px;
}

.input-box input {
    width: 100%;
    padding: 14px 40px;
    border: none;
    border-bottom: 2px solid #fff;
    background: transparent;
    outline: none;
    color: white;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-box input.error-border {
    border-bottom-color: #ff6b6b !important;
}

.input-box input:focus {
    border-bottom-color: #1e8ee9;
}

.input-box input::placeholder {
    color: #ccc;
}

.input-box i {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: white;
    z-index: 2;
}

.input-box i.error-icon {
    color: #ff6b6b;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
    z-index: 2;
    padding: 5px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #1e8ee9;
}

.options {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 25px;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.options label {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.options a {
    color: #1e8ee9;
    text-decoration: none;
    transition: color 0.3s;
    cursor: pointer;
}

.options a:hover {
    text-decoration: underline;
}

.btn {
    background: #1e8ee9;
    border: none;
    padding: 14px;
    width: 100%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: bold;
    margin-bottom: 15px;
}

.btn:hover {
    background: #1865c2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 142, 233, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.error-message {
    text-align: center;
    color: #ff6b6b;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.4;
}

.error-message strong {
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
}

.signup {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    margin-bottom: 6px;
}

.signup a {
    color: #1e8ee9;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.signup a:hover {
    text-decoration: underline;
}

.sisgonTech {
    text-align: center;
    margin: 4px 0;
    font-size: 12px;
    color: #ccc;
    padding: 0;
}
.sisgonTech small {
    margin: 0;
}

.titulo-sgea {
    font-size: 1.8rem;
    line-height: 1.2;
    word-break: break-word;
    hyphens: auto;
}

@media (max-width: 768px) {
    .titulo-sgea {
        font-size: 1.4rem;
        line-height: 1.1;
        margin: 25px 0;
    }
    
    .left {
        padding: 25px 15px 25px 15px;
        min-height: auto; 
    }
}

@media (max-width: 480px) {
    .titulo-sgea {
        font-size: 1.2rem;
    }
    
    .left h1 {
        margin: 15px 0;
    }
}

.alert-success {
    background: rgba(76, 175, 80, 0.9);
    color: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border-left: 4px solid #4CAF50;
}

/* MODALES - SOLUCIÓN 4 CON FLEXBOX */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(40, 38, 38, 0.95);
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    color: white;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    /* Asegura que no sea más alto que la pantalla */
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    color: #1e8ee9;
}

.close {
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: white;
}

.modal-text {
    margin-bottom: 20px;
    color: #ddd;
    line-height: 1.5;
}

/* Estilos específicos para el modal de licencia */
.license-modal {
    background: white !important;
    color: #333 !important;
    max-width: 460 !important;
    padding: 15px 20px 20px 20px !important;
}

.license-modal .modal-header {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.license-modal .modal-header h3 {
    color: #1e8ee9 !important;
    font-size: 1.3rem;
}

.license-modal .close {
    color: #666 !important;
}

.license-modal .close:hover {
    color: #333 !important;
}

.license-modal .modal-body {
    padding: 0 10px;
}

.license-logo-container {
    text-align: center;
    margin-bottom: 25px;
    margin: 5px 0 10px 0;
    padding: 5;
    background: white;
}

.license-logo {
    max-width: 200px;
    max-height: 100px;
    width: auto;
    height: auto;
}

.license-info {
    text-align: center;
}

.license-info h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4rem;
    line-height: 1.3;
}

.license-details {
    text-align: left;
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.license-details p {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #444;
}

.license-details strong {
    color: #2c3e50;
    min-width: 140px;
    display: inline-block;
}



.btn-secondary {
    background: #1e8ee9 !important;
    color: white !important;
    padding: 12px 30px !important;
    width: auto !important;
    min-width: 150px;
}

.btn-secondary:hover {
    background: #1565c0 !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0px 1000px transparent inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* RESPONSIVE GENERAL */
@media (max-width: 768px) {
    body {
        padding: 15px;
        height: auto;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 20px;
    }

    .container {
        grid-template-columns: 1fr;
        height: auto;
        margin: 0;
    }

    .left, .right {
        padding: 25px 25px;
    }

    .left {
        order: 2;
        padding: 25px 25px 25px 25px; 
        min-height: auto; /
    }

    .right {
        order: 1;
    }

    .left h1 {
        margin: 30px 0;
    }

    .options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    /* Responsive para modales */
    .modal {
        padding: 15px;
        align-items: flex-start; /* En móvil empieza desde arriba */
        justify-content: center;
        padding-top: 50px; /* Espacio para el teclado en móviles */
    }
    
    .modal-content {
        max-height: 85vh;
    }
    
    .license-modal {
        max-width: 95% !important;
        margin-top: 20px;
    }
    
    .license-logo {
        max-width: 200px;
        max-height: 100px;
        width: auto;
        height: auto;
    }
    
    .license-info h4 {
        font-size: 1.2rem;
    }
    
    .license-details {
        padding: 15px;
    }
    
    .license-details p {
        font-size: 0.9rem;
    }
    
    .license-details strong {
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .left, .right {
        padding: 30px 20px;
    }

    .left {
        padding: 20px 20px 20px 20px;
    }

    .input-box input {
        padding: 12px 35px;
        font-size: 16px;
    }

    .btn {
        padding: 12px;
    }

    .modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .license-modal {
        padding: 20px !important;
    }
    
    .license-logo {
        max-width: 200px;
        max-height: 100px;
        width: auto;
        height: auto;
    }
    
    .license-info h4 {
        font-size: 1.1rem;
    }
    
    .btn-secondary {
        padding: 10px 20px !important;
        min-width: 120px;
    }
}

/* Ajustes adicionales para el título en móvil */
@media (max-width: 360px) {
    .titulo-sgea {
        font-size: 1.1rem;
    }
}
/* Estilos para el botón "Ver en mapa" */
.map-button-container {
    margin-top: 20px;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.map-button {
    background: #28a745 !important; /* Color verde para diferenciarlo */
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto !important;
    padding: 10px 25px !important;
    border-radius: 25px !important;
    transition: all 0.3s ease !important;
    margin-bottom: 0 !important;
}

.map-button:hover {
    background: #218838 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3) !important;
}

.map-button:active {
    transform: translateY(-1px) !important;
}

.map-button i {
    font-size: 16px;
}

/* Responsive para el botón */
@media (max-width: 768px) {
    .map-button {
        padding: 12px 20px !important;
        font-size: 14px;
    }
    
    .map-button i {
        font-size: 14px;
    }
}

.quienesSomos {
    text-align: center;
    margin-top: 6px;
    margin-bottom: 0;
    font-size: 13px;
}

/* Estilo para el Enlace Clickable */
.quienesSomos a {
    color: var(--primary-color, #007bff);
    text-decoration: none; 
    transition: color 0.3s ease; 
}

.quienesSomos a:hover {
    text-decoration: underline; 
}