body {
    background: #f5f5f5;
}

textarea {
    width: 99%;
    height: 150px;
    padding: 12px 20px;
    box-sizing: border-box;
    border: 2px solid #ccc;
    border-radius: 4px;
    background-color: #f8f8f8;
    font-size: 16px;
    resize: none;
    margin-top: 10px;
}

footer {
    margin-top: 8px;
    margin-bottom: 8px;
    color: darkgray;
    text-align: center;
}

footer small a {
    color: #41a2f7;
}

.sidenav {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tableWrapper {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    width: 100%;
    margin-top: 10px;
}

.tableNameRow {}

.data-cell {
    position: relative;
    white-space: nowrap;
}

.cell-copy-value {
    cursor: copy;
    display: inline;
}

.where-search-btn {
    border: none !important;
    background: transparent !important;
    cursor: pointer;
    font-size: 18px;
    padding: 0 !important;
    margin-left: 5px;
    opacity: 0;
    vertical-align: middle;
    box-shadow: none !important;
    outline: none !important;
}

.data-cell:hover .where-search-btn {
    opacity: 1;
}

.tableNameRow:hover {
    background-color: #41a2f720;
    word-break: break-all;
}

#table_sort_bar {
    display: flex;
    align-items: center;
    align-content: flex-start;
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    width: 100%;
}

#table_sort_title {
    flex: 1 0 100%;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    margin: 0 0 2px;
    white-space: nowrap;
}

#table_sort_bar .table-sort-btn,
#table_sort_bar .toolbar-btn {
    flex: 0 0 auto;
}

.table-sort-btn {
    border: 1px solid #d0d7de;
    background: #fff;
    padding: 6px 10px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 16px;
    min-width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: all 0.15s ease;
}

.table-sort-btn:hover {
    background: #f5f9ff;
    border-color: #0079FF;
}

.table-sort-btn.active {
    background: #0079FF;
    color: white;
    border-color: #0079FF;
    box-shadow: 0 2px 8px rgba(0, 121, 255, 0.25);
}

#table_count_badge {
    color: #888;
    font-weight: normal;
    margin-left: 5px;
    font-size: 11px;
}

.tableNameRow {
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 4px;
    cursor: pointer;
}

.tableNameRow:hover {
    background-color: #e8f3ff;
}

.table-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-card-meta {
    display: flex;
    gap: 6px;
    margin-top: 2px;
    font-size: 11px;
    color: #888;
    white-space: nowrap;
}

.table-card-meta span {
    background: #f1f1f1;
    padding: 1px 5px;
    border-radius: 10px;
}

#db-load-progress {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-box {
    width: 320px;
    background: white;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.progress-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.progress-message {
    font-size: 13px;
    color: #777;
    margin-bottom: 10px;
}

.progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: #0079FF;
    transition: width 0.2s ease;
}

li {
    max-width: 100%;
    overflow-x: hidden;
    word-break: break-all;
    margin-top: 10px;
}

ul {
    list-style-type: none;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
}

li:hover {
    background-color: #41a2f7;
    word-break: break-all;
}

#main-container {
    position: relative;
    background: #ffffff;
    box-shadow: 0 1px 16px silver;
    z-index: 2;
}

.card {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    transition: 0.3s;
    border-radius: 5px;
    /* 5px rounded corners */
}

.center {
    margin: auto;
    width: 100%;
    padding: 10px;
}

.node-info {
    font-style: italic;
    display: none;
    margin: 0;
    padding: 0;
}

.drag {
    background-color: lightblue;
}

.info-items td {
    vertical-align: top;
}

.info-items td:first-child {
    width: 90px;
}

#header {
    background: #ffffff;
    color: #272727;
    padding: 16px;
    margin-left: -15px;
    margin-right: -15px;

}

.vertical-center {
    margin: 0;
    padding-left: 72px;
    position: absolute;
    top: 50%;
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
}

#header h3 {
    margin: 0;
}

#resizer {
    font-size: 26px;
}

#resizer i {
    padding-top: 15px;
}

#resizer i.glyphicon-resize-small {
    margin-right: 120px;
}

#dropzone {
    height: 500px;
    width: 100%;
    font-size: 1.2em;
    cursor: pointer;
    text-align: center;
    display: table;
    table-layout: fixed;
}

#dropzone .panel-body {
    display: table-cell;
    vertical-align: middle;
    font-size: large;
}

#output-box {
    display: none;
    margin-bottom: 20px;
}

#button-box {
    position: absolute;
    right: 40px;
}

