/* Authentication Pages Styles */

/* Base Auth Layout */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.auth-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.auth-header h2 {
    margin: 0;
    font-weight: 700;
    font-size: 1.8rem;
}

.auth-header p {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.auth-body {
    padding: 2rem;
}

/* Form Styles */
.auth-form .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.auth-form .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

.auth-form .form-control {
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fff;
}

.auth-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.auth-form .form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.auth-form .form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

/* Input Groups */
.input-group {
    border-radius: 12px;
    overflow: hidden;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.input-group .form-control:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.input-group-text {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    color: #6c757d;
    font-weight: 500;
}

.input-group:focus-within .input-group-text {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

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

.password-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: #e9ecef;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

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

.password-strength-fill.weak {
    width: 25%;
    background: #dc3545;
}

.password-strength-fill.fair {
    width: 50%;
    background: #ffc107;
}

.password-strength-fill.good {
    width: 75%;
    background: #17a2b8;
}

.password-strength-fill.strong {
    width: 100%;
    background: #28a745;
}

.password-strength-text {
    font-size: 0.8rem;
    font-weight: 500;
}

.password-strength-text.weak {
    color: #dc3545;
}

.password-strength-text.fair {
    color: #ffc107;
}

.password-strength-text.good {
    color: #17a2b8;
}

.password-strength-text.strong {
    color: #28a745;
}

/* Validation Messages */
.invalid-feedback {
    display: block;
    font-size: 0.8rem;
    color: #dc3545;
    margin-top: 0.25rem;
    font-weight: 500;
}

.valid-feedback {
    display: block;
    font-size: 0.8rem;
    color: #28a745;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Checkboxes */
.form-check {
    margin-bottom: 1rem;
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-check-label {
    font-size: 0.9rem;
    color: #495057;
    margin-left: 0.5rem;
}

.form-check-label a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Buttons */
.auth-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white;
}

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

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

.auth-btn .spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

/* Social Buttons */
.social-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    background: white;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}

.social-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-btn i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* Links */
.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.auth-footer p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Features Section */
.auth-features {
    background: #f8f9fa;
    padding: 2rem;
    border-top: 1px solid #e9ecef;
}

.auth-features h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.feature-item i {
    color: #28a745;
    margin-right: 0.75rem;
    font-size: 1rem;
}

/* Statistics */
.auth-stats {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.auth-stats h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
}

.stat-value {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

/* Security Notice */
.security-notice {
    background: rgba(23, 162, 184, 0.1);
    border: 1px solid rgba(23, 162, 184, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.security-notice i {
    color: #17a2b8;
    margin-right: 0.5rem;
}

.security-notice p {
    margin: 0;
    font-size: 0.85rem;
    color: #495057;
}

/* Email Verification Modal */
.verification-modal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.verification-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
}

.verification-modal .modal-body {
    padding: 2rem;
    text-align: center;
}

.verification-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        margin: 0;
        border-radius: 16px;
    }
    
    .auth-header {
        padding: 1.5rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .auth-body {
        padding: 1.5rem;
    }
    
    .auth-features {
        padding: 1.5rem;
    }
    
    .auth-footer {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .auth-header h2 {
        font-size: 1.3rem;
    }
    
    .auth-body {
        padding: 1rem;
    }
    
    .auth-features {
        padding: 1rem;
    }
    
    .auth-footer {
        padding: 1rem;
    }
    
    .form-control {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .auth-btn {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .auth-card {
        background: rgba(45, 55, 72, 0.95);
        color: #e2e8f0;
    }
    
    .auth-body {
        background: #2d3748;
    }
    
    .form-control {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .form-control:focus {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .form-label {
        color: #e2e8f0;
    }
    
    .auth-features {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .auth-footer {
        background: #4a5568;
        color: #a0aec0;
    }
    
    .auth-stats {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .stat-label {
        color: #a0aec0;
    }
    
    .stat-value {
        color: #e2e8f0;
    }
    
    .auth-divider span {
        background: #2d3748;
        color: #a0aec0;
    }
}

/* Loading Animation */
.auth-loading {
    position: relative;
    overflow: hidden;
}

.auth-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Success Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #28a745;
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px #28a745;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.success-checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #28a745;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #28a745;
    }
}