:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --side: #1e293b;
  --side-2: #334155;
  --side-text: #cbd5e1;
  --side-active-bg: #e2e8f0;
  --side-active-text: #0f172a;
  --primary: #2563eb;
  --primary-d: #1d4ed8;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, "Segoe UI", "Microsoft YaHei", Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
a { color: var(--primary); text-decoration: none; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a, #2563eb); }
.login-card { background: #fff; padding: 32px 28px; border-radius: 12px; width: 340px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.login-card h1 { margin: 0 0 4px; font-size: 20px; }
.login-card .sub { color: var(--muted); margin-bottom: 20px; font-size: 13px; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; color: var(--muted); }
.field input { width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; outline: none; }
.field input:focus { border-color: var(--primary); }
.btn { width: 100%; padding: 11px; background: var(--primary); color: #fff; border: 0;
  border-radius: 8px; font-size: 15px; cursor: pointer; }
.btn:hover { background: var(--primary-d); }
.btn.sm { width: auto; padding: 6px 12px; font-size: 13px; border-radius: 6px; }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn.danger { background: var(--bad); }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 8px; }
.hint { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.7; }

/* ---------- 布局 ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 230px; background: var(--side); color: var(--side-text); flex: 0 0 230px;
  display: flex; flex-direction: column; }
.side .brand { padding: 18px 20px; color: #fff; font-size: 16px; font-weight: 600;
  border-bottom: 1px solid var(--side-2); }
.side nav { padding: 8px 0; flex: 1; overflow-y: auto; }
.side .menu-group { padding: 14px 20px 6px; font-size: 11px; font-weight: 600; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 1px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 10px 18px; margin: 0 10px;
  color: var(--side-text); cursor: pointer; border-radius: 6px; font-size: 14px; }
.side nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.side nav a.active { background: var(--side-active-bg); color: var(--side-active-text); font-weight: 600; }
.side .who { padding: 14px 20px; border-top: 1px solid var(--side-2); font-size: 13px; }
.side .who b { color: #fff; }
.main { flex: 1; padding: 22px 28px; overflow: auto; }
.page-title { font-size: 18px; margin: 0 0 16px; }

/* ---------- 卡片/表格 ---------- */
.cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; min-width: 160px; flex: 1; }
.card .k { color: var(--muted); font-size: 13px; }
.card .v { font-size: 26px; font-weight: 700; margin-top: 6px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
tr:hover td { background: #f8fafc; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; }
.badge.on { background: #dcfce7; color: var(--ok); }
.badge.off { background: #fee2e2; color: var(--bad); }
.badge.role { background: #e0e7ff; color: var(--primary-d); }
.badge.warn { background: #fef3c7; color: #92400e; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.toast { position: fixed; right: 20px; bottom: 20px; background: #111827; color: #fff;
  padding: 10px 16px; border-radius: 8px; opacity: 0; transition: .3s; pointer-events: none; }
.toast.show { opacity: .95; }

/* 设备详情 */
.detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.prop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.prop { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; }
.prop .pk { color: var(--muted); font-size: 12px; }
.prop .pv { font-size: 16px; font-weight: 600; margin-top: 3px; }
.prop.rw { border-color: var(--primary); background: #f5f8ff; }
.ctl { display: flex; gap: 6px; margin-top: 8px; }
.ctl select, .ctl input { flex: 1; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 6px; min-width: 0; }
.sec-title { font-size: 15px; margin: 18px 0 10px; font-weight: 600; }
.sec-row { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.sec-row .sec-title { margin: 0; }
.sec-row .muted { font-size: 12px; }

/* 实时曲线 */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.chart-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; }
.chart-card .ck { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.chart-card .ck-name { color: var(--muted); font-size: 12px; }
.chart-card .ck-val { font-size: 15px; font-weight: 700; }
.chart-card .spark { width: 100%; height: 90px; display: block; border-radius: 4px; }
#lastupd { font-size: 12px; }

/* 设备授权 */
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auth-grid .panel { margin-bottom: 0; }
.auth-list { max-height: 320px; overflow-y: auto; }
.auth-list-item { display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--line); }
.auth-list-item:last-child { border-bottom: none; }
.auth-list-item select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }

/* 物模型 */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.model-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; }
.model-card .id { font-size: 12px; color: var(--muted); }
.model-card .name { font-weight: 600; margin: 4px 0; }
.model-card .meta { font-size: 12px; color: var(--muted); }
.model-card .mode { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px;
  background: #e0e7ff; color: var(--primary-d); margin-top: 8px; }

/* 占位提示 */
.placeholder { display: flex; align-items: center; justify-content: center; min-height: 300px;
  color: var(--muted); font-size: 14px; }

/* 弹窗 */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: none;
  align-items: center; justify-content: center; z-index: 50; }
.modal-box { background: #fff; border-radius: 12px; padding: 22px 24px; width: 420px; max-width: 92vw;
  max-height: 88vh; overflow: auto; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-box h3 { margin: 0 0 14px; font-size: 16px; }
.modal-box .pw { color: var(--bad); font-family: monospace; font-size: 15px; }
.modal-close { position: absolute; top: 10px; right: 14px; cursor: pointer; color: var(--muted);
  font-size: 20px; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-box .row { margin-top: 12px; }

/* 设备授权：设备中心（单台设备 → 多个账号）*/
.auth-grid2 { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
.auth-grid2 .panel { margin-bottom: 0; }
.dev-list { max-height: 420px; overflow-y: auto; }
.dev-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px;
  cursor: pointer; background: #fff; }
.dev-item:hover { border-color: var(--primary); }
.dev-item.sel { background: #e0e7ff; border-color: var(--primary); }
.dev-item .dn { font-weight: 600; }
.dev-item .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* 设备绑定勾选 */
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 8px; cursor: pointer; }
.chk input { margin: 0; }

/* ---------- 用户管理页：仿青黄智催 ---------- */
.page-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.page-toolbar .page-title { margin: 0; }
.page-toolbar .toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-toolbar .search-input { width: 220px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; outline: none; }
.page-toolbar .search-input:focus { border-color: var(--primary); }
.page-toolbar .create-btn { width: auto; padding: 8px 16px; font-size: 14px; }
.page-toolbar .refresh-btn { width: auto; }
.page-toolbar .count-text { color: var(--muted); font-size: 13px; margin-left: 6px; }
.user-page-panel { padding: 0; overflow: hidden; }
.user-page-panel > .muted { padding: 14px 18px 0; margin: 0; }
.user-table { width: 100%; border-collapse: collapse; }
.user-table th { background: #f8fafc; color: var(--muted); font-weight: 600; font-size: 13px; padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.user-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.user-table tr:last-child td { border-bottom: none; }
.user-table .u-name { font-weight: 500; color: var(--text); }
.user-table .u-real { color: var(--muted); font-size: 12px; margin-top: 2px; }
.user-table td .badge { font-size: 12px; padding: 3px 10px; }
.user-table td a { color: var(--primary); cursor: pointer; font-size: 13px; margin-right: 12px; }
.user-table td a:hover { text-decoration: underline; }
.user-table td a.delete { color: var(--bad); }
.user-table td a.disable { color: var(--warn); }
.user-table td a.enable { color: var(--ok); }
.user-table .center { text-align: center; padding: 30px; }
.modal-box .field.required label::before { content: "*"; color: var(--bad); margin-right: 4px; }
.modal-box h3 { font-size: 16px; margin: 0 0 18px; }

/* ---------- 物模型管理（仿截图表格） ---------- */
.model-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.model-toolbar .left-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.model-toolbar .left-btns .btn { width: auto; }
.model-toolbar .right-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.model-toolbar .filter-select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; outline: none; min-width: 90px; }
.model-toolbar .filter-select:focus { border-color: var(--primary); }
.model-table { width: 100%; border-collapse: collapse; }
.model-table th { background: #f8fafc; color: var(--muted); font-weight: 600; font-size: 13px; padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.model-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13px; }
.model-table tr:hover td { background: #f8fafc; }
.model-table tr:last-child td { border-bottom: none; }
.model-table .tag { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; }
.model-table .tag.green { background: #dcfce7; color: var(--ok); }
.model-table .tag.orange { background: #ffedd5; color: #c2410c; }
.model-table .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #d1d5db; }
.model-table .dot.on { background: var(--ok); }
.model-table .dot.off { background: #e5e7eb; }
.model-table .rw-text { color: #c2410c; }
.model-table .r-text { color: var(--muted); }
.model-table .op-link { color: var(--primary); cursor: pointer; margin-right: 12px; font-size: 13px; }
.model-table .op-link:hover { text-decoration: underline; }
.model-table .op-link.delete { color: var(--muted); }
.model-table .op-link.delete:hover { color: var(--bad); }

/* ---------- 控制台总览（仿青黄智催截图） ---------- */
.dashboard-hw { padding-bottom: 12px; }
.hw-grid { display: grid; grid-template-columns: 240px 1fr; gap: 14px; align-items: stretch; }
.hw-subgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.hw-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #fff; }
.hw-card.disk-main { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hw-name { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.hw-big { font-size: 28px; font-weight: 700; color: var(--text); }
.hw-big .hw-unit { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.hw-value { font-size: 24px; font-weight: 700; color: var(--text); }
.hw-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.hw-row { font-size: 13px; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; }
.hw-row span { color: var(--text); font-weight: 500; }
.ring { position: relative; width: 72px; height: 72px; margin-top: 10px; }
.ring svg { transform: rotate(-90deg); }
.ring-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--primary); }
.progress { height: 6px; background: #e5e7eb; border-radius: 3px; margin-top: 10px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 3px; transition: width .3s; }

.dashboard-trend { padding-bottom: 14px; }
.trend-range { display: flex; gap: 6px; }
.trend-range .btn.range { width: auto; padding: 5px 12px; font-size: 13px; background: #fff; color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; }
.trend-range .btn.range.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.trend-legend { display: flex; gap: 16px; margin-bottom: 10px; font-size: 12px; }
.trend-legend .legend { display: inline-flex; align-items: center; gap: 5px; }
.trend-legend .legend::before { content: ""; display: inline-block; width: 10px; height: 3px; border-radius: 2px; }
.trend-legend .legend.cpu::before { background: #2563eb; }
.trend-legend .legend.mem::before { background: #16a34a; }
.trend-legend .legend.disk::before { background: #d97706; }
#trendCanvas { width: 100%; height: 260px; background: #fff; border-radius: 8px; }

.dashboard-overview { padding-bottom: 12px; }
.overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.overview-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: #fff; }
.ov-label { color: var(--muted); font-size: 13px; }
.ov-value { font-size: 28px; font-weight: 700; margin-top: 6px; color: var(--text); }
.ov-value.on { color: var(--ok); }
.ov-value.alert { color: var(--bad); }

.dashboard-alerts { padding-bottom: 12px; }
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-empty { color: var(--muted); font-size: 13px; padding: 10px 0; }
.alert-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; font-size: 13px; }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.alert-dev { font-weight: 600; min-width: 120px; }
.alert-msg { color: var(--muted); }

@media (max-width: 1100px) {
  .hw-grid { grid-template-columns: 1fr; }
  .hw-subgrid { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   设备详情 · 三大板块（基本信息 / 实时属性 / 远程控制）
   布局约定：自适应多列，一行 4~6 列
   ========================================================================== */

/* ---------------- 通用属性卡片 ---------------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.tile-grid.ctrl-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
/* 基本信息：字段较短，列更密（宽屏 6 列左右） */
.tile-grid.base-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* 数值/ID 等宽显示，便于纵向对齐比对 */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace; }

.tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 104px;
  justify-content: space-between;
}
.tile.span2 { grid-column: span 2; }
.tile-lab { font-size: 12px; color: var(--muted); line-height: 1.4; }
.tile-val {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
  line-height: 1.25;
}
.tile-val.st-on { color: var(--ok); }
.tile-val.st-off { color: #64748b; }
.tile-id { font-size: 11px; color: #94a3b8; word-break: break-all; }
.tile-cpu {
  font-size: 12px;
  color: var(--text);
  line-height: 1.6;
  word-break: break-all;
}
.tile-ctl { display: flex; align-items: center; gap: 8px; }
.tile-ctl .tile-sel,
.tile-ctl .tile-in {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}
.tile-ctl .tile-in:focus,
.tile-ctl .tile-sel:focus { outline: none; border-color: var(--primary); }
.tile-ctl .btn.sm { flex: none; height: 30px; padding: 0 12px; font-size: 12px; }
.tile .op-link { font-size: 12px; }

/* 远程控制卡片：数值用主色强调 */
.ctrl-tile .tile-val { color: var(--primary); font-size: 18px; }

/* ---------------- 实时属性：折叠分组 ---------------- */
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 10px; }
.sec-row .sec-title { margin: 0; }
.prop-tools { display: flex; align-items: center; gap: 10px; }

.prop-groups { margin-top: 10px; }
.pg { border-bottom: 1px solid var(--line); }
.pg:last-child { border-bottom: none; }

.pg-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 2px; cursor: pointer; user-select: none;
}
.pg-head:hover { background: #f8fafc; }
.pg-name { font-size: 13px; font-weight: 600; color: var(--primary); }
.pg-count { font-size: 12px; color: var(--muted); }
.pg-arrow { margin-left: auto; color: #94a3b8; font-size: 12px; }

.pg-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0 20px;
  padding: 2px 0 12px;
}
.prop-cell {
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px dashed #eef2f7;
}
.pc-name {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pc-val {
  font-size: 14px; color: var(--text); font-weight: 600;
  margin-top: 3px; word-break: break-all;
}

@media (max-width: 900px) {
  .tile-grid, .tile-grid.ctrl-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .tile.span2 { grid-column: span 2; }
  .pg-body { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ==========================================================================
   顶栏：当前账号 + 下拉菜单（个人设置 / 退出登录）
   ========================================================================== */
.work { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 56px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; background: #fff; border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 14px; color: var(--muted); }
.topbar-user { position: relative; }
.topbar-btn {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: 1px solid transparent; cursor: pointer;
  padding: 5px 10px; border-radius: 8px; font-size: 13px; color: var(--text);
}
.topbar-btn:hover { background: #f1f5f9; }
.topbar-avatar { font-size: 18px; }
.topbar-role {
  font-size: 11px; color: #e11d48; background: #fff1f2;
  border: 1px solid #fecdd3; border-radius: 4px; padding: 2px 7px;
}
.topbar-name { font-weight: 600; }
.topbar-caret { color: var(--muted); font-size: 11px; }
.topbar-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 160px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15,23,42,.14);
  padding: 6px 0; display: none; z-index: 60;
}
.topbar-menu.open { display: block; }
.topbar-item {
  display: block; padding: 9px 16px; font-size: 13px; color: var(--text);
  cursor: pointer;
}
.topbar-item:hover { background: #f1f5f9; }
.topbar-item.danger { color: #dc2626; }
.topbar-item.danger:hover { background: #fef2f2; }

/* ==========================================================================
   账号列表（青黄智催式列集）
   ========================================================================== */
.user-table .pwd-mask { letter-spacing: 1px; color: #94a3b8; }
.user-table .pwd-tip { font-size: 11px; color: #cbd5e1; margin-left: 6px; }
.user-table .perm-cell {
  font-size: 12px; color: var(--text2); max-width: 260px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-table .role-chip {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 4px;
  border: 1px solid var(--line); background: #f8fafc; color: var(--text2);
}
.user-table .role-chip.r-admin { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.user-table .role-chip.r-customer_admin { color: #0369a1; background: #f0f9ff; border-color: #bae6fd; }
.user-table .role-chip.r-customer { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.user-table a.pwd, .user-table a.child { color: #0891b2; }
.pwd-notice {
  font-size: 12px; color: var(--text2); background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 6px; padding: 9px 12px;
  line-height: 1.7; margin-bottom: 14px;
}

/* ==========================================================================
   个人设置 / 设备数据管理
   ========================================================================== */

/* ---------- 通用表单控件（供新页面使用；已有作用域规则优先级更高，不受影响） ---------- */
.search-input {
  height: 32px; padding: 0 12px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text);
}
.search-input:focus { outline: none; border-color: var(--primary); }
.filter-select {
  height: 30px; padding: 0 8px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text);
}
.filter-select:focus { outline: none; border-color: var(--primary); }

/* ---------- 个人设置 ---------- */
.mini-hint { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.mini-input:disabled,
.mini-input[disabled] { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }

/* ---------- 设备数据管理：配置弹窗 ---------- */
.cfg-box { width: 720px; max-width: 92vw; max-height: 84vh; overflow: auto; }
.cfg-box h3 { margin: 0 0 4px; font-size: 17px; }
.cfg-sub { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.cfg-sub-title {
  font-size: 13px; font-weight: 600; color: var(--primary);
  margin: 18px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.cfg-row { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.cfg-label {
  width: 96px; flex: none; text-align: right;
  font-size: 13px; color: var(--text2); line-height: 30px;
}
.cfg-ctl {
  flex: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0;
}
.cfg-ctl .filter-select { min-width: 180px; height: 30px; }
.cfg-hint { font-size: 11px; color: var(--muted); }
.cfg-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.cfg-switch { display: inline-flex; align-items: center; gap: 10px; }
.cfg-desc {
  font-size: 11px; color: var(--muted); background: #f8fafc;
  border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 10px; margin: 0 0 12px 110px;
}
.cfg-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line);
}
.inline-input {
  height: 30px; padding: 0 8px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
.inline-input:focus { outline: none; border-color: var(--primary); }

/* ---------- 设备数据管理：表格 ---------- */
.table .op-link { margin-right: 10px; }

/* ---------- 小程序维护：服务商信息表单（仿 SmartRipen 截图） ---------- */
.mini-page { max-width: 1000px; }
.mini-sec-title { font-size: 15px; font-weight: 700; margin: 0 0 14px; }
.mini-tip { background: #f1f5f9; border-radius: 8px; padding: 12px 14px; color: #64748b;
  font-size: 13px; line-height: 1.7; margin-bottom: 22px; }
.mini-form { display: flex; flex-direction: column; gap: 14px; max-width: 780px; }
.mini-row { display: flex; align-items: center; gap: 16px; }
.mini-label { flex: 0 0 96px; text-align: right; color: #475569; font-size: 14px; }
.mini-input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 14px; background: #fff; color: var(--text); }
.mini-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.mini-actions { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding-left: 112px; }
.mini-saved { font-size: 12px; }
@media (max-width: 720px) {
  .mini-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .mini-label { text-align: left; flex: none; }
  .mini-actions { padding-left: 0; }
}


