﻿::selection {
  background: rgba(255, 189, 57, 0.8);
  color: #0b1220;
}

::-moz-selection {
  background: rgba(255, 189, 57, 0.8);
  color: #0b1220;
}
body {
  background: radial-gradient(1200px 500px at 20% -5%, rgba(32, 107, 196, 0.15), transparent 60%),
    radial-gradient(1000px 600px at 85% 0%, rgba(47, 179, 68, 0.12), transparent 60%);
}

.page-wrapper {
  background: transparent;
}

.page .container-xl {
  max-width: min(calc(100vw - 36px), 1880px) !important;
  padding-left: 8px;
  padding-right: 8px;
}

.chart {
  width: 100%;
  height: 220px;
}

.chart-wide {
  height: 240px;
}

.chart-field {
  height: var(--field-chart-height, 118px);
}

.chart-anomaly {
  height: 166px;
}

.field-title {
  font-size: 0.74rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-header {
  padding-top: 0.4rem !important;
  padding-bottom: 0.4rem !important;
}

.page-body {
  padding-top: 0.25rem !important;
}

#kpiGrid .kpi-card-compact .avatar {
  width: 1.7rem;
  height: 1.7rem;
  font-size: 0.82rem;
}

#kpiGrid .kpi-card-compact .font-weight-medium {
  font-size: 0.68rem;
  line-height: 1.1;
}

#kpiGrid .kpi-card-compact .h2 {
  font-size: 0.95rem;
  line-height: 1.1;
}

#fieldChartsGrid {
  display: grid !important;
  grid-template-columns: repeat(var(--field-chart-cols, 5), minmax(0, 1fr));
  gap: 6px;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#fieldChartsGrid > * {
  width: auto !important;
  max-width: none !important;
  margin-top: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.field-chart-card .card-header {
  min-height: 28px;
}

.field-chart-card .card-body {
  padding: 0.25rem 0.3rem !important;
}

.chart-detail-scroll {
  margin-top: 4px;
  height: 132px;
  min-height: 132px;
  max-height: 132px;
  overflow-y: auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 6px;
}

.chart-detail-table th,
.chart-detail-table td {
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
}

.chart-detail-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--tblr-bg-surface, #1f2937);
}

.chart-detail-empty {
  padding: 10px 8px;
}

.table td,
.table th {
  white-space: nowrap;
}

.full-data-wrap {
  max-height: 600px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #8b9bff #121826;
}

.full-data-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.full-data-wrap::-webkit-scrollbar-track {
  background: #0f1320;
  border-radius: 6px;
}

.full-data-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7c5cff, #4ea1ff);
  border-radius: 6px;
  border: 2px solid #0f1320;
}

.full-data-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #9e7cff, #64b3ff);
}

#fullDataTable td,
#fullDataTable th {
  font-size: 0.75rem;
  line-height: 1.35;
}

#fullDataTable thead th,
#detailTable thead th,
#rawDataTable thead th,
#mappingTable thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--tblr-bg-surface, #1f2937);
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.24);
}

#fullDataTable thead th {
  min-width: 120px;
}

#fullDataTable thead th:first-child {
  min-width: 58px;
}

.full-header-filter-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 2px 6px !important;
  line-height: 1.15;
}

.full-header-filter-btn .text-truncate {
  min-width: 0;
  flex: 1;
  text-align: left;
}

.full-header-filter-btn.is-active {
  color: #ff922b !important;
  border-color: rgba(255, 146, 43, 0.55) !important;
  background: rgba(255, 146, 43, 0.12) !important;
}

.full-header-filter-menu {
  position: fixed;
  width: 288px;
  max-width: calc(100vw - 16px);
  z-index: 1300;
}

.mapping-wrap {
  max-height: 440px;
  overflow: auto;
}

.raw-data-wrap {
  max-height: 520px;
  overflow: auto;
}

