:root {
  --primary: #1f6feb;
  --primary-dark: #1554b8;
  --bg: #f4f6fa;
  --card: #fff;
  --text: #1b2430;
  --muted: #7a8699;
  --border: #e6eaf1;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --sidebar: #101a2b;
  --sidebar-hover: #1b2942;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(23, 43, 77, .06);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
}
button, input, select, textarea { font-family: inherit; font-size: 16px; }
a { color: var(--primary); text-decoration: none; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, #204a8f, #0d1523 60%);
  padding: 24px;
}
.login-card {
  width: 380px;
  background: #fff;
  border-radius: 18px;
  padding: 38px 34px 32px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}
.login-card h1 { font-size: 21px; margin: 0 0 4px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: #445; margin-bottom: 6px; }
.input, select.input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  background: #fbfcfe;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 111, 235, .12); background: #fff; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--primary-dark); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; height: 44px; }
.btn.ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: #f5f7fb; }
.btn.danger { background: #fee2e2; color: var(--danger); border-color: #fecaca; }
.btn.danger:hover { background: #fecaca; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.link { background: transparent; color: var(--primary); padding: 0 6px; height: 28px; }
.btn.link:hover { background: #eef4ff; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 216px;
  background: var(--sidebar);
  color: #c8d2e4;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #3b82f6, #22d3ee);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff;
}
.brand b { color: #fff; font-size: 15px; letter-spacing: .3px; }
.brand span { display: block; font-size: 11px; color: #8193b2; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 9px;
  color: #aebbd2; cursor: pointer; margin-bottom: 2px;
  font-size: 14px;
}
.nav a:hover { background: var(--sidebar-hover); color: #e7eefc; }
.nav a.active { background: linear-gradient(90deg, #1f6feb, #2b7fff); color: #fff; box-shadow: 0 6px 18px rgba(31, 111, 235, .35); }
.nav a .ico { width: 18px; text-align: center; opacity: .9; }
.sidebar .foot { margin-top: auto; padding: 14px 8px 0; font-size: 12px; color: #6d7f9c; border-top: 1px solid #1c2940; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; transition: margin-right .2s ease; }
/* 单机控制面板展开时：卡片区自动让出右侧宽度 */
body.dp-open .main { margin-right: 340px; }
body.dp-open .drawer-mask { display: none; }
@media (max-width: 1180px) {
  body.dp-open .main { margin-right: 0; }
  body.dp-open .drawer-mask { display: block; }
}
.topbar {
  height: 62px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 10;
}
.topbar h2 { font-size: 17px; margin: 0; }
.topbar .who { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 12px; }
.content { padding: 22px 24px 48px; }

/* ---------- 卡片 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  background: var(--card); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.stat .label { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.stat .value { font-size: 26px; font-weight: 650; letter-spacing: -.5px; }
.stat .value small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 18px; }
.card .hd { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card .hd h3 { margin: 0; font-size: 15px; }
.card .hd .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card .bd { padding: 16px 18px; }
.card .bd.nopad { padding: 0; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
th { background: #f8fafd; color: #5b6b82; font-weight: 500; white-space: nowrap; }
tbody tr:hover { background: #f9fbff; }
td .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.table-wrap { overflow-x: auto; }
.empty { padding: 42px 0; text-align: center; color: var(--muted); }
.tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px;
  background: #eef2f8; color: #5b6b82; line-height: 20px;
}
.tag.green { background: #dcfce7; color: #15803d; }
.tag.red { background: #fee2e2; color: #b91c1c; }
.tag.blue { background: #e0edff; color: #1d4ed8; }
.tag.orange { background: #fef3c7; color: #b45309; }
.tag.gray { background: #eef2f8; color: #64748b; }

/* ---------- 其它 ---------- */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.kv { font-size: 13px; line-height: 1.9; }
.kv span { color: var(--muted); display: inline-block; min-width: 78px; }
.toast {
  position: fixed; left: 50%; top: 26px; transform: translate(-50%, -18px);
  background: #101a2b; color: #fff; padding: 11px 20px; border-radius: 10px;
  opacity: 0; pointer-events: none; transition: .22s; z-index: 1000; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  font-size: 13px; max-width: 80vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #b91c1c; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 26, 43, .45); display: flex;
  align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; z-index: 900;
}
.modal {
  width: 880px; max-width: 100%; background: #fff; border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.28); overflow: hidden;
  animation: pop .16s ease-out;
}
@keyframes pop { from { transform: translateY(-8px) scale(.98); opacity: .6 } to { transform: none; opacity: 1 } }
.modal .mhd { padding: 17px 20px; border-bottom: 1px solid var(--border); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.modal .mhd .x { cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; }
.modal .mbd { padding: 26px; max-height: 68vh; overflow: auto; }
.modal .mft { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: #fbfcfe; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.7; }
.seg { display: inline-flex; background: #eef2f8; border-radius: 8px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; cursor: pointer; color: #5b6b82; font-size: 13px; }
.seg button.on { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.switch { position: relative; width: 42px; height: 24px; border-radius: 999px; background: #d5dce8; cursor: pointer; transition: .18s; border: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: var(--success); }
.switch.on::after { left: 21px; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
/* ---------- 设备卡片 / 分区 ---------- */
.dev-layout { display: flex; gap: 16px; align-items: flex-start; }
.group-panel {
  width: 190px; flex: none; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 10px;
  position: sticky; top: 78px; max-height: calc(100vh - 100px); overflow: auto;
}
.gp-title { font-size: 13px; color: var(--muted); padding: 2px 9px 8px; }
.gp-item {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  border: 0; background: transparent; padding: 8px 9px; border-radius: 8px;
  cursor: pointer; color: #41506a; font-size: 13px; text-align: left;
}
.gp-item i { font-style: normal; color: var(--muted); font-size: 12px; }
.gp-item:hover { background: #f3f6fb; }
.gp-item.on { background: #eaf1ff; color: var(--primary); font-weight: 600; }
.gp-item.on i { color: var(--primary); }
.dev-main { flex: 1; min-width: 0; }
.dev-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 14px;
}
.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 12px; }
.dev-card {
  background: var(--card); border: 1px solid var(--border); border-left: 3px solid #cbd5e1;
  border-radius: 10px; padding: 12px 13px; box-shadow: var(--shadow);
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.dev-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(23, 43, 77, .12); }
.dev-card.on { border-left-color: var(--success); }
.dev-card.idle { border-left-color: #f59e0b; }
.dev-card.off { border-left-color: #cbd5e1; opacity: .88; }
.dc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dc-check { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; flex: none; }
.dc-top b { flex: 1; }
.dev-card.selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37, 99, 235, .18); }
.dc-top b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-lock { font-size: 12px; flex: none; }
.dc-temp { display: flex; align-items: baseline; gap: 2px; margin: 10px 0; }
.dc-temp b { font-size: 22px; font-weight: 650; letter-spacing: -.5px; }
.dc-temp span { font-size: 12px; color: var(--muted); }
.dc-temp em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 4px; }
.dc-foot {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: #5b6b82;
  border-top: 1px dashed var(--border); padding-top: 8px;
}
.dc-foot i { font-style: normal; margin-left: auto; color: var(--muted); }
.dc-dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; display: inline-block; }
.dc-dot.on { background: var(--success); }
.dc-dot.idle { background: #f59e0b; }
.dm-temp { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 16px 0; }
.dm-temp > button {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border);
  background: #fbfcfe; font-size: 22px; cursor: pointer;
}
.dm-temp > button:hover { background: #eef4ff; }
.dm-temp b { font-size: 34px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chips button {
  height: 40px; padding: 0 18px; border-radius: 9px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 15px;
}
.chips button:hover { background: #f5f8ff; }
.chips button.on { background: #eaf1ff; border-color: #bcd3ff; color: var(--primary); font-weight: 600; }
.row-label { font-size: 13px; color: #445; margin: 6px 0 8px; }

/* ---------- 批量控制抽屉 ---------- */
.drawer-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .28); z-index: 60; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 640px; max-width: 94vw;
  background: #fff; z-index: 61; display: flex; flex-direction: column;
  box-shadow: -8px 0 30px rgba(15, 23, 42, .15);
}
.dr-hd {
  display: flex; align-items: center; gap: 8px; padding: 16px 18px;
  border-bottom: 1px solid var(--border); font-weight: 600;
}
.dr-hd .x { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 18px; }
.dr-bd { flex: 1; overflow: auto; padding: 16px 18px; }
.dr-sec { margin-bottom: 20px; }
.dr-label { font-size: 13px; color: #445; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.dr-range { width: 100%; accent-color: var(--primary); }
.dr-temp-btns { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.dr-ft {
  display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px;
  border-top: 1px solid var(--border); background: #fbfcfe;
}
/* 单机控制：右侧窄长条（对齐 i管家 设备控制面板） */
.dp-drawer { width: 340px; }
.dp-drawer .dr-hd { padding: 14px 16px; font-size: 15px; }
.dp-drawer .dr-bd { padding: 12px 14px; font-size: 14px; }
.dp-drawer .dr-ft { padding: 12px 14px; }
.dp-tabs { display: flex; border-bottom: 1px solid var(--border); padding: 0 14px; }
.dp-tab { background: none; border: 0; padding: 10px 2px; margin-right: 18px; font-size: 13px; color: #4a5568; cursor: pointer; border-bottom: 2px solid transparent; }
.dp-tab.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.dp-warn { background: #FFF8E6; color: #8A6100; border-radius: 4px; padding: 8px 10px; font-size: 12px; line-height: 1.5; margin-bottom: 14px; }
.dp-sec { margin-bottom: 16px; }
.dp-label { font-size: 13px; color: #4a5568; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.dp-label .dp-temp { color: var(--primary); font-size: 15px; }
.dp-label .muted { font-size: 12px; }
.dp-range { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.dp-range input[type=range] { flex: 1; accent-color: var(--primary); }
.dp-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #4a5568; cursor: pointer; }
.dp-meta { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 10px; line-height: 1.7; }
.dp-drawer .chips { gap: 6px; }
.dp-drawer .chips button { height: 32px; padding: 0 12px; font-size: 12px; }
.dp-drawer .pill-btn { height: 34px; font-size: 13px; padding: 0 20px; }
.dp-drawer .lk-row { font-size: 13px; padding: 10px 0; gap: 8px; }
.dp-drawer .lk-row .chips button { height: 28px; padding: 0 10px; font-size: 12px; }
.dp-drawer .lk-val { color: var(--primary); margin-left: 2px; }
.lk-sub { margin: -6px 0 10px; }
.lk-temp-line { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #64748b; margin-bottom: 4px; }
.lk-temp-line b { color: var(--primary); font-size: 14px; }
.lk-range { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.lk-range input[type=range] { flex: 1; accent-color: var(--primary); }

/* ---------- 设备页（对齐 i管家） ---------- */
.eq-layout { display: flex; gap: 16px; align-items: flex-start; }
.zone-panel { width: 220px; flex: none; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding-bottom: 12px; }
.zp-tabs { display: flex; border-bottom: 1px solid var(--border); }
.zp-tab { flex: 1; border: 0; background: none; padding: 10px 0; font-size: 13px; color: #5b6b82; }
.zp-tab.on { color: #0f62fe; font-weight: 600; box-shadow: inset 0 -2px 0 #0f62fe; }
.zp-title { font-size: 13px; color: #42526e; padding: 12px 14px 8px; }
.zp-tree { max-height: calc(100vh - 300px); overflow: auto; padding: 0 8px; }
.zp-item { display: flex; justify-content: space-between; width: 100%; border: 0; background: none; padding: 7px 10px; border-radius: 4px; font-size: 13px; color: #41506a; cursor: pointer; text-align: left; }
.zp-item i { font-style: normal; color: #9aa7b8; font-size: 12px; }
.zp-item:hover { background: #f2f5f9; }
.zp-item.on { background: #e8f0ff; color: #0f62fe; font-weight: 600; }
.zp-foot { padding: 10px 14px 0; }
.main-panel { flex: 1; min-width: 0; }
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.filter-bar .input { height: 32px; }
.spacer { flex: 1; }
.batch-bar { display: flex; gap: 14px; align-items: center; background: #eef4ff; border: 1px solid #d6e4ff; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; color: #24405f; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 14px; align-items: start; }
.device-card { background: #fff; border: 1px solid #e6ebf2; border-left: 3px solid #e6ebf2; border-radius: 10px; box-shadow: 0 1px 3px rgba(20, 37, 63, .04); padding: 12px 14px 10px 12px; cursor: pointer; transition: .15s; display: flex; flex-direction: column; gap: 10px; }
.device-card:hover { border-color: #d9e2ee; box-shadow: 0 6px 18px rgba(20, 37, 63, .10); }
.device-card.selected { border-color: #0f62fe; box-shadow: 0 0 0 2px rgba(15, 98, 254, .15); }
.device-card.mode-cool { border-left-color: #3b82f6; }
.device-card.mode-heat { border-left-color: #f97316; }
.device-card.mode-dry { border-left-color: #14b8a6; }
.device-card.mode-fan { border-left-color: #22c55e; }
.device-card.mode-off { border-left-color: #cbd5e1; }
.dc-head { display: flex; align-items: center; gap: 10px; }
.dc-title { flex: 1; min-width: 0; }
.dc-name { font-size: 14px; font-weight: 600; color: #1d2b3a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.dc-name .dc-pen { margin-left: 5px; font-size: 10px; font-weight: 400; color: #9aa4b2; border: 1px solid #d7dee8; border-radius: 3px; padding: 0 2px; vertical-align: 1px; }
.dc-name:hover .dc-pen { color: var(--primary, #2b6de5); border-color: var(--primary, #2b6de5); }
.dc-sub { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 11px; color: #8593a6; }
.dc-check { width: 15px; height: 15px; accent-color: #0f62fe; cursor: pointer; flex: none; }
.dc-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding-top: 9px; border-top: 1px dashed #eef2f7; }
.dc-metric { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dc-metric span { font-size: 11px; color: #8593a6; }
.dc-metric b { display: flex; align-items: baseline; gap: 2px; font-size: 17px; font-weight: 650; color: #1d2b3a; letter-spacing: -.3px; }
.dc-metric b i { font-style: normal; font-size: 11px; font-weight: 400; color: #8593a6; }
.dc-metric b.txt { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-foot { display: flex; align-items: center; gap: 6px; min-height: 18px; }
.dc-gap { flex: 1; }
.dc-badge { font-size: 11px; line-height: 18px; padding: 0 8px; border-radius: 9px; background: #f1f4f8; color: #6b7a90; flex: none; }
.dc-badge.on { background: #e8f7ef; color: #0f9d58; }
.dc-dot { width: 6px; height: 6px; border-radius: 50%; background: #c3ccd8; display: inline-block; flex: none; }
.dc-dot.on { background: #19b36b; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 0 4px; font-size: 12px; color: #8593a6; }
.pager .btn { min-width: 72px; }
.zone-add { display: flex; gap: 8px; margin: 12px 0; }
.zone-add .input { flex: 1; height: 32px; }
.zone-devs { max-height: 230px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 4px; }
.zone-dev { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.zone-dev:hover { background: #f6f8fb; }
.zone-dev input { margin: 0; }
.zone-dev .addr { flex: 1; }
.zone-dev .no { color: #8a93a6; font-size: 11px; }
.zone-dev .cur { color: #8a93a6; min-width: 70px; text-align: right; }
.zone-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.zp-filter { width: 100%; height: 30px; margin: 0 0 8px; box-sizing: border-box; }
.lk-cur { margin-left: 6px; font-size: 11px; font-weight: 400; color: #98a2b3; border: 1px solid #e2e8f0; border-radius: 10px; padding: 1px 6px; white-space: nowrap; }
.lk-cur.on { color: #b45309; border-color: #fcd34d; background: #fffbeb; }
.lk-cur.mid { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
.dp-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; background: #f7f9fc; border-radius: 8px; padding: 16px 18px; margin-bottom: 18px; }
.dp-info div { font-size: 13px; color: #7b8a9e; }
.dp-info b { display: block; margin-top: 4px; font-size: 16px; color: #1d2b3a; font-weight: 600; }
.dp-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.dp-tab { border: 0; background: none; padding: 8px 0; font-size: 13px; color: #5b6b82; cursor: pointer; }
.dp-tab.on { color: #0f62fe; font-weight: 600; box-shadow: inset 0 -2px 0 #0f62fe; }
.pill-row { display: flex; gap: 12px; }
.pill-btn { width: 118px; height: 46px; border-radius: 23px; border: 1px solid #d6dde6; background: #fff; font-size: 15px; cursor: pointer; }
.pill-btn.on { background: #0f62fe; border-color: #0f62fe; color: #fff; }
.dc-ico { width: 26px; height: 26px; border-radius: 7px; background: #eaf1ff; color: #0f62fe; display: flex; align-items: center; justify-content: center; font-size: 14px; flex: none; }
.dc-ico.cool { background: #eaf1ff; color: #0f62fe; }
.dc-ico.heat { background: #ffece4; color: #e4572e; }
.dc-ico.dry { background: #e6f7f4; color: #0e9384; }
.dc-ico.fan { background: #eaf7ef; color: #1f9254; }
.dc-ico.off { background: #f1f4f8; color: #9aa7b8; }
.dc-tag { font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 4px; }
.dc-tag.fault { background: #feecec; color: #e5484d; }
.dc-tag.lock { background: #fff4e5; color: #b76e00; }
.dc-tag.normal { background: #e8f7ef; color: #0f9d58; }
.lk-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.lk-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid #f1f4f8; font-size: 15px; color: #41506a; }
.lk-row .chips { justify-content: flex-end; }
.lk-row .input { height: 30px; text-align: center; }

@media (max-width: 820px) {
  .sidebar { width: 64px; padding: 16px 8px; }
  .brand span, .brand b, .nav a span, .sidebar .foot { display: none; }
  .nav a { justify-content: center; padding: 12px 0; }
  .content { padding: 16px 12px 40px; }
  .topbar { padding: 0 12px; }
}
