/* ==== Theater Hub 2.0 全局样式 ==== */
:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #dde4ef;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #079455;
  --warning: #dc6803;
  --danger: #d92d20;
  --info: #0ba5ec;
  --purple: #7a5af8;
  --sidebar: #111827;
  --sidebar-hover: #1f2937;

  --gradient-blue: linear-gradient(135deg, #2563eb 0%, #4f8cff 100%);
  --gradient-green: linear-gradient(135deg, #079455 0%, #12b76a 100%);
  --gradient-orange: linear-gradient(135deg, #dc6803 0%, #f79009 100%);
  --gradient-purple: linear-gradient(135deg, #7a5af8 0%, #9b87f5 100%);
  --gradient-red: linear-gradient(135deg, #d92d20 0%, #f04438 100%);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }

/* ===== App layout ===== */
#app {
  min-height: 100vh;
  position: relative;
}
#loginPanel {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: linear-gradient(135deg, #f4f7fb 0%, #e7edf7 100%);
  overflow-y: auto;
}
#loginPanel.hidden { display: none !important; }
#workspacePanel {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
#workspacePanel.hidden { display: none !important; }
.sidebar {
  padding: 22px 16px;
  color: #fff;
  background: var(--sidebar);
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 16px;
}
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--gradient-blue);
  font-weight: 700;
}
.brand-title { font-size: 17px; font-weight: 700; }
.brand-subtitle { margin-top: 3px; color: #9ca3af; font-size: 12px; }
.nav { display: grid; gap: 4px; }
.nav-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); }
.nav-section-title {
  padding: 0 10px 8px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  color: #cbd5e1;
  background: transparent;
  text-align: left;
  font-size: 14px;
}
.nav-item.active, .nav-item:hover:not(:disabled) {
  color: #fff;
  background: var(--sidebar-hover);
}
.nav-icon {
  width: 22px;
  color: #93c5fd;
  text-align: center;
  font-size: 16px;
}
.nav-item.active .nav-icon { color: #fff; }

.main { min-width: 0; min-height: 100vh; }
.hidden { display: none !important; }

/* ===== Login ===== */
.login-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 40px;
}
.login-shell {
  display: grid;
  width: min(920px, 100%);
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: center;
}
.login-copy h1 { margin: 12px 0 14px; font-size: 36px; letter-spacing: 0; }
.login-copy p { max-width: 520px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.eyebrow { color: var(--primary); font-weight: 700; font-size: 13px; }
.feature-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.feature-pills span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--muted);
  font-size: 13px;
}
.login-form, .panel, .metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgb(15 23 42 / 6%);
}
.login-form { display: grid; gap: 16px; padding: 24px; }

label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
input, select, textarea {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
  font-size: 14px;
}
textarea {
  min-height: 80px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  outline: 2px solid rgb(37 99 235 / 15%);
}

