/* Authentication Page Styles */
:root {
    --auth-primary: #2563eb;
    --auth-primary-hover: #1d4ed8;
    --auth-secondary: #64748b;
    --auth-success: #10b981;
    --auth-danger: #ef4444;
    --auth-warning: #f59e0b;
    --auth-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --auth-card-bg: #ffffff;
    --auth-text-primary: #1e293b;
    --auth-text-secondary: #64748b;
    --auth-border: #e2e8f0;
    --auth-input-focus: #3b82f6;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--auth-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
}

.auth-card {
    background: var(--auth-card-bg);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--auth-bg);
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--auth-primary);
    margin-bottom: 20px;
}

.brand-logo i {
    font-size: 2rem;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--auth-text-primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--auth-text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* Form Styles */
.auth-form {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--auth-text-primary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-label i {
    color: var(--auth-text-secondary);
    font-size: 0.9rem;
}

.optional {
    color: var(--auth-text-secondary);
    font-weight: 400;
    font-size: 0.8rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--auth-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--auth-input-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.form-control.is-valid {
    border-color: var(--auth-success);
}

.invalid-feedback {
    display: none;
    color: var(--auth-danger);
    font-size: 0.875rem;
    margin-top: 5px;
}

.form-control.is-invalid + .invalid-feedback {
    display: block;
}

/* Password Input */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-secondary);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

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

/* Password Strength */
.password-strength {
    margin-top: 8px;
    display: none;
}

.password-strength.show {
    display: block;
}

.strength-bar {
    height: 4px;
    background: var(--auth-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 25%;
    background: var(--auth-danger);
}

.strength-fill.fair {
    width: 50%;
    background: var(--auth-warning);
}

.strength-fill.good {
    width: 75%;
    background: var(--auth-primary);
}

.strength-fill.strong {
    width: 100%;
    background: var(--auth-success);
}

.strength-text {
    font-size: 0.8rem;
    color: var(--auth-text-secondary);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid var(--auth-border);
    border-radius: 4px;
    cursor: pointer;
}

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

.form-check-label {
    font-size: 0.9rem;
    color: var(--auth-text-secondary);
    cursor: pointer;
    margin: 0;
}

.form-check-group {
    margin-bottom: 30px;
}

.form-check-group .form-check {
    margin-bottom: 12px;
}

.forgot-password {
    color: var(--auth-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

/* Buttons */
.btn-auth {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 25px;
    position: relative;
}

.btn-primary {
    background: var(--auth-primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--auth-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Social Auth */
.auth-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: var(--auth-text-secondary);
    font-size: 0.9rem;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--auth-border);
    z-index: 1;
}

.auth-divider span {
    background: var(--auth-card-bg);
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

.social-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
}

.btn-social {
    padding: 12px;
    border: 2px solid var(--auth-border);
    background: white;
    color: var(--auth-text-secondary);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-social:hover {
    border-color: var(--auth-primary);
    color: var(--auth-primary);
    transform: translateY(-1px);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    color: var(--auth-text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

.auth-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.auth-link:hover {
    color: var(--auth-primary-hover);
}

/* Alert Messages */
.alert-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 400px;
}

.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: slideInDown 0.3s ease;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.alert-info {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

@keyframes slideInDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .auth-card {
        padding: 30px 25px;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .social-auth {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 25px 20px;
    }
    
    .brand-logo {
        font-size: 1.5rem;
    }
    
    .brand-logo i {
        font-size: 1.7rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
}