* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f8fafc; /* Fondo gris muy claro estático para el centro */
}

/* =====================================
   LAYOUT PRINCIPAL
===================================== */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =====================================
   ESTILOS COMPARTIDOS: FRANJAS ANIMADAS
===================================== */
.top-stripe, .bottom-stripe {
    background: linear-gradient(135deg, #7ad8f3, #62c9ea, #4db8df, #7ad8f3);
    background-size: 300% 300%;
    animation: gradientMove 6s ease infinite;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.top-stripe::before, .bottom-stripe::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 40px 40px; 
    animation: slideGrid 10s linear infinite;
    z-index: 2;
}

.top-stripe::after, .bottom-stripe::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, transparent 20%, rgba(20, 80, 120, 0.15) 150%);
    z-index: 3;
    pointer-events: none;
}

/* Keyframes Animaciones */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes slideGrid {
    0% { background-position: 0px 0px; }
    100% { background-position: 40px 40px; }
}

@keyframes slideUpFade {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.header-content, .footer-content {
    position: relative;
    z-index: 10; 
    width: 100%;
    text-align: center;
}

/* =====================================
   FRANJA SUPERIOR (Ancha)
===================================== */
.top-stripe {
    padding: 50px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-shadow: 0 2px 5px rgba(0,0,0,0.35);
}

.contact-link:not(.no-link):hover {
    color: #ffffff;
    transform: translateY(-1px);
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.separator {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* =====================================
   MEDIO (LOGIN)
===================================== */
.middle-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    background: white;
    border: 2px solid #e2e8f0; /* Borde leve agregado */
    border-radius: 20px;
    padding: 30px 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.12);
    animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-logo {
    text-align: center;
}

.login-logo img {
    max-width: 280px; /* ¡Logo más grande! (Antes 200px) */
    width: 100%;
}

.login-subtitle {
    text-align: center;
    margin: 10px 0 20px;
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

/* Formulario */
.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: #444;
}

.form-row input {
    width: 100%;
    height: 42px;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    padding: 0 15px;
    font-size: 15px;
    transition: .25s;
}

.form-row input:focus {
    outline: none;
    border-color: #62c9ea;
    box-shadow: 0 0 0 4px rgba(98,201,234,.20);
}

/* Botones */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.login-action-button {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: .25s;
}

.primary {
    background: #4db8df;
    color: white;
}

.primary:hover {
    background: #3caed8;
    transform: translateY(-2px);
}

.secondary {
    background: #eef8fc;
    color: #2c89ac;
    border: 1px solid #d9edf6;
}

.secondary:hover {
    background: #e4f4fb;
}

.login-action-button:disabled {
    background: #c3e5f1 !important;
    color: #ffffff;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

/* Mensajes */
.error, .ok {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    font-size: 13px;
}
.error { color: red; }
.ok { color: green; }

/* =====================================
   FRANJA INFERIOR (Delgada)
===================================== */
.bottom-stripe {
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px; 
}

.footer-logo {
    max-width: 90px;
    margin-bottom: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.15));
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
}

.copyright {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    opacity: 1;
    text-shadow: 0 2px 5px rgba(0,0,0,0.35);
}

/* =====================================
   RESPONSIVE Y ALTURA DE PANTALLA
===================================== */

@media(max-width: 768px) {
    .top-stripe { padding: 30px 15px; }
    .bottom-stripe { padding: 15px 15px; }
    .contact-info {
        flex-direction: column;
        gap: 12px;
        align-items: center; 
    }
    .footer-content {
        flex-direction: column;
        gap: 8px;
    }
    .separator { display: none; }
    .login-card { padding: 25px 20px; }
}

@media(max-height: 800px) {
    .top-stripe { padding: 38px 20px; }
    .bottom-stripe { padding: 12px 20px; }
    .login-card { padding: 18px 35px; }
    .login-logo img { max-width: 220px; } /* ¡Logo ampliado en la versión compacta! (Antes 160px) */
    .login-subtitle { margin: 5px 0 15px; }
}

/* icono de ojo para el password */

.password-container {
    position: relative;
    width: 100%;
}

.password-container input {
    width: 100%;
    padding: 10px 42px 10px 10px;
    box-sizing: border-box;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #000;
}

.toggle-password:focus {
    outline: none;
}

.toggle-password svg {
    width: 22px;
    height: 22px;
}