/* ================================================================
   声学光纤感知系统 — 样式表（派光平台风格）
   ================================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #177d70;
  --primary-hover: #1c9483;
  --primary-bg: #eaf5f3;
  --success: #177d70;
  --success-bg: #e3f3f0;
  --warning: #e7a13b;
  --warning-bg: #fff2d8;
  --error: #dc5b57;
  --error-bg: #fde9e8;
  --info: #4389cc;
  --text-primary: #26333c;
  --text-secondary: #5f6b73;
  --text-muted: #788791;
  --border: #e4eaee;
  --bg-page: #f3f6f8;
  --bg-white: #fff;
  --bg-sidebar: #17242e;
  --bg-sidebar-hover: #21323e;
  --shadow-sm: 0 2px 10px rgba(27,53,68,.06);
  --shadow-md: 0 6px 18px rgba(27,53,68,.09);
  --shadow-lg: 0 16px 40px rgba(23,36,46,.18);
  --radius-sm: 4px;
  --radius: 7px;
  --radius-lg: 8px;
  --transition: 0.2s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-page);
  display: flex;
  min-height: 100vh;
  height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: 208px;
  min-width: 208px;
  height: 100vh;
  background: var(--bg-sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  transition: width var(--transition), min-width var(--transition);
  position: relative;
  z-index: 100;
}
.sidebar.collapsed {
  width: 64px;
  min-width: 64px;
}
.sidebar-logo {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  gap: 12px;
  white-space: nowrap;
  overflow: hidden;
}
.logo-icon { font-size: 24px; flex-shrink: 0; }
.logo-text { font-size: 16px; font-weight: 600; }
.sidebar.collapsed .logo-text { display: none; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.nav-group { margin: 4px 0; }
.nav-group-title {
  padding: 12px 20px 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar.collapsed .nav-group-title { display: none; }

.nav-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: all var(--transition);
  gap: 10px;
  margin: 2px 8px;
  border-radius: var(--radius);
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}
.nav-item:hover { color: #fff; background: var(--bg-sidebar-hover); }
.nav-item.active { color: #fff; background: var(--primary); }
.nav-icon { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; }
.sidebar.collapsed .nav-item { padding: 10px 16px; justify-content: center; }
.sidebar.collapsed .nav-item span:not(.nav-icon) { display: none; }
.nav-item-prototype { align-items: center; }
.nav-item-prototype em {
  margin-left: 5px;
  padding: 1px 4px;
  color: #bbd7d2;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 3px;
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
}

.sidebar-footer { padding: 8px; border-top: 1px solid rgba(255,255,255,0.1); }
.collapse-btn {
  width: 100%;
  padding: 8px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.collapse-btn:hover { color: #fff; background: var(--bg-sidebar-hover); }
.sidebar.collapsed .collapse-btn { transform: rotate(180deg); }

/* ---------- Main Content ---------- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  min-height: 0;
}

/* Header */
.top-header {
  height: 56px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.breadcrumb { font-size: 16px; font-weight: 500; }
.header-right { display: flex; align-items: center; gap: 16px; }
.status-badge { font-size: 12px; padding: 2px 10px; border-radius: 12px; font-weight: 500; }
.status-badge.green { background: var(--success-bg); color: var(--success); }
.status-badge.red { background: var(--error-bg); color: var(--error); }
.header-icon {
  position: relative;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.header-icon:hover { background: var(--bg-page); }
.header-icon .badge {
  position: absolute;
  top: -2px;
  right: -4px;
  font-size: 10px;
  background: var(--error);
  color: #fff;
  border-radius: 10px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
}
.user-avatar {
  cursor: pointer;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  font-weight: 500;
}
.user-avatar:hover { background: var(--bg-page); }

/* Content Area */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ---------- 登录前 License 校验与账号登录 ---------- */
body.access-gate-active { overflow: hidden; }
body.access-gate-active > .sidebar,
body.access-gate-active > .main-content { visibility: hidden; }
.access-gate {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  color: var(--text-primary);
  background: var(--bg-page);
}
.access-gate.active { display: block; }
.access-shell { min-height: 100%; display: flex; flex-direction: column; }
.access-brandbar {
  min-height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: var(--bg-sidebar);
  border-bottom: 3px solid var(--primary);
}
.access-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.access-brand-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius-sm);
}
.access-environment { color: rgba(255,255,255,.64); font-size: 13px; }
.access-stage {
  flex: 1;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}
