/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #0f1419;
    background: #ffffff;
    min-height: 100vh;
}

/* Common utilities */
.hidden {
    display: none !important;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: #1d9bf0;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(29, 155, 240, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: #1a8cd8;
    box-shadow: 0 4px 8px rgba(29, 155, 240, 0.4);
}

.btn-secondary {
    background: #536471;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(83, 100, 113, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    background: #495a69;
    box-shadow: 0 4px 8px rgba(83, 100, 113, 0.4);
}

.btn-danger {
    background: #f4212e;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(244, 33, 46, 0.3);
}

.btn-danger:hover:not(:disabled) {
    background: #dc1e2b;
    box-shadow: 0 4px 8px rgba(244, 33, 46, 0.4);
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #cfd9de;
    border-top: 4px solid #1d9bf0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    box-sizing: border-box;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid #cfd9de;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    box-sizing: border-box;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Login page styles */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 480px;
}

.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo h1 {
    color: #0f1419;
    margin-bottom: 8px;
    font-size: 2rem;
    font-weight: 700;
}

.logo p {
    color: #536471;
    font-size: 1.1rem;
    font-weight: 500;
}

.login-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #0f1419;
    font-size: 16px;
}

.form-group input {
    width: 100%;
    padding: 16px;
    border: 2px solid #cfd9de;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #0f1419;
}

.form-group input:focus {
    outline: none;
    border-color: #1d9bf0;
    box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.15);
    background: #ffffff;
}

.info-note {
    background: #e3f2fd;
    border: 2px solid #42a5f5;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.1);
}

.info-note p {
    color: #0d47a1;
    margin: 0;
    font-weight: 500;
    line-height: 1.5;
}

.loading {
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading p {
    margin-top: 16px;
    color: #424242;
    font-weight: 500;
}

.error-message {
    background: #ffebee;
    border: 2px solid #e57373;
    color: #c62828;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.1);
}

/* App layout */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: #ffffff;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 3px solid #eff3f4;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 2px solid #eff3f4;
    background: #ffffff;
}

.sidebar-header h2 {
    color: #0f1419;
    font-size: 1.25rem;
    font-weight: 700;
}

.user-info {
    padding: 20px;
    border-bottom: 2px solid #eff3f4;
    background: #ffffff;
}

.user-details p {
    margin-bottom: 12px;
    color: #536471;
    font-size: 14px;
    font-weight: 500;
}

.user-details span {
    color: #0f1419;
    font-weight: 700;
    word-break: break-all;
    display: block;
    margin-top: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: #536471;
    text-decoration: none;
    transition: all 0.2s ease;
    margin: 4px 12px;
    border-radius: 25px;
    font-weight: 500;
}

.nav-item:hover {
    background: #f7f9fa;
    color: #0f1419;
    transform: translateX(4px);
}

.nav-item.active {
    background: #1d9bf0;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(29, 155, 240, 0.3);
}

.nav-icon {
    margin-right: 12px;
    font-size: 1.1rem;
}

.sidebar-actions {
    padding: 20px;
    border-top: 2px solid #eff3f4;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
}

.sidebar-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
}

/* Main content */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
}

/* Chat styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.chat-header {
    background: #ffffff;
    padding: 24px 32px;
    border-bottom: 3px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chat-header h3 {
    color: #0d47a1;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 1.5rem;
}

.chat-header p {
    color: #424242;
    font-weight: 500;
}

.chat-messages {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background: #fafafa;
}

.message {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

.message.user-message {
    align-items: flex-end;
}

.message.system-message .message-content {
    background: #e8f5e8;
    border: 2px solid #81c784;
    color: #2e7d32;
}

.message.user-message .message-content {
    background: #1976d2;
    color: white;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.message.assistant-message .message-content {
    background: white;
    border: 2px solid #e0e0e0;
    color: #1a202c;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-content {
    max-width: 80%;
    padding: 20px 24px;
    border-radius: 20px;
    word-wrap: break-word;
    font-weight: 500;
    line-height: 1.6;
}

.message-content p {
    margin-bottom: 12px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* Markdown styling in chat messages */
.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4,
.message-content h5,
.message-content h6 {
    margin: 16px 0 8px 0;
    font-weight: 700;
    line-height: 1.3;
}

.message-content h1 { font-size: 1.5em; }
.message-content h2 { font-size: 1.3em; }
.message-content h3 { font-size: 1.2em; }
.message-content h4 { font-size: 1.1em; }

.message-content ul,
.message-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.message-content li {
    margin: 4px 0;
}

