#dataGrid.ag-theme-alpine .ag-header,
#dataGrid.ag-theme-alpine .ag-header-container,
#dataGrid.ag-theme-alpine .ag-header-row {
  border-bottom: 0 !important;
}

#dataGrid.ag-theme-alpine .ag-header-viewport,
#dataGrid.ag-theme-alpine .ag-pinned-left-header,
#dataGrid.ag-theme-alpine .ag-pinned-right-header {
  border-bottom: 1px solid var(--border-subtle) !important;
  box-shadow: none !important;
}

#dataGrid.ag-theme-alpine .ag-pinned-left-header,
#dataGrid.ag-theme-alpine .ag-pinned-left-cols-container {
  border-right: 1px solid var(--border-subtle) !important;
  box-shadow: none !important;
}
.ag-theme-alpine .ag-pinned-left-header { border-right: 1px solid var(--border-subtle) !important; }

#dataGrid.ag-theme-alpine .ag-root-wrapper,
#dataGrid.ag-theme-alpine .ag-root,
#dataGrid.ag-theme-alpine .ag-header,
#dataGrid.ag-theme-alpine .ag-header-viewport,
#dataGrid.ag-theme-alpine .ag-header-container,
#dataGrid.ag-theme-alpine .ag-center-cols-viewport,
#dataGrid.ag-theme-alpine .ag-pinned-left-header,
#dataGrid.ag-theme-alpine .ag-pinned-right-header {
  border-top: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
  outline: 0 !important;
}

#dataGrid.ag-theme-alpine .ag-header::before,
#dataGrid.ag-theme-alpine .ag-header::after,
#dataGrid.ag-theme-alpine .ag-header-viewport::before,
#dataGrid.ag-theme-alpine .ag-header-viewport::after,
#dataGrid.ag-theme-alpine .ag-pinned-left-header::before,
#dataGrid.ag-theme-alpine .ag-pinned-left-header::after,
#dataGrid.ag-theme-alpine .ag-pinned-right-header::before,
#dataGrid.ag-theme-alpine .ag-pinned-right-header::after {
  content: none !important;
  display: none !important;
}

#dataGrid.ag-theme-alpine .ag-header {
  position: relative;
}
#dataGrid.ag-theme-alpine .ag-header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -1px;
  height: 2px;
  background: var(--bg-primary);
  pointer-events: none;
  z-index: 5;
}

.navbar::after {
  content: '';
  position: fixed;
  left: 0; right: 0; top: 90px;
  height: 3px;
  background: linear-gradient(to bottom, var(--border-subtle) 0, var(--border-subtle) 1px, var(--bg-primary) 1px, var(--bg-primary) 3px);
  z-index: 1001;
}

#dataGrid.ag-theme-alpine .ag-pinned-left-header,
#dataGrid.ag-theme-alpine .ag-pinned-left-cols-container {
  border-right: 1px solid var(--border-subtle) !important;
  box-shadow: none !important;
}

#dataGrid.ag-theme-alpine .ag-header,
#dataGrid.ag-theme-alpine .ag-header-viewport,
#dataGrid.ag-theme-alpine .ag-pinned-left-header,
#dataGrid.ag-theme-alpine .ag-pinned-right-header {
  border-top: 0 !important;
  box-shadow: none !important;
  position: relative;
}

#dataGrid.ag-theme-alpine .ag-header::before,
#dataGrid.ag-theme-alpine .ag-pinned-left-header::before,
#dataGrid.ag-theme-alpine .ag-pinned-right-header::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--bg-primary);
  pointer-events: none;
  z-index: 3;
  transform: translateZ(0);
}

.ellipsis-header-wrapper {
  position: relative;
}

.ellipsis-header-wrapper {
  position: relative;
}

.header-label-chip {
  position: relative;
  display: inline-block;
}

.header-label-chip::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transform-origin: left;
  z-index: 3;
  transform: scaleX(0);
  transition: transform .22s ease;
}


@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');

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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9f8f6;
    --bg-tertiary: #f3f3f3;
    --bg-primary-selected: #f3f3f3;
    --bg-secondary-selected: #f1f0ee;
    --text-primary: #605e5b;
    --text-dark: #32302c;
    --text-secondary: #91908d;
    --text-muted: #b4b3b1;
    --text-extra: #acaba9;
    --border-light: #f0f0ef;
    --border-medium: #f0f0ef;
    --border-subtle: #f0f0ef;
    --border-very-light: rgba(0, 0, 0, 0.08);
    --accent: #5a7d8f;
    --accent-green: #335046;
    --accent-light: #e2efe2;
    --accent-bg: #e2efe2;
    --null-bg: #ecd1ce;
    --null-border: #ecd1ce;
    --sidebar-bg: #ffffff;
    --icon-muted: #c6c4c0;
    --blue-bg: #dbe9f2;
    --blue-text: #2282e1;
    --red-text: #ed6867;
    --green-bg: #e2efe2;
    --green-text: #335046;
}

body {
    font-family: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    font-size: 14px;
    zoom: 1;
}



