﻿html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

.login-bg {
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    background-color: #ffffff;
    font-family: 'Poppins', sans-serif;
}

.login-row {
    min-height: 100vh;
}

/* ===== PANEL IZQUIERDO ===== */
.login-left {
    padding: 0;
    background: linear-gradient(135deg, #1a5d3a 0%, #2d7a4e 30%, #3d8b5a 60%, #1a5d3a 100%);
    position: relative;
    overflow: hidden;
}

    .login-left::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.05) 0%, transparent 50%), radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 50%);
        pointer-events: none;
    }

.login-left-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 100vh;
    padding: 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Icono del documento */
.document-icon-wrapper {
    position: relative;
    margin-bottom: 20px;
    width: 160px;
    height: 180px;
}

.document-icon {
    width: 140px;
    height: 160px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    position: relative;
}

    .document-icon > svg {
        width: 70px;
        height: 70px;
        color: rgba(255, 255, 255, 0.7);
    }

.pen-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
}

    .pen-icon svg {
        width: 100%;
        height: 100%;
        color: rgba(255, 255, 255, 0.6);
    }

/* Badge de verificacion */
.check-badge {
    position: absolute;
    bottom: 5px;
    right: -5px;
    width: 36px;
    height: 36px;
    background: #2ecc71;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

    .check-badge svg {
        width: 18px;
        height: 18px;
        color: white;
    }

/* Titulo y descripcion */
.login-left-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.2;
    max-width: 380px;
}

.login-left-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    max-width: 400px;
    margin-bottom: 32px;
}

/* Badges de caracteristicas */
.features-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

    .feature-badge:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }

    .feature-badge svg {
        color: #2ecc71;
    }

/* ===== PANEL DERECHO ===== */
.login-right {
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
}

/* Logo */
.logo-container {
    margin-bottom: 10px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
}

    .logo-icon svg {
        width: 100%;
        height: 100%;
    }

.logo-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    letter-spacing: 1px;
}

.logo-firma {
    color: #1a5d3a;
}

.logo-sinpapel {
    color: #2ecc71;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: #888;
    letter-spacing: 2px;
    margin: 0;
    font-weight: 500;
}

/* Campos de formulario */
.form-group-custom {
    margin-bottom: 20px;
}

.form-label-custom {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #999;
    display: flex;
    align-items: center;
    z-index: 1;
}

/* Boton toggle password */
.toggle-password-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    z-index: 2;
    transition: color 0.2s ease;
}

    .toggle-password-btn:hover {
        color: #666;
    }

    .toggle-password-btn:focus {
        outline: none;
    }

