/**
 * çæµç©è Â· æ§å¶å°ä¸»é¢ï¼è¿å¥ Webï¼
 * ä¸»è²ï¼èè²ï¼éé¿éäºæ©ï¼
 * ä½ç¨åï¼body.jc-console ââ ä¸è¦ç Bootstrap .modal ç»æ
 */
body.jc-console {
  --jc-primary: #1677ff;
  --jc-primary-hover: #4096ff;
  --jc-primary-active: #0958d9;
  --jc-primary-light: #e6f4ff;
  /* å¼å®¹æ§åéåï¼è¯­ä¹æåä¸»è²ï¼ */
  --ali-blue: var(--jc-primary);
  --ali-orange: var(--jc-primary);
  --ali-orange-hover: var(--jc-primary-hover);
  --ali-orange-light: var(--jc-primary-light);
  /* è¯­ä¹æ©ï¼é¢è­¦ç­çº§ç­ï¼ä¸ä½ä¸»è² */
  --jc-accent-orange: #ff6a00;
  --jc-accent-orange-light: #fff4eb;
  --jc-topbar-bg: #1c232b;
  --jc-topbar-h: 48px;
  --jc-sidebar-w: 220px;
  --jc-content-bg: #f5f5f6;
  --jc-card-border: #e8e8e8;
  /* 白天模式：加深正文/次要/弱化字，避免发灰难读 */
  --jc-text: #1a1d24;
  --jc-text-secondary: #3d4654;
  --jc-text-muted: #4e5969;
  --jc-success: #1e8e3e;
  --jc-warning: #f5a623;
  --jc-danger: #e62112;
  --jc-radius: 2px;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  color: var(--jc-text);
  background: var(--jc-content-bg);
}

/* ========== Shell: topbar ========== */
body.jc-console .container-scroller {
  background: var(--jc-content-bg);
}
body.jc-console .navbar.fixed-top,
body.jc-console .navbar {
  background: var(--jc-topbar-bg) !important;
  height: var(--jc-topbar-h);
  min-height: var(--jc-topbar-h);
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 12px !important;
  left: var(--jc-sidebar-w);
  right: 0;
  width: auto;
}
body.jc-console .navbar .navbar-menu-wrapper {
  width: 100%;
  height: var(--jc-topbar-h);
  background: transparent !important;
  color: #fff;
  padding: 0 !important;
}
body.jc-console .navbar .navbar-toggler,
body.jc-console .navbar .nav-link,
body.jc-console .navbar .navbar-text,
body.jc-console .navbar .profile-name,
body.jc-console .navbar .mdi {
  color: rgba(255, 255, 255, 0.85) !important;
}
body.jc-console .navbar #navSystemName {
  font-size: 14px;
  font-weight: 600;
  color: #fff !important;
  padding: 0 8px 0 0;
}
body.jc-console .navbar #navMonitorName {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55) !important;
  padding: 0 12px 0 0;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.jc-console .navbar #navSearchWrap .form-control {
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12px;
  border-radius: var(--jc-radius);
  min-width: 220px;
}
body.jc-console .navbar #navSearchWrap .form-control::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
body.jc-console .navbar #navSearchWrap .input-group-text {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-left: 0;
  color: rgba(255, 255, 255, 0.45);
  height: 28px;
  padding: 0 8px;
}
body.jc-console .navbar .nav-profile-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
body.jc-console .navbar .count-indicator .count {
  background: var(--ali-orange) !important;
}
body.jc-console #jcThemeToggleBtn:hover,
body.jc-console .navbar .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

/* ========== Shell: sidebar ========== */
/* Logo åºå®ï¼èåå å©ä½é«åº¦å¹¶åç¬æ»å¨ï¼ä¾§æ æ¬èº«ä¸åºç°æ»å¨æ¡ï¼ */
body.jc-console .sidebar.sidebar-offcanvas {
  background: #fff !important;
  width: var(--jc-sidebar-w) !important;
  border-right: 1px solid var(--jc-card-border);
  box-shadow: none !important;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  padding-top: 0;
  z-index: 1031;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}
/* æå ååªçå¾æ ï¼ä¾§æ å®½åº¦å¿é¡»è·çæ¶çªï¼å¦åä¼è¢«ä¸é¢ç 220px !important éæ­»ï¼ */
body.jc-console.sidebar-icon-only {
  --jc-sidebar-w: 70px;
}
/* Logo åºé«åº¦éä¸ä¼ å¾çèªéåºï¼ä¸éæ­»åºå®é«åº¦ */
body.jc-console .sidebar .sidebar-brand-wrapper {
  background: var(--jc-topbar-bg) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 0 0 auto;
  border-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  overflow: hidden;
}
body.jc-console .sidebar .sidebar-brand-wrapper .sidebar-brand {
  width: 100%;
  padding: 0 !important;
  line-height: 0;
}
body.jc-console .sidebar .sidebar-brand-wrapper .brand-logo img,
body.jc-console .sidebar .sidebar-brand-wrapper .brand-logo-mini img {
  display: block;
  width: 94%;
  height: auto !important;
  max-width: none;
  max-height: none !important;
  margin: 0 3%;
}
body.jc-console .sidebar #sidebarMenu {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  padding: 12px 0 28px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
body.jc-console .sidebar .nav .nav-item {
  padding: 0;
}
body.jc-console .sidebar .nav .nav-item .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 18px 0 16px !important;
  margin: 0 8px !important;
  color: var(--jc-text) !important;
  border-left: 3px solid transparent;
  border-radius: 6px !important;
  background: transparent !important;
  font-size: 13px;
}
body.jc-console .sidebar .nav .nav-item .nav-link .menu-icon,
body.jc-console .sidebar .nav .nav-item .nav-link i.menu-icon {
  color: var(--jc-text-secondary) !important;
  margin: 0 !important;
  width: 18px;
  font-size: 16px;
}
body.jc-console .sidebar .nav .nav-item .nav-link .menu-title {
  color: inherit !important;
  font-size: 13px !important;
  line-height: 1.3;
}
body.jc-console .sidebar .nav .nav-item:hover > .nav-link {
  background: #f5f7fa !important;
  color: var(--ali-orange) !important;
}
body.jc-console .sidebar .nav .nav-item:hover > .nav-link .menu-icon {
  color: var(--ali-orange) !important;
}
body.jc-console .sidebar .nav .nav-item.active > .nav-link {
  background: var(--ali-orange-light) !important;
  color: var(--ali-orange) !important;
  border-left-color: var(--ali-orange);
  font-weight: 600;
}
body.jc-console .sidebar .nav .nav-item.active > .nav-link .menu-icon {
  color: var(--ali-orange) !important;
}
body.jc-console .sidebar .nav .nav-item.nav-category {
  margin-top: 14px;
  margin-bottom: 2px;
}
body.jc-console .sidebar .nav .nav-item.nav-category .nav-link,
body.jc-console .sidebar .nav .nav-item.nav-category span.nav-link {
  height: auto;
  padding: 10px 18px 6px !important;
  margin: 0 !important;
  color: var(--jc-text-muted) !important;
  font-size: 12px !important;
  font-weight: 500;
  letter-spacing: 0.4px;
  border-left: 0;
  border-radius: 0 !important;
  background: transparent !important;
  cursor: default;
  pointer-events: none;
}