.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 90px;
    background: var(--bg-primary);
    z-index: 1000;
    transition: left 0.3s ease, width 0.3s ease;
    display: flex;
    flex-direction: column;
}

.navbar.with-sidebar {
    left: 25vw;
    width: 75vw;
}

.navbar-top {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--bg-primary);
}

.navbar-top-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.top-divider {
    width: 1px;
    height: 14px;
    background: var(--border-medium);
    margin: 0 6px;
}

.navbar-top-right {
    display: flex;
    align-items: center;
}

.navbar-bottom {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
}

.navbar-bottom-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-buttons-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tool-buttons-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-search-container {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-search-input {
    background: none;
    border: none;
    width: 100%;
    font-size: 13px;
    color: var(--text-secondary);
    outline: none;
    transition: all 0.15s ease;
    font-family: inherit;
}

.filter-search-input::placeholder {
    color: var(--text-muted);
}

.filter-search-input:focus {
    color: var(--text-primary);
}

.search-count {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 8px;
    white-space: nowrap;
}

.button-separator {
    width: 1px;
    height: 24px;
    background: var(--border-medium);
    margin: 0 4px;
}

.navbar-bottom-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.undo-btn,
.redo-btn {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    padding: 6px 8px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.undo-btn:hover:not(:disabled),
.redo-btn:hover:not(:disabled) {
    background: none;
    color: var(--text-secondary);
}

.undo-btn:disabled,
.redo-btn:disabled {
    background: none;
    color: var(--icon-muted);
    cursor: not-allowed;
    opacity: 0.8;
}

.undo-btn:disabled:hover,
.redo-btn:disabled:hover {
    color: var(--icon-muted);
}

.undo-btn svg,
.redo-btn svg {
    width: 16px;
    height: 16px;
    color: var(--text-primary);
}

.undo-btn:disabled svg,
.redo-btn:disabled svg {
    color: var(--icon-muted);
}

.undo-btn img,
.redo-btn img {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(58%) sepia(0%) saturate(0%) hue-rotate(190deg) brightness(92%) contrast(88%);
}

.undo-btn:hover:not(:disabled) img,
.redo-btn:hover:not(:disabled) img {
    filter: brightness(0) saturate(100%) invert(76%) sepia(0%) saturate(0%) hue-rotate(186deg) brightness(95%) contrast(90%);
}

.undo-btn:disabled img,
.redo-btn:disabled img {
    filter: brightness(0) saturate(100%) invert(84%) sepia(3%) saturate(182%) hue-rotate(9deg) brightness(93%) contrast(88%);
}

.export-container {
    position: relative;
}



.csv-name {
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 600;
}

.null-count,
.nulls-filled,
.column-count,
.row-count { color: var(--text-primary); font-size: 13px; font-weight: 400; }

.upload-section {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    z-index: 1;
}

.upload-area { border: 2px solid var(--border-medium); border-radius: 12px; padding: 80px 60px; text-align: center; background: var(--bg-secondary); cursor: pointer; transition: all 0.15s ease; min-width: 500px; min-height: 320px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04); }

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--border-medium);
    background: var(--bg-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.upload-content h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.upload-content p {
    color: var(--text-extra);
    font-size: 16px;
    margin-bottom: 8px;
}

.browse-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.browse-btn:hover {
    border-bottom-color: var(--text-secondary);
    color: var(--text-primary);
}

#loadingSpinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-extra);
    z-index: 10;
    font-size: 13px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border-subtle);
    border-top: 1.5px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#dataGrid {
    position: absolute;
    top: 90px;
    left: 0;
    bottom: 0;
    height: calc(100vh - 90px);
    width: 100vw;
    border-radius: 0;
    z-index: 2;
    font-size: 14px;
    transition: left 0.3s ease, width 0.3s ease;
    color: var(--text-primary);
}

#dataGrid.with-sidebar {
    left: 25vw;
    width: 75vw;
}

#dataGrid.ag-theme-alpine {
    background-color: var(--bg-primary);
    border: none;
}

#dataGrid.ag-theme-alpine .ag-root-wrapper,
#dataGrid.ag-theme-alpine .ag-root {
    background-color: var(--bg-primary);
    border: none;
}

#dataGrid.ag-theme-alpine .ag-cell {
    font-size: 14px;
    padding: 8px 24px;
    line-height: 1.4;
    border-right: 1px solid var(--border-subtle);
    border-bottom: none;
    border-left: none;
    border-top: none;
    color: var(--text-dark);
    background-color: var(--bg-primary);
}



#dataGrid.ag-theme-alpine .ag-header-cell {
    font-size: 14px;
    padding: 8px 12px;
    border-right: none;
    border-bottom: none;
    border-left: none;
    border-top: none;
    background-color: var(--bg-primary);
    color: var(--text-secondary);
	 font-weight: 400;
}

#dataGrid.ag-theme-alpine .ag-header-cell:first-child {
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
}



#dataGrid.ag-theme-alpine .ag-row {
    height: 48px;
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

#dataGrid.ag-theme-alpine .ag-row-even,
#dataGrid.ag-theme-alpine .ag-row-odd {
    background-color: var(--bg-primary);
}