.ace_hidden-cursors {
    opacity: 0
}

.table-hover tbody tr:hover td,
.table-hover tbody tr:hover th {
    background-color: #F5F5E7;
}

#data {
    margin-bottom: 0;
}

#data th span {
    cursor: help;
}

#data th,
#data td {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#bottom-bar a:focus,
a:hover {
    text-decoration: none;
}

#bottom-bar .inline {
    background: #fff;
    display: inline-block;
    padding: 15px;
    margin: -15px
}

#bottom-bar {
    z-index: 1;
    bottom: 0;
    padding: 15px;
    position: static;
    display: none;
    margin-left: -8px;
}

@media (min-width: 1300px) {
    #bottom-bar {
        position: fixed;
    }

    #pager {
        display: block;
    }
}

@media (min-width: 1450px) {
    #pager {
        display: inline-block;
    }
}

.ribbon {
    z-index: 3;
}

/* Animated loading icon */

.glyphicon-refresh-animate {
    animation: spin .7s infinite linear;
    -webkit-animation: spin2 .7s infinite linear;
}

/* Ripple effect */
.ripple {
    background-position: center;
    transition: background 0.8s;
}

.ripple:hover {
    background: #47a7f5 radial-gradient(circle, transparent 1%, #47a7f5 1%) center/15000%;
}

.ripple:active {
    background-color: #6eb9f7;
    background-size: 100%;
    transition: background 0s;
}

/* Button style */
.menuButton {
    border-radius: 2px;
    cursor: pointer;
    background-color: #fff4f4;
    box-shadow: 0 0 4px #7b7b7b;
    margin-right: 16px;
    width: 25px;
    height: 25px;
}

.popup_box {
    width: 100%;
    background: #f2f2f2;
    text-align: left;
    align-items: center;
    padding: 40px;
    border: 1px solid #b3b3b3;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, .2);
    z-index: 9999;
    display: none;
    position: fixed;
    margin: auto;
    padding: 10px;
    overflow-y: scroll;
    height: 100%;

}

.check_box_style {
    list-style-type: disc;
    -webkit-columns: 4;
    -moz-columns: 4;
    columns: 4;
    list-style-position: inside;
}

.popup_box_content {
    margin-top: 20px;
    overflow-y: scroll;
    height: 450px;
}

.google-sign-in-button {
    cursor: pointer;
    transition: background-color .3s, box-shadow .3s;
    position: absolute;
    left: 50%;
    transform: translate(-50%);
    padding: 12px 16px 12px 42px;
    margin-top: 30px;
    border: none;
    border-radius: 3px;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, .04), 0 1px 1px rgba(0, 0, 0, .25);

    color: #757575;
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;

    background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTcuNiA5LjJsLS4xLTEuOEg5djMuNGg0LjhDMTMuNiAxMiAxMyAxMyAxMiAxMy42djIuMmgzYTguOCA4LjggMCAwIDAgMi42LTYuNnoiIGZpbGw9IiM0Mjg1RjQiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik05IDE4YzIuNCAwIDQuNS0uOCA2LTIuMmwtMy0yLjJhNS40IDUuNCAwIDAgMS04LTIuOUgxVjEzYTkgOSAwIDAgMCA4IDV6IiBmaWxsPSIjMzRBODUzIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48cGF0aCBkPSJNNCAxMC43YTUuNCA1LjQgMCAwIDEgMC0zLjRWNUgxYTkgOSAwIDAgMCAwIDhsMy0yLjN6IiBmaWxsPSIjRkJCQzA1IiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48cGF0aCBkPSJNOSAzLjZjMS4zIDAgMi41LjQgMy40IDEuM0wxNSAyLjNBOSA5IDAgMCAwIDEgNWwzIDIuNGE1LjQgNS40IDAgMCAxIDUtMy43eiIgZmlsbD0iI0VBNDMzNSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PHBhdGggZD0iTTAgMGgxOHYxOEgweiIvPjwvZz48L3N2Zz4=);
    background-color: white;
    background-repeat: no-repeat;
    background-position: 12px 11px;
}

.google-sign-in-button:hover {
    box-shadow: 0 -1px 0 rgba(0, 0, 0, .04), 0 2px 4px rgba(0, 0, 0, .25);
}

.google-sign-in-button:active {
    background-color: #eeeeee;
}

.google-sign-in-button:active {
    outline: none;
    box-shadow:
        0 -1px 0 rgba(0, 0, 0, .04),
        0 2px 4px rgba(0, 0, 0, .25),
        0 0 0 3px #c8dafc;
}

