/*
 * 云森客统一设计系统 v1
 * 参考 Ant Design 的紧凑组件尺度，将参考站黑粉视觉映射为云森客白蓝品牌。
 * 该文件最后加载，只统一视觉与交互状态，不隐藏、删除或重排业务内容。
 */

:root {
  --ysk-primary: #1769df;
  --ysk-primary-hover: #0f58c7;
  --ysk-primary-active: #0b47a4;
  --ysk-primary-soft: #eaf3ff;
  --ysk-primary-softer: #f4f8ff;
  --ysk-bg: #f5f8fc;
  --ysk-surface: #ffffff;
  --ysk-surface-muted: #f8fafd;
  --ysk-text: #172944;
  --ysk-text-secondary: #65758b;
  --ysk-text-tertiary: #8b9aaf;
  --ysk-border: #dfe7f2;
  --ysk-border-soft: #edf2f7;
  --ysk-success: #16a361;
  --ysk-success-soft: #eaf8f1;
  --ysk-warning: #d78310;
  --ysk-warning-soft: #fff6e6;
  --ysk-danger: #df4052;
  --ysk-danger-soft: #fff0f2;
  --ysk-info: #1769df;
  --ysk-info-soft: #eaf3ff;
  --ysk-radius-sm: 6px;
  --ysk-radius: 8px;
  --ysk-radius-lg: 10px;
  --ysk-control-height-sm: 24px;
  --ysk-control-height: 32px;
  --ysk-control-height-lg: 40px;
  --ysk-shadow-card: 0 1px 2px rgba(23, 41, 68, .03), 0 6px 18px rgba(23, 41, 68, .035);
  --ysk-shadow-float: 0 12px 32px rgba(23, 41, 68, .12);
  --ysk-focus-ring: 0 0 0 3px rgba(23, 105, 223, .13);
}