.message-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.message-content th,
.message-content td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.message-content th {
    font-weight: 600;
    background-color: #f5f5f5;
}

.message-content code {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.message-content pre {
    background-color: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
}

.message-content pre code {
    background: none;
    padding: 0;
}

.message-content blockquote {
    border-left: 4px solid #1d9bf0;
    padding-left: 16px;
    margin: 12px 0;
    font-style: italic;
    opacity: 0.8;
}

.message-content strong {
    font-weight: 700;
}

.message-content em {
    font-style: italic;
}

.message-time {
    font-size: 12px;
    color: #757575;
    margin-top: 8px;
    padding: 0 8px;
    font-weight: 500;
}

.chat-input-container {
    background: white;
    padding: 24px 32px;
    border-top: 3px solid #e0e0e0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.input-group {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.input-group input {
    flex: 1;
    padding: 18px;
    border: 2px solid #bbdefb;
    border-radius: 16px;
    font-size: 16px;
    resize: none;
    min-height: 24px;
    max-height: 120px;
    background: #ffffff;
    color: #1a202c;
    font-weight: 500;
}

.input-group input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
    background: #f8fbff;
}

/* Upload styles */
.upload-container {
    padding: 32px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.upload-header {
    text-align: center;
    margin-bottom: 40px;
}

.upload-header h3 {
    color: #0d47a1;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 1.75rem;
}

.upload-header p {
    color: #424242;
    font-weight: 500;
    font-size: 1.1rem;
}

.upload-area {
    border: 4px dashed #90caf9;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    background: #ffffff;
    transition: all 0.3s ease;
    margin-bottom: 32px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.1);
}

.upload-area:hover {
    border-color: #1976d2;
    background: #f3f8ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(25, 118, 210, 0.2);
}

.upload-area.dragover {
    border-color: #1976d2;
    background: #e3f2fd;
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(25, 118, 210, 0.3);
}

.upload-content h4 {
    color: #0d47a1;
    margin: 20px 0 12px 0;
    font-weight: 700;
    font-size: 1.5rem;
}

.upload-content p {
    color: #424242;
    margin: 16px 0;
    font-weight: 500;
    font-size: 1.1rem;
}

.upload-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    color: #1976d2;
}

.upload-info {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #e0e0e0;
}

.upload-info p {
    color: #424242;
    font-size: 15px;
    margin: 10px 0;
    font-weight: 500;
}

.file-list {
    background: white;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 28px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.file-list h4 {
    margin-bottom: 20px;
    color: #0d47a1;
    font-weight: 700;
    font-size: 1.25rem;
}

.no-files {
    color: #757575;
    text-align: center;
    font-style: italic;
    font-weight: 500;
    padding: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f5f5f5;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 2px solid #e8eaf6;
    transition: all 0.2s ease;
}

.file-item:hover {
    background: #e8f5e8;
    border-color: #81c784;
    transform: translateY(-1px);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.file-icon {
    font-size: 2rem;
    color: #1976d2;
}

.file-details h5 {
    margin: 0;
    color: #0d47a1;
    font-weight: 600;
    font-size: 16px;
}

.file-size {
    color: #424242;
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
}

.remove-file {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background: #c62828;
    transform: scale(1.05);
}

.upload-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
}

.upload-progress {
    background: white;
    border-radius: 16px;
    padding: 28px;
    border: 2px solid #e0e0e0;
    margin-bottom: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e8eaf6;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1976d2 0%, #42a5f5 100%);
    transition: width 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.3);
}

.progress-text {
    text-align: center;
    color: #424242;
    margin: 0;
    font-weight: 600;
    font-size: 16px;
}