.column-panel {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.column-panel-box {
    width: 360px;
    max-height: 80vh;
    background: white;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.column-panel-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

#column_search_input {
    padding: 7px;
    margin-bottom: 8px;
}

.column-panel-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

#column_visibility_list {
    overflow-y: auto;
}

.column-check-row {
    display: block;
    padding: 6px;
    border-bottom: 1px solid #eee;
}

.database-workbench-bar,
.query-workspace-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
}

.database-workbench-bar {
    border-bottom: 1px solid #e5e7eb;
}

.database-session-bar {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 7px 0 0;
    border-bottom: 1px solid #cbd5e1;
}

.database-tabs {
    display: flex;
    align-items: flex-end;
    min-width: 0;
    flex: 1;
    gap: 4px;
    overflow-x: auto;
}

.database-tabs.is-busy {
    pointer-events: none;
    opacity: 0.65;
}

.database-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 220px;
    min-height: 32px;
    padding: 5px 8px 5px 10px;
    color: #475569;
    background: #e9eef5;
    border: 1px solid #cbd5e1;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    cursor: pointer;
}

.database-tab.active {
    color: #0f5ca8;
    background: #fff;
    border-color: #7db7ee;
}

.database-tab-dirty {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    background: #f59e0b;
    border-radius: 50%;
}

.database-tab-name {
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.database-tab-close {
    color: inherit;
    font-size: 16px;
    line-height: 1;
    opacity: 0.55;
}

.database-tab-close:hover {
    opacity: 1;
}

.database-add-btn {
    min-height: 32px;
    padding: 5px 10px;
    color: #0f5ca8;
    font-size: 12px;
    font-weight: 700;
    background: #fff;
    border: 1px solid #9fc9ef;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    cursor: pointer;
}

.database-add-btn:hover,
.database-add-btn:focus-visible {
    background: #eaf4ff;
    outline: none;
}

.database-workbench-actions,
.query-workspace-actions,
.row-editor-actions,
.query-history-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.database-status {
    display: flex;
    align-items: center;
    min-width: 0;
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
}

.database-status-dot {
    width: 9px;
    height: 9px;
    margin-right: 7px;
    flex: 0 0 auto;
    background: #9ca3af;
    border-radius: 50%;
}

.database-status.is-clean .database-status-dot {
    background: #16a34a;
}

.database-status.is-dirty .database-status-dot {
    background: #f59e0b;
}

.query-workspace-bar {
    align-items: flex-end;
    padding-bottom: 0;
}

.query-tabs {
    display: flex;
    align-items: flex-end;
    min-width: 0;
    flex: 1;
    gap: 4px;
    overflow-x: auto;
}

.query-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 190px;
    min-height: 32px;
    padding: 5px 8px 5px 10px;
    color: #4b5563;
    background: #eef2f7;
    border: 1px solid #d8dee7;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    cursor: pointer;
}

.query-tab.active {
    color: #005fcc;
    background: #fff;
    border-color: #99c7f7;
}

.query-tab-title {
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.query-tab-close {
    padding: 0;
    color: inherit;
    font-size: 16px;
    line-height: 1;
    background: transparent;
    border: 0;
    opacity: 0.55;
}

.query-tab-close:hover {
    opacity: 1;
}

.query-tab-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    color: #2563a8;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
}

.query-tab-new:hover,
.query-tab-new:focus-visible {
    background: #e8f2ff;
    border-color: #99c7f7;
    outline: none;
}

.query-result-status {
    min-height: 24px;
    padding: 5px 2px;
    color: #64748b;
    font-size: 12px;
}

.query-result-status.is-warning {
    color: #9a6700;
}

.query-result-status.is-success {
    color: #15803d;
}

.workbench-modal {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.48);
}

.workbench-modal-box {
    display: flex;
    flex-direction: column;
    width: min(720px, 100%);
    max-height: calc(100dvh - 32px);
    padding: 14px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.3);
}

.workbench-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.workbench-modal-subtitle {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
}

.query-history-actions,
.row-editor-actions {
    padding: 10px 0;
}

