:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-2: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ====== 登录页 ====== */
.login-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
  position: relative;
  background: radial-gradient(1200px 600px at 70% -10%, #0d47a1 0%, transparent 60%),
              radial-gradient(900px 500px at 0% 110%, #0277bd 0%, transparent 55%),
              var(--bg);
}
.login-container {
  display: flex;
  align-items: stretch;
  width: 820px;
  max-width: 95vw;
  min-height: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

/* 左侧广告语区 */
.login-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d47a1 0%, #0277bd 100%);
  padding: 40px 36px;
  position: relative;
}
.login-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; }
.hero-content .brand-mark.lg { margin-bottom: 20px; }
.hero-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.hero-slogan {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #4fc3f7, #29b6f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  letter-spacing: 2px;
}
.hero-desc {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  line-height: 1.8;
  margin-bottom: 24px;
}
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tag {
  font-size: 12px;
  color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px;
  padding: 4px 12px;
}

/* 右侧登录卡 */
.login-card {
  width: 380px;
  background: var(--panel);
  border: 1px solid var(--panel-2);
  border-radius: 0;
  padding: 40px 36px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-head { text-align: center; margin-bottom: 22px; }
.login-head h2 { font-size: 22px; }
.login-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-radius: 8px;
  letter-spacing: 1px;
}
.brand-mark.lg { width: 56px; height: 56px; font-size: 20px; }

/* Logo 图片 */
.brand-logo { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.brand-logo-sm { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--panel-2);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
}
.field input:focus { outline: none; border-color: var(--accent); }

/* 工号框右上角的部门简称徽标（生 / 制） */
.field-emp { position: relative; }
.dept-badge {
  position: absolute;
  top: 0;
  right: 0;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--panel-2);
  transition: all .2s;
}

.btn-primary {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .05s, opacity .2s;
}
.btn-primary:active { transform: translateY(1px); }

.alert {
  background: rgba(239,68,68,.12);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,.4);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: 14px;
}
.alert-success {
  background: rgba(34,197,94,.12);
  color: #86efac;
  border: 1px solid rgba(34,197,94,.4);
}