/* main panel offset */
body.jc-console .page-body-wrapper {
  padding-top: 0;
  background: var(--jc-content-bg);
}
body.jc-console .main-panel {
  margin-left: 0;
  padding-top: var(--jc-topbar-h);
  background: var(--jc-content-bg);
  width: 100%;
}
body.jc-console .main-panel .content-wrapper {
  background: var(--jc-content-bg) !important;
  /* ç¸å¯¹é¡¶æ ãä¾§æ çåºææ¾ç©ºéï¼å¯¹é½çæµäºæ°æ®åæï¼ */
  padding: 24px 28px 32px !important;
}

/* ========== Content utilitiesï¼é¡µé¢å¯ç¨ï¼ ========== */
/* æ é¢æ¨¡åï¼å·¦æ é¢ / å³æä½ï¼ä¸ç©åè®®ä¸è´ï¼ */
body.jc-console .content-wrapper .page-header,
body.jc-console .content-wrapper .page-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px !important;
  margin: 0 0 16px 0 !important;
  background-color: #fff;
  border: 1px solid #e3e7ee;
  border-radius: 6px;
  box-sizing: border-box;
}
/* æ é¢+è¯´æçºµåå å ï¼æä½åºé å³ */
body.jc-console .content-wrapper .page-head > h3,
body.jc-console .content-wrapper .page-header > h3 {
  width: auto;
  flex: 1 1 auto;
}
body.jc-console .content-wrapper .page-head > small,
body.jc-console .content-wrapper .page-header > small {
  width: 100%;
  margin-top: 6px !important;
}
body.jc-console .content-wrapper .page-header > .page-actions,
body.jc-console .content-wrapper .page-head > .page-actions {
  margin-left: auto;
  flex: 0 0 auto;
}
body.jc-console .content-wrapper .page-header h3,
body.jc-console .content-wrapper .page-head h1,
body.jc-console .content-wrapper .page-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--jc-text);
  line-height: 1.35;
}
body.jc-console .content-wrapper .page-head .desc,
body.jc-console .content-wrapper .page-header .desc,
body.jc-console .content-wrapper .page-header .text-muted,
body.jc-console .content-wrapper .page-head > small.text-muted,
body.jc-console .content-wrapper .page-head .text-muted,
body.jc-console .content-wrapper .page-head > small,
body.jc-console .content-wrapper .page-header > small {
  display: block;
  margin: 6px 0 0 !important;
  /* 页面说明用次要色（比 muted 更深），白天更易读 */
  color: var(--jc-text-secondary) !important;
  font-size: 13px;
  line-height: 1.5;
}
body.jc-console .content-wrapper .page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* 白天模式：统一次要/弱化文字，避免 Bootstrap / 页面硬编码浅灰难读 */
body.jc-console .text-muted,
body.jc-console .content-wrapper .text-muted,
body.jc-console .modal .text-muted,
body.jc-console .list-group-item.text-muted,
body.jc-console small.text-muted,
body.jc-console .small.text-muted,
body.jc-console .text-secondary,
body.jc-console .content-wrapper .text-secondary,
body.jc-console .modal .text-secondary {
  color: var(--jc-text-muted) !important;
}
body.jc-console .content-wrapper label,
body.jc-console .query-grid .qi label,
body.jc-console .modal label,
body.jc-console .custom-control-label {
  color: var(--jc-text-secondary) !important;
  font-weight: 500;
}
body.jc-console .content-wrapper .table,
body.jc-console .content-wrapper .table td,
body.jc-console .content-wrapper .table th,
body.jc-console .content-wrapper .table .text-dark {
  color: var(--jc-text) !important;
}
body.jc-console .content-wrapper .table thead th {
  color: var(--jc-text-secondary) !important;
  font-weight: 600;
}
body.jc-console .content-wrapper .form-control,
body.jc-console .content-wrapper select.form-control,
body.jc-console .modal .form-control,
body.jc-console .content-wrapper .custom-select {
  color: var(--jc-text) !important;
}
body.jc-console .content-wrapper .form-control::placeholder,
body.jc-console .modal .form-control::placeholder {
  color: #6b7280;
  opacity: 1;
}
body.jc-console .stat-label,
body.jc-console .panel-head,
body.jc-console .jc-empty-tip,
body.jc-console .empty-tip,
body.jc-console .empty-state,
body.jc-console .no-data,
body.jc-console .hint,
body.jc-console .tips {
  color: var(--jc-text-muted) !important;
}
body.jc-console .content-wrapper .card .card-description,
body.jc-console .content-wrapper .card .text-secondary,
body.jc-console .content-wrapper .breadcrumb,
body.jc-console .content-wrapper .breadcrumb-item,
body.jc-console .content-wrapper .breadcrumb-item a,
body.jc-console .content-wrapper .section-title + .text-muted,
body.jc-console .query-panel .qi > span,
body.jc-console .query-panel .qi .hint {
  color: var(--jc-text-secondary) !important;
}
body.jc-console .content-wrapper p,
body.jc-console .content-wrapper .desc,
body.jc-console .content-wrapper .help-block,
body.jc-console .content-wrapper .form-text,
body.jc-console .content-wrapper .card-body > .small:not(.text-danger):not(.text-success):not(.text-warning):not(.text-primary) {
  color: var(--jc-text-secondary) !important;
}
body.jc-console .content-wrapper h1,
body.jc-console .content-wrapper h2,
body.jc-console .content-wrapper h3,
body.jc-console .content-wrapper h4,
body.jc-console .content-wrapper h5,
body.jc-console .content-wrapper h6,
body.jc-console .content-wrapper .section-title {
  color: var(--jc-text) !important;
}
body.jc-console .content-wrapper .btn-link:not(.text-danger):not(.text-success):not(.text-warning) {
  color: var(--jc-primary);
}
body.jc-console .navbar-dropdown .dropdown-item,
body.jc-console .dropdown-menu .dropdown-item {
  color: var(--jc-text);
}

body.jc-console .content-wrapper .card {
  border: 1px solid var(--jc-card-border);
  border-radius: 8px;
  box-shadow: none !important;
  background: #fff;
  margin-bottom: 16px;
}
body.jc-console .content-wrapper .card .card-body {
  padding: 18px 20px !important;
}
body.jc-console .content-wrapper .card .card-title,
body.jc-console .content-wrapper .card-hd h3 {
  font-size: 15px;
  font-weight: 600;
}
body.jc-console .content-wrapper .card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
  gap: 8px;
}
body.jc-console .content-wrapper .card-hd h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
body.jc-console .content-wrapper .card-hd .extra,
body.jc-console .content-wrapper .card-hd > a {
  font-size: 13px;
  color: var(--jc-primary);
  white-space: nowrap;
}
body.jc-console .content-wrapper .card-hd .extra {
  color: var(--jc-text-muted);
}
body.jc-console .content-wrapper .card-bd {
  padding: 18px 20px;
}
body.jc-console .content-wrapper .form-inline {
  margin-bottom: 16px !important;
}
body.jc-console .content-wrapper .form-control,
body.jc-console .content-wrapper .btn:not(.btn-icon):not(.btn-xs) {
  min-height: 34px;
}
/* åè¡¨æä½æ å¾æ æé®ï¼åºå® 26Ã26ï¼ä¸è¢«ä¸æ¹ min-height æé« */
body.jc-console .content-wrapper .btn.btn-icon,
body.jc-console .content-wrapper .btn.btn-xs.btn-icon,
body.jc-console .modal .btn.btn-icon,
body.jc-console .modal .btn.btn-xs.btn-icon {
  width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
  min-width: 26px !important;
  padding: 0 !important;
  line-height: 1 !important;
}
body.jc-console .content-wrapper .table th,
body.jc-console .content-wrapper .table td {
  padding: 12px 14px;
  vertical-align: middle;
}
body.jc-console .navbar .jc-navbar-title {
  font-size: 15px;
  font-weight: 500;
  margin-left: 4px;
}