.form-control-custom {
    width: 100%;
    height: 50px;
    padding: 12px 50px 12px 50px;
    font-size: 0.95rem;
    color: #333;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

    .form-control-custom:focus {
        outline: none;
        border-color: #2d7a4e;
        background-color: #fff;
        box-shadow: 0 0 0 3px rgba(45, 122, 78, 0.1);
    }

    .form-control-custom::placeholder {
        color: #aaa;
    }

/* Link olvidaste contrasena */
.forgot-password-link {
    font-size: 0.9rem;
    color: #2d7a4e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

    .forgot-password-link:hover {
        color: #1a5d3a;
        text-decoration: underline;
    }

/* Boton de login */
.btn-login-custom {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #1a5d3a 0%, #2d7a4e 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(45, 122, 78, 0.3);
}

    .btn-login-custom:hover {
        background: linear-gradient(135deg, #155230 0%, #256842 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(45, 122, 78, 0.4);
    }

    .btn-login-custom:active {
        transform: translateY(0);
    }

    .btn-login-custom svg {
        transition: transform 0.3s ease;
    }

    .btn-login-custom:hover svg {
        transform: translateX(4px);
    }

/* Link de registro */
.register-text {
    font-size: 0.9rem;
    color: #666;
}

.register-link {
    font-size: 0.9rem;
    color: #2d7a4e;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

    .register-link:hover {
        color: #1a5d3a;
        text-decoration: underline;
    }

/* Footer links */
.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

    .footer-links a {
        font-size: 0.8rem;
        color: #666;
        text-decoration: none;
        transition: color 0.2s ease;
    }

        .footer-links a:hover {
            color: #2d7a4e;
        }

.footer-separator {
    color: #ccc;
    font-size: 0.6rem;
}

.copyright-text {
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    margin-top: 12px;
}

/* Alertas */
.js-auto-hide-alert {
    animation: fadeInDown 0.5s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE - TABLET ===== */
@media (max-width: 991.98px) {
    .login-left-content {
        padding: 30px;
    }

    .login-left-title {
        font-size: 1.8rem;
        max-width: 320px;
    }

    .login-left-description {
        font-size: 0.95rem;
        max-width: 350px;
    }

    .document-icon-wrapper {
        width: 140px;
        height: 160px;
    }

    .document-icon {
        width: 120px;
        height: 140px;
    }

        .document-icon > svg {
            width: 55px;
            height: 55px;
        }

    .feature-badge {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .login-form-wrapper {
        padding: 30px 25px;
    }
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 767.98px) {
    .login-bg {
        min-height: 100vh;
        background: linear-gradient(135deg, #1a5d3a 0%, #2d7a4e 50%, #3d8b5a 100%);
    }

    .login-row {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }

    /* Ocultar panel izquierdo en mobile */
    .login-left {
        display: none !important;
    }

    /* Panel derecho ocupa todo */
    .login-right {
        width: 100%;
        max-width: 440px;
        min-height: auto;
        background-color: #ffffff;
        border-radius: 20px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        margin: 0 auto;
    }

    .login-form-wrapper {
        max-width: 100%;
        padding: 35px 25px;
    }

    .logo-container img {
        width: 220px !important;
        margin: 5px !important;
    }

    .form-control-custom {
        height: 48px;
        font-size: 16px; /* Previene zoom en iOS */
    }

    .btn-login-custom {
        height: 50px;
        font-size: 0.95rem;
    }

    .footer-links {
        margin-top: 25px;
        padding-top: 15px;
    }
}

/* ===== RESPONSIVE - MOBILE SMALL ===== */
@media (max-width: 480px) {
    .login-row {
        padding: 15px;
    }

    .login-right {
        border-radius: 16px;
    }

    .login-form-wrapper {
        padding: 30px 20px;
    }

    .logo-container img {
        width: 200px !important;
    }

    .logo-subtitle {
        font-size: 0.7rem;
        letter-spacing: 1.5px;
    }

    .form-label-custom {
        font-size: 0.85rem;
    }

    .form-control-custom {
        height: 46px;
        padding: 10px 45px;
    }

    .input-icon {
        left: 14px;
    }

        .input-icon svg {
            width: 16px;
            height: 16px;
        }

    .toggle-password-btn {
        right: 10px;
    }

        .toggle-password-btn svg {
            width: 16px;
            height: 16px;
        }

    .forgot-password-link {
        font-size: 0.85rem;
    }

    .btn-login-custom {
        height: 48px;
        font-size: 0.9rem;
    }

    .footer-links {
        gap: 6px;
    }

        .footer-links a {
            font-size: 0.75rem;
        }

    .copyright-text {
        font-size: 0.7rem;
    }
}

/* ===== RESPONSIVE - MOBILE EXTRA SMALL ===== */
@media (max-width: 360px) {
    .login-row {
        padding: 10px;
    }

    .login-form-wrapper {
        padding: 25px 18px;
    }

    .logo-container img {
        width: 180px !important;
    }

    .form-group-custom {
        margin-bottom: 16px;
    }

    .form-control-custom {
        height: 44px;
        padding: 10px 42px;
    }

    .btn-login-custom {
        height: 46px;
    }
}

/* ===== LANDSCAPE MODE FIX ===== */
@media (max-width: 767.98px) and (orientation: landscape) {
    .login-row {
        min-height: auto;
        padding: 15px;
    }

    .login-right {
        max-width: 500px;
    }

    .login-form-wrapper {
        padding: 25px 30px;
    }

    .logo-container {
        margin-bottom: 5px;
    }

        .logo-container img {
            width: 180px !important;
            margin: 0 !important;
        }

    .form-group-custom {
        margin-bottom: 15px;
    }
}

/* ===== HEIGHT FIX PARA PANTALLAS PEQUENAS ===== */
@media (max-height: 700px) and (max-width: 767.98px) {
    .login-form-wrapper {
        padding: 25px 20px;
    }

    .logo-container {
        margin-bottom: 5px;
    }

        .logo-container img {
            width: 180px !important;
            margin: 5px !important;
        }

    .form-group-custom {
        margin-bottom: 15px;
    }

    .footer-links {
        margin-top: 20px;
        padding-top: 12px;
    }
}
.toggle-password-btn {
    position: absolute;
    right: 12px;
    z-index: 50;
    pointer-events: auto;
}

.input-icon {
    pointer-events: none;
}