.primary-button, .ghost-button, .danger-button {
  height: 38px;
  border-radius: 6px;
  padding: 0 16px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s;
}
.primary-button { color: #fff; background: var(--primary); border-color: var(--primary); }
.primary-button:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); }
.ghost-button { color: var(--text); background: #fff; border-color: var(--line); }
.ghost-button:hover:not(:disabled) { background: #f8fafc; border-color: var(--primary); color: var(--primary); }
.danger-button { color: #fff; background: var(--danger); border-color: var(--danger); }
.danger-button:hover:not(:disabled) { background: #b42318; border-color: #b42318; }

.message { min-height: 20px; color: var(--muted); font-size: 13px; }
.message.error { color: var(--danger); }
.message.success { color: var(--success); }

/* ===== Workspace ===== */
.workspace { padding: 26px; }
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.page-label { color: var(--primary); font-size: 13px; font-weight: 700; }
.topbar h2 { margin: 6px 0 0; font-size: 24px; }
.topbar p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.user-box { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gradient-purple);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
}

/* ===== Panels & cards ===== */
.panel { padding: 18px; }
.panel + .panel { margin-top: 14px; }
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.panel-title { font-size: 17px; font-weight: 700; }
.panel-subtitle { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ===== Metric cards ===== */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.metric {
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.metric::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-blue);
}
.metric.success::before { background: var(--gradient-green); }
.metric.warn::before { background: var(--gradient-orange); }
.metric.danger::before { background: var(--gradient-red); }
.metric.purple::before { background: var(--gradient-purple); }
.metric-label { color: var(--muted); font-size: 13px; }
.metric strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 30px;
  font-weight: 700;
}
.metric small { color: var(--muted); font-size: 12px; }
.metric-trend {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.metric-trend.up { background: #dcfce7; color: var(--success); }
.metric-trend.down { background: #fee4e2; color: var(--danger); }

/* ===== Tables ===== */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; min-width: 960px; border-collapse: collapse; }
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}
th { color: var(--muted); background: #f8fafc; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
td { color: var(--text); }
tbody tr:hover { background: #f8fbff; cursor: pointer; }

.theater-name { font-weight: 700; font-size: 14px; }
.theater-id { margin-top: 2px; color: var(--muted); font-size: 11px; font-family: ui-monospace, "SF Mono", monospace; }
.empty { padding: 40px; color: var(--muted); text-align: center; }

/* ===== Tags & status ===== */
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
}
.tag.short { color: #1d4ed8; background: #dbeafe; }
.tag.novel { color: #7c3aed; background: #ede9fe; }
.tag.normal { color: var(--success); background: #dcfae6; }
.tag.disabled { color: var(--danger); background: #fee4e2; }
.tag.dev { color: var(--warning); background: #fff7ed; }
.tag.pending { color: var(--info); background: #e0f2fe; }

/* ===== Filters ===== */
.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.filter-actions { display: flex; gap: 8px; }
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 10px;
  gap: 16px;
}
.toolbar-info { color: var(--muted); font-size: 13px; }

/* ===== Pagination ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
}

/* ===== Kanban (Access Board) ===== */
.kanban {
  display: grid;
  grid-template-columns: repeat(7, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.kanban-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 12px;
  min-height: 200px;
}
.kanban-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.kanban-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.kanban-count {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.kanban-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.kanban-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgb(37 99 235 / 10%);
  transform: translateY(-1px);
}
.kanban-card-title { font-weight: 700; font-size: 13px; }
.kanban-card-id { color: var(--muted); font-size: 11px; font-family: ui-monospace, "SF Mono", monospace; }
.kanban-card-meta { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.priority-tag {
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 6px;
}
.priority-tag.P0 { background: #fee4e2; color: var(--danger); }
.priority-tag.P1 { background: #fff7ed; color: var(--warning); }
.priority-tag.P2 { background: #f1f5f9; color: var(--muted); }

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.tab {
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab:hover:not(.active) { color: var(--text); }

/* ===== Detail layout ===== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.detail-field { display: grid; gap: 4px; }
.detail-field .label { color: var(--muted); font-size: 12px; }
.detail-field .value { color: var(--text); font-size: 14px; font-weight: 500; word-break: break-word; }
.detail-field .value.mono { font-family: ui-monospace, "SF Mono", monospace; font-size: 13px; }

/* ===== Checklist ===== */
.checklist {
  display: grid;
  gap: 10px;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.checklist-item:hover { border-color: var(--primary); }
.checklist-item.todo { background: #fff; }
.checklist-item.doing { background: #fffbeb; border-color: #fcd34d; }
.checklist-item.done { background: #f0fdf4; border-color: #86efac; }
.checklist-item.blocked { background: #fef2f2; border-color: #fca5a5; }
.checklist-status {
  display: grid;
  width: 26px; height: 26px;
  place-items: center;
  border-radius: 50%;
  font-size: 14px;
  flex-shrink: 0;
}
.checklist-item.todo .checklist-status { background: #f1f5f9; color: var(--muted); }
.checklist-item.doing .checklist-status { background: #fef3c7; color: #92400e; }
.checklist-item.done .checklist-status { background: #dcfce7; color: var(--success); }
.checklist-item.blocked .checklist-status { background: #fee4e2; color: var(--danger); }
.checklist-text { flex: 1; }
.checklist-title { font-weight: 600; font-size: 14px; }
.checklist-desc { color: var(--muted); font-size: 12px; margin-top: 2px; }
.checklist-actions { display: flex; gap: 4px; }
.checklist-actions button {
  height: 26px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}
.checklist-actions button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Alerts ===== */
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.alert-item.warn { border-left: 3px solid var(--warning); }
.alert-item.critical { border-left: 3px solid var(--danger); }
.alert-item.info { border-left: 3px solid var(--info); }
.alert-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.alert-item.warn .alert-icon { background: #fff7ed; color: var(--warning); }
.alert-item.critical .alert-icon { background: #fef2f2; color: var(--danger); }
.alert-item.info .alert-icon { background: #eff6ff; color: var(--info); }
.alert-message { flex: 1; }
.alert-title { font-weight: 600; font-size: 13px; }
.alert-desc { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgb(15 23 42 / 50%);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  width: min(720px, 100%);
  max-height: 90vh;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.modal-title { font-size: 17px; font-weight: 700; }
.modal-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  color: var(--muted);
  padding: 0;
  width: 30px; height: 30px;
  border-radius: 6px;
}
.modal-close:hover { background: #f1f5f9; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ===== Calculator ===== */
.calculator-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
}
.calculator-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  align-content: start;
}
.calculator-result { display: grid; gap: 14px; min-width: 0; }
.result-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.result-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}
.result-summary span { color: var(--muted); font-size: 12px; }
.result-summary strong { display: block; margin-top: 6px; font-size: 22px; font-weight: 700; }

.money-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
}
.money-node {
  display: grid;
  gap: 5px;
  min-width: 120px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.money-node .num {
  display: inline-grid;
  width: 22px; height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.money-node strong { color: var(--text); font-size: 13px; }
.money-node b { color: #1d4ed8; font-size: 16px; font-weight: 700; }
.money-node small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.money-node.highlight { border-color: #86efac; background: #f0fdf4; }
.money-node.highlight b { color: #047857; }

.share-split {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.share-split article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}
.share-split span { color: var(--muted); font-size: 12px; }
.share-split strong { display: block; margin: 6px 0 4px; font-size: 18px; font-weight: 700; }
.share-split small { color: var(--muted); font-size: 11px; }

.calculator-note {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  font-size: 13px;
  color: #78350f;
}
.calculator-note strong { color: #92400e; }

/* ===== Code block ===== */
.code-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  max-height: 400px;
}

/* ===== Misc ===== */
.flex { display: flex; }
.flex.between { justify-content: space-between; align-items: center; }
.flex.gap-2 { gap: 8px; }
.flex.gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.text-muted { color: var(--muted); }
.text-small { font-size: 12px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Panorama flowchart ===== */
.flowchart-canvas {
  display: grid;
  justify-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 20px 6px 4px;
}
.source-row {
  display: grid;
  width: min(760px, 100%);
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
}
.mini-node {
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 12px;
  color: #166534;
  background: #f0fdf4;
  font-weight: 700;
  text-align: center;
}
.merge-line {
  width: min(520px, 80%);
  height: 34px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  border-left: 2px solid #94a3b8;
  border-radius: 0 0 8px 8px;
}
.flow-node-card {
  display: grid;
  width: min(760px, 100%);
  gap: 8px;
  padding: 15px 18px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.flow-node-card span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
}
.flow-node-card strong { color: var(--text); font-size: 18px; }
.flow-node-card small { color: var(--muted); font-size: 13px; line-height: 1.6; }
.flow-node-card.primary-flow { border-color: #86efac; background: #f0fdf4; }
.flow-node-card.analysis-flow { border-color: #bfdbfe; background: #eff8ff; }
.flow-node-card.verify-flow { border-color: #fed7aa; background: #fffbeb; width: min(920px, 100%); }
.flow-node-card.launch-flow { border-color: #c7d7fe; background: #eef4ff; }

.flow-arrow {
  position: relative;
  width: 2px;
  height: 34px;
  background: #94a3b8;
}
.flow-arrow::after {
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  content: "";
  transform: translateX(-50%) rotate(45deg);
}
.yes-arrow {
  height: 50px;
}
.yes-arrow span {
  position: absolute;
  left: 10px;
  top: 6px;
  width: max-content;
  border-radius: 999px;
  padding: 3px 7px;
  color: #166534;
  background: #dcfae6;
  font-size: 12px;
  font-weight: 700;
}

.decision-row {
  position: relative;
  display: flex;
  width: min(760px, 100%);
  min-height: 172px;
  align-items: center;
  justify-content: center;
}
.decision-node {
  display: grid;
  width: 160px;
  height: 160px;
  place-items: center;
  border: 1px solid #fbbf24;
  background: #fffbeb;
  transform: rotate(45deg);
}
.decision-node strong {
  color: #92400e;
  font-size: 16px;
  text-align: center;
  transform: rotate(-45deg);
}
.branch-card {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  border-style: dashed;
  background: var(--panel);
}
.branch-path {
  position: absolute;
  right: 0;
  width: min(280px, 35%);
  display: grid;
  gap: 8px;
}
.branch-card b {
  width: max-content;
  border-radius: 999px;
  padding: 3px 8px;
  color: #ffffff;
  background: #ef4444;
  font-size: 12px;
}
.branch-card span { color: var(--text); font-weight: 700; }
.branch-card small { color: var(--muted); line-height: 1.5; }
.branch-warn b { background: #f59e0b; }
.return-pill {
  width: max-content;
  border: 1px dashed #94a3b8;
  border-radius: 999px;
  padding: 6px 10px;
  color: #475467;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
}

.flow-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}
.flow-tags b {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text);
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.system-lanes {
  width: min(920px, 100%);
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  padding: 14px;
  background: #f7f5ff;
}
.lane-title {
  margin-bottom: 12px;
  color: #5b21b6;
  font-size: 13px;
  font-weight: 800;
}
.lane-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.lane-card {
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.lane-card strong { color: var(--text); font-size: 16px; }
.lane-card span { color: #5b21b6; font-size: 13px; font-weight: 700; }
.lane-card small { color: var(--muted); font-size: 12px; line-height: 1.55; }

.verification-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
  text-align: left;
}
.verification-card {
  display: grid;
  min-height: 132px;
  align-content: start;
  gap: 6px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}
.verification-card b {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}
.verification-card strong { color: var(--text); font-size: 14px; }
.verification-card small { color: var(--muted); font-size: 12px; line-height: 1.55; }

.monitor-flow {
  width: min(920px, 100%);
  padding: 14px;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  background: #fff5f6;
}
.monitor-flow .lane-title { color: #be123c; }
.monitor-track {
  display: grid;
  grid-template-columns: repeat(7, minmax(96px, 1fr));
  gap: 10px;
  align-items: center;
}
.monitor-track div {
  border: 1px solid #fecdd3;
  border-radius: 8px;
  padding: 12px 10px;
  color: #881337;
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 1180px) {
  #app { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; }
  .nav { display: flex; flex: 1; }
  .nav-section { display: none; }
  .summary-grid, .filters, .result-summary, .share-split { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .calculator-grid { grid-template-columns: 1fr; }
  .money-flow { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}