/* Login Page - Split Layout with Theme Support */

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: rgba(59, 130, 246, 0.1);
    --danger: #ef4444;
    --success: #22c55e;
    --input-bg: #0f172a;
    --input-border: #334155;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.light-theme {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: rgba(59, 130, 246, 0.05);
    --danger: #ef4444;
    --success: #22c55e;
    --input-bg: #f8fafc;
    --input-border: #cbd5e1;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* Left Panel - Branding */
.login-branding {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.login-branding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.branding-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.brand-icon {
    font-size: 2.5rem;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.025em;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.brand-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.brand-footer {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Right Panel - Form */
.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.theme-toggle {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--accent-light);
    border-color: var(--accent);
}

.theme-icon {
    font-size: 1.25rem;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.form-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.form-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.btn-login {
    background: var(--accent);
    color: #ffffff;
    border: none;
    padding: 0.875rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.btn-login:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Alert */
.alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

/* Contraste de los avisos en tema claro */
.light-theme .alert-success {
    color: #15803d;
}

.light-theme .alert-warning {
    color: #b45309;
}

/* Recuperación de contraseña */
.back-link {
    text-align: center;
    margin-top: 1rem;
}

.forgot-link {
    color: var(--accent);
    font-size: 0.875rem;
    text-decoration: none;
}

.forgot-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 992px) {
    .login-container {
        grid-template-columns: 1fr;
    }

    .login-branding {
        display: none;
    }

    .login-form-panel {
        padding: 2rem 1.5rem;
    }
}
