/* ============================================
   SM-ALERT - Login Page Styles
   ============================================ */

:root {
    --primary: #E85A4F;
    --primary-dark: #D44A3F;
    --secondary: #2C3E50;
    --success: #4CAF50;
    --danger: #F44336;

    --background: #F5F7FA;
    --surface: #FFFFFF;
    --border: #E0E0E0;
    --shadow: rgba(0, 0, 0, 0.1);

    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    --text-inverse: #FFFFFF;
}

[data-theme="dark"] {
    --primary: #E85A4F;
    --primary-dark: #D44A3F;
    --secondary: #34495E;
    --success: #66BB6A;
    --danger: #EF5350;

    --background: #1A1A1A;
    --surface: #2D2D2D;
    --border: #404040;
    --shadow: rgba(0, 0, 0, 0.3);

    --text-primary: #E0E0E0;
    --text-secondary: #B0B0B0;
    --text-inverse: #1A1A1A;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   Contenedor Principal
   ============================================ */

.login-container {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   Lado Izquierdo - Branding
   ============================================ */

.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.login-left::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 80%;
    height: 80%;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
}

.branding {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.brand-logo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 60px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.brand-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.brand-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 48px;
    font-weight: 300;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
}

.feature-item i {
    font-size: 24px;
}

.feature-item span {
    font-size: 16px;
    font-weight: 500;
}

/* ============================================
   Lado Derecho - Formulario
   ============================================ */

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background-color: var(--background);
    position: relative;
}

.theme-toggle-login {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    color: var(--text-primary);
}

.theme-toggle-login:hover {
    background-color: var(--border);
    transform: scale(1.05);
}

.login-form-container {
    width: 100%;
    max-width: 440px;
}

.login-header {
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================
   Alerta
   ============================================ */

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--danger);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.alert i {
    font-size: 18px;
}

/* ============================================
   Formulario
   ============================================ */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    font-size: 16px;
    color: var(--text-secondary);
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background-color: var(--surface);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 90, 79, 0.1);
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    color: var(--text-primary);
}

/* ============================================
   Opciones del Formulario
   ============================================ */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.forgot-password {
    color: var(--primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   Botón Login
   ============================================ */

.btn-login {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(232, 90, 79, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-login .btn-icon {
    transition: transform 0.3s ease;
}

.btn-login:hover .btn-icon {
    transform: translateX(4px);
}

/* ============================================
   Footer
   ============================================ */

.login-footer {
    margin-top: 32px;
    text-align: center;
}

.login-footer p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .login-left {
        display: none;
    }

    .login-right {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .login-right {
        padding: 24px;
    }

    .login-header h2 {
        font-size: 24px;
    }

    .theme-toggle-login {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
}