.query-history-list,
.row-editor-fields {
    min-height: 80px;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.query-history-item {
    padding: 9px 10px;
    border-bottom: 1px solid #eef2f7;
}

.query-history-item:last-child {
    border-bottom: 0;
}

.row-editor-field {
    display: grid;
    grid-template-columns: minmax(130px, 0.8fr) minmax(180px, 2fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #eef2f7;
}

.row-editor-field:last-child {
    border-bottom: 0;
}

.row-editor-label {
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.row-editor-label small {
    display: block;
    color: #64748b;
    font-weight: normal;
}

.row-editor-input {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.row-editor-null {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    font-size: 11px;
    white-space: nowrap;
}

.row-action-cell {
    min-width: 106px !important;
    white-space: nowrap;
}

.row-action-btn {
    margin-right: 4px;
    padding: 3px 7px;
    font-size: 11px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
}

.row-action-btn.delete {
    color: #b42318;
}

.query-history-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.query-history-query {
    margin: 0 0 3px;
    color: #1e293b;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.query-history-meta {
    color: #64748b;
    font-size: 11px;
}

.query-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (min-width: 992px) {
    #output-box .query-editor-column {
        width: calc(100% - 260px);
    }

    #output-box .query-toolbar {
        width: 260px;
    }
}

.toolbar-btn,
.toolbar-icon-btn {
    height: 34px;
    border: 1px solid #cfd6dd;
    background: #fff;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.toolbar-btn {
    padding: 0 12px;
    min-width: 86px;
}

.toolbar-icon-btn {
    width: 36px;
    min-width: 36px;
    max-width: 36px;

    height: 34px;

    padding: 0;

    font-size: 16px;

    border: 1px solid #cfd6dd;
    background: #fff;
    border-radius: 7px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition: all 0.15s ease;
}

.toolbar-btn:hover,
.toolbar-icon-btn:hover {
    background: #f4f8ff;
    border-color: #0079FF;
    color: #0079FF;
}

.toolbar-btn.primary {
    background: #0079FF;
    color: white;
    border-color: #0079FF;
}

.toolbar-btn.primary:hover {
    background: #006be0;
}

.table-header-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.table-header-actions {
    display: flex;
    align-items: center;
    gap: 3px;
}

.header-icon-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0.35;
    transition: all 0.15s ease;
}

.header-icon-btn:hover {
    opacity: 1;
    background: #eef5ff;
}

.active-pin-btn {
    opacity: 1 !important;
    background: #ffb300 !important;
    color: white !important;
    border-radius: 4px;
}

.sticky-column {
    position: sticky;
    background: white;
    z-index: 5;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.08);
}

thead .sticky-column {
    z-index: 10;
    background: #f8f9fb;
}

th.sticky-column {
    background: #dcecff !important;
}

td.sticky-column {
    background: #f4f8ff !important;
}

