@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #4361ee;
    --primary-hover: #3451d6;
    --primary-light: rgba(67, 97, 238, 0.08);
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --light-bg: #f8fafc;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--light-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 18px; /* Base font size aumentado */
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    width: 100%;
    background: var(--light-bg);
}

.login-sidebar {
    background-image: url('https://images.unsplash.com/photo-1587854692152-cbe660dbde88?q=80&w=2069&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    position: relative;
    display: none;
}

.login-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.85) 0%, rgba(30, 41, 59, 0.9) 100%);
}

.login-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    background-color: var(--white);
}

@media (min-width: 768px) {
    .login-sidebar {
        display: block;
        flex: 1;
        width: 50%;
    }
    .login-main {
        width: 50%;
        flex: 1;
    }
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 3rem;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.25);
}

.logo-icon i {
    font-size: 2rem;
    color: var(--white);
}

.login-form-content {
    width: 100%;
    max-width: 440px;
}

.brand-title {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 2.5rem; /* Aumentado de 2rem */
    margin-bottom: 0.75rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.brand-title .highlight {
    color: var(--primary-color);
    display: block;
}

.brand-subtitle {
    color: var(--text-muted);
    font-size: 1.125rem; /* Aumentado de 1rem */
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Form Styling */
.form-group {
    margin-bottom: 1.75rem; /* Aumentado de 1.5rem */
    position: relative;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1.125rem; /* Aumentado de 0.875rem */
    letter-spacing: -0.01em;
}

.form-label .required {
    color: var(--danger-color);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem; /* Aumentado padding */
    font-size: 1.125rem; /* Aumentado de 1rem */
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--white);
    color: var(--text-dark);
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-control::placeholder {
    color: #94a3b8;
    font-size: 1.0625rem; /* Aumentado de 0.9375rem */
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-control:disabled {
    background-color: var(--light-bg);
    cursor: not-allowed;
}

/* Password Input with Toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 3.5rem;
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 52px; /* Aumentado de 48px */
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.password-toggle i {
    font-size: 1.375rem; /* Aumentado de 1.125rem */
}

/* Form Text (Helper Text) */
.form-text {
    display: block;
    margin-top: 0.625rem;
    font-size: 1rem; /* Aumentado de 0.8125rem */
    color: var(--text-muted);
    line-height: 1.5;
}

.form-text i {
    margin-right: 4px;
}

/* Form Validation States */
.form-control.is-valid {
    border-color: var(--success-color);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback,
.valid-feedback {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
}

.invalid-feedback {
    color: var(--danger-color);
}

.valid-feedback {
    color: var(--success-color);
}

/* Remember Me & Forgot Password Row */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-check-label {
    font-size: 1.0625rem; /* Aumentado de 0.875rem */
    color: var(--text-dark);
    cursor: pointer;
    user-select: none;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.0625rem; /* Aumentado de 0.875rem */
    font-weight: 500;
    transition: all 0.2s;
}

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

/* Submit Button */
.btn-primary-custom {
    width: 100%;
    padding: 1.125rem 1.5rem; /* Aumentado padding */
    background: linear-gradient(135deg, var(--primary-color), #5e72eb);
    border: none;
    border-radius: 10px;
    color: var(--white);
    font-weight: 600;
    font-size: 1.375rem; /* Aumentado de 1.125rem */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.25);
    letter-spacing: -0.01em;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.35);
    background: linear-gradient(135deg, var(--primary-hover), #5264d4);
}

.btn-primary-custom:active {
    transform: translateY(0);
}

.btn-primary-custom:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    border: none;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.125rem; /* Aumentado de 0.9375rem */
    line-height: 1.6;
}

.alert i {
    font-size: 1.375rem; /* Aumentado de 1.125rem */
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.alert-info {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Footer Text */
.footer-text {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 1rem; /* Aumentado de 0.8125rem */
    text-align: center;
    line-height: 1.6;
}

/* Loading State */
.btn-primary-custom.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-primary-custom.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 767px) {
    .login-main {
        padding: 2rem 1.5rem;
    }
    
    .brand-title {
        font-size: 1.75rem;
    }
    
    .logo-section {
        margin-bottom: 2rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}
