/* Client Authentication Styles */

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

.client-auth-body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Background Elements */
.bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.bg-circle-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.bg-circle-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.bg-circle-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* Auth Container */
.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    padding: 1rem;
}

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

/* Auth Header */
.auth-header {
    background: linear-gradient(135deg, #2c5aa0, #34495e);
    color: white;
    padding: 1.5rem;
    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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.logo-section {
    position: relative;
    z-index: 2;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

/* Auth Body */
.auth-body {
    padding: 1.5rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-title i {
    color: #3498db;
}

/* Form Styles */
.auth-form {
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: #7f8c8d;
    width: 16px;
}

.form-control {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

.form-control.is-invalid {
    border-color: #e74c3c;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

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

.password-toggle {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

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

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: 0;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::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:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 1rem 1.75rem;
    font-size: 1rem;
}

/* Alert Styles */
.alert {
    padding: 0.875rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.alert i {
    font-size: 1.1rem;
}

/* Invalid Feedback */
.invalid-feedback {
    display: block;
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Auth Links */
.auth-links {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.link-group {
    margin-bottom: 1rem;
}

.link-group:last-child {
    margin-bottom: 0;
}

.auth-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: #2980b9;
    background: rgba(52, 152, 219, 0.1);
    text-decoration: none;
}

.auth-link.secondary {
    color: #7f8c8d;
}

.auth-link.secondary:hover {
    color: #2c3e50;
    background: rgba(127, 140, 141, 0.1);
}

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

.footer-info p {
    margin: 0 0 1rem 0;
    color: #7f8c8d;
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-link {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #3498db;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 0.75rem;
        max-width: 100%;
    }
    
    .auth-card {
        border-radius: 16px;
    }
    
    .auth-header,
    .auth-body {
        padding: 1.25rem;
    }
    
    .auth-header h1 {
        font-size: 1.2rem;
    }
    
    .auth-title {
        font-size: 1.2rem;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .bg-circle-1 {
        width: 150px;
        height: 150px;
    }
    
    .bg-circle-2 {
        width: 100px;
        height: 100px;
    }
    
    .bg-circle-3 {
        width: 80px;
        height: 80px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 0.5rem;
    }
    
    .auth-header,
    .auth-body,
    .auth-footer {
        padding: 1rem;
    }
    
    .form-control {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 0.875rem 1.25rem;
    }
    
    .logo-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Loading Animation */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus Accessibility */
.form-control:focus,
.btn:focus,
.auth-link:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .auth-card {
        background: white;
        border: 2px solid #2c3e50;
    }
    
    .form-control {
        border-width: 2px;
    }
    
    .btn-primary {
        background: #2c3e50;
    }
}
