/**
 * 监测物联 · 控制台主题（迁入 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: #333;
  --jc-text-secondary: #666;
  --jc-text-muted: #999;
  --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;
}
/* 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: 8px 0 24px;
  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: 8px;
  height: 36px;
  padding: 0 16px 0 13px !important;
  margin: 0 !important;
  color: var(--jc-text) !important;
  border-left: 3px solid transparent;
  border-radius: 0 !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: #999 !important;
  margin: 0 !important;
  width: 16px;
  font-size: 14px;
}
body.jc-console .sidebar .nav .nav-item .nav-link .menu-title {
  color: inherit !important;
  font-size: 13px !important;
  line-height: 1.2;
}
body.jc-console .sidebar .nav .nav-item:hover > .nav-link {
  background: #fafafa !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: 8px;
}
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: 8px 16px 4px !important;
  color: var(--jc-text-muted) !important;
  font-size: 11px !important;
  font-weight: 400;
  letter-spacing: 0.5px;
  border-left: 0;
  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: 12px 16px 20px !important;
}

/* ========== Content utilities（页面可用） ========== */
body.jc-console .content-wrapper .page-header,
body.jc-console .content-wrapper .page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
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: 16px;
  font-weight: 600;
  color: var(--jc-text);
}
body.jc-console .content-wrapper .page-head .desc,
body.jc-console .content-wrapper .page-header .text-muted {
  margin: 2px 0 0;
  color: var(--jc-text-muted);
  font-size: 12px;
}
body.jc-console .content-wrapper .page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

body.jc-console .content-wrapper .card {
  border: 1px solid var(--jc-card-border);
  border-radius: var(--jc-radius);
  box-shadow: none !important;
  background: #fff;
}
body.jc-console .content-wrapper .card .card-title,
body.jc-console .content-wrapper .card-hd h3 {
  font-size: 14px;
  font-weight: 600;
}
body.jc-console .content-wrapper .card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  gap: 8px;
}
body.jc-console .content-wrapper .card-hd h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
body.jc-console .content-wrapper .card-hd .extra,
body.jc-console .content-wrapper .card-hd > a {
  font-size: 12px;
  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: 16px;
}

/* 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;
}
body.jc-console .content-wrapper .nav-tabs .nav-link.active {
  color: var(--jc-primary) !important;
  border-bottom-color: var(--jc-primary) !important;
  font-weight: 600;
}
body.jc-console .content-wrapper .nav-tabs .nav-link:hover {
  color: var(--jc-primary);
}
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 .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 .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 overrides for shell */
html.jc-theme-dark body.jc-console {
  --jc-content-bg: #0f1115;
  --jc-text: #e8eaed;
  --jc-text-secondary: #b0b3b8;
  --jc-text-muted: #8a8f98;
  --jc-card-border: #2a2f3a;
}
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:hover > .nav-link,
html.jc-theme-dark body.jc-console .sidebar .nav .nav-item.active > .nav-link {
  background: rgba(22, 119, 255, 0.16) !important;
  color: #69b1ff !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;
}
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 {
  background: #1a1f2a;
  border-color: #2a2f3a;
}
html.jc-theme-dark body.jc-console .content-wrapper .table thead th {
  background: #1e2430;
  color: #b0b3b8;
}
html.jc-theme-dark body.jc-console .metric-cell {
  background: #1e2430;
  border-color: #2a2f3a;
}