@-webkit-keyframes spin2 {
    from {
        -webkit-transform: rotate(0deg);
    }

    to {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    from {
        transform: scale(1) rotate(0deg);
    }

    to {
        transform: scale(1) rotate(360deg);
    }
}

.er-diagram-modal {
    position: fixed;
    inset: 0;
    padding: 12px;
    box-sizing: border-box;
    background: rgba(0,0,0,0.45);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.er-diagram-box {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.er-diagram-header {
    min-height: 52px;
    padding: 0 14px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.er-diagram-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.er-export-select {
    height: 34px;
    min-width: 132px;
    padding: 0 30px 0 10px;
    color: #333;
    background: #fff;
    border: 1px solid #cfd6dd;
    border-radius: 7px;
}

#er_diagram_status {
    min-height: 34px;
    max-height: 28vh;
    padding: 8px 14px;
    font-size: 12px;
    color: #555;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    flex: 0 0 auto;
    overflow: auto;
    white-space: pre-line;
}

#er_diagram_container {
    flex: 1;
    min-height: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle, #e5e7eb 1px, transparent 1px);
    background-size: 18px 18px;
}

.mobile-header,
.mobile-sidebar-close,
.mobile-sidebar-backdrop {
    display: none;
}

.sidebar-heading {
    display: flex;
    align-items: center;
}

.sidebar-heading h4 {
    margin: 0;
    line-height: 25px;
}

.workspace {
    min-width: 0;
}

@media (max-width: 767px) {
    body {
        overflow-x: hidden;
    }

    body.mobile-sidebar-open {
        overflow: hidden;
    }

    .container-fluid {
        padding-right: 0;
        padding-left: 0;
    }

    .row.content {
        margin-right: 0;
        margin-left: 0;
    }

    .mobile-header {
        position: sticky;
        top: 0;
        z-index: 1020;
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 52px;
        padding: 8px 12px;
        background: #fff;
        border-bottom: 1px solid #dfe3e8;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .mobile-sidebar-toggle {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-height: 36px;
        padding: 7px 11px;
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        background: #0079ff;
        border: 0;
        border-radius: 7px;
    }

    .mobile-sidebar-toggle span:first-child {
        font-size: 20px;
        line-height: 1;
    }

    .mobile-app-title {
        overflow: hidden;
        color: #222;
        font-size: 18px;
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sidenav {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1050;
        width: min(86vw, 320px);
        height: 100vh;
        height: 100dvh;
        padding: 16px 14px;
        background: #f8f9fa;
        box-shadow: 8px 0 24px rgba(0, 0, 0, 0.2);
        transform: translateX(-105%);
        transition: transform 0.22s ease;
    }

    .sidenav.is-open {
        transform: translateX(0);
    }

    .sidebar-heading {
        min-height: 36px;
        padding-right: 42px;
    }

    .mobile-sidebar-close {
        position: absolute;
        top: 10px;
        right: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        color: #333;
        font-size: 28px;
        line-height: 1;
        background: transparent;
        border: 0;
        border-radius: 7px;
    }

    .mobile-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1040;
        display: block;
        visibility: hidden;
        background: rgba(15, 23, 42, 0.42);
        opacity: 0;
        transition: opacity 0.22s ease, visibility 0.22s ease;
    }

    .mobile-sidebar-backdrop.is-visible {
        visibility: visible;
        opacity: 1;
    }

    .workspace {
        width: 100%;
        padding: 8px;
    }

    .card {
        box-shadow: none;
    }

    #dropzone {
        width: auto;
        min-height: 190px;
        height: auto !important;
        margin: 0 0 8px !important;
        font-size: 1em;
    }

    #dropzone .panel-body {
        display: block;
        padding: 24px 16px;
        font-size: 16px;
    }

    #dropzone .panel-body p {
        line-height: 1.45;
    }

    #output-box {
        padding-right: 0;
        padding-left: 0;
    }

    #output-box > .row {
        margin-right: 0;
        margin-left: 0;
    }

    #output-box .col-md-10,
    #output-box .col-md-12 {
        padding-right: 0;
        padding-left: 0;
    }

    .query-toolbar {
        gap: 6px;
        padding: 8px 0 12px;
        overflow-x: auto;
    }

    .query-toolbar .toolbar-btn {
        flex: 1 0 auto;
    }

    .database-workbench-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .database-workbench-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .database-workbench-actions .toolbar-btn {
        min-width: 74px;
        flex: 1 1 auto;
    }

    .row-editor-field {
        grid-template-columns: 1fr;
    }

    .workbench-modal {
        padding: 6px;
    }

    .workbench-modal-box {
        max-height: calc(100dvh - 12px);
    }

    #data th,
    #data td {
        min-width: 120px;
        max-width: 180px;
    }

    .column-panel-box {
        width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
    }

    .er-diagram-modal {
        padding: 4px;
    }

    .er-diagram-box {
        width: 100%;
        height: 100%;
        border-radius: 8px;
    }

    .er-diagram-header {
        padding: 8px;
        align-items: flex-start;
    }

    .er-diagram-actions {
        flex: 1;
    }

    .er-export-select {
        min-width: 118px;
        flex: 1 1 118px;
    }

    .popup_box {
        padding: 12px;
    }

    .check_box_style {
        columns: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidenav,
    .mobile-sidebar-backdrop {
        transition: none;
    }
}

/* Workspace redesign ----------------------------------------------------- */
:root {
    --ui-primary: #2563eb;
    --ui-primary-hover: #1d4ed8;
    --ui-primary-soft: #eff6ff;
    --ui-bg: #f4f7fb;
    --ui-surface: #ffffff;
    --ui-surface-muted: #f8fafc;
    --ui-border: #dbe3ee;
    --ui-border-strong: #c5d0de;
    --ui-text: #172033;
    --ui-muted: #667085;
    --ui-success: #16a34a;
    --ui-danger: #c4322b;
    --ui-radius-sm: 7px;
    --ui-radius: 10px;
    --ui-shadow: 0 8px 28px rgba(27, 39, 64, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    color: var(--ui-text);
    background: var(--ui-bg);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

button,
input,
select {
    font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 2px;
}

.row.content {
    display: flex;
    min-height: 100vh;
    margin: 0;
}

.sidenav {
    width: 268px;
    flex: 0 0 268px;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    padding: 16px 14px 12px;
    background: var(--ui-surface);
    border-right: 1px solid var(--ui-border);
}

.workspace {
    width: calc(100% - 268px);
    flex: 1 1 auto;
    padding: 14px;
}

.card {
    overflow: hidden;
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    box-shadow: var(--ui-shadow);
}

.sidebar-heading {
    min-height: 38px;
    gap: 10px;
    padding: 0 2px 12px;
}

.sidebar-heading h4 {
    color: var(--ui-text);
    font-size: 18px;
    font-weight: 700;
}

.sidebar-search {
    position: relative;
    display: none;
    margin-bottom: 10px;
}

body.database-loaded .sidebar-search {
    display: block;
}

.sidebar-search-icon {
    position: absolute;
    top: 50%;
    left: 11px;
    z-index: 1;
    color: var(--ui-muted);
    font-size: 13px;
    transform: translateY(-50%);
    pointer-events: none;
}

#myInput {
    width: 100%;
    height: 38px;
    padding: 7px 10px 7px 33px;
    color: var(--ui-text);
    background: var(--ui-surface-muted);
    border: 1px solid var(--ui-border-strong);
    border-radius: var(--ui-radius-sm);
}

#myInput:focus {
    background: #fff;
    border-color: var(--ui-primary);
}

