/* ============================================================
   智慧水厂 · 数字工单及巡检系统  主样式表
   视觉基线：深蓝渐变侧栏 + 浅蓝灰内容区 + 蓝色卡片化组件
   仅负责表现层；功能类名 / ID / 状态枚举由 app.js 契约保留
   ============================================================ */

:root {
  --primary: #1677FF;
  --primary-2: #2F54EB;
  --primary-soft: #e8f2ff;
  --green:  #16A34A;
  --amber:  #D97706;
  --orange: #EA580C;
  --red:    #DC2626;
  --cyan:   #0891B2;
  --purple: #7C3AED;
  --pink:   #DB2777;

  --text-1: #16233A;
  --text-2: #475569;
  --text-3: #8494AB;
  --text-4: #B6C1D0;

  --bg-page: #F1F5FB;
  --bg-card: #FFFFFF;
  --bg-soft: #F7FAFE;
  --bd:      #E7EDF5;
  --bd-2:    #D7E1EE;
  --bd-3:    #E3EAF3;

  --nav-bg-1: #122A52;
  --nav-bg-2: #0B1B36;
  --nav-text:  #B9CCE6;
  --nav-text-2:#8FA9CC;
  --nav-on:    #3B82F6;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(15, 42, 80, .06), 0 8px 24px rgba(15, 42, 80, .04);
  --shadow-lg: 0 18px 48px rgba(8, 28, 60, .22);
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg-page);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin: 0; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(100, 130, 170, .35); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===================== 外壳布局 ===================== */
#app { display: flex; flex-direction: column; height: 100%; }
#app.hidden { display: none; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px; height: 60px; flex-shrink: 0;
  background: #fff; border-bottom: 1px solid var(--bd-3);
  box-shadow: 0 1px 6px rgba(15, 42, 80, .05);
  position: relative; z-index: 30;
}
.topbar::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--cyan), var(--primary-2));
}
.topbar-title {
  font-weight: 700; font-size: 17px; color: var(--text-1); white-space: nowrap;
  display: flex; align-items: center; gap: 9px;
}
.topbar-title::before {
  content: ""; width: 8px; height: 20px; border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
}
.topbar-clock {
  color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums;
  padding: 5px 12px; background: var(--bg-soft); border: 1px solid var(--bd);
  border-radius: 18px;
}
.topbar-user { color: var(--text-2); font-size: 13px; margin-left: auto; white-space: nowrap; }
.topbar button {
  background: #fff; color: var(--text-2);
  border: 1px solid var(--bd-2); border-radius: 8px;
  padding: 7px 14px; cursor: pointer; font-size: 13px;
  transition: all .16s ease;
}
.topbar button:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
#menuBtn { display: none; font-size: 22px; background: none; border: none; color: var(--primary); padding: 4px 8px; }

.body { flex: 1; display: flex; min-height: 0; }

.sidebar {
  width: 214px; flex-shrink: 0; overflow: auto; padding: 16px 10px 22px;
  background:
    radial-gradient(420px 260px at 0% 0%, rgba(59, 130, 246, .28), transparent 70%),
    linear-gradient(165deg, var(--nav-bg-1) 0%, var(--nav-bg-2) 100%);
  border-right: 1px solid rgba(255, 255, 255, .06);
  position: relative; z-index: 40;
}
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); }
.sidebar .nav-group {
  padding: 14px 16px 6px !important;
  font-size: 11px !important; letter-spacing: 2px !important;
  font-weight: 700 !important; color: var(--nav-text-2) !important;
}
.sidebar .nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; margin-bottom: 3px;
  color: var(--nav-text); cursor: pointer;
  border-left: 3px solid transparent; border-radius: 0 9px 9px 0;
  font-size: 14px; user-select: none; white-space: nowrap;
  transition: background .16s, color .16s;
}
.sidebar .nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar .nav-item.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, .34), rgba(59, 130, 246, .08));
  color: #fff; border-left-color: #60A5FA; font-weight: 600;
}

