/* =====================================================================
   GallopWave 智造工单系统 - 全局样式
   主题：深蓝左侧侧栏 + 白色主区域 + 绿色主题按钮
===================================================================== */

:root {
  /* 主色 */
  --brand-deep:      #1e3a8a;   /* 深蓝（侧栏） */
  --brand-deep-2:    #1e40af;
  --brand-light:     #3b82f6;
  --brand-bg-soft:   #eef4ff;

  /* 主题绿（按钮/强调） */
  --primary:         #10b981;   /* 主色 绿 */
  --primary-hover:   #059669;
  --primary-soft:    #d1fae5;

  /* 状态色 */
  --info:            #0ea5e9;
  --warning:         #f59e0b;
  --danger:          #ef4444;
  --success:         #10b981;
  --gray:            #6b7280;

  /* 文本 */
  --text-1:          #0f172a;
  --text-2:          #475569;
  --text-3:          #94a3b8;
  --text-onbrand:    #ffffff;
  --text-onbrand-2:  #c7d2fe;

  /* 表面 */
  --bg-page:         #f3f5f9;
  --bg-card:         #ffffff;
  --bg-hover:        #f8fafc;
  --bg-row-hover:    #f0f9ff;
  --border:          #e2e8f0;
  --border-strong:   #cbd5e1;

  /* 阴影 */
  --shadow-sm:  0 1px 2px rgba(15,23,42,.06);
  --shadow-md:  0 4px 12px rgba(15,23,42,.08);
  --shadow-lg:  0 10px 30px rgba(15,23,42,.12);

  /* 圆角 */
  --radius:     6px;
  --radius-lg:  10px;

  /* 尺寸 */
  --sidebar-w:    220px;
  --sidebar-c-w:  220px;
  --topbar-h:     52px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  color: var(--text-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ========= 启动屏 ========= */
.boot-screen {
  height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--bg-page);
}
.boot-logo {
  width: 72px; height: 72px; border-radius: 16px;
  background: #fff; object-fit: cover;
  box-shadow: var(--shadow-lg);
  margin-bottom: 16px;
}
.boot-name { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.boot-tip  { font-size: 12px; color: var(--text-3); }

/* ========= 登录页 ========= */
.login-shell {
  min-height: 100vh; display: flex; align-items: stretch; position: relative;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #0ea5e9 100%);
}
.login-footer {
  position: absolute; left: 0; right: 0; bottom: 14px;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  flex-wrap: wrap; padding: 0 24px;
  color: rgba(255,255,255,.85); font-size: 12px;
  text-align: center;
}
.login-footer-copyright { opacity: .9; }
.login-footer-beian {
  display: inline-flex; align-items: center; gap: 4px;
  color: rgba(255,255,255,.9); text-decoration: none;
  transition: color .15s;
}
.login-footer-beian:hover { color: #fff; text-decoration: underline; }
.login-footer-shield { width: 14px; height: 14px; flex-shrink: 0; }
.login-left {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #fff; padding: 40px;
}
.login-brand {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.login-brand-logo {
  width: 60px; height: 60px; border-radius: 14px;
  background: rgba(255,255,255,.95);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  object-fit: cover;
  flex-shrink: 0;
}
.login-brand-title { font-size: 26px; font-weight: 700; }
.login-brand-sub   { font-size: 14px; opacity: .8; margin-top: 4px; }
.login-features { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; max-width: 480px; }
.login-feature  { display: flex; align-items: center; gap: 8px; font-size: 13px; opacity: .9; }
.login-feature-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .7; }

.login-right {
  width: 480px; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px;
}
.login-form { width: 100%; max-width: 360px; }
.login-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.login-tab {
  padding: 12px 18px; font-size: 14px; font-weight: 500;
  color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent;
}
.login-tab.active { color: var(--brand-deep); border-bottom-color: var(--brand-deep); font-weight: 600; }

.login-row {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 12px; height: 42px; margin-bottom: 14px;
  background: #fff; transition: border-color .15s;
}
.login-row.focus-within { border-color: var(--brand-light); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.login-row input {
  border: none; outline: none; flex: 1; font-size: 14px; background: transparent;
  color: var(--text-1);
}
.login-row-icon { width: 16px; height: 16px; color: var(--text-3); }
.login-captcha-row { display: flex; gap: 10px; align-items: center; }
.login-captcha-row .login-row { flex: 1; margin-bottom: 0; }
.login-captcha-img {
  width: 130px; height: 42px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #f6f8fa; display: flex; align-items: center; justify-content: center;
  font-weight: 700; letter-spacing: 4px; color: var(--brand-deep);
}
.login-captcha-img svg { width: 100%; height: 100%; }

.login-btn {
  width: 100%; height: 44px; border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff; font-size: 15px; font-weight: 600;
  border-radius: var(--radius); margin-top: 8px; transition: opacity .15s;
}
.login-btn:hover { opacity: .92; }
.login-btn:disabled { opacity: .6; cursor: not-allowed; }

.login-agree { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 16px; line-height: 1.7; }
.login-agree a { color: var(--brand-light); }
.login-agree input[type="checkbox"] { vertical-align: middle; margin-right: 4px; }

.login-link { text-align: center; font-size: 12px; color: var(--text-2); margin-top: 14px; }
.login-link a { color: var(--brand-light); }
.login-back-home { font-size: 12px; color: var(--text-3); margin-top: 16px; text-align: center; }

/* ========= 主布局 ========= */
.layout { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: var(--sidebar-w); background: var(--brand-deep); color: #fff;
  flex-shrink: 0; display: flex; flex-direction: column; overflow: hidden;
}
.sidebar-head {
  height: var(--topbar-h); display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.sidebar-logo {
  width: 32px; height: 32px; border-radius: 8px;
  background: #fff; object-fit: cover;
  flex-shrink: 0;
}
.sidebar-title { font-size: 15px; font-weight: 600; line-height: 1.2; }
.sidebar-sub   { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 2px; }

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

.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 16px; cursor: pointer;
  font-size: 13.5px; color: rgba(255,255,255,.78);
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  user-select: none;
  position: relative;
}
.menu-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.menu-item.active {
  background: rgba(16,185,129,.10);
  border-left-color: var(--primary);
  color: #fff; font-weight: 500;
}
.menu-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: .9; color: rgba(255,255,255,.9); }
.menu-item.active .menu-icon { color: var(--primary); opacity: 1; }
.menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-arrow {
  margin-left: auto; transition: transform .15s; opacity: .55; font-size: 10px;
  flex-shrink: 0;
}
.menu-item.expanded .menu-arrow { transform: rotate(90deg); opacity: .9; }

.menu-group { padding-left: 14px; border-left: 1px solid rgba(255,255,255,.06); margin-left: 22px; }
.menu-child {
  padding: 7px 14px 7px 16px; font-size: 12.5px;
  color: rgba(255,255,255,.6); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 6px; margin: 1px 6px 1px 0;
  transition: all .15s;
}
.menu-child:hover { color: #fff; background: rgba(255,255,255,.06); }
.menu-child.active { color: var(--primary); font-weight: 500; background: rgba(16,185,129,.10); }
.menu-child .badge { background: var(--primary); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 9px; }

/* ========= 主体 ========= */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  height: var(--topbar-h); background: #fff;
  display: flex; align-items: center; padding: 0 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.topbar-crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; }
.topbar-crumb .sep { color: var(--text-3); }
.topbar-crumb .cur { color: var(--text-1); font-weight: 500; }

.topbar-actions { display: flex; align-items: center; gap: 4px; }
.topbar-action {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); color: var(--text-2); cursor: pointer;
  position: relative; transition: all .15s;
}
.topbar-action:hover { background: var(--bg-hover); color: var(--brand-deep); }
.topbar-action svg { width: 18px; height: 18px; }
.topbar-action .badge {
  position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 600;
  border-radius: 9px; padding: 0 4px; display: flex; align-items: center; justify-content: center;
}
.topbar-user {
  display: flex; align-items: center; gap: 8px; padding: 0 8px;
  cursor: pointer; height: 34px; border-radius: var(--radius);
  margin-left: 4px;
}
.topbar-user:hover { background: var(--bg-hover); }
.topbar-user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px;
}
.topbar-user-name { font-size: 13px; color: var(--text-1); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dropdown-menu {
  position: absolute; right: 12px; top: calc(var(--topbar-h) + 4px);
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 4px 0; min-width: 160px;
  z-index: 100; border: 1px solid var(--border);
}
.dropdown-item { padding: 8px 14px; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 8px; color: var(--text-1); }
.dropdown-item:hover { background: var(--bg-hover); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ========= 内容区 ========= */
.content { flex: 1; overflow: auto; padding: 16px; background: var(--bg-page); }

.page-hd {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.page-hd-title { font-size: 16px; font-weight: 600; color: var(--text-1); }
.page-hd-meta  { color: var(--text-3); font-size: 12px; }
.page-hd-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ========= 卡片 ========= */
.card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 16px;
}
.card-hd { display: flex; align-items: center; margin-bottom: 12px; }
.card-hd-title { font-size: 14px; font-weight: 600; color: var(--text-1); }
.card-hd-extra { margin-left: auto; font-size: 12px; color: var(--brand-light); cursor: pointer; }
.card-hd-extra:hover { text-decoration: underline; }

/* ========= 按钮 ========= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 14px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: #fff; color: var(--text-1);
  font-size: 13px; cursor: pointer;
  transition: all .15s; gap: 4px;
  white-space: nowrap; flex-shrink: 0;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid transparent; }
.btn-ghost:hover { background: var(--bg-hover); border-color: transparent; color: var(--brand-deep); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-group { display: inline-flex; gap: 4px; }

/* ========= 表单 ========= */
.form-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.form-row .form-input { flex: 1; min-width: 160px; }
.form-row .form-label-fixed { width: 90px; color: var(--text-2); font-size: 13px; text-align: right; }

.input, select.input, textarea.input {
  height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; font-size: 13px; color: var(--text-1);
  outline: none; transition: border-color .15s;
  font-family: inherit;
}
textarea.input { height: auto; min-height: 80px; padding: 8px 12px; resize: vertical; }
.input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16,185,129,.12);
}
.input.w-sm { width: 130px; }
.input.w-md { width: 200px; }
.input.w-lg { width: 280px; }
.input.full { width: 100%; }

.form-label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.form-label.required::before { content: '*'; color: var(--danger); margin-right: 4px; }

/* ========= 筛选栏 ========= */
.filter-bar {
  background: #fff; padding: 14px 16px;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  margin-bottom: 12px;
}
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-row .filter-spacer { flex: 1; }
.filter-row .filter-btn-group { display: flex; gap: 6px; }
.filter-row .filter-btn-group .btn { font-size: 12px; padding: 0 10px; height: 28px; }
.filter-row .filter-btn-group .btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.filter-label { font-size: 13px; color: var(--text-2); margin-right: 4px; }

/* ========= 表格 ========= */
.table-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.table-card-hd {
  display: flex; align-items: center; padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.table-card-hd-title { font-size: 14px; font-weight: 600; }
.table-card-hd-actions { margin-left: auto; display: flex; gap: 6px; }
.table-card-hd-meta { color: var(--text-3); font-size: 12px; margin-left: 8px; }

.table-scroll { overflow-x: auto; }
table.gw-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 13px;
}
.gw-table thead th {
  background: #f8fafc; padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 600; color: var(--text-2); text-align: left;
  white-space: nowrap; position: sticky; top: 0;
}
.gw-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
  vertical-align: middle;
}
.gw-table tbody tr:hover { background: var(--bg-row-hover); }
.gw-table tbody tr.selected { background: rgba(16,185,129,.06); }
.gw-table .checkbox-cell { width: 36px; text-align: center; }
.gw-table .op-cell { white-space: nowrap; }
.gw-table .col-fixed { position: sticky; right: 0; background: #fff; box-shadow: -1px 0 0 var(--border); }
.gw-table tbody tr:hover .col-fixed { background: var(--bg-row-hover); }
.gw-table .op-actions { display: flex; gap: 6px; align-items: center; }
.gw-table .op-link {
  color: var(--brand-light); font-size: 12px; cursor: pointer;
}
.gw-table .op-link:hover { text-decoration: underline; }
.gw-table .op-link.danger { color: var(--danger); }
.gw-table .op-link.primary { color: var(--primary); }
.gw-table .wo-op .op-link { margin-right: 10px; font-weight: 600; }
.gw-table .wo-op .op-link:last-child { margin-right: 0; font-weight: 400; }

/* 空状态 */
.empty-state {
  padding: 60px 20px; text-align: center; color: var(--text-3);
}
.empty-state-ico {
  width: 80px; height: 80px; margin: 0 auto 12px; opacity: .35;
}
.empty-state-text { font-size: 13px; }

/* ========= 状态/标签 ========= */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 12px; line-height: 1.4;
}
.tag-default { background: var(--bg-hover); color: var(--text-2); }
.tag-info    { background: #e0f2fe; color: #0369a1; }
.tag-success { background: var(--primary-soft); color: var(--primary-hover); }
.tag-warning { background: #fef3c7; color: #b45309; }
.tag-danger  { background: #fee2e2; color: #b91c1c; }
.tag-purple  { background: #ede9fe; color: #6d28d9; }

.tags-list { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.tags-list .tag { font-size: 11px; padding: 1px 6px; }

/* 开关 */
.switch {
  display: inline-block; position: relative; width: 32px; height: 18px;
  background: #cbd5e1; border-radius: 9px; cursor: pointer; transition: background .15s;
}
.switch::before {
  content: ''; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px;
  background: #fff; border-radius: 50%; transition: transform .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch.on { background: var(--primary); }
.switch.on::before { transform: translateX(14px); }
.switch.small { width: 26px; height: 16px; }
.switch.small::before { width: 12px; height: 12px; }
.switch.on.small::before { transform: translateX(10px); }

/* ========= 分页 ========= */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px;
}
.pagination-info { color: var(--text-3); }
.pagination-controls { display: flex; align-items: center; gap: 4px; }
.pg-btn {
  min-width: 28px; height: 28px; padding: 0 6px;
  border: 1px solid var(--border); background: #fff;
  border-radius: var(--radius); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.pg-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pg-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pg-btn:disabled { opacity: .5; cursor: not-allowed; }
.pg-size-select { height: 28px; padding: 0 6px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }

/* ========= 弹窗 ========= */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
}
.modal {
  background: #fff; border-radius: var(--radius-lg);
  width: 100%; max-width: 720px; max-height: 86vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-lg); animation: modal-in .15s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(-10px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal.wide { max-width: 960px; }
.modal.narrow { max-width: 480px; }
.modal-hd {
  display: flex; align-items: center; padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 15px; font-weight: 600; }
.modal-close {
  margin-left: auto; width: 28px; height: 28px; border-radius: 4px;
  background: transparent; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 18px;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-1); }
.modal-body { padding: 18px; overflow-y: auto; flex: 1; }
.modal-ft {
  padding: 12px 18px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ========= 工作台专用 ========= */
.workbench-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(12, 1fr);
}
.switch-cards-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 1280px) {
  .switch-cards-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .switch-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-4  { grid-column: span 4; }
.col-6  { grid-column: span 6; }
.col-3  { grid-column: span 3; }

.switch-card {
  display: flex; align-items: center; padding: 14px 16px; gap: 12px;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-light));
  border-radius: var(--radius-lg); color: #fff;
  min-width: 0;
}
.switch-card.green { background: linear-gradient(135deg, var(--primary), var(--primary-hover)); }
.switch-card.purple { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.switch-card.orange { background: linear-gradient(135deg, #ea580c, #f59e0b); }
.switch-card.cyan   { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.switch-card-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.switch-card-icon svg { width: 20px; height: 20px; }
.switch-card-meta { flex: 1; min-width: 0; }
.switch-card-title { font-size: 13px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-card-value { font-size: 18px; font-weight: 700; margin-top: 2px; white-space: nowrap; }
.switch-card-action {
  width: 36px; height: 20px; background: rgba(255,255,255,.3);
  border-radius: 10px; cursor: pointer; position: relative; flex-shrink: 0;
}
.switch-card-action.on { background: rgba(255,255,255,.55); }
.switch-card-action::before {
  content: ''; position: absolute; left: 2px; top: 2px;
  width: 16px; height: 16px; background: #fff; border-radius: 50%;
  transition: transform .15s;
}
.switch-card-action.on::before { transform: translateX(16px); }

/* 工序进度圆环 */
.progress-dots {
  display: flex; align-items: center; gap: 4px;
}
.progress-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: #e2e8f0; color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  position: relative;
}
.progress-dot.done   { background: var(--primary); color: #fff; }
.progress-dot.active { background: #fff; border: 2px solid var(--primary); color: var(--primary); }
.progress-dot-line { width: 6px; height: 2px; background: #e2e8f0; }
.progress-dot-line.done { background: var(--primary); }

.progress-bar { width: 100%; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(to right, var(--primary), #34d399); }

/* 状态标签 */
.status-tag { padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 500; display: inline-block; }
.status-pending   { background: #fef3c7; color: #b45309; }
.status-producing { background: #dbeafe; color: #1d4ed8; }
.status-paused    { background: #ffedd5; color: #c2410c; }
.status-completed { background: var(--primary-soft); color: var(--primary-hover); }
.status-cancelled { background: #fee2e2; color: #b91c1c; }
.status-pass      { background: var(--primary-soft); color: var(--primary-hover); }
.status-fail      { background: #fee2e2; color: #b91c1c; }
.status-active    { background: #dbeafe; color: #1d4ed8; }
.status-finished  { background: var(--primary-soft); color: var(--primary-hover); }

/* 仪表卡片 */
.stat-card {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 16px;
  display: flex; align-items: center; gap: 12px;
}
.stat-card-ico {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--brand-bg-soft); color: var(--brand-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
}
.stat-card-ico.green { background: var(--primary-soft); color: var(--primary); }
.stat-card-ico.orange { background: #fef3c7; color: #b45309; }
.stat-card-ico.red    { background: #fee2e2; color: #b91c1c; }
.stat-card-value { font-size: 22px; font-weight: 700; line-height: 1.2; }
.stat-card-label { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.stat-card.link { cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s; position: relative; }
.stat-card.link:hover { box-shadow: 0 6px 18px rgba(30,58,138,.12); transform: translateY(-2px); border-color: var(--brand); }
.stat-card-go { margin-left: auto; font-size: 12px; color: var(--brand); opacity: 0; transition: opacity .15s; font-weight: 600; }
.stat-card.link:hover .stat-card-go { opacity: 1; }
.todo-cell.link { transition: box-shadow .15s, border-color .15s, background .15s; }
.todo-cell.link:hover { box-shadow: 0 4px 14px rgba(30,58,138,.12); border-color: var(--brand); background: var(--brand-bg-soft); }

/* 快捷入口 */
.quick-entry { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.quick-entry-item {
  position: relative;
  padding: 18px 12px 14px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s;
  overflow: hidden;
}
.quick-entry-item::before {
  content: '';
  position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 2px 2px 0;
  background: var(--card-color, var(--brand-light));
  transform: scaleY(0); transform-origin: center;
  transition: transform .2s ease;
}
.quick-entry-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
  border-color: var(--card-color, var(--brand-light));
}
.quick-entry-item:hover::before { transform: scaleY(1); }
.quick-entry-ico {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ico-bg, var(--primary-soft));
  color: var(--card-color, var(--brand-light));
  transition: background .2s, color .2s, transform .2s;
}
.quick-entry-item:hover .quick-entry-ico {
  background: var(--card-color, var(--brand-light));
  color: #fff;
  transform: scale(1.06);
}
.quick-entry-ico svg { width: 22px; height: 22px; }
.quick-entry-title { font-size: 14px; font-weight: 600; color: var(--text-1); white-space: nowrap; }
.quick-entry-sub   { font-size: 11px; color: var(--text-3); white-space: nowrap; }

/* 配色 */
.qe-blue   { --card-color: #3b82f6; --ico-bg: rgba(59,130,246,.10); }
.qe-cyan   { --card-color: #06b6d4; --ico-bg: rgba(6,182,212,.10); }
.qe-purple { --card-color: #8b5cf6; --ico-bg: rgba(139,92,246,.10); }
.qe-orange { --card-color: #f59e0b; --ico-bg: rgba(245,158,11,.10); }
.qe-green  { --card-color: #10b981; --ico-bg: rgba(16,185,129,.10); }
.qe-red    { --card-color: #ef4444; --ico-bg: rgba(239,68,68,.10); }

/* 公告 */
.notice-list { display: flex; flex-direction: column; }
.notice-item {
  padding: 10px 0; border-bottom: 1px dashed var(--border);
  display: flex; align-items: center; gap: 10px;
}
.notice-item:last-child { border-bottom: none; }
.notice-item-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex-shrink: 0;
}
.notice-item-title { flex: 1; font-size: 13px; }
.notice-item-time { font-size: 12px; color: var(--text-3); flex-shrink: 0; }
.notice-top { color: var(--danger); font-weight: 600; }

/* 列配置弹窗 */
.col-config-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.col-config-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-radius: 4px; cursor: pointer;
}
.col-config-item:hover { background: var(--bg-hover); }
.col-config-item input[type="checkbox"] { margin: 0; }
.col-config-item.disabled { opacity: .5; cursor: not-allowed; }

/* 扩展字段弹窗 */
.ext-field-grid { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; align-items: center; }
.ext-field-grid > * { min-width: 0; }

/* 消息中心 */
.msg-category-bar {
  display: flex; gap: 4px; padding: 8px 16px; background: var(--bg-hover);
  border-radius: var(--radius); margin-bottom: 12px; flex-wrap: wrap;
}
.msg-cat-btn {
  padding: 6px 14px; border-radius: 6px; font-size: 13px;
  cursor: pointer; background: #fff; border: 1px solid transparent;
}
.msg-cat-btn.active { background: var(--primary); color: #fff; }
.msg-type-bar {
  display: flex; gap: 4px; margin-bottom: 12px;
}
.msg-type-btn {
  padding: 4px 12px; border-radius: 4px; font-size: 12px;
  cursor: pointer; color: var(--text-2);
}
.msg-type-btn.active { color: var(--primary); font-weight: 600; }
.msg-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; background: #fff;
  border-radius: var(--radius); border: 1px solid var(--border);
  margin-bottom: 8px; cursor: pointer;
}
.msg-item:hover { background: var(--bg-hover); }
.msg-item.unread { background: #fffbf0; border-color: #fde68a; }
.msg-ico {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.msg-ico.alarm  { background: #fee2e2; color: var(--danger); }
.msg-ico.todo   { background: #fef3c7; color: #b45309; }
.msg-ico.notice { background: #dbeafe; color: #1d4ed8; }
.msg-body { flex: 1; min-width: 0; }
.msg-title { font-weight: 500; }
.msg-content { color: var(--text-2); font-size: 12px; margin-top: 4px; }
.msg-time { color: var(--text-3); font-size: 12px; flex-shrink: 0; }
.msg-unread-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--danger);
  margin-right: 6px;
}
.msg-type-tag {
  display: inline-block; font-size: 11px; line-height: 1; padding: 3px 7px; border-radius: 10px;
  margin-left: 8px; vertical-align: middle; font-weight: 500;
}
.msg-type-tag.alarm { background: #fee2e2; color: var(--danger); }
.msg-type-tag.todo { background: #fef3c7; color: #b45309; }
.msg-type-tag.notify { background: #dbeafe; color: #1d4ed8; }

/* 大屏占位 */
.dashboard-placeholder {
  height: 60vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: #fff; border-radius: var(--radius-lg);
  border: 1px dashed var(--border-strong);
  color: var(--text-3);
}
.dashboard-placeholder-ico { font-size: 48px; margin-bottom: 12px; }

/* 详情页 */
.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px;
}
.detail-item { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.detail-item-label { color: var(--text-3); font-size: 12px; min-width: 80px; }
.detail-item-value { color: var(--text-1); font-size: 13px; flex: 1; }

/* Toast */
.toast-stack {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast {
  padding: 8px 16px; border-radius: 6px; background: #fff;
  box-shadow: var(--shadow-md); font-size: 13px;
  display: flex; align-items: center; gap: 8px;
  animation: toast-in .15s ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.toast.success { border-left: 4px solid var(--primary); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--info); }

/* 法律文档（用户协议/隐私政策） */
.legal-doc {
  max-height: 60vh; overflow-y: auto;
  padding: 4px 0;
}
.legal-doc h2 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
.legal-doc h3 { font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
.legal-doc p  { line-height: 1.8; margin: 6px 0; font-size: 13px; color: var(--text-2); }
.legal-doc ul, .legal-doc ol { padding-left: 22px; line-height: 1.8; font-size: 13px; color: var(--text-2); }
.legal-doc li { margin: 4px 0; }

/* 响应式小屏适配 */
@media (max-width: 1100px) {
  .workbench-grid > .col-3 { grid-column: span 6; }
  .workbench-grid > .col-4 { grid-column: span 12; }
  .workbench-grid > .col-8 { grid-column: span 12; }
}
@media (max-width: 768px) {
  .sidebar { display: none; }
  .login-left { display: none; }
  .login-right { width: 100%; }
}

/* ===================== 机台报表 ===================== */
.report-summary { display: flex; gap: 14px; flex-wrap: wrap; margin: 4px 0 14px; }
.summary-card { flex: 1; min-width: 140px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(16,24,40,.04); }
.summary-val { font-size: 26px; font-weight: 700; color: var(--brand-deep); }
.summary-label { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.range-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid #d8dee9; background: #fff; color: var(--text-2); padding: 5px 12px; border-radius: 16px; cursor: pointer; font-size: 13px; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.custom-range { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.report-machine .filter-label { min-width: 64px; }

/* ===================== 经营分析报表 ===================== */
.report-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 8px; }
.report-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px 8px; box-shadow: 0 1px 3px rgba(16,24,40,.04); }
.report-card-hd { font-size: 15px; font-weight: 600; color: var(--brand-deep); margin-bottom: 6px; }
.report-chart { width: 100%; height: 300px; }
@media (max-width: 1080px) { .report-grid { grid-template-columns: 1fr; } }

/* ===================== 移动端卡片配置 ===================== */
.mobile-card-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.mobile-card-field { display: flex; align-items: center; gap: 8px; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px; cursor: pointer; font-size: 13px; }
.mobile-card-field:hover { border-color: var(--primary); }
.mobile-card-preview-title { font-size: 13px; color: var(--text-3); margin: 6px 0; }
.mobile-card-preview { background: #f6f8fa; border-radius: 10px; padding: 14px; display: flex; justify-content: center; }
.mcard { width: 240px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.mcard-hd { background: var(--brand-deep); color: #fff; padding: 8px 12px; font-size: 13px; font-weight: 600; }
.mcard-row { display: flex; justify-content: space-between; padding: 8px 12px; border-top: 1px solid #f0f2f5; font-size: 13px; }
.mcard-row .mcard-val { color: var(--text-3); }
.mcard-empty { color: var(--text-3); text-align: center; padding: 24px; }

/* =====================================================================
   大屏专用样式（深色科技蓝 — gb-* 前缀）
   - 与现有浅色主题完全隔离，只在 .gb-board 容器内生效
   ===================================================================== */

/* 整块背景：深蓝径向渐变 + 细网格 + 中心光晕 */
.gb-board {
  position: relative;
  background:
    radial-gradient(circle at 50% 0%, rgba(45, 212, 255, 0.12) 0%, transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(59, 130, 246, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #050d1f 0%, #0a1f3a 50%, #050d1f 100%);
  min-height: calc(100vh - 60px);
  color: #e6f4ff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}
/* 背景网格（细化） */
.gb-board::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(45, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 40%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, black 0%, transparent 75%);
  pointer-events: none; z-index: 0;
}

/* 顶栏 */
.gb-topbar {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: linear-gradient(180deg, rgba(8, 22, 48, 0.85) 0%, rgba(8, 22, 48, 0.0) 100%);
  border-bottom: 1px solid rgba(45, 212, 255, 0.2);
  backdrop-filter: blur(8px);
}
.gb-topbar-left { display: flex; align-items: center; gap: 14px; }
.gb-topbar-back {
  background: rgba(45, 212, 255, 0.08); border: 1px solid rgba(45, 212, 255, 0.3);
  color: #e6f4ff; padding: 6px 14px; border-radius: 4px; cursor: pointer;
  font-size: 13px; transition: all .15s;
}
.gb-topbar-back:hover { background: rgba(45, 212, 255, 0.18); border-color: #2dd4ff; }
.gb-topbar-icon { font-size: 24px; filter: drop-shadow(0 0 6px rgba(45, 212, 255, 0.6)); }
.gb-topbar-title { font-size: 20px; font-weight: 600; letter-spacing: 1px;
  background: linear-gradient(180deg, #ffffff 0%, #2dd4ff 100%); -webkit-background-clip: text; background-clip: text;
  color: transparent; text-shadow: 0 0 18px rgba(45, 212, 255, 0.4);
}
.gb-topbar-desc { color: #8fb6d9; font-size: 12px; padding-left: 8px; border-left: 1px solid rgba(45, 212, 255, 0.3); }
.gb-topbar-right { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #8fb6d9; }
.gb-topbar-time { font-family: ui-monospace, monospace; font-size: 13px; color: #2dd4ff;
  text-shadow: 0 0 8px rgba(45, 212, 255, 0.5);
}
.gb-topbar-source { padding: 2px 8px; border-radius: 3px; border: 1px solid; }
.gb-source-api  { color: #22d3a7; border-color: rgba(34, 211, 167, 0.4); background: rgba(34, 211, 167, 0.08); }
.gb-source-mock { color: #f7b955; border-color: rgba(247, 185, 85, 0.4); background: rgba(247, 185, 85, 0.08); }
.gb-topbar-btn {
  background: rgba(45, 212, 255, 0.08); border: 1px solid rgba(45, 212, 255, 0.3);
  color: #e6f4ff; padding: 6px 14px; border-radius: 4px; cursor: pointer;
  font-size: 12px; transition: all .15s;
}
.gb-topbar-btn:hover { background: rgba(45, 212, 255, 0.18); border-color: #2dd4ff; }

/* 网格布局（默认 12×6） */
.gb-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(140px, 1fr);
  gap: 14px;
  padding: 18px 24px 24px;
}
.gb-cell { min-width: 0; min-height: 0; }

/* 卡片面板 */
.gb-panel {
  position: relative; height: 100%; width: 100%;
  background: rgba(8, 22, 48, 0.65);
  border: 1px solid rgba(45, 212, 255, 0.25);
  border-radius: 4px;
  box-shadow:
    0 0 24px rgba(45, 212, 255, 0.10),
    inset 0 0 24px rgba(45, 212, 255, 0.04);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.gb-panel:hover { border-color: rgba(45, 212, 255, 0.5); box-shadow: 0 0 30px rgba(45, 212, 255, 0.2), inset 0 0 24px rgba(45, 212, 255, 0.06); }

/* 四角 L 形装饰 */
.gb-panel::before, .gb-panel::after,
.gb-panel-head::before, .gb-panel-head::after {
  content: ''; position: absolute; width: 12px; height: 12px;
  border: 2px solid #2dd4ff;
  pointer-events: none;
}
.gb-panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.gb-panel::after  { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.gb-panel-head::before { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.gb-panel-head::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* 面板标题栏 */
.gb-panel-head {
  display: flex; align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(45, 212, 255, 0.15);
  position: relative;
}
.gb-panel-bar {
  width: 4px; height: 16px; background: linear-gradient(180deg, #2dd4ff, #3b82f6);
  margin-right: 8px; border-radius: 2px;
  box-shadow: 0 0 8px rgba(45, 212, 255, 0.6);
}
.gb-panel-title {
  font-size: 14px; font-weight: 600;
  color: #e6f4ff; letter-spacing: 1px;
}
.gb-panel-bar-end { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(45, 212, 255, 0.4), transparent); margin-left: 12px; }
.gb-panel-body { flex: 1; min-height: 0; padding: 8px 12px 12px; position: relative; overflow: auto; }
.gb-panel-desc {
  color: #5d7e9a; font-size: 11px; line-height: 1.6;
  padding: 8px 0 0; margin-top: 8px;
  border-top: 1px dashed rgba(45, 212, 255, 0.15);
}

/* ECharts 容器（关键：必须 inner div + absolute inset:0 防拉伸） */
.gb-chart { position: absolute; inset: 0; width: 100%; height: 100%; }
.gb-3d { cursor: grab; }
.gb-3d:active { cursor: grabbing; }

/* ===== KPI 数字条 ===== */
.gb-kpi-grid {
  display: grid; gap: 8px; height: 100%; align-items: stretch;
}
.gb-kpi-cell {
  position: relative; padding: 14px 16px;
  background: linear-gradient(135deg, rgba(45, 212, 255, 0.06) 0%, rgba(59, 130, 246, 0.04) 100%);
  border: 1px solid rgba(45, 212, 255, 0.15);
  border-radius: 4px;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  overflow: hidden;
}
.gb-kpi-cell::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, #2dd4ff, transparent);
  animation: gb-scan 4s linear infinite;
}
@keyframes gb-scan { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.gb-kpi-label { color: #8fb6d9; font-size: 12px; letter-spacing: 1px; }
.gb-kpi-value { display: flex; align-items: baseline; gap: 4px; }
.gb-flip {
  font-size: 28px; font-weight: 700;
  background: linear-gradient(180deg, #ffffff 0%, #2dd4ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-family: ui-monospace, "SF Mono", monospace;
  text-shadow: 0 0 12px rgba(45, 212, 255, 0.4);
  display: inline-block;
}
.gb-flip-anim { animation: gb-flip .5s ease-out; }
@keyframes gb-flip {
  0% { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.gb-kpi-unit { color: #5d7e9a; font-size: 12px; }
.gb-kpi-bar {
  position: absolute; bottom: 0; left: 0; height: 3px; width: 30%;
  background: linear-gradient(90deg, #2dd4ff, transparent);
}

/* ===== 告警滚动 ===== */
.gb-alarm-roll { display: flex; flex-direction: column; gap: 6px; height: 100%; overflow: hidden; }
.gb-alarm-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 3px;
  background: rgba(45, 212, 255, 0.04);
  border-left: 2px solid #f7b955;
  font-size: 12px;
  transition: all .15s;
}
.gb-alarm-row:hover { background: rgba(45, 212, 255, 0.10); transform: translateX(2px); }
.gb-alarm-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #f7b955;
  box-shadow: 0 0 6px #f7b955;
  animation: gb-blink 1.5s ease-in-out infinite;
}
@keyframes gb-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.gb-alarm-title { flex: 1; color: #e6f4ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-alarm-tag {
  font-size: 10px; padding: 1px 6px; border-radius: 2px;
  background: rgba(247, 185, 85, 0.18); color: #f7b955; border: 1px solid rgba(247, 185, 85, 0.4);
}
.gb-alarm-time { color: #5d7e9a; font-family: ui-monospace, monospace; font-size: 11px; }

/* ===== 通用行列表 ===== */
.gb-list-rows { display: flex; flex-direction: column; gap: 4px; height: 100%; overflow: auto; }
.gb-list-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 3px;
  background: rgba(45, 212, 255, 0.03);
  border: 1px solid rgba(45, 212, 255, 0.08);
  font-size: 12px; transition: all .15s;
}
.gb-list-row:hover { background: rgba(45, 212, 255, 0.08); border-color: rgba(45, 212, 255, 0.25); }
.gb-list-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #cfe5f7; }

/* 工单行专用 */
.gb-code, .gb-code-sm {
  font-family: ui-monospace, monospace; color: #2dd4ff;
  font-size: 11px; padding: 1px 5px; border-radius: 2px;
  background: rgba(45, 212, 255, 0.10);
}
.gb-code-sm { font-size: 10px; }
.gb-status {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 11px; border: 1px solid;
  background: rgba(255, 255, 255, 0.04);
}
.gb-mini-progress {
  flex: 1; height: 6px; border-radius: 3px;
  background: rgba(45, 212, 255, 0.10); overflow: hidden; position: relative;
}
.gb-mini-progress-fill { height: 100%; border-radius: 3px; transition: width .5s; box-shadow: 0 0 6px currentColor; }
.gb-mini-progress-text { font-size: 11px; color: #8fb6d9; min-width: 32px; text-align: right; font-family: ui-monospace, monospace; }

.gb-orders-rows .gb-order-row { gap: 6px; }
.gb-compact-rows .gb-compact-row { padding: 6px 8px; font-size: 11px; }
.gb-compact-bar { flex: 1; }
.gb-compact-pct { width: 40px; text-align: right; color: #2dd4ff; font-family: ui-monospace, monospace; }

.gb-fail-row { font-size: 11px; }
.gb-fail-num { color: #ff5c7c; font-weight: 700; font-family: ui-monospace, monospace; }
.gb-fail-remark { color: #f7b955; }
.gb-fail-time { color: #5d7e9a; font-family: ui-monospace, monospace; }

/* ===== 加工单列表（卡片式） ===== */
.gb-wo-list { display: flex; flex-direction: column; gap: 10px; height: 100%; overflow: auto; padding: 4px; }
.gb-wo-card {
  background: rgba(45, 212, 255, 0.04);
  border: 1px solid rgba(45, 212, 255, 0.15);
  border-radius: 4px;
  padding: 10px 14px;
  transition: all .15s;
}
.gb-wo-card:hover { border-color: rgba(45, 212, 255, 0.4); background: rgba(45, 212, 255, 0.08); }
.gb-wo-card-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; flex-wrap: wrap;
}
.gb-wo-title { color: #e6f4ff; font-weight: 600; }
.gb-wo-meta { color: #8fb6d9; font-size: 11px; }
.gb-wo-due { margin-left: auto; color: #5d7e9a; font-size: 11px; font-family: ui-monospace, monospace; }
.gb-overdue-tag {
  background: rgba(255, 92, 124, 0.18); color: #ff5c7c;
  border: 1px solid rgba(255, 92, 124, 0.4);
  font-size: 10px; padding: 1px 6px; border-radius: 2px;
}
.gb-wo-card-body { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.gb-wo-overall { display: flex; align-items: center; gap: 10px; }
.gb-wo-progress { height: 8px; }
.gb-wo-overall-text { font-size: 12px; min-width: 110px; font-family: ui-monospace, monospace; }
.gb-wo-nodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.gb-wo-node {
  display: flex; gap: 8px; padding: 6px 8px;
  background: rgba(8, 22, 48, 0.5);
  border-radius: 3px;
  border: 1px solid rgba(45, 212, 255, 0.10);
}
.gb-wo-node-rail {
  width: 6px; background: rgba(45, 212, 255, 0.10); border-radius: 3px;
  position: relative; overflow: hidden;
  align-self: stretch;
}
.gb-wo-node-bar { position: absolute; bottom: 0; left: 0; width: 100%; transition: height .5s; box-shadow: 0 0 6px currentColor; }
.gb-wo-node-info { display: flex; flex-direction: column; gap: 2px; font-size: 11px; }
.gb-wo-node-seq { color: #5d7e9a; font-size: 10px; }
.gb-wo-node-name { color: #e6f4ff; }
.gb-wo-node-meta { font-family: ui-monospace, monospace; }
.gb-wo-node-machine { color: #8fb6d9; font-size: 10px; }

/* ===== 仪表盘条 ===== */
.gb-gauge-grid { display: grid; gap: 8px; height: 100%; align-items: stretch; }
.gb-gauge-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(45, 212, 255, 0.04); border: 1px solid rgba(45, 212, 255, 0.12);
  border-radius: 4px; padding: 8px;
  position: relative;
}
.gb-gauge-label { color: #8fb6d9; font-size: 12px; margin-bottom: 4px; letter-spacing: 1px; }

/* ===== 进度条（横向） ===== */
.gb-progress-row { margin-bottom: 12px; }
.gb-progress-label { color: #cfe5f7; font-size: 12px; margin-bottom: 4px; display: flex; justify-content: space-between; }
.gb-progress-val { color: #2dd4ff; font-family: ui-monospace, monospace; font-weight: 600; }
.gb-progress-bar {
  height: 8px; background: rgba(45, 212, 255, 0.10); border-radius: 4px; overflow: hidden;
  border: 1px solid rgba(45, 212, 255, 0.15);
}
.gb-progress-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #3b82f6, #2dd4ff, #22d3a7);
  box-shadow: 0 0 8px rgba(45, 212, 255, 0.5);
  transition: width 1s ease-out;
}

/* ===== 机台矩阵 ===== */
.gb-mmatrix { display: flex; flex-direction: column; gap: 12px; height: 100%; overflow: auto; padding: 4px; }
.gb-mmatrix-group { background: rgba(45, 212, 255, 0.03); border-radius: 3px; padding: 8px 10px; }
.gb-mmatrix-head {
  color: #2dd4ff; font-size: 12px; font-weight: 600;
  padding-bottom: 6px; margin-bottom: 6px;
  border-bottom: 1px dashed rgba(45, 212, 255, 0.15);
  display: flex; align-items: center; justify-content: space-between;
}
.gb-mmatrix-count { color: #5d7e9a; font-size: 11px; font-weight: 400; }
.gb-mmatrix-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 6px; }
.gb-mmatrix-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 4px; border-radius: 3px;
  font-size: 11px; gap: 3px; min-height: 50px;
  border: 1px solid; transition: all .15s;
}
.gb-mmatrix-cell:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(45, 212, 255, 0.2); }
.gb-mmatrix-dot { width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 6px currentColor; }
.gb-mmatrix-name { color: #e6f4ff; font-family: ui-monospace, monospace; font-size: 10px; }
.gb-mmatrix-rate { color: #8fb6d9; font-size: 10px; }

/* 响应式 */
@media (max-width: 1280px) {
  .gb-grid { grid-template-columns: repeat(6, 1fr); }
  /* 自动调整 12 列定位到 6 列（简单降级） */
  .gb-cell[style*="grid-area"] {
    /* 让 grid-area 失效，依赖顺序渲染 */
    grid-area: auto !important;
  }
}
@media (max-width: 768px) {
  .gb-topbar { flex-direction: column; gap: 8px; align-items: flex-start; padding: 10px 14px; }
  .gb-grid { grid-template-columns: 1fr; padding: 10px; }
  .gb-kpi-cell { padding: 10px; }
  .gb-flip { font-size: 22px; }
}

/* ===== 角色权限编辑器 ===== */
.rp-role { font-size: 14px; color: var(--text, #1f2937); margin-bottom: 12px; }
.rp-section { margin-top: 14px; border-top: 1px dashed #e5e7eb; padding-top: 10px; }
.rp-section-hd { font-size: 13px; font-weight: 600; color: var(--brand-deep, #1d4ed8); margin-bottom: 8px; }
.rp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 14px; }
.rp-hint { font-size: 12px; color: #9ca3af; margin-top: 8px; }
.cb-line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #374151; cursor: pointer; user-select: none; }
.cb-line input { width: 15px; height: 15px; cursor: pointer; }
.cb-line input:disabled { cursor: not-allowed; }
@media (max-width: 600px) { .rp-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== PWA 安装引导 ===== */
.ig-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ig-icon { width: 52px; height: 52px; border-radius: 12px; box-shadow: 0 2px 8px rgba(30,58,138,.25); }
.ig-name { font-size: 15px; font-weight: 700; color: var(--brand-deep, #1e3a8a); }
.ig-sub { font-size: 12px; color: #6b7280; margin-top: 2px; }
.ig-or { text-align: center; font-size: 12px; color: #9ca3af; margin: 14px 0 10px; position: relative; }
.ig-or::before, .ig-or::after { content: ''; position: absolute; top: 50%; width: 28%; height: 1px; background: #e5e7eb; }
.ig-or::before { left: 0; } .ig-or::after { right: 0; }
.ig-steps { list-style: none; padding: 0; margin: 0 0 14px; }
.ig-steps li { font-size: 13px; color: #374151; line-height: 1.6; padding: 6px 0; border-bottom: 1px dashed #f0f0f0; }
.ig-steps li b { color: var(--brand-deep, #1e3a8a); }
.ig-link { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--bg-hover, #f8fafc); border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px; }
.ig-link-label { font-size: 12px; color: #6b7280; white-space: nowrap; }
.ig-link code { font-size: 12px; color: var(--brand-deep, #1e3a8a); word-break: break-all; flex: 1; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-disabled, .btn:disabled { opacity: .6; cursor: not-allowed; }
.ig-qr { text-align: center; margin: 14px 0 4px; padding: 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; }
.ig-qr-img { width: 168px; height: 168px; border-radius: 8px; box-shadow: 0 2px 10px rgba(30,58,138,.12); }
.ig-qr-tip { font-size: 12px; color: #6b7280; margin-top: 8px; }

/* ===== Excel / CSV 批量导入 ===== */
.imp-step { font-size: 13px; font-weight: 600; color: var(--brand-deep, #1e3a8a); margin: 14px 0 8px; }
.imp-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.imp-file { font-size: 13px; max-width: 360px; }
.imp-hint { font-size: 12px; color: #6b7280; line-height: 1.5; }
.imp-preview { margin: 12px 0; }
.imp-prev-info { font-size: 13px; color: #374151; margin-bottom: 6px; }
.imp-prev-tip { font-size: 12px; color: #6b7280; margin: 8px 0 4px; }
.imp-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.imp-ok { color: #16a34a; font-size: 13px; font-weight: 600; }
.imp-err { color: #dc2626; font-size: 13px; }