#table_sort_bar {
    gap: 6px;
    margin: 0 0 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ui-border);
}

#table_sort_title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--ui-text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

#table_count_badge {
    color: var(--ui-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.table-sort-btn {
    min-width: 0;
    height: 32px;
    padding: 0 9px;
    color: var(--ui-muted);
    font-size: 11px;
    font-weight: 700;
    background: var(--ui-surface);
    border-color: var(--ui-border);
    border-radius: 6px;
}

.table-sort-btn:hover {
    color: var(--ui-primary);
    background: var(--ui-primary-soft);
    border-color: #9dc2fb;
}

.table-sort-btn.active {
    color: var(--ui-primary);
    background: var(--ui-primary-soft);
    border-color: #9dc2fb;
    box-shadow: none;
}

.sidebar-er-btn {
    width: 100%;
    height: 34px;
    margin-top: 2px;
}

.tableWrapper {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 0;
    padding-right: 3px;
    scrollbar-color: #c8d2df transparent;
    scrollbar-width: thin;
}

.tableNameRow {
    position: relative;
    margin: 1px 0;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: var(--ui-radius-sm);
}

.tableNameRow:hover {
    background: var(--ui-surface-muted);
    border-color: var(--ui-border);
}

.tableNameRow.is-selected {
    color: var(--ui-primary);
    background: var(--ui-primary-soft);
    border-color: #bfd5fb;
}

.tableNameRow.is-selected::before {
    position: absolute;
    top: 7px;
    bottom: 7px;
    left: 3px;
    width: 3px;
    content: "";
    background: var(--ui-primary);
    border-radius: 3px;
}

.table-card-title {
    color: inherit;
    font-size: 12px;
    font-weight: 650;
}

.table-card-meta span {
    color: var(--ui-muted);
    background: #edf1f6;
}

#dropzone {
    min-height: 158px;
    margin: 0;
    color: var(--ui-text);
    text-align: center;
    background: linear-gradient(135deg, #f8fbff, #f3f8ff);
    border: 2px dashed #9fc2ed;
    border-radius: 11px 11px 0 0;
    cursor: pointer;
    transition: min-height .2s ease, background .2s ease;
}

body:not(.database-loaded) .workspace .card {
    display: flex;
    min-height: calc(100dvh - 28px);
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    box-shadow: none;
}

body:not(.database-loaded) #dropzone {
    width: min(720px, calc(100% - 48px));
    height: 280px;
    min-height: 280px;
    border-radius: 14px;
}

body:not(.database-loaded) #dropzone .panel-body {
    width: 100%;
    height: 100%;
    min-height: 0;
}

#dropzone:hover {
    background: #edf6ff;
    border-color: var(--ui-primary);
}

#dropzone .panel-body {
    display: flex;
    min-height: inherit;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.dropzone-icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    margin-bottom: 7px;
    color: var(--ui-primary);
    font-size: 24px;
    background: var(--ui-primary-soft);
    border-radius: 50%;
}

.dropzone-empty-content h1 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
}

.dropzone-empty-content p {
    margin: 0 0 7px;
    color: var(--ui-muted);
}

.dropzone-empty-content a {
    display: inline-block;
    margin-top: 8px;
    color: var(--ui-primary);
    font-weight: 600;
}

.dropzone-loaded-content {
    display: none;
    align-items: center;
    gap: 7px;
    color: var(--ui-primary);
    font-size: 13px;
    font-weight: 700;
}

body.database-loaded #dropzone {
    width: 100%;
    height: 42px !important;
    min-height: 42px;
    max-height: 42px;
    background: var(--ui-surface-muted);
    border-width: 0 0 1px;
    border-style: solid;
    border-color: var(--ui-border);
    border-radius: 0;
}