.content { flex: 1; overflow: auto; padding: 18px 20px 26px; min-width: 0; }
.tabbar { display: none; }

.notlogin {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: var(--bg-page); color: var(--text-3); z-index: 100;
}
.notlogin.hidden { display: none; }

/* ===================== 页面标题 / 区块 ===================== */
.page-title {
  font-size: 21px; font-weight: 700; color: var(--text-1);
  display: flex; align-items: center; gap: 10px; margin-bottom: 2px;
}
.page-title::before {
  content: ""; width: 5px; height: 21px; border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
}
.page-sub { font-size: 13px; color: var(--text-3); margin: 4px 0 16px 15px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--bd);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--bd);
}
.sec-title {
  font-size: 15px; font-weight: 700; color: var(--text-1);
  display: flex; align-items: center; gap: 8px;
}
.sec-title::before {
  content: ""; width: 4px; height: 15px; border-radius: 2px;
  background: var(--primary);
}
.sec-tip { font-size: 12px; color: var(--text-3); }

/* ===================== 栅格 ===================== */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ===================== KPI / 进度条 ===================== */
.kpi {
  position: relative; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--bd);
  border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease;
}
.kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15, 42, 80, .12); }
.kpi::before {
  content: ''; position: absolute; right: -24px; top: -24px;
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--primary-soft); opacity: .75;
}
.kpi .label { font-size: 13px; color: var(--text-2); position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; }
.kpi .kpi-ico {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 9px;
  font-size: 15px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft);
}
.kpi .num { font-size: 30px; font-weight: 750; line-height: 1.2; margin-top: 10px; color: var(--text-1); position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.kpi.blue .kpi-ico { color: var(--primary); background: var(--primary-soft); }
.kpi.blue .num { color: var(--primary); }
.kpi.green .kpi-ico { color: var(--green); background: #E9F8EF; }
.kpi.green .num { color: var(--green); }
.kpi.red .kpi-ico { color: var(--red); background: #FEECEC; }
.kpi.red .num { color: var(--red); }
.kpi.cyan .kpi-ico { color: var(--cyan); background: #E7F8FA; }
.kpi.cyan .num { color: var(--cyan); }
.kpi.orange .kpi-ico { color: var(--orange); background: #FFF1E6; }
.kpi.orange .num { color: var(--orange); }

.bar { background: #EDF2F8; height: 9px; border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--cyan)); border-radius: 6px; }

/* ===================== 表格 ===================== */
.content table { width: 100%; border-collapse: collapse; font-size: 13px; }
.content table + table { margin-top: 10px; }
.content th {
  background: #F4F8FE; color: var(--text-2); font-weight: 700;
  text-align: left; padding: 11px 12px;
  border-bottom: 2px solid var(--bd-2); white-space: nowrap;
}
.content td { padding: 11px 12px; border-bottom: 1px solid var(--bd); color: var(--text-1); vertical-align: middle; }
.content tbody tr:hover { background: #F7FAFF; }
.content td, .content th { max-width: 320px; }

.row-off { color: var(--text-4); background: #FAFBFC; }
.row-off td { color: var(--text-4); }
.wo-manual { background: #FFFCF7; }
.wo-auto { background: #fff; }
.urged-row { background: #FFF3F2; }
.urged-row td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.dev-row-fault { background: #FFF3F2; }
.po-changed { background: #FFFBEB; }

/* ===================== 徽章 / 标签 ===================== */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 12px;
  font-size: 12px; line-height: 18px; white-space: nowrap; font-weight: 600;
  border: 1px solid var(--bd-2); color: var(--text-2); background: #F7F9FC;
}
.badge.pending   { color: var(--text-3); background: #F4F6F9; border-color: var(--bd-2); }
.badge.doing     { color: var(--primary); background: #E8F2FF; border-color: #A9CDFF; }
.badge.done      { color: var(--green);   background: #E9F8EF; border-color: #A7E3BC; }
.badge.closed    { color: var(--text-3);  background: #F4F6F9; border-color: var(--bd-2); }
.badge.timeout   { color: var(--red);     background: #FEECEC; border-color: #F6B9B9; }
.badge.normal    { color: var(--green);   background: #E9F8EF; border-color: #A7E3BC; }
.badge.abnormal  { color: var(--red);     background: #FEECEC; border-color: #F6B9B9; }
.badge.running   { color: var(--green);   background: #E9F8EF; border-color: #A7E3BC; }
.badge.maintain  { color: var(--amber);   background: #FFF6E6; border-color: #FBD68A; }
.badge.fault     { color: var(--red);     background: #FEECEC; border-color: #F6B9B9; }
.badge.assigned  { color: var(--primary); background: #E8F2FF; border-color: #A9CDFF; }
.badge.escalated { color: var(--orange);  background: #FFF1E6; border-color: #FBC99B; }

.tag {
  display: inline-block; padding: 2px 9px; border-radius: 12px;
  font-size: 11px; line-height: 18px; white-space: nowrap;
  background: #F4F6F9; color: var(--text-3); border: 1px solid var(--bd-2);
}
.tag-manual     { color: var(--orange); background: #FFF1E6; border-color: #FBC99B; }
.tag-auto       { color: var(--primary); background: #E8F2FF; border-color: #A9CDFF; }
.tag-unassigned { color: var(--amber);   background: #FFF6E6; border-color: #FBD68A; }

.urge-flag {
  display: inline-block; background: var(--red); color: #fff;
  font-size: 11px; line-height: 16px; padding: 0 6px;
  border-radius: 4px; margin-right: 5px; vertical-align: 1px;
}
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -2px; }
.sw-auto { background: var(--primary); }
.sw-manual { background: var(--orange); }
.sw-urged { background: var(--red); }
.lg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: 0; }
.lg-dot.on { background: var(--green); }
.lg-dot.off { background: var(--text-4); }
.on-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); vertical-align: middle; }

/* ===================== 按钮 ===================== */
.btn {
  display: inline-block; cursor: pointer;
  border: 1px solid var(--bd-2); background: #fff; color: var(--text-1);
  padding: 8px 16px; border-radius: 8px; font-size: 14px;
  transition: all .16s ease; white-space: nowrap;
}
.btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn:disabled:hover { color: var(--text-1); border-color: var(--bd-2); background: #fff; }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: var(--primary); color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(22, 119, 255, .22); }
.btn.primary:hover { filter: brightness(1.06); color: #fff; }
.btn.ghost { background: transparent; border-color: var(--bd-2); color: var(--text-2); }
.btn.ghost:hover { color: var(--primary); border-color: var(--primary); }
.btn.sm { padding: 5px 11px; font-size: 12px; border-radius: 6px; }
.btn.green  { color: var(--green);  border-color: #A7E3BC; background: #E9F8EF; }
.btn.green:hover  { background: var(--green);  color: #fff; border-color: var(--green); }
.btn.cyan   { color: var(--cyan);  border-color: #93D5DB; background: #E8F8FA; }
.btn.cyan:hover   { background: var(--cyan);   color: #fff; border-color: var(--cyan); }
.btn.blue   { color: var(--primary); border-color: #A9CDFF; background: #E8F2FF; }
.btn.blue:hover   { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.red    { color: var(--red);    border-color: #F6B9B9; background: #FEECEC; }
.btn.red:hover    { background: var(--red);    color: #fff; border-color: var(--red); }
.btn.orange { color: var(--orange); border-color: #FBC99B; background: #FFF1E6; }
.btn.orange:hover { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn.urged  { background: var(--red); color: #fff; border-color: var(--red); }
.btn.urge-off { color: var(--orange); border-color: #FBC99B; background: #FFF1E6; }

/* ===================== 表单 ===================== */
label { display: block; font-size: 13px; color: var(--text-2); margin: 10px 0 5px; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 9px 12px; font-size: 14px;
  font-family: inherit; color: var(--text-1); background: #fff;
  border: 1px solid var(--bd-2); border-radius: 8px; outline: none;
  transition: border-color .16s, box-shadow .16s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22, 119, 255, .12); }
input::placeholder, textarea::placeholder { color: var(--text-4); }
textarea { min-height: 74px; resize: vertical; }
select { height: 38px; padding: 7px 10px; }
select[multiple] { height: auto; min-height: 96px; }
input[type="checkbox"], input[type="radio"] { width: auto; margin: 0 5px 0 0; vertical-align: middle; }
input[type="file"] { padding: 7px; font-size: 13px; }
input[type="datetime-local"], input[type="date"], input[type="time"] { max-width: 260px; }

/* ===================== 弹窗 ===================== */
.modal-mask {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(11, 27, 54, .55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: #fff; border-radius: 16px;
  width: 560px; max-width: 100%; max-height: 86vh; overflow: auto;
  padding: 22px 24px; box-shadow: var(--shadow-lg);
}
.modal h3 { font-size: 17px; font-weight: 700; color: var(--text-1); margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--bd); }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal table { width: 100%; border-collapse: collapse; font-size: 13px; }
.modal th { background: #F4F8FE; color: var(--text-2); text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--bd-2); }
.modal td { padding: 9px 10px; border-bottom: 1px solid var(--bd); }

/* ===================== 分页器 ===================== */
.pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--text-3); }

/* ===================== 首页：水厂横幅 / 信息栏 / 岗位分组 ===================== */
.plant-hero {
  position: relative; height: 210px; border-radius: var(--radius);
  background-size: cover; background-position: center;
  margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow);
}
.plant-hero-mask {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10, 32, 66, .86) 0%, rgba(10, 32, 66, .45) 48%, rgba(10, 32, 66, .05) 100%);
  display: flex; flex-direction: column; justify-content: center;
  padding: 24px 28px; color: #fff;
}
.plant-hero-title { font-size: 27px; font-weight: 750; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.plant-hero-sub { font-size: 13px; margin-top: 8px; opacity: .92; text-shadow: 0 1px 4px rgba(0, 0, 0, .35); }

.infobar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.infobar .info {
  flex: 1 1 150px; background: #fff; border: 1px solid var(--bd);
  border-radius: var(--radius); padding: 12px 16px;
  box-shadow: var(--shadow);
}
.infobar .k { font-size: 12px; color: var(--text-3); }
.infobar .v { font-size: 16px; font-weight: 700; color: var(--text-1); margin-top: 3px; }

.dept-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.dept-block { border: 1px solid var(--bd); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--bg-soft); }
.dept-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-left: 8px; margin-bottom: 9px; }
.dept-name { font-weight: 700; font-size: 14px; }
.dept-count { font-size: 12px; color: var(--text-3); }
.dept-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.person-chip { display: inline-block; padding: 4px 11px; border-radius: 14px; font-size: 12px; line-height: 18px; }

.intro-text { font-size: 13px; line-height: 1.8; color: var(--text-2); white-space: pre-wrap; margin: 0; }

/* ===================== 驾驶舱 ===================== */
.cockpit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.cockpit-col { min-width: 0; }

/* ===================== 工单页 ===================== */
.wo-toolbar { background: #fff; border: 1px solid var(--bd); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.wo-filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.wo-filters label { margin-top: 0; }
.wo-filters select { min-width: 170px; width: auto; }
.wo-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }

/* ===================== 设备页 ===================== */
.dev-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.dev-tab {
  padding: 7px 16px; border: 1px solid var(--bd-2); border-radius: 18px;
  cursor: pointer; font-size: 13px; color: var(--text-2); background: #fff; transition: all .16s;
}
.dev-tab:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.dev-tab.active, .dev-tab.on { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-color: var(--primary); box-shadow: 0 3px 10px rgba(22, 119, 255, .22); }
.dev-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); margin-top: 9px; }

/* ===================== 工艺页 ===================== */
.po-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.po-field { display: flex; flex-direction: column; gap: 4px; }
.po-changed-mark { color: var(--orange); font-size: 12px; font-weight: 700; margin-left: 4px; }

/* ===================== 系统管理 ===================== */
.sys-layout { display: flex; gap: 14px; align-items: flex-start; }
.sys-menu {
  width: 184px; flex-shrink: 0; background: #fff;
  border: 1px solid var(--bd); border-radius: var(--radius); padding: 9px; box-shadow: var(--shadow);
}
.sys-menu-item {
  padding: 10px 13px; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: var(--text-2); margin-bottom: 3px; white-space: nowrap; transition: all .16s;
}
.sys-menu-item:hover { background: var(--bg-soft); color: var(--text-1); }
.sys-menu-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.sys-content { flex: 1; min-width: 0; }
.perm-grid { display: grid; gap: 7px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.perm-item { display: flex; align-items: center; gap: 5px; font-size: 13px; margin: 0; color: var(--text-2); }

/* ===================== 考勤月历 ===================== */
.cal-wrap { background: #fff; border: 1px solid var(--bd); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 6px 0; }
.cal-head > div { text-align: center; font-size: 12px; color: var(--text-3); font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-cell {
  border: 1px solid var(--bd); border-radius: 8px;
  padding: 6px 2px; text-align: center; min-height: 56px; font-size: 12px;
  background: #fff; transition: all .16s;
}
.cal-cell .d { font-weight: 700; font-size: 14px; color: var(--text-1); }
.cal-cell .mk { font-size: 11px; margin-top: 2px; }
.cal-cell.empty { border: none; background: transparent; }
.cal-cell.no { background: #F7F9FC; color: var(--text-4); }
.cal-cell.no .d { color: var(--text-4); }
.cal-cell.once { background: #E8F2FF; border-color: #A9CDFF; color: var(--primary); }
.cal-cell.once .d { color: var(--primary); }
.cal-cell.twice { background: #BFD9FF; border-color: var(--primary); color: #0B4EA2; }
.cal-cell.twice .d { color: var(--primary); }
.cal-cell.today { outline: 2px solid var(--primary); outline-offset: -1px; }
.ck-blue {
  display: inline-block; padding: 2px 11px; border-radius: 12px;
  background: #E8F2FF; color: var(--primary); border: 1px solid #A9CDFF; font-size: 12px; font-weight: 700;
}
.onduty-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.onduty-chip {
  display: inline-block; padding: 5px 15px; border-radius: 16px; font-size: 13px; font-weight: 700;
  background: #E8F2FF; color: var(--primary); border: 1px solid #A9CDFF;
}

/* ===================== 首页：AAO 工艺流程图 ===================== */
.aao-flow { display: flex; flex-direction: column; gap: 11px; }
.aao-row { display: flex; align-items: center; gap: 10px; }
.aao-row-label {
  flex: 0 0 70px; font-size: 12px; font-weight: 700; color: var(--text-2);
  background: #F1F6FD; border-radius: 7px; padding: 7px 4px; text-align: center;
}
.aao-line { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; overflow-x: auto; padding: 4px 2px; }
.aao-node {
  flex: 0 0 auto; padding: 8px 13px; border-radius: 8px; font-size: 13px; font-weight: 700;
  background: #E8F2FF; color: var(--primary); border: 1px solid #A9CDFF; white-space: nowrap;
}
.aao-node.aao-pre { background: #E8F2FF; color: var(--primary); border-color: #A9CDFF; }
.aao-node.aao-ana { background: #F3EBFF; color: var(--purple); border-color: #D8BFFF; }
.aao-node.aao-anx { background: #E7F8FA; color: var(--cyan); border-color: #9EE0E6; }
.aao-node.aao-aer { background: #FFF1E6; color: var(--orange); border-color: #FBC99B; }
.aao-node.aao-deep { background: #EDF0FF; color: var(--primary-2); border-color: #BECBFF; }
.aao-node.aao-out { background: #E9F8EF; color: var(--green); border-color: #A7E3BC; }
.aao-node.aao-sludge { background: #FFF6E6; color: var(--amber); border-color: #FBD68A; }
.aao-arrow { color: #A8B8CC; font-weight: 700; flex: 0 0 auto; }
.aao-group { flex: 0 0 auto; border: 1px dashed #D8BFFF; border-radius: 10px; padding: 7px 9px; background: #FCFAFF; }
.aao-group-title { font-size: 12px; color: var(--purple); font-weight: 700; margin-bottom: 5px; text-align: center; }
.aao-group-body { display: flex; align-items: center; gap: 6px; }
.aao-reflux { gap: 10px; }
.aao-chip {
  flex: 0 0 auto; font-size: 12px; padding: 5px 11px; border-radius: 14px;
  background: #F5F8FC; color: var(--text-2); border: 1px dashed var(--bd-2);
}
.aao-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); margin-top: 11px; }
.aao-legend .sw, .dev-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }

/* 计划月份标记 */
.mo-tag {
  display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px;
  border: 1px solid var(--bd-2); background: #F5F8FC; color: var(--text-2); margin-right: 4px;
}
.mo-tag.mo-major { background: #FEECEC; border-color: #F6B9B9; color: #B91C1C; font-weight: 700; }
.mo-tag.mo-part { background: #FFF1E6; border-color: #FBC99B; color: #C2410C; font-weight: 700; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); margin-top: 11px; }

/* ===================== 通用空态 / 杂项 ===================== */
.empty { color: var(--text-3); }
.infobar .info, .card, .kpi, .dept-block, .cal-wrap { max-width: 100%; }

/* ===================== 移动端适配 ===================== */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  #menuBtn { display: inline-block; }
  .topbar { height: 54px; padding: 0 10px; gap: 8px; }
  .topbar-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
  .topbar-clock { display: none; }
  .topbar-user { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 96px; }
  .topbar button { padding: 6px 9px; font-size: 12px; }

  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 76%; max-width: 286px;
    transform: translateX(-100%); z-index: 60; transition: transform .22s;
    box-shadow: 6px 0 28px rgba(0, 0, 0, .28);
    border-radius: 0 14px 14px 0;
  }
  .sidebar.open { transform: translateX(0); }
  .content { padding: 12px; padding-bottom: 70px; }
  .page-title { font-size: 18px; }
  .page-sub { margin-left: 0; }

  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: 58px;
    background: #fff; border-top: 1px solid var(--bd-3); z-index: 55;
    box-shadow: 0 -3px 12px rgba(15, 42, 80, .08);
  }
  .tabbar .tabbar-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 2px; color: var(--text-3); font-size: 11px;
    cursor: pointer; line-height: 1.2; text-align: center;
  }
  .tabbar .tabbar-item.active { color: var(--primary); font-weight: 700; }

  .grid, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .cockpit { grid-template-columns: 1fr; }
  .dept-grid { grid-template-columns: 1fr; }
  .sys-layout { flex-direction: column; }
  .sys-menu { width: 100%; display: flex; overflow-x: auto; }
  .sys-menu-item { white-space: nowrap; margin-bottom: 0; }
  .plant-hero { height: 168px; }
  .plant-hero-title { font-size: 21px; }
  .modal { width: 100%; padding: 18px; }

  input, select, textarea { font-size: 16px; }
  .content table { display: block; overflow-x: auto; white-space: nowrap; }
  .content td, .content th { max-width: none; }
}