/* 员工同步页 */
.sync-hint { color: var(--muted); font-size: 13px; line-height: 1.6; }
.sync-rules { margin: 10px 0 14px; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.sync-count { color: var(--muted); font-size: 13px; margin-left: 10px; }
.sync-count strong { color: #e2e8f0; font-size: 16px; }

.login-tip {
  margin-top: 18px;
  border-top: 1px solid var(--panel-2);
  padding-top: 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}

/* 登录页响应式：窄屏时左侧隐藏，仅显示登录卡 */
@media (max-width: 768px) {
  .login-container { width: 95vw; min-height: auto; }
  .login-hero { display: none; }
  .login-card { width: 100%; border-radius: var(--radius); padding: 32px 24px 22px; }
}

.login-footer {
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.6);
  padding: 0;
}

/* 登录页按钮：工业蓝 */
.login-card .btn-primary {
  background: linear-gradient(135deg, #0277bd, #0d47a1);
}
.login-hero .brand-mark {
  background: linear-gradient(135deg, #0277bd, #0d47a1);
}

/* ====== 顶栏 ====== */
.topbar {
  height: 56px;
  background: var(--panel);
  border-bottom: 1px solid var(--panel-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .brand-mark { width: 32px; height: 32px; font-size: 13px; }
.brand-text { font-weight: 600; }
.brand-dept { color: var(--muted); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.badge { font-weight: 600; }
.user-name { color: var(--muted); }
.btn-link { color: var(--accent); text-decoration: none; }

/* ====== 侧边栏布局 ====== */
.layout { display: flex; min-height: calc(100vh - 56px); }

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--panel-2);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  overflow-x: visible;
  transition: width .22s ease;
  scrollbar-width: none;      /* Firefox：隐藏滚动条 */
  -ms-overflow-style: none;   /* IE/Edge：隐藏滚动条 */
}
/* 隐藏侧边栏滚动条（保留滚轮滚动能力） */
.sidebar::-webkit-scrollbar { width: 0; height: 0; display: none; }
.sidebar-head {
  padding: 16px 18px 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.dept-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.head-label { white-space: nowrap; }

/* 折叠/展开按钮 */
.sidebar-collapse {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border: none;
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .22s ease, background .15s;
  flex-shrink: 0;
}
.sidebar-collapse:hover { background: var(--panel-3, #2a3548); color: #fff; }

/* ====== 折叠态（窄条） ====== */
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .head-label,
.sidebar.collapsed .sidebar-foot,
.sidebar.collapsed .menu-label,
.sidebar.collapsed .caret { display: none; }
.sidebar.collapsed .sidebar-head { justify-content: center; padding: 16px 0 10px; }
.sidebar.collapsed .sidebar-collapse { margin: 0 auto; transform: rotate(180deg); }
.sidebar.collapsed .menu-item { justify-content: center; padding: 12px 0; }
.sidebar.collapsed .menu-icon { margin: 0; font-size: 18px; }

/* 折叠态子菜单浮层 */
.sidebar.collapsed .menu-group { position: relative; }
.sidebar.collapsed .menu-group .submenu {
  position: absolute;
  left: 64px;
  top: 0;
  max-height: none;
  overflow: visible;
  min-width: 150px;
  background: var(--panel);
  border: 1px solid var(--panel-2);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  display: none;
  z-index: 50;
}
.sidebar.collapsed .menu-group:hover .submenu { display: block; }
.sidebar.collapsed .menu-item.sub { padding: 8px 12px; color: var(--muted); }

.menu { flex: 1; padding: 6px 8px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 2px;
  transition: background .15s, color .15s;
}
.menu-item:hover { background: var(--panel-2); }
.menu-item.active {
  background: linear-gradient(90deg, rgba(37,99,235,.25), transparent);
  color: #fff;
  border-left: 3px solid var(--accent);
  padding-left: 9px;
}

/* ====== 子菜单（可折叠父项） ====== */
.menu-group { margin-bottom: 2px; }
.menu-item.parent { cursor: pointer; }
.menu-item.parent .caret {
  margin-left: auto;
  font-size: 11px;
  transition: transform .2s;
  opacity: .7;
}
.menu-group .submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .22s ease;
}
.menu-group.open .submenu { max-height: 240px; }
.menu-group.open .menu-item.parent .caret { transform: rotate(180deg); }

.menu-item.sub {
  padding: 8px 12px 8px 40px;
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  border-left: 3px solid transparent;
}
.menu-item.sub:hover { color: var(--text); background: rgba(148,163,184,.08); }
.menu-item.sub.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(124,58,237,.22), transparent);
  border-left-color: var(--accent-2);
}
.menu-item.parent.active-parent {
  color: #fff;
}
.menu-icon { width: 18px; text-align: center; opacity: .85; }

.sidebar-foot {
  padding: 12px 18px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--panel-2);
}

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 64px;
  left: 12px;
  z-index: 20;
  background: var(--panel);
  border: 1px solid var(--panel-2);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
}

/* ====== 主体 ====== */
.main { flex: 1; min-width: 0; padding: 24px 24px; }
.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.page-title h2 { font-size: 20px; }
.role-tag {
  font-size: 11px;
  background: var(--panel-2);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
}
.time { color: var(--muted); font-size: 13px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--panel);
  border: 1px solid var(--panel-2);
  border-radius: var(--radius);
  padding: 16px;
}
.kpi-label { color: var(--muted); font-size: 12px; }
.kpi-value {
  font-size: 28px;
  font-weight: 700;
  margin-top: 6px;
}
.kpi-value small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.kpi-trend { font-size: 12px; margin-top: 4px; }
.kpi-trend.up { color: var(--ok); }
.kpi-trend.down { color: var(--danger); }

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-2);
  border-radius: var(--radius);
  padding: 18px;
}
.panel h3 { font-size: 16px; margin-bottom: 14px; }
.entry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.entry {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  background: var(--bg);
  border: 1px solid var(--panel-2);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: border-color .2s, transform .05s;
}
.entry:hover { border-color: var(--accent); transform: translateY(-1px); }
.placeholder-hint { color: var(--muted); font-size: 12px; margin-top: 12px; }

/* ====== 数据表 ====== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--panel-2);
}
.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--panel-2);
}
.data-table tr:hover td { background: rgba(148,163,184,.06); }

/* ====== 条形图占位 ====== */
.chart-panel { min-height: 260px; }
.chart-bar-wrap { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.chart-bar {
  height: 32px;
  line-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--panel-2);
  color: #fff;
  font-size: 13px;
  position: relative;
  overflow: hidden;
}
.chart-bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--p) * 1%);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 0;
}
.chart-bar { position: relative; isolation: isolate; }
.chart-bar > * { position: relative; z-index: 1; }