#dataGrid.ag-theme-alpine .ag-header-row {
    height: 48px;
    background-color: var(--bg-primary);
}

#dataGrid.ag-theme-alpine .ag-header,
#dataGrid.ag-theme-alpine .ag-header-viewport {
    background-color: var(--bg-primary);
    border-left: none;
    border-right: none;
    border-top: 0;
    border-bottom: 1px solid var(--border-subtle);
}

#dataGrid.ag-theme-alpine .ag-header-cell:after,
#dataGrid.ag-theme-alpine .ag-header-row:after {
    display: none;
}

#dataGrid.ag-theme-alpine .ag-header-cell,
#dataGrid.ag-theme-alpine .ag-header-group-cell {
    border-top: none;
    border-bottom: none;
    border-left: none;
    border-right: 1px solid var(--border-subtle);
    background-color: var(--bg-primary);
}

#dataGrid.ag-theme-alpine .ag-header-cell-resize {
    background-color: transparent;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 1;
}

#dataGrid.ag-theme-alpine .ag-header-cell-resize:hover {
    background-color: var(--accent);
}

#dataGrid.ag-theme-alpine .ag-header-cell-resize::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: var(--border-subtle);
}



#dataGrid.ag-theme-alpine .ag-header-cell[col-id="_rowNum"]::after {
    display: none;
}

#dataGrid.ag-theme-alpine .ag-header::after,
#dataGrid.ag-theme-alpine .ag-header-row::after,
#dataGrid.ag-theme-alpine .ag-row::after {
    display: none;
}

#dataGrid.ag-theme-alpine .ag-cell-null { background-color: var(--null-bg); color: var(--red-text); font-style: italic; }

#dataGrid.ag-theme-alpine .ag-cell-null > *,
#dataGrid.ag-theme-alpine .imputed-cell > * {
    position: relative;
    z-index: 2;
}

#dataGrid.ag-theme-alpine .impute-loading {
    position: relative;
    overflow: hidden;
}
#dataGrid.ag-theme-alpine .impute-loading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(135deg, transparent 40%, rgba(0,0,0,0.12) 50%, transparent 60%);
    background-size: 300% 300%;
    background-repeat: no-repeat;
    animation: imputeShimmerDiag .8s linear infinite;
    opacity: 0.7;
    z-index: 1;
    pointer-events: none;
    will-change: background-position;
}

#dataGrid.ag-theme-alpine .ag-cell-null.impute-loading { background-color: #ffffff; }

@keyframes imputeShimmer {
    0% { background-position: 0% 0; }
    100% { background-position: 100% 0; }
}

@keyframes imputeShimmerDiag {
    0% { background-position: 85% 85%; }
    100% { background-position: -85% -85%; }
}

.filter-btn,
.export-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.filter-btn:hover,
.export-btn:hover {
    background: none;
    color: var(--text-secondary);
}

.filter-btn img { width: 16px; height: 16px; filter: brightness(0) saturate(100%) invert(38%) sepia(7%) saturate(356%) hue-rotate(343deg) brightness(93%) contrast(88%); }

.export-btn-img { width: 16px; height: 16px; filter: brightness(0) saturate(100%) invert(38%) sepia(7%) saturate(356%) hue-rotate(343deg) brightness(93%) contrast(88%); }

.export-btn:hover .export-btn-img { filter: brightness(0) saturate(100%) invert(63%) sepia(4%) saturate(247%) hue-rotate(9deg) brightness(90%) contrast(86%); }

.filter-btn:hover img { filter: brightness(0) saturate(100%) invert(63%) sepia(4%) saturate(247%) hue-rotate(9deg) brightness(90%) contrast(86%); }

#filterBtn {
    gap: 0;
    padding: 6px 8px;
}

.filter-dropdown,
.export-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    min-width: 160px;
    padding: 8px 0;
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    transition: opacity .24s cubic-bezier(0.2, 0, 0, 1), transform .26s cubic-bezier(0.2, 0, 0, 1);
    transform-origin: top;
    will-change: opacity, transform;
}

.filter-dropdown {
    left: 0;
}
.filter-dropdown.open,
.export-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.filter-dropdown.closing,
.export-dropdown.closing {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
}

.export-dropdown {
    right: 0;
}

.filter-option,
.export-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    padding: 8px 12px;
    transition: background-color 0.15s ease;
}

.filter-option {
    gap: 8px;
    margin-bottom: 0;
}

.filter-option:hover,
.export-option:hover { background: var(--bg-secondary-selected); }

.filter-option input[type="checkbox"] {
    display: none;
}

.filter-option::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-medium);
    border-radius: 3px;
    background: var(--bg-primary);
    transition: all 0.15s ease;
    flex-shrink: 0;
    pointer-events: none;
}

.filter-option.checked::before {
    background: var(--blue-bg);
    border-color: var(--blue-bg);
    content: '';
}

/* Dot styled checkbox variant for impute Balanced */
.filter-option.dot-option::before {
    border-radius: 50%;
}

.filter-option.dot-option.checked::before {
    background: var(--blue-bg);
    border-color: var(--blue-bg);
    box-shadow: inset 0 0 0 4px var(--blue-bg), inset 0 0 0 8px var(--bg-primary);
}