.upload-results {
    background: white;
    border-radius: 16px;
    padding: 28px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-success {
    color: #2e7d32;
    padding: 20px;
    background: #e8f5e8;
    border: 2px solid #81c784;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
}

.result-error {
    color: #c62828;
    padding: 20px;
    background: #ffebee;
    border: 2px solid #e57373;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.2);
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    background: white;
    padding: 48px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 2px solid #e0e0e0;
}

.loading-content p {
    margin-top: 20px;
    color: #424242;
    font-weight: 600;
    font-size: 18px;
}

/* Responsive design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 100%;
        max-width: 320px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .chat-messages {
        padding: 16px;
    }
    
    .chat-input-container {
        padding: 20px 16px;
    }
    
    .chat-header {
        padding: 20px 16px;
    }
    
    .upload-container,
    .files-container {
        padding: 20px 16px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-header h3 {
        font-size: 1.5rem;
    }
    
    .files-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .files-controls {
        align-items: stretch;
    }
    
    .files-actions {
        justify-content: space-between;
    }
    
    .message-content {
        max-width: 95%;
        padding: 16px 20px;
    }
    
    .input-group {
        gap: 12px;
    }
    
    .input-group input {
        padding: 16px;
    }
    
    .upload-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .login-card {
        padding: 28px 24px;
        margin: 16px;
        max-width: calc(100% - 32px);
    }
    
    .logo h1 {
        font-size: 1.75rem;
    }
    
    .file-item {
        padding: 14px 16px;
    }
    
    .file-list,
    .upload-progress,
    .upload-results {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
    }
    
    .user-details span {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .chat-header {
        padding: 16px;
    }
    
    .chat-header h3 {
        font-size: 1.3rem;
    }
    
    .upload-header h3,
    .files-header-content h3 {
        font-size: 1.4rem;
    }
    
    .upload-icon {
        font-size: 3.5rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .file-info {
        width: 100%;
    }
    
    .remove-file {
        align-self: flex-end;
    }
    
    .files-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .files-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .login-card {
        padding: 24px 20px;
    }
    
    .upload-area {
        padding: 32px 16px;
    }
    
    .message-content {
        padding: 16px 18px;
        font-size: 15px;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Upload loading styles */
.upload-loading,
.send-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-navigation {
    margin-top: 16px;
    padding: 16px;
    background: #e3f2fd;
    border-radius: 8px;
    border: 2px solid #1976d2;
}

.upload-navigation p {
    margin: 0;
    color: #0d47a1;
    font-weight: 500;
}

.upload-navigation a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 600;
}

.upload-navigation a:hover {
    text-decoration: underline;
}

/* Files page styles */
.files-container {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.files-header-content h3 {
    color: #0d47a1;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 1.75rem;
    margin: 0;
}

.files-header-content p {
    color: #424242;
    font-weight: 500;
    font-size: 1.1rem;
    margin: 4px 0 0 0;
}

.files-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.files-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.last-update-info {
    font-size: 13px;
    color: #757575;
    font-weight: 500;
}

.loading-content-stacked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-content-stacked p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.auto-refresh-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #424242;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.completed {
    background: #4caf50;
}

.status-dot.processing {
    background: #ff9800;
    animation: pulse 1.5s infinite;
}

.status-dot.error {
    background: #f44336;
}

.status-dot.auto-refresh-active {
    background: #1976d2;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.files-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid #e0e0e0;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1976d2;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: #424242;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.files-table-container {
    position: relative;
    background: white;
    border-radius: 16px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 200px;
    overflow: hidden;
}

.files-table-container .loading-overlay {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
}

