:root {
    --primary-color: #1a73e8;
    --secondary-color: #5f6368;
    --background-color: #f8f9fa;
    --border-color: #dadce0;
    --sidebar-width: 256px;
    --header-height: 64px;
    --shadow-1: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Google Sans', Arial, sans-serif;
    background-color: var(--background-color);
    color: #202124;
    line-height: 1.5;
}

/* Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    box-shadow: var(--shadow-1);
    padding: 16px 0;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar .logo {
    padding: 0 24px;
    margin-bottom: 24px;
}

.sidebar .logo img {
    max-width: 120px;
    height: auto;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
}

.sidebar nav li a {
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: 48px;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.sidebar nav li a:hover {
    background-color: #f1f3f4;
}

.sidebar nav li a.active {
    color: var(--primary-color);
    background-color: #e8f0fe;
}

.sidebar nav li a i {
    margin-right: 12px;
    font-size: 20px;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 24px;
    width: calc(100% - var(--sidebar-width));
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-1);
    margin-bottom: 24px;
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 22px;
    font-weight: 400;
    margin: 0;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 14px;
}

.data-table td {
    font-size: 14px;
}

/* Buttons */
.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 24px;
    height: 36px;
    border-radius: 4px;
    font-family: 'Google Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.btn:hover {
    background: #1557b0;
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f8f9fa;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-icon:hover {
    background: #f1f3f4;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex !important;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    position: relative;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary-color);
    padding: 0;
    line-height: 1;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    padding: 0 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--secondary-color);
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    gap: 16px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-actions {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding: 16px;
}

