/* Authentication Pages Styles - Decka.ai */
/* Anthropic-inspired: Muted, Clean, Minimal */

:root {
    --primary-color: #1a1a1a;
    --primary-dark: #000000;
    --primary-light: #faf9f7;
    --secondary-color: #525252;
    --button-gradient: #1a1a1a;
    --hero-gradient: #faf9f7;
}

/* Auth Page Layout */
.auth-page {
    background: #faf9f7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Auth Container */
.auth-container {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    padding: 2rem 0;
    background: #faf9f7;
}

/* Auth Card - Simple version */
.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
}

/* Auth Header */
.auth-header h1 {
    color: #1a1a1a;
    font-weight: 700;
}

.auth-header p {
    color: var(--secondary-color);
}

/* Brand Logo */
.brand-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-decoration: none;
}

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

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

.divider span {
    background: white;
    padding: 0 1rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Social Login */
.social-login .btn {
    border: 2px solid #e9ecef;
    color: var(--secondary-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-login .btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Auth Footer */
.auth-footer {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-links a {
    font-size: 0.9rem;
}

.auth-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(113, 6, 238, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.auth-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-decoration: none;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

/* Auth Card */
.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(113, 6, 238, 0.1);
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
}

.auth-form-container {
    padding: 3rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.auth-header-content {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Role Selection */
.role-selection h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.role-options {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.role-option {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.role-option:hover {
    border-color: var(--primary-color);
    background: rgba(113, 6, 238, 0.02);
}

.role-option.selected {
    border-color: var(--primary-color);
    background: rgba(113, 6, 238, 0.05);
    box-shadow: 0 4px 12px rgba(113, 6, 238, 0.1);
}

.role-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.role-option.selected .role-icon {
    background: var(--primary-color);
    color: white;
}

.role-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.role-content p {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin: 0;
    line-height: 1.4;
}

/* Auth Form */
.auth-form {
    flex: 1;
}

.form-floating {
    position: relative;
}

.form-floating .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem 0.75rem 0.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-floating .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(113, 6, 238, 0.1);
}

.form-floating label {
    color: var(--secondary-color);
    font-weight: 500;
}

.form-text {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

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

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

.strength-bar {
    height: 100%;
    background: #dc3545;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-bar.weak { background: #dc3545; width: 25%; }
.strength-bar.fair { background: #fd7e14; width: 50%; }
.strength-bar.good { background: #ffc107; width: 75%; }
.strength-bar.strong { background: #198754; width: 100%; }

.strength-text {
    font-size: 0.75rem;
    color: var(--secondary-color);
}

/* Role-specific Fields */
#roleSpecificFields {
    margin-bottom: 1rem;
}

.role-field-group {
    background: rgba(113, 6, 238, 0.02);
    border: 1px solid rgba(113, 6, 238, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.role-field-group h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Form Controls */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

.form-check-label a {
    color: var(--primary-color);
    text-decoration: none;
}

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

/* Buttons */
.btn-primary {
    background: #1a1a1a !important;
    border: 1px solid #1a1a1a !important;
    border-radius: 9999px !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: #ffffff !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    background: #000000 !important;
}

.btn-primary:disabled {
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.btn-primary .btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.btn-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Social Authentication */
.social-auth {
    margin-top: 2rem;
}

.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

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

.divider span {
    background: white;
    padding: 0 1rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.social-btn {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Auth Benefits */
.auth-benefits {
    background: var(--hero-gradient);
    color: white;
    padding: 3rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.auth-benefits::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.benefits-content {
    position: relative;
    z-index: 1;
}

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

.auth-benefits > p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.benefit-list {
    margin-bottom: 2rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.benefit-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.benefit-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.benefit-content p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
    line-height: 1.4;
}

/* Testimonial */
.testimonial {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.testimonial blockquote {
    font-size: 1rem;
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.author-title {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.8;
}

.trust-item i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Success Modal */
.success-icon i {
    font-size: 4rem;
}

/* Error States */
.form-control.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    font-size: 0.875rem;
    color: #dc3545;
    margin-top: 0.25rem;
}

.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
}

.alert-success {
    background: rgba(25, 135, 84, 0.1);
    color: #0f5132;
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 992px) {
    .auth-card {
        margin: 1rem;
    }
    
    .auth-form-container,
    .auth-benefits {
        padding: 2rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .auth-benefits h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .auth-main {
        padding: 1rem 0;
    }
    
    .auth-form-container,
    .auth-benefits {
        padding: 1.5rem;
    }
    
    .role-options {
        gap: 0.75rem;
    }
    
    .role-option {
        padding: 1rem;
    }
    
    .role-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .social-buttons {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .trust-indicators {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .trust-item {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .trust-item i {
        margin-bottom: 0;
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .auth-header .container {
        padding: 0 1rem;
    }
    
    .auth-form-container {
        padding: 1rem;
    }
    
    .auth-benefits {
        padding: 1.5rem 1rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .role-option {
        flex-direction: column;
        text-align: center;
    }
    
    .role-content h4 {
        margin-top: 0.5rem;
    }
    
    .testimonial {
        padding: 1rem;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }
}

/* Focus States for Accessibility */
.role-option:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.form-control:focus {
    outline: none;
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .role-option {
        border-width: 3px;
    }
    
    .form-control {
        border-width: 2px;
    }
    
    .btn-primary {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .role-option,
    .form-control,
    .btn,
    .strength-bar {
        transition: none;
    }
    
    .loading-spinner {
        animation: none;
    }
}
