body { 
    font-family: 'Inter', sans-serif;
}

.loader { 
    border: 4px solid #f3f3f3; 
    border-top: 4px solid #3b82f6; 
    border-radius: 50%; 
    width: 40px; 
    height: 40px; 
    animation: spin 1s linear infinite; 
}

@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

.tab-btn.active { 
    background-color: #374151; 
    color: white; 
    border-color: #6b7280; 
}

.tab-btn { 
    background-color: #1f2937; 
    color: #9ca3af; 
    border-color: transparent; 
}

.auth-toggle-link { 
    color: #60a5fa; 
    cursor: pointer; 
    text-decoration: underline; 
}

.gradient-bg {
    background: linear-gradient(-45deg, #0f172a, #1e1b4b, #312e81, #0c4a6e);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.progress-bar {
    width: 100%;
    background-color: #374151;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 8px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    transition: width 0.3s ease;
}

.queue-item {
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.queue-item.processing {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.queue-item.completed {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.queue-item.failed {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-queued { 
    background-color: #374151; 
    color: #d1d5db; 
}

.status-processing { 
    background-color: #1e40af; 
    color: #dbeafe; 
}

.status-completed { 
    background-color: #059669; 
    color: #d1fae5; 
}

.status-failed { 
    background-color: #dc2626; 
    color: #fecaca; 
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

.chat-message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    max-width: 80%;
}

.chat-message.user {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    margin-left: auto;
    text-align: right;
}

.chat-message.assistant {
    background: rgba(55, 65, 81, 0.8);
    color: #e5e7eb;
    border: 1px solid #4b5563;
}

.chat-container {
    height: 400px;
    overflow-y: auto;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    padding: 1rem;
    background: rgba(31, 41, 55, 0.5);
    backdrop-filter: blur(10px);
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    resize: none;
    padding: 0.75rem;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    background-color: #374151;
    color: white;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #1f2937, #374151);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid #4b5563;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.close-btn:hover {
    color: #ffffff;
    background-color: rgba(239, 68, 68, 0.2);
}

.document-upload-area {
    border: 2px dashed #4b5563;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    background: rgba(31, 41, 55, 0.3);
    transition: all 0.3s;
    cursor: pointer;
}

.document-upload-area:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.document-upload-area.active {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.document-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    border-radius: 9999px;
    font-size: 0.75rem;
    color: #86efac;
}

.code-indicator {
    background: rgba(139, 92, 246, 0.1);
    border-color: #8b5cf6;
    color: #c4b5fd;
}

.rate-limit-notice {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid #eab308;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #fbbf24;
}