body.database-loaded #dropzone .panel-body {
    height: 42px;
    justify-content: flex-start;
    min-height: 42px;
    padding: 8px 16px;
}

body.database-loaded .dropzone-empty-content {
    display: none;
}

body.database-loaded .dropzone-loaded-content {
    display: inline-flex;
}

#output-box {
    padding: 0 16px 16px;
}

.workspace-command-bar {
    min-height: 52px;
    padding: 9px 0;
}

.database-workbench-actions .toolbar-btn {
    min-width: 78px;
}

.toolbar-btn,
.toolbar-icon-btn {
    height: 34px;
    color: #344054;
    font-size: 12px;
    font-weight: 650;
    border-color: var(--ui-border-strong);
    border-radius: var(--ui-radius-sm);
}

.toolbar-btn:hover,
.toolbar-icon-btn:hover {
    color: var(--ui-primary);
    background: var(--ui-primary-soft);
    border-color: #8eb8f5;
}

.toolbar-btn.primary {
    color: #fff;
    background: var(--ui-primary);
    border-color: var(--ui-primary);
}

.toolbar-btn.primary:hover {
    background: var(--ui-primary-hover);
}

.database-session-bar {
    position: relative;
    align-items: center;
    min-height: 42px;
    padding: 6px 72px 0 0;
    background: #f7f9fc;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius) var(--ui-radius) 0 0;
}

.tab-strip-label {
    position: absolute;
    top: 50%;
    right: 10px;
    color: var(--ui-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    transform: translateY(-50%);
}

.database-tabs,
.query-tabs {
    gap: 3px;
    padding-left: 7px;
    scrollbar-width: thin;
}

.database-tab {
    min-height: 34px;
    color: #475467;
    background: #e9eef5;
    border-color: #d2dae5;
    border-radius: 7px 7px 0 0;
}

.database-tab.active {
    color: var(--ui-primary);
    background: var(--ui-surface);
    border-color: #a9c8f5;
}

.database-tab-name {
    font-size: 12px;
}

.query-workspace-bar {
    min-height: 40px;
    padding: 5px 6px 0;
    background: var(--ui-surface);
    border-right: 1px solid var(--ui-border);
    border-bottom: 1px solid var(--ui-border);
    border-left: 1px solid var(--ui-border);
}

.query-tab {
    min-height: 31px;
    color: #667085;
    background: transparent;
    border-color: transparent;
    border-radius: 6px 6px 0 0;
}

.query-tab:hover {
    background: #f2f5f9;
}

.query-tab.active {
    color: var(--ui-primary);
    background: var(--ui-primary-soft);
    border-color: #c5d9f8;
    border-bottom-color: var(--ui-primary-soft);
}

.query-command-row {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    gap: 8px;
    padding: 10px 0 12px;
}

.query-editor-column {
    min-width: 0;
}

#output-box .query-editor-column {
    width: auto;
}

#sql-editor {
    min-height: 38px;
    margin: 0;
    border-color: var(--ui-border-strong);
    border-radius: var(--ui-radius-sm);
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, .04);
}

.query-toolbar {
    width: auto !important;
    align-content: flex-start;
    flex-wrap: nowrap;
    gap: 5px;
}

.query-toolbar .toolbar-btn {
    min-width: auto;
    padding: 0 10px;
}

.result-card {
    grid-column: 1 / -1;
    min-width: 0;
    overflow: hidden;
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
}

.result-toolbar {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 10px;
    background: var(--ui-surface-muted);
    border-bottom: 1px solid var(--ui-border);
}

.result-title {
    font-size: 13px;
    font-weight: 700;
}

.density-control,
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ui-muted);
    font-size: 11px;
    font-weight: 600;
}

.density-control select,
.pagination-controls select {
    height: 30px;
    padding: 0 27px 0 8px;
    color: #344054;
    background: #fff;
    border: 1px solid var(--ui-border-strong);
    border-radius: 6px;
}

.result-table-scroll {
    height: auto;
    min-height: 0;
    max-height: 680px;
    overflow: auto;
}

#data {
    width: max-content;
    min-width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

#data th,
#data td {
    min-width: 110px;
    max-width: 340px;
    padding: 7px 9px;
    overflow: hidden;
    color: #344054;
    font-size: 12px;
    text-overflow: ellipsis;
    vertical-align: middle;
    border: 0;
    border-right: 1px solid #edf0f4;
    border-bottom: 1px solid #edf0f4;
}