html[data-theme="sky"],
body.super-app {
  color-scheme: light;
  background: var(--ysk-bg);
  color: var(--ysk-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

html[data-theme="sky"] *,
body.super-app * {
  box-sizing: border-box;
}

html[data-theme="sky"] a,
body.super-app a {
  color: var(--ysk-primary);
}

html[data-theme="sky"] a:hover,
body.super-app a:hover {
  color: var(--ysk-primary-hover);
}

html[data-theme="sky"] :focus-visible,
body.super-app :focus-visible {
  outline: 2px solid rgba(23, 105, 223, .5);
  outline-offset: 2px;
}

/* ===== 应用骨架与页面留白 ===== */
html[data-theme="sky"] .main,
body.super-app .super-main {
  background: var(--ysk-bg);
}

html[data-theme="sky"] .topbar,
body.super-app .super-topbar {
  min-height: 64px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--ysk-border-soft);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

html[data-theme="sky"] .content {
  padding: 20px 24px 28px;
}

html[data-theme="sky"] .content > :not(script):not(style):not(.modal):not(.modal-backdrop) {
  width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

body.super-app .super-content {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 20px 24px 30px;
}

html[data-theme="sky"] .topbar-title,
body.super-app .super-topbar-title {
  color: var(--ysk-text);
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -.01em;
}

html[data-theme="sky"] .topbar-title-mark {
  width: 30px;
  height: 30px;
  border-radius: var(--ysk-radius);
  color: var(--ysk-primary);
  background: var(--ysk-primary-soft);
  border: 1px solid #d7e8ff;
  box-shadow: none;
}

/* ===== 页面标题 ===== */
html[data-theme="sky"] :is(.page-head, .page-header, .td-head, .ta-head, .ra-head, .cfg-head, .device-head, .messages-head),
body.super-app :is(.sp-page-head, .sp-section-head, .ops-page-head) {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 20px;
}

html[data-theme="sky"] :is(.page-title, .td-title, .ta-title, .ra-title, .cfg-title),
body.super-app :is(.sp-page-title, .ops-page-title) {
  margin: 0;
  color: var(--ysk-text);
  font-size: 22px;
  line-height: 1.35;
  font-weight: 760;
  letter-spacing: -.02em;
}

html[data-theme="sky"] :is(.page-desc, .page-subtitle, .td-sub, .ta-sub, .ra-sub, .cfg-subtitle),
body.super-app :is(.sp-page-sub, .sp-page-desc, .ops-page-sub) {
  margin-top: 4px;
  color: var(--ysk-text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

html[data-theme="sky"] :is(.section-title, .panel-title, .card-title),
body.super-app :is(.sp-section-title, .sp-card-title) {
  color: var(--ysk-text);
  font-size: 15px;
  font-weight: 700;
}

/* ===== 卡片、面板与内容容器 ===== */
html[data-theme="sky"] :is(.card, .panel, .info-card, .stat-card, .dash-card, .feature-card, .plan-card, .device-card, .ta-item, .svc-card, .cfg-card),
body.super-app :is(.sp-card, .sp-stat, .sp-panel, .sp-kpi, .ops-card, .runtime-card, .tenant-card) {
  background: var(--ysk-surface);
  border: 1px solid var(--ysk-border);
  border-radius: var(--ysk-radius-lg);
  box-shadow: var(--ysk-shadow-card);
}

html[data-theme="sky"] :is(.card-header, .card-head, .panel-head),
body.super-app :is(.sp-card-head, .sp-panel-head) {
  min-height: 50px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ysk-border-soft);
  background: var(--ysk-surface);
  border-radius: var(--ysk-radius-lg) var(--ysk-radius-lg) 0 0;
}

html[data-theme="sky"] :is(.card-body, .panel-body),
body.super-app :is(.sp-card-body, .sp-panel-body) {
  padding: 16px;
}

html[data-theme="sky"] :is(.card-footer, .panel-footer),
body.super-app :is(.sp-card-foot, .sp-panel-foot) {
  padding: 12px 16px;
  border-top: 1px solid var(--ysk-border-soft);
  background: var(--ysk-surface-muted);
  border-radius: 0 0 var(--ysk-radius-lg) var(--ysk-radius-lg);
}

/* 统计卡遵循参考站：18px 内边距、28px 主数值 */
html[data-theme="sky"] :is(.stat-card, .dash-card, .metric-card, .svc-stat),
body.super-app :is(.sp-stat, .sp-kpi) {
  padding: 18px;
}

html[data-theme="sky"] :is(.stat-label, .metric-label, .dash-label),
body.super-app :is(.sp-stat-label, .sp-kpi-label) {
  color: var(--ysk-text-secondary);
  font-size: 12px;
  font-weight: 600;
}

html[data-theme="sky"] :is(.stat-value, .metric-value, .dash-value),
body.super-app :is(.sp-stat-value, .sp-kpi-value) {
  margin-top: 6px;
  color: var(--ysk-text);
  font-size: 28px;
  line-height: 1.2;
  font-weight: 760;
  letter-spacing: -.025em;
}

/* ===== 按钮 ===== */
html[data-theme="sky"] :is(.btn, button.btn),
body.super-app :is(.sp-btn, .btn, button.btn) {
  min-height: var(--ysk-control-height);
  padding: 5px 12px;
  border: 1px solid var(--ysk-border);
  border-radius: var(--ysk-radius);
  background: var(--ysk-surface);
  color: var(--ysk-text);
  box-shadow: 0 1px 1px rgba(23, 41, 68, .025);
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  transition: border-color .16s ease, color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

html[data-theme="sky"] :is(.btn, button.btn):hover,
body.super-app :is(.sp-btn, .btn, button.btn):hover {
  border-color: #9fc3f3;
  color: var(--ysk-primary);
  background: var(--ysk-primary-softer);
  box-shadow: 0 2px 6px rgba(23, 105, 223, .08);
}

html[data-theme="sky"] :is(.btn, button.btn):active,
body.super-app :is(.sp-btn, .btn, button.btn):active {
  transform: translateY(1px);
}

html[data-theme="sky"] :is(.btn-primary, .btn-blue),
body.super-app :is(.sp-btn-primary, .btn-primary, .btn-blue) {
  border-color: var(--ysk-primary);
  background: var(--ysk-primary);
  color: #fff;
  box-shadow: 0 3px 9px rgba(23, 105, 223, .18);
}

html[data-theme="sky"] :is(.btn-primary, .btn-blue):hover,
body.super-app :is(.sp-btn-primary, .btn-primary, .btn-blue):hover {
  border-color: var(--ysk-primary-hover);
  background: var(--ysk-primary-hover);
  color: #fff;
}

html[data-theme="sky"] :is(.btn-danger, .btn-outline-danger),
body.super-app :is(.sp-btn-danger, .btn-danger, .btn-outline-danger) {
  border-color: #f2b7c0;
  color: var(--ysk-danger);
  background: #fff;
}

html[data-theme="sky"] :is(.btn-danger, .btn-outline-danger):hover,
body.super-app :is(.sp-btn-danger, .btn-danger, .btn-outline-danger):hover {
  border-color: var(--ysk-danger);
  color: var(--ysk-danger);
  background: var(--ysk-danger-soft);
}

html[data-theme="sky"] :is(.btn-sm, .btn-small),
body.super-app :is(.sp-btn-sm, .btn-sm, .btn-small) {
  min-height: 24px;
  padding: 1px 8px;
  border-radius: var(--ysk-radius-sm);
  font-size: 12px;
  line-height: 20px;
}

html[data-theme="sky"] :is(.btn-lg, .btn-large),
body.super-app :is(.sp-btn-lg, .btn-lg, .btn-large) {
  min-height: 40px;
  padding: 9px 16px;
}

html[data-theme="sky"] :is(.btn-icon, .icon-btn),
body.super-app :is(.sp-icon-btn, .btn-icon, .icon-btn) {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

html[data-theme="sky"] :is(.btn, .icon-btn) i,
body.super-app :is(.sp-btn, .btn, .sp-icon-btn) i {
  font-size: 16px;
  line-height: 1;
}

html[data-theme="sky"] button:disabled,
body.super-app button:disabled {
  cursor: not-allowed;
  opacity: .52;
  box-shadow: none;
}

/* ===== 输入框、选择框、表单 ===== */
html[data-theme="sky"] :is(.form-control, .form-select, .search-input, .filter-input),
body.super-app :is(.sp-input, .sp-select, .sp-search input, .form-control, .form-select) {
  min-height: var(--ysk-control-height);
  height: var(--ysk-control-height);
  padding: 5px 11px;
  border: 1px solid var(--ysk-border);
  border-radius: var(--ysk-radius);
  background-color: var(--ysk-surface);
  color: var(--ysk-text);
  box-shadow: none;
  font-size: 13px;
  line-height: 20px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

html[data-theme="sky"] textarea.form-control,
body.super-app textarea:is(.sp-input, .form-control) {
  height: auto;
  min-height: 80px;
  padding-top: 7px;
  resize: vertical;
}

html[data-theme="sky"] :is(.form-control, .form-select, .search-input, .filter-input):hover,
body.super-app :is(.sp-input, .sp-select, .sp-search input, .form-control, .form-select):hover {
  border-color: #a8c7ef;
}

html[data-theme="sky"] :is(.form-control, .form-select, .search-input, .filter-input):focus,
body.super-app :is(.sp-input, .sp-select, .sp-search input, .form-control, .form-select):focus {
  border-color: var(--ysk-primary);
  background-color: #fff;
  box-shadow: var(--ysk-focus-ring);
  outline: 0;
}

html[data-theme="sky"] :is(.form-control, .search-input)::placeholder,
body.super-app :is(.sp-input, .sp-search input, .form-control)::placeholder {
  color: #a0adbd;
}

html[data-theme="sky"] :is(.form-label, label.label, .field-label),
body.super-app :is(.sp-label, .form-label, .field > label) {
  display: block;
  margin-bottom: 6px;
  color: #40536c;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 650;
}

html[data-theme="sky"] :is(.form-hint, .help-text, .field-hint),
body.super-app :is(.sp-help, .form-hint, .help-text) {
  margin-top: 5px;
  color: var(--ysk-text-tertiary);
  font-size: 11px;
  line-height: 1.55;
}

html[data-theme="sky"] :is(.form-group, .field),
body.super-app :is(.sp-field, .form-group, .field) {
  margin-bottom: 16px;
}

html[data-theme="sky"] :is(.form-check-input, input[type="checkbox"], input[type="radio"]),
body.super-app :is(.form-check-input, input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--ysk-primary);
}

html[data-theme="sky"] :is(.input-group-text, .input-prefix, .input-suffix),
body.super-app :is(.sp-input-prefix, .input-group-text, .input-prefix, .input-suffix) {
  min-height: var(--ysk-control-height);
  padding: 5px 10px;
  border-color: var(--ysk-border);
  background: var(--ysk-surface-muted);
  color: var(--ysk-text-secondary);
  font-size: 13px;
}

/* 筛选区与工具栏 */
html[data-theme="sky"] :is(.toolbar, .filter-bar, .search-bar, .filters, .table-toolbar),
body.super-app :is(.sp-toolbar, .sp-filter-bar, .filter-bar, .table-toolbar) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

html[data-theme="sky"] :is(.toolbar, .filter-bar, .filters),
body.super-app :is(.sp-toolbar, .sp-filter-bar) {
  padding: 12px;
  border: 1px solid var(--ysk-border-soft);
  border-radius: var(--ysk-radius-lg);
  background: var(--ysk-surface-muted);
}

body.super-app .sp-search,
html[data-theme="sky"] .search-box {
  width: min(300px, 100%);
}

html[data-theme="sky"] :is(.toolbar, .filter-bar, .filters) select,
body.super-app :is(.sp-toolbar, .sp-filter-bar) select {
  width: 150px;
  max-width: 100%;
}

html[data-theme="sky"] :is(.form-grid, .fields-grid),
body.super-app :is(.sp-form-grid, .form-grid, .fields-grid) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* ===== 表格 ===== */
html[data-theme="sky"] :is(.table-responsive, .table-wrap, .device-table-wrap),
body.super-app :is(.sp-table-wrap, .table-responsive, .table-wrap) {
  overflow: auto;
  border: 1px solid var(--ysk-border);
  border-radius: var(--ysk-radius-lg);
  background: var(--ysk-surface);
}

html[data-theme="sky"] :is(.table, .device-table, .compact-table),
body.super-app :is(.sp-table, .table, .compact-table) {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ysk-text);
  font-size: 13px;
}

html[data-theme="sky"] :is(.table, .device-table, .compact-table) thead th,
body.super-app :is(.sp-table, .table, .compact-table) thead th {
  height: 44px;
  padding: 8px 16px;
  border: 0;
  border-bottom: 1px solid var(--ysk-border);
  background: var(--ysk-surface-muted);
  color: #6e7f95;
  font-size: 11px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: none;
  white-space: nowrap;
  vertical-align: middle;
}

html[data-theme="sky"] :is(.table, .device-table, .compact-table) tbody td,
body.super-app :is(.sp-table, .table, .compact-table) tbody td {
  min-height: 52px;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid var(--ysk-border-soft);
  background: #fff;
  color: #344861;
  font-size: 13px;
  line-height: 1.5;
  vertical-align: middle;
}

html[data-theme="sky"] :is(.table, .device-table, .compact-table) tbody tr:last-child td,
body.super-app :is(.sp-table, .table, .compact-table) tbody tr:last-child td {
  border-bottom: 0;
}

html[data-theme="sky"] :is(.table, .device-table, .compact-table) tbody tr:hover td,
body.super-app :is(.sp-table, .table, .compact-table) tbody tr:hover td {
  background: #f8fbff;
}

html[data-theme="sky"] :is(.cell-main, .table-primary, .td-main),
body.super-app :is(.sp-cell-main, .table-primary, .td-main) {
  color: var(--ysk-text);
  font-weight: 650;
}

html[data-theme="sky"] :is(.cell-sub, .table-secondary, .td-sub),
body.super-app :is(.sp-cell-sub, .table-secondary, .td-sub) {
  margin-top: 2px;
  color: var(--ysk-text-tertiary);
  font-size: 11px;
  line-height: 1.45;
}

/* ===== 状态、标签与徽章 ===== */
html[data-theme="sky"] :is(.badge, .status-tag, .status-badge, .badge-client-status, .svc-tag),
body.super-app :is(.sp-badge, .badge, .status-tag, .status-badge) {
  min-height: 22px;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #dce6f2;
  border-radius: 999px;
  background: #f5f7fa;
  color: #64758b;
  font-size: 11px;
  line-height: 16px;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: none;
}

html[data-theme="sky"] :is(.status-online, .status-success, .badge-success, .bg-success-lt),
body.super-app :is(.sp-badge-green, .sp-badge-success, .status-success, .badge-success, .bg-success-lt) {
  border-color: #bee9d3;
  background: var(--ysk-success-soft);
  color: #12804d;
}

html[data-theme="sky"] :is(.status-warning, .badge-warning, .bg-warning-lt),
body.super-app :is(.sp-badge-orange, .sp-badge-warning, .status-warning, .badge-warning, .bg-warning-lt) {
  border-color: #f2d7a8;
  background: var(--ysk-warning-soft);
  color: #a8670c;
}

html[data-theme="sky"] :is(.status-offline, .status-danger, .status-error, .badge-danger, .bg-danger-lt),
body.super-app :is(.sp-badge-red, .sp-badge-danger, .status-danger, .status-error, .badge-danger, .bg-danger-lt) {
  border-color: #f3c3ca;
  background: var(--ysk-danger-soft);
  color: #c43143;
}

html[data-theme="sky"] :is(.status-info, .status-active, .badge-primary, .bg-primary-lt, .bg-blue-lt, .bg-azure-lt),
body.super-app :is(.sp-badge-blue, .sp-badge-info, .status-info, .status-active, .badge-primary, .bg-primary-lt) {
  border-color: #c9ddf8;
  background: var(--ysk-info-soft);
  color: #155bc7;
}

html[data-theme="sky"] :is(.status-dot, .state-dot),
body.super-app :is(.status-dot, .state-dot) {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px currentColor inset;
}

/* ===== 标签页与分段选择 ===== */
html[data-theme="sky"] :is(.tabs, .filter-tabs, .cust-tabs, .svc-tabs, .cfg-tabs, .nav-tabs),
body.super-app :is(.sp-tabs, .tabs, .filter-tabs, .nav-tabs) {
  min-height: 40px;
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--ysk-border-soft);
  border-radius: var(--ysk-radius-lg);
  background: #f1f5fa;
}

html[data-theme="sky"] :is(.tabs, .filter-tabs, .cust-tabs, .svc-tabs, .cfg-tabs, .nav-tabs) :is(button, a, .nav-link),
body.super-app :is(.sp-tabs, .tabs, .filter-tabs, .nav-tabs) :is(button, a, .nav-link) {
  min-height: 30px;
  padding: 5px 12px;
  border: 0;
  border-radius: var(--ysk-radius-sm);
  background: transparent;
  color: var(--ysk-text-secondary);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

html[data-theme="sky"] :is(.tabs, .filter-tabs, .cust-tabs, .svc-tabs, .cfg-tabs, .nav-tabs) :is(.active, [aria-selected="true"]),
body.super-app :is(.sp-tabs, .tabs, .filter-tabs, .nav-tabs) :is(.active, [aria-selected="true"]) {
  background: #fff;
  color: var(--ysk-primary);
  box-shadow: 0 1px 4px rgba(23, 41, 68, .09);
}

/* ===== 进度与步骤状态 ===== */
html[data-theme="sky"] :is(.progress, .progress-track, .quota-progress, .ops-bar),
body.super-app :is(.sp-progress, .progress, .progress-track, .ops-bar) {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf0f7;
  box-shadow: none;
}

html[data-theme="sky"] :is(.progress-bar, .progress-fill, .quota-progress-fill, .ops-bar-fill),
body.super-app :is(.sp-progress > span, .progress-bar, .progress-fill, .ops-bar-fill) {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1769df, #4d91ef);
  transition: width .3s ease;
}

html[data-theme="sky"] :is(.steps, .step-list),
body.super-app :is(.sp-steps, .steps, .step-list) {
  color: var(--ysk-text-secondary);
}

/* ===== 列表、描述项、数据展示 ===== */
html[data-theme="sky"] :is(.info-row, .detail-row, .field-row, .list-item, .description-row),
body.super-app :is(.sp-list-item, .sp-info-row, .info-row, .detail-row, .field-row) {
  min-height: 42px;
  padding: 9px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--ysk-border-soft);
}

html[data-theme="sky"] :is(.info-row, .detail-row, .field-row, .list-item, .description-row):last-child,
body.super-app :is(.sp-list-item, .sp-info-row, .info-row, .detail-row, .field-row):last-child {
  border-bottom: 0;
}

html[data-theme="sky"] :is(.info-label, .detail-label, .field-name, dt),
body.super-app :is(.sp-info-label, .info-label, .detail-label, .field-name, dt) {
  color: var(--ysk-text-secondary);
  font-size: 12px;
  font-weight: 600;
}

html[data-theme="sky"] :is(.info-value, .detail-value, .field-value, dd),
body.super-app :is(.sp-info-value, .info-value, .detail-value, .field-value, dd) {
  color: var(--ysk-text);
  font-size: 13px;
  font-weight: 600;
}

html[data-theme="sky"] :is(.icon-tile, .stat-icon, .feature-icon, .dc-icon),
body.super-app :is(.sp-icon, .sp-stat-icon, .icon-tile, .stat-icon) {
  width: 34px;
  height: 34px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d8e8fc;
  border-radius: var(--ysk-radius);
  background: var(--ysk-primary-soft);
  color: var(--ysk-primary);
  box-shadow: none;
}

/* ===== 弹窗、下拉、提示 ===== */
html[data-theme="sky"] :is(.modal-content, .dropdown-menu, .popover),
body.super-app :is(.modal-content, .dropdown-menu, .popover, .sp-popover) {
  border: 1px solid var(--ysk-border);
  border-radius: var(--ysk-radius-lg);
  background: #fff;
  box-shadow: var(--ysk-shadow-float);
}

html[data-theme="sky"] .modal-header,
body.super-app .modal-header {
  min-height: 54px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ysk-border-soft);
}

html[data-theme="sky"] .modal-title,
body.super-app .modal-title {
  color: var(--ysk-text);
  font-size: 16px;
  font-weight: 720;
}

html[data-theme="sky"] .modal-body,
body.super-app .modal-body {
  padding: 18px;
}

html[data-theme="sky"] .modal-footer,
body.super-app .modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--ysk-border-soft);
  background: var(--ysk-surface-muted);
}

html[data-theme="sky"] :is(.dropdown-item, .menu-item),
body.super-app :is(.dropdown-item, .menu-item) {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: var(--ysk-radius-sm);
  color: #40536c;
  font-size: 13px;
}

html[data-theme="sky"] :is(.dropdown-item, .menu-item):hover,
body.super-app :is(.dropdown-item, .menu-item):hover {
  background: var(--ysk-primary-softer);
  color: var(--ysk-primary);
}

html[data-theme="sky"] :is(.alert, .notice, .tip-box),
body.super-app :is(.sp-alert, .alert, .notice, .tip-box) {
  padding: 10px 12px;
  border: 1px solid #cadff9;
  border-radius: var(--ysk-radius);
  background: var(--ysk-info-soft);
  color: #285681;
  font-size: 12px;
  line-height: 1.6;
  box-shadow: none;
}

html[data-theme="sky"] :is(.alert-success, .notice-success),
body.super-app :is(.sp-alert-success, .alert-success, .notice-success) {
  border-color: #bee9d3;
  background: var(--ysk-success-soft);
  color: #176a45;
}

html[data-theme="sky"] :is(.alert-warning, .notice-warning),
body.super-app :is(.sp-alert-warning, .alert-warning, .notice-warning) {
  border-color: #f2d7a8;
  background: var(--ysk-warning-soft);
  color: #87570e;
}

html[data-theme="sky"] :is(.alert-danger, .notice-danger),
body.super-app :is(.sp-alert-danger, .alert-danger, .notice-danger) {
  border-color: #f3c3ca;
  background: var(--ysk-danger-soft);
  color: #9f2939;
}

/* ===== 空状态、加载、分页 ===== */
html[data-theme="sky"] :is(.empty-state, .empty, .loading-state),
body.super-app :is(.sp-empty, .empty-state, .empty, .loading-state) {
  padding: 40px 20px;
  color: var(--ysk-text-tertiary);
  text-align: center;
  font-size: 13px;
}

html[data-theme="sky"] :is(.pagination, .pager),
body.super-app :is(.sp-pagination, .pagination, .pager) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 16px 0 0;
}

