:root {
  --yw-primary: #0f172a;
  --yw-primary-strong: #1e3a8a;
  --yw-primary-soft: #eef3fb;
  --yw-accent: #c7a05b;
  --yw-accent-dark: #8c6d46;
  --yw-page: #f5f7fa;
  --yw-surface: #ffffff;
  --yw-border: #e2e8f0;
  --yw-muted: #64748b;
  --yw-success: #059669;
  --yw-warning: #d97706;
  --yw-danger: #dc2626;
  --yw-radius: 8px;
  --yw-space: 24px;
}

body.enterprise-shell {
  background: var(--yw-page);
  color: var(--yw-primary);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

.enterprise-shell .topbar {
  min-height: 64px;
  height: 64px;
  padding: 0 28px;
  background: linear-gradient(110deg, #0f172a, #162d57 72%, #1e3a8a);
  border-bottom: 1px solid rgba(199, 160, 91, .38);
  box-shadow: 0 4px 18px rgba(15, 23, 42, .14);
}

.enterprise-shell .brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(199, 160, 91, .65);
  background: rgba(199, 160, 91, .16);
  color: #f4dca7;
}

.enterprise-shell .brand-title strong { letter-spacing: .02em; }
.enterprise-shell .brand-title span { color: #cbd5e1; }

.enterprise-shell .sidebar {
  padding: 22px 14px;
  background: #10213f;
  border-right: 1px solid #243b64;
}

.enterprise-shell .nav-title {
  color: #a9b8cf;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.enterprise-shell .nav-button {
  min-height: 44px;
  border-radius: var(--yw-radius);
  color: #dbe5f4;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.enterprise-shell .nav-button .app-icon {
  width: 17px;
  height: 17px;
  margin-right: 9px;
  color: currentColor;
}

.enterprise-shell .nav-button:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  transform: translateX(1px);
}

.enterprise-shell .nav-button.active {
  background: linear-gradient(90deg, rgba(199, 160, 91, .22), rgba(30, 58, 138, .55));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--yw-accent);
}

.enterprise-shell .main {
  padding: 28px;
  background: var(--yw-page);
}

.enterprise-shell .panel,
.enterprise-shell .summary-item,
.enterprise-shell .field-operating-note,
.enterprise-shell .operations-empty-state {
  border-color: var(--yw-border);
  border-radius: var(--yw-radius);
  box-shadow: 0 4px 20px rgba(15, 23, 42, .04);
}

.enterprise-shell .panel-head,
.enterprise-shell .page-head { margin-bottom: 18px; }
.enterprise-shell .panel-head h2,
.enterprise-shell .page-head h1 { color: var(--yw-primary); letter-spacing: -.02em; }

.enterprise-shell .table-wrap {
  border: 1px solid var(--yw-border);
  border-radius: var(--yw-radius);
  background: var(--yw-surface);
  overflow: auto;
}

.enterprise-shell table { border-collapse: separate; border-spacing: 0; }
.enterprise-shell thead th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.enterprise-shell tbody tr:nth-child(even) td { background: #fbfcfe; }
.enterprise-shell tbody tr:hover td { background: #f1f5fb; }
.enterprise-shell tbody td { border-bottom-color: var(--yw-border); vertical-align: top; }
.enterprise-shell .btn { min-height: 40px; border-radius: 7px; }
.enterprise-shell .btn.primary { background: var(--yw-primary-strong); border-color: var(--yw-primary-strong); }
.enterprise-shell .btn.primary:hover { background: var(--yw-primary); border-color: var(--yw-primary); }

#engineer .page-head { align-items: center; }
#engineerTable .table-wrap { background: transparent; border: 0; overflow: visible; }
#engineerTable table { width: 100%; }
#engineerTable td .btn,
#engineerTable td button { min-height: 44px; }

@media (max-width: 720px) {
  .enterprise-shell .main { padding: 16px; }
  .enterprise-shell .topbar { padding: 0 16px; }
  .enterprise-shell .brand-title span { display: none; }
  #engineerTable table,
  #engineerTable thead,
  #engineerTable tbody,
  #engineerTable tr,
  #engineerTable td { display: block; width: 100%; }
  #engineerTable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #engineerTable tr {
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid var(--yw-border);
    border-radius: var(--yw-radius);
    background: var(--yw-surface);
    box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
  }
  #engineerTable td {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    min-height: 42px;
    padding: 10px 0;
    border-bottom: 1px solid #edf1f6;
    overflow-wrap: anywhere;
  }
  #engineerTable td:last-child { border-bottom: 0; padding-bottom: 0; }
  #engineerTable td::before { color: var(--yw-muted); font-size: 12px; font-weight: 700; }
  #engineerTable td:nth-child(1)::before { content: "工单信息"; }
  #engineerTable td:nth-child(2)::before { content: "位置"; }
  #engineerTable td:nth-child(3)::before { content: "岗位"; }
  #engineerTable td:nth-child(4)::before { content: "问题"; }
  #engineerTable td:nth-child(5)::before { content: "状态"; }
  #engineerTable td:nth-child(6)::before { content: "流转"; }
  #engineerTable td:nth-child(7)::before { content: "操作"; }
  #engineerTable td:last-child .actions,
  #engineerTable td:last-child > div { display: flex; flex-wrap: wrap; gap: 8px; }
  #engineerTable td:last-child .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .enterprise-shell .nav-button { transition: none; }
}

.draft-box-panel { max-width: 860px; }
.draft-box-list { display: grid; gap: 12px; margin-top: 18px; }
.draft-box-item { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 16px 18px; background: var(--yw-surface, #fff); border: 1px solid var(--yw-border, #e2e8f0); border-radius: 8px; }
.draft-box-item > div:first-child { display: grid; gap: 5px; min-width: 0; }
.draft-box-item span, .draft-box-item small { color: var(--yw-muted, #64748b); overflow-wrap: anywhere; }
.draft-box-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.danger-outline { color: #b91c1c; border-color: #fecaca; background: #fff; }
@media (max-width: 720px) { .draft-box-item { align-items: stretch; flex-direction: column; } .draft-box-actions { width: 100%; } .draft-box-actions .btn { flex: 1; min-height: 44px; } }