#mappingTable td,
#mappingTable th,
#rawDataTable td,
#rawDataTable th {
  font-size: 0.75rem;
  line-height: 1.35;
  white-space: nowrap;
}

.mapping-select {
  min-width: 320px;
}

.full-header-filter-options {
  max-height: 240px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  padding: 6px;
  background: rgba(15, 23, 42, 0.35);
}

.anomaly-highlight-cell {
  color: #ff6b6b !important;
  font-weight: 700;
  background-color: rgba(214, 57, 57, 0.14);
}

.status-filter-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1100;
  min-width: 200px;
}

.credential-switch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.credential-switch-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#fetchResultLine {
  max-width: 100%;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
}

.credential-switch-btn {
  display: inline-flex;
  align-items: center;
}

.credential-close-btn {
  border: 1px solid rgba(255, 112, 112, 0.45);
  background: rgba(255, 112, 112, 0.1);
  color: #ff9fb0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  padding: 0;
  line-height: 1;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.credential-close-btn:hover {
  background: rgba(255, 112, 112, 0.28);
  color: #ffd4db;
}

.kpi-current-card .current-cred-name {
  font-size: 0.86rem !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-current-card {
  cursor: pointer;
}

.kpi-current-card .card-body {
  min-height: 64px;
}

.kpi-current-card .current-cred-input {
  font-size: 0.78rem;
}

.kpi-current-card .btn.btn-sm {
  --tblr-btn-padding-y: 0.15rem;
  --tblr-btn-padding-x: 0.38rem;
  --tblr-btn-font-size: 0.68rem;
}

.kpi-clickable {
  cursor: pointer;
}

.kpi-clickable:hover {
  box-shadow: 0 0.35rem 0.8rem rgba(15, 23, 42, 0.2);
}

.detail-float-card {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(960px, calc(100vw - 32px));
  height: min(70vh, 700px);
  z-index: 1200;
}

.detail-table-wrap {
  max-height: calc(70vh - 96px);
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.55);
  scrollbar-width: thin;
  scrollbar-color: #8b9bff #121826;
}

.detail-table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.detail-table-wrap::-webkit-scrollbar-track {
  background: #0f1320;
  border-radius: 6px;
}

.detail-table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7c5cff, #4ea1ff);
  border-radius: 6px;
  border: 2px solid #0f1320;
}

.detail-table-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #9e7cff, #64b3ff);
}

#detailTable td,
#detailTable th {
  font-size: 0.75rem;
  line-height: 1.35;
}

.detail-explain {
  margin: 0 12px 8px;
  padding: 8px 10px;
  border: 1px solid rgba(214, 57, 57, 0.35);
  background: rgba(214, 57, 57, 0.08);
  color: #fecaca;
  font-size: 0.75rem;
  line-height: 1.45;
  border-radius: 6px;
}

@media (max-width: 992px) {
  .chart {
    height: 180px;
  }

  .chart-wide {
    height: 200px;
  }

  .chart-field {
    height: var(--field-chart-height, 102px);
  }

  .chart-anomaly {
    height: 148px;
  }

  .full-data-wrap {
    max-height: 480px;
  }

  .detail-float-card {
    width: min(100vw - 16px, 760px);
    height: min(76vh, 720px);
  }

  .detail-table-wrap {
    max-height: calc(76vh - 96px);
  }
}

.cockpit-textarea {
  min-height: 130px;
  max-height: 280px;
}

.cockpit-json-area {
  min-height: 220px;
  max-height: 420px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.75rem;
}

.cockpit-kv {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  padding: 8px 10px;
  min-height: 62px;
  background: rgba(15, 23, 42, 0.36);
  font-size: 0.78rem;
  line-height: 1.4;
}

.cockpit-table-wrap {
  max-height: 260px;
  overflow: auto;
}

.cockpit-checkbox-list {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  padding: 8px 10px;
  max-height: 220px;
  overflow: auto;
  background: rgba(15, 23, 42, 0.36);
}