/* å¼¹çªå°ºå¯¸ç± site.css ç»ä¸ç®¡çï¼æ­¤å¤ä¸åå¼ºå¶ 60vw/60vhï¼é¿åè´´åºä¸è¿å¤§ */
body.jc-console .modal.show .modal-dialog.modal-sm {
  max-width: min(400px, 92vw);
}

/* Primary actions â blueï¼å«å£³å± modalï¼ä¸æ successï¼ */
body.jc-console .btn-primary,
body.jc-console .content-wrapper .btn-primary,
body.jc-console .modal .btn-primary {
  background-color: var(--jc-primary) !important;
  border-color: var(--jc-primary) !important;
  color: #fff !important;
  border-radius: var(--jc-radius);
  box-shadow: none !important;
}
body.jc-console .btn-primary:hover,
body.jc-console .btn-primary:focus,
body.jc-console .content-wrapper .btn-primary:hover,
body.jc-console .modal .btn-primary:hover {
  background-color: var(--jc-primary-hover) !important;
  border-color: var(--jc-primary-hover) !important;
}
body.jc-console .btn-primary:active,
body.jc-console .content-wrapper .btn-primary:not(:disabled):not(.disabled):active {
  background-color: var(--jc-primary-active) !important;
  border-color: var(--jc-primary-active) !important;
}
body.jc-console .btn-outline-primary,
body.jc-console .content-wrapper .btn-outline-primary,
body.jc-console .modal .btn-outline-primary {
  color: var(--jc-primary) !important;
  border-color: var(--jc-primary) !important;
  background: transparent !important;
}
body.jc-console .btn-outline-primary:hover,
body.jc-console .content-wrapper .btn-outline-primary:hover {
  background: var(--jc-primary-light) !important;
  color: var(--jc-primary) !important;
}
body.jc-console .content-wrapper .btn-success {
  background-color: var(--jc-success) !important;
  border-color: var(--jc-success) !important;
  color: #fff !important;
  border-radius: var(--jc-radius);
  box-shadow: none !important;
}
body.jc-console .content-wrapper .btn-success:hover {
  background-color: #187a35 !important;
  border-color: #187a35 !important;
}
body.jc-console .content-wrapper .btn {
  border-radius: var(--jc-radius);
  font-size: 12px;
}
/* ========== åå®¹åº Tab ç»ä¸æ ·å¼ï¼åå®¶åå· / åè®®å¼¹çªç­ï¼ ========== */
body.jc-console .nav-tabs {
  border-bottom: 1px solid #e8e8e8;
  align-items: flex-end;
  gap: 0;
}
body.jc-console .nav-tabs .nav-item {
  margin-bottom: -1px;
}
body.jc-console .nav-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 6px 14px 7px;
  min-height: 30px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--jc-text-muted) !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  transition: color .15s ease, border-color .15s ease, padding .15s ease, font-size .15s ease, min-height .15s ease;
}
body.jc-console .nav-tabs .nav-link:hover,
body.jc-console .nav-tabs .nav-link:focus {
  color: var(--jc-primary) !important;
  background: transparent !important;
  border-color: transparent !important;
  isolation: isolate;
}
body.jc-console .nav-tabs .nav-link.active,
body.jc-console .nav-tabs .nav-item.show .nav-link {
  color: var(--jc-primary) !important;
  font-size: 13px;
  font-weight: 600;
  min-height: 36px;
  padding: 9px 14px 8px;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid var(--jc-primary) !important;
}
body.jc-console .content-wrapper a:not(.btn):not(.nav-link):not(.dropdown-item) {
  color: var(--jc-primary);
}
body.jc-console .content-wrapper a:not(.btn):not(.nav-link):not(.dropdown-item):hover {
  color: var(--jc-primary-active);
}
body.jc-console .content-wrapper .form-control:focus,
body.jc-console .modal .form-control:focus {
  border-color: var(--jc-primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.15);
}
body.jc-console .page-item.active .page-link {
  background-color: var(--jc-primary) !important;
  border-color: var(--jc-primary) !important;
}

/* ç»ä¸åé¡µæ¡ï¼å¯ç¹=ä¸»é¢è²æè¾¹ï¼ä¸å¯ç¹=ç°æ¾ä¸æ äº¤äºæ */
body.jc-console .jc-pager {
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0;
}
body.jc-console .jc-pager-meta {
  font-size: 12px;
}
body.jc-console .jc-pager-pages {
  font-size: 12px;
  color: #595959;
  white-space: nowrap;
  min-width: 88px;
  text-align: center;
}
body.jc-console .jc-pager-btn {
  min-width: 72px;
  border-radius: var(--jc-radius) !important;
  font-weight: 500;
}
body.jc-console .jc-pager-btn.btn-outline-primary {
  color: var(--jc-primary) !important;
  border-color: var(--jc-primary) !important;
  background: #fff !important;
}
body.jc-console .jc-pager-btn.btn-outline-primary:hover,
body.jc-console .jc-pager-btn.btn-outline-primary:focus {
  background: var(--jc-primary-light) !important;
  color: var(--jc-primary) !important;
  border-color: var(--jc-primary) !important;
}
body.jc-console .jc-pager-btn.is-disabled,
body.jc-console .jc-pager-btn:disabled {
  color: #bfbfbf !important;
  background: #f5f5f5 !important;
  border-color: #e8e8e8 !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  pointer-events: none;
  box-shadow: none !important;
}

body.jc-console .custom-control-input:checked ~ .custom-control-label::before,
body.jc-console .custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--jc-primary) !important;
  border-color: var(--jc-primary) !important;
}

/* KPI strip */
body.jc-console .kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
body.jc-console .kpi-card {
  background: #fff;
  border: 1px solid var(--jc-card-border);
  border-radius: var(--jc-radius);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
body.jc-console .kpi-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--ali-orange);
}
body.jc-console .kpi-card.tone-warn::before { background: var(--jc-warning); }
body.jc-console .kpi-card.tone-danger::before { background: var(--jc-danger); }
body.jc-console .kpi-card.tone-ok::before { background: var(--jc-success); }
body.jc-console .kpi-card.tone-info::before { background: var(--ali-blue); }
body.jc-console .kpi-label {
  color: var(--jc-text-secondary);
  margin-bottom: 6px;
}
body.jc-console .kpi-value {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
body.jc-console .kpi-value em {
  font-style: normal;
  font-size: 13px;
  font-weight: 400;
  color: var(--jc-text-muted);
  margin-left: 4px;
}
body.jc-console .kpi-foot {
  margin-top: 6px;
  color: var(--jc-text-muted);
  font-size: 12px;
}
@media (max-width: 1100px) {
  body.jc-console .kpi-strip { grid-template-columns: repeat(2, 1fr); }
}

/* Query panel */
body.jc-console .query-panel {
  background: #fff;
  border: 1px solid var(--jc-card-border);
  border-radius: var(--jc-radius);
  padding: 14px 16px 6px;
  margin-bottom: 12px;
}
body.jc-console .query-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px 16px;
  align-items: end;
}
body.jc-console .query-grid .qi {
  margin-bottom: 10px;
  min-width: 0;
}
body.jc-console .query-grid .qi label {
  display: block;
  margin-bottom: 4px;
  color: var(--jc-text-secondary);
}
body.jc-console .query-grid .qi .form-control {
  width: 100%;
}
body.jc-console .query-grid .qi-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
@media (max-width: 1100px) {
  body.jc-console .query-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Summary bar */
body.jc-console .summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--jc-card-border);
  margin-bottom: 12px;
  border-radius: var(--jc-radius);
}
body.jc-console .summary-bar .item strong {
  font-size: 16px;
  margin-right: 4px;
  font-variant-numeric: tabular-nums;
}
body.jc-console .summary-bar .item span {
  color: var(--jc-text-muted);
}