/* ====== OEE ECharts 看板 ====== */
.oee-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.oee-card { background: var(--bg); border: 1px solid var(--panel-2); border-radius: 10px; padding: 6px; }
.oee-card-wide { grid-column: 1 / -1; }
.oee-chart { width: 100%; height: 240px; }
@media (max-width: 768px) { .oee-grid { grid-template-columns: 1fr; } }

/* ====== 人员 BI 看板 ====== */
.bi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.bi-card { background: var(--bg); border: 1px solid var(--panel-2); border-radius: 10px; padding: 6px; }
.bi-card-wide { grid-column: 1 / -1; }
.bi-chart { width: 100%; height: 240px; }
.bi-card-select { position: relative; }
.bi-select-left { left: 8px; right: auto; width: 48px; }
.bi-select {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  height: 28px; padding: 0 26px 0 10px;
  background: var(--panel); border: 1px solid var(--panel-2); border-radius: 6px;
  color: var(--text); font-size: 12px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 3.5 5 6.5 8 3.5' fill='none' stroke='%2394a3b8' stroke-width='1.4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.bi-select:hover, .bi-select:focus { border-color: var(--accent); outline: none; }
.bi-select option { background: var(--panel); color: var(--text); }
@media (max-width: 768px) { .bi-grid { grid-template-columns: 1fr; } }

/* ====== 出勤迟到公示栏 ====== */
.late-board {
  border: 1px solid var(--panel-2);
  border-radius: 10px;
  overflow: hidden;
}
.late-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 56px 88px 84px 72px;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--panel-2);
  font-size: 13px;
}
.late-row:last-child { border-bottom: none; }
.late-row.head { background: var(--bg); color: var(--muted); font-size: 12px; }
.late-rank { font-weight: 700; color: var(--danger); text-align: center; }
.late-name { font-weight: 600; color: var(--text); }
.late-emp { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.late-dept {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 6px;
}
.late-dept.prod { color: #2563eb; background: rgba(37, 99, 235, .14); }
.late-dept.mfg  { color: #7c3aed; background: rgba(124, 58, 237, .14); }
.late-min { color: var(--danger); font-weight: 600; }
.late-date { color: var(--muted); font-size: 12px; }

/* ====== 排班页 ====== */
.grid-2col {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  align-items: start;
}
.schedule-form .btn-primary { margin-top: 6px; }

.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.filter-row input[type=date] {
  height: 34px;
  background: var(--bg);
  border: 1px solid var(--panel-2);
  color: var(--text);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  color-scheme: dark;
}
.btn-ghost {
  height: 34px;
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--panel-2);
  color: var(--text);
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--accent); }

.btn-danger-sm {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.4);
  color: #fca5a5;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.btn-danger-sm:hover { background: rgba(239,68,68,.22); }

.btn-edit-sm {
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.4);
  color: #93c5fd;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.btn-edit-sm:hover { background: rgba(59,130,246,.22); }

/* 表单操作区（按钮组） */
.form-actions { display: flex; align-items: center; gap: 12px; }
.form-actions .btn-link { font-size: 13px; color: var(--muted); text-decoration: none; }
.form-actions .btn-link:hover { color: var(--text); }

/* 只读输入框（编辑模式编号不可改） */
.readonly-input {
  background: rgba(148,163,184,.08);
  color: var(--muted);
  cursor: not-allowed;
  border-color: var(--panel-2);
}

.empty { color: var(--muted); padding: 24px 0; text-align: center; font-size: 13px; }

.field select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--panel-2);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
}
.field select:focus { outline: none; border-color: var(--accent); }
.field input[type=date] { color-scheme: dark; }

@media (max-width: 768px) {
  .grid-2col { grid-template-columns: 1fr; }
}

/* ====== 班次设定 ====== */
.shift-panel { margin-top: 18px; }
.shift-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
  align-items: start;
}
.shift-form h4 { font-size: 14px; margin-bottom: 12px; color: var(--muted); }
.shift-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field.sm span { font-size: 11px; }
.field.sm input { height: 38px; font-size: 13px; }
.shift-code {
  display: inline-block;
  min-width: 22px;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--panel-2);
  border-radius: 6px;
  padding: 2px 6px;
  font-weight: 700;
  font-size: 12px;
}
.sm-btn { height: 38px; font-size: 13px; margin-top: 4px; }

