/* Modern Authentication Forms CSS - Digital Document Attestation System */

/* Base Auth Card Styles */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Auth Header Base */
.auth-header {
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.auth-header::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="auth-pattern" patternUnits="userSpaceOnUse" width="20" height="20"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23auth-pattern)"/></svg>');
    pointer-events: none;
}

.auth-header h4 {
    position: relative;
    z-index: 2;
    margin: 0;
    font-weight: 600;
}

.auth-header p {
    position: relative;
    z-index: 2;
}

/* Specific Header Colors */
.auth-header-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-header-register {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-header-forgot {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-header-reset {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-header-change {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-header-profile {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-header-confirm {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Modern Floating Form Controls */
.form-floating-modern {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-floating-modern .form-control {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    padding-left: 3rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.8);
}

.form-floating-modern .form-control:focus {
    background: white;
    box-shadow: 0 0 0 0.2rem rgba(255, 102, 0, 0.1);
}

.form-floating-modern .form-control:focus {
    border-color: var(--primary-color);
}

.form-floating-modern.forgot .form-control:focus {
    border-color: var(--warning-color, #ffc107);
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.1);
}

.form-floating-modern.reset .form-control:focus {
    border-color: var(--info-color, #17a2b8);
    box-shadow: 0 0 0 0.2rem rgba(13, 202, 240, 0.1);
}

.form-floating-modern.change .form-control:focus {
    border-color: #6c757d;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.1);
}

.form-floating-modern .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 3;
    pointer-events: none;
}

.form-floating-modern .form-label {
    position: absolute;
    top: 0.75rem;
    left: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
    pointer-events: none;
    background: transparent;
}

.form-floating-modern .form-control:focus + .form-label,
.form-floating-modern .form-control:not(:placeholder-shown) + .form-label {
    top: -0.5rem;
    left: 2.5rem;
    font-size: 0.75rem;
    background: white;
    padding: 0 0.25rem;
}

.form-floating-modern .form-control:focus + .form-label {
    color: var(--primary-color);
}

.form-floating-modern.forgot .form-control:focus + .form-label {
    color: var(--warning-color, #ffc107);
}

.form-floating-modern.reset .form-control:focus + .form-label {
    color: var(--info-color, #17a2b8);
}

.form-floating-modern.change .form-control:focus + .form-label {
    color: #6c757d;
}

/* Modern Buttons */
.btn-auth {
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 2rem;
    font-weight: 600;
    color: white;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-auth:hover::before {
    left: 100%;
}

.btn-auth-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.btn-auth-register {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.btn-auth-forgot {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.btn-auth-reset {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.btn-auth-change {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.btn-auth-confirm {
    border-radius: var(--border-radius);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-auth-confirm::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-auth-confirm:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-auth-confirm:hover::before {
    left: 100%;
}

.btn-auth-confirm-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: white;
}

.btn-auth-confirm-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
    color: white;
}

/* Remember Me Checkbox */
.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* Password Requirements */
.password-requirements {
    background: rgba(0, 123, 255, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    font-size: 0.85rem;
    color: var(--info-color, #17a2b8);
    margin-top: 0.5rem;
}

/* Info Alert */
.info-alert {
    background: rgba(13, 202, 240, 0.1);
    border: 1px solid rgba(13, 202, 240, 0.3);
    border-radius: var(--border-radius);
    padding: 1rem;
    color: var(--info-color, #17a2b8);
    margin-bottom: 1.5rem;
}

/* Auth Links */
.auth-links a,
.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.auth-links a:hover,
.back-link:hover {
    color: var(--primary-dark, #e55a00);
    text-decoration: underline;
}

.login-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.login-link:hover {
    color: var(--primary-dark, #e55a00);
    text-decoration: underline;
}

/* Section Divider */
.section-divider {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-color) 50%, transparent);
    margin: 1.5rem 0;
}

/* Profile specific styles */
.profile-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 2;
}

.profile-info-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.profile-info-row:hover {
    background: rgba(255, 102, 0, 0.02);
}

.profile-info-row:last-child {
    border-bottom: none;
}

.profile-label {
    font-weight: 600;
    color: var(--text-primary);
}

.profile-value {
    color: var(--text-secondary);
}

.status-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.btn-profile {
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-profile::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-profile:hover::before {
    left: 100%;
}

/* Email Confirmation Styles */
.confirmation-content {
    padding: 2rem;
    text-align: center;
}

.status-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
}

.status-success {
    color: var(--success-color, #28a745);
    animation: pulse 2s infinite;
}

.status-error {
    color: var(--danger-color, #dc3545);
}

.status-info {
    color: var(--info-color, #17a2b8);
    animation: spin 2s linear infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.alert-modern {
    border: none;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.alert-success-modern {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
    border: 1px solid rgba(40, 167, 69, 0.2);
    color: var(--success-color, #28a745);
}

.alert-danger-modern {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: var(--danger-color, #dc3545);
}

.alert-info-modern {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.1) 0%, rgba(13, 202, 240, 0.05) 100%);
    border: 1px solid rgba(13, 202, 240, 0.2);
    color: var(--info-color, #17a2b8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-header {
        padding: 1.5rem;
    }
    
    .auth-header h4 {
        font-size: 1.25rem;
    }
    
    .btn-auth,
    .btn-auth-confirm,
    .btn-profile {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .profile-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .status-icon {
        font-size: 3rem;
    }
}

/* Loading states */
.btn-auth.loading,
.btn-auth-confirm.loading,
.btn-profile.loading {
    pointer-events: none;
    opacity: 0.8;
}

.loading-spinner {
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

/* Form validation styles */
.was-validated .form-control:valid {
    border-color: var(--success-color, #28a745);
}

.was-validated .form-control:invalid {
    border-color: var(--danger-color, #dc3545);
}

/* Focus improvements for accessibility */
.btn-auth:focus,
.btn-auth-confirm:focus,
.btn-profile:focus,
.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(72, 187, 120, 0.25);
}

/* Text color overrides for links */
.text-danger {
    color: var(--danger-color, #dc3545) !important;
}

.text-muted {
    color: var(--text-muted, #6c757d) !important;
}
