/* Data-center styles stay scoped to the database workspace. */
.main.database-main { padding: 0; height: calc(100vh - 48px); min-height: 0; overflow: hidden; }
.dc-workspace { display: grid; grid-template-columns: 228px minmax(0,1fr); height: 100%; min-height: 0; background: #fff; font-size: 13px; color: #384251; }
.dc-workspace [hidden] { display: none!important; }
.dc-workspace button, .dc-workspace input, .dc-workspace select { font: inherit; }
.dc-catalog { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid #e7ebee; background: #fcfdfd; }
.dc-source-section { flex-shrink: 0; padding: 21px 14px 16px; border-bottom: 1px solid #ebedef; }
.dc-section-title { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; color: #8d96a3; letter-spacing: .5px; margin-bottom: 12px; }
.dc-section-title > span { color: #adb5bf; font-size: 10px; font-weight: 400; }
.dc-section-title > button { margin-left: auto; }
.dc-source-list { display: flex; flex-direction: column; gap: 4px; max-height: min(38vh,360px); overflow: auto; scrollbar-width: thin; }
.dc-source { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 8px; border: 1px solid transparent; border-radius: 7px; color: #67776d; background: transparent; text-align: left; cursor: pointer; }
.dc-source:hover { background: #f0f5f2; }
.dc-source.active { color: #fff; background: #243e37; box-shadow: 0 3px 7px #1233270a; }
.dc-source-icon { width: 28px; height: 28px; flex-shrink: 0; border-radius: 6px; display: grid; place-items: center; background: #edf3ef; color: #91a698; }
.dc-source.active .dc-source-icon { background: #ffffff15; color: #b7dfca; }
.dc-source-copy { min-width: 0; flex: 1; }
.dc-source strong { display: block; font-size: 12px; font-weight: 550; }
.dc-source small { display: block; color: #a0ada5; font-size: 9px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-source.active small { color: #a7bfb5; }
.dc-source-count { flex-shrink: 0; color: #9baaa1; font-size: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dc-source.active .dc-source-count { color: #b0c8bc; }
.dc-source-all { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 35px; margin-bottom: 5px; padding: 7px 9px; border: 1px solid #e4ece7; border-radius: 6px; background: #fff; color: #7d8d83; text-align: left; cursor: pointer; }
.dc-source-all > span:first-child { display: flex; }
.dc-source-all > small { margin-left: auto; color: #9eaaa3; font-size: 10px; white-space: nowrap; }
.dc-source-all:hover, .dc-source-all.active { color: #2d8d56; background: #edf7f0; border-color: #cee5d5; }
.dc-source-all.active > small { color: #6b9b7c; }
.dc-section-title > .dc-table-source-label { color: #8f9f96; letter-spacing: 0; white-space: nowrap; }
.dc-connection { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; color: #9aa4ae; margin: 12px 3px 0; }
.dc-connection > span:first-child { color: #479474; display: flex; align-items: center; gap: 4px; }
.dc-connection > span.dc-danger { color: #b84a4a; }
.dc-table-section { flex: 1; min-height: 0; overflow: auto; padding: 20px 10px; }
.dc-table-section > .dc-section-title { padding: 0 7px; }
.dc-search { display: flex; align-items: center; gap: 7px; border: 1px solid #e4e8eb; border-radius: 6px; padding: 6px 9px; background: #fff; color: #9ba4af; }
.dc-search input { width: 100%; min-width: 0; border: 0; outline: none; color: #485563; background: transparent; font-size: 12px; padding: 0; box-shadow: none!important; }
.dc-search input:focus { box-shadow: none!important; }
.dc-table-search { margin: 0 4px 12px; }
.dc-table-item { display: flex; align-items: center; gap: 0; padding-right: 5px; margin: 3px 0; border-radius: 6px; }
.dc-table-item > button:first-child { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; padding: 10px 8px; border: 0; background: none; text-align: left; color: #657181; }
.dc-table-item > button:first-child > svg { color: #9da9b2; flex-shrink: 0; }
.dc-table-item > button:first-child > span { flex: 1; }
.dc-table-item small { color: #a3abb5; font-size: 10px; font-variant-numeric: tabular-nums; }
.dc-table-item:hover { background: #f0f4f2; }
.dc-table-item.active { background: #e9f5ee; }
.dc-table-item.active > button:first-child { color: #248451; font-weight: 600; }
.dc-table-item.active svg { color: #39a26b!important; }
.dc-star { border: 0; background: none; color: #bdc6cd; padding: 4px; font-size: 17px!important; }
.dc-star.starred { color: #d3a13e; }
.dc-list-empty { color: #9ca5af; font-size: 12px; text-align: center; padding: 20px 0; }
.dc-source-note { display: flex; gap: 8px; margin: 14px; padding: 12px 10px; border: 1px solid #e8eeeb; background: #f2f7f4; border-radius: 7px; color: #749180; }
.dc-source-note > svg { flex-shrink: 0; margin-top: 2px; }
.dc-source-note strong { font-size: 11px; font-weight: 500; color: #597c66; }
.dc-source-note p { font-size: 10px; line-height: 1.8; margin: 4px 0 0; color: #8ba093; }
.dc-content { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.dc-header { padding: 19px 24px 16px; }
.dc-breadcrumb { display: flex; gap: 12px; align-items: center; font-size: 11px; color: #9da6b0; margin-bottom: 18px; }
.dc-breadcrumb span { color: #cbd2d7; }
.dc-heading { display: flex; align-items: center; gap: 12px; }
.dc-table-icon { width: 44px; height: 44px; display: grid; place-items: center; background: #edf6f0; color: #369b63; border-radius: 10px; border: 1px solid #dfeee4; }
.dc-heading h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; font-size: 20px; font-weight: 600; color: #27332e; line-height: 1.4; }
.dc-heading p { margin: 4px 0 0; font-size: 12px; color: #939ca7; }
.dc-demo-badge { background: #fbf4e5; color: #b59044; border: 1px solid #f1e8cf; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 400; }
.dc-real-badge { background: #edf7f0; color: #2c925a; border: 1px solid #cee5d5; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 400; }
.dc-catalog-warning { margin: 0; padding: 9px 24px; background: #fff9ec; color: #927032; border-block: 1px solid #f1e8cf; font-size: 11px; line-height: 1.6; }
.dc-privilege-status { display: flex; align-items: center; gap: 4px; width: 100%; margin: 6px 0 0; padding: 3px; border: 0; background: none; font-size: 10px; color: #9aa4ae; text-align: left; cursor: pointer; }
.dc-privilege-status:hover { color: #39835a; }
.dc-privilege-status.dc-privilege-ok { color: #479474; }
.dc-privilege-status.dc-privilege-warning { color: #a57a2a; }
.dc-privilege-status.dc-privilege-error { color: #b84a4a; }
.dc-privilege-warning { display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 24px; background: #fff9ec; color: #927032; border-block: 1px solid #f1e8cf; font-size: 11px; line-height: 1.6; }
.dc-privilege-warning.dc-privilege-error { background: #fdf3f2; color: #a8463f; border-color: #f3dcda; }
.dc-privilege-warning > svg { flex-shrink: 0; }
.dc-privilege-warning > .dc-btn { margin-left: auto; min-height: 26px; padding: 3px 9px; }
.dc-privilege-panel { font-size: 11px; color: #5f6b76; }
.dc-privilege-panel .dc-panel-heading { flex-wrap: wrap; }
.dc-privilege-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 18px; margin: 4px 0 8px; }
.dc-privilege-section h3 { display: flex; gap: 6px; margin: 0 0 4px; font-size: 11px; font-weight: 600; color: #5f6b76; }
.dc-privilege-section h3 > span { color: #adb5bf; font-weight: 400; }
.dc-privilege-section ul { margin: 0; padding-left: 16px; line-height: 1.8; max-height: 168px; overflow: auto; }
.dc-privilege-panel code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; color: #3d4752; overflow-wrap: anywhere; }
.dc-privilege-ok-text { margin: 4px 0 8px; color: #479474; }
.dc-privilege-help { margin: 0; padding-left: 16px; color: #7d8894; line-height: 1.8; }
@media (max-width: 760px) { .dc-privilege-status { display: none; } .dc-privilege-warning { padding: 7px 16px; flex-wrap: wrap; } }
.dc-live { margin-left: auto; display: flex; align-items: center; gap: 6px; color: #829388; font-size: 11px; white-space: nowrap; }
.dc-live i { width: 6px; height: 6px; border-radius: 50%; background: #50af77; }
.dc-live i.offline { background: #cf6767; }
.dc-tabs { display: flex; align-items: center; gap: 22px; border-bottom: 1px solid #e8ebed; padding: 0 24px; }
.dc-tabs > .dc-btn { padding: 10px 0 12px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: #88929f; }
.dc-tabs > .dc-btn.active { border-bottom-color: #339a65; color: #2c925a; font-weight: 600; }
.dc-tabs > span { margin-left: auto; color: #a5adb6; font-size: 11px; }
.dc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 10px; min-height: 30px; border: 1px solid #e5e9ec; border-radius: 5px; background: #fff; color: #6c7785; font-size: 12px!important; white-space: nowrap; cursor: pointer; }
.dc-btn:hover { background: #f4f7f5; border-color: #d0e0d6; color: #39835a; }
.dc-btn:disabled { opacity: .42; cursor: default; }
.dc-btn.selected { color: #298852; background: #edf7f0; border-color: #d5e9dc; }
.dc-btn.dc-primary { color: #fff; background: #329b64; border-color: #329b64; }
.dc-icon-button { padding: 5px 7px; }
.dc-toolbar { display: flex; align-items: center; gap: 9px; padding: 13px 24px; border-bottom: 1px solid #e8ebed; flex-wrap: wrap; }
.dc-toolbar-actions { display: flex; align-items: center; gap: 7px; }
.dc-record-search { width: 220px; margin-left: auto; }
.dc-panel { border-bottom: 1px solid #e4ece7; background: #f9fcfa; padding: 14px 24px; }
.dc-panel-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.dc-panel-heading strong { font-size: 12px; font-weight: 500; }
.dc-panel-heading > span, .dc-hint { color: #99a69e; font-size: 11px; }
.dc-panel-heading > button { margin-left: auto; }
.dc-field-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 10px; }
.dc-field-options label { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #607366; }
.dc-field-options input { accent-color: #339b64; }
.dc-field-options small { color: #a4afa8; font-size: 10px; }
.dc-query-panel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.dc-query-panel select, .dc-query-panel input, .dc-pagination select { border: 1px solid #dfe6e1; border-radius: 5px; padding: 5px 8px; color: #67796d; background: #fff; font-size: 12px; max-width: 100%; }
.dc-applied { display: flex; align-items: center; gap: 10px; padding: 7px 24px; background: #f7faf8; color: #6a8775; border-bottom: 1px solid #ebefec; font-size: 11px; }
.dc-applied .dc-btn { border: 0; background: none; min-height: 22px; padding: 0 4px; }
.dc-grid-scroll { flex: 1; overflow: auto; min-height: 160px; position: relative; background: #fff; scrollbar-width: thin; scrollbar-color: #dce5e0 #fafcfb; }
.dc-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; white-space: nowrap; }
.dc-grid th { position: sticky; top: 0; z-index: 2; background: #f7f9f8; color: #7b8790; border-bottom: 1px solid #e1e7e3; border-right: 1px solid #e9eeeb; padding: 0; font-weight: 500; text-align: left; }
.dc-grid th > button { display: flex; align-items: center; width: 100%; gap: 7px; padding: 12px 16px; background: none; border: 0; color: inherit; text-align: left; white-space: nowrap; font-size: 11px; }
.dc-grid th > button:hover { background: #edf5ef; }
.dc-grid td { height: 42px; padding: 9px 16px; border-right: 1px solid #f0f2f1; border-bottom: 1px solid #edf0ee; max-width: 320px; overflow: hidden; text-overflow: ellipsis; color: #63706b; }
.dc-grid tr:nth-child(even) td { background: #fdfefd; }
.dc-grid tr:hover td { background: #f3f9f5; }
.dc-type { font-size: 10px; color: #a9b6ad; font-weight: 400; }
.dc-sort-arrow { margin-left: auto; padding-left: 12px; font-size: 10px; color: #aab8af; }
.dc-grid .dc-row-number { position: sticky; left: 0; text-align: center; min-width: 44px; width: 44px; padding: 0 10px; font-size: 10px; color: #a8b1b8; background: #fafcfb; }
.dc-grid th.dc-row-number { z-index: 3; }
.dc-grid td.dc-row-number { z-index: 1; }
.dc-grid .dc-numeric { font-variant-numeric: tabular-nums; text-align: right; }
.dc-record-link { border: 0; background: none; color: #46896a; padding: 0; font-size: 11px!important; font-family: ui-monospace, SFMono-Regular, monospace!important; }
.dc-record-link:hover { text-decoration: underline; }
.dc-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 4px; color: #45956a; background: #edf7f0; font-size: 10px; }
.dc-tag::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.dc-tag.amber { color: #b98b3e; background: #fcf5e7; }
.dc-tag.blue { color: #6a8eae; background: #eef5fb; }
.dc-null { color: #bcc5ce; font-style: italic; font-size: 11px; }
.dc-schema th { padding: 12px 16px; }
.dc-key { color: #b28c42; background: #faf3e5; border-radius: 4px; padding: 3px 5px; font-size: 10px; }
.dc-mono { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 11px; }
.dc-empty { min-height: 300px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; color: #a4b9ab; padding: 30px; text-align: center; }
.dc-empty strong { font-size: 14px; font-weight: 500; color: #788c7f; }
.dc-empty p { margin: 0; font-size: 12px; color: #9caaa1; }
.dc-spinner { width: 24px; height: 24px; border: 2px solid #e2eee6; border-top-color: #3f9c66; border-radius: 50%; animation: dc-spin .8s linear infinite; }
@keyframes dc-spin { to { transform: rotate(360deg); } }
.dc-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; border-top: 1px solid #e8edeb; color: #96a29b; font-size: 11px; background: #fff; }
.dc-pagination { display: flex; align-items: center; gap: 10px; }
.dc-pagination .dc-btn { min-height: 27px; padding: 1px 9px; font-size: 17px!important; }
.dc-pagination select { font-size: 11px; }
.dc-statusbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 22px; border-top: 1px solid #eef1ef; background: #fafcfb; color: #a2ada7; font-size: 10px; }
.dc-statusbar > span { display: flex; align-items: center; gap: 5px; }
.dc-record-detail { margin: 0; }
.dc-record-detail > div { display: flex; gap: 20px; padding: 12px 0; border-bottom: 1px solid #edf0ee; font-size: 13px; }
.dc-record-detail dt { width: 36%; color: #819287; }
.dc-record-detail dt small { display: block; font-size: 10px; color: #b0bbb4; }
.dc-record-detail dd { margin: 0; flex: 1; overflow-wrap: anywhere; color: #435e4d; }
.dc-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (max-width: 1100px) { .dc-workspace { grid-template-columns: 192px minmax(0,1fr); } .dc-header { padding: 16px 18px; } .dc-toolbar { padding: 12px 16px; } .dc-record-search { width: 180px; } }
@media (max-width: 760px) { .main.database-main { height: auto; min-height: calc(100vh - 48px); overflow: visible; } .dc-workspace { display: block; height: auto; } .dc-catalog { border-right: 0; border-bottom: 1px solid #e7ebee; } .dc-source-section { padding: 12px; } .dc-source-note { display: none; } .dc-source-section .dc-section-title { margin-bottom: 8px; } .dc-source-list { max-height: none; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; } .dc-source-all { grid-column: 1 / -1; margin-bottom: 0; } .dc-source { padding: 8px; } .dc-source small { display: none; } .dc-source-icon { width: 23px; height: 23px; } .dc-source strong { font-size: 11px; } .dc-connection { margin-top: 8px; } .dc-table-section { padding: 10px; } .dc-table-list { display: flex; overflow-x: auto; gap: 6px; } .dc-table-item { min-width: 145px; flex-shrink: 0; } .dc-table-search { margin-bottom: 8px; } .dc-content { height: 690px; } .dc-heading h1 { font-size: 18px; } .dc-live { display: none; } .dc-tabs { padding: 0 16px; gap: 16px; } .dc-tabs > span { font-size: 10px; } .dc-record-search { order: 5; width: 100%; margin-left: 0; } .dc-toolbar { gap: 6px; } .dc-toolbar > .dc-icon-button { margin-left: auto; } .dc-footer { padding: 10px; flex-wrap: wrap; } .dc-statusbar { padding: 7px 10px; } .dc-query-panel { padding: 10px; } }

/* Keep paging visible while records scroll inside the available workspace. */
.dc-content { overflow: hidden; }
.dc-content > :not(.dc-grid-scroll) { flex-shrink: 0; }
.dc-grid-scroll { min-height: 0; }
.dc-footer { flex-shrink: 0; flex-wrap: wrap; }
.dc-pagination { flex-wrap: wrap; margin-left: auto; }
.dc-page-jump { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dc-page-jump input { width: 58px; padding: 5px 6px; border: 1px solid #dfe6e1; border-radius: 5px; color: #67796d; background: #fff; text-align: center; font-size: 11px; }
.dc-page-jump input:focus-visible { outline: 2px solid #329b64; outline-offset: 2px; }
/* Compact database layout keeps the pager in view in narrow app panels. */
@media (max-width: 760px) {
  .main.database-main { height: calc(100dvh - 62px); min-height: 0; overflow: hidden; }
  .dc-workspace { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: 100%; overflow: hidden; }
  .dc-catalog { max-height: 170px; overflow: auto; min-height: 0; }
  .dc-source-section { padding: 6px 10px; }
  .dc-source-section .dc-section-title, .dc-connection, .dc-source-count, .dc-source-icon, .dc-table-section > .dc-section-title, .dc-table-search { display: none; }
  .dc-source-list { display: flex; flex-direction: row; gap: 5px; overflow-x: auto; }
  .dc-source-all, .dc-source { width: auto; min-width: max-content; flex-shrink: 0; margin: 0; padding: 6px 8px; min-height: 30px; }
  .dc-source strong { white-space: nowrap; }
  .dc-source-all > small { display: none; }
  .dc-table-section { padding: 3px 10px; }
  .dc-table-item { min-width: max-content; }
  .dc-table-item > button:first-child { padding: 6px; }
  .dc-content { height: auto; min-height: 0; }
  .dc-header { padding: 8px 10px; }
  .dc-breadcrumb, .dc-heading p, .dc-table-icon, .dc-tabs > span { display: none; }
  .dc-heading h1 { font-size: 16px; }
  .dc-tabs { padding: 0 10px; }
  .dc-tabs > .dc-btn { padding: 6px 0; }
  .dc-toolbar { padding: 6px 10px; gap: 5px; }
  .dc-toolbar-actions { flex-wrap: wrap; }
  .dc-record-search { height: 28px; }
  .dc-footer { padding: 6px 8px; gap: 5px; }
  .dc-pagination { width: 100%; margin: 0; gap: 5px; justify-content: space-between; }
  .dc-page-jump input { width: 42px; }
  .dc-statusbar { display: none; }
}
.dc-responsive-catalog { display: none; }
.dc-catalog { min-height: 0; overflow: auto; }
.dc-panel { max-height: 35dvh; overflow: auto; }
@media (max-width: 760px) {
  .main.database-main { height: calc(100dvh - 48px); }
  .dc-catalog > :not(.dc-responsive-catalog) { display: none; }
  .dc-responsive-catalog { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 8px; }
  .dc-responsive-catalog label { display: flex; flex-direction: column; gap: 4px; min-width: 0; color: #829388; font-size: 10px; }
  .dc-responsive-catalog select { width: 100%; min-width: 0; padding: 6px 3px; border: 1px solid #dfe6e1; border-radius: 5px; background: #fff; color: #384251; font-size: 12px; }
  .dc-toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto auto; }
  .dc-toolbar-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dc-toolbar .dc-btn { min-width: 0; padding: 4px 6px; font-size: 11px!important; }
  .dc-record-search { grid-column: 1; width: 100%; order: 0; }
  .dc-toolbar > .dc-icon-button { margin: 0; }
  .dc-grid-scroll { scrollbar-width: auto; }
  .dc-grid th > button, .dc-grid td { padding: 8px; }
  .dc-footer { padding-bottom: 8px; }
  .dc-footer > span { width: 100%; }
  .dc-pagination { justify-content: flex-start; }
  .dc-page-jump { margin-left: auto; }
}
@media (max-width: 380px) {
  .dc-page-jump { width: 100%; margin-left: 0; }
}