html[data-theme="sky"] :is(.page-link, .pager button),
body.super-app :is(.sp-pagination button, .page-link, .pager button) {
  min-width: 30px;
  height: 30px;
  padding: 4px 8px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--ysk-border);
  border-radius: var(--ysk-radius-sm);
  background: #fff;
  color: var(--ysk-text-secondary);
  font-size: 12px;
}

html[data-theme="sky"] :is(.page-item.active .page-link, .pager button.active),
body.super-app :is(.sp-pagination button.active, .page-item.active .page-link, .pager button.active) {
  border-color: var(--ysk-primary);
  background: var(--ysk-primary);
  color: #fff;
}

html[data-theme="sky"] :is(.spinner-border, .loader),
body.super-app :is(.spinner-border, .loader) {
  color: var(--ysk-primary);
}

/* ===== 导航：继续使用既有信息架构，只统一白蓝状态 ===== */
html[data-theme="sky"] .sidebar,
body.super-app .super-sidebar {
  background: #fff;
  border-right: 1px solid var(--ysk-border-soft);
  box-shadow: none;
}

html[data-theme="sky"] :is(.nav-link, .sidebar-link),
body.super-app .super-nav-link {
  border-radius: var(--ysk-radius);
  color: #52647b;
}

html[data-theme="sky"] :is(.nav-link, .sidebar-link):hover,
body.super-app .super-nav-link:hover {
  background: var(--ysk-primary-softer);
  color: var(--ysk-primary);
}