/* Tags */
body.jc-console .tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 2px;
  font-size: 12px;
  line-height: 18px;
  border: 1px solid transparent;
}
body.jc-console .tag-orange { color: var(--jc-accent-orange); background: var(--jc-accent-orange-light); border-color: #ffd6b3; }
body.jc-console .tag-green { color: var(--jc-success); background: #e8f8ef; border-color: #b7ebc6; }
body.jc-console .tag-red { color: var(--jc-danger); background: #fff1f0; border-color: #ffccc7; }
body.jc-console .tag-blue { color: var(--ali-blue); background: #e6f4ff; border-color: #91caff; }
body.jc-console .tag-gray { color: var(--jc-text-secondary); background: #f5f5f5; border-color: #e8e8e8; }
body.jc-console .tag-yellow { color: #ad6800; background: #fff7e6; border-color: #ffd591; }

/* Section title */
body.jc-console .section-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 12px;
  padding-left: 8px;
  border-left: 3px solid var(--ali-orange);
}
body.jc-console .form-sheet {
  max-width: 1080px;
}

/* Stage (monitor home / model) */
body.jc-console .stage-modes {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}
body.jc-console .stage-modes a,
body.jc-console .stage-modes .stage-mode-btn {
  padding: 8px 14px;
  color: var(--jc-text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 13px;
  background: none;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  cursor: pointer;
}
body.jc-console .stage-modes a.active,
body.jc-console .stage-modes .stage-mode-btn.active {
  color: var(--ali-orange);
  background: #fff;
  border-bottom-color: var(--ali-orange);
  font-weight: 600;
}
body.jc-console .stage-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
body.jc-console .stage-tools .btn {
  height: 26px;
  padding: 0 8px;
  font-size: 12px;
}

/* List / table polish */
body.jc-console .content-wrapper .table thead th {
  background: #fafafa;
  color: var(--jc-text-secondary);
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12px;
}
body.jc-console .content-wrapper .table td {
  font-size: 12px;
  vertical-align: middle;
}
body.jc-console .content-wrapper .table .jc-table-state-cell {
  padding: 28px 12px !important;
  font-size: 13px;
  letter-spacing: 0.02em;
}
body.jc-console .list-card .table-responsive {
  border-top: 1px solid #f0f0f0;
}

/* Metric row */
body.jc-console .metric-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
body.jc-console .metric-cell {
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: var(--jc-radius);
  padding: 10px 12px;
}
body.jc-console .metric-cell .l { color: var(--jc-text-muted); margin-bottom: 4px; }
body.jc-console .metric-cell .n { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) {
  body.jc-console .metric-row { grid-template-columns: repeat(2, 1fr); }
}

body.jc-console .stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body.jc-console .stack > .card { margin-bottom: 0; }
body.jc-console .legend-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--jc-text-secondary);
  font-size: 12px;
}
body.jc-console .todo-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  align-items: flex-start;
}
body.jc-console .todo-item:last-child { border-bottom: none; }
body.jc-console .todo-item .time {
  color: var(--jc-text-muted);
  white-space: nowrap;
  font-size: 12px;
  margin-top: 2px;
}
body.jc-console .todo-item > div:last-child { min-width: 0; flex: 1; }
body.jc-console .inline-progress {
  width: 64px;
  height: 6px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
}
body.jc-console .inline-progress > i {
  display: block;
  height: 100%;
  background: var(--jc-primary);
}
body.jc-console .dash-weather-card {
  background: linear-gradient(135deg, #1c232b 0%, #2a3a55 100%);
  color: #fff;
  border: 0;
}
body.jc-console .dash-weather-card .card-body { color: rgba(255, 255, 255, 0.9); }
body.jc-console .dash-weather-card .temp {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  color: #fff;
}

/* Chip group */
body.jc-console .chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
body.jc-console .chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border: 1px solid #d9d9d9;
  border-radius: 14px;
  background: #fff;
  color: var(--jc-text-secondary);
  cursor: pointer;
  font-size: 12px;
}
body.jc-console .chip:hover,
body.jc-console .chip.active {
  border-color: var(--ali-orange);
  color: var(--ali-orange);
  background: var(--ali-orange-light);
}

/* Login page â locked to viewport, no page scrollbars */
html.login-html {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body.jc-console.login-page,
body.login-page.jc-console {
  --login-radius: 8px;
  --login-control-h: 44px;
  --login-ink: #1a2332;
  --login-muted: #6b7785;
  --login-line: #d7dee8;
  --login-panel-bg: #f3f6f9;
  --login-vh: 100vh;
  --login-vh: 100dvh;
  box-sizing: border-box;
  height: var(--login-vh);
  width: 100%;
  max-height: var(--login-vh);
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--login-panel-bg);
}

body.jc-console.login-page *,
body.jc-console.login-page *::before,
body.jc-console.login-page *::after {
  box-sizing: border-box;
}

body.jc-console.login-page .login-shell {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

/* Left brand / atmosphere plane */
body.jc-console.login-page .login-banner {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  color: #fff;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(24px, 4.5vh, 72px) clamp(28px, 5vw, 88px);
}

body.jc-console.login-page .login-banner-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 18% 20%, rgba(22, 119, 255, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 85% 75%, rgba(14, 165, 160, 0.18), transparent 50%),
    linear-gradient(155deg, #0f1720 0%, #1a2736 42%, #15202b 100%);
  z-index: 0;
}

body.jc-console.login-page .login-banner-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 92%);
}

body.jc-console.login-page .login-banner-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(36%, 280px);
  z-index: 1;
  pointer-events: none;
  opacity: 0.9;
}

body.jc-console.login-page .login-banner-wave svg {
  width: 100%;
  height: 100%;
  display: block;
}

body.jc-console.login-page .login-banner-wave .wave-a {
  fill: rgba(22, 119, 255, 0.12);
}

body.jc-console.login-page .login-banner-wave .wave-b {
  fill: rgba(14, 165, 160, 0.1);
}

body.jc-console.login-page .login-banner-wave .wave-line {
  fill: none;
  stroke: rgba(125, 211, 252, 0.55);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: login-wave-draw 2.4s ease-out forwards 0.35s;
}

@keyframes login-wave-draw {
  to { stroke-dashoffset: 0; }
}

body.jc-console.login-page .login-banner-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(560px, 100%);
  max-height: 100%;
  overflow: hidden;
  animation: login-rise 0.7s ease-out both;
}

