/* static/css/accounts/auth.css */

:root {
    --primary: #667eea;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #0f172a;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Auth Wrapper */
.auth-wrapper {
    min-height: calc(100vh - 80px);
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: fixed;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    pointer-events: none;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.auth-container {
    position: relative;
    z-index: 1;
    padding: 3rem 0;
}

/* Login Grid Layout */
.auth-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 2rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Branding Section */
.auth-branding {
    background: var(--gradient-primary);
    padding: 4rem 3rem;
    display: flex;
    align-items: center;
    color: white;
}

.branding-content {
    width: 100%;
}

.brand-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

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

.auth-branding h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.auth-branding p {
    opacity: 0.95;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.benefit-item i {
    font-size: 1.25rem;
}

/* Form Section */
.auth-form-section {
    padding: 4rem 3rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.form-icon i {
    font-size: 2rem;
    color: white;
}

.form-header h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
    margin: 0;
}

/* Form Styling */
.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    color: #64748b;
    font-size: 1.1rem;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: var(--transition);
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-wrapper input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-wrapper label {
    margin: 0;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
}

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

.forgot-link:hover {
    color: #5568d3;
}

.error-message {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--danger);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.form-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.form-footer p {
    margin: 0;
    color: #64748b;
}

.form-footer a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.trust-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    color: #64748b;
    font-size: 0.9rem;
}

/* Register Specific Styles */
.register-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 2rem;
    padding: 4rem 3rem;
    box-shadow: var(--shadow-lg);
}

.register-header {
    text-align: center;
    margin-bottom: 3rem;
}

.header-icon {
    width: 90px;
    height: 90px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.header-icon i {
    font-size: 3rem;
    color: white;
}

.register-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.register-header p {
    color: #64748b;
    font-size: 1.1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.optional {
    color: #64748b;
    font-weight: 400;
    font-size: 0.9rem;
}

/* Password Strength */
.password-strength {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin-top: 0.75rem;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    border-radius: 3px;
    transition: var(--transition);
    width: 0%;
}

.strength-bar.weak {
    background: var(--danger);
    width: 33%;
}

.strength-bar.medium {
    background: #f59e0b;
    width: 66%;
}

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

.password-hint {
    color: #64748b;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.terms-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: start;
}

.terms-wrapper input {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.terms-wrapper label {
    margin: 0;
    font-weight: 400;
    color: #64748b;
    line-height: 1.6;
}

.terms-wrapper a {
    color: var(--primary);
    text-decoration: none;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.benefit-card {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    color: var(--success);
    font-weight: 600;
}

.benefit-card i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .auth-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-branding {
        padding: 3rem 2rem;
    }
}

@media (max-width: 767.98px) {
    .auth-container {
        padding: 2rem 0;
    }
    
    .auth-form-section,
    .register-card {
        padding: 2.5rem 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Add these styles to static/css/accounts/auth.css */

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    background: #f8f9fa;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e9ecef;
}

.strength-visual {
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    width: 0%;
}

.strength-visual.weak {
    background: #ef4444;
    width: 33%;
}

.strength-visual.medium {
    background: #f59e0b;
    width: 66%;
}

.strength-visual.strong {
    background: #11998e;
    width: 100%;
}

.strength-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
}

.strength-bar.weak .strength-text {
    color: #ef4444;
}

.strength-bar.medium .strength-text {
    color: #f59e0b;
}

.strength-bar.strong .strength-text {
    color: #11998e;
}

/* Password Requirements */
.password-requirements {
    background: #f8f9fa;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    border: 1px solid #e9ecef;
}

.requirement {
    display: flex;
    align-items: center;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    gap: 0.5rem;
}

.requirement:last-child {
    margin-bottom: 0;
}

.requirement .bi {
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.requirement-met {
    color: #11998e;
}

.requirement-met .bi {
    color: #11998e;
}

.requirement-unmet {
    color: #6c757d;
}

.requirement-unmet .bi {
    color: #6c757d;
}

/* Loading States */
.btn-submit.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-submit .btn-loading {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loading {
    display: inline-flex;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Password Toggle Button */
.toggle-password-btn {
    background: none;
    border: none;
    color: #6c757d;
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.toggle-password-btn:hover {
    color: #11998e;
}

.toggle-password-btn:focus {
    outline: none;
    color: #11998e;
}

/* Error States */
.is-invalid {
    border-color: #ef4444 !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message .bi {
    font-size: 0.875rem;
}

/* Form Animations */
.form-group {
    transition: all 0.3s ease;
}

.form-group:focus-within {
    transform: translateY(-1px);
}