html[data-theme="sky"] :is(.nav-link, .sidebar-link).active,
body.super-app .super-nav-link.active {
  background: var(--ysk-primary-soft);
  color: var(--ysk-primary);
  box-shadow: none;
}

body.super-app .super-nav-link.active::before {
  background: var(--ysk-primary);
}

/* ===== 独立登录、注册与密码页（大号控件 = 40px） ===== */
html[data-theme="sky"] :is(.login-card, .register-card, .box),
body.super-app :is(.login-card, .register-card, .box) {
  border-color: var(--ysk-border);
  border-radius: var(--ysk-radius-lg);
  box-shadow: 0 16px 45px rgba(23, 41, 68, .1);
}

html[data-theme="sky"] :is(.login-card, .register-card, .box) :is(input, select),
body.super-app :is(.login-card, .register-card, .box) :is(input, select) {
  height: var(--ysk-control-height-lg);
  border: 1px solid var(--ysk-border);
  border-radius: var(--ysk-radius);
  font-size: 14px;
}

html[data-theme="sky"] :is(.login-card, .register-card, .box) :is(input, select):focus,
body.super-app :is(.login-card, .register-card, .box) :is(input, select):focus {
  border-color: var(--ysk-primary);
  box-shadow: var(--ysk-focus-ring);
}

