body::-webkit-scrollbar {
    width: 0px;
}

.sqlitemain {
    position: fixed;
    top: 0;
    left: 0;
    display: none;
    flex-direction: column;
    height: 100vh;
    z-index: 999999999999;
    width: 100%;
    background: #0d1117;
}

.sqlitemain::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.sqlitemain::-webkit-scrollbar-track {
    background: transparent;
}

.sqlitemain::-webkit-scrollbar-thumb {
    background: #484f58;
    border-radius: 3px;
}

.sqlitemain::-webkit-scrollbar-thumb:hover {
    background: #7d8590;
}

#dataScroll::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

#dataScroll::-webkit-scrollbar-track {
    background: transparent;
}

#dataScroll::-webkit-scrollbar-thumb {
    background: #484f58;
    border-radius: 3px;
}

#tableList::-webkit-scrollbar-thumb:hover {
    background: #7d8590;
}

#tableList::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

#tableList::-webkit-scrollbar-track {
    background: transparent;
}

#tableList::-webkit-scrollbar-thumb {
    background: #484f58;
    border-radius: 3px;
}

#tableList::-webkit-scrollbar-thumb:hover {
    background: #7d8590;
}

#panelSchema::-webkit-scrollbar-thumb:hover {
    background: #7d8590;
}

#panelSchema::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

#panelSchema::-webkit-scrollbar-track {
    background: transparent;
}

#panelSchema::-webkit-scrollbar-thumb {
    background: #484f58;
    border-radius: 3px;
}

#panelSchema::-webkit-scrollbar-thumb:hover {
    background: #7d8590;
}

/* ################################################### */


.sqlitealerts .layui-layer-content {
    padding: 0.5rem;
}

.sqlitealerts textarea {
    width: 100%;
    height: 7.5rem;
    padding: 0.25rem;
}

/* ################################################### */

.mono {
    font-family: 'JetBrains Mono', monospace;
}

/* 拖拽覆盖层 */
.drop-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 214, 143, 0.06);
    border: 3px dashed #00d68f;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.drop-overlay.active {
    display: flex;
}

/* 侧边栏 */
.sidebar {
    width: 180px;
    min-width: 180px;
    background: #151b23;
    border-right: 1px solid #2a313a;
    display: flex;
    flex-direction: column;
}

.table-item {
    padding: 9px 16px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #79c0ff;
}

.table-item:hover {
    background: #212830;
}

.table-item.active {
    background: rgba(0, 214, 143, 0.12);
    border-left-color: #00d68f;
    color: #00d68f;
}

.table-item .t-icon {
    font-size: 11px;
    color: #7d8590;
    width: 16px;
    text-align: center;
}

.table-item.active .t-icon {
    color: #00d68f;
}