.empty-state {
    text-align: center;
    padding: 60px 40px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4 {
    color: #424242;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1.3rem;
}

.empty-state p {
    color: #757575;
    margin-bottom: 24px;
    font-weight: 500;
}

.files-table {
    width: 100%;
    border-collapse: collapse;
}

.files-table th {
    background: #f5f5f5;
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #424242;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.files-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 500;
    font-size: 14px;
}

.files-table tr:hover {
    background: #f8f9fa;
}

.files-table tr:last-child td {
    border-bottom: none;
}

.policy-name {
    font-weight: 600;
    color: #1976d2;
}

.file-id {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    color: #757575;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    word-break: break-all;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.file-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}



/* Twitter Dark Theme */
@media (prefers-color-scheme: dark) {
    body {
        background: #15202b;
        color: #ffffff;
    }
    
    .login-card {
        background: #192734;
        color: #ffffff;
        border: 2px solid #38444d;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }
    
    .sidebar {
        background: #192734;
        border-right-color: #38444d;
        color: #ffffff;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar-header {
        background: #1e2732;
        border-bottom-color: #38444d;
    }
    
    .user-info {
        background: #1e2732;
        border-bottom-color: #38444d;
    }
    
    .sidebar-actions {
        background: #1e2732;
        border-top-color: #38444d;
    }
    
    .chat-header {
        background: #192734;
        border-bottom-color: #38444d;
        color: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .chat-input-container {
        background: #192734;
        border-top-color: #38444d;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .upload-area {
        background: #192734;
        border-color: #1d9bf0;
        color: #ffffff;
    }
    
    .upload-area:hover {
        border-color: #1d9bf0;
        background: #1e2732;
    }
    
    .file-list,
    .upload-progress,
    .upload-results,
    .loading-content {
        background: #192734;
        color: #ffffff;
        border-color: #38444d;
    }
    
    .chat-messages {
        background: #15202b;
    }
    
    .app-layout {
        background: #15202b;
    }
    
    .message.system-message .message-content {
        background: #1e2732;
        border-color: #38444d;
        color: #8b98a5;
    }
    
    .message.user-message .message-content {
        background: #1d9bf0;
        color: #ffffff;
    }
    
    .message.assistant-message .message-content {
        background: #192734;
        border-color: #38444d;
        color: #ffffff;
    }
    
    .form-group input,
    .input-group input {
        background: #253341;
        border-color: #38444d;
        color: #ffffff;
    }
    
    .form-group input::placeholder,
    .input-group input::placeholder {
        color: #8b98a5;
    }
    
    .form-group input:focus,
    .input-group input:focus {
        border-color: #1d9bf0;
        background: #192734;
    }
    
    .nav-item {
        color: #8b98a5;
    }
    
    .nav-item:hover {
        background: #253341;
        color: #ffffff;
    }
    
    .nav-item.active {
        background: #1d9bf0;
        color: #ffffff;
    }
    
    .file-item {
        background: #253341;
        border-color: #38444d;
        color: #ffffff;
    }
    
    .file-item:hover {
        background: #1e2732;
        border-color: #1d9bf0;
    }
    
    .progress-bar {
        background: #253341;
    }
    
    .progress-fill {
        background: #1d9bf0;
    }
    
    /* Text Colors */
    .logo h1,
    .upload-header h3,
    .chat-header h3,
    .file-list h4,
    .upload-content h4,
    .sidebar-header h2,
    .user-details span,
    .file-details h5 {
        color: #ffffff !important;
    }
    
    .logo p,
    .upload-header p,
    .chat-header p,
    .upload-content p,
    .upload-info p,
    .user-details p,
    .file-size,
    .progress-text,
    .loading-content p,
    .message-time {
        color: #8b98a5 !important;
    }
    
    .form-group label {
        color: #ffffff !important;
    }
    
    .loading p,
    .error-message {
        color: #f7931e !important;
    }
    
    .info-note {
        background: #1e2732;
        border-color: #1d9bf0;
        color: #ffffff;
    }
    
    .info-note p {
        color: #8b98a5 !important;
    }
    
    .no-files {
        color: #536471 !important;
    }
    
    .result-success {
        background: #1e2732;
        border-color: #00ba7c;
        color: #00ba7c;
    }
    
    .result-error {
        background: #1e2732;
        border-color: #f4212e;
        color: #f4212e;
    }
    
    /* Dark mode markdown styles */
    .message-content th,
    .message-content td {
        border-bottom-color: #38444d;
    }
    
    .message-content th {
        background-color: #253341;
    }
    
    .message-content code {
        background-color: #253341;
        color: #ffffff;
    }
    
    .message-content pre {
        background-color: #253341;
    }
    
    .message-content blockquote {
        border-left-color: #1d9bf0;
        color: #8b98a5;
    }
    
    /* Files page dark mode */
    .files-container {
        color: #ffffff;
    }
    
    .files-header-content h3 {
        color: #ffffff !important;
    }
    
    .files-header-content p {
        color: #8b98a5 !important;
    }
    
    .last-update-info {
        color: #8b98a5 !important;
    }
    
    .stat-card {
        background: #192734;
        border-color: #38444d;
        color: #ffffff;
    }
    
    .stat-number {
        color: #1d9bf0 !important;
    }
    
    .stat-label {
        color: #8b98a5 !important;
    }
    
    .files-table-container {
        background: #192734;
        border-color: #38444d;
    }
    
    .files-table-container .loading-overlay {
        background: rgba(25, 39, 52, 0.9);
    }
    
    .files-table th {
        background: #253341;
        color: #8b98a5;
        border-bottom-color: #38444d;
    }
    
    .files-table td {
        color: #ffffff;
        border-bottom-color: #38444d;
    }
    
    .files-table tr:hover {
        background: #253341;
    }
    
    .policy-name {
        color: #1d9bf0 !important;
    }
    
    .file-id {
        background: #253341;
        color: #8b98a5;
    }
    

    
    .empty-state h4 {
        color: #ffffff !important;
    }
    
    .empty-state p {
        color: #8b98a5 !important;
    }
    
    .auto-refresh-status {
        color: #8b98a5 !important;
    }
    
    .upload-navigation {
        background: #1e2732;
        border-color: #1d9bf0;
    }
    
    .upload-navigation p {
        color: #8b98a5 !important;
    }
    
    .upload-navigation a {
        color: #1d9bf0 !important;
    }
}