@keyframes login-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

body.jc-console.login-page .login-brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(16px, 3.5vh, 36px);
}

body.jc-console.login-page .login-brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(145deg, #1677ff 0%, #0e8f9a 100%);
  box-shadow: 0 10px 28px rgba(22, 119, 255, 0.28);
}

body.jc-console.login-page .login-brand-name {
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

body.jc-console.login-page .login-brand-en {
  margin-top: 2px;
  font-family: "Sora", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

body.jc-console.login-page .login-banner-title {
  margin: 0 0 clamp(10px, 2vh, 18px);
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: clamp(24px, 2.8vw + 0.6vh, 40px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

body.jc-console.login-page .login-banner-title span {
  display: block;
  margin-top: 6px;
  color: #7dd3fc;
  font-weight: 600;
}

body.jc-console.login-page .login-banner-desc {
  margin: 0;
  max-width: 440px;
  color: rgba(255, 255, 255, 0.62);
  font-size: clamp(13px, 1.5vh, 15px);
  line-height: 1.65;
}

body.jc-console.login-page .login-feats {
  list-style: none;
  margin: clamp(18px, 4vh, 40px) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 2.5vh, 28px) clamp(20px, 3vw, 40px);
}

body.jc-console.login-page .login-feats li {
  min-width: 110px;
}

body.jc-console.login-page .login-feats strong {
  display: block;
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: clamp(15px, 1.8vh, 18px);
  font-weight: 600;
  margin-bottom: 4px;
}

body.jc-console.login-page .login-feats span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* Right form panel */
body.jc-console.login-page .login-panel {
  flex: 0 0 clamp(340px, 36vw, 440px);
  width: clamp(340px, 36vw, 440px);
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vh, 48px) clamp(20px, 3vw, 40px);
  background: var(--login-panel-bg);
  overflow: hidden;
}

body.jc-console.login-page .login-box {
  width: 100%;
  max-width: 360px;
  max-height: 100%;
  overflow: hidden;
  animation: login-rise 0.7s ease-out 0.12s both;
}

body.jc-console.login-page .login-box-head {
  margin-bottom: clamp(16px, 3vh, 28px);
}

body.jc-console.login-page .login-box-head h2 {
  margin: 0 0 8px;
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: clamp(22px, 2.4vh + 0.4vw, 26px);
  font-weight: 700;
  color: var(--login-ink);
  letter-spacing: 0.01em;
}

body.jc-console.login-page .login-box-head p {
  margin: 0;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.5;
}

body.jc-console.login-page .login-form .form-group {
  margin-bottom: clamp(12px, 2vh, 18px);
}

body.jc-console.login-page .login-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #3d4a5c;
}

body.jc-console.login-page .login-form .form-control {
  height: var(--login-control-h);
  width: 100%;
  padding: 0 14px;
  border: 1px solid var(--login-line);
  border-radius: var(--login-radius);
  background: #fff;
  font-size: 14px;
  color: var(--login-ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

body.jc-console.login-page .login-form .form-control::placeholder {
  color: #9aa6b5;
}

body.jc-console.login-page .login-form .form-control:hover {
  border-color: #b8c4d4;
}

body.jc-console.login-page .login-form .form-control:focus {
  border-color: var(--jc-primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.14);
  outline: none;
}

body.jc-console.login-page .login-error,
body.jc-console.login-page #loginError {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: var(--login-radius);
  background: #fff1f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
  font-size: 13px;
  line-height: 1.45;
}

body.jc-console.login-page .login-error[hidden],
body.jc-console.login-page #loginError[hidden] {
  display: none !important;
  margin: 0;
  padding: 0;
  border: none;
}

body.jc-console.login-page .login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--login-control-h);
  margin-top: 8px;
  padding: 0 16px;
  border: none;
  border-radius: var(--login-radius);
  background: var(--jc-primary);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.15s ease;
}

body.jc-console.login-page .login-submit:hover {
  background: var(--jc-primary-hover);
}

body.jc-console.login-page .login-submit:active {
  background: var(--jc-primary-active);
  transform: translateY(1px);
}

body.jc-console.login-page .login-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.28);
}

body.jc-console.login-page .login-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: clamp(14px, 2.5vh, 20px);
  font-size: 13px;
  color: var(--login-muted);
}

body.jc-console.login-page .login-secondary a {
  color: var(--jc-primary);
  font-weight: 500;
  text-decoration: none;
}

body.jc-console.login-page .login-secondary a:hover {
  color: var(--jc-primary-active);
  text-decoration: underline;
}

body.jc-console.login-page .login-foot {
  margin-top: clamp(16px, 3vh, 28px);
  text-align: center;
  color: #98a4b3;
  font-size: 12px;
  line-height: 1.4;
}

/* Short viewport: compress spacing, keep single screen */
@media (max-height: 720px) {
  body.jc-console.login-page {
    --login-control-h: 40px;
  }
  body.jc-console.login-page .login-brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 17px;
  }
  body.jc-console.login-page .login-banner-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  body.jc-console.login-page .login-feats {
    margin-top: 14px;
  }
  body.jc-console.login-page .login-foot {
    display: none;
  }
}

@media (max-height: 560px) {
  body.jc-console.login-page .login-banner-wave,
  body.jc-console.login-page .login-feats,
  body.jc-console.login-page .login-banner-desc {
    display: none;
  }
  body.jc-console.login-page .login-brand-lockup {
    margin-bottom: 12px;
  }
}

/* Narrow width: keep side-by-side when possible; phone hides banner */
@media (max-width: 900px) {
  body.jc-console.login-page .login-panel {
    flex-basis: min(360px, 42vw);
    width: min(360px, 42vw);
  }
  body.jc-console.login-page .login-banner {
    padding: 24px 28px;
  }
}

@media (max-width: 720px) {
  body.jc-console.login-page .login-banner {
    display: none;
  }
  body.jc-console.login-page .login-panel {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
  }
  body.jc-console.login-page .login-box {
    max-width: min(360px, 100%);
  }
}

/* ========== Dark theme (night mode) ========== */
html.jc-theme-dark body.jc-console {
  --jc-content-bg: #0f1115;
  --jc-text: #e8eaed;
  --jc-text-secondary: #c2c6ce;
  --jc-text-muted: #9aa0ab;
  --jc-card-border: #2a2f3a;
  --jc-primary-light: rgba(22, 119, 255, 0.18);
  --jc-accent-orange-light: rgba(255, 106, 0, 0.16);
  --jc-surface: #1a1f2a;
  --jc-surface-2: #212733;
  color: var(--jc-text);
  background: var(--jc-content-bg);
}
html.jc-theme-dark body.jc-console .container-scroller,
html.jc-theme-dark body.jc-console .page-body-wrapper,
html.jc-theme-dark body.jc-console .main-panel,
html.jc-theme-dark body.jc-console .main-panel .content-wrapper {
  background: var(--jc-content-bg) !important;
  color: var(--jc-text);
}