.dropdown-start-btn {
    display: block;
    margin: 8px 12px 8px 12px;
    width: calc(100% - 24px);
    text-align: center;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 8px 0;
    font-size: 13px;
    cursor: pointer;
}
.dropdown-start-btn:hover {
    background: var(--text-secondary);
}
.dropdown-start-btn.disabled,
.dropdown-start-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--text-extra);
}

.filter-option:hover::before {
    border-color: var(--accent);
}

.export-option.disabled-option {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.export-option.disabled-option:hover {
    background: var(--bg-tertiary);
}

.impute-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.impute-btn:hover {
    background: none;
    color: var(--text-primary);
}

.impute-btn img {
    width: 14px;
    height: 14px;
    filter: brightness(0) saturate(100%) invert(58%) sepia(0%) saturate(0%) hue-rotate(190deg) brightness(92%) contrast(88%);
}

.impute-btn:hover img {
    filter: brightness(0) saturate(100%) invert(76%) sepia(0%) saturate(0%) hue-rotate(186deg) brightness(95%) contrast(90%);
}

@media (max-width: 768px) {
    .upload-area {
        min-width: auto;
        padding: 40px 20px;
    }

    #dataGrid {
        top: 90px;
        height: calc(100vh - 90px);
    }
}

.ag-row-number-cell {
    text-align: center;
}

#dataGrid .ag-pinned-row-bottom {
    background-color: var(--bg-secondary);
    font-weight: 400;
    border-top: 1px solid var(--border-subtle);
}

#dataGrid .ag-pinned-row-bottom .ag-cell {
    color: var(--text-extra);
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 14px;
}

#dataGrid .ag-pinned-row-bottom .ag-cell:hover {
    background-color: var(--bg-tertiary);
}

.ellipsis-header-wrapper,
.ellipsis-cell-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.header-label,
.cell-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.ellipsis-icon {
    opacity: 1;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-extra);
    background: none;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    user-select: none;
    margin-left: 4px;
}

.header-icon-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding-left: 8px;
}

.header-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    transition: filter 0.2s ease;
    filter: brightness(0) saturate(100%) invert(38%) sepia(7%) saturate(356%) hue-rotate(343deg) brightness(93%) contrast(88%);
}

.header-icon:hover {
    filter: brightness(0) saturate(100%) invert(63%) sepia(4%) saturate(247%) hue-rotate(9deg) brightness(90%) contrast(86%);
}

.ellipsis-header-wrapper:hover .ellipsis-icon,
.ellipsis-cell-wrapper:hover .ellipsis-icon {
    opacity: 1;
}

.ellipsis-icon:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.ellipsis-menu {
    position: fixed;
    background: var(--bg-primary);
    border: 1px solid var(--border-medium);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.ellipsis-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ellipsis-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    border-radius: 4px;
    margin: 4px;
    transition: background-color 0.2s ease;
}

.ellipsis-menu-item:hover {
    background-color: var(--bg-tertiary);
}

.ellipsis-menu-item:active {
    background-color: var(--border-light);
}

.ellipsis-menu-item-icon {
    width: 14px;
    height: 14px;
    margin-right: 8px;
    filter: brightness(0) saturate(100%) invert(38%) sepia(7%) saturate(356%) hue-rotate(343deg) brightness(93%) contrast(88%);
}

#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 25vw;
    min-width: 240px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-subtle);
    z-index: 1001;
    transition: transform 0.25s ease-in-out;
    display: flex;
    flex-direction: column;
    transform: translateX(0);
}

#sidebar.sidebar-hidden { transform: translateX(0); }
#sidebar.sidebar-hidden { transform: translateX(-100%); pointer-events: none; }

#mainContent {
    margin-left: 0;
    width: 100vw;
    transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
}

#mainContent.with-sidebar {
    margin-left: 25vw;
    width: 75vw;
}

#mainContent.sidebar-hidden {
    margin-left: 0;
    width: 100vw;
}

#sidebarHoverZone { position: fixed; left: 0; top: 0; bottom: 0; width: 16px; display: none; z-index: 1002; }

.sidebar-open-btn { position: absolute; right: 8px; top: 8px; display: none; background: none; border: none; padding: 6px; border-radius: 6px; cursor: pointer; }
.sidebar-open-btn:hover, .sidebar-open-btn:active, .sidebar-open-btn:focus { background: none; }

.sidebar-open-btn img {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(38%) sepia(7%) saturate(356%) hue-rotate(343deg) brightness(93%) contrast(88%);
}

.sidebar-open-btn:hover img, .sidebar-open-btn:active img, .sidebar-open-btn:focus img {
    filter: brightness(0) saturate(100%) invert(63%) sepia(4%) saturate(247%) hue-rotate(9deg) brightness(90%) contrast(86%);
}

.sidebar-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#sidebar.resizing,
#sidebar.resizing + #mainContent .navbar.with-sidebar,
#sidebar.resizing + #mainContent #dataGrid.with-sidebar {
    cursor: col-resize;
}

