/*Ubicacion: frontend/css/login.css*/

:root {
    --dark-bg: #0f172a;   
    --darker-bg: #020617; 
    --panel-bg: #ffffff;     
    --text-main: #1e293b; 
    --text-muted: #64748b;   
    --accent-color: #334155; 
    --accent-hover: #0f172a; 
    --border-color: #e2e8f0;  
    --focus-ring: rgba(15, 23, 42, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body, html { height: 100%; width: 100%; overflow: hidden; }

.enterprise-layout {
    display: flex;
    height: 100vh;
    width: 100%;
}

.visual-panel {
    flex: 1.4; 
    position: relative;
    background-color: var(--darker-bg);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 80px;
    overflow: hidden;
}


.dynamic-bg {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(
        45deg,
        #0f172a 0%,
        #1e1b4b 25%,
        #172554 50%,
        #0f172a 100%
    );
    background-size: 400% 400%;
    animation: gradientFlow 20s ease infinite;
    z-index: 1;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.visual-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 2;
}

.brand-container {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}
.brand-logo i { font-size: 28px; opacity: 0.8; }

.brand-message h2 {
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700; 
    margin-bottom: 20px;
    opacity: 0.95;
}

.brand-message p {
    font-size: 18px;
    color: #94a3b8; 
    font-weight: 300;
    max-width: 500px;
}

.system-status {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 3px solid #10b981; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 400px;
}

.status-indicator {
    display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600;
}

.dot.online {
    width: 8px; height: 8px; background: #10b981; border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

.server-info p { font-size: 11px; color: #64748b; margin: 0; text-align: right; }

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }


.login-panel {
    flex: 1;
    background: var(--panel-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-content {
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.login-header { margin-bottom: 40px; }
.login-header h3 { font-size: 28px; font-weight: 700; color: var(--text-main); margin-bottom: 8px; letter-spacing: -0.5px; }
.login-header p { color: var(--text-muted); font-size: 15px; }

.form-group { margin-bottom: 25px; }
.form-group label {
    display: block; font-size: 12px; font-weight: 600;
    color: var(--text-main); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px;
}

.input-box { position: relative; }
.input-box i {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    font-size: 18px; color: #94a3b8; transition: 0.3s;
}
.input-box input {
    width: 100%; padding: 14px 14px 14px 45px;
    border: 1px solid var(--border-color);
    border-radius: 6px; 
    font-size: 15px; color: var(--text-main);
    transition: all 0.2s ease; background: #f8fafc;
}

.input-box input:focus {
    background: white; border-color: var(--text-main);
    box-shadow: 0 0 0 4px var(--focus-ring); outline: none;
}
.input-box input:focus + i { color: var(--text-main); }

.btn-corporate {
    width: 100%; padding: 14px;
    background: var(--accent-color);
    color: white; border: none; border-radius: 6px;
    font-size: 15px; font-weight: 600;
    cursor: pointer; transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-top: 10px;
}

.btn-corporate:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.security-notice {
    margin-top: 30px; padding: 15px;
    background: #f8fafc; border-radius: 8px; border: 1px solid #e2e8f0;
    display: flex; gap: 12px;
}
.security-notice i { font-size: 20px; color: #64748b; flex-shrink: 0; }
.security-notice p { font-size: 11px; color: #64748b; line-height: 1.5; }

.login-footer {
    margin-top: 30px; text-align: center;
    display: flex; justify-content: center; gap: 10px;
}
.login-footer a { color: #94a3b8; text-decoration: none; font-size: 12px; transition: 0.2s; }
.login-footer a:hover { color: var(--text-main); text-decoration: underline; }
.login-footer span { color: #e2e8f0; font-size: 12px; }

.loader { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite; display: none; }
.btn-corporate.loading span, .btn-corporate.loading i { display: none; }
.btn-corporate.loading .loader { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
    .enterprise-layout {
        flex-direction: column;
        height: 100vh; 
        min-height: 600px; 
        background-color: var(--panel-bg);
    }
    
    .visual-panel {
        flex: none;
        width: 100%;
        height: 240px;
        padding: 40px 30px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .brand-message, .system-status, .visual-overlay { display: none; }
    
    .brand-container {
        position: relative;
        z-index: 10;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center; 
        align-items: center;  
        text-align: center;  
        gap: 40px;
    }

    .brand-logo {
        justify-content: center;
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .login-panel {
        flex: 1; 
        width: 100%;
        padding: 30px;
        display: flex;
        justify-content: center;
        align-items: center; 
        background: transparent;
    }

    .login-content {
        width: 100%;
        max-width: 450px;
        background: #ffffff;
        padding: 40px;
        border-radius: 20px;
        box-shadow: 0 20px 50px -20px rgba(0,0,0,0.15); 
        border: 1px solid var(--border-color);
        z-index: 10;
    }

    .login-header h3 { font-size: 24px; text-align: center; }
    .login-header p { text-align: center; }
}

@media (max-width: 1024px) {
    .brand-hero-text h1 { font-size: 42px; }
    .brand-section { padding: 40px; }
}

@media (max-width: 768px) {
    body, html {
        overflow-y: auto !important;
        height: auto !important;
    }

    .visual-panel{
        height: 180px;
    }

    .enterprise-layout {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }
    
    .login-panel {
        padding-bottom: 60px;
    }

    .split-screen-container { 
        flex-direction: column; 
        height: auto;  
        background: #f8fafc; 
    }
    
    .brand-section {
        flex: none;
        height: 220px;
        padding: 30px 20px;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .brand-message, .system-status, .brand-footer { display: none; }
    .brand-features { display: none; }
    
    .brand-logo {
        font-size: 24px;
        margin-bottom: 0;
    }
    
    .form-section {
        flex: 1;
        padding: 0 20px 40px 20px;
        align-items: flex-start; 
        background: transparent;
        margin-top: -40px; 
        z-index: 10;
    }
    
    .login-box {
        background: white;
        padding: 30px 25px;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
        width: 100%;
    }
    
    .login-header h3 { font-size: 22px; text-align: center; }
    .login-header p { text-align: center; font-size: 14px; }
    
    .input-group-enterprise { margin-bottom: 20px; }
    .input-field-wrapper input { padding: 14px 14px 14px 45px; font-size: 14px; }
    
    .form-footer-legal { margin-top: 25px; }
}