/* Sidebar */
html.jc-theme-dark body.jc-console .sidebar.sidebar-offcanvas {
  background: #161a22 !important;
  border-right-color: #2a2f3a;
}
html.jc-theme-dark body.jc-console .sidebar .nav .nav-item .nav-link {
  color: #c8ccd2 !important;
}
html.jc-theme-dark body.jc-console .sidebar .nav .nav-item .nav-link .menu-icon,
html.jc-theme-dark body.jc-console .sidebar .nav .nav-item .nav-link i.menu-icon {
  color: #8a8f98 !important;
}
html.jc-theme-dark body.jc-console .sidebar .nav .nav-item:hover > .nav-link {
  background: rgba(22, 119, 255, 0.12) !important;
  color: #69b1ff !important;
}
html.jc-theme-dark body.jc-console .sidebar .nav .nav-item:hover > .nav-link .menu-icon,
html.jc-theme-dark body.jc-console .sidebar .nav .nav-item.active > .nav-link .menu-icon {
  color: #69b1ff !important;
}
html.jc-theme-dark body.jc-console .sidebar .nav .nav-item.active > .nav-link {
  background: rgba(22, 119, 255, 0.18) !important;
  color: #69b1ff !important;
  border-left-color: var(--jc-primary);
}
html.jc-theme-dark body.jc-console .sidebar .nav .nav-item.nav-category .nav-link,
html.jc-theme-dark body.jc-console .sidebar .nav .nav-item.nav-category span.nav-link {
  color: #7a8090 !important;
}

/* Page header / cards / panels */
html.jc-theme-dark body.jc-console .content-wrapper .page-header,
html.jc-theme-dark body.jc-console .content-wrapper .page-head,
html.jc-theme-dark body.jc-console .content-wrapper .card,
html.jc-theme-dark body.jc-console .kpi-card,
html.jc-theme-dark body.jc-console .query-panel,
html.jc-theme-dark body.jc-console .summary-bar,
html.jc-theme-dark body.jc-console .list-card {
  background: var(--jc-surface) !important;
  border-color: var(--jc-card-border) !important;
  color: var(--jc-text);
}
html.jc-theme-dark body.jc-console .content-wrapper .page-header h3,
html.jc-theme-dark body.jc-console .content-wrapper .page-head h1,
html.jc-theme-dark body.jc-console .content-wrapper .page-head h3,
html.jc-theme-dark body.jc-console .content-wrapper .card .card-title,
html.jc-theme-dark body.jc-console .content-wrapper .card-hd h3 {
  color: var(--jc-text) !important;
}
html.jc-theme-dark body.jc-console .content-wrapper .card-hd {
  border-bottom-color: #2a2f3a;
}
html.jc-theme-dark body.jc-console .text-muted,
html.jc-theme-dark body.jc-console .content-wrapper .text-muted,
html.jc-theme-dark body.jc-console .content-wrapper .page-header .text-muted,
html.jc-theme-dark body.jc-console .content-wrapper .page-head .text-muted,
html.jc-theme-dark body.jc-console .content-wrapper .page-head > small.text-muted {
  color: var(--jc-text-muted) !important;
}
html.jc-theme-dark body.jc-console .text-dark,
html.jc-theme-dark body.jc-console .content-wrapper .text-dark {
  color: var(--jc-text) !important;
}

/* Forms: select / input / textarea */
html.jc-theme-dark body.jc-console .content-wrapper .form-control,
html.jc-theme-dark body.jc-console .content-wrapper select.form-control,
html.jc-theme-dark body.jc-console .content-wrapper input.form-control,
html.jc-theme-dark body.jc-console .content-wrapper textarea.form-control,
html.jc-theme-dark body.jc-console .modal .form-control,
html.jc-theme-dark body.jc-console .modal select.form-control {
  background-color: #12161e !important;
  border-color: #3a4150 !important;
  color: var(--jc-text) !important;
}
html.jc-theme-dark body.jc-console .content-wrapper .form-control::placeholder,
html.jc-theme-dark body.jc-console .modal .form-control::placeholder {
  color: #7a8090 !important;
}
html.jc-theme-dark body.jc-console .content-wrapper .form-control:focus,
html.jc-theme-dark body.jc-console .modal .form-control:focus {
  border-color: var(--jc-primary) !important;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.25) !important;
  background-color: #12161e !important;
  color: var(--jc-text) !important;
}
html.jc-theme-dark body.jc-console .content-wrapper .custom-select,
html.jc-theme-dark body.jc-console .modal .custom-select {
  background-color: #12161e !important;
  border-color: #3a4150 !important;
  color: var(--jc-text) !important;
}
html.jc-theme-dark body.jc-console .content-wrapper .input-group-text {
  background: #1e2430 !important;
  border-color: #3a4150 !important;
  color: var(--jc-text-secondary) !important;
}
html.jc-theme-dark body.jc-console .content-wrapper label,
html.jc-theme-dark body.jc-console .modal label,
html.jc-theme-dark body.jc-console .query-grid .qi label {
  color: var(--jc-text-secondary) !important;
}

/* Buttons */
html.jc-theme-dark body.jc-console .btn-outline-secondary,
html.jc-theme-dark body.jc-console .btn-light,
html.jc-theme-dark body.jc-console .btn-secondary {
  background: #212733 !important;
  border-color: #3a4150 !important;
  color: var(--jc-text) !important;
}
html.jc-theme-dark body.jc-console .btn-outline-secondary:hover,
html.jc-theme-dark body.jc-console .btn-light:hover,
html.jc-theme-dark body.jc-console .btn-secondary:hover {
  background: #2a3140 !important;
  border-color: #4a5263 !important;
  color: #fff !important;
}
html.jc-theme-dark body.jc-console .btn-outline-primary {
  background: transparent !important;
  color: #69b1ff !important;
  border-color: #69b1ff !important;
}
html.jc-theme-dark body.jc-console .btn-outline-primary:hover {
  background: var(--jc-primary-light) !important;
  color: #91caff !important;
}
html.jc-theme-dark body.jc-console .jc-pager-btn.btn-outline-primary {
  background: #1a1f2a !important;
  color: #69b1ff !important;
  border-color: #69b1ff !important;
}
html.jc-theme-dark body.jc-console .jc-pager-btn.is-disabled,
html.jc-theme-dark body.jc-console .jc-pager-btn:disabled {
  color: #6b7280 !important;
  background: #161a22 !important;
  border-color: #2a2f3a !important;
}
html.jc-theme-dark body.jc-console .jc-pager-pages {
  color: var(--jc-text-secondary) !important;
}

/* Tables — force readable body text (Bootstrap .table uses dark ink) */
html.jc-theme-dark body.jc-console .content-wrapper .table,
html.jc-theme-dark body.jc-console .modal .table {
  color: var(--jc-text) !important;
  border-color: #2a2f3a !important;
}
html.jc-theme-dark body.jc-console .content-wrapper .table thead th,
html.jc-theme-dark body.jc-console .modal .table thead th {
  background: #1e2430 !important;
  color: #c2c6ce !important;
  border-bottom-color: #2a2f3a !important;
  border-color: #2a2f3a !important;
}
html.jc-theme-dark body.jc-console .content-wrapper .table td,
html.jc-theme-dark body.jc-console .content-wrapper .table th,
html.jc-theme-dark body.jc-console .modal .table td,
html.jc-theme-dark body.jc-console .modal .table th {
  color: var(--jc-text) !important;
  border-color: #2a2f3a !important;
  background-color: transparent;
}
html.jc-theme-dark body.jc-console .content-wrapper .table tbody tr,
html.jc-theme-dark body.jc-console .modal .table tbody tr {
  background-color: transparent;
}
html.jc-theme-dark body.jc-console .content-wrapper .table-striped tbody tr:nth-of-type(odd),
html.jc-theme-dark body.jc-console .content-wrapper .table-hover tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.04) !important;
  color: var(--jc-text) !important;
}
html.jc-theme-dark body.jc-console .content-wrapper .table .jc-table-state-cell {
  color: var(--jc-text-muted) !important;
}
html.jc-theme-dark body.jc-console .list-card .table-responsive {
  border-top-color: #2a2f3a;
}

