/* Authentication Pages Stylesheet */

:root {
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --secondary-color: #f7fafc;
    --text-color: #4a5568;
    --text-light: #718096;
    --text-muted: #a0aec0;
    --success-color: #48bb78;
    --error-color: #c53030;
    --warning-color: #f6ad55;
    --border-color: #e2e8f0;
    --background-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Radio Group Styling */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.radio-option:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.radio-option input[type="radio"] {
    margin-right: 12px;
    margin-top: 0;
    margin-bottom: 0;
    transform: scale(1.2);
    accent-color: var(--primary-color);
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: var(--primary-color);
    font-weight: 600;
}

.radio-option input[type="radio"]:checked {
    border-color: var(--primary-color);
}

.radio-option.selected {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.radio-label {
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-gradient);
    min-height: 100vh;
}

/* Auth Container */
.auth-container {
    display: flex;
    min-height: 100vh;
    padding: 20px;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

.auth-card {
    flex: 1;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.auth-info {
    flex: 1;
    max-width: 600px;
    color: white;
    padding: 40px 20px;
}

.auth-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: white;
}

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

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
}

.auth-tab.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-tab:hover:not(.active) {
    color: var(--text-color);
}

/* Auth Form */
.auth-form {
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

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

.form-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Password Requirements */
.password-requirements {
    margin-top: 10px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.requirement {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--text-light);
}

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

.requirement .check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e2e8f0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.requirement.valid .check {
    background: var(--success-color);
}

.requirement.valid {
    color: var(--success-color);
}

/* Password Match */
.password-match {
    margin-top: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.password-match.valid {
    color: var(--success-color);
}

.password-match.invalid {
    color: var(--error-color);
}

/* Buttons */
.form-actions {
    margin-top: 30px;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

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

.btn-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Messages */
.message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.message.error {
    background: #fed7d7;
    color: var(--error-color);
    border: 1px solid #feb2b2;
}

.message.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message.warning {
    background: #feebc8;
    color: #c05621;
    border: 1px solid #f6ad55;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
}

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

.auth-footer a:hover {
    text-decoration: underline;
}

/* Passkey Info */
.passkey-info {
    text-align: center;
    margin-bottom: 30px;
}

.passkey-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    display: block;
}

.passkey-info h3 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.passkey-info p {
    color: var(--text-light);
}

/* Features Section */
.features {
    display: grid;
    gap: 30px;
    margin-top: 40px;
}

.feature {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.feature h3 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.feature p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Professional Login Styles */
.auth-container-professional {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f8fafc;
}

.auth-card-professional {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    padding: 48px 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.auth-logo {
    text-align: center;
    margin-bottom: 16px;
}

.auth-logo img {
    opacity: 0.9;
}

.server-name {
    text-align: center;
    margin-bottom: 32px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

/* Ensure server name is properly styled in professional container */
.auth-container-professional .server-name {
    text-align: center !important;
    margin-bottom: 32px;
    font-size: 2.5rem !important;
    font-weight: 700;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    display: block;
    width: 100%;
}

.auth-container-professional .auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-container-professional .auth-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.auth-container-professional .auth-tabs {
    margin-bottom: 24px;
    background: #f1f5f9;
    padding: 3px;
}

.auth-container-professional .btn-primary {
    background: #2563eb;
    font-weight: 500;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: 8px;
}

.auth-container-professional .btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.auth-container-professional .form-hint.center {
    text-align: center;
    margin-top: 16px;
    font-size: 0.875rem;
    color: #64748b;
}

.auth-container-professional .auth-footer {
    margin-top: 32px;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.auth-container-professional .auth-footer p {
    margin: 8px 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.auth-container-professional .auth-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.auth-container-professional .auth-footer a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.auth-container-professional .forgot-link {
    font-weight: 400 !important;
}

.auth-container-professional .message {
    margin-top: 20px;
    font-size: 0.875rem;
    padding: 12px 16px;
    border-radius: 8px;
}

.auth-container-professional .form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.auth-container-professional .form-group input {
    padding: 10px 14px;
    font-size: 0.95rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.auth-container-professional .form-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Captcha Styles */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.captcha-question {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    background: #f1f5f9;
    padding: 12px 20px;
    border-radius: 8px;
    white-space: nowrap;
    min-width: 120px;
    text-align: center;
}

.captcha-container input {
    flex: 1;
    max-width: 150px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .auth-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .auth-info {
        order: -1;
        text-align: center;
        max-width: none;
    }
    
    .auth-info h2 {
        font-size: 2rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 15px;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-header h1 {
        font-size: 1.7rem;
    }
    
    .auth-info h2 {
        font-size: 1.7rem;
    }
    
    .btn {
        padding: 14px 20px;
    }
    
    .auth-container-professional {
        padding: 15px;
    }
    
    .auth-card-professional {
        padding: 32px 24px;
    }
}