.access-card {
  width: min(1040px, 100%);
  padding: 24px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.access-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.access-step { display: block; margin-bottom: 6px; color: var(--primary); font-size: 12px; font-weight: 600; }
.access-card h1 { font-size: 20px; line-height: 28px; }
.access-card-heading p,
.login-description { margin-top: 6px; color: var(--text-secondary); line-height: 22px; }
.license-status {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}
.license-status i { width: 7px; height: 7px; border-radius: 50%; }
.license-status.invalid { color: #a43e3b; background: var(--error-bg); }
.license-status.invalid i { background: var(--error); }
.license-status.valid { color: #12695f; background: var(--success-bg); }
.license-status.valid i { background: var(--success); }
.license-status.pending { color: #9a6416; background: var(--warning-bg); }
.license-status.pending i { background: var(--warning); }
.license-device-strip {
  margin-top: 20px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1.5fr .8fr 1fr;
  gap: 20px;
  background: #f8fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.license-device-strip div { min-width: 0; }
.license-device-strip span { display: block; margin-bottom: 4px; color: var(--text-muted); font-size: 12px; }
.license-device-strip strong { display: block; overflow: hidden; text-overflow: ellipsis; font-family: Consolas, monospace; font-size: 13px; white-space: nowrap; }
.license-device-strip .license-error-text { color: var(--error); font-family: inherit; }
.license-platform-config {
  margin-top: 12px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 230px minmax(320px, 1fr) 220px;
  align-items: center;
  gap: 12px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.license-platform-copy .form-label { margin-bottom: 2px; }
.license-platform-copy .form-label span { margin-left: 5px; color: var(--warning); font-size: 12px; font-weight: 400; }
.license-platform-copy small { color: var(--text-muted); font-size: 12px; line-height: 18px; }
.license-platform-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.license-platform-control .form-input { width: 100%; height: 36px; }
.license-platform-control .form-input.invalid { border-color: var(--error); box-shadow: 0 0 0 2px rgba(220,91,87,.1); }
.platform-connection-status { color: var(--text-muted); font-size: 12px; line-height: 20px; }
.platform-connection-status::before { content: '○'; margin-right: 6px; }
.platform-connection-status.checking { color: var(--info); }
.platform-connection-status.checking::before { content: '◌'; }
.platform-connection-status.success { color: var(--success); }
.platform-connection-status.success::before { content: '●'; }
.platform-connection-status.error { color: var(--error); }
.platform-connection-status.error::before { content: '●'; }
.access-feedback { margin-top: 12px; padding: 9px 12px; border-radius: var(--radius-sm); line-height: 20px; }
.access-feedback.error { color: #a43e3b; background: var(--error-bg); border: 1px solid #f5ccca; }
.access-feedback.warning { color: #805619; background: var(--warning-bg); border: 1px solid #f1d9aa; }
.pending-application-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pending-application-notice strong { font-family: Consolas, monospace; }
.pending-application-notice .btn-text { flex: 0 0 auto; color: var(--primary); }
.license-method-tabs {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}
.license-method-tab {
  min-height: 58px;
  padding: 8px 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.license-method-tab::after { content: ''; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: transparent; }
.license-method-tab span { font-size: 14px; font-weight: 600; }
.license-method-tab small { color: var(--text-muted); font-size: 12px; }
.license-method-tab:hover { color: var(--primary); background: #fbfcfc; }
.license-method-tab.active { color: var(--primary); }
.license-method-tab.active::after { background: var(--primary); }
.license-method-tab:focus-visible,
.access-text-button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.license-method-panel { min-height: 260px; padding-top: 20px; }
.license-panel-content h2 { margin-bottom: 6px; font-size: 16px; line-height: 24px; }
.license-panel-intro { color: var(--text-secondary); line-height: 22px; }
.online-panel { min-height: 224px; display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 20px; }
.online-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: var(--primary-bg);
  border-radius: var(--radius);
  font-size: 28px;
}
.online-copy p { max-width: 620px; color: var(--text-secondary); line-height: 22px; }
.online-details { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.online-details div { display: flex; gap: 10px; }
.online-details dt { color: var(--text-muted); }
.online-details dd { color: var(--text-primary); font-weight: 500; }
.connection-dot { width: 7px; height: 7px; margin-right: 6px; display: inline-block; background: var(--success); border-radius: 50%; }
.license-panel-actions { display: flex; justify-content: flex-end; align-items: center; }
.qr-panel { min-height: 224px; display: grid; grid-template-columns: 190px 1fr; gap: 24px; }
.prototype-qr { padding: 8px; text-align: center; border-right: 1px solid var(--border); }
.prototype-qr-frame { width: 146px; height: 146px; margin: 0 auto 8px; position: relative; }
.prototype-qr-code {
  width: 146px;
  height: 146px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-sidebar);
  background:
    repeating-conic-gradient(var(--bg-sidebar) 0 25%, #fff 0 50%) 0 0 / 20px 20px;
  border: 8px solid #fff;
  outline: 1px solid var(--border);
  transition: filter var(--transition), opacity var(--transition);
}
.prototype-qr-code span { padding: 4px; color: #fff; background: var(--primary); font-size: 12px; font-weight: 600; }
.prototype-qr small { color: var(--text-muted); }
.qr-expired-overlay {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-primary);
  background: rgba(255,255,255,.88);
  border: 1px solid var(--border);
}
.prototype-qr-frame.expired .prototype-qr-code { filter: grayscale(1); opacity: .28; }
.prototype-qr-frame.expired .qr-expired-overlay { display: flex; }
.qr-expired-overlay strong { font-size: 13px; }
.qr-refresh-button { color: var(--primary); border-color: var(--primary); background: var(--bg-white); }
.qr-refresh-button:hover { color: #fff; background: var(--primary); }
.qr-countdown { display: block; min-height: 20px; }
.qr-countdown.expired { color: var(--error); }
.license-steps { margin: 8px 0 14px 20px; color: var(--text-secondary); line-height: 24px; }
.license-code-field.invalid { border-color: var(--error); box-shadow: 0 0 0 2px rgba(220,91,87,.1); }
.auth-field-hint.error { color: var(--error); }
.offline-panel { min-height: 224px; }
.offline-flow { margin-top: 20px; display: grid; grid-template-columns: 1fr 24px 1fr; align-items: stretch; gap: 12px; }
.offline-flow section {
  min-height: 136px;
  padding: 16px;
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: 1fr auto;
  gap: 10px 12px;
  background: #f8fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.offline-step-number {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.offline-flow h3 { margin-bottom: 4px; font-size: 14px; }
.offline-flow p { color: var(--text-secondary); line-height: 20px; }
.offline-flow p.selected { color: var(--success); font-weight: 600; }
.offline-flow section .btn { grid-column: 2; justify-self: start; }
.offline-flow-arrow { display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 18px; }
.offline-panel > .license-panel-actions { margin-top: 16px; }
.access-footer {
  min-height: 44px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 12px;
}
.access-footer span { padding-left: 16px; border-left: 1px solid var(--border); }
.access-result-card {
  width: min(480px, calc(100% - 32px));
  padding: 32px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.access-result-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--success);
  border-radius: 50%;
  font-size: 28px;
}
.access-result-card h1 { font-size: 20px; }
.access-result-card p { margin: 8px 0 20px; color: var(--text-secondary); line-height: 22px; }
.pending-review-card { width: min(900px, 100%); }
.review-progress {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 60px 1fr 60px 1fr;
  align-items: center;
}
.review-progress > i { height: 1px; background: var(--border); }
.review-progress > div { min-width: 0; text-align: center; }
.review-progress > div > span {
  width: 32px;
  height: 32px;
  margin: 0 auto 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: #eef2f4;
  border-radius: 50%;
  font-weight: 600;
}
.review-progress > div.completed > span { color: #fff; background: var(--success); }
.review-progress > div.current > span { color: #805619; background: var(--warning-bg); border: 1px solid var(--warning); }
.review-progress strong { display: block; font-size: 14px; }
.review-progress small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.pending-application-details {
  margin-top: 16px;
  padding: 4px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  background: #f8fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.pending-application-details > div { min-width: 0; padding: 11px 0; display: grid; grid-template-columns: 110px 1fr; gap: 12px; border-bottom: 1px solid var(--border); }
.pending-application-details > div.wide { grid-column: 1 / -1; border-bottom: 0; }
.pending-application-details span { color: var(--text-muted); }
.pending-application-details strong { overflow: hidden; text-overflow: ellipsis; font-family: Consolas, monospace; white-space: nowrap; }
.pending-review-actions { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pending-review-actions p { color: var(--text-secondary); line-height: 22px; }
.alternative-activation-actions {
  margin-top: 16px;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border);
}
.alternative-activation-actions strong { display: block; margin-bottom: 3px; color: var(--text-primary); font-size: 14px; }
.alternative-activation-actions p { color: var(--text-secondary); font-size: 12px; line-height: 20px; }
.alternative-activation-buttons { display: flex; flex: 0 0 auto; gap: 8px; }
.login-stage { padding: 24px; }
.login-card { width: 420px; padding: 28px 32px; }
.login-card h1 { margin-top: 2px; }
.login-card form { margin-top: 20px; }
.login-card .form-group { margin-bottom: 14px; }
.login-card .form-input { height: 36px; }
.login-demo-hint { display: block; margin-top: -4px; color: var(--text-muted); font-size: 12px; }
.login-submit { width: 100%; margin-top: 18px; }
.access-text-button {
  width: 100%;
  margin-top: 14px;
  padding: 5px;
  color: var(--primary);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

@media (max-width: 1024px) {
  .access-stage { padding: 24px; align-items: flex-start; }
  .license-card { margin: auto 0; }
  .license-platform-config { grid-template-columns: 200px minmax(0, 1fr); }
  .platform-connection-status { grid-column: 2; }
  .online-panel { grid-template-columns: 56px 1fr; }
  .online-panel > .license-panel-actions { grid-column: 1 / -1; }
  .review-progress { grid-template-columns: 1fr 36px 1fr 36px 1fr; }
}

@media (max-width: 760px) {
  .access-brandbar { padding: 0 16px; }
  .access-environment { display: none; }
  .access-stage { padding: 16px; }
  .access-card { padding: 18px; }
  .access-card-heading { flex-direction: column; gap: 12px; }
  .license-device-strip { grid-template-columns: 1fr; gap: 10px; }
  .license-platform-config { grid-template-columns: 1fr; }
  .platform-connection-status { grid-column: auto; }
  .license-platform-control { grid-template-columns: 1fr; }
  .license-platform-control .btn { justify-self: stretch; }
  .license-method-tabs { grid-template-columns: 1fr; border: 1px solid var(--border); }
  .license-method-tab { min-height: 48px; align-items: flex-start; border-bottom: 1px solid var(--border); }
  .license-method-tab:last-child { border-bottom: 0; }
  .license-method-tab::after { top: 0; right: auto; bottom: 0; width: 3px; height: auto; }
  .license-method-panel { min-height: 0; }
  .online-panel,
  .qr-panel { grid-template-columns: 1fr; }
  .prototype-qr { border-right: 0; border-bottom: 1px solid var(--border); }
  .offline-flow { grid-template-columns: 1fr; }
  .offline-flow-arrow { transform: rotate(90deg); }
  .access-footer span { display: none; }
  .login-card { width: 100%; }
  .review-progress { grid-template-columns: 1fr; gap: 8px; }
  .review-progress > i { width: 1px; height: 16px; margin: 0 auto; }
  .pending-application-details { grid-template-columns: 1fr; }
  .pending-application-details > div { grid-template-columns: 1fr; gap: 3px; border-bottom: 1px solid var(--border); }
  .pending-application-details > div:last-child { border-bottom: 0; }
  .pending-review-actions { align-items: stretch; flex-direction: column; }
  .pending-application-notice,
  .alternative-activation-actions { align-items: stretch; flex-direction: column; }
  .alternative-activation-buttons { flex-direction: column; }
}

/* ---------- Page Title ---------- */
.page-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Stat Cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.stat-icon.blue { background: var(--primary-bg); }
.stat-icon.green { background: var(--success-bg); }
.stat-icon.orange { background: var(--warning-bg); }
.stat-icon.red { background: var(--error-bg); }
.stat-info { flex: 1; }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
table th, table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
table th {
  background: #fafafa;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  position: sticky;
  top: 0;
}
table tbody tr { transition: background var(--transition); }
table tbody tr:hover { background: #fafafa; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-primary);
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-danger { background: var(--error); color: #fff; border-color: var(--error); }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-sm { padding: 2px 10px; font-size: 12px; }
.btn-lg { padding: 10px 24px; font-size: 16px; }
.btn-link { border: none; background: none; color: var(--primary); padding: 4px 8px; }
.btn-link:hover { color: var(--primary-hover); background: var(--primary-bg); border: none; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-secondary);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--transition);
  background: var(--bg-white);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-bg);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }

/* ---------- Tags / Badges ---------- */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.tag-success { background: var(--success-bg); color: var(--success); }
.tag-warning { background: var(--warning-bg); color: var(--warning); }
.tag-error { background: var(--error-bg); color: var(--error); }
.tag-info { background: var(--primary-bg); color: var(--primary); }
.tag-default { background: #f5f5f5; color: var(--text-secondary); }

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.filter-bar .form-select, .filter-bar .form-input {
  width: auto;
  min-width: 140px;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 0;
}
.pagination button {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 13px;
}
.pagination button:hover { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { color: var(--text-muted); cursor: not-allowed; }

/* ---------- Timeline ---------- */
.timeline { padding: 8px 0; }
.timeline-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  position: relative;
}
.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}
.timeline-dot.green { background: var(--success); }
.timeline-dot.blue { background: var(--primary); }
.timeline-dot.orange { background: var(--warning); }
.timeline-dot.red { background: var(--error); }
.timeline-line {
  position: absolute;
  left: 4px;
  top: 18px;
  bottom: -8px;
  width: 2px;
  background: var(--border);
}
.timeline-item:last-child .timeline-line { display: none; }
.timeline-content { flex: 1; }
.timeline-time { font-size: 12px; color: var(--text-muted); }
.timeline-text { font-size: 13px; }

/* ---------- Report Timeline (Alarm Detail) ---------- */
.timeline-wrapper { display: flex; flex-direction: column; }
.timeline-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  padding: 4px 0;
}
.timeline-row .timeline-time {
  min-width: 86px;
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 2px;
  line-height: 1.5;
}
.timeline-row .timeline-axis {
  position: relative;
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding-top: 4px;
}
.timeline-row .timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  z-index: 2;
}
.timeline-row .timeline-connector {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + 8px);
  background: var(--border);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.timeline-row .timeline-connector .tag {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  z-index: 3;
  background: #fff;
  font-size: 11px;
  padding: 1px 6px;
}
.timeline-row:last-child .timeline-connector { display: none; }
.timeline-row .timeline-content {
  flex: 1;
  min-width: 0;
  padding-bottom: 14px;
}
.timeline-row .timeline-title {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}
.timeline-row .timeline-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 2px;
}
.chart-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f0 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  border: 1px dashed var(--border);
  position: relative;
  overflow: hidden;
}
.chart-placeholder::before {
  content: '';
  position: absolute;
  bottom: 20px;
  left: 30px;
  right: 30px;
  height: 80px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100'%3E%3Cpath d='M0 80 L40 60 L80 70 L120 30 L160 40 L200 20 L240 50 L280 25 L320 35 L360 15 L400 45' stroke='%231677ff' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat center bottom;
  background-size: contain;
}

/* ---------- Canvas Area (数据定标) ---------- */
.canvas-area {
  background: #f0f2f5;
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.fiber-visual {
  position: relative;
  width: 90%;
  padding: 40px 0;
}
.fiber-line {
  position: relative;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
  margin: 20px 0;
}
.fiber-dot {
  position: absolute;
  top: -10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  cursor: pointer;
  transform: translateX(-50%);
  transition: all var(--transition);
  z-index: 2;
}
.fiber-dot:hover { transform: translateX(-50%) scale(1.3); border-color: var(--error); }
.fiber-dot.calibrated { border-color: var(--success); background: var(--success-bg); }
.fiber-dot.selected { border-color: var(--error); box-shadow: 0 0 0 4px rgba(255,77,79,0.2); }
.fiber-dot-label {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  white-space: nowrap;
  color: var(--text-secondary);
}
.fiber-ruler {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  padding: 0;
}

/* ---------- Grid Layout ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ---------- Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-container {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  min-width: 480px;
  max-width: 640px;
  max-height: 80vh;
  overflow-y: auto;
}
.modal-container.active { display: block; }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
}
.modal-body { padding: 24px; }
.modal-footer {
  padding: 12px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 12px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.3s ease;
  border-left: 4px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
.toast.warning { border-left-color: var(--warning); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.6; transform: translateX(-50%) scale(1.05); }
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }

/* ---------- Detail Layout ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-section { margin-bottom: 20px; }
.detail-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.detail-row {
  display: flex;
  padding: 6px 0;
  font-size: 13px;
}
.detail-label { width: 100px; color: var(--text-muted); flex-shrink: 0; }
.detail-value { flex: 1; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.tab {
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  font-size: 14px;
  color: var(--text-secondary);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }

/* ---------- Progress Bar ---------- */
.progress-bar {
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar .progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width var(--transition);
}
.progress-fill.green { background: var(--success); }
.progress-fill.blue { background: var(--primary); }
.progress-fill.orange { background: var(--warning); }
.progress-fill.red { background: var(--error); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { width: 64px; min-width: 64px; }
  .sidebar .logo-text, .sidebar .nav-group-title, .sidebar .nav-item span:not(.nav-icon) { display: none; }
  .sidebar .nav-item { padding: 10px 16px; justify-content: center; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ========== 定标页面 · 清爽风格 ========== */
.calib-page .card {
  box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 4px 16px rgba(15,23,42,0.04);
  border: 1px solid #eef1f6;
  border-radius: 12px;
  overflow: hidden;
}
.calib-page .card-header {
  background: linear-gradient(180deg, #f9fafb 0%, #f4f6fa 100%);
  border-bottom: 1px solid #eef1f6;
  padding: 10px 18px;
  font-weight: 600;
}
.calib-page .card-body { background: #fff; }

/* 首行头部卡片统计 */
.calib-page > .card:first-child { margin-bottom: 14px; }
.calib-page > .card:first-child .card-body { background: #fafbfc; padding: 10px 20px !important; }

/* 步骤圆点阴影 */
.calib-page [id^="step"] {
  box-shadow: 0 2px 6px rgba(22,119,255,0.18);
}

/* 表格清爽 */
.calib-page .table-wrap table th {
  background: #f7f9fc;
  font-weight: 600;
  color: #64748b;
  font-size: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid #eef1f6;
}
.calib-page .table-wrap table td {
  padding: 7px 10px;
  border-bottom: 1px solid #f2f4f8;
  font-size: 13px;
}
.calib-page .table-wrap table tbody tr:hover td {
  background: #f8fbff;
}

/* 表单清爽 */
.calib-page .form-input,
.calib-page .form-select {
  border-radius: 8px;
  border: 1px solid #e3e8ef;
  transition: border-color .2s, box-shadow .2s;
  font-size: 13px;
}
.calib-page .form-input:focus,
.calib-page .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22,119,255,0.1);
  outline: none;
}
.calib-page .form-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
}

/* 按钮清爽 */
.calib-page .btn {
  border-radius: 8px;
  font-weight: 500;
}
.calib-page .btn-primary {
  box-shadow: 0 1px 4px rgba(22,119,255,0.2);
}
.calib-page .btn-sm {
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
}

/* 图表区域底边圆角 */
.calib-page .card-body[style*="background:#1a1a2e"] {
  border-radius: 0 0 12px 12px;
}

/* 敲击信号面板 */
.calib-page #knockContent > div {
  border-radius: 8px !important;
  background: #f7f9fc !important;
}

/* 通道切换按钮组 */
.calib-page .card-header .btn-sm {
  border-radius: 6px;
  font-size: 11px;
  padding: 2px 10px;
}

/* ========== 数据定标图表 · 浅色瀑布图/振动折线图 ========== */
.calib-page .das-waterfall-chart,
.calib-page .das-line-chart {
  padding: 0;
  position: relative;
  height: 280px;
  background: #f8fbfa;
  overflow: hidden;
  border-radius: 0 0 12px 12px;
}
.das-waterfall-grid,
.das-line-chart-grid {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(40,65,66,.075) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(0deg, rgba(40,65,66,.055) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, #f8fbfa 0%, #edf5f3 58%, #f6efe4 100%);
}
.das-chart-caption {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 4;
  color: #425659;
  font-size: 12px;
}
.das-waterfall-signal {
  position: absolute;
  top: 74px;
  width: 16px;
  height: 156px;
  transform: translateX(-50%);
  border-radius: 1px;
  opacity: .95;
  background: linear-gradient(180deg, rgba(75,150,150,.20), rgba(221,196,134,.58) 24%, rgba(218,91,82,.62) 52%, rgba(223,200,137,.48) 76%, rgba(75,150,150,.18));
  filter: saturate(.9);
}
.das-waterfall-signal.soft { width: 18px; opacity: .42; }
.das-waterfall-signal.peak { width: 9px; top: 64px; height: 170px; opacity: .88; background: linear-gradient(180deg, rgba(20,135,137,.24), rgba(235,212,141,.58), rgba(218,61,55,.78), rgba(234,212,141,.46), rgba(20,135,137,.22)); }
.das-waterfall-signal.strong { background: linear-gradient(180deg, #248f91, #c99418 22%, #b94a22 50%, #be7600 78%, #0f8a8f); }
.das-knock-marker {
  position: absolute;
  top: 36px;
  transform: translateX(-50%);
  background: #bd322b;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  z-index: 5;
  white-space: nowrap;
  animation: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(189, 50, 43, .22);
}
.das-knock-marker::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 260px;
  background: #e05249;
  pointer-events: none;
}
.das-axis {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  color: #445b61;
  font-size: 11px;
  background: rgba(255,255,255,.76);
  border-top: 1px solid #d4dedb;
}
.das-intensity-axis {
  position: absolute;
  left: 12px;
  top: 46px;
  bottom: 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #6a7779;
  font-size: 11px;
  z-index: 3;
}
.vibration-line-svg {
  position: absolute;
  left: 48px;
  right: 18px;
  top: 42px;
  width: calc(100% - 66px);
  height: calc(100% - 82px);
  overflow: visible;
}
.vibration-area-path { fill: url(#vibrationAreaGradient); }
.vibration-line-path {
  fill: none;
  stroke: #0f766e;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.vibration-time-cursor {
  stroke: #d23228;
  stroke-width: 1;
  stroke-dasharray: 5 5;
  vector-effect: non-scaling-stroke;
}
.vibration-peak-point {
  fill: #fff;
  stroke: #d23228;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.das-line-time-axis {
  left: 48px;
  right: 18px;
}
/* ========== 数据定标 · 双通道精简工作台 ========== */
.calib-page {
  --calib-accent: #0f766e;
  --calib-accent-hover: #0b625b;
  --calib-accent-soft: #e9f5f3;
  --calib-line: #dfe7e5;
  --calib-ink: #17211f;
  --calib-muted: #667572;
  color: var(--calib-ink);
}
.calib-page .card {
  border: 1px solid var(--calib-line);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(19, 43, 39, .05);
}
.calib-page .card-header {
  min-height: 44px;
  padding: 10px 14px;
  background: #fbfcfc;
  border-bottom: 1px solid var(--calib-line);
  font-size: 13px;
}
.calib-card-subtitle {
  color: var(--calib-muted);
  font-size: 12px;
  font-weight: 400;
}
.calib-overview {
  margin-bottom: 6px;
  border-left: 3px solid var(--calib-accent) !important;
  background: #fff;
}
.calib-overview-main {
  min-height: 62px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--calib-line);
}
.calib-overview-title {
  margin-bottom: 5px;
  color: #102522;
  font-size: 17px;
  font-weight: 700;
}
.calib-overview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--calib-muted);
  font-size: 12px;
}
.calib-overview-meta span {
  position: relative;
  white-space: nowrap;
}
.calib-overview-meta span + span::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #a8b8b5;
}
.calib-overview-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}
.calib-overview-actions .btn-primary,
.calib-form-actions .btn-primary {
  background: var(--calib-accent);
  border-color: var(--calib-accent);
  box-shadow: none;
}
.calib-overview-actions .btn-primary:hover,
.calib-form-actions .btn-primary:hover {
  background: var(--calib-accent-hover);
  border-color: var(--calib-accent-hover);
}
.calib-overview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}
.calib-stat {
  min-height: 64px;
  padding: 11px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.calib-stat + .calib-stat {
  border-left: 1px solid var(--calib-line);
}
.calib-stat-label {
  margin-bottom: 3px;
  color: var(--calib-muted);
  font-size: 11px;
}
.calib-stat strong {
  color: #173c37;
  font-size: 20px;
  line-height: 1.1;
}
.calib-stat strong.is-warning { color: #b45309; }
.calib-stat strong.is-success { color: #16835b; }

.calib-channel-tabs {
  margin-top: -12px;
  margin-bottom: 4px;
  padding: 3px;
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: stretch;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--calib-line);
  border-radius: 8px;
}
.calib-channel-tab {
  width: 96px;
  min-width: 96px;
  flex: 0 0 96px;
  min-height: 36px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: #44514f;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.calib-channel-tab:hover {
  background: #f5f9f8;
}
.calib-channel-tab.active {
  color: #0b5f58;
  background: var(--calib-accent-soft);
  border-color: #b9ddd8;
}
.calib-channel-name {
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.calib-status-pill {
  min-height: 22px;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #33504c;
  background: #eff4f3;
  border: 1px solid #d9e4e2;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.calib-status-pill.success {
  color: #13734f;
  background: #eaf7f0;
  border-color: #c5ead7;
}
.calib-status-pill.warning {
  color: #9a5a08;
  background: #fff6e6;
  border-color: #f2d5a6;
}

.calib-signal-grid {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.calib-chart-card { min-width: 0; }
.calib-page .calib-chart-card .das-waterfall-chart,
.calib-page .calib-chart-card .das-line-chart {
  height: 340px;
  border-radius: 0 0 8px 8px;
}

.calib-workspace-grid {
  display: grid;
  grid-template-columns: 460px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.calib-entry-panel,
.calib-record-panel {
  min-width: 0;
}
.calib-entry-panel .card-body {
  padding: 14px;
}
.calib-entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 12px;
}
.cursor-target.active {
  border-color: var(--calib-accent);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, .12);
}
.calib-link-mode-group { margin-top: 2px; }
.calib-link-tabs {
  padding: 3px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #f3f7f6;
  border: 1px solid var(--calib-line);
  border-radius: 6px;
}
.calib-link-tabs button {
  min-height: 34px;
  padding: 5px 9px;
  color: #566662;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
}
.calib-link-tabs button.active {
  color: #0b665d;
  background: #fff;
  border-color: #aed9d2;
  box-shadow: 0 1px 2px rgba(20, 72, 64, .08);
}
.calib-linked-fields {
  margin-bottom: 14px;
  padding: 12px;
  background: #f7faf9;
  border: 1px solid var(--calib-line);
  border-radius: 6px;
}
.calib-linked-fields[hidden] { display: none; }
.calib-full-field { grid-column: 1 / -1; }
.calib-form-options {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.calib-check-row {
  min-height: 48px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #f7faf9;
  border: 1px solid var(--calib-line);
  border-radius: 6px;
  cursor: pointer;
}
.calib-check-row input { accent-color: var(--calib-accent); }
.calib-check-row strong,
.calib-check-row small { display: block; }
.calib-check-row strong { color: #29443f; font-size: 12px; }
.calib-check-row small { margin-top: 2px; color: var(--calib-muted); font-size: 10px; }
.calib-winding-badge {
  padding: 2px 7px;
  color: #667572;
  background: #f0f3f2;
  border-radius: 4px;
  font-size: 11px;
}
.calib-winding-badge.yes { color: #8a570f; background: #fff3dc; }
.calib-filter-tip { margin-bottom: 14px; color: var(--text-muted); font-size: 12px; }
.calib-filter-section + .calib-filter-section { margin-top: 16px; }
.calib-filter-range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.calib-add-range { margin-top: 8px; }
.calib-linked-fields-title {
  margin-bottom: 10px;
  color: #315f58;
  font-size: 12px;
  font-weight: 650;
}
.calib-record-panel .card-body { padding: 0; }
.calib-detected {
  min-height: 112px;
  margin-bottom: 10px;
  padding: 11px;
  color: #173c37;
  background: #edf8f5;
  border: 1px solid #b9ddd8;
  border-radius: 6px;
}
.calib-detected.empty {
  color: var(--calib-muted);
  background: #f8faf9;
  border-color: var(--calib-line);
}
.calib-detected-head {
  display: flex;
  align-items: center;
  gap: 7px;
}
.calib-detected-head .calib-status-pill { margin-left: auto; }
.calib-signal-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #a7b6b3;
}
.calib-signal-dot.live {
  background: #0f8d78;
  box-shadow: 0 0 0 4px rgba(15, 141, 120, .12);
}
.calib-detected-empty {
  padding: 22px 0 4px;
  text-align: center;
  font-size: 12px;
}
.calib-detected-grid {
  margin-top: 11px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.calib-detected-grid div {
  min-width: 0;
  padding-top: 7px;
  border-top: 1px solid rgba(15, 118, 110, .15);
}
.calib-detected-grid span,
.calib-detected-grid strong {
  display: block;
}
.calib-detected-grid span {
  margin-bottom: 2px;
  color: var(--calib-muted);
  font-size: 10px;
}
.calib-detected-grid strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calib-knock-button {
  width: 100%;
  min-height: 36px;
  margin-bottom: 14px;
  justify-content: center;
  color: var(--calib-accent);
  background: #fff;
  border-color: #9ccfc8;
}
.calib-knock-button:hover {
  color: #fff;
  background: var(--calib-accent);
  border-color: var(--calib-accent);
}
.calib-required { color: #c53b34; }
.calib-segmented {
  width: 100%;
  padding: 3px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  background: #eff3f2;
  border-radius: 6px;
}
.calib-segmented button {
  min-height: 30px;
  color: #596663;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
}
.calib-segmented button.active {
  color: #0b5f58;
  background: #fff;
  border-color: #cddbd8;
  box-shadow: 0 1px 2px rgba(23, 60, 55, .08);
}
.calib-link-box {
  margin: 3px 0 14px;
  padding: 11px;
  background: #f8faf9;
  border: 1px solid var(--calib-line);
  border-radius: 6px;
}
.calib-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}
.calib-switch-row strong,
.calib-switch-row small {
  display: block;
}
.calib-switch-row strong {
  color: #374744;
  font-size: 12px;
}
.calib-switch-row small {
  max-width: 205px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--calib-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calib-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex: 0 0 36px;
}
.calib-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.calib-switch-track {
  position: absolute;
  inset: 0;
  background: #b7c3c0;
  border-radius: 10px;
  transition: background .18s;
}
.calib-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  transition: transform .18s;
}
.calib-switch input:checked + .calib-switch-track {
  background: var(--calib-accent);
}
.calib-switch input:checked + .calib-switch-track::after {
  transform: translateX(16px);
}
.calib-link-fields {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--calib-line);
}
.calib-link-fields[hidden] { display: none; }
.calib-form-actions {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 8px;
}
.calib-form-actions .btn {
  min-height: 36px;
  justify-content: center;
}

.calib-record-table {
  min-width: 980px;
  table-layout: auto;
}
.calib-record-table th {
  top: 0;
  z-index: 1;
}
.calib-record-table th,
.calib-record-table td {
  padding: 9px 10px !important;
  vertical-align: middle;
}
.calib-record-table tbody tr { cursor: pointer; }
.calib-record-table th:nth-child(1) { min-width: 138px; }
.calib-record-table th:nth-child(2) { min-width: 130px; }
.calib-record-table th:nth-child(3),
.calib-record-table th:nth-child(4) { min-width: 136px; }
.calib-record-table th:nth-child(5),
.calib-record-table th:nth-child(6) { min-width: 190px; }
.calib-record-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.calib-zone-track {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.calib-zone-track + .calib-zone-track {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed #d8e2df;
}
.calib-zone-track strong {
  min-width: 0;
  overflow: hidden;
  color: #263c38;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calib-channel-mini {
  min-width: 36px;
  padding: 1px 4px;
  color: #47736b;
  background: #edf6f4;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 650;
  text-align: center;
  white-space: nowrap;
}
.calib-record-table td:first-child .calib-fusion-badge {
  margin-top: 6px;
  display: block;
  width: fit-content;
}.calib-scene-badge,
.calib-zone-badge,
.calib-fusion-badge {
  padding: 2px 6px;
  display: inline-block;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
}
.calib-scene-badge {
  color: #365850;
  background: #eef4f2;
}
.calib-zone-badge {
  color: #176a62;
  background: var(--calib-accent-soft);
}
.calib-fusion-badge {
  color: #8a570f;
  background: #fff3dc;
}
.calib-muted {
  color: #93a09d;
  font-size: 11px;
}
.calib-row-actions {
  min-width: 92px;
  white-space: nowrap;
}
.calib-row-actions .btn { padding: 3px 5px; }
.calib-row-actions .btn.danger { color: #b8322b; }
.calib-empty-records {
  padding: 48px 16px;
  color: var(--calib-muted);
  text-align: center;
}

.calib-rule-list {
  display: grid;
  gap: 10px;
}
.calib-rule-list > div {
  padding-bottom: 9px;
  border-bottom: 1px solid #edf1f0;
}
.calib-rule-list span,
.calib-rule-list strong {
  display: block;
}
.calib-rule-list span {
  margin-bottom: 3px;
  color: var(--calib-muted);
  font-size: 10px;
}
.calib-rule-list strong {
  color: #34433f;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}
.calib-qa-results {
  margin-top: 14px;
}
.calib-qa-heading {
  margin-bottom: 7px;
  color: #8a570f;
  font-size: 11px;
  font-weight: 700;
}
.calib-qa-results ul {
  padding-left: 17px;
  color: #6f511f;
  font-size: 11px;
  line-height: 1.55;
}
.calib-qa-results li + li { margin-top: 6px; }
.calib-qa-pass {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #1b6f51;
  background: #edf8f2;
  border: 1px solid #cbe9d9;
  border-radius: 6px;
}
.calib-qa-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  color: #fff;
  background: #25966c;
  border-radius: 50%;
  font-weight: 700;
}
.calib-qa-pass strong,
.calib-qa-pass small {
  display: block;
}
.calib-qa-pass strong { font-size: 11px; }
.calib-qa-pass small {
  margin-top: 2px;
  color: #58806f;
  font-size: 10px;
}

@media (max-width: 1280px) {
  .calib-workspace-grid {
    grid-template-columns: 420px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .calib-overview-main {
    align-items: flex-start;
  }
  .calib-overview-stats {
    grid-template-columns: 1fr 1fr;
  }
  .calib-stat:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--calib-line);
  }
  .calib-stat:nth-child(4) {
    border-top: 1px solid var(--calib-line);
  }
  .calib-channel-tabs {
    flex-wrap: wrap;
  }
  .calib-channel-tab {
    flex-basis: 96px;
  }
  .calib-signal-grid,
  .calib-workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .calib-entry-grid { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    display: none;
  }
  .main-content {
    width: 100%;
    min-width: 0;
  }
  .top-header {
    height: 52px;
    padding: 0 12px;
  }
  .header-right .status-badge,
  .header-right .header-icon,
  .header-right .user-avatar {
    display: none;
  }
  .content-area {
    padding: 12px;
  }
  .breadcrumb {
    font-size: 14px;
  }
  .modal-container {
    width: calc(100vw - 24px);
    min-width: 0;
  }
  .calib-overview-main {
    flex-direction: column;
  }
  .calib-overview-actions {
    width: 100%;
  }
  .calib-overview-actions .btn {
    flex: 1;
    justify-content: center;
  }
  .calib-overview-stats {
    grid-template-columns: 1fr;
  }
  .calib-stat + .calib-stat {
    border-top: 1px solid var(--calib-line);
    border-left: 0;
  }
  .calib-detected-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 光标关联相机 ---------- */
.camera-map-tabs {
  margin-bottom: 10px;
  padding: 3px;
  display: flex;
  width: fit-content;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.camera-map-tabs button {
  width: 96px;
  min-height: 36px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.camera-map-tabs button.active {
  color: #0b665d;
  background: #e9f5f3;
  border-color: #b9ddd8;
  font-weight: 600;
}
.camera-map-hint { color: var(--text-muted); font-size: 12px; font-weight: 400; }
.camera-map-card table { min-width: 720px; }
.camera-map-card th:nth-child(1),
.camera-map-card th:nth-child(2) { width: 160px; }
.camera-preset-badge {
  padding: 3px 8px;
  color: #176a62;
  background: #e9f5f3;
  border-radius: 4px;
  font-size: 12px;
}
.camera-map-editor table { min-width: 820px; table-layout: fixed; }
.camera-map-editor thead th {
  padding: 12px !important;
  color: #294b62;
  background: #e8f4fb;
  border-color: #d8e7f0;
  text-align: center;
}
.camera-map-editor th:nth-child(1) { width: 68px; }
.camera-map-editor th:nth-child(2),
.camera-map-editor th:nth-child(3) { width: 145px; }
.camera-map-editor th:nth-child(4) { width: 260px; }
.camera-map-editor th:nth-child(5) { width: 240px; }
.camera-map-editor th:nth-child(6) { width: 88px; }
.camera-map-editor td {
  padding: 8px 10px !important;
  background: #fbfcfd;
  border-color: #e3ebf0;
  text-align: center;
}
.camera-map-editor tbody tr:nth-child(even) td { background: #f5f8fa; }
.camera-map-input,
.camera-map-select { width: 100%; min-height: 34px; background: #fff; }
.camera-map-add {
  width: auto;
  min-height: 34px;
  margin: 14px 18px 6px;
  display: inline-flex;
  color: #0f766e;
  background: #fff;
  border: 1px solid #9ecfc8;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}
.camera-map-actions {
  padding: 8px 18px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------- 数据定标风格统一：总览 / 报警 / 光标关联相机 ---------- */
.page-dashboard,
.page-alarm-list,
.page-alarm-detail,
.page-calibration-records {
  --primary: #0f766e;
  --primary-hover: #0b625b;
  --primary-bg: #e9f5f3;
  --border: #dfe7e5;
  --shadow-sm: 0 1px 3px rgba(19, 43, 39, .05);
  color: #17211f;
}
.page-dashboard .card,
.page-alarm-list .card,
.page-alarm-detail .card,
.page-calibration-records .card,
.page-dashboard .stat-card {
  border: 1px solid #dfe7e5;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(19, 43, 39, .05);
}
.page-dashboard .card-header,
.page-alarm-list .card-header,
.page-alarm-detail .card-header,
.page-calibration-records .card-header {
  min-height: 44px;
  padding: 10px 14px;
  color: #173c37;
  background: #fbfcfc;
  border-bottom-color: #dfe7e5;
  font-size: 13px;
}
.page-dashboard .card-body,
.page-alarm-detail .card-body { padding: 14px; }
.page-dashboard .stat-grid { gap: 12px; margin-bottom: 12px; }
.page-dashboard .stat-card { padding: 14px; gap: 12px; }
.page-dashboard .stat-icon {
  width: 42px;
  height: 42px;
  color: #0f766e;
  background: #e9f5f3;
  border-radius: 6px;
  font-size: 20px;
}
.page-dashboard .stat-value { color: #173c37 !important; font-size: 24px; }
.page-dashboard > div:first-child {
  margin-bottom: 12px !important;
  padding: 10px 14px !important;
  border-color: #dfe7e5 !important;
  border-left: 3px solid #0f766e !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 3px rgba(19, 43, 39, .05);
}
.page-alarm-list .filter-bar {
  margin-bottom: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid #dfe7e5;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(19, 43, 39, .04);
}
.page-dashboard table th,
.page-alarm-list table th,
.page-alarm-detail table th,
.page-calibration-records table th {
  color: #52635f;
  background: #f4f8f7;
  border-bottom-color: #dfe7e5;
}
.page-dashboard table td,
.page-alarm-list table td,
.page-alarm-detail table td,
.page-calibration-records table td { border-bottom-color: #e7edeb; }
.page-dashboard table tbody tr:hover,
.page-alarm-list table tbody tr:hover,
.page-calibration-records table tbody tr:hover { background: #f7faf9; }
.page-dashboard .btn,
.page-alarm-list .btn,
.page-alarm-detail .btn,
.page-calibration-records .btn {
  min-height: 34px;
  padding: 5px 12px;
  border-color: #cedbd8;
  border-radius: 6px;
  font-size: 12px;
}
.page-dashboard .btn-primary,
.page-alarm-list .btn-primary,
.page-alarm-detail .btn-primary,
.page-calibration-records .btn-primary {
  color: #fff;
  background: #0f766e;
  border-color: #0f766e;
}
.page-dashboard .btn-primary:hover,
.page-alarm-list .btn-primary:hover,
.page-alarm-detail .btn-primary:hover,
.page-calibration-records .btn-primary:hover { background: #0b625b; border-color: #0b625b; }
.page-alarm-list .pagination button.active {
  color: #fff;
  background: #0f766e;
  border-color: #0f766e;
}
.page-calibration-records .camera-map-editor thead th {
  color: #52635f;
  background: #f4f8f7;
  border-color: #dfe7e5;
}
.page-calibration-records .camera-map-editor td {
  background: #fff;
  border-color: #e7edeb;
}
.page-calibration-records .camera-map-editor tbody tr:nth-child(even) td { background: #fafcfb; }
.page-calibration-records .camera-map-add {
  width: auto;
  min-height: 34px;
  margin: 14px 18px 6px;
  display: inline-flex;
  color: #0f766e;
  background: #fff;
  border: 1px solid #9ecfc8;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}
.camera-row-index { color: var(--text-muted); font-weight: 600; }
.camera-search-input { width: 100%; min-height: 34px; background: #fff; }
.camera-preset-multi { position: relative; text-align: left; }
.camera-preset-multi summary {
  min-height: 34px;
  padding: 6px 28px 6px 10px;
  overflow: hidden;
  color: #334743;
  background: #fff;
  border: 1px solid #cedbd8;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  list-style: none;
}
.camera-preset-multi summary::-webkit-details-marker { display: none; }
.camera-preset-multi summary::after { content: '⌄'; position: absolute; right: 10px; color: #748681; }
.camera-preset-options {
  position: absolute;
  top: 38px;
  left: 0;
  z-index: 20;
  width: 100%;
  max-height: 210px;
  padding: 6px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cedbd8;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(20, 48, 43, .14);
}
.camera-preset-options label {
  padding: 6px 7px;
  display: block;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}
.camera-preset-options label:hover { background: #edf7f5; }
.camera-preset-options input { accent-color: #0f766e; }
.camera-map-row-actions { white-space: nowrap; }
.camera-preview-meta {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.camera-preview-meta div { padding: 10px; background: #f4f8f7; border-radius: 6px; }
.camera-preview-meta span,
.camera-preview-meta strong { display: block; }
.camera-preview-meta span { margin-bottom: 4px; color: var(--text-muted); font-size: 11px; }
.camera-preview-meta strong { color: #23443e; font-size: 13px; }
.camera-preview-screen {
  position: relative;
  height: 320px;
  overflow: hidden;
  color: #dceae7;
  background: linear-gradient(145deg, #253a38, #122523);
  border-radius: 8px;
}
.camera-preview-live { position: absolute; top: 12px; left: 12px; font-size: 11px; }
.camera-preview-live span { width: 7px; height: 7px; display: inline-block; background: #ef4444; border-radius: 50%; }
.camera-preview-placeholder { padding-top: 92px; text-align: center; font-size: 64px; opacity: .42; }
.camera-preview-caption { position: absolute; right: 0; bottom: 0; left: 0; padding: 12px; background: rgba(0,0,0,.28); text-align: center; font-size: 12px; }

/* ---------- 授权管理 · 系统注册 ---------- */
.page-alarm-auth {
  --primary: #0f766e;
  --primary-hover: #0b625b;
  --primary-bg: #e9f5f3;
  --border: #dfe7e5;
}
.page-alarm-auth .card { border: 1px solid #dfe7e5; border-radius: 8px; box-shadow: 0 1px 3px rgba(19,43,39,.05); }
.page-alarm-auth .card-header { min-height: 44px; padding: 10px 14px; color: #173c37; background: #fbfcfc; border-bottom-color: #dfe7e5; font-size: 13px; }
.page-alarm-auth .btn-primary { color: #fff; background: #0f766e; border-color: #0f766e; }
.auth-register-card { margin-bottom: 0; }
.auth-register-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
.auth-register-wide { grid-column: span 2; }
.auth-code-input { color: #315f58; background: #f3f7f6; font-weight: 600; }
.auth-field-hint { margin-top: 5px; display: block; color: var(--text-muted); font-size: 11px; }
.auth-register-actions { display: flex; justify-content: flex-end; }
@media (max-width: 1000px) {
  .auth-register-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .auth-register-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-register-wide { grid-column: auto; }
}
.page-alarm-auth .grid-2 { gap: 12px; }
.page-alarm-auth .card-body { padding: 14px; }
.page-alarm-auth .card-footer { padding: 10px 14px; border-top-color: #dfe7e5; }
.page-alarm-auth .form-input,
.page-alarm-auth .form-select {
  min-height: 36px;
  border-color: #cedbd8;
  border-radius: 6px;
}
.page-alarm-auth .form-input:focus,
.page-alarm-auth .form-select:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15,118,110,.1);
}
.page-alarm-auth .btn {
  min-height: 34px;
  padding: 5px 12px;
  border-color: #cedbd8;
  border-radius: 6px;
  font-size: 12px;
}
.page-alarm-auth .btn:hover { color: #0f766e; border-color: #0f766e; }
.page-alarm-auth .btn-primary:hover { color: #fff; background: #0b625b; border-color: #0b625b; }
.page-alarm-auth table th {
  padding: 10px 12px;
  color: #52635f;
  background: #f4f8f7;
  border-bottom-color: #dfe7e5;
}
.page-alarm-auth table td { padding: 10px 12px; border-bottom-color: #e7edeb; }
.page-alarm-auth table tbody tr:hover { background: #f7faf9; }
.auth-status-card .auth-state-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 0 16px;
  text-align: center;
}
.auth-status-card .auth-state-icon {
  font-size: 36px;
  line-height: 1;
}
.auth-status-card .auth-state-text {
  color: var(--success);
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}
.auth-status-card .detail-section {
  padding-top: 12px;
  border-top: 1px solid #e7edeb;
}
.auth-status-card code,
.auth-history-card code {
  color: #315f58;
  background: #f3f7f6 !important;
  border-radius: 4px;
}
.auth-register-card .calib-status-pill { color: #16835b; background: #eaf7f0; }
.calib-top-row {
  margin-top: -12px;
  margin-bottom: 4px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.calib-top-row .calib-channel-tabs { margin: 0; }
.calib-config-button {
  min-height: 36px;
  padding: 5px 13px;
  color: #0b665d;
  background: #fff;
  border-color: #b9d8d3;
}
.calib-config-button:hover { color: #0f766e; background: #edf7f5; border-color: #0f766e; }
.calib-config-section + .calib-config-section { margin-top: 18px; }
.calib-config-section-title {
  margin-bottom: 10px;
  padding-bottom: 7px;
  color: #234b44;
  border-bottom: 1px solid #e3ebe9;
  font-size: 13px;
  font-weight: 650;
}
.calib-config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calib-config-range-row {
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 92px 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
.calib-config-range-row label { color: #52635f; font-size: 12px; }
@media (max-width: 600px) {
  .calib-config-grid { grid-template-columns: 1fr; }
  .calib-config-range-row { grid-template-columns: 1fr 1fr; }
  .calib-config-range-row label { grid-column: 1 / -1; }
}
.das-channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.das-channel-card { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 8px; }
@media (max-width: 1000px) { .das-channel-grid { grid-template-columns: minmax(0, 1fr); } }
.dashboard-product-bar {
  min-height: 78px;
  margin-bottom: 12px;
  padding: 13px 18px;
  display: grid;
  grid-template-columns: repeat(8, minmax(176px, 1fr));
  align-items: center;
  gap: 0;
  overflow-x: auto;
  background: #fff;
  border: 1px solid #dfe7e5;
  border-left: 3px solid #0f766e;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(19,43,39,.05);
}
.dashboard-product-item {
  min-width: max-content;
  padding: 0 18px;
  border-right: 1px solid #e3ebe9;
}
.dashboard-product-item:first-child { padding-left: 0; }
.dashboard-product-item span,
.dashboard-product-item strong { display: block; }
.dashboard-product-item span {
  margin-bottom: 6px;
  color: #71807d;
  font-size: 11px;
  font-weight: 400;
}
.dashboard-product-item strong {
  color: #263c38;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.dashboard-product-code strong { color: #0b665d; }
.dashboard-product-status { min-width: max-content; padding-left: 18px; }
.page-dashboard > .dashboard-product-bar { padding: 13px 18px !important; }
.dashboard-overview-grid .chart-placeholder { height: 150px; }

.dashboard-device-status-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.dashboard-device-status-title { justify-self: start; }
.dashboard-device-status-summary {
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}
.dashboard-device-status-summary strong { color: var(--text-primary); }
.dashboard-status-divider { color: var(--border); }
.dashboard-status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-radius: 50%;
  vertical-align: 0;
}
.dashboard-status-dot.online {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .1);
}
.dashboard-status-dot.offline {
  background: var(--error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .1);
}
.dashboard-device-status-range {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.dashboard-device-status-range .form-select {
  width: auto;
  min-width: 92px;
  height: 28px;
  font-size: 12px;
}
@media (max-width: 900px) {
  .dashboard-overview-grid .chart-placeholder { height: 150px; }

.dashboard-device-status-header {
    grid-template-columns: 1fr max-content;
    gap: 8px 12px;
  }
  .dashboard-device-status-summary {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
@media (max-width: 520px) {
  .dashboard-overview-grid .chart-placeholder { height: 150px; }

.dashboard-device-status-header { grid-template-columns: 1fr; }
  .dashboard-device-status-range,
  .dashboard-device-status-summary {
    grid-column: 1;
    justify-self: start;
  }
  .dashboard-device-status-range { grid-row: 2; }
  .dashboard-device-status-summary {
    grid-row: 3;
    flex-wrap: wrap;
    justify-content: flex-start;
    white-space: normal;
  }
}
.calib-recalibrate-tip { margin-bottom: 14px; padding: 10px 12px; color: #52635f; background: #f4f8f7; border-radius: 6px; font-size: 12px; }


/* ---------- 数据分析 · 数据定标同款风格 ---------- */
.page-data-analysis { --primary:#0f766e; --primary-hover:#0b625b; --primary-bg:#e9f5f3; --border:#dfe7e5; color:#17211f; }
.page-data-analysis .card { border:1px solid #dfe7e5; border-radius:8px; box-shadow:0 1px 3px rgba(19,43,39,.05); }
.page-data-analysis .card-header { min-height:44px; padding:10px 14px; color:#173c37; background:#fbfcfc; border-bottom-color:#dfe7e5; font-size:13px; }
.page-data-analysis .btn-primary { color:#fff; background:#0f766e; border-color:#0f766e; }
.analysis-config-card { margin-bottom:12px; }
.analysis-config-grid { padding:12px 14px!important; display:grid; grid-template-columns:.65fr 1fr 1.35fr 1.35fr .8fr .8fr 1.35fr; gap:10px; }
.analysis-config-grid label>span { margin-bottom:5px; display:block; color:#60716d; font-size:11px; }
.analysis-config-grid .form-input,.analysis-config-grid .form-select { min-width:0; min-height:34px; border-color:#cedbd8; border-radius:6px; }
.analysis-range-field { display:grid; grid-template-columns:1fr auto 1fr; gap:6px; align-items:end; }
.analysis-range-field>span { grid-column:1/-1; }
.analysis-range-field b { padding-bottom:9px; color:#82908d; font-size:11px; font-weight:400; }
.analysis-chart-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.analysis-chart-card { min-width:0; overflow:hidden; }
.analysis-chart-meta { color:#71807d; font-size:11px; font-weight:400; }
.analysis-waterfall,.analysis-line-chart { position:relative; height:300px; overflow:hidden; background-color:#f8fbfa; background-image:linear-gradient(#e3ebe9 1px,transparent 1px),linear-gradient(90deg,#e3ebe9 1px,transparent 1px); background-size:48px 42px; }
.analysis-waterfall::before { content:''; position:absolute; inset:0 0 26px; background:linear-gradient(180deg,rgba(15,118,110,.03),rgba(15,118,110,.09)); }
.analysis-waterfall i { position:absolute; top:28px; bottom:26px; width:10px; background:linear-gradient(180deg,#2a9d8f,#e9c46a,#e76f51,#2a9d8f); border-radius:2px; }
.analysis-waterfall i.strong { width:14px; }
.analysis-waterfall.secondary i { background:linear-gradient(180deg,#3a86a8,#a8dadc,#f4a261,#3a86a8); }
.analysis-crosshair { position:absolute; width:1px; height:1px; background:#e05249; }
.analysis-crosshair::before { content:''; position:absolute; top:-160px; bottom:-120px; width:1px; background:#e05249; }
.analysis-crosshair::after { content:''; position:absolute; left:-420px; right:-180px; height:1px; background:#e05249; }
.analysis-line-chart svg { position:absolute; inset:18px 12px 30px; width:calc(100% - 24px); height:calc(100% - 48px); }
.analysis-line { fill:none; stroke-width:2; vector-effect:non-scaling-stroke; }
.analysis-line.cyan { stroke:#22a6b3; }.analysis-line.teal { stroke:#0f766e; }
.analysis-peak-dot { fill:#e76f51; stroke:#fff; stroke-width:2; }
.analysis-axis { position:absolute; right:0; bottom:0; left:0; height:26px; padding:0 10px; display:flex; align-items:center; justify-content:space-between; color:#60716d; background:rgba(255,255,255,.78); font-size:10px; }
@media(max-width:1280px){.analysis-config-grid{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media(max-width:900px){.analysis-chart-grid{grid-template-columns:minmax(0,1fr)}.analysis-config-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
.page-data-analysis { display:flex; flex-direction:column; min-height:100%; }
.page-data-analysis .analysis-config-card { flex:0 0 auto; }
.page-data-analysis .analysis-chart-grid {
  flex:1 0 auto;
  grid-template-rows:repeat(2,minmax(360px,1fr));
  min-height:732px;
}
.page-data-analysis .analysis-chart-card { display:flex; flex-direction:column; }
.page-data-analysis .analysis-waterfall,
.page-data-analysis .analysis-line-chart { flex:1; height:auto; min-height:360px; }
@media(max-width:900px){
  .page-data-analysis .analysis-chart-grid{grid-template-rows:none;min-height:0;}
  .page-data-analysis .analysis-waterfall,.page-data-analysis .analysis-line-chart{min-height:400px;}
}

/* 数据分析固定工作区与四图拖动分隔 */
.page-data-analysis {
  height:100%;
  min-height:0;
  overflow:hidden;
  box-sizing:border-box;
}
.page-data-analysis .analysis-config-card { flex:0 0 auto; margin-bottom:8px; }
.page-data-analysis .analysis-chart-grid {
  --analysis-split-x:50%;
  --analysis-split-y:50%;
  position:relative;
  flex:1 1 0;
  min-height:0;
  grid-template-columns:var(--analysis-split-x) minmax(0,1fr);
  grid-template-rows:var(--analysis-split-y) minmax(0,1fr);
  gap:8px;
}
.page-data-analysis .analysis-chart-card { min-height:0; }
.page-data-analysis .analysis-waterfall,
.page-data-analysis .analysis-line-chart { min-height:0; height:auto; flex:1 1 0; }
.analysis-resize-handle {
  position:absolute;
  left:calc(var(--analysis-split-x) - 17px);
  top:calc(var(--analysis-split-y) - 17px);
  z-index:30;
  width:34px;
  height:34px;
  padding:0;
  color:#0f766e;
  background:#fff;
  border:1px solid #b8d7d2;
  border-radius:50%;
  box-shadow:0 4px 12px rgba(19,43,39,.16);
  cursor:move;
  font-size:18px;
  line-height:32px;
  text-align:center;
  touch-action:none;
  user-select:none;
}
.analysis-resize-handle:hover { color:#fff; background:#0f766e; border-color:#0f766e; }
@media(max-width:900px){
  .page-data-analysis .analysis-chart-grid{
    grid-template-columns:var(--analysis-split-x) minmax(0,1fr);
    grid-template-rows:var(--analysis-split-y) minmax(0,1fr);
    min-height:0;
  }
  .page-data-analysis .analysis-waterfall,
  .page-data-analysis .analysis-line-chart{min-height:0;}
}
.calib-chart-actions { display:flex; align-items:center; gap:8px; }
.das-waterfall-chart { position:relative; }
.das-waterfall-chart.paused::after {
  content:'瀑布图已暂停';
  position:absolute;
  top:12px;
  right:12px;
  z-index:10;
  padding:4px 9px;
  color:#8a570f;
  background:#fff3dc;
  border:1px solid #f1d59c;
  border-radius:4px;
  font-size:11px;
  font-weight:600;
}
.das-waterfall-chart.paused .das-waterfall-signal { filter:saturate(.65); opacity:.55; }
.das-line-chart { position:relative; }
.das-line-chart.paused::after {
  content:'折线图已暂停';
  position:absolute;
  top:12px;
  right:12px;
  z-index:10;
  padding:4px 9px;
  color:#8a570f;
  background:#fff3dc;
  border:1px solid #f1d59c;
  border-radius:4px;
  font-size:11px;
  font-weight:600;
}
.das-line-chart.paused svg { opacity:.68; }
.calib-field-note { margin-top:6px; display:block; color:#71807d; font-size:11px; line-height:1.55; }

.dashboard-card-range {
  width: auto;
  min-width: 86px;
  height: 28px;
  font-size: 12px;
}
.alarm-trend-chart {
  position: relative;
  width: 100%;
  height: 168px;
  border: 1px solid #e2e9e7;
  border-radius: 6px;
  background: #fbfcfc;
}
.alarm-trend-chart svg { display: block; width: 100%; height: 100%; }
.alarm-grid-line { stroke: #e4ebe9; stroke-width: 1; }
.alarm-axis-label { fill: #7a8986; font-size: 10px; }
.alarm-axis-title { fill: #657572; font-size: 10px; font-weight: 600; }
.alarm-trend-line { fill: none; stroke: #1677ff; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.alarm-trend-point { fill: #fff; stroke: #1677ff; stroke-width: 2.5; cursor: pointer; transition: r .15s ease; }
.alarm-trend-point:hover { r: 7; fill: #e9f3ff; }
.alarm-trend-tooltip {
  position: absolute;
  z-index: 3;
  padding: 6px 9px;
  color: #fff;
  background: rgba(24, 39, 36, .9);
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity .12s ease;
}
.alarm-trend-tooltip.show { opacity: 1; }
.alarm-trend-legend {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12px;
  flex-wrap: wrap;
}
.alarm-trend-legend strong { color: var(--text-primary); }
.alarm-trend-total { padding-left: 12px; border-left: 1px solid var(--border); }
@media (max-width: 760px) {
  .alarm-trend-chart { height: 150px; }
  .alarm-axis-label { font-size: 9px; }
}
.analysis-config-actions { display:flex; align-items:center; gap:8px; }
.analysis-config-toggle { display:inline-flex; align-items:center; gap:7px; }
.analysis-config-arrow { font-size:14px; line-height:1; }
.analysis-config-card.collapsed .analysis-config-grid { display:none; }
.analysis-config-card.collapsed .card-header { border-bottom:0; }
/* ---------- 产品自检 ---------- */
.page-product-self-check { --primary:#0f766e; --primary-hover:#0b625b; --primary-bg:#e9f5f3; --border:#dfe7e5; color:#17211f; }
.page-product-self-check .card { border:1px solid #dfe7e5; border-radius:8px; box-shadow:0 1px 3px rgba(19,43,39,.05); }
.page-product-self-check .card-header { min-height:46px; padding:10px 14px; color:#173c37; background:#fbfcfc; border-bottom-color:#dfe7e5; font-size:13px; }
.self-check-summary { display:grid; grid-template-columns:minmax(320px,1fr) auto auto; align-items:center; gap:24px; margin-bottom:12px; padding:16px 18px; background:#fff; border:1px solid #dfe7e5; border-left:3px solid #0f766e; border-radius:8px; box-shadow:0 1px 3px rgba(19,43,39,.05); }
.self-check-summary-main { display:flex; align-items:center; gap:13px; min-width:0; }
.self-check-summary-icon { display:grid; place-items:center; width:44px; height:44px; flex:0 0 auto; background:#e9f5f3; border-radius:7px; font-size:22px; }
.self-check-summary-title { color:#173c37; font-size:16px; font-weight:700; }
.self-check-summary-desc { margin-top:4px; color:#71807d; font-size:12px; }
.self-check-summary-counts { display:flex; align-items:center; gap:22px; }
.self-check-summary-counts > div { min-width:44px; text-align:center; }
.self-check-summary-counts strong,.self-check-summary-counts span { display:block; }
.self-check-summary-counts strong { color:#0f766e; font-size:21px; }
.self-check-summary-counts strong.failed { color:#d14343; }
.self-check-summary-counts span { margin-top:2px; color:#71807d; font-size:10px; }
.self-check-summary-result { min-width:150px; text-align:right; }
.self-check-summary-result small { display:block; margin-top:6px; color:#71807d; font-size:10px; }
.self-check-overall { display:inline-flex; padding:5px 10px; border-radius:999px; font-size:12px; font-weight:650; }
.self-check-overall.passed { color:#237a43; background:#edf9f1; }
.self-check-overall.failed { color:#b53232; background:#fff0f0; }
.self-check-overall.checking { color:#946200; background:#fff7e6; }
.self-check-actions { display:flex; align-items:center; gap:8px; }
.self-check-table { min-width:1120px; }
.self-check-table th { color:#53635f; background:#f5f8f7; font-size:11px; white-space:nowrap; }
.self-check-table td { padding-top:11px; padding-bottom:11px; font-size:12px; vertical-align:middle; }
.self-check-table td:nth-child(5) { min-width:240px; }
.self-check-category { display:inline-flex; padding:3px 7px; border-radius:4px; font-size:10px; white-space:nowrap; }
.self-check-category.config { color:#6956a8; background:#f2efff; }
.self-check-category.api { color:#1e6e83; background:#eaf7fa; }
.self-check-category.report { color:#8a5b12; background:#fff4df; }
.self-check-category.file { color:#85506f; background:#faedf5; }
.self-check-status { display:inline-flex; align-items:center; min-width:68px; font-weight:650; white-space:nowrap; }
.self-check-status.passed { color:#23834a; }
.self-check-status.failed { color:#d14343; }
.self-check-status.checking { color:#b77900; }
.self-check-detail { color:#52635f; }
.self-check-row[data-state="failed"] { background:#fffafa; }
.self-check-row[data-state="checking"] { background:#fffdf5; }
.self-check-run { white-space:nowrap; }
@media(max-width:1000px) {
  .self-check-summary { grid-template-columns:1fr auto; }
  .self-check-summary-result { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; text-align:left; }
  .self-check-summary-result small { margin-top:0; }
}
@media(max-width:650px) {
  .self-check-summary { grid-template-columns:1fr; gap:14px; }
  .self-check-summary-counts { justify-content:space-around; }
  .self-check-summary-result { grid-column:auto; }
}
/* ---------- DAS 主机基本信息 ---------- */
.das-host-config-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px 14px; }
.das-host-config-grid .form-group { min-width:0; margin-bottom:0; }
.das-host-config-grid .form-label { margin-bottom:5px; color:#60716d; font-size:11px; }
.das-host-config-grid .form-input,.das-host-config-grid .form-select { min-width:0; min-height:34px; border-radius:6px; }
.das-config-input-unit { display:flex; align-items:stretch; min-width:0; }
.das-config-input-unit .form-input { border-top-right-radius:0; border-bottom-right-radius:0; }
.das-config-input-unit span { display:flex; align-items:center; justify-content:center; min-width:46px; padding:0 9px; color:#71807d; background:#f5f8f7; border:1px solid var(--border); border-left:0; border-radius:0 6px 6px 0; font-size:11px; }
.das-host-config-actions { justify-content:flex-end; margin-top:16px; padding-top:14px; border-top:1px solid var(--border); }
@media(max-width:1200px){.das-host-config-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:900px){.das-host-config-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:560px){.das-host-config-grid{grid-template-columns:minmax(0,1fr);}}
.das-system-readonly .form-input,
.das-system-readonly .form-input[readonly] {
  color:#697673;
  background:#eef1f0;
  border-color:#d7dfdd;
  cursor:not-allowed;
  box-shadow:none;
}
.das-system-readonly .form-input:focus { border-color:#d7dfdd; box-shadow:none; }
.das-readonly-badge { display:inline-flex; margin-left:5px; padding:1px 5px; color:#75827f; background:#e5e9e8; border-radius:3px; font-size:9px; font-weight:500; vertical-align:1px; }
.das-channel-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 12px; }
.das-channel-field-grid .form-group { min-width:0; margin-bottom:0; }
.das-channel-field-grid .form-label { margin-bottom:5px; color:#60716d; font-size:11px; }
.das-channel-field-grid .form-input,.das-channel-field-grid .form-select { min-width:0; min-height:34px; border-radius:6px; }
.das-channel-range-field > div { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:6px; }
.das-channel-range-field b { color:#82908d; font-size:11px; font-weight:400; }
.das-channel-preview { margin-top:12px; }
.das-switch { display:flex; align-items:center; gap:8px; min-height:34px; width:max-content; cursor:pointer; user-select:none; }
.das-switch input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.das-switch span { position:relative; width:34px; height:18px; background:#c8d1cf; border-radius:999px; transition:background .18s ease; }
.das-switch span::after { content:''; position:absolute; top:2px; left:2px; width:14px; height:14px; background:#fff; border-radius:50%; box-shadow:0 1px 3px rgba(0,0,0,.18); transition:transform .18s ease; }
.das-switch input:checked + span { background:#0f766e; }
.das-switch input:checked + span::after { transform:translateX(16px); }
.das-switch input:focus-visible + span { outline:2px solid rgba(15,118,110,.3); outline-offset:2px; }
.das-switch em { color:#52635f; font-size:11px; font-style:normal; }
@media(max-width:700px){.das-channel-field-grid{grid-template-columns:minmax(0,1fr)}}
/* ---------- DAS 主机一页紧凑布局 ---------- */
.das-host-basic-card .card-body { padding:12px 14px; }
.das-host-config-grid { gap:8px 10px; }
.das-host-config-grid .form-label { margin-bottom:3px; }
.das-host-config-grid .form-input,.das-host-config-grid .form-select { min-height:30px; height:30px; }
.das-host-config-actions { margin-top:9px; padding-top:9px; }
.das-channel-card { padding:10px 12px; }
.das-channel-card > div:first-child { margin-bottom:8px!important; }
.das-channel-field-grid { gap:7px 10px; }
.das-channel-field-grid .form-label { margin-bottom:3px; }
.das-channel-field-grid .form-input,.das-channel-field-grid .form-select { min-height:30px; height:30px; }
.das-switch { min-height:30px; }
.das-channel-range-action > div { display:flex; align-items:center; gap:8px; min-height:30px; }
.das-channel-range-summary { color:#71807d; font-size:10px; white-space:nowrap; }
.das-range-modal-tip { margin-bottom:12px; padding:9px 10px; color:#52635f; background:#f4f8f7; border-radius:6px; font-size:11px; }
.das-range-list { display:flex; flex-direction:column; gap:8px; max-height:300px; overflow-y:auto; }
.das-range-row { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto; align-items:center; gap:8px; }
.das-range-row > span { color:#71807d; font-size:11px; }
.das-range-add { margin-top:10px; }
@media(min-width:1201px){.das-host-config-grid{grid-template-columns:repeat(6,minmax(0,1fr));}}

/* ---------- DAS 主机配置：派光平台 Web 设计规范 v1.1 ---------- */
.page-config-das .card {
  border-color: #e4eaee;
  border-radius: 7px;
  box-shadow: 0 2px 10px rgba(27, 53, 68, .06);
}
.page-config-das .btn {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 4px;
  font-size: 14px;
}
.page-config-das .btn-primary {
  color: #fff;
  background: #177d70;
  border-color: #177d70;
}
.page-config-das .btn-primary:hover {
  color: #fff;
  background: #1c9483;
  border-color: #1c9483;
}
.page-config-das .device-config-ipc-card {
  margin-bottom: 16px;
}
.page-config-das .device-config-ipc-card .card-body {
  padding: 12px 14px;
}
.page-config-das .device-config-ipc-card .ipc-config-grid {
  grid-template-columns: repeat(2, minmax(220px, 320px));
  gap: 12px 24px;
}
.page-config-das .device-config-ipc-card .form-label {
  margin-bottom: 4px;
  color: #5f6b73;
  font-size: 12px;
  line-height: 20px;
}
.page-config-das .device-config-ipc-card .form-input,
.page-config-das .device-config-ipc-card .form-select {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border-color: #e4eaee;
  border-radius: 4px;
  font-size: 14px;
}
.page-config-das .das-host-config-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
}
.page-config-das .das-host-config-grid .form-label,
.page-config-das .das-channel-field-grid .form-label {
  margin-bottom: 4px;
  color: #5f6b73;
  font-size: 12px;
  line-height: 20px;
}
.page-config-das .das-host-config-grid .form-input,
.page-config-das .das-host-config-grid .form-select,
.page-config-das .das-channel-field-grid .form-input,
.page-config-das .das-channel-field-grid .form-select {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border-color: #e4eaee;
  border-radius: 4px;
  font-size: 14px;
}
.page-config-das .das-channel-card {
  background: #fff;
  border-color: #e4eaee;
  border-radius: 7px;
}
.page-config-das .das-system-readonly .form-input,
.page-config-das .das-system-readonly .form-input[readonly] {
  color: #65747d;
  background: #eef2f4;
  border-color: #d7e0e5;
  cursor: not-allowed;
}
.page-config-das .das-system-readonly .das-config-input-unit span {
  color: #788791;
  background: #eef2f4;
  border-color: #d7e0e5;
}
.page-config-das .das-readonly-badge {
  color: #65747d;
  background: #eef2f4;
  border-radius: 3px;
  font-size: 10px;
}
.page-config-das .das-label-with-info {
  display: flex;
  align-items: center;
  gap: 5px;
  width: max-content;
}
.page-config-das .das-info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: #4389cc;
  border: 1px solid #8ab4d8;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  cursor: help;
}
.page-config-das .das-info-tip:focus-visible {
  outline: 2px solid rgba(23, 125, 112, .18);
  outline-offset: 2px;
}
.page-config-das .das-info-tip-content {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 10;
  width: 260px;
  padding: 8px 10px;
  color: #fff;
  background: #26333c;
  border-radius: 4px;
  box-shadow: 0 6px 16px rgba(23, 36, 46, .16);
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
.page-config-das .das-info-tip:hover .das-info-tip-content,
.page-config-das .das-info-tip:focus .das-info-tip-content {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.page-config-report .das-label-with-info {
  display: flex;
  align-items: center;
  gap: 5px;
  width: max-content;
}
.page-config-report .das-info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: #4389cc;
  border: 1px solid #8ab4d8;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  cursor: help;
}
.page-config-report .das-info-tip:focus-visible {
  outline: 2px solid rgba(23, 125, 112, .18);
  outline-offset: 2px;
}
.page-config-report .das-info-tip-content {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 10;
  width: 300px;
  padding: 8px 10px;
  color: #fff;
  background: #26333c;
  border-radius: 4px;
  box-shadow: 0 6px 16px rgba(23, 36, 46, .16);
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
.page-config-report .das-info-tip:hover .das-info-tip-content,
.page-config-report .das-info-tip:focus .das-info-tip-content {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.page-config-report .retry-interval-control > .config-unit {
  display: flex;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 0 9px;
  color: #5f6b73;
  background: #f3f6f8;
  border: 1px solid #e4eaee;
  border-left: 0;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
  line-height: 30px;
  white-space: nowrap;
}
.page-config-das .das-file-config-card .card-body {
  padding: 12px 14px;
}
.page-config-das .das-file-config-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(300px, 1fr);
  align-items: end;
  gap: 12px 24px;
}
.page-config-das .das-file-config-grid .form-group {
  margin-bottom: 0;
}
.page-config-das .das-file-config-grid .form-label {
  margin-bottom: 4px;
  color: #5f6b73;
  font-size: 12px;
  line-height: 20px;
}
.page-config-das .das-file-config-grid .form-input {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border-color: #e4eaee;
  border-radius: 4px;
  font-size: 14px;
}
.page-config-das .das-file-name-example {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px;
  color: #6b7881;
  background: #f8fafb;
  border: 1px solid #e4eaee;
  border-radius: 4px;
  font-size: 12px;
}
.page-config-das .das-file-name-example code {
  color: #26333c;
  background: transparent;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
}
.page-config-das .das-switch {
  min-height: 32px;
}
.page-config-das .das-switch input:checked + span {
  background: #177d70;
}
.page-config-das .das-switch input:focus-visible + span {
  outline: 2px solid rgba(23, 125, 112, .16);
  outline-offset: 2px;
}
@media (max-width: 1200px) {
  .page-config-das .das-host-config-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .page-config-das .das-host-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .page-config-das .device-config-ipc-card .ipc-config-grid { grid-template-columns: minmax(0, 1fr); }
  .page-config-das .das-host-config-grid { grid-template-columns: minmax(0, 1fr); }
  .page-config-das .das-file-config-grid { grid-template-columns: minmax(0, 1fr); }
  .page-config-das .das-file-name-example { align-items: flex-start; flex-direction: column; gap: 2px; }
  .page-config-das .das-file-name-example code { overflow-wrap: anywhere; }
}
@media(max-width:700px){.das-range-row{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.das-range-row .btn{grid-column:1/-1;justify-self:end}}
/* ---------- 工控机配置 ---------- */
.page-config-ipc { --primary:#0f766e; --primary-hover:#0b625b; --primary-bg:#e9f5f3; --border:#dfe7e5; color:#17211f; }
.ipc-config-card { margin-bottom:12px; border:1px solid #dfe7e5; border-radius:8px; box-shadow:0 1px 3px rgba(19,43,39,.05); }
.ipc-config-card:last-child { margin-bottom:0; }
.ipc-config-card .card-header { min-height:44px; padding:10px 14px; color:#173c37; background:#fbfcfc; border-bottom-color:#dfe7e5; font-size:13px; }
.ipc-config-card .card-body { padding:12px 14px; }
.ipc-config-hint { color:#71807d; font-size:10px; font-weight:400; }
.ipc-config-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px 12px; }
.ipc-config-grid-compact { grid-template-columns:repeat(2,minmax(220px,320px)); gap:12px 24px; }
.ipc-config-grid .form-group { min-width:0; margin-bottom:0; }
.ipc-config-grid .form-label { margin-bottom:4px; color:#60716d; font-size:11px; }
.ipc-config-grid .form-input,.ipc-config-grid .form-select { min-width:0; min-height:32px; height:32px; border-radius:6px; }
.ipc-config-wide { grid-column:span 2; }
.ipc-config-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; padding-top:12px; border-top:1px solid var(--border); }
@media(max-width:1100px){.ipc-config-grid{grid-template-columns:repeat(3,minmax(0,1fr));}.ipc-config-grid-compact{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:800px){.ipc-config-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.ipc-config-grid-compact{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:520px){.ipc-config-grid{grid-template-columns:minmax(0,1fr)}.ipc-config-wide{grid-column:auto}.ipc-config-actions{flex-direction:column}.ipc-config-actions .btn{width:100%}}
/* ---------- 算法配置 ---------- */
.page-config-algorithm { color:#26333c; font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif; font-size:14px; line-height:22px; }
.page-config-algorithm .algorithm-config-card { border-color:#e4eaee; border-radius:7px; box-shadow:0 2px 10px rgba(27,53,68,.06); }
.page-config-algorithm .algorithm-config-card > .card-body { padding:12px; }
.algorithm-config-layout { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.algorithm-config-section { min-width:0; padding:14px 16px; border:1px solid #e4eaee; border-radius:7px; background:#fff; }
.algorithm-config-section-wide,.algorithm-config-actions { grid-column:1 / -1; }
.algorithm-config-section-title { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:24px; margin-bottom:12px; color:#26333c; font-size:14px; font-weight:600; }
.algorithm-config-section-title small { color:#788791; font-size:12px; font-weight:400; }
.algorithm-config-fields { display:grid; grid-template-columns:1fr; gap:12px 16px; }
.algorithm-config-fields.cols-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.algorithm-config-fields .form-group { min-width:0; margin-bottom:0; }
.algorithm-config-fields .form-label { margin-bottom:4px; color:#5f6b73; font-size:12px; line-height:20px; }
.algorithm-config-fields .form-input { width:100%; height:32px; min-height:32px; border-color:#e4eaee; border-radius:4px; font-size:14px; }
.algorithm-config-toggle { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:54px; padding:8px 10px; border:1px solid #e4eaee; border-radius:4px; background:#f8fafb; }
.algorithm-config-toggle strong { color:#26333c; font-size:14px; font-weight:500; }
.algorithm-config-actions { display:flex; justify-content:flex-end; padding-top:4px; }
.page-config-algorithm .btn { display:inline-flex; align-items:center; justify-content:center; height:36px; min-height:36px; padding:0 16px; border-radius:4px; font-family:inherit; font-size:14px; font-weight:400; line-height:22px; box-shadow:none; }
.page-config-algorithm .btn-primary { color:#fff; background:#177d70; border:1px solid #177d70; }
.page-config-algorithm .btn-primary:hover { color:#fff; background:#1c9483; border-color:#1c9483; }
.page-config-algorithm .btn-primary:focus-visible { outline:none; box-shadow:0 0 0 2px rgba(23,125,112,.16); }
.page-config-algorithm .btn-primary:active { background:#12695f; border-color:#12695f; }
@media(max-width:1000px){.algorithm-config-layout{grid-template-columns:1fr}.algorithm-config-section-wide,.algorithm-config-actions{grid-column:auto}}
@media(max-width:640px){.algorithm-config-fields.cols-2{grid-template-columns:1fr}.algorithm-config-section-title{align-items:flex-start;flex-direction:column;gap:2px}}
/* ---------- 报警类型配置 ---------- */
.page-alarm-types { color:#26333c; font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif; font-size:14px; line-height:22px; }
.page-alarm-types .alarm-type-config-card { border-color:#e4eaee; border-radius:7px; box-shadow:0 2px 10px rgba(27,53,68,.06); }
.page-alarm-types .alarm-type-config-table th { height:42px; color:#5f6b73; background:#f8fafb; font-size:12px; font-weight:600; }
.page-alarm-types .alarm-type-config-table td { height:46px; font-size:14px; }
.page-alarm-types .alarm-type-config-table .form-input { height:32px; min-height:32px; border-color:#e4eaee; border-radius:4px; font-family:inherit; font-size:14px; }
.alarm-type-config-actions { display:flex; justify-content:flex-end; margin-top:16px; padding-top:12px; border-top:1px solid #e4eaee; }
.page-alarm-types .alarm-type-config-actions .btn { display:inline-flex; align-items:center; justify-content:center; height:36px; min-height:36px; padding:0 16px; border-radius:4px; font-family:inherit; font-size:14px; font-weight:400; line-height:22px; box-shadow:none; }
.page-alarm-types .alarm-type-config-actions .btn-primary { color:#fff; background:#177d70; border:1px solid #177d70; }
.page-alarm-types .alarm-type-config-actions .btn-primary:hover { color:#fff; background:#1c9483; border-color:#1c9483; }
.page-alarm-types .alarm-type-config-actions .btn-primary:focus-visible { outline:none; box-shadow:0 0 0 2px rgba(23,125,112,.16); }
.page-alarm-types .alarm-type-config-actions .btn-primary:active { background:#12695f; border-color:#12695f; }
.report-config-card > .card-body { padding: 12px; }
.report-config-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.report-config-section { border: 1px solid var(--border); border-radius: 6px; background: var(--bg-page); padding: 10px 12px; min-width: 0; }
.report-config-section.full, .report-config-actions { grid-column: 1 / -1; }
.report-config-section-title { display: flex; align-items: center; justify-content: space-between; min-height: 24px; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.report-config-fields { display: grid; grid-template-columns: 1fr; gap: 8px; }
.report-config-fields.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-config-fields.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.report-config-fields.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.report-config-section .form-group { margin-bottom: 0; min-width: 0; }
.report-config-section .form-label { margin-bottom: 4px; font-size: 12px; }
.report-config-section .form-input, .report-config-section .form-select { height: 34px; }
.report-config-toggle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.report-config-toggle-grid > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.report-config-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 2px; }
@media (max-width: 1000px) {
.report-config-layout { grid-template-columns: 1fr; }
.report-config-section.full, .report-config-actions { grid-column: auto; }
.report-config-fields.cols-3, .report-config-fields.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =================================================================
   全系统组件统一：数据定标 / 数据分析视觉基准 + 派光平台 Web v1.1
   图表、瀑布图和信号颜色保留业务语义，仅统一外围组件。
   ================================================================= */
.content-area {
  color: #26333c;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  line-height: 22px;
}
.content-area .card,
.content-area .stat-card,
.content-area .filter-bar,
.content-area .self-check-summary,
.content-area .dashboard-product-bar {
  background: #fff;
  border: 1px solid #e4eaee;
  border-radius: 7px;
  box-shadow: 0 2px 10px rgba(27,53,68,.06);
}
.content-area .card-header {
  min-height: 44px;
  padding: 10px 14px;
  color: #26333c;
  background: #fbfcfc;
  border-bottom: 1px solid #e4eaee;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
}
.content-area .card-body { padding: 14px; }
.content-area .card-footer {
  padding: 10px 14px;
  border-top-color: #e4eaee;
}
.content-area .page-title {
  margin-bottom: 16px;
  color: #26333c;
  font-size: 20px;
  line-height: 28px;
}
.content-area .form-group { margin-bottom: 12px; }
.content-area .form-label,
.content-area label > span:first-child {
  margin-bottom: 4px;
  color: #5f6b73;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
}
.content-area .form-input,
.content-area .form-select,
.content-area .form-textarea,
.content-area input[type="text"],
.content-area input[type="number"],
.content-area input[type="date"],
.content-area input[type="datetime-local"],
.content-area select,
.content-area textarea {
  min-height: 32px;
  padding: 4px 10px;
  color: #26333c;
  background: #fff;
  border: 1px solid #e4eaee;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  line-height: 22px;
}
.content-area .form-textarea,
.content-area textarea { min-height: 80px; }
.content-area input[type="checkbox"],
.content-area input[type="radio"],
.content-area input[type="range"] { accent-color: #177d70; }
.content-area .form-input:hover,
.content-area .form-select:hover,
.content-area .form-textarea:hover,
.content-area input:hover,
.content-area select:hover,
.content-area textarea:hover { border-color: #9fc7c1; }
.content-area .form-input:focus,
.content-area .form-select:focus,
.content-area .form-textarea:focus,
.content-area input:focus,
.content-area select:focus,
.content-area textarea:focus {
  outline: none;
  border-color: #177d70;
  box-shadow: 0 0 0 2px rgba(23,125,112,.10);
}
.content-area input:disabled,
.content-area select:disabled,
.content-area textarea:disabled,
.content-area input[readonly],
.content-area textarea[readonly] {
  color: #65747d;
  background: #eef2f4;
  border-color: #d7e0e5;
  cursor: not-allowed;
  box-shadow: none;
}
.content-area .form-hint,
.content-area small { color: #788791; font-size: 12px; line-height: 20px; }
.content-area .btn {
  min-height: 36px;
  padding: 0 16px;
  justify-content: center;
  color: #26333c;
  background: #fff;
  border: 1px solid #d7e0e5;
  border-radius: 4px;
  box-shadow: none;
  font-family: inherit;
  font-size: 14px !important;
  font-weight: 400;
  line-height: 22px;
}
.content-area .btn:hover {
  color: #177d70;
  background: #fff;
  border-color: #177d70;
}
.content-area .btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(23,125,112,.16);
}
.content-area .btn:active { background: #eaf5f3; }
.content-area .btn-primary,
.content-area .btn-success {
  color: #fff;
  background: #177d70;
  border-color: #177d70;
}
.content-area .btn-primary:hover,
.content-area .btn-success:hover {
  color: #fff;
  background: #1c9483;
  border-color: #1c9483;
}
.content-area .btn-danger { color: #fff; background: #dc5b57; border-color: #dc5b57; }
.content-area .btn-danger:hover { color: #fff; background: #c94b47; border-color: #c94b47; }
.content-area .btn-warning { color: #fff; background: #e7a13b; border-color: #e7a13b; }
.content-area .btn-link {
  min-height: 28px;
  padding: 0 8px;
  color: #177d70;
  background: transparent;
  border-color: transparent;
}
.content-area .btn-link:hover { color: #1c9483; background: #eaf5f3; border-color: transparent; }
.content-area .btn-sm {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 12px !important;
}
.content-area .btn-lg { min-height: 40px; padding: 0 20px; font-size: 14px !important; }
.content-area .btn:disabled,
.content-area .btn[disabled] {
  color: #aab5bc;
  background: #f3f6f8;
  border-color: #e4eaee;
  cursor: not-allowed;
}
.content-area .table-wrap { overflow-x: auto; border-radius: 4px; }
.content-area table th {
  height: 42px;
  padding: 8px 12px;
  color: #5f6b73;
  background: #f8fafb;
  border-bottom: 1px solid #e4eaee;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}
.content-area table td {
  min-height: 46px;
  padding: 10px 12px;
  color: #26333c;
  border-bottom: 1px solid #e4eaee;
  font-size: 13px;
  line-height: 22px;
}
.content-area table tbody tr:hover,
.content-area table tbody tr:hover td { background: #f4f9f8; }
.content-area .filter-bar {
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
}
.content-area .tabs {
  min-height: 42px;
  margin-bottom: 16px;
  border-bottom-color: #e4eaee;
}
.content-area .tab {
  min-height: 42px;
  padding: 8px 16px;
  color: #5f6b73;
  font-size: 14px;
}
.content-area .tab:hover,
.content-area .tab.active { color: #177d70; }
.content-area .tab.active { border-bottom-color: #177d70; font-weight: 600; }
.content-area .tag {
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
}
.content-area .tag-success { color: #12695f; background: #e3f3f0; }
.content-area .tag-info { color: #2f6c9f; background: #e7f1fa; }
.content-area .tag-warning { color: #9a6416; background: #fff2d8; }
.content-area .tag-error { color: #a43e3b; background: #fde9e8; }
.content-area .tag-default { color: #65747d; background: #eef2f4; }
.content-area .pagination button {
  min-width: 32px;
  height: 32px;
  color: #5f6b73;
  background: #fff;
  border-color: #e4eaee;
  border-radius: 4px;
}

/* ---------- 2026-08-20 业务页面优化 ---------- */
.dashboard-shared-filter {
  min-height: 44px;
  margin-bottom: 12px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: #5f6b73;
  background: #fff;
  border: 1px solid #e4eaee;
  border-radius: 7px;
  box-shadow: 0 2px 10px rgba(27,53,68,.06);
  font-size: 13px;
}
.dashboard-shared-filter label { margin: 0; color: #26333c; font-weight: 600; }
.dashboard-shared-filter .form-select { width: 112px; min-width: 112px; }
.dashboard-shared-filter > span { color: #788791; font-size: 12px; }
.dashboard-service-status-card code { color: #52635f; font-family: Consolas, monospace; font-size: 12px; }
.dashboard-offline-summary { display: flex; align-items: center; gap: 16px; min-width: 0; }
.dashboard-offline-metric { min-width: 64px; }
.dashboard-offline-metric .stat-label { margin-top: 0; white-space: nowrap; }
.dashboard-offline-divider { width: 1px; height: 36px; flex: 0 0 1px; background: #e4eaee; }
.alarm-chart-meta { margin-left: auto; color: #788791; font-size: 12px; font-weight: 400; }
.alarm-waterfall-body,
.alarm-combined-body { min-height: 220px; padding: 14px !important; }
.alarm-waterfall-chart,
.alarm-combined-chart {
  position: relative;
  width: 100%;
  height: 192px;
  overflow: hidden;
  background: #f8fbfb;
  border: 1px solid #e4eaee;
  border-radius: 4px;
}
.alarm-waterfall-chart svg { display: block; width: 100%; height: 100%; }
.alarm-waterfall-y-label,
.alarm-waterfall-x-label,
.alarm-waterfall-cursor {
  position: absolute;
  color: #788791;
  font-size: 11px;
  line-height: 18px;
  pointer-events: none;
}
.alarm-waterfall-y-label { top: 4px; left: 6px; }
.alarm-waterfall-x-label { right: 6px; bottom: 2px; }
.alarm-waterfall-cursor { top: 4px; left: calc(51% + 6px); color: #a43e3b; }
.alarm-combined-chart {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.alarm-combined-pane {
  position: relative;
  min-height: 0;
  overflow: hidden;
}
.alarm-combined-spectrogram { border-top: 1px solid #dce7e5; }
.alarm-combined-pane svg { display: block; width: 100%; height: 100%; }
.alarm-combined-pane-label {
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 6px;
  padding: 1px 5px;
  color: #536762;
  background: rgba(248, 251, 251, .86);
  border-radius: 3px;
  font-size: 11px;
  line-height: 16px;
  pointer-events: none;
}
.alarm-combined-cursor-line {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 51%;
  border-left: 1px dashed #dc5b57;
  pointer-events: none;
}
.alarm-combined-cursor,
.alarm-combined-x-label {
  position: absolute;
  z-index: 4;
  color: #788791;
  font-size: 11px;
  line-height: 18px;
  pointer-events: none;
}
.alarm-combined-cursor { top: 4px; left: calc(51% + 6px); color: #a43e3b; }
.alarm-combined-x-label { right: 6px; bottom: 2px; }
.alarm-media-body { min-height: 220px; padding: 10px !important; display: flex; align-items: center; }
.alarm-media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #17242e;
  border: 1px solid #d7e0e5;
  border-radius: 4px;
}
.alarm-media-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.alarm-detection-box {
  position: absolute;
  top: 35%;
  left: 45%;
  width: 11%;
  height: 30%;
  border: 2px solid #dc5b57;
  box-shadow: 0 0 0 1px rgba(255,255,255,.35);
}
.alarm-detection-box small {
  position: absolute;
  top: -22px;
  left: -2px;
  padding: 1px 5px;
  color: #fff;
  background: #dc5b57;
  border-radius: 3px 3px 3px 0;
  font-size: 11px;
  line-height: 18px;
  white-space: nowrap;
}
.alarm-media-time {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 1px 5px;
  color: #fff;
  background: rgba(23,36,46,.72);
  border-radius: 3px;
  font-family: Consolas, monospace;
  font-size: 11px;
  line-height: 18px;
}
.alarm-video-frame { cursor: pointer; }
.alarm-video-frame:focus-visible { outline: 2px solid #177d70; outline-offset: 2px; }
.alarm-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  color: #fff;
  background: rgba(23,125,112,.88);
  border: 2px solid rgba(255,255,255,.88);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(23,36,46,.28);
  font-size: 16px;
  transform: translate(-50%, -50%);
}
.alarm-detail-toolbar {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.alarm-detail-heading { display: flex; align-items: center; gap: 16px; min-width: 0; }
.alarm-detail-heading a { color: var(--primary); text-decoration: none; white-space: nowrap; }
.alarm-detail-heading span { overflow: hidden; color: var(--text-primary); font-size: 18px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.alarm-detail-switcher { display: flex; align-items: center; gap: 8px; }
.alarm-detail-switcher > span { min-width: 46px; color: #788791; font-size: 12px; text-align: center; white-space: nowrap; }
.alarm-detail-switcher .btn:disabled { color: #a8b2b0; background: #f4f6f5; border-color: #e2e7e6; cursor: not-allowed; }
.alarm-image-trigger { cursor: zoom-in; }
.alarm-image-trigger::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: border-color .16s ease, background .16s ease;
  pointer-events: none;
}
.alarm-image-trigger:hover::after,
.alarm-image-trigger:focus-visible::after { background: rgba(15,118,110,.06); border-color: #0f766e; }
.alarm-image-trigger:focus-visible { outline: 2px solid rgba(15,118,110,.25); outline-offset: 2px; }
.alarm-image-zoom-hint {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 7px;
  color: #fff;
  background: rgba(18,45,42,.76);
  border-radius: 3px;
  font-size: 11px;
  pointer-events: none;
}
body.alarm-viewer-open { overflow: hidden; }
.alarm-image-viewer[hidden] { display: none; }
.alarm-image-viewer {
  position: fixed;
  z-index: 1300;
  inset: 0;
  padding: 28px;
  display: grid;
  place-items: center;
  background: rgba(10,22,29,.76);
  backdrop-filter: blur(3px);
}
.alarm-viewer-dialog {
  width: min(1120px, 94vw);
  max-height: 92vh;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9e3e1;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(8,25,31,.32);
}
.alarm-viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.alarm-viewer-header > div { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.alarm-viewer-header strong { overflow: hidden; color: #173c37; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.alarm-viewer-header span { color: #788791; font-size: 12px; white-space: nowrap; }
.alarm-viewer-close {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: #52635f;
  background: #f5f8f7;
  border: 1px solid #dbe5e2;
  border-radius: 6px;
  cursor: pointer;
  font-size: 24px;
  line-height: 28px;
}
.alarm-viewer-close:hover { color: #fff; background: #0f766e; border-color: #0f766e; }
.alarm-viewer-stage { min-height: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; gap: 12px; }
.alarm-viewer-stage figure { min-width: 0; margin: 0; overflow: hidden; background: #111d24; border-radius: 6px; }
.alarm-viewer-stage figure img { width: 100%; height: min(58vh, 620px); display: block; object-fit: cover; }
.alarm-viewer-stage figcaption { padding: 8px 12px; color: #dfe8e6; background: #15272e; font-size: 12px; text-align: center; }
.alarm-viewer-arrow {
  width: 44px;
  height: 44px;
  color: #0f766e;
  background: #eef7f5;
  border: 1px solid #c7ded9;
  border-radius: 50%;
  cursor: pointer;
  font-size: 32px;
  line-height: 34px;
}
.alarm-viewer-arrow:hover { color: #fff; background: #0f766e; border-color: #0f766e; }
.alarm-viewer-thumbnails { display: flex; justify-content: center; gap: 10px; overflow-x: auto; padding: 2px; }
.alarm-viewer-thumb {
  width: 132px;
  flex: 0 0 132px;
  padding: 4px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1px 7px;
  align-items: center;
  color: #52635f;
  background: #f7faf9;
  border: 1px solid #dfe7e5;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}
.alarm-viewer-thumb img { width: 48px; height: 40px; grid-row: 1 / 3; object-fit: cover; border-radius: 3px; }
.alarm-viewer-thumb span { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.alarm-viewer-thumb small { color: #84918e; font-size: 10px; }
.alarm-viewer-thumb.active { color: #0f766e; background: #e9f5f3; border-color: #83bfb6; box-shadow: 0 0 0 1px rgba(15,118,110,.08); }
.alarm-viewer-help { color: #84918e; font-size: 11px; text-align: center; }
@media (max-width: 760px) {
  .alarm-detail-toolbar { align-items: stretch; flex-direction: column; }
  .alarm-detail-switcher { justify-content: flex-end; }
  .alarm-image-viewer { padding: 12px; }
  .alarm-viewer-dialog { width: 100%; padding: 12px; }
  .alarm-viewer-stage { grid-template-columns: 38px minmax(0, 1fr) 38px; gap: 6px; }
  .alarm-viewer-arrow { width: 36px; height: 36px; font-size: 26px; }
  .alarm-viewer-stage figure img { height: 48vh; }
}
.page-alarm-list .alarm-list-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.alarm-filter-date-range {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.alarm-filter-date-range label { margin: 0; color: #5f6b73; font-size: 13px; }
.alarm-filter-date-range .form-input { width: 176px; min-width: 176px; }
.alarm-filter-date-range > span { color: #788791; font-size: 12px; }
.page-alarm-list .alarm-list-filter-bar > .form-select { min-width: 116px; }
.alarm-filter-divider { width: 1px; height: 24px; margin: 0 2px; background: #e4eaee; }
.alarm-list-table { min-width: 1050px; table-layout: fixed; }
.page-alarm-list .alarm-list-table th,
.page-alarm-list .alarm-list-table td { padding-right: 8px; padding-left: 8px; white-space: nowrap; }
.alarm-list-table th:nth-child(1) { width: 70px; }
.alarm-list-table th:nth-child(2) { width: 132px; }
.alarm-list-table th:nth-child(3) { width: 62px; }
.alarm-list-table th:nth-child(4) { width: 72px; }
.alarm-list-table th:nth-child(5) { width: 88px; }
.alarm-list-table th:nth-child(6) { width: 82px; }
.alarm-list-table th:nth-child(7) { width: 70px; }
.alarm-list-table th:nth-child(8),
.alarm-list-table th:nth-child(9) { width: 86px; }
.alarm-list-table th:nth-child(10) { width: 108px; }
.alarm-list-table th:nth-child(11) { width: 64px; }
.alarm-list-table th:last-child,
.alarm-list-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -6px 0 10px -10px rgba(23,36,46,.55);
}
.alarm-list-table th:last-child { z-index: 4; background: #f8fafb; }
.alarm-list-table tbody tr:hover td:last-child { background: #f4f9f8; }
.alarm-frame-type {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 8px;
  color: #12695f;
  background: #eaf5f3;
  border: 1px solid #cfe6e2;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.camera-map-sort {
  min-height: 28px;
  padding: 0 8px;
  color: #52635f;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
}
.camera-map-sort:hover,
.camera-map-sort:focus-visible { color: #177d70; background: #eaf5f3; outline: none; }

@media (min-width: 1360px) {
  .page-alarm-list .alarm-list-filter-bar { flex-wrap: nowrap; }
}
@media (max-width: 1100px) {
  .dashboard-shared-filter { justify-content: flex-start; flex-wrap: wrap; }
  .dashboard-shared-filter > span { flex-basis: 100%; }
}
.content-area .pagination button:hover { color: #177d70; border-color: #177d70; }
.content-area .pagination button.active { color: #fff; background: #177d70; border-color: #177d70; }
.content-area .detail-section h3 {
  color: #26333c;
  border-bottom-color: #e4eaee;
  font-size: 14px;
  line-height: 22px;
}
.content-area .detail-row { color: #26333c; font-size: 14px; line-height: 22px; }
.content-area .detail-label { color: #788791; }
.content-area .empty-state { padding: 40px 20px; color: #788791; }
.content-area .empty-state-icon { font-size: 40px; }
.content-area .progress-bar { height: 8px; background: #eef2f4; border-radius: 4px; }
.content-area .progress-fill.green,
.content-area .progress-fill.blue { background: #177d70; }
.content-area .stat-grid { gap: 12px; margin-bottom: 16px; }
.content-area .stat-card { padding: 14px 16px; gap: 12px; }
.content-area .stat-card:hover { box-shadow: 0 6px 18px rgba(27,53,68,.09); }
.content-area .stat-icon { width: 42px; height: 42px; border-radius: 7px; font-size: 20px; }
.content-area .stat-value { color: #26333c; font-size: 24px; line-height: 32px; }
.content-area .stat-label { color: #788791; font-size: 12px; line-height: 20px; }
.content-area .report-config-section,
.content-area .algorithm-config-section {
  background: #f8fafb;
  border-color: #e4eaee;
  border-radius: 7px;
}
.content-area .report-config-section-title,
.content-area .algorithm-config-section-title {
  color: #26333c;
  font-size: 14px;
  line-height: 22px;
}
.content-area .report-config-section .form-input,
.content-area .report-config-section .form-select { height: 32px; }
.content-area .calib-switch input:checked + .calib-switch-track,
.content-area .das-switch input:checked + span { background: #177d70; }
.modal-overlay { background: rgba(17,27,34,.45); }
.modal-container {
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(23,36,46,.18);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}
.modal-header {
  min-height: 52px;
  padding: 14px 18px;
  color: #26333c;
  border-bottom-color: #e4eaee;
  font-size: 16px;
  line-height: 24px;
}
.modal-body { padding: 16px 18px; }
.modal-footer { padding: 12px 18px; border-top: 1px solid #e4eaee; }
.modal-close { color: #788791; border-radius: 4px; }
.modal-close:hover { color: #26333c; background: #eef2f4; }
.toast {
  color: #26333c;
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(23,36,46,.14);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
}
.top-header {
  min-height: 56px;
  color: #26333c;
  border-bottom-color: #e4eaee;
}
.breadcrumb { font-size: 16px; font-weight: 600; }
.status-badge { border-radius: 4px; }
.status-badge.green { color: #12695f; background: #e3f3f0; }
.nav-item {
  min-height: 38px;
  margin: 2px 8px;
  padding: 8px 11px;
  border-radius: 4px;
}
.nav-item.active { background: #177d70; }
.nav-item:hover { background: #21323e; }
.nav-group-title { padding: 12px 12px 6px; font-size: 11px; letter-spacing: .5px; }

@media (max-width: 1024px) {
  .content-area { padding: 16px; }
  .content-area .grid-3,
  .content-area .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-area .report-config-fields.cols-3,
  .content-area .report-config-fields.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .content-area .grid-2,
  .content-area .grid-3,
  .content-area .grid-4,
  .content-area .form-row,
  .content-area .report-config-fields.cols-2,
  .content-area .report-config-fields.cols-3,
  .content-area .report-config-fields.cols-4 { grid-template-columns: minmax(0, 1fr); }
  .modal-container { width: calc(100vw - 24px); min-width: 0; }
}

/* 设备配置：舒适密度，低高度屏幕自动紧凑 */
.content-area.page-config-das {
  padding: 12px 20px 16px;
}
.page-config-das > .card {
  margin-bottom: 12px;
}
.page-config-das > .card:last-child {
  margin-bottom: 0;
}
.page-config-das .card-header {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 22px;
}
.page-config-das .card-body,
.page-config-das .device-config-ipc-card .card-body,
.page-config-das .das-file-config-card .card-body {
  padding: 12px 14px;
}
.page-config-das .device-config-ipc-card {
  margin-bottom: 12px;
}
.page-config-das .device-config-ipc-card .ipc-config-grid {
  gap: 10px 24px;
}
.page-config-das .form-group {
  margin-bottom: 0;
}
.page-config-das .das-host-config-grid {
  gap: 10px 16px;
}
.page-config-das .das-file-config-grid {
  gap: 10px 24px;
}
.page-config-das .das-channel-grid {
  gap: 12px;
  margin-bottom: 0;
}
.page-config-das .das-channel-card {
  padding: 12px;
}
.page-config-das .das-channel-card > div:first-child {
  margin-bottom: 10px !important;
}
.page-config-das .das-channel-field-grid {
  gap: 8px 12px;
}
.page-config-das .das-host-config-grid .form-label,
.page-config-das .das-channel-field-grid .form-label,
.page-config-das .device-config-ipc-card .form-label,
.page-config-das .das-file-config-grid .form-label {
  margin-bottom: 4px;
  line-height: 20px;
}
.page-config-das .das-switch {
  min-height: 30px;
}
.page-config-das .device-config-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e4eaee;
}
@media (min-width: 901px) {
  .page-config-das .das-host-config-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .page-config-das .das-channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-height: 760px) and (min-width: 901px) {
  .content-area.page-config-das { padding: 8px 16px; }
  .page-config-das > .card,
  .page-config-das .device-config-ipc-card { margin-bottom: 4px; }
  .page-config-das .card-header { min-height: 32px; padding: 4px 14px; }
  .page-config-das .card-body,
  .page-config-das .device-config-ipc-card .card-body,
  .page-config-das .das-file-config-card .card-body { padding: 8px 14px; }
  .page-config-das .device-config-ipc-card .ipc-config-grid,
  .page-config-das .das-host-config-grid,
  .page-config-das .das-file-config-grid { row-gap: 6px; }
  .page-config-das .das-channel-grid { gap: 10px; }
  .page-config-das .das-channel-card { padding: 8px 10px; }
  .page-config-das .das-channel-card > div:first-child { margin-bottom: 6px !important; }
  .page-config-das .das-channel-field-grid { gap: 5px 10px; }
  .page-config-das .das-host-config-grid .form-label,
  .page-config-das .das-channel-field-grid .form-label,
  .page-config-das .device-config-ipc-card .form-label,
  .page-config-das .das-file-config-grid .form-label { margin-bottom: 2px; line-height: 18px; }
  .page-config-das .das-switch { min-height: 28px; }
  .page-config-das .device-config-actions { margin-top: 4px; padding-top: 4px; }
}