#data thead th {
    position: sticky;
    top: 0;
    z-index: 8;
    color: #344054;
    font-weight: 700;
    background: #f7f9fc;
    border-bottom-color: var(--ui-border-strong);
}

#data tbody tr:nth-child(even) td {
    background: #fbfcfe;
}

#data tbody tr:hover td {
    background: #f1f6fd;
}

body.table-density-comfortable #data th,
body.table-density-comfortable #data td {
    padding: 11px 12px;
    font-size: 13px;
}

#data .row-action-cell {
    position: sticky;
    right: 0;
    z-index: 7;
    min-width: 112px !important;
    background: #fff;
    box-shadow: -5px 0 10px rgba(16, 24, 40, .05);
}

#data thead .row-action-cell {
    z-index: 12;
    background: #f7f9fc;
}

#data tbody tr:nth-child(even) .row-action-cell {
    background: #fbfcfe;
}

#data tbody tr:hover .row-action-cell {
    background: #f1f6fd;
}

.row-action-btn {
    height: 27px;
    margin-right: 3px;
    padding: 0 7px;
    color: #475467;
    font-weight: 600;
    border-color: var(--ui-border);
    border-radius: 5px;
}

.row-action-btn:hover {
    color: var(--ui-primary);
    border-color: #9dc2fb;
}

.row-action-btn.delete:hover {
    color: var(--ui-danger);
    background: #fff5f4;
    border-color: #f4aaa5;
}

.query-result-status {
    min-height: 32px;
    padding: 8px 10px;
    border-top: 1px solid var(--ui-border);
}

.result-footer {
    position: static !important;
    left: auto !important;
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 10px;
    background: var(--ui-surface-muted);
    border-top: 1px solid var(--ui-border);
}

.result-range {
    color: var(--ui-muted);
    font-size: 11px;
    font-weight: 600;
}

.pagination-btn,
.pagination-page {
    display: inline-flex;
    height: 30px;
    align-items: center;
    justify-content: center;
    color: #344054;
    background: #fff;
    border: 1px solid var(--ui-border-strong);
    border-radius: 6px;
}

.pagination-btn {
    width: 30px;
    padding: 0;
    font-size: 20px;
}

.pagination-page {
    min-width: 58px;
    padding: 0 9px;
    font-size: 11px;
    font-weight: 700;
}

.pagination-btn:hover,
.pagination-page:hover {
    color: var(--ui-primary);
    border-color: #8eb8f5;
}

.pagination-btn.disabled {
    color: #b4bdc9;
    background: #f4f6f8;
    cursor: not-allowed;
}

footer {
    margin: 10px 0;
    color: #98a2b3;
    font-size: 11px;
}

@media (max-width: 1180px) {
    .query-command-row {
        grid-template-columns: 1fr;
    }

    .query-toolbar {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .result-card {
        grid-column: 1;
    }
}

@media (max-width: 767px) {
    .row.content {
        display: block;
    }

    .sidenav {
        position: fixed;
        width: min(86vw, 320px);
    }

    .workspace {
        width: 100%;
        padding: 8px;
    }

    #dropzone,
    body.database-loaded #dropzone {
        min-height: 42px;
    }

    body:not(.database-loaded) .workspace .card {
        min-height: calc(100dvh - 68px);
    }

    body:not(.database-loaded) #dropzone {
        width: calc(100% - 16px);
        height: 240px !important;
        min-height: 240px !important;
    }

    #dropzone .panel-body,
    body.database-loaded #dropzone .panel-body {
        min-height: inherit;
        padding: 12px;
    }

    #output-box {
        padding: 0 8px 8px;
    }

    .workspace-command-bar {
        flex-direction: row;
        align-items: center;
    }

    .database-workbench-actions {
        width: auto;
        flex-wrap: nowrap;
    }

    .database-workbench-actions .toolbar-btn {
        flex: 0 0 auto;
    }

    .database-status {
        overflow: hidden;
    }

    #database_status_text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .database-session-bar {
        padding-right: 8px;
    }

    .tab-strip-label {
        display: none;
    }

    .query-command-row {
        padding-top: 8px;
    }

    .query-toolbar {
        padding: 0 0 4px;
    }

    .query-toolbar .toolbar-btn {
        flex: 0 0 auto;
    }

    .result-table-scroll {
        height: auto;
        min-height: 0;
        max-height: calc(100dvh - 330px);
    }

    .result-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .pagination-controls {
        width: 100%;
        justify-content: flex-end;
    }
}
