* { box-sizing: border-box; }
:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --border: #e4e8ee;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --ok: #16a34a;
  --danger: #dc2626;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }

.topbar {
  height: 60px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  box-shadow: var(--shadow);
}
.brand { font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.brand-icon { color: var(--primary); margin-right: 6px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.container {  padding: 0 20px; }
.container-wide { max-width: 100%; }
.page-title { margin: 0 0 18px; }
.page-title p { margin: 4px 0 0; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat { background: #f8fafc; border: 1px solid #eef1f5; border-radius: 8px; padding: 12px 14px; min-width: 0; }
.stat-label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.stat-value { display: block; font-weight: 600; word-break: break-all; }
.stat-value.small { font-weight: 400; color: var(--muted); font-size: 12px; }

.actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.inline-form { display: inline; margin: 0; }

.badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-ok { background: #dcfce7; color: var(--ok); }
.badge-off { background: #f3f4f6; color: var(--muted); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; background: #f3f4f6; color: var(--muted); font-size: 12px; }
.tag-active { background: #dbeafe; color: var(--primary); }
.tag-info { background: #e0f2fe; color: #0369a1; }
.req { color: var(--danger); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid transparent; border-radius: 6px; padding: 8px 14px;
  font-size: 13px; font-weight: 500; cursor: pointer; line-height: 1.2;
  font-family: inherit; transition: background .15s, border-color .15s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; padding: 11px; font-size: 15px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover:not(:disabled) { border-color: #c7ced9; background: #f9fafb; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { color: var(--primary); background: #eff6ff; }
.btn-danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover:not(:disabled) { background: #fef2f2; }

.upload-form { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; }
.upload-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.upload-form select, .upload-form input[type=file], .upload-form input[type=text], .upload-form input[type=number] {
  border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px;
  background: #fff; color: var(--text); font-family: inherit; font-size: 13px;
}
.checkbox-inline { flex-direction: row !important; align-items: center; gap: 6px !important; font-size: 12px !important; }
.checkbox-inline input { width: 14px; height: 14px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; background: #f9fafb; }
tbody tr:last-child td { border-bottom: none; }
td.ops { white-space: nowrap; }
td.ops > * { margin-right: 6px; }
.empty { text-align: center; color: var(--muted); padding: 26px 0; }

.log-box {
  background: #111827; color: #d1d5db; border-radius: 8px; padding: 16px;
  max-height: 380px; overflow: auto; font-size: 12px; line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; margin: 0; white-space: pre-wrap;
}

.alert { padding: 11px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; }
.alert-ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.app-block { margin-bottom: 22px; }
.slot { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; margin-top: 14px; background: #fcfdff; }
.slot-head { display: flex; align-items: center; gap: 12px; }
.slot-head h4 { font-size: 14px; margin: 0; }
.slot-stats { display: flex; gap: 20px; flex-wrap: wrap; font-size: 12px; margin: 10px 0; color: var(--muted); }
.slot-stats b { color: var(--text); font-weight: 600; }
.slot .actions { margin: 10px 0; }
.slot-upload { border-top: 1px dashed var(--border); padding-top: 12px; margin-bottom: 12px; }
.config-fold, .log-fold { margin: 10px 0; }
.config-fold summary, .log-fold summary { cursor: pointer; color: var(--primary); font-size: 13px; padding: 6px 0; }
.config-form { padding: 12px 0 4px; border-top: 1px dashed var(--border); }
.config-form input[type=text] { min-width: 180px; }

/* ---- 只读数据库查询 ---- */
.db-box { padding: 4px 0 8px; }
.db-conn { border: 1px solid var(--border); border-left: 3px solid var(--muted); border-radius: 6px;
  padding: 10px 12px; background: #f9fafb; margin: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.db-conn-ok { border-left-color: var(--ok); }
.db-conn-off { border-left-color: #f59e0b; }
.db-box input[type=text], .db-box input[type=password], .db-box select { min-width: 160px; }
.db-toolbar { display: flex; align-items: center; gap: 12px; margin: 12px 0 8px; flex-wrap: wrap; }
.db-layout { display: grid; grid-template-columns: 240px 1fr; gap: 14px; align-items: start; }
@media (max-width: 820px) { .db-layout { grid-template-columns: 1fr; } }
.db-tables { border: 1px solid var(--border); border-radius: 8px; padding: 10px; max-height: 360px; overflow: auto; background: #fcfdff; }
.db-table-item { display: flex; align-items: center; gap: 4px; padding: 4px 0; border-bottom: 1px dashed var(--border); }
.db-table-item:last-child { border-bottom: none; }
.db-table-item .mono { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.db-sql { width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: 10px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px; color: var(--text); resize: vertical; margin-top: 4px; }
.db-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
#result-table table, .db-main table { table-layout: auto; }
.db-main td.mono { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-page { text-align: center; color: var(--muted); padding: 40px 0; }

.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #eef2ff 0%, #f5f7fa 45%, #f8fafc 100%); }
.login-card { width: 380px; max-width: calc(100vw - 40px); background: #fff; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 12px 32px rgba(16,24,40,.1); padding: 34px 32px; }
.login-logo { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: #eff6ff; color: var(--primary); font-size: 24px; margin-bottom: 18px; }
.login-card h1 { font-size: 22px; }
.login-card .subtitle { color: var(--muted); margin: 6px 0 24px; }
.login-card label { display: block; margin-bottom: 14px; font-size: 13px; color: #374151; }
.login-card input { display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; }
.login-card input:focus { outline: 2px solid #bfdbfe; border-color: var(--primary); }
.login-card .hint { text-align: center; color: var(--muted); font-size: 12px; margin: 18px 0 0; }

/* ---------- 基础增强 ---------- */
:root { --radius: 12px; --radius-sm: 8px; --ease: cubic-bezier(.4,0,.2,1); }
.topbar { position: sticky; top: 0; z-index: 40; }
.topbar-right .btn { margin-left: 4px; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-title h2 { letter-spacing: -.2px; }
.card-head h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-head .btn, .card-head .inline-form { flex-shrink: 0; }
.card-head-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- 应用配置弹窗的表格化分区 ---------- */
.cfg-section { margin-bottom: 26px; }
.cfg-section:last-child { margin-bottom: 0; }
.cfg-title { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 10px; padding-left: 9px; border-left: 3px solid var(--primary); }
.cfg-title .muted { font-weight: 400; margin-left: 8px; }
.cfg-table { table-layout: fixed; }
.cfg-table th, .cfg-table td { padding: 9px 12px; vertical-align: middle; }
.cfg-table td:nth-child(2) input[type=text], .cfg-table td:nth-child(2) input[type=number],
.cfg-table td:nth-child(2) select { width: 100%; min-width: 0; }
.cfg-table td .upload-form { width: 100%; }
.cfg-table td .upload-form input[type=file] { min-width: 0; max-width: 100%; }
.cfg-table td.mono { white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
.cfg-table input:disabled, .cfg-table select:disabled { background: #f3f4f6; color: var(--muted); }
.cfg-table .checkbox-inline { margin-right: 14px; }
input[type=time] { border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-family: inherit; font-size: 13px; background: #fff; color: var(--text); }
.alert { display: flex; align-items: center; gap: 8px; }
.alert:empty { display: none; }
.alert-ok { border-left: 4px solid var(--ok); }
.alert-error { border-left: 4px solid var(--danger); }
.inline-form { display: inline-flex; }
.inline-form input[type=checkbox] { margin: 0; }
.upload-form { align-items: flex-end; }
.upload-form > label { flex: 0 0 auto; }

/* ---------- 表单控件 ---------- */
input[type=text], input[type=number], input[type=password], select, textarea {
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
  background: #fff; color: var(--text); font-family: inherit; font-size: 13px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
input[type=text]:focus, input[type=number]:focus, input[type=password]:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15); background: #fff;
}
.btn:focus-visible, .db-entry:focus-visible, .modal-close:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}

/* ---------- 表格（通用） ---------- */
.table-wrap { overflow: auto; max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.table-wrap:has(table:empty) { display: none; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; background: #f8fafc; white-space: nowrap; }
thead th { position: sticky; top: 0; z-index: 2; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f8fafc; }
td.mono, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; }
td.mono { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top; }
td.num { text-align: right; font-variant-numeric: tabular-nums; color: #0f172a; }
td.bool { color: #7c3aed; font-weight: 600; }
td.ops { white-space: nowrap; }
td.ops > * { margin-right: 6px; }
td.ops > *:last-child { margin-right: 0; }
.empty { text-align: center; color: var(--muted); padding: 26px 0; }

/* ---------- 部署槽位卡片 ---------- */
.slot { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 14px; background: #fcfdff; box-shadow: 0 1px 2px rgba(16,24,40,.03); }
.slot-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.slot-head h4 { font-size: 14px; margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.slot-head .badge { margin-left: auto; }
.slot-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px 16px; font-size: 12px; margin: 10px 0; color: var(--muted); }
.slot-stats b { color: var(--text); font-weight: 600; word-break: break-all; }
.slot-upload { border-top: 1px dashed var(--border); padding-top: 12px; margin-bottom: 12px; }
.slot .upload-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.slot .upload-form label { font-size: 12px; color: var(--muted); }
.slot .upload-form input[type=file] { padding: 5px 8px; font-size: 12px; }
.slot-backend { border-left: 4px solid var(--primary); }
.slot-frontend { border-left: 4px solid #8b5cf6; }
.slot-static { border-left: 4px solid #0ea5e9; }
.slot-ico { font-size: 15px; line-height: 1; }

/* ---------- 数据库入口按钮 ---------- */
.db-entry { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-family: inherit; font-size: 13px; transition: border-color .15s var(--ease), background .15s var(--ease), transform .15s var(--ease); }
.db-entry:hover { border-color: #c7ced9; background: #f8fafc; }
.db-entry:active { transform: scale(.995); }
.db-entry-icon { font-size: 18px; line-height: 1; }
.db-entry-label { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.db-entry-label strong { font-weight: 600; color: var(--text); }
.db-entry-label small { color: var(--muted); font-size: 12px; }
.db-entry-state { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.db-entry-state-ok { background: #dcfce7; color: #15803d; }
.db-entry-state-off { background: #fef3c7; color: #b45309; }
.db-entry-arrow { color: var(--muted); font-size: 18px; line-height: 1; }

/* ---------- 全屏弹框 ---------- */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 90; background: rgba(15,23,42,.55); backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px); padding: 0; overflow: hidden; }
.modal-panel { background: #fff; width: 100vw; height: 100vh; height: 100dvh; margin: 0; border-radius: 0;
  display: flex; flex-direction: column; overflow: hidden; animation: modalIn .18s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: #fff; flex-shrink: 0; }
.modal-head h3 { font-size: 15px; margin: 0; }
.modal-head p { margin: 2px 0 0; }
.modal-close { border: 1px solid var(--border); background: #fff; color: var(--muted); width: 32px; height: 32px; border-radius: 8px; font-size: 18px; line-height: 1; cursor: pointer; }
.modal-close:hover { background: #f3f4f6; color: var(--text); }
.modal-body { padding: 16px 18px 20px; overflow: auto; flex: 1; min-height: 0; }
.db-box { padding: 2px 0 4px; }
.db-conn { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 14px; border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: var(--radius-sm);
  padding: 12px; background: #f9fafb; margin: 8px 0 12px; }
.db-conn-ok { border-left-color: var(--ok); }
.db-conn-off { border-left-color: #f59e0b; }
.db-conn > div { min-width: 0; overflow-wrap: anywhere; }
.db-conn .mono { overflow-wrap: anywhere; }
.db-conn .hint { color: #b45309; }
.db-box input[type=text], .db-box input[type=password], .db-box select { min-width: 0; }
.db-toolbar { display: flex; align-items: center; gap: 12px; margin: 12px 0 8px; flex-wrap: wrap; }
.db-layout { --db-side-w: 260px; display: grid; grid-template-columns: var(--db-side-w) 8px minmax(0, 1fr); gap: 0; align-items: stretch; }
.db-layout.collapsed { grid-template-columns: 0 8px minmax(0, 1fr); }
.db-layout.collapsed .db-tables { display: none; }
.db-divider { position: relative; display: flex; align-items: center; justify-content: center; min-height: 120px;
  cursor: col-resize; user-select: none; touch-action: none; color: var(--muted); background: #f1f5f9;
  border: 1px solid var(--border); border-radius: 4px; }
.db-divider:hover { background: #e2e8f0; color: var(--primary); }
.db-divider span { font-size: 14px; pointer-events: none; }
body.db-resizing, body.db-resizing * { cursor: col-resize !important; user-select: none !important; }
.db-main { min-width: 0; }
.db-tables { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; max-height: 60vh; overflow: auto; background: #fcfdff; min-width: 0; }
.db-table-item { display: flex; align-items: center; gap: 4px; padding: 4px 0; border-bottom: 1px dashed var(--border); }
.db-table-item:last-child { border-bottom: none; }
.db-table-item .mono { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.db-sql { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px; color: var(--text); resize: vertical; margin-top: 4px; min-height: 76px; line-height: 1.55; }
.db-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
#result-table, .db-main table { min-width: 100%; }
.db-main td.mono { max-width: 260px; }
.db-main .table-wrap { margin-top: 10px; max-height: 60vh; overflow: auto; }
.db-main .table-wrap table { font-size: 12.5px; width: max-content; min-width: 100%; }
.db-main .table-wrap th, .db-main .table-wrap td { padding: 7px 10px; }
.db-main .table-wrap td.mono { max-width: 480px; }
.db-main .table-wrap td { max-width: 480px; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.db-main .table-wrap tbody tr:hover td { background: #f8fafc; }
.db-conn-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef2ff; color: var(--primary-dark); }
.db-conn-chip.off { background: #fef3c7; color: #b45309; }
.db-conn-chip.ok { background: #dcfce7; color: #15803d; }

/* ---------- 应用表格（首页主视图） ---------- */
.app-table-card { padding: 18px 20px; }
.app-table { table-layout: auto; }
.app-table th, .app-table td { vertical-align: middle; padding: 12px 10px; }
.app-table td.ops { white-space: normal; width: 1%; }
.app-table td.ops .btn { margin: 2px 4px 2px 0; }
.app-table .version-cell { font-size: 12px; overflow-wrap: anywhere; }
.app-table .version-cell div + div { margin-top: 3px; }

/* 单元格悬浮提示 + 点击复制 */
.app-table td.copyable { position: relative; cursor: copy; }
.app-table td.copyable.has-tip:hover::after {
  content: attr(data-tip);
  position: absolute; left: 8px; bottom: calc(100% - 4px); z-index: 30;
  max-width: 320px; padding: 6px 9px; border-radius: 6px;
  background: #111827; color: #f9fafb; font-size: 12px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-all; pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.app-table td.copyable.copied::before {
  content: '已复制'; position: absolute; right: 8px; top: 6px; z-index: 31;
  padding: 2px 7px; border-radius: 5px; background: #16a34a; color: #fff;
  font-size: 11px; pointer-events: none;
}

/* 操作列：主按钮一行 + 「更多」下拉 */
.ops-row { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; }
.ops-row form { margin: 0; }
.ops-more { position: relative; }
.ops-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  min-width: 130px; padding: 6px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.ops-more.open .ops-menu { display: flex; flex-direction: column; gap: 4px; }
.ops-menu .btn { width: 100%; text-align: left; margin: 0; white-space: nowrap; }
.delete-app-form { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- 日志弹窗 ---------- */
.log-section { margin-bottom: 22px; }
.log-section:last-child { margin-bottom: 0; }
.log-full { max-height: none; height: calc(100vh - 190px); min-height: 300px; box-sizing: border-box; }

/* 表列表宽度：拖拽时右侧结果区至少保留 360px，避免整页空白 */
.db-layout { --db-side-w: 240px; grid-template-columns: minmax(180px, var(--db-side-w)) 8px minmax(360px, 1fr); }
.db-layout.collapsed { grid-template-columns: 0 8px minmax(0, 1fr); }

/* ---------- 滚动条 ---------- */
* { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #94a3b8; background-clip: content-box; }

@media (max-width: 720px) {
  .container { padding: 0 12px; margin: 16px auto 40px; }
  .topbar { padding: 0 14px; }
  .topbar-right { gap: 10px; }
  .modal-overlay { padding: 0; }
  .modal-panel { height: 100vh; height: 100dvh; border-radius: 0; }
  .db-layout, .db-layout.collapsed { grid-template-columns: 1fr !important; }
  .db-layout.collapsed .db-tables { display: none; }
  .db-divider { display: none; }
  .db-main .table-wrap { max-height: 46vh; }
  .brand { font-size: 15px; }
}