.pagination button {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pagination button:hover {
    background: #f1f3f4;
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 24px;
    background: #323232;
    color: white;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    background: #0f9d58;
    height: 50px !important;
}

.notification.error {
    background: #d93025;
    height: 50px !important;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.loading {
    padding: 40px;
    text-align: center;
    color: var(--secondary-color);
}

/* Add these styles to your existing CSS */
.assistant-id {
    font-size: 12px;
    color: var(--secondary-color);
    margin-top: 4px;
    font-family: monospace;
}

.data-table td {
    vertical-align: top;
    padding: 12px 24px;
}

.button-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.loader {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Add these styles */
.btn-icon.delete {
    color: #d93025;  /* Red color for delete */
}

.btn-icon.delete:hover {
    background: rgba(217, 48, 37, 0.1);  /* Light red background on hover */
}

.btn-icon .loader {
    width: 20px;
    height: 20px;
    border: 2px solid #5f6368;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin: auto;
}

.btn-icon.delete .loader {
    border-color: #d93025;
    border-top-color: transparent;
}

/* Add these styles for the assign section */
.checkbox-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    padding: 8px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.checkbox-item:last-child {
    border-bottom: none;
}

.checkbox-item:hover {
    background: #f8f9fa;
}

.checkbox-label {
    display: flex;
    flex-direction: column;
    margin-left: 8px;
}

.checkbox-label strong {
    font-size: 14px;
}

.checkbox-label small {
    font-size: 12px;
    color: var(--secondary-color);
    font-family: monospace;
}

/* Add these styles */
.note-warning {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #b45f06;
    border-radius: 4px;
}

.note-info {
    background-color: #e8f0fe;
    border-left: 4px solid var(--primary-color);
    padding: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #1a73e8;
    border-radius: 4px;
}

/* File Upload Styles */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.custom-file-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.custom-file-upload:hover {
    background: #1557b0;
}

.custom-file-upload i {
    font-size: 20px;
}

.files-to-upload {
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.upload-submit {
    margin-top: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-submit i {
    font-size: 20px;
}

.no-files {
    text-align: center;
    color: var(--secondary-color);
    padding: 20px;
}

/* Uploaded Files List Styles */
.files-list-content {
    background: white;
    
    overflow: hidden;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px 24px;
    background: white;
    transition: background-color 0.2s;
}

.file-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.file-name {
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.file-name i {
    font-size: 18px;
    color: var(--secondary-color);
}

.file-details {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--secondary-color);
    margin-top: 2px;
}

.file-id {
    font-family: monospace;
    background: #f1f3f4;
    padding: 2px 4px;
    border-radius: 3px;
}

.file-status {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.file-actions {
    margin-left: auto;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.file-item:hover .file-actions {
    opacity: 1;
}

.btn-icon.delete {
    width: 28px;
    height: 28px;
}

.btn-icon.delete i {
    font-size: 18px;
}

/* Upload Progress Styles */
.file-upload-progress {
    width: 60px;
    height: 3px;
    margin-left: 8px;
}

.progress-bar-fill {
    transition: width 0.2s ease;
}

/* Vector Store Files Modal Styles */
.modal-body {
    padding: 0px;
}

.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.upload-zone .form-group {
    margin: 0;
    padding: 0;
}

.upload-zone label {
    display: block;
    font-size: 16px;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.upload-zone input[type="file"] {
    display: none;
}

.upload-zone .custom-file-upload {
    display: inline-block;
    padding: 12px 24px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--secondary-color);
    transition: all 0.2s ease;
    margin-bottom: 15px;
}

.upload-zone .custom-file-upload:hover {
    background: #f1f3f4;
    border-color: var(--secondary-color);
}

.upload-zone .selected-file {
    font-size: 14px;
    color: var(--secondary-color);
    margin: 10px 0;
}

.file-upload-progress {
    margin: 20px auto 0;
    max-width: 300px;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.progress-bar {
    height: 6px;
    background: #e8eaed;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
}

.files-list {
    margin-top: 0px;
}

.files-list h4 {
    font-size: 16px;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.files-grid {
    display: grid;
    gap: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 0px 0px 1px 0px solid var(--border-color);
    transition: all 0.2s ease;
}

.file-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-color: #dadce0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-id {
    font-size: 12px;
    color: var(--secondary-color);
    font-family: monospace;
}

.file-actions {
    display: flex;
    gap: 8px;
}

/* Assign page styles */
.assigned-stores {
    font-size: 13px;
    color: var(--secondary-color);
    font-family: monospace;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkbox-item.assigned {
    background-color: #e8f0fe;
    border-left: 4px solid var(--primary-color);
}

.checkbox-item.assigned:hover {
    background-color: #e3effe;
}

/* Button Loaders */
.button-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.loader {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

.loader.secondary {
    border-color: var(--primary-color);
    border-top-color: transparent;
}

.btn-icon .loader {
    width: 20px;
    height: 20px;
    border: 2px solid var(--secondary-color);
    border-top-color: transparent;
    margin: auto;
}

.btn-icon.delete .loader {
    border-color: #d93025;
    border-top-color: transparent;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.selected-files {
    font-size: 14px;
    color: var(--secondary-color);
    margin: 10px 0;
    max-height: 100px;
    overflow-y: auto;
    word-break: break-all;
}

.files-to-upload {
    margin: 15px 0;
    max-height: 300px;
    overflow-y: auto;
}

.files-to-upload .no-files {
    color: var(--secondary-color);
    text-align: center;
    padding: 10px;
}

.file-upload-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    opacity: 1;
    overflow: hidden;
}

.file-upload-item .btn-icon.delete {
    width: 28px;
    height: 28px;
    margin-left: 8px;
}

.file-upload-item .btn-icon.delete i {
    font-size: 18px;
}

.file-upload-item .btn-icon.delete:hover {
    background-color: rgba(217, 48, 37, 0.1);
    color: #d93025;
}

/* Ensure the upload zone has enough space */
.upload-zone {
    min-height: 200px;
}

/* Make sure the files container has a minimum height */
.files-to-upload {
    min-height: 60px;
    transition: all 0.3s ease;
}

/* Style for the remove button when upload is in progress */
.file-upload-item.uploading .btn-icon.delete {
    display: none;
}

.file-upload-info {
    flex: 1;
    margin-right: 15px;
}

.file-upload-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.file-upload-size {
    font-size: 12px;
    color: var(--secondary-color);
}

.file-upload-status {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-upload-progress {
    width: 100px;
    height: 4px;
    background: #e8eaed;
    border-radius: 2px;
    overflow: hidden;
}

.file-upload-progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
}

.file-upload-item.success {
    border-color: #0f9d58;
    background: #e6f4ea;
}

.file-upload-item.error {
    border-color: #d93025;
    background: #fce8e6;
}

.file-upload-status.success {
    color: #0f9d58;
}

.file-upload-status.error {
    color: #d93025;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--secondary-color);
    margin-top: 4px;
}

.file-size {
    color: var(--secondary-color);
}

.file-date {
    color: var(--secondary-color);
}

.file-status {
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 11px;
    text-transform: capitalize;
}

.file-status.succeeded {
    background-color: #e6f4ea;
    color: #0f9d58;
}

.file-status.processing {
    background-color: #fef7e0;
    color: #f9ab00;
}

.file-status.failed {
    background-color: #fce8e6;
    color: #d93025;
}

.file-item.error {
    border-color: #d93025;
    background-color: #fce8e6;
}

.files-list-content {
    margin-bottom: 20px;
}

.files-pagination {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.files-pagination button {
    min-width: 150px;
}

.files-pagination button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Update modal styles to handle long lists */
.modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
}

#vectorStoreFiles {
    padding-right: 8px; /* Space for scrollbar */
}

/* Google Drive-like File Manager Styles */
.modal.fullscreen {
    padding: 0;
    background-color: white;
}

.modal.fullscreen .modal-content {
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.file-manager {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.file-manager-sidebar {
    width: 300px;
    border-right: 1px solid var(--border-color);
    background: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.file-manager-content {
    flex: 1;
    background: #f8f9fa;
    overflow-y: auto;
    position: relative;
}

/* Header Styles */
.modal-header {
    padding: 12px 24px;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.header-left .subtitle {
    color: var(--secondary-color);
    font-size: 14px;
}

/* Content Header */
.content-header {
    display: flex;
    padding: 12px 24px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1;
}

.header-cell {
    color: var(--secondary-color);
    font-size: 13px;
    font-weight: 500;
}

/* File List */
.files-list {
    padding: 0;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    background: white;
    transition: background-color 0.2s;
}

.file-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.file-item:hover {
    background-color: #f1f3f4;
}

.file-name {
    width: 50%;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    cursor: pointer;
}

.file-name i {
    color: var(--secondary-color);
    font-size: 20px;
}

.file-size {
    width: 15%;
    font-size: 13px;
    color: var(--secondary-color);
}

.file-date {
    width: 20%;
    font-size: 13px;
    color: var(--secondary-color);
}

.file-status {
    width: 15%;
    font-size: 12px;
    font-weight: 500;
}

/* Upload Section */
.upload-section {
    margin-bottom: 20px;
}

input[type="file"] {
    display: none;
}

.upload-btn, .submit-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 24px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.submit-upload-btn {
    margin-top: 8px;
}

.upload-btn:hover, .submit-upload-btn:hover {
    background: #1557b0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.submit-upload-btn:disabled {
    background: #dadce0;
    cursor: not-allowed;
    box-shadow: none;
}

/* Files to Upload List */
.files-to-upload {
    flex: 1;
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
    padding-top: 20px;
}

.file-upload-item {
    padding: 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 8px;
}

/* Loading State */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--secondary-color);
}

.loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
} 

/* File Details Styles */
.file-details-grid {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.detail-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    align-items: center;
}

.detail-row .label {
    color: var(--secondary-color);
    font-size: 14px;
}

.detail-row .value {
    font-size: 14px;
    word-break: break-all;
} 

/* Center loader styles */
.center-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.center-loader .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.center-loader .text {
    color: var(--secondary-color);
    font-size: 14px;
} 

/* File Manager Message States */
.file-manager-message {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    min-height: 200px;
    padding: 40px;
    text-align: center;
    background: white;
}

.file-manager-message .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.file-manager-message i {
    font-size: 48px;
    color: var(--secondary-color);
}

.file-manager-message .message {
    font-size: 16px;
    color: var(--secondary-color);
}

.file-manager-message .message.error {
    color: #d93025;
}

/* Modal Sizes */
.modal-sm {
    max-width: 400px;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 40px auto;
    position: relative;
}

/* File Details Modal */
#fileDetailsModal .modal-body {
    min-height: 200px;
    position: relative;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Login Page Styles */
.login-page {
    background: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 48px 40px 36px;
}

.login-box {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 48px 40px 36px;
    text-align: center;
}

.login-box h1 {
    color: #202124;
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 12px;
}

.login-subtitle {
    color: #202124;
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 32px;
}

.login-box .form-group {
    margin-bottom: 24px;
    padding: 0;
}

.login-box input {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 16px;
    color: #202124;
    transition: all 0.2s;
}

.login-box input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(26,115,232,0.2);
}

.login-box input::placeholder {
    color: #5f6368;
}

.login-btn {
    width: 100%;
    height: 42px;
    margin-top: 32px;
    font-size: 15px;
    text-transform: none;
    letter-spacing: 0.25px;
}

/* Notification styles for login */
.notification {
    position: fixed;
    top: 24px;  /* Changed from bottom to top */
    right: 24px;
    padding: 16px 24px;
    border-radius: 4px;
    font-size: 14px;
    color: white;
    background: #323232;
    z-index: 1000;
    animation: slideInTop 0.3s ease-out;
}

@keyframes slideInTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Add these to your existing sidebar styles */
.sidebar-divider {
    border-top: 1px solid var(--border-color);
    margin: 8px 0;
}

.logout-link {
    color: #d93025 !important;  /* Red color for logout */
}

.logout-link:hover {
    background-color: rgba(217, 48, 37, 0.1) !important;  /* Light red background on hover */
}

.btn-danger {
    background: #d93025;
    color: white;
}

.btn-danger:hover {
    background: #b7271e;
}

.btn-danger .material-icons {
    margin-right: 8px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header .header-subtitle {
    margin-right: auto;
    margin-left: 16px;
    color: var(--secondary-color);
}

/* Add/update these styles */
.submit-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 24px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    transition: all 0.2s ease;
    margin-top: 8px;
    min-height: 48px; /* Add fixed height to prevent jumping */
}

.submit-upload-btn.uploading {
    background: #1557b0;
    cursor: default;
}

.submit-upload-btn.uploading:hover {
    background: #1557b0;
}

.submit-upload-btn i {
    font-size: 20px;
}

/* Remove any existing progress styles that might interfere */
.file-upload-progress,
.file-upload-status,
.file-upload-progress-fill {
    display: none;
}

/* Chat Styles */
.chat-container {
    display: flex;
    height: calc(100vh - 80px);
    background: white;
    margin: -24px;
    overflow: hidden;
}

.chat-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.new-chat-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 24px;
    font-weight: 500;
}

.new-chat-btn:hover {
    background: #1557b0;
}

.threads-section {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.threads-title {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.thread-item {
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.thread-item:hover {
    background: #f1f3f4;
}

.thread-item.active {
    background: #e8f0fe;
    color: var(--primary-color);
}

.thread-item i {
    color: var(--secondary-color);
    font-size: 20px;
}

.thread-item.active i {
    color: var(--primary-color);
}

.vector-store-section {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: #f8f9fa;
}

.vector-store-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#vectorStoreSelect {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    color: #202124;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    position: relative;
}

.chat-top-bar {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.chat-title input {
    border: 1px solid transparent;
    font-size: 16px;
    padding: 6px 12px;
    border-radius: 4px;
    color: #202124;
    background: transparent;
}

.chat-title input:hover {
    border-color: var(--border-color);
}

.chat-title input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.chat-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
    font-size: 14px;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: 80px;
    background: #f8f9fa;
}

.message {
    max-width: 800px;
    margin: 0 auto 24px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.assistant {
    align-items: flex-start;
}

.message-content {
    max-width: 80%;
    padding: 16px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    color: #202124;
}

.message.user .message-content {
    background: #e8f0fe;
    color: #1a73e8;
}

.chat-input-area {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    background: white;
    border-top: 1px solid var(--border-color);
    z-index: 10;
}

.chat-input-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 8px 16px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.chat-input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chat-input-wrapper textarea {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    padding: 8px 0;
    min-height: 24px;
    max-height: 200px;
    font-family: inherit;
    font-size: 14px;
    color: #202124;
}

.chat-input-wrapper textarea:focus {
    outline: none;
}

.send-btn {
    color: var(--primary-color);
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    background: #f1f3f4;
}

.send-btn i {
    font-size: 20px;
}

/* Add these styles for the typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    width: fit-content;
    margin-bottom: 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.4;
    animation: typing 1s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-4px);
        opacity: 1;
    }
}