/* Links / action colors on dark surfaces */
html.jc-theme-dark body.jc-console .content-wrapper a:not(.btn):not(.nav-link):not(.dropdown-item),
html.jc-theme-dark body.jc-console .content-wrapper .text-primary,
html.jc-theme-dark body.jc-console .modal .text-primary {
  color: #69b1ff !important;
}
html.jc-theme-dark body.jc-console .content-wrapper a:not(.btn):not(.nav-link):not(.dropdown-item):hover {
  color: #91caff !important;
}
html.jc-theme-dark body.jc-console .content-wrapper .text-danger,
html.jc-theme-dark body.jc-console .content-wrapper a.text-danger,
html.jc-theme-dark body.jc-console .modal .text-danger,
html.jc-theme-dark body.jc-console .btn-del.text-danger {
  color: #ff7875 !important;
}
html.jc-theme-dark body.jc-console .content-wrapper .text-success,
html.jc-theme-dark body.jc-console .modal .text-success {
  color: #73d13d !important;
}
html.jc-theme-dark body.jc-console .content-wrapper .text-warning,
html.jc-theme-dark body.jc-console .modal .text-warning {
  color: #ffc53d !important;
}
html.jc-theme-dark body.jc-console .content-wrapper .text-info {
  color: #69c0ff !important;
}

/* Pagination */
html.jc-theme-dark body.jc-console .page-item .page-link {
  background: #1a1f2a !important;
  border-color: #2a2f3a !important;
  color: var(--jc-text-secondary) !important;
}
html.jc-theme-dark body.jc-console .page-item.disabled .page-link {
  background: #161a22 !important;
  color: #5c6370 !important;
}
html.jc-theme-dark body.jc-console .page-item.active .page-link {
  background-color: var(--jc-primary) !important;
  border-color: var(--jc-primary) !important;
  color: #fff !important;
}