.table-itemspans{
    font-size: 12px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-count {
    margin-left: auto;
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 10px;
    background: #212830;
    color: #7d8590;
}

.table-item.active .table-count {
    background: rgba(0, 214, 143, 0.18);
    color: #00d68f;
}

/* 选项卡 */
.tab-bar {
    display: flex;
    background: #151b23;
    border-bottom: 1px solid #2a313a;
    padding: 0 16px;
}

.tab-btn {
    padding: 10px 10px;
    font-size: 12px;
    color: #7d8590;
    cursor: pointer;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-btn:hover {
    color: #e6edf3;
}

.tab-btn.active {
    color: #00d68f;
    border-bottom-color: #00d68f;
}

/* 数据表格 */
.dt {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dt thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.dt th {
    background: #212830;
    color: #7d8590;
    font-weight: 600;
    text-align: left;
    padding: 8px 14px;
    border-bottom: 1px solid #2a313a;
    white-space: nowrap;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.dt td {
    padding: 6px 14px;
    border-bottom: 1px solid #2a313a;
    white-space: nowrap;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
    color: #79c0ff;
}

.dt tr:hover td {
    background: #212830;
}

.dt td.null-v {
    color: #484f58;
    font-style: italic;
    font-size: 12px;
}

.dt td.num-v {
    font-family: 'JetBrains Mono', monospace;
    color: #79c0ff;
}

.dt td.clickable {
    cursor: pointer;
}

.dt td.clickable:hover {
    background: #292e36;
}

/* SQL 编辑器 */
.sql-editor {
    width: 100%;
    min-height: 130px;
    max-height: 280px;
    resize: vertical;
    background: #0d1117;
    color: #e6edf3;
    border: 1px solid #2a313a;
    border-radius: 8px;
    padding: 0.7rem 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    line-height: 1.6;
    outline: none;
    transition: border-color .2s;
    tab-size: 2;
}

.sql-editor:focus {
    border-color: #00d68f;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid #2a313a;
    background: #212830;
    color: #e6edf3;
    transition: all .15s;
}

.btn:hover {
    background: #292e36;
}

.btn-p {
    background: #00d68f;
    color: #000;
    border-color: #00d68f;
}

.btn-p:hover {
    background: #00f5a0;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* 欢迎上传区 */
.upload-zone {
    width: 460px;
    padding: 56px 40px;
    border: 2px dashed #2a313a;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all .25s;
    background: #151b23;
}

.upload-zone:hover {
    border-color: #00d68f;
    background: rgba(0, 214, 143, 0.12);
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #151b23;
    border-top: 1px solid #2a313a;
    font-size: 13px;
}

.pg-btn {
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    cursor: pointer;
    background: #212830;
    border: 1px solid #2a313a;
    color: #7d8590;
    font-size: 12px;
    transition: all .15s;
    padding: 0 4px;
}

.pg-btn:hover:not(:disabled) {
    background: #292e36;
    color: #e6edf3;
}

.pg-btn:disabled {
    opacity: .3;
    cursor: not-allowed;
}

.pg-btn.active {
    background: #00d68f;
    color: #000;
    border-color: #00d68f;
    font-weight: 600;
}

/* Toast */
.toast-wrap {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    animation: tIn .3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
    max-width: 360px;
}

.toast.success {
    background: #0f5323;
    color: #3fb950;
    border: 1px solid #238636;
}

.toast.error {
    background: #4c1118;
    color: #f85149;
    border: 1px solid #da3633;
}

.toast.info {
    background: #0c2d6b;
    color: #58a6ff;
    border: 1px solid #1f6feb;
}

@keyframes tIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 弹窗 */
.modal-bg {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, .6);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-bg.active {
    display: flex;
}



.modal-box {
    background: #151b23;
    border: 1px solid #2a313a;
    border-radius: 12px;
    width: 620px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .5);
}

.modal-head {
    padding: 14px 20px;
    border-bottom: 1px solid #2a313a;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 20px;
    overflow: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 表结构 / 索引表格 */
.st {
    width: 100%;
    border-collapse: collapse;
}

.st th {
    background: #212830;
    color: #7d8590;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 8px 14px;
    text-align: left;
    border-bottom: 1px solid #2a313a;
}

.st td {
    padding: 7px 10px;
    border-bottom: 1px solid #2a313a;
    font-size: 12px;
    color: #79c0ff;
    min-width: 150px;
}

.st tr:hover td {
    background: #212830;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-pk {
    color: #00d68f;
}

.badge-nn {
    color: #d29922;
}

.badge-tp {
    color: #58a6ff;
}

.badge-uq {
    color: #bc8cff;
}

/* 搜索框 */
.sbox {
    background: #0d1117;
    border: 1px solid #2a313a;
    border-radius: 6px;
    padding: 6px 10px 6px 10px;
    color: #e6edf3;
    font-size: 13px;
    outline: none;
    width: 100%;
    transition: border-color .2s;
}

.sbox:focus {
    border-color: #00d68f;
}

/* 引擎状态 */
.engine-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 6px;
}

.engine-status.loading {
    background: rgba(210, 153, 34, .1);
    color: #d29922;
}

.engine-status.ready {
    background: rgba(0, 214, 143, .12);
    color: #00d68f;
}

.engine-status.error {
    background: rgba(248, 81, 73, .1);
    color: #f85149;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #484f58;
    border-top-color: #00d68f;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

.dinglan {
    background: #151b23;
    border-bottom: 1px solid #2a313a;
    padding: 0 16px;
    display: flex;
    align-items: center;
    height: 48px;
    gap: 16px;
    flex-shrink: 0
}

#dbName{
    font-size: 12px;
    color: #7d8590;
    width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dbbutss{
    margin-left:auto;
    display:flex;
    align-items:center;
    gap:8px
}

#sqlPlaceholder {
    padding: 40px;
    text-align: center;
    color: #484f58
}

#sqlStatus {
    padding: 6px 16px;
    background: #151b23;
    border-top: 1px solid #2a313a;
    font-size: 12px;
    color: #7d8590
}

#panelIndexes {
    flex: 1;
    overflow: auto;
    display: none;
    padding: 20px
}

#sqlScroll {
    flex: 1;
    overflow: auto;
    border-top: 1px solid #2a313a
}

#panelSchema {
    flex: 1;
    overflow: auto;
    display: none;
    padding: 20px
}

#panelSql {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden
}

#panelSql2{
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex-shrink: 0;
    flex-direction: column;
}

#panelSql3{
    display: flex;
    flex-direction: row;
    gap: 6px;
}

#panelData {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden
}

#dbContent {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow: hidden
}

.h3_1{
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #79c0ff;
}

.h3_2{
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px
}

.h3_3{
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #79c0ff;
}

.h4_1{
    font-size: 12px;
    font-weight: 600;
    color: #7d8590;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.h4_2{
    font-size: 12px;
        font-weight: 600;
        color: #7d8590;
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: .5px
}

#dbStats{
    padding:8px 14px;border-top:1px solid #2a313a;font-size:11px;color:#484f58
}

#tableList{
    flex:1;overflow-y:auto;padding:6px 0
}