/* ====== 设备状态徽章 ====== */
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}
.actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.actions-cell form.inline { margin: 0; }
.actions-cell select {
  height: 30px;
  background: var(--bg);
  border: 1px solid var(--panel-2);
  color: var(--text);
  border-radius: 6px;
  padding: 0 6px;
  font-size: 12px;
  color-scheme: dark;
  cursor: pointer;
}

@media (max-width: 768px) {
  .shift-layout { grid-template-columns: 1fr; }
}

/* ====== 网关添加方式 ====== */
.gw-method-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.gw-tab {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--panel-2);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.gw-tab.active {
  background: linear-gradient(135deg, #0277bd, #0d47a1);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}
.gw-method-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
}
.gw-created-info {
  background: linear-gradient(135deg, #0d47a122, #0277bd22);
  border: 1px solid #0277bd;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.gw-created-info h4 {
  color: #4fc3f7;
  margin-bottom: 12px;
  font-size: 14px;
}
.gw-cred-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}
.gw-cred-row span {
  color: var(--muted);
  min-width: 90px;
}
.gw-cred-row code {
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 4px;
  color: #4fc3f7;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  user-select: all;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--panel-2);
  margin-top: 40px;
}

@media (max-width: 768px) {
  .kpi-grid, .entry-grid { grid-template-columns: repeat(2, 1fr); }

  /* 移动端侧边栏改为抽屉 */
  .sidebar-toggle { display: block; }
  .sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    transform: translateX(-100%);
    transition: transform .2s;
    z-index: 30;
    box-shadow: 4px 0 20px rgba(0,0,0,.4);
  }
  .sidebar.open { transform: translateX(0); }
  .main { padding: 60px 16px 24px; }
}

/* 语言切换：顶部导航栏 */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.lang-switch a { color: var(--muted); text-decoration: none; padding: 2px 4px; border-radius: 4px; }
.lang-switch a:hover { color: #e2e8f0; }
.lang-switch a.active { color: #fff; background: var(--accent); }
.lang-divider { color: var(--panel-2); }

/* 语言切换：登录页右上角 */
.login-lang {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 10;
  font-size: 13px;
}
.login-lang a { color: var(--muted); text-decoration: none; padding: 2px 6px; border-radius: 4px; }
.login-lang a:hover { color: #e2e8f0; }
.login-lang a.active { color: #fff; background: var(--accent); }
.login-lang .lang-divider { color: var(--panel-2); }

/* ====== 顶栏工厂切换下拉 ====== */
.factory-switch { position: relative; }
.factory-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid #0ea5e9; color: #0ea5e9;
  padding: 3px 10px; border-radius: 6px; cursor: pointer;
  font-size: 14px; font-weight: 600; font-family: inherit;
}
.factory-btn:hover { background: rgba(14,165,233,.14); }
.factory-btn .caret { font-size: 10px; }
.factory-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 240px; max-height: 320px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--panel-2);
  border-radius: 8px; box-shadow: 0 12px 28px rgba(0,0,0,.35);
  padding: 6px; z-index: 60;
}
.factory-switch.open .factory-menu { display: block; }
.factory-menu form { margin: 0; }
.factory-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; background: transparent; border: none;
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
  font-size: 13px; color: var(--text); font-family: inherit;
}
.factory-item:hover { background: var(--panel-2); }
.factory-item.active { color: #0ea5e9; font-weight: 600; }
.factory-item .tick { color: #0ea5e9; }

/* ====== 员工权限设定 ====== */
.perm-table td { vertical-align: top; }
.perm-form { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.perm-checks { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.perm-check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text); cursor: pointer;
}
.perm-check input { accent-color: var(--accent); width: 15px; height: 15px; }
.btn-sm { padding: 5px 12px; font-size: 13px; }

/* ====== 计划工单：计划页 ====== */
.plan-status-bar {
  display: flex; align-items: stretch; gap: 10px;
  background: var(--panel); border: 1px solid var(--panel-2);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px;
  overflow-x: auto;
}
.plan-status-item { flex: 1 0 110px; display: flex; flex-direction: column; gap: 8px; }
.plan-status-label { color: var(--muted); font-size: 13px; }
.plan-status-num { font-size: 26px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.plan-status-dot { width: 22px; height: 22px; border-radius: 6px; display: inline-block; }
.plan-refresh { margin-left: auto; align-self: flex-start; color: var(--muted); font-size: 13px; text-decoration: none; white-space: nowrap; }
.plan-refresh:hover { color: var(--text); }

.plan-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.plan-toolbar .btn-primary {
  width: auto; height: 36px;
  display: inline-flex; align-items: center; text-decoration: none;
}
.plan-toolbar .btn-ghost,
.plan-filter-actions .btn-ghost { height: 36px; }
.plan-filter-actions .btn-primary { width: auto; height: 36px; }

.plan-filter {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px; margin-bottom: 16px;
}
.plan-filter .field { margin-bottom: 0; }
.plan-filter-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }

.plan-table td, .plan-table th { white-space: nowrap; }
.plan-check-col { width: 34px; }
.plan-check-col input, .plan-check { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.plan-progress { display: flex; align-items: center; gap: 8px; }
.plan-progress-bar { width: 70px; height: 8px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.plan-progress-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.alert-ok { background: rgba(34,197,94,.12); color: #86efac; border: 1px solid rgba(34,197,94,.4); }

@media (max-width: 1100px) { .plan-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .plan-filter { grid-template-columns: 1fr; } .plan-status-item { flex: 1 0 90px; } }

/* ====== 计划工单：新建/编辑计划（表单页） ====== */
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-bottom: 12px; margin-bottom: 20px;
  border-bottom: 1px solid var(--panel-2);
}
.crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.crumb .sep { color: var(--muted); opacity: .7; }
.crumb .current { color: var(--text); }
.page-head-actions { display: flex; align-items: center; gap: 10px; }
.btn-save {
  height: 32px; padding: 0 22px; border: none; border-radius: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 13px; cursor: pointer;
}
.btn-save:active { transform: translateY(1px); }
.btn-cancel {
  height: 32px; padding: 0 22px; display: inline-flex; align-items: center;
  border: 1px solid var(--panel-2); border-radius: 4px; background: var(--panel);
  color: var(--text); font-size: 13px; text-decoration: none;
}
.btn-cancel:hover { border-color: var(--accent); }

.section-head {
  display: flex; align-items: center;
  font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 20px;
}
.section-head::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: var(--accent); margin-right: 8px;
}

.form-v .vrow { display: flex; align-items: center; margin-bottom: 16px; }
.form-v .vrow[hidden] { display: none; }
.form-v .vlabel {
  width: 110px; flex-shrink: 0; text-align: right; padding-right: 14px;
  font-size: 13px; color: var(--text); line-height: 1.2;
}
.form-v .vlabel .req { color: var(--danger); margin-right: 4px; }
.form-v .vctrl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.form-v input[type=text],
.form-v input[type=number],
.form-v input[type=date],
.form-v select {
  width: 200px; height: 30px; padding: 0 8px;
  border: 1px solid var(--panel-2); border-radius: 4px;
  background: var(--bg); color: var(--text); font-size: 13px;
}
.form-v input:focus, .form-v select:focus { outline: none; border-color: var(--accent); }
.form-v input:disabled, .form-v input[readonly] {
  background: rgba(148,163,184,.08); color: var(--muted); cursor: not-allowed;
}
.form-v input[type=date] { color-scheme: dark; }
.form-v .w-lg { width: 200px; }
.form-v .w-sm { width: 110px; }
.form-v .w-xs { width: 70px; }
.form-v .unit { font-size: 13px; color: var(--text); }

.hint-btn {
  width: 17px; height: 17px; flex-shrink: 0; padding: 0; border: none; border-radius: 50%;
  background: var(--warn); color: #fff; font-size: 11px; line-height: 17px; cursor: help;
}
.radio-group { display: flex; align-items: center; gap: 24px; }
.radio-group label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.radio-group input[type=radio] { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }
.icon-btn {
  width: 24px; height: 24px; flex-shrink: 0; padding: 0; border: none; border-radius: 4px;
  background: transparent; color: var(--muted); font-size: 15px; cursor: pointer;
}
.icon-btn:hover { color: var(--accent); background: var(--bg); }
.link-add {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--accent); text-decoration: none;
}
.link-add:hover { text-decoration: underline; }
.tip { font-size: 12px; color: var(--warn); }

@media (max-width: 640px) {
  .form-v .vrow { align-items: flex-start; }
  .form-v .vlabel { text-align: left; }
  .page-head { flex-wrap: wrap; }
}

/* ====== 计划工单：工单（左列表 + 右详情/空状态） ====== */
.wo-main { padding: 16px 20px; }
.wo-layout { display: flex; gap: 16px; height: calc(100vh - 88px); min-height: 420px; }
.wo-panel { background: var(--panel); border: 1px solid var(--panel-2); border-radius: var(--radius); }

/* 左：工单列表 */
.wo-list { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; }
.wo-list-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 14px 14px 10px;
}
.wo-list-head h3 { font-size: 15px; font-weight: 600; }

/* 状态筛选：多选浮层（勾选即筛选） */
.wo-filter-wrap { position: relative; }
.wo-filter-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 0; background: none; border: none;
  color: var(--accent); font-size: 13px; cursor: pointer;
}
.wo-filter-toggle:hover { color: var(--accent-2); }
.wo-filter-icon { width: 14px; height: 14px; flex-shrink: 0; }
.wo-filter-count {
  min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px;
  background: var(--accent); color: #fff;
  font-size: 10px; line-height: 15px; text-align: center;
}
.wo-filter-pop {
  position: absolute; top: calc(100% + 6px); right: -6px; z-index: 30;
  min-width: 152px; padding: 6px 4px;
  background: var(--panel); border: 1px solid var(--panel-2);
  border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}
.wo-filter-pop[hidden] { display: none; }
.wo-check {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 6px;
  color: var(--text); font-size: 13px; cursor: pointer;
}
.wo-check:hover { background: rgba(148, 163, 184, .1); }
.wo-check input[type="checkbox"] {
  width: 14px; height: 14px; flex-shrink: 0;
  accent-color: var(--accent); cursor: pointer;
}
.wo-form { padding: 0 14px 12px; }
.wo-search { display: flex; }
.wo-search input {
  flex: 1; min-width: 0; height: 32px; padding: 0 10px;
  border: 1px solid var(--panel-2); border-right: none; border-radius: 4px 0 0 4px;
  background: var(--bg); color: var(--text); font-size: 13px;
}
.wo-search input:focus { outline: none; border-color: var(--accent); }
.wo-search button {
  width: 38px; height: 32px; flex-shrink: 0;
  border: 1px solid var(--accent); border-radius: 0 4px 4px 0;
  background: var(--accent); color: #fff; font-size: 13px; cursor: pointer;
}
.wo-search button:hover { background: var(--accent-2); border-color: var(--accent-2); }
.wo-items {
  flex: 1; overflow-y: auto; border-top: 1px solid var(--panel-2);
  border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px);
}
.wo-items-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 18px 0; }
.wo-item {
  display: block; padding: 10px 14px; color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--panel-2); border-left: 2px solid transparent;
}
.wo-item:hover { background: rgba(148,163,184,.06); }
.wo-item.active { background: rgba(37,99,235,.14); border-left-color: var(--accent); }
.wo-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wo-item-no { font-size: 13px; font-weight: 600; }
.wo-item-sub { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }

/* 右：详情 / 空状态 */
.wo-detail {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow: auto;
}
.wo-detail-inner { width: 100%; max-width: 560px; align-self: flex-start; }
.wo-detail-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--panel-2);
}
.wo-detail-head h3 { font-size: 16px; }
.wo-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.wo-fields > div { min-width: 0; }
.wo-fields dt { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.wo-fields dd { font-size: 13px; color: var(--text); word-break: break-all; }

/* 空状态 */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.empty-state img { width: 240px; max-width: 100%; height: auto; }
.empty-state p { font-size: 13px; color: var(--muted); }

@media (max-width: 768px) {
  .wo-layout { flex-direction: column; height: auto; }
  .wo-list { width: auto; }
  .wo-items { max-height: 260px; }
  .wo-detail { min-height: 300px; }
  .wo-fields { grid-template-columns: 1fr; }
}

/* ====== 工艺管理：目录树 + 文件列表 ====== */
.kb-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.kb-dir { position: sticky; top: 16px; }
.kb-dir h3, .kb-files h3 { font-size: 15px; }

.dir-tree, .dir-children { list-style: none; margin: 0; padding: 0; }
.dir-children { padding-left: 16px; }
.dir-item { margin: 1px 0; }
.dir-row { display: flex; align-items: center; gap: 2px; }
.dir-toggle {
  width: 18px; height: 18px; flex: 0 0 18px; padding: 0;
  background: transparent; border: none; color: var(--muted);
  font-size: 11px; line-height: 18px; cursor: pointer; border-radius: 4px;
}
.dir-toggle:hover { background: rgba(148,163,184,.14); color: var(--text); }
.dir-toggle.placeholder { cursor: default; background: transparent; }
.dir-node {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 7px;
  padding: 6px 8px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 13px;
  border: 1px solid transparent;
}
.dir-node:hover { background: rgba(148,163,184,.10); }
.dir-node.active {
  background: rgba(37,99,235,.20);
  border-color: var(--accent);
  color: #fff;
}
.dir-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.dir-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-count {
  font-size: 11px; color: var(--muted);
  background: rgba(148,163,184,.14);
  padding: 1px 6px; border-radius: 10px;
}
.dir-node.active .dir-count { color: #c7d2fe; background: rgba(37,99,235,.30); }
.dir-item > .dir-children { display: none; }
.dir-item.open > .dir-children { display: block; }

.kb-files-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.kb-files-head h3 { margin-bottom: 0; }
.dir-crumb { font-size: 12px; color: var(--muted); }
.dir-crumb strong { color: var(--text); }
.file-total {
  margin-left: 8px; padding: 1px 8px; border-radius: 10px;
  background: rgba(148,163,184,.14); font-size: 11px;
}
.kb-search { margin: 14px 0 6px; }
.cell-path { color: var(--muted); font-size: 12px; }
.file-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); font-weight: 600; text-decoration: none;
}
.file-icon { font-size: 13px; }
.kb-new { margin-top: 18px; border-top: 1px solid var(--panel-2); padding-top: 12px; }
.kb-new summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 4px 0; }
.kb-new summary:hover, .kb-new[open] summary { color: var(--text); }
.kb-new[open] summary { margin-bottom: 12px; }

@media (max-width: 900px) {
  .kb-layout { grid-template-columns: 1fr; }
  .kb-dir { position: static; }
}

/* ====== 维修保养模块（保养 / 点检 / 维修 / 通知待办） ====== */
.mnt-layout { display: flex; gap: 16px; align-items: flex-start; }

/* 二级导航 */
.mnt-nav {
  width: 170px; flex-shrink: 0;
  background: var(--panel); border: 1px solid var(--panel-2); border-radius: var(--radius);
  padding: 8px; position: sticky; top: 80px;
}
.mnt-nav-group { margin-bottom: 6px; }
.mnt-nav-title { font-size: 12px; color: var(--muted); font-weight: 700; padding: 8px 12px 6px; }
.mnt-nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 13px; margin-bottom: 2px;
  transition: background .15s, color .15s;
}
.mnt-nav-item:hover { background: var(--panel-2); }
.mnt-nav-item.active {
  background: linear-gradient(90deg, rgba(37,99,235,.25), transparent);
  color: #fff; border-left: 3px solid var(--accent); padding-left: 9px;
}
.mnt-nav-item .mnt-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--panel-2); flex-shrink: 0; }
.mnt-nav-item.active .mnt-dot { background: var(--accent); }
.mnt-nav-root { font-weight: 600; }

/* 内容区 */
.mnt-content {
  flex: 1; min-width: 0;
  background: var(--panel); border: 1px solid var(--panel-2);
  border-radius: var(--radius); padding: 16px;
}

/* 工具条 */
.mnt-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.mnt-btn { width: auto; height: 36px; font-size: 13px; padding: 0 16px; }
.mnt-btn-ghost { background: transparent; border: 1px solid var(--accent); color: #a5c8ff; }
.mnt-more { position: relative; margin-left: auto; }
.mnt-more-btn {
  height: 36px; padding: 0 14px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--panel-2); color: var(--text);
  font-size: 13px; cursor: pointer;
}
.mnt-more-btn:hover { border-color: var(--accent); }
.mnt-more-btn .caret { font-size: 11px; margin-left: 4px; }
.mnt-more-menu {
  position: absolute; right: 0; top: 42px; z-index: 20; min-width: 140px;
  background: var(--panel); border: 1px solid var(--panel-2); border-radius: 8px;
  padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  display: flex; flex-direction: column;
}
.mnt-more-menu[hidden] { display: none; }
.mnt-more-menu button {
  background: none; border: none; color: var(--text); text-align: left;
  padding: 8px 12px; border-radius: 6px; font-size: 13px; cursor: pointer;
}
.mnt-more-menu button:hover { background: var(--panel-2); }

/* 筛选栏 */
.mnt-filter { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mnt-sel { display: flex; flex-direction: column; gap: 4px; }
.mnt-sel > span { font-size: 12px; color: var(--muted); }
.mnt-sel select {
  height: 34px; min-width: 130px; background: var(--bg); border: 1px solid var(--panel-2);
  color: var(--text); border-radius: 8px; padding: 0 10px; font-size: 13px;
}
.mnt-search { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.mnt-search input {
  height: 34px; width: 240px; background: var(--bg); border: 1px solid var(--panel-2);
  color: var(--text); border-radius: 8px; padding: 0 10px; font-size: 13px;
}
.mnt-search button {
  height: 34px; width: 38px; border-radius: 8px; cursor: pointer;
  background: var(--accent); border: 1px solid var(--accent); color: #fff; font-size: 14px;
}

/* 表格 */
.mnt-tablewrap { overflow-x: auto; border: 1px solid var(--panel-2); border-radius: 8px; }
.mnt-table th, .mnt-table td { white-space: nowrap; }
.mnt-check { width: 44px; text-align: center; }
.mnt-check input { width: 15px; height: 15px; cursor: pointer; }
.mnt-emptycell { padding: 40px 0 !important; text-align: center; }
.mnt-actions-th { text-align: right; }
.mnt-table td.actions-cell { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.mnt-table td.actions-cell select {
  height: 30px; padding: 0 6px; font-size: 12px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--panel-2); color: var(--text);
}

/* 分页 */
.mnt-pager {
  display: flex; align-items: center; gap: 14px; margin-top: 14px;
  flex-wrap: wrap; font-size: 13px; color: var(--muted);
}
.mnt-total b { color: var(--text); }
.mnt-pagesize select {
  height: 30px; margin-right: 4px; background: var(--bg); border: 1px solid var(--panel-2);
  color: var(--text); border-radius: 6px; padding: 0 6px; font-size: 13px;
}
.mnt-pagenav { display: flex; align-items: center; gap: 6px; }
.mnt-pagebtn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; border-radius: 6px; text-decoration: none;
  background: var(--bg); border: 1px solid var(--panel-2); color: var(--text); font-size: 14px;
}
.mnt-pagebtn:hover { border-color: var(--accent); }
.mnt-pagebtn.disabled { opacity: .45; pointer-events: none; }
.mnt-pagecur {
  min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; background: var(--accent); color: #fff; font-weight: 600;
}
.mnt-goto { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.mnt-goto input {
  width: 60px; height: 30px; background: var(--bg); border: 1px solid var(--panel-2);
  color: var(--text); border-radius: 6px; padding: 0 8px; font-size: 13px;
}

/* 新增弹窗 */
.mnt-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.mnt-modal[hidden] { display: none; }
.mnt-modal-mask { position: absolute; inset: 0; background: rgba(15,23,42,.72); }
.mnt-modal-box {
  position: relative; width: 640px; max-width: 94vw; max-height: 88vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--panel-2); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.mnt-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mnt-modal-head h3 { font-size: 16px; }
.mnt-modal-x { background: none; border: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.mnt-form-hint { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.mnt-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mnt-form .field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.mnt-form .field > span { font-size: 12px; color: var(--muted); }
.mnt-form .field input, .mnt-form .field select, .mnt-form .field textarea {
  background: var(--bg); border: 1px solid var(--panel-2); color: var(--text);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit;
}
.mnt-form .field input, .mnt-form .field select { height: 38px; }
.mnt-form .field textarea { resize: vertical; }
.mnt-form-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.mnt-cancel {
  height: 40px; padding: 0 18px; border-radius: 8px; background: transparent;
  border: 1px solid var(--panel-2); color: var(--text); font-size: 14px; cursor: pointer;
}
.mnt-form-foot .btn-primary { width: auto; height: 40px; padding: 0 22px; font-size: 14px; }

@media (max-width: 900px) {
  .mnt-layout { flex-direction: column; }
  .mnt-nav { width: 100%; position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .mnt-nav-group { margin: 0; }
  .mnt-search { margin-left: 0; }
  .mnt-search input { width: 180px; }
  .mnt-form-row { grid-template-columns: 1fr; }
}