/* Tabs / stage / chips / tags */
html.jc-theme-dark body.jc-console .nav-tabs {
  border-bottom-color: #2a2f3a;
}
html.jc-theme-dark body.jc-console .nav-tabs .nav-link {
  color: #9aa0ab !important;
}
html.jc-theme-dark body.jc-console .nav-tabs .nav-link.active,
html.jc-theme-dark body.jc-console .nav-tabs .nav-item.show .nav-link {
  color: #69b1ff !important;
  border-bottom-color: var(--jc-primary) !important;
}
html.jc-theme-dark body.jc-console .metric-cell {
  background: #1e2430;
  border-color: #2a2f3a;
  color: var(--jc-text);
}
html.jc-theme-dark body.jc-console .stage-modes {
  background: #161a22;
  border-bottom-color: #2a2f3a;
}
html.jc-theme-dark body.jc-console .stage-modes a.active,
html.jc-theme-dark body.jc-console .stage-modes .stage-mode-btn.active {
  background: #1a1f2a;
  color: #69b1ff;
  border-bottom-color: var(--jc-primary);
}
html.jc-theme-dark body.jc-console .stage-tools {
  background: #1a1f2a;
  border-bottom-color: #2a2f3a;
}
html.jc-theme-dark body.jc-console .chip {
  background: #212733;
  border-color: #3a4150;
  color: var(--jc-text-secondary);
}
html.jc-theme-dark body.jc-console .chip:hover,
html.jc-theme-dark body.jc-console .chip.active {
  border-color: var(--jc-primary);
  color: #69b1ff;
  background: var(--jc-primary-light);
}
html.jc-theme-dark body.jc-console .badge-secondary,
html.jc-theme-dark body.jc-console .badge-light {
  background: #2a3140 !important;
  color: #c2c6ce !important;
  border: 1px solid #3a4150;
}
html.jc-theme-dark body.jc-console .form-check-input {
  background-color: #12161e;
  border-color: #5a6270;
  accent-color: var(--jc-primary, #1677ff);
}
html.jc-theme-dark body.jc-console .form-check-input:checked {
  background-color: var(--jc-primary, #1677ff);
  border-color: var(--jc-primary, #1677ff);
}
html.jc-theme-dark body.jc-console .form-check-label {
  color: var(--jc-text-secondary, #9aa0a6) !important;
}
html.jc-theme-dark body.jc-console .modal .btn-outline-secondary {
  color: #e8eaed !important;
  border-color: #5a6270 !important;
  background: #212733 !important;
}
html.jc-theme-dark body.jc-console .modal .btn-outline-secondary:hover {
  color: #fff !important;
  background: #2a3140 !important;
  border-color: #6a7280 !important;
}
html.jc-theme-dark body.jc-console .tag-gray {
  color: #c2c6ce;
  background: #2a2f3a;
  border-color: #3a4150;
}
html.jc-theme-dark body.jc-console .tag-green {
  color: #73d13d;
  background: rgba(30, 142, 62, 0.18);
  border-color: rgba(115, 209, 61, 0.35);
}
html.jc-theme-dark body.jc-console .tag-red {
  color: #ff7875;
  background: rgba(230, 33, 18, 0.16);
  border-color: rgba(255, 120, 117, 0.35);
}
html.jc-theme-dark body.jc-console .tag-blue {
  color: #69b1ff;
  background: rgba(22, 119, 255, 0.16);
  border-color: rgba(105, 177, 255, 0.35);
}
html.jc-theme-dark body.jc-console .tag-orange {
  color: #ff9c6e;
  background: rgba(255, 106, 0, 0.16);
  border-color: rgba(255, 156, 110, 0.35);
}
html.jc-theme-dark body.jc-console .tag-yellow {
  color: #ffc53d;
  background: rgba(245, 166, 35, 0.16);
  border-color: rgba(255, 197, 61, 0.35);
}
html.jc-theme-dark body.jc-console .todo-item {
  border-bottom-color: #2a2f3a;
}

/* Modal / dropdown */
html.jc-theme-dark body.jc-console .modal-content {
  background: #1a1f2a !important;
  border-color: #2a2f3a !important;
  color: var(--jc-text) !important;
}
html.jc-theme-dark body.jc-console .modal-header,
html.jc-theme-dark body.jc-console .modal-footer {
  border-color: #2a2f3a !important;
  background: #1a1f2a !important;
}
html.jc-theme-dark body.jc-console .modal-title,
html.jc-theme-dark body.jc-console .modal-body {
  color: var(--jc-text) !important;
}
html.jc-theme-dark body.jc-console .close,
html.jc-theme-dark body.jc-console .modal .close {
  color: #e8eaed !important;
  text-shadow: none !important;
  opacity: 0.75;
}

/* Modal nested panels (物协议绑定卡、浅色内嵌块等) */
html.jc-theme-dark body.jc-console .modal .hw-bind-card,
html.jc-theme-dark body.jc-console .modal .hw-nested-panel {
  background: #12161e !important;
  border-color: #2a2f3a !important;
  color: var(--jc-text) !important;
}
html.jc-theme-dark body.jc-console .modal .hw-bind-card label,
html.jc-theme-dark body.jc-console .modal .hw-bind-card .bind-keys label,
html.jc-theme-dark body.jc-console .modal .hw-bind-card .bind-ff-label,
html.jc-theme-dark body.jc-console .modal .hw-protocol-dlg .label-hint {
  color: var(--jc-text-secondary, #9aa0a6) !important;
}
html.jc-theme-dark body.jc-console .modal .hw-bind-card .table {
  background: transparent !important;
}
html.jc-theme-dark body.jc-console .modal .hw-bind-card .btn-outline-secondary {
  color: #c2c6ce !important;
  border-color: #3a4150 !important;
  background: transparent !important;
}
html.jc-theme-dark body.jc-console .modal .hw-bind-card .btn-outline-secondary:hover {
  color: #e8eaed !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: #5a6270 !important;
}
html.jc-theme-dark body.jc-console .modal .table-hover tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.04) !important;
  color: var(--jc-text) !important;
}
html.jc-theme-dark body.jc-console .dropdown-menu {
  background: #1a1f2a !important;
  border-color: #2a2f3a !important;
}
html.jc-theme-dark body.jc-console .dropdown-item {
  color: var(--jc-text) !important;
}
html.jc-theme-dark body.jc-console .dropdown-item:hover,
html.jc-theme-dark body.jc-console .dropdown-item:focus {
  background: rgba(22, 119, 255, 0.16) !important;
  color: #69b1ff !important;
}
html.jc-theme-dark body.jc-console .dropdown-divider {
  border-top-color: #2a2f3a !important;
}

/* layui layer：挂在 body 上，会继承夜间文字色但默认仍白底 → 字几乎看不见 */
html.jc-theme-dark .layui-layer {
  background-color: #1a1f2a !important;
  color: #e8eaed !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55) !important;
  border: 1px solid #2a2f3a;
}
html.jc-theme-dark .layui-layer-title {
  background-color: #212733 !important;
  border-bottom-color: #2a2f3a !important;
  color: #e8eaed !important;
}
html.jc-theme-dark .layui-layer-content,
html.jc-theme-dark .layui-layer-dialog .layui-layer-content {
  color: #e8eaed !important;
  background: transparent !important;
}
html.jc-theme-dark .layui-layer-btn {
  border-top: 1px solid #2a2f3a;
  background: #1a1f2a;
}
html.jc-theme-dark .layui-layer-btn a {
  background-color: #212733 !important;
  border-color: #3a4150 !important;
  color: #e8eaed !important;
}
html.jc-theme-dark .layui-layer-btn .layui-layer-btn0 {
  background-color: #1677ff !important;
  border-color: #1677ff !important;
  color: #fff !important;
}
html.jc-theme-dark .layui-layer-btn .layui-layer-btn1:hover,
html.jc-theme-dark .layui-layer-btn a:hover {
  opacity: 0.92;
}
html.jc-theme-dark .layui-layer-setwin .layui-layer-close1 {
  filter: invert(1) brightness(1.4);
  opacity: 0.75;
}
html.jc-theme-dark .layui-layer-setwin .layui-layer-close1:hover {
  opacity: 1;
}
html.jc-theme-dark .layui-layer-msg:not(.layui-layer-hui) {
  background-color: #1a1f2a !important;
  border-color: #2a2f3a !important;
  color: #e8eaed !important;
}
html.jc-theme-dark .layui-layer-prompt .layui-layer-input {
  background-color: #12161e !important;
  border-color: #3a4150 !important;
  color: #e8eaed !important;
}
html.jc-theme-dark .layui-layer-prompt .layui-layer-input::placeholder {
  color: #9aa0ab !important;
}
html.jc-theme-dark .layui-layer-load {
  background-color: #1a1f2a !important;
}

/* Borders / hr / pre / code */
html.jc-theme-dark body.jc-console .border,
html.jc-theme-dark body.jc-console .border-top,
html.jc-theme-dark body.jc-console .border-bottom {
  border-color: #2a2f3a !important;
}
html.jc-theme-dark body.jc-console hr {
  border-top-color: #2a2f3a !important;
}
html.jc-theme-dark body.jc-console pre,
html.jc-theme-dark body.jc-console code,
html.jc-theme-dark body.jc-console .bg-light,
html.jc-theme-dark body.jc-console .bg-white {
  background-color: #12161e !important;
  color: var(--jc-text) !important;
  border-color: #2a2f3a;
}

/* ========== Select2 searchable selects ========== */
body.jc-console .select2-container { font-size: 0.875rem; }
body.jc-console .select2-container--bootstrap .select2-selection--single {
  height: calc(1.5em + 0.5rem + 2px);
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-color: #ced4da;
  border-radius: 0.2rem;
}
body.jc-console .select2-container--bootstrap .select2-selection--single .select2-selection__rendered {
  line-height: 1.5;
  padding-left: 0;
  color: inherit;
}
body.jc-console .select2-container--bootstrap .select2-selection--single .select2-selection__arrow {
  height: calc(1.5em + 0.5rem);
}
body.jc-console .select2-container--bootstrap .select2-selection--single .select2-selection__clear {
  margin-right: 1.25rem;
}
body.jc-console .modal .select2-container { width: 100% !important; }
body.jc-console .form-inline .select2-container { margin-right: 0.5rem; }
body.jc-console .select2-container--bootstrap .select2-dropdown {
  border-color: #ced4da;
  z-index: 2000;
}
body.jc-console .select2-container--bootstrap .select2-search--dropdown .select2-search__field {
  border-color: #ced4da;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}
html.jc-theme-dark body.jc-console .select2-container--bootstrap .select2-selection--single,
html.jc-theme-dark body.jc-console .select2-container--bootstrap .select2-dropdown,
html.jc-theme-dark body.jc-console .select2-container--bootstrap .select2-search--dropdown .select2-search__field {
  background: #1a1f2a !important;
  border-color: #2a2f3a !important;
  color: #e8eaed !important;
}
html.jc-theme-dark body.jc-console .select2-container--bootstrap .select2-selection--single .select2-selection__rendered {
  color: #e8eaed !important;
}
html.jc-theme-dark body.jc-console .select2-container--bootstrap .select2-results__option {
  color: #e8eaed !important;
}
html.jc-theme-dark body.jc-console .select2-container--bootstrap .select2-results__option--highlighted[aria-selected] {
  background: rgba(22, 119, 255, 0.35);
}

/* Î´ÊµÏÖ´«ÊäÀàÐÍ£ºÉ¾³ýÏß£¨Ô­Éú option + Select2 ½á¹û£© */
body.jc-console option.jc-opt-strike,
body.jc-console .jc-opt-strike,
body.jc-console .select2-results__option .jc-opt-strike,
body.jc-console .select2-selection__rendered .jc-opt-strike {
  text-decoration: line-through;
  color: #999;
}
html.jc-theme-dark body.jc-console .jc-opt-strike,
html.jc-theme-dark body.jc-console .select2-results__option .jc-opt-strike,
html.jc-theme-dark body.jc-console .select2-selection__rendered .jc-opt-strike {
  color: #888;
}
