
/* ===== 1. RESET Y BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    margin: 0;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.login-container {
    display: flex;
    max-width: 1000px;
    width: 100%;
    min-height: 600px;
    background: #ffffff;
    border-radius: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    overflow: hidden;
    transition: all 0.2s ease;
}

/* ===== PANEL IZQUIERDO - BRANDING ===== */
.login-brand {
    flex: 1;
    background: linear-gradient(145deg, #15222e, #091017);
    color: #fff;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-brand::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

/* ===== ESTILO DEL TEXTO DEL LOGO (SUPERINKA LAB) ===== */
.brand-title {
    font-family: 'Orbitron', Arial, sans-serif;
    font-style: italic;
    font-weight: 900;
    font-size: 2.2rem;
    letter-spacing: -1px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

/* Color Verde Esmeralda (SUPER) */
.text-green {
    background: linear-gradient(180deg, #38a135 0%, #175e18 60%, #0c380e 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.6));
    /* Color de respaldo para navegadores sin soporte */
    color: #38a135;
}

/* Color Dorado Metálico (INKA) */
.text-gold {
    background: linear-gradient(180deg, #fff099 0%, #e5bc3f 45%, #a3751a 85%, #6e4c07 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.6));
    color: #e5bc3f;
}

.text-small {
    font-size: 1.8rem;
}

.brand-subtitle {
    font-size: 0.95rem;
    color: #a0aec0;
    margin-bottom: 2rem;
    font-weight: 400;
}

.brand-features {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.brand-features span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.9rem;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #e2e8f0;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== PANEL DERECHO - FORMULARIO ===== */
.login-form {
    flex: 1;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
    min-width: 300px;
}

.form-header {
    margin-bottom: 2.25rem;
}

.form-header h2 {
    font-size: 1.9rem;
    font-weight: 700;
    color: #0b1a2a;
    letter-spacing: -0.02em;
}

.form-header p {
    color: #64748b;
    margin-top: 0.4rem;
    font-size: 0.95rem;
}

/* ===== GRUPOS DE CAMPO ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.4rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

.input-wrapper input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 3rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.95rem;
    background: #f8fafc;
    transition: border 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: inherit;
}

.input-wrapper input:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
    background: #ffffff;
}

.input-wrapper input::placeholder {
    color: #94a3b8;
}

/* Botón mostrar/ocultar contraseña */
.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.5;
    padding: 4px;
    border-radius: 8px;
    transition: opacity 0.2s, background 0.2s;
    line-height: 1;
}

.toggle-password:hover {
    opacity: 0.9;
    background: rgba(0, 0, 0, 0.04);
}

/* Mensajes de error */
.error-message {
    display: block;
    font-size: 0.8rem;
    color: #e53e3e;
    margin-top: 0.3rem;
    min-height: 1.2rem;
}

.error-message:empty {
    display: none;
}

/* ===== OPCIONES (recordar / olvidé) ===== */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.25rem 0 1.75rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #334155;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #175e18;
    cursor: pointer;
    border-radius: 4px;
}

.forgot-link {
    color: #276749;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #1a4934;
    text-decoration: underline;
}

/* ===== BOTÓN DE INICIO DE SESIÓN ===== */
.btn-login {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #175e18, #0c380e);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(23, 94, 24, 0.3);
}

.btn-login:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d6e1f, #0f4211);
    box-shadow: 0 6px 18px rgba(23, 94, 24, 0.45);
    transform: translateY(-1px);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-text {
    transition: opacity 0.2s;
}

.btn-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-spinner.hidden {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== PIE DE FORMULARIO ===== */
.form-footer {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.9rem;
    color: #475569;
}

.form-footer a {
    color: #276749;
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

.form-version {
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2rem;
    letter-spacing: 0.3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        min-height: auto;
        border-radius: 24px;
    }

    .login-brand {
        padding: 2rem 1.5rem;
    }

    .brand-title {
        font-size: 1.8rem;
    }

    .text-small {
        font-size: 1.4rem;
    }

    .login-form {
        padding: 2rem 1.5rem;
    }

    .form-header h2 {
        font-size: 1.6rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        border-radius: 16px;
    }

    .login-brand,
    .login-form {
        padding: 1.5rem 1rem;
    }

    .input-wrapper input {
        padding: 0.75rem 1rem 0.75rem 2.8rem;
        font-size: 0.9rem;
    }

    .brand-title {
        font-size: 1.4rem;
    }

    .text-small {
        font-size: 1.2rem;
    }
}