.sidebar-resize-handle {
    position: absolute;
    top: 0;
    right: -2px;
    width: 4px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    transition: background-color 0.12s ease, width 0.12s ease, right 0.12s ease;
}

.sidebar-resize-handle:hover {
    background: var(--accent);
    width: 3px;
    right: -1.5px;
}

.sidebar-resize-handle.active {
    background: var(--accent);
    width: 3px;
    right: -1.5px;
}

.sidebar-content { flex: 1; padding: 16px 16px 88px 16px; overflow-y: auto; background: transparent; scrollbar-width: none; }
.sidebar-content::-webkit-scrollbar { display: none; }

.sidebar-header {
    margin-bottom: 32px;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    margin-bottom: 8px;
}

.sidebar-section {
    margin-bottom: 28px;
}

.sidebar-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 12px;
}

 

 

.sidebar-footer { padding: 12px 16px; border-top: none; display: flex; background: var(--sidebar-bg); margin-bottom: 8px; }

.chat-container { display: flex; flex-direction: column; gap: 8px; }
.chat-messages { max-height: none; overflow-y: visible; background: transparent; border: none; border-radius: 0; padding: 0; }
.chat-message { font-size: 13px; line-height: 1.4; color: var(--text-primary); margin-bottom: 12px; text-align: left; white-space: normal; word-break: break-word; overflow-wrap: anywhere; width: 100%; max-width: 100%; }
.chat-message.assistant { align-self: stretch; padding-left: 0; }
.chat-message.user { align-self: flex-start; display: inline-block; width: fit-content; max-width: 85%; }
/* Align lists inside chat messages with normal text flow */
.chat-message ul,
.chat-message ol { margin: 6px 0 0 16px; padding-left: 16px; list-style-position: outside; }
.chat-message li { margin: 2px 0; }

.chat-message table:not(.md-table) { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 12px; }
.chat-message table:not(.md-table) th, .chat-message table:not(.md-table) td { border: 1px solid var(--border-subtle); padding: 6px 8px; text-align: left; }
.chat-message table:not(.md-table) thead th { background: var(--bg-secondary); color: var(--text-primary); font-weight: 600; }

.op-status-card {
  align-self: stretch;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  width: var(--chat-input-width, 100%);
  box-sizing: border-box;
}

.op-status-card-icon {
  width: 14px;
  height: 14px;
    filter: brightness(0) saturate(100%) invert(58%) sepia(0%) saturate(0%) hue-rotate(190deg) brightness(92%) contrast(88%);
}

.typing-dots.inline { display: inline-flex; gap: 2px; }
.typing-dots.inline span { display: inline-block; width: 4px; height: 4px; background: var(--text-extra); border-radius: 50%; opacity: 0.3; animation: dotBlink 1.2s infinite ease-in-out; }
.typing-dots.inline span:nth-child(2) { animation-delay: .2s; }
.typing-dots.inline span:nth-child(3) { animation-delay: .4s; }

@keyframes dotBlink {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}
.chat-message.user { background: var(--bg-secondary); border: 1px solid var(--border-medium); border-radius: 6px; padding: 10px 12px; color: var(--text-dark); }
.chat-message.assistant { background: transparent; border: none; border-radius: 0; padding: 0; color: var(--text-dark); }
.chat-message.typing { color: var(--text-extra); font-style: italic; }
.typing-dots { display: inline-block; }
.typing-dots span { display: inline-block; width: 4px; height: 4px; margin-left: 3px; background: var(--text-extra); border-radius: 50%; animation: typingBlink 1.2s infinite ease-in-out; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBlink { 0%, 80%, 100% { opacity: 0.2; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.chat-input-row { display: flex; gap: 8px; width: 100%; border: 1px solid var(--border-medium); border-radius: 6px; padding: 12px; background: var(--bg-secondary); transition: border-color 0.15s ease; position: relative; min-height: 56px; -webkit-tap-highlight-color: transparent; z-index: 1; }
.chat-input-row.right-connected { border-top-right-radius: 6px; }
.chat-input-row:focus-within { border-color: var(--border-medium); box-shadow: none; }
.chat-input { flex: 1; border: none; border-radius: 4px; padding: 4px 36px 10px 10px; font-size: 13px; background: transparent; color: var(--text-primary); resize: none; overflow: hidden; font-family: inherit; min-height: 40px; position: relative; z-index: 2; }
.chat-input::placeholder { color: var(--text-secondary); }
.chat-input::placeholder { font-family: inherit; }
.chat-input:focus { outline: none; box-shadow: none; }
textarea#chatInput::selection { background: transparent; color: inherit; }
textarea#chatInput::-moz-selection { background: transparent; color: inherit; }

.chat-send-btn { width: 24px; height: 24px; border: none; border-radius: 50%; background: var(--text-dark); color: var(--bg-primary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; position: absolute; right: 14px; bottom: 12px; }
.chat-send-btn { z-index: 3; box-shadow: 0 1px 2px rgba(0,0,0,0.08); padding: 0; line-height: 0; }
.chat-send-btn svg { width: 12px; height: 12px; color: var(--bg-primary); }
.chat-send-btn .chat-send-icon { width: 12px; height: 12px; filter: brightness(0) saturate(100%) invert(100%); }
.chat-send-btn:hover { background: var(--text-primary); }

.sidebar-footer { position: relative; }
/* bottom-container removed; use chat-input-row directly */

.top-container { background: var(--bg-secondary); border: 1px solid var(--border-medium); border-radius: 999px; padding: 6px 12px; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-8px); width: fit-content; min-width: 0; min-height: 24px; z-index: 2; opacity: 0; display: none; align-items: center; }
.top-container.show { display: inline-flex; animation: fadeInUp 0.4s ease forwards; }
.top-container.sliding { animation: none; opacity: 1; transform: translateX(-50%) translateY(0); transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.3s ease; }
.top-container.slid-right { left: auto; right: -1px; transform: translateX(0) translateY(-4px); border-radius: 999px; }

.thinking-content { display: flex; align-items: center; gap: 6px; opacity: 0; transition: opacity 0.4s ease; white-space: nowrap; min-height: 24px; }
.top-container.show .thinking-content { opacity: 1; }
.fade-text { display: inline-flex; gap: 0; letter-spacing: 0; font-size: 12px; line-height: 24px; }
.fade-text span { display: inline-block; margin: 0; }
.fade-text span { opacity: 0; animation: fadeOnly 1.5s ease-in-out infinite; }
.fade-text span:nth-child(1) { animation-delay: 0s; }
.fade-text span:nth-child(2) { animation-delay: 0.05s; }
.fade-text span:nth-child(3) { animation-delay: 0.1s; }
.fade-text span:nth-child(4) { animation-delay: 0.15s; }
.fade-text span:nth-child(5) { animation-delay: 0.2s; }
.fade-text span:nth-child(6) { animation-delay: 0.25s; }
.fade-text span:nth-child(7) { animation-delay: 0.3s; }
.fade-text span:nth-child(8) { animation-delay: 0.35s; }
.fade-text span:nth-child(9) { animation-delay: 0.4s; }
.fade-text span:nth-child(10) { animation-delay: 0.45s; }
.fade-text span:nth-child(11) { animation-delay: 0.5s; }

@keyframes fadeOnly {
  0% { opacity: 0; }
  30% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

.action-buttons { display: none; gap: 8px; align-items: center; }
.action-buttons.show { display: flex; }
.action-btn { border: none; border-radius: 6px; padding: 6px 10px; font-size: 12px; cursor: pointer; background: transparent; color: var(--text-primary); line-height: 1; transition: background-color 0.15s ease, color 0.15s ease; }
.action-btn.accept { color: var(--text-primary); }
.action-btn.cancel { color: var(--text-extra); }
.action-btn.accept:hover { background: var(--bg-tertiary); }
.action-btn.cancel:hover { background: var(--bg-tertiary); color: var(--text-secondary); }

@keyframes fadeInUp { to { opacity: 1; transform: translateX(-50%) translateY(0); } }

 

@keyframes gradientShift {
  0% { background-position: 0% 50%, 100% 0%, 100% 100%, 0% 100%, 0% 50%; }
  25% { background-position: 100% 50%, 0% 0%, 100% 0%, 0% 100%, 50% 0%; }
  50% { background-position: 50% 100%, 50% 0%, 0% 100%, 100% 0%, 100% 50%; }
  75% { background-position: 0% 0%, 100% 100%, 0% 50%, 100% 50%, 50% 100%; }
  100% { background-position: 0% 50%, 100% 0%, 100% 100%, 0% 100%, 0% 50%; }
}

@keyframes gradientDrift {
  0% { transform: translateZ(0); }
  50% { transform: translateZ(0); }
  100% { transform: translateZ(0); }
}


 
.md-table-wrap { overflow-x: auto; overflow-y: hidden; margin: 6px 0; border: 1px solid var(--border-subtle); border-radius: 6px; background: var(--bg-primary); }
.md-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: auto; font-size: 12px; color: var(--text-primary); background: transparent; }
.md-table th, .md-table td { padding: 8px 10px; text-align: left; vertical-align: top; border-right: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); word-break: break-word; overflow-wrap: anywhere; }
.md-table thead th { background: var(--bg-secondary); color: var(--text-primary); font-weight: 600; }
.md-table tbody tr:nth-child(odd) td { background: var(--bg-primary); }
.md-table tbody tr:nth-child(even) td { background: var(--bg-tertiary); }
.md-table tbody tr:hover td { background: var(--bg-secondary); }
.md-table thead th:last-child, .md-table td:last-child { border-right: 0; }
.md-table tbody tr:last-child td { border-bottom: 0; }






.sidebar-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-tab.active {
    color: var(--text-primary);
    border-bottom: 2px solid var(--text-primary);
}

.sidebar-tab-content {
    display: none;
}

.sidebar-tab-content.active {
    display: block;
}

#startProcessingBtn {
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    font-weight: 600;
}

#startProcessingBtn:hover {
    background: var(--text-secondary);
    color: var(--bg-primary);
}

#startProcessingBtn div {
    color: var(--bg-primary);
}

#startProcessingBtn div div {
    border-color: var(--bg-primary) !important;
    border-top-color: transparent !important;
}

#dataGrid.ag-theme-alpine .ag-cell.ag-row-number-cell,
#dataGrid.ag-theme-alpine .ag-header-cell[col-id="_rowNum"] {
    padding: 8px 6px;
    font-size: 14px;
    text-align: center;
    width: 65px;
    min-width: 65px;
    max-width: 65px;
}

#dataGrid.ag-theme-alpine .ag-header-cell[col-id="_rowNum"] {
    display: flex;
    align-items: center;
    justify-content: center;
}

#dataGrid.ag-theme-alpine .ag-header-cell[col-id="_rowNum"] .ag-header-cell-text,
#dataGrid.ag-theme-alpine .ag-header-cell[col-id="_rowNum"] .ellipsis-header-wrapper,
#dataGrid.ag-theme-alpine .ag-header-cell[col-id="_rowNum"] .header-label {
    text-align: center;
    width: 100%;
    justify-content: center;
    align-items: center;
}

#dataGrid.ag-theme-alpine .ag-header-cell[col-id="_rowNum"] .header-label {
    flex: none;
    display: flex;
    height: 100%;
}

#dataGrid.ag-theme-alpine .ag-header-cell[col-id="_rowNum"] .ellipsis-icon,
#dataGrid.ag-theme-alpine .ag-cell[col-id="_rowNum"] .ellipsis-icon {
    display: none;
}

#dataGrid.ag-theme-alpine .ag-cell[col-id="_rowNum"] .ellipsis-cell-wrapper {
    justify-content: center;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
}

#dataGrid.ag-theme-alpine .ag-cell[col-id="_rowNum"] .cell-label { text-align: center; flex: none; color: var(--text-secondary); }

#dataGrid.ag-theme-alpine .ag-cell[col-id="_rowNum"] {
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#dataGrid.ag-theme-alpine .ag-cell[col-id="_rowNum"]:hover {
    background-color: var(--bg-tertiary);
}

#dataGrid.ag-theme-alpine .ag-cell[col-id="_rowNum"].selected {
    background-color: var(--bg-tertiary);
}

#dataGrid.ag-theme-alpine .ag-cell[col-id="_rowNum"].selected:hover {
    background-color: var(--accent-light);
}

#dataGrid.ag-theme-alpine .ag-cell[col-id="_rowNum"].selected::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-color: var(--accent);
    border-radius: 3px;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' stroke='white' stroke-width='1' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m13.854 3.646-7.5 7.5a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6 10.293l7.146-7.147a.5.5 0 0 1 .708.708z'/%3e%3c/svg%3e");
    background-size: 12px 12px;
    background-repeat: no-repeat;
    background-position: center;
}

#dataGrid.ag-theme-alpine .ag-cell[col-id="_rowNum"].selected .cell-label {
    margin-left: 20px;
    color: var(--text-muted);
}

.delete-btn {
    background: none;
    color: var(--red-text);
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.delete-btn:hover:not(:disabled) { background: none; color: var(--red-text); }

.delete-btn:disabled { background: none; color: var(--icon-muted); cursor: not-allowed; opacity: 0.8; }

.delete-btn:disabled:hover { color: var(--icon-muted); }

.delete-btn img { width: 16px; height: 16px; filter: brightness(0) saturate(100%) invert(64%) sepia(32%) saturate(749%) hue-rotate(322deg) brightness(95%) contrast(95%); }

.delete-btn:hover:not(:disabled) img { filter: brightness(0) saturate(100%) invert(64%) sepia(32%) saturate(749%) hue-rotate(322deg) brightness(95%) contrast(95%); }

.delete-btn:disabled img { filter: brightness(0) saturate(100%) invert(84%) sepia(3%) saturate(182%) hue-rotate(9deg) brightness(93%) contrast(88%); }



#dataGrid.ag-theme-alpine .ag-header-row .ag-header-cell:first-child {
    border-left: none;
}

#dataGrid ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#dataGrid ::-webkit-scrollbar:vertical {
    width: 8px;
}

#dataGrid ::-webkit-scrollbar:horizontal {
    height: 0;
    display: none;
}

#dataGrid .ag-body-vertical-scroll-viewport::-webkit-scrollbar:horizontal,
#dataGrid .ag-body-horizontal-scroll-viewport::-webkit-scrollbar:horizontal,
#dataGrid .ag-body-vertical-scroll-viewport::-webkit-scrollbar:horizontal {
    height: 0;
    display: none;
}

#dataGrid .ag-body-horizontal-scroll-viewport {
    scrollbar-width: none;
}

#dataGrid .ag-body-horizontal-scroll-viewport::-webkit-scrollbar {
    display: none;
}

#dataGrid ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

#dataGrid ::-webkit-scrollbar-thumb {
    background: var(--text-extra);
    border-radius: 4px;
    transition: background 0.2s ease;
}

#dataGrid ::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

#dataGrid ::-webkit-scrollbar-corner {
    background: var(--bg-secondary);
}

#dataGrid * {
    scrollbar-width: thin;
    scrollbar-color: var(--text-extra) var(--bg-secondary);
}

#dataGrid.ag-theme-alpine .imputed-cell { background-color: var(--green-bg); color: var(--green-text); font-style: italic; font-weight: 500; }

#dataGrid.ag-theme-alpine .ag-cell.ag-cell-edit-input {
    background-color: var(--bg-primary);
    border-right: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    border-left: none;
    border-top: none;
    outline: none;
}

#dataGrid.ag-theme-alpine .ag-cell.ag-cell-edit-input:first-child {
    border-left: 1px solid var(--border-subtle);
}

#dataGrid.ag-theme-alpine .ag-cell.ag-cell-edit-input:focus {
    background-color: var(--bg-primary);
    border-right: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    border-left: none;
    border-top: none;
}

#dataGrid.ag-theme-alpine .ag-cell.ag-cell-edit-input:first-child:focus {
    border-left: 1px solid var(--border-subtle);
}

#dataGrid.ag-theme-alpine .ag-cell.ag-cell-edit-input input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.4;
    width: 100%;
    height: 100%;
    padding: 8px 12px;
    margin: -8px -12px;
}

#dataGrid.ag-theme-alpine .ag-cell.ag-cell-edit-input input::placeholder {
    color: var(--text-muted);
}

#dataGrid.ag-theme-alpine .ag-cell.ag-cell-edit-input input:focus {
    outline: none;
}

#dataGrid.ag-theme-alpine .ag-cell.ag-cell-edit-input input:focus::placeholder {
    color: var(--text-secondary);
}




/* 1) Remove AG-Grid’s dark seam between the pinned “#” column and the rest */
.ag-theme-alpine .ag-pinned-left-header,
.ag-theme-alpine .ag-pinned-left-cols-container {
  box-shadow: none !important;
  border-right: none !important;
}

/* Add a subtle separator between pinned-left header and the main header */
.ag-theme-alpine .ag-pinned-left-header {
  border-right: 1px solid var(--border-subtle) !important;
}

.ag-theme-alpine .ag-pinned-left-cols-container {
  border-right: 1px solid var(--border-subtle) !important;
}

/* 2) Remove the header’s built-in bottom shadow and normalise its bottom border */
.ag-theme-alpine .ag-header,
.ag-theme-alpine .ag-header-viewport {
  box-shadow: none !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}

/* 3) Draw a single, uniform 1px light border on every column and cell */
.ag-theme-alpine .ag-header-cell,
.ag-theme-alpine .ag-cell {
  border-right: 1px solid var(--border-subtle) !important;
}

/* 4) Remove vertical borders from header cells */
#dataGrid.ag-theme-alpine .ag-header-cell {
    border-right: none !important;
}
#dataGrid.ag-theme-alpine .ag-header-group-cell {
    border-right: none !important;
}

.sidebar-close-btn { position: absolute; right: 8px; top: 8px; display: none; background: none; border: none; padding: 6px; border-radius: 6px; cursor: pointer; }
.sidebar-close-btn:hover, .sidebar-close-btn:active, .sidebar-close-btn:focus { background: none; }

.sidebar-close-btn img {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(38%) sepia(7%) saturate(356%) hue-rotate(343deg) brightness(93%) contrast(88%);
}

.sidebar-close-btn:hover img, .sidebar-close-btn:active img, .sidebar-close-btn:focus img {
    filter: brightness(0) saturate(100%) invert(63%) sepia(4%) saturate(247%) hue-rotate(9deg) brightness(90%) contrast(86%);
}

 

.preload * {
    transition: none !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.modal-content {
    background: var(--bg-primary);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.modal-content h3 {
    margin-top: 0;
    font-size: 18px;
    color: var(--text-primary);
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cancel-btn {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.cancel-btn:hover {
    background-color: var(--border-light);
}

.confirm-btn { background-color: var(--red-text); color: white; }

.confirm-btn:hover { background-color: var(--red-text); }

.sidebar-tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.sidebar-tab-content.active {
    display: block;
}

@media (max-width: 1200px) {
    #sidebar {
        width: 25vw;
    }
    #mainContent.with-sidebar, .navbar.with-sidebar {
        width: 75vw;
    }
}

@media (max-width: 992px) {
    #sidebar {
        width: 35vw;
    }
    #mainContent.with-sidebar, .navbar.with-sidebar {
        width: 65vw;
    }
}

@media (max-width: 768px) {
    #sidebar {
        width: 100vw;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

    #mainContent.with-sidebar, .navbar.with-sidebar {
        width: 100vw;
        margin-right: 0; 
    }
}


/* Chat undo icon and grayed assistant state */
.chat-message.assistant.grayed { opacity: 0.5; }
.chat-undo-icon { width: 12px; height: 12px; margin-left: 6px; cursor: pointer; filter: brightness(0) saturate(100%) invert(67%) sepia(8%) saturate(6%) hue-rotate(314deg) brightness(89%) contrast(86%); vertical-align: middle; position: relative; top: -1px; }
.chat-undo-icon:hover { filter: brightness(0) saturate(100%) invert(54%) sepia(6%) saturate(5%) hue-rotate(314deg) brightness(95%) contrast(86%); }