html[data-theme="sky"] :is(.login-btn, .register-card button, .box button),
body.super-app :is(.login-btn, .register-card button, .box button) {
  height: var(--ysk-control-height-lg);
  border-radius: var(--ysk-radius);
  background: var(--ysk-primary);
  color: #fff;
  box-shadow: 0 5px 14px rgba(23, 105, 223, .2);
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
  html[data-theme="sky"] .content,
  body.super-app .super-content {
    padding: 16px;
  }

  html[data-theme="sky"] :is(.table, .device-table, .compact-table) thead th,
  html[data-theme="sky"] :is(.table, .device-table, .compact-table) tbody td,
  body.super-app :is(.sp-table, .table, .compact-table) thead th,
  body.super-app :is(.sp-table, .table, .compact-table) tbody td {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 640px) {
  html[data-theme="sky"] .content,
  body.super-app .super-content {
    padding: 12px;
  }

  html[data-theme="sky"] :is(.page-title, .td-title, .ta-title, .ra-title, .cfg-title),
  body.super-app :is(.sp-page-title, .ops-page-title) {
    font-size: 19px;
  }

  html[data-theme="sky"] :is(.toolbar, .filter-bar, .search-bar, .filters),
  body.super-app :is(.sp-toolbar, .sp-filter-bar, .filter-bar) {
    align-items: stretch;
  }

  html[data-theme="sky"] :is(.toolbar, .filter-bar, .search-bar, .filters) > *,
  body.super-app :is(.sp-toolbar, .sp-filter-bar, .filter-bar) > * {
    max-width: 100%;
  }

  html[data-theme="sky"] :is(.form-grid, .fields-grid),
  body.super-app :is(.sp-form-grid, .form-grid, .fields-grid) {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="sky"] *,
  body.super-app * {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
