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

html, body, #root {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 400px;
}

.dashboard-layout {
  height: 100vh;
}

.dashboard-layout .ant-layout,
.dashboard-layout .ant-layout-content {
  min-width: 0;
  min-height: 0;
}

.dashboard-layout > .ant-layout {
  height: 100%;
}

.dashboard-sider {
  background: #001529 !important;
}

.dashboard-sider-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dashboard-brand {
  position: relative;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 12px;
  padding-right: 40px;
}

.dashboard-brand .ant-typography {
  margin-right: auto;
  padding-left: 24px;
  transform: none;
}

.dashboard-brand--collapsed {
  cursor: pointer;
}

.dashboard-sider-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.88) !important;
}

.dashboard-sider-toggle--collapsed {
  left: 50%;
  right: auto;
  width: 32px;
  transform: translate(-50%, -50%);
  justify-content: center;
}

.dashboard-sider-banner {
  margin: 12px;
  padding: 14px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-sider-banner-label {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.dashboard-sider-banner-value {
  display: block;
  color: white !important;
  font-size: 14px;
}

.dashboard-sider-logout {
  width: 100%;
  color: #ff7875 !important;
}

.ant-layout-sider-trigger {
  display: none !important;
}

.dashboard-content {
  padding: 24px;
  background: #f0f2f5;
  height: 100%;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-content-inner {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.dashboard-content-inner > * {
  min-width: 0;
  min-height: 0;
}

.page-shell {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-shell__header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-shell__body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page-shell__body > * {
  min-width: 0;
  min-height: 0;
}


.data-source-tabs-shell,
.data-source-tabs,
.data-source-tabs .ant-tabs-content-holder,
.data-source-tabs .ant-tabs-content,
.data-source-tabs .ant-tabs-tabpane {
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.data-source-tabs-shell {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.data-source-tabs {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.data-source-tabs .ant-tabs-nav {
  flex: 0 0 auto;
  margin-bottom: 12px;
}

.data-source-tabs .ant-tabs-content-holder {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.data-source-tabs .ant-tabs-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.data-source-tabs .ant-tabs-tabpane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.data-source-tabs .ant-tabs-tabpane-hidden {
  display: none !important;
}

.data-source-custom-tab {
  gap: 12px;
}

.data-source-custom-toolbar {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
}

.data-source-table-region {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.data-source-table-region .ant-table-wrapper,
.data-source-table-region .ant-spin-nested-loading,
.data-source-table-region .ant-spin-container,
.data-source-table-region .ant-table,
.data-source-table-region .ant-table-container,
.data-source-table-region .ant-table-body {
  height: 100%;
  min-height: 0;
}

.data-source-table-region .ant-table-wrapper,
.data-source-table-region .ant-spin-nested-loading,
.data-source-table-region .ant-spin-container {
  display: flex;
  flex-direction: column;
}

.data-source-empty-state {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 12px;
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
  color: #8c8c8c;
  font-size: 14px;
  margin-bottom: 8px;
}

.stat-card .value {
  color: #262626;
  font-size: 32px;
  font-weight: 600;
}

.stat-card .trend {
  font-size: 12px;
  margin-top: 8px;
}

.stat-card .trend.up {
  color: #52c41a;
}

.stat-card .trend.down {
  color: #ff4d4f;
}

/* Table cell fixed width */
.ant-table-wrapper .ant-table-tbody > tr > td {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ant-table-wrapper {
  width: 100%;
}

.ant-table-wrapper .ant-table-container,
.ant-table-wrapper .ant-table-content,
.ant-table-wrapper .ant-table-body {
  overflow-x: auto !important;
}

.table-scroll-region {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.table-scroll-region .ant-table-wrapper {
  width: 100%;
  min-width: 0;
}

.table-scroll-region .ant-table {
  min-width: 100%;
}

.table-scroll-region .ant-table-thead > tr > th,
.table-scroll-region .ant-table-tbody > tr > td {
  padding: 10px 12px !important;
}

.table-scroll-region .ant-table-body,
.table-scroll-region .ant-table-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.88) transparent;
}

.table-scroll-region .ant-table-body::-webkit-scrollbar,
.table-scroll-region .ant-table-content::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-scroll-region .ant-table-body::-webkit-scrollbar-thumb,
.table-scroll-region .ant-table-content::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.82);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.table-scroll-region .ant-table-body::-webkit-scrollbar-thumb:hover,
.table-scroll-region .ant-table-content::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.9);
  background-clip: padding-box;
}

.table-scroll-region .ant-table-body::-webkit-scrollbar-track,
.table-scroll-region .ant-table-content::-webkit-scrollbar-track {
  background: transparent;
}

.settings-shell,
.settings-tabs-shell,
.settings-tabs,
.settings-tabs .ant-tabs-content-holder,
.settings-tabs .ant-tabs-content,
.settings-tabs .ant-tabs-tabpane {
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.settings-tabs-shell {
  overflow: hidden;
}

.settings-tabs {
  display: flex;
  flex-direction: column;
}

.settings-tabs .ant-tabs-nav {
  flex: 0 0 auto;
  margin-bottom: 12px;
}

.settings-tabs .ant-tabs-content-holder,
.settings-tabs .ant-tabs-content,
.settings-tabs .ant-tabs-tabpane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.settings-tabs .ant-tabs-tabpane-hidden {
  display: none !important;
}

.settings-pane {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.settings-panel-card,
.settings-panel-card .ant-card-body {
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.settings-panel-card {
  flex: 1 1 auto;
}

.settings-panel-card .ant-card-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.settings-panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.settings-panel-scroll::-webkit-scrollbar {
  width: 10px;
}

.settings-panel-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.8);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.settings-panel-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.settings-pane .data-source-table-region .ant-table-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.settings-pane .data-source-table-region .ant-table-header {
  flex: 0 0 auto;
}

.settings-pane .data-source-table-region .ant-table-body {
  flex: 1 1 auto;
  min-height: 0;
  height: 0 !important;
  max-height: none !important;
}




.data-list-workspace {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.data-list-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.data-list-controls-shell {
  flex: 1 1 auto;
  min-height: 0;
}

.data-list-split-layout {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) 12px minmax(0, 1fr);
  gap: 0;
}

.data-list-summary-card,
.data-list-table-shell {
  min-width: 0;
  min-height: 0;
}

.data-list-summary-card--panel,
.data-list-summary-card--panel .ant-card-body {
  height: 100%;
}

.data-list-summary-card--panel .ant-card-body {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.data-list-summary-card .ant-card-head,
.data-list-table-shell .ant-card-head {
  padding-inline: 16px;
}

.data-list-summary-card .ant-card-body {
  overflow: auto;
}

.data-list-summary-card-inner {
  min-height: 100%;
}

.data-list-right-column {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.data-list-summary-treemap {
  --data-list-treemap-tile-padding: 12px;
  --data-list-treemap-label-size: 12px;
  --data-list-treemap-value-size: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(56px, 1fr);
  grid-auto-flow: dense;
  gap: 10px;
}

.data-list-treemap-tile {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  padding: var(--data-list-treemap-tile-padding);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #0f172a;
  overflow: hidden;
}

.data-list-treemap-tile--ocean {
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
}

.data-list-treemap-tile--sky {
  background: linear-gradient(135deg, #e0f2fe 0%, #7dd3fc 100%);
}

.data-list-treemap-tile--mint {
  background: linear-gradient(135deg, #dcfce7 0%, #86efac 100%);
}

.data-list-treemap-tile--amber {
  background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
}

.data-list-treemap-tile--rose {
  background: linear-gradient(135deg, #ffe4e6 0%, #fda4af 100%);
}

.data-list-treemap-tile--violet {
  background: linear-gradient(135deg, #ede9fe 0%, #c4b5fd 100%);
}

.data-list-treemap-tile--slate {
  background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
}

.data-list-treemap-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 0 0 auto;
}

.data-list-treemap-label {
  min-width: 0;
  font-size: var(--data-list-treemap-label-size);
  line-height: 1.2;
  color: rgba(15, 23, 42, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-list-treemap-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  min-height: 0;
  flex: 0 0 auto;
}

.data-list-summary-tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: #0f172a;
  flex: 0 0 auto;
}

.data-list-summary-tile-value {
  font-size: var(--data-list-treemap-value-size);
  line-height: 1.1;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-list-treemap-meta {
  color: rgba(15, 23, 42, 0.72) !important;
}

.data-list-summary-card--panel .ant-card-body::-webkit-scrollbar {
  width: 10px;
}

.data-list-summary-card--panel .ant-card-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.8);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.data-list-summary-card--panel .ant-card-body::-webkit-scrollbar-track {
  background: transparent;
}

.data-list-filter-grid {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: flex-start;
}

.data-list-filter-grid--balanced > * {
  flex: 1 1 0;
  min-width: 0;
}

.data-list-filter-grid--header {
  padding-bottom: 4px;
}

.data-list-table-shell {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.data-list-table-shell .ant-card-body {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.data-list-table-header {
  padding: 12px 14px 0 14px;
  flex: 0 0 auto;
}

.data-list-table-header--with-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.data-list-table-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.data-list-table-region {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
}

.data-list-table-region .ant-table-wrapper,
.data-list-table-region .ant-spin-nested-loading,
.data-list-table-region .ant-spin-container {
  height: 100%;
  min-height: 0;
}

.data-list-table-region .ant-table-wrapper {
  display: flex;
  flex-direction: column;
}

.data-list-table-region .ant-spin-nested-loading,
.data-list-table-region .ant-spin-container {
  display: flex;
  flex-direction: column;
}

.data-list-table-region .ant-table {
  flex: 1 1 auto;
}

.data-list-table-region .ant-table-pagination {
  flex: 0 0 auto;
  margin: 12px 0 0;
}

.data-list-name-link {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding-inline: 0 !important;
}

.data-list-name-marquee {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.data-list-name-marquee--overflow {
  width: 100%;
}

.data-list-name-marquee__text {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  transform: translateX(0);
  will-change: transform;
}

.data-list-name-link:hover .data-list-name-marquee--overflow .data-list-name-marquee__text {
  animation: data-list-name-marquee 8s linear infinite;
}

@keyframes data-list-name-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.data-list-resize-handle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
}

.data-list-resize-handle::before {
  content: '';
  display: block;
  border-radius: 999px;
  background: #d0d7e2;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.data-list-resize-handle:hover::before {
  background: #8fb4ff;
}

.data-list-resize-handle--vertical {
  cursor: col-resize;
}

.data-list-resize-handle--vertical::before {
  width: 4px;
  height: 56px;
}

.data-list-resize-handle--horizontal {
  cursor: row-resize;
}

.data-list-resize-handle--horizontal::before {
  width: 56px;
  height: 4px;
}

@media (min-width: 1201px) and (orientation: landscape) {
  .data-list-summary-treemap {
    grid-auto-rows: minmax(48px, 1fr);
  }

  .data-list-treemap-tile {
    padding: 10px 12px;
  }

  .data-list-summary-tile-value {
    font-size: 15px;
  }
}

@media (max-width: 1200px) {
  .data-list-summary-treemap {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .data-list-split-layout {
    grid-template-columns: minmax(240px, 0.9fr) 12px minmax(0, 1fr);
  }
}

@media (max-width: 992px) {
  .dashboard-content {
    padding: 12px;
  }

  .data-list-workspace {
    gap: 10px;
  }

  .data-list-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .data-list-split-layout {
    grid-template-columns: 1fr;
    gap: 10px;
    height: auto;
  }

  .data-list-right-column {
    grid-template-rows: auto auto;
    gap: 10px;
    height: auto;
  }

  .data-list-summary-treemap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(88px, 1fr);
  }

  .data-list-filter-grid {
    flex-wrap: wrap;
  }

  .data-list-filter-grid--balanced > * {
    flex: 1 1 180px;
    min-width: 160px;
  }
}

@media (max-width: 640px) {
  .data-list-summary-treemap {
    grid-template-columns: 1fr;
  }

  .data-list-filter-grid {
    flex-wrap: wrap;
  }

  .data-list-filter-grid--balanced > * {
    flex-basis: 100%;
    min-width: 100%;
  }

}

.data-list-detail-modal {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.data-list-detail-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.data-list-detail-section__title {
  font-size: 14px;
}

.data-list-detail-hero {
  padding: 14px 16px;
  border-radius: 12px;
  background: #f7f8fa;
  border: 1px solid #eef1f5;
}

.data-list-detail-hero__label {
  display: block;
  margin-bottom: 6px;
  color: #6b7280;
  font-size: 12px;
}

.data-list-detail-hero__title.ant-typography {
  margin: 0;
  overflow-wrap: anywhere;
}

.data-list-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.data-list-detail-cell {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #eef1f5;
  background: #fff;
}

.data-list-detail-cell--block {
  grid-column: 1 / -1;
}

.data-list-detail-cell__label {
  display: block;
  margin-bottom: 8px;
  color: #6b7280;
  font-size: 12px;
}

.data-list-detail-cell__value {
  color: #111827;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.data-list-detail-code {
  margin: 0;
  padding: 12px;
  max-height: 240px;
  overflow: auto;
  border-radius: 10px;
  background: #111827;
  color: #e5eef9;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.data-list-detail-code--raw {
  max-height: 320px;
}

.data-list-tag-cell {
  min-width: 140px;
}

.data-list-tag-cell .ant-tag {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
}

.data-list-filter-select {
  max-width: 220px;
}

.data-list-filter-select .ant-select-selector {
  height: auto !important;
  min-height: 32px;
  max-height: 72px;
  align-items: flex-start !important;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.data-list-filter-select .ant-select-selection-overflow {
  flex-wrap: wrap !important;
}

.data-list-filter-select .ant-select-selection-overflow-item {
  max-width: 100%;
}

.data-list-filter-select .ant-select-selection-item {
  max-width: 100%;
}

.dashboard-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-page__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-page__actions {
  align-items: center;
}

.dashboard-status-tag {
  margin-inline-end: 0 !important;
  padding-inline: 10px;
  border-radius: 999px;
  line-height: 24px;
}

.dashboard-refresh-button.ant-btn {
  height: 26px;
  padding-inline: 12px;
  border-radius: 999px;
  border-color: #d9d9d9;
  background: #ffffff;
  color: rgba(0, 0, 0, 0.88);
  box-shadow: none;
}

.dashboard-refresh-button.ant-btn:hover,
.dashboard-refresh-button.ant-btn:focus {
  border-color: #bfbfbf;
  background: #ffffff;
  color: rgba(0, 0, 0, 0.88);
}