.cockpit-modal {
  position: fixed;
  inset: 0;
  z-index: 1600;
  background: rgba(2, 6, 23, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.cockpit-modal-card {
  width: min(1100px, 100%);
  max-height: calc(100vh - 28px);
}

.cockpit-modal-table {
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.cockpit-mapping-grid thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--tblr-bg-surface, #1f2937);
  min-width: 170px;
  vertical-align: top;
}

.cockpit-mapping-grid thead th:first-child,
.cockpit-mapping-grid tbody td:first-child {
  min-width: 58px;
  text-align: center;
}

.mapping-header-label {
  font-size: 0.72rem;
  line-height: 1.2;
  margin-bottom: 4px;
}

.mapping-header-select {
  min-width: 158px;
  font-size: 0.7rem;
  line-height: 1.2;
  padding-top: 2px;
  padding-bottom: 2px;
}

.cockpit-mapping-grid tbody td {
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 992px) {
  .cockpit-json-area {
    min-height: 180px;
  }

  .cockpit-table-wrap {
    max-height: 220px;
  }

  .cockpit-modal-table {
    max-height: calc(100vh - 240px);
  }
}

.cockpit-page {
  min-height: 100vh;
  color: #e2e8f0;
}

.cockpit-panel {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(6px);
}

.cockpit-panel .card-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.cockpit-status-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.6);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.9rem;
  color: #c7d2fe;
}

.account-list-box {
  max-height: 560px;
  overflow-y: auto;
}

.account-list-item {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: transparent;
  padding: 14px 18px;
  cursor: pointer;
  transition: background 0.2s ease;
  color: #e2e8f0;
}

.account-list-item:hover {
  background: rgba(59, 130, 246, 0.12);
}

.account-list-item.active {
  background: rgba(59, 130, 246, 0.25);
}

.account-list-main {
  font-size: 1.05rem;
}

.account-list-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 2px;
}

.cockpit-textarea-sm,
.cockpit-textarea-md,
.cockpit-textarea-lg {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}

.cockpit-textarea-sm:focus,
.cockpit-textarea-md:focus,
.cockpit-textarea-lg:focus {
  border-color: rgba(99, 102, 241, 0.8);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.4);
}

.cockpit-textarea-sm {
  min-height: 84px;
  max-height: 180px;
}

.cockpit-textarea-md {
  min-height: 140px;
  max-height: 320px;
}

.cockpit-textarea-lg {
  min-height: 220px;
}

.btn-purple {
  background: #6f35d1;
  border-color: #6f35d1;
  color: #fff;
}

.btn-purple:hover {
  background: #5e2bb6;
  border-color: #5e2bb6;
  color: #fff;
}

.add-account-modal {
  width: min(760px, 100%);
}

.cards-modal {
  width: min(760px, 100%);
}

.credential-remark-cell {
  min-width: 160px;
}

.credential-remark-text {
  max-width: 200px;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-page-wrap {
  max-width: 1280px;
}

.template-list-box {
  height: 240px;
  overflow: auto;
  border: 1px solid #c6ccd2;
  border-radius: 6px;
  background: #fff;
}

.template-list-item {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #eef1f4;
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
}

.template-list-item:hover {
  background: #f8fbff;
}

.template-list-item.active {
  background: #d9ecff;
}

.template-list-main {
  font-size: 0.96rem;
  color: #0f172a;
}

.template-list-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}

@media (max-width: 992px) {
  .account-list-box {
    max-height: 360px;
  }
}

@media (max-width: 768px) {
  .template-list-box {
    height: 220px;
  }
}

/* 进度条容器 */
.progress-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 400px;
  max-width: calc(100vw - 40px);
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.progress-container .card {
  margin-bottom: 0;
}

.progress-item {
  padding-bottom: 12px;
  border-bottom: 1px solid #e9ecef;
}

.progress-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.progress-status {
  min-height: 18px;
}


