/* NovaStock · glass analytics shell */
:root {
  --bg-a: #e8e9f8;
  --bg-b: #f4f5fb;
  --ink: #1d1f2c;
  --ink-2: #3d4158;
  --muted: #8b90a5;
  --line: rgba(29, 31, 44, 0.08);
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --teal: #2ec4b6;
  --sky: #5aa9ff;
  --violet: #8b7cf6;
  --rose: #ff7a9a;
  --amber: #ffb347;
  --green: #2fbf71;
  --red: #ef5b5b;
  --shadow: 0 18px 50px rgba(70, 78, 130, 0.12);
  --shadow-soft: 0 10px 28px rgba(70, 78, 130, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --font: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body.skin-nova {
  margin: 0;
  min-width: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(138, 124, 246, 0.22), transparent 60%),
    radial-gradient(800px 480px at 90% 0%, rgba(90, 169, 255, 0.18), transparent 55%),
    linear-gradient(160deg, var(--bg-a), var(--bg-b));
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.desk {
  height: 100vh;
  margin: 14px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

/* top bar */
.nova-top {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 12px 20px 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
}
.nova-brand { display: flex; align-items: center; gap: 12px; }
.nova-logo {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #6d63f2, #4f8cff);
  color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: 0 10px 22px rgba(79, 140, 255, 0.35);
}
.nova-brand-copy { display: grid; gap: 1px; }
.nova-brand-copy strong { font-size: 15px; letter-spacing: -0.02em; }
.nova-brand-copy span { font-size: 11px; color: var(--muted); }

.nova-tabs {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; flex-wrap: wrap;
  padding: 6px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.top-pill {
  border: 0; background: transparent;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 999px;
  color: var(--ink-2); font-size: 13px; font-weight: 500;
  transition: all .18s ease;
}
.top-pill:hover { background: rgba(29, 31, 44, 0.04); }
.top-pill.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(70, 78, 130, 0.12);
}
.pill-ico {
  display: inline-grid; place-items: center;
  width: 16px; height: 16px; opacity: 0.62;
}
.pill-ico svg { width: 15px; height: 15px; display: block; }
.top-pill.active .pill-ico { opacity: 1; color: var(--violet); }
.nav-count {
  margin-left: 2px; padding: 2px 7px; border-radius: 999px;
  background: rgba(139, 124, 246, 0.12); color: #6a5de8;
  font-size: 10px; font-weight: 700;
}
.top-pill.active .nav-count { background: rgba(139, 124, 246, 0.16); }

.nova-actions { display: flex; align-items: center; gap: 12px; }
.server-status { font-size: 11px; color: var(--muted); white-space: nowrap; }
.online-dot { color: var(--green); }
.user-switch {
  min-width: 148px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,0.8); padding: 8px 12px; font-size: 12px; color: var(--ink-2);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #2ec4b6, #5aa9ff);
  color: #fff; font-size: 12px; font-weight: 700; border: 0;
}
.avatar-top { width: 36px; height: 36px; box-shadow: 0 8px 18px rgba(46, 196, 182, 0.28); }

/* body: rail + stage */
.nova-body { flex: 1; min-height: 0; display: flex; }
.nova-rail {
  width: 68px; flex: 0 0 68px;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 16px 10px;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,0.28);
}
.rail-btn {
  width: 42px; height: 42px; border: 0; border-radius: 14px;
  background: transparent; color: var(--muted); font-size: 16px;
  display: grid; place-items: center; transition: all .18s ease;
}
.rail-btn:hover { background: rgba(255,255,255,0.7); color: var(--ink); }
.rail-btn.active {
  background: #fff; color: var(--violet);
  box-shadow: 0 10px 22px rgba(70, 78, 130, 0.14);
}
.rail-spacer { flex: 1; }
.rail-user { padding-bottom: 6px; }

.nova-stage {
  flex: 1; min-width: 0; overflow: auto;
  padding: 8px 18px 22px;
}
.stage-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 8px 14px;
}
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.breadcrumb span:first-child { color: var(--ink); font-weight: 700; letter-spacing: -0.02em; font-size: 18px; }
.crumb-separator { opacity: 0.4; }
.stage-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(255,255,255,0.75); border: 1px solid var(--line);
  font-size: 11px; color: var(--ink-2); font-weight: 600;
}
.chip.soft { color: var(--muted); font-weight: 500; }

.content { max-width: 1360px; margin: 0 auto; padding: 0 6px 28px; }

/* generic page chrome */
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.page-heading h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.page-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.btn {
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,0.85); color: var(--ink-2);
  padding: 9px 15px; font-size: 12px; font-weight: 600;
  box-shadow: var(--shadow-soft); transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: #1d1f2c; border-color: #1d1f2c; color: #fff;
  box-shadow: 0 12px 24px rgba(29, 31, 44, 0.2);
}
.btn-primary:hover { background: #2b2e3f; color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-danger { color: var(--red); background: #fff1f1; border-color: #ffd4d4; }
.text-danger { color: var(--red); }

.select-control, .input-control, textarea {
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255,255,255,0.9); color: var(--ink);
  padding: 9px 12px; outline: none; font-size: 12px;
}
.select-control:focus, .input-control:focus, textarea:focus {
  border-color: rgba(139, 124, 246, 0.55);
  box-shadow: 0 0 0 4px rgba(139, 124, 246, 0.12);
}
.choice-box { position: relative; display: inline-block; min-width: 118px; vertical-align: middle; z-index: 1; }
.choice-box.open { z-index: 200; }
.choice-trigger {
  width: 100%; text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12px; line-height: 1.2;
}
.choice-trigger::after { content: "▾"; font-size: 10px; color: var(--muted); }
.choice-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 201;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); max-height: 260px; overflow: auto; padding: 6px;
}
.choice-option {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 10px; border-radius: 10px; font-size: 12px; color: var(--ink-2); cursor: pointer;
}
.choice-option:hover { background: rgba(139, 124, 246, 0.08); color: #5b52d6; }
.choice-option.active { background: rgba(139, 124, 246, 0.12); color: #5b52d6; font-weight: 600; }

/* KPI / panels / tables */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi-card {
  position: relative; padding: 18px 18px 16px; min-height: 112px; overflow: hidden;
  background: var(--surface-solid); border: 1px solid rgba(255,255,255,0.9);
  border-radius: var(--radius); box-shadow: var(--shadow-soft);
}
.kpi-card:after {
  content: ""; position: absolute; right: -20px; bottom: -28px;
  width: 96px; height: 96px; border-radius: 50%;
  background: linear-gradient(145deg, rgba(46,196,182,0.18), rgba(139,124,246,0.16));
  z-index: 0;
}
.kpi-card:nth-child(2):after { background: linear-gradient(145deg, rgba(90,169,255,0.2), rgba(46,196,182,0.12)); }
.kpi-card:nth-child(3):after { background: linear-gradient(145deg, rgba(255,179,71,0.22), rgba(255,122,154,0.12)); }
.kpi-card:nth-child(4):after { background: linear-gradient(145deg, rgba(255,122,154,0.18), rgba(139,124,246,0.14)); }
.kpi-card > * { position: relative; z-index: 1; }
.kpi-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.kpi-number { margin: 12px 0 6px; color: var(--ink); font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.kpi-unit { margin-left: 4px; color: var(--muted); font-size: 11px; font-weight: 500; }
.kpi-foot { color: var(--muted); font-size: 11px; }
.kpi-foot strong { color: var(--green); font-weight: 600; }
.kpi-warning .kpi-number { color: var(--rose); }
.kpi-card.clickable, .kpi-click { width: 100%; text-align: left; font: inherit; color: inherit; }
.kpi-click:hover { transform: translateY(-2px); box-shadow: var(--shadow); transition: .18s ease; }

.dash-filters {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
  margin: 0 0 16px; padding: 14px 16px;
  background: rgba(255,255,255,0.78); border: 1px solid rgba(255,255,255,0.95);
  border-radius: var(--radius); box-shadow: var(--shadow-soft); position: relative; z-index: 20;
}
.dash-filters:has(.choice-box.open), .filter-bar:has(.choice-box.open),
.budget-toolbar:has(.choice-box.open), .heading-actions:has(.choice-box.open) { z-index: 300; }
.dash-filters label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 600; }
.dash-filters .select-control, .dash-filters .choice-box { min-width: 180px; }
.dash-filters .choice-box { width: 100%; }

.panel, .table-panel, .analysis-panel, .pay-panel, .insight-panel {
  background: var(--surface-solid); border: 1px solid rgba(255,255,255,0.95);
  border-radius: var(--radius); box-shadow: var(--shadow-soft);
  margin-bottom: 16px; overflow: hidden;
}
.panel-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.panel-title { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.panel-subtitle { font-size: 12px; color: var(--muted); }
.panel-body { padding: 16px 18px; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.data-table th {
  background: #f7f8fc; color: var(--muted); font-weight: 700; font-size: 11px;
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafbff; }
.data-table a { color: #5b52d6; text-decoration: none; font-weight: 600; }
.data-table a:hover { text-decoration: underline; }

.status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.status.todo { background: #fff4e8; color: #c26a12; }
.status.doing { background: #eef4ff; color: #3d6fd9; }
.status.done { background: #e9faf1; color: #1f9a55; }
.status.warn, .status.started { background: #fff0f3; color: #d9486f; }
.tag {
  display: inline-flex; padding: 3px 8px; border-radius: 999px;
  background: #f4f5fb; border: 1px solid var(--line);
  font-size: 10px; color: var(--ink-2); font-weight: 600;
}
.empty-state {
  padding: 34px; text-align: center; color: var(--muted); font-size: 13px;
  border: 1px dashed rgba(29,31,44,0.12); border-radius: var(--radius);
  background: rgba(255,255,255,0.55);
}

/* charts / filters leftovers */
.cat-filter { position: relative; display: grid; gap: 6px; }
.cat-trigger { min-width: 220px; text-align: left; cursor: pointer; }
.cat-panel {
  display: none; position: absolute; z-index: 20; top: calc(100% + 6px); left: 0;
  min-width: 280px; max-width: 360px; max-height: 340px; overflow: auto; padding: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.cat-panel.open { display: block; }
.cat-option { width: 100%; border: 0; border-radius: 10px; background: transparent; text-align: left; padding: 8px 10px; color: var(--ink-2); font-size: 12px; }
.cat-option:hover, .cat-option.active { background: rgba(139,124,246,0.1); color: #5b52d6; }
.cat-tree-toggle { border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.pay-chart-row { display: grid; grid-template-columns: minmax(120px, 136px) minmax(0, 1fr) 148px; gap: 10px; align-items: center; width: 100%; border: 0; background: transparent; padding: 6px 0; border-radius: 10px; text-align: left; cursor: pointer; }
.pay-chart-row:hover { background: #f7f8fc; }
.pay-chart-name { color: var(--ink); font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-chart-bars { display: grid; gap: 4px; min-width: 0; }
.pay-bar { display: block; height: 10px; border-radius: 999px; max-width: 100%; }
.pay-bar.signed { background: #d9def8; }
.pay-bar.paid { background: linear-gradient(90deg, var(--teal), var(--violet)); }
.pay-bar.pending { background: var(--sky); }
.pay-bar.plan-year { background: var(--amber); }
.pay-bar.cross-year { background: var(--violet); }
.pay-bar-combo { display: flex; width: 100%; min-height: 10px; }
.pay-chart-num { color: var(--muted); font-size: 11px; text-align: right; }
.dept-picker { position: relative; }
.dept-picker-trigger { border: 0; background: transparent; color: #5b52d6; font-size: 12px; cursor: pointer; padding: 5px 10px; border-radius: 999px; }
.dept-picker-trigger:hover { background: rgba(139,124,246,0.1); }
.dept-picker-list {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  width: 300px; max-height: 340px; overflow: hidden; padding: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); gap: 8px;
}
.dept-picker.open .dept-picker-list { display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.budget-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 0 18px 12px; }
.budget-toolbar-spacer { flex: 1 1 auto; min-width: 8px; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.ledger-search-spotlight, .budget-search-spotlight { display: flex; align-items: center; gap: 6px; min-width: 0; }

/* modal / drawer / toast */
.modal-overlay, .drawer-overlay, .overlay-backdrop { position: fixed; inset: 0; background: rgba(28, 32, 58, 0.35); z-index: 1000; backdrop-filter: blur(4px); }
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(900px, 92vw); max-height: 90vh; background: #fff;
  border-radius: 24px; box-shadow: var(--shadow); overflow: hidden;
}
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: min(620px, 92vw);
  background: #fff; border-radius: 24px 0 0 24px; box-shadow: var(--shadow); overflow: hidden;
}
.modal-head, .drawer-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-head h2, .drawer-head h2 { font-size: 16px; font-weight: 700; margin: 0; }
.modal-close, .drawer-close {
  border: 0; width: 34px; height: 34px; border-radius: 50%;
  background: #f4f5fb; color: var(--muted); font-size: 18px;
}
.modal-body, .drawer-body { padding: 18px 20px; overflow-y: auto; max-height: calc(90vh - 70px); }
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #1d1f2c; color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 600; z-index: 2000; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

/* workflow / files leftovers */
.stepper { padding: 16px; }
.stepper-steps { display: grid; gap: 8px; }
.file-contract-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.bill-expense-bar { height: 6px; background: #eef0f7; border-radius: 999px; overflow: hidden; }
.bill-expense-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--violet)); border-radius: 999px; }

/* hide old AI chrome */
.assistant-layout, .assistant-page-status, .llm-config-overlay, #mcp-status, #llm-status,
.brand-logo, .cmg-logo, .org-lockup, .brand-bureau { display: none !important; }

/* ——— Soft actions (kill gray browser buttons) ——— */
.text-button, .link-action {
  border: 0 !important; background: transparent !important;
  color: #5b52d6; font-size: 12px; font-weight: 650;
  padding: 4px 2px; border-radius: 8px; box-shadow: none !important;
  line-height: 1.3; white-space: nowrap;
}
.text-button:hover, .link-action:hover { background: rgba(139,124,246,0.1) !important; text-decoration: underline; }
.text-button.danger, .link-action.danger { color: var(--rose); }
.text-button.danger:hover, .link-action.danger:hover { background: rgba(239,91,91,0.08) !important; }
.table-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.watch-toggle {
  border: 0 !important; background: #eef0fa !important; color: #5b52d6 !important;
  padding: 5px 10px !important; border-radius: 999px !important; font-size: 11px !important; font-weight: 650 !important;
  box-shadow: none !important;
}
.watch-toggle:hover { background: #e2e5f5 !important; }

.pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line);
}
.page-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.page-btn {
  min-width: 30px; height: 30px; padding: 0 8px; border: 0; border-radius: 10px;
  background: #eef0fa; color: var(--ink-2); font-size: 12px; font-weight: 650;
}
.page-btn.active { background: #1d1f2c; color: #fff; }
.sys-code { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--ink-2); }
.filter-field { display: inline-flex; align-items: center; gap: 8px; }
.filter-field-label { color: var(--muted); font-size: 11px; white-space: nowrap; }
.filter-label { color: var(--muted); font-size: 11px; font-weight: 600; }
.payment-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.payment-tab {
  border: 0; border-radius: 999px; padding: 8px 16px;
  background: rgba(255,255,255,0.75); color: var(--ink-2); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-soft);
}
.payment-tab.active { background: #1d1f2c; color: #fff; }

/* Modal (app uses modal-backdrop / modal-card) */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1200;
  display: grid; place-items: center; padding: 24px;
  background: rgba(28, 32, 58, 0.42); backdrop-filter: blur(5px);
}
.modal-card {
  width: min(640px, 96vw); max-height: 90vh; overflow: auto;
  background: #fff; border-radius: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.modal-card .modal-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal-card .modal-head h2 { margin: 0; font-size: 17px; }
.modal-card .modal-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px 18px; border-top: 1px solid var(--line); }
.payment-register-modal.modal-card, .payment-process-modal.modal-card { width: min(760px, 96vw); }
.payment-register-body { padding: 16px 20px; overflow: auto; flex: 1; }
.payment-type-options { display: grid; gap: 10px; padding: 8px 0 12px; }
.payment-type-option {
  display: grid; gap: 4px; text-align: left; border: 0; border-radius: 16px;
  padding: 14px 16px; background: #f7f8fc; color: inherit; cursor: pointer;
}
.payment-type-option:hover { background: #eef0fa; }
.payment-type-option:disabled { opacity: 0.45; cursor: not-allowed; }
.payment-type-option:disabled:hover { background: #f7f8fc; }
.payment-type-option strong { font-size: 14px; }
.payment-type-option span { font-size: 12px; color: var(--muted); }
.yes-no-toggle { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: #eef0fa; }
.yes-no-btn { border: 0; border-radius: 999px; padding: 6px 12px; background: transparent; font-size: 12px; font-weight: 650; color: var(--muted); }
.yes-no-btn.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-soft); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .field { display: grid; gap: 6px; }
.form-grid .field-wide { grid-column: 1 / -1; }
.form-grid label { font-size: 11px; color: var(--muted); font-weight: 600; }
.form-section { margin-top: 16px; }
.form-section h3 { margin: 0 0 10px; font-size: 14px; }
.field-hint, .text-muted { color: var(--muted); font-size: 11px; }
.payment-period-dates { display: flex; align-items: center; gap: 8px; }
.payment-period-sep { color: var(--muted); font-size: 12px; }
.suggestions { margin-top: 8px; display: grid; gap: 4px; }
.suggestion {
  border: 0; border-radius: 12px; background: #f7f8fc; padding: 10px 12px;
  text-align: left; cursor: pointer; width: 100%; color: inherit;
}
.suggestion:hover, .suggestion.active { background: #eef0fa; }
.suggestion small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }

/* Workflow: horizontal stage rail + form + notes below */
.workflow-layout {
  display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start;
}
.stepper { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.stepper.is-horizontal { gap: 16px; }
.stepper-top {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 18px;
}
.stepper h3 { margin: 0 0 4px; font-size: 15px; }
.stepper-sub { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.stepper-handler {
  display: flex; flex-direction: column; gap: 6px; min-width: 180px;
}
.stepper-handler label { color: var(--muted); font-size: 11px; font-weight: 600; }
.stepper-handler .input-control { min-width: 180px; }
.stepper.is-horizontal .stepper-steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
button.step {
  position: relative; display: flex; gap: 12px; width: 100%;
  padding: 12px 12px 14px; border: 0 !important; background: #f7f8fc !important;
  border-radius: 16px; text-align: left; font: inherit; color: inherit;
  box-shadow: none !important; cursor: pointer; min-height: 88px;
}
button.step:hover { background: #eef0fa !important; }
button.step:hover strong { color: #5b52d6; }
button.step.editing {
  cursor: default;
  background: linear-gradient(145deg, rgba(139,124,246,0.12), rgba(90,169,255,0.10)) !important;
  box-shadow: inset 0 0 0 1px rgba(91,82,214,0.18) !important;
}
button.step.editing:hover strong { color: inherit; }
.step:not(:last-child):after { display: none; }
.stepper.is-horizontal .step:not(:last-child):after {
  display: block; content: ""; position: absolute; right: -8px; top: 50%;
  width: 10px; height: 2px; transform: translateY(-50%);
  background: #e4e7f2; border-radius: 2px; z-index: 0;
}
.stepper.is-horizontal .step.done:not(:last-child):after,
.stepper.is-horizontal .step.submitted:not(:last-child):after {
  background: linear-gradient(90deg, var(--teal), #cfece8);
}
.step-bullet {
  position: relative; z-index: 1; width: 28px; height: 28px; flex: 0 0 28px;
  display: grid; place-items: center; border-radius: 50%;
  background: #eef0fa; color: var(--muted); font-size: 11px; font-weight: 700;
}
.step.done .step-bullet, .step.submitted .step-bullet { background: #e6f8f1; color: #1f9a55; }
.step.editing .step-bullet {
  background: linear-gradient(145deg, #6d63f2, #4f8cff); color: #fff;
  box-shadow: 0 0 0 4px rgba(139,124,246,0.18);
}
.step strong { display: block; margin-top: 3px; font-size: 13px; font-weight: 650; }
.step span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.stepper-footer { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.stepper-footer label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 600; }
.stepper-meta { margin-top: 10px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.stepper-payment-action {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  margin-top: 0; padding-top: 14px; border-top: 1px solid var(--line);
}
.payment-action-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 0; }
.payment-action-label { color: var(--muted); font-size: 11px; font-weight: 600; }
.payment-action-hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; flex: 1 1 220px; }
.stepper-payment-action .btn { width: auto; min-width: 120px; }
.workflow-main, .workflow-notes { padding: 18px 20px; }
.workflow-main h2 { margin: 0 0 8px; font-size: 17px; }
.workflow-main .intro { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.workflow-node-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 12px; padding: 10px 12px; border-radius: 14px; background: #f7f8fc;
  font-size: 12px; color: var(--ink-2);
}
.workflow-node-bar strong { color: var(--ink); }
.workflow-footer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.workflow-notes-head {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px;
  margin-bottom: 10px;
}
.workflow-notes h3 { margin: 0 0 6px; font-size: 14px; }
.workflow-notes p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.workflow-notes textarea { min-height: 110px; width: 100%; resize: vertical; }
.notes-meta { margin-top: 0; color: var(--muted); font-size: 11px; white-space: nowrap; }
.cat-tree-toggle-spacer { display: inline-block; width: 28px; flex: 0 0 28px; }
.initiation-sub-stepper { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.initiation-sub-step, .workflow-sub-step {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0 !important; border-radius: 999px; padding: 7px 12px;
  background: #eef0fa !important; color: var(--ink-2); box-shadow: none !important;
  font: inherit; cursor: pointer;
}
.initiation-sub-step span, .workflow-sub-step span {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; font-size: 10px; font-weight: 700; color: #5b52d6;
}
.initiation-sub-step strong, .workflow-sub-step strong { font-size: 11px; font-weight: 650; }
.initiation-sub-step.active, .workflow-sub-step.active {
  background: linear-gradient(135deg, rgba(139,124,246,0.18), rgba(90,169,255,0.14)) !important;
  color: #5b52d6;
}
.initiation-sub-step.done span, .workflow-sub-step.done span { background: #e6f8f1; color: #1f9a55; }
.file-checklist, .initiation-checklist { display: grid; gap: 8px; }
.extra-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ——— Quota page (budget) ——— */
.quota-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 22px 24px;
  border-radius: 28px;
  background:
    radial-gradient(520px 240px at 100% 0%, rgba(90,169,255,0.16), transparent 55%),
    radial-gradient(420px 200px at 0% 100%, rgba(46,196,182,0.14), transparent 50%),
    #fff;
  box-shadow: var(--shadow-soft);
}
.quota-kicker {
  margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--violet);
}
.quota-hero-copy h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: -0.03em; }
.quota-hero-copy p { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.55; max-width: 42ch; }
.quota-hero-input {
  display: grid; gap: 10px; align-content: center;
  padding: 16px 18px; border-radius: 20px; background: rgba(247,248,252,0.95);
}
.quota-hero-input label { font-size: 12px; color: var(--muted); font-weight: 650; }
.quota-input-row { display: flex; align-items: center; gap: 10px; }
.quota-input {
  flex: 1; font-size: 28px !important; font-weight: 700; letter-spacing: -0.03em;
  padding: 12px 14px !important; border-radius: 14px !important; border: 0 !important;
  background: #fff !important; box-shadow: inset 0 0 0 1px var(--line);
}
.quota-input-row > span { color: var(--muted); font-size: 13px; font-weight: 650; }
.quota-hero-stats { display: grid; gap: 10px; }
.quota-stat {
  padding: 16px 18px; border-radius: 18px; background: rgba(247,248,252,0.95);
  display: grid; gap: 6px;
}
.quota-stat span { font-size: 11px; color: var(--muted); font-weight: 650; }
.quota-stat strong { font-size: 22px; letter-spacing: -0.02em; }
.quota-block {
  margin-bottom: 16px; padding: 18px 20px 8px;
  border-radius: 24px; background: #fff; box-shadow: var(--shadow-soft);
}
.quota-block-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.quota-block-head h2 { margin: 0; font-size: 16px; }
.quota-block-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.dept-plan-sum { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.dept-plan-sum strong { color: var(--ink); }
.dept-plan-hint { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.dept-plan-input { display: inline-flex; align-items: center; gap: 6px; }
.dept-plan-input span, .budget-unit { color: var(--muted); font-size: 11px; }
.budget-manage-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 8px 0 24px;
}

/* ——— Payment metric rail (not stacked KPI cards) ——— */
.pay-metric-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 18px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255,255,255,0.55);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.8);
}
.pay-metric {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 16px 16px 18px 18px;
  border-radius: 18px;
  background: #fff;
  min-height: 118px;
  overflow: hidden;
}
.pay-metric:before {
  content: "";
  position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px;
  border-radius: 999px; background: var(--teal);
}
.pay-metric.m-sky:before { background: var(--sky); }
.pay-metric.m-amber:before { background: var(--amber); }
.pay-metric.m-rose:before { background: var(--rose); }
.pay-metric span { font-size: 12px; color: var(--muted); font-weight: 650; }
.pay-metric strong {
  font-size: 28px; letter-spacing: -0.03em; line-height: 1.1; font-weight: 700;
}
.pay-metric strong small {
  margin-left: 4px; font-size: 12px; color: var(--muted); font-weight: 600;
}
.pay-metric em { font-style: normal; font-size: 11px; color: var(--muted); line-height: 1.4; }

@media (max-width: 1100px) {
  .quota-hero { grid-template-columns: 1fr; }
  .pay-metric-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .pay-metric-rail { grid-template-columns: 1fr; }
}

/* ——— Payment plan grids (fix cramped headers) ——— */
.payment-plan-panel {
  margin-top: 8px;
  border-radius: 16px;
  background: #f7f8fc;
  overflow: hidden;
}
.payment-plan-head,
.payment-plan-row {
  display: grid;
  grid-template-columns: 40px minmax(120px, 1.2fr) minmax(96px, 1fr) 88px 56px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}
.payment-manage-head,
.payment-manage-panel .payment-plan-row {
  grid-template-columns: 36px minmax(118px, 1.15fr) minmax(90px, 0.95fr) 72px 92px 52px;
  gap: 12px;
}
.payment-plan-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.7);
}
.payment-plan-row {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.payment-plan-row:last-child { border-bottom: 0; }
.payment-plan-index {
  color: var(--muted); font-size: 12px; font-weight: 700; text-align: center;
}
.payment-plan-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px 12px; border-top: 1px solid var(--line); background: #fff;
}
.payment-plan-total { font-size: 12px; font-weight: 700; color: var(--ink); }
.payment-manage-mode { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.payment-paid-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-2); white-space: nowrap;
}
.field-hint-list {
  margin: 10px 0 0; padding-left: 18px;
  color: var(--muted); font-size: 11px; line-height: 1.7;
}
.plan-pager {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px 12px; border-top: 1px solid var(--line); background: #fff;
  color: var(--muted); font-size: 12px;
}
.bill-month-panel .payment-plan-row .input-control { min-width: 0; width: 100%; }

/* files list pager — layout rules live with .files-rail below */

/* workflow file / checklist breathing room */
.file-item.soft-file,
.file-item.inline-file {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f7f8fc;
  margin-top: 6px;
}
.file-item.soft-file.done { background: #eefaf4; }
.file-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: #fff; color: #5b52d6; font-size: 14px; font-weight: 700;
}
.file-info { min-width: 0; display: grid; gap: 4px; }
.file-info strong {
  font-size: 13px; font-weight: 650;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-info span { font-size: 11px; color: var(--muted); line-height: 1.4; }
.checklist-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f7f8fc;
}
.checklist-row.done { background: #eefaf4; }
.checklist-mark {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--muted); font-size: 12px; font-weight: 700;
}
.checklist-row.done .checklist-mark { color: #1f9a55; }
.checklist-body { min-width: 0; display: grid; gap: 3px; }
.checklist-body strong { font-size: 13px; }
.checklist-body span { font-size: 11px; color: var(--muted); }
.checklist-status { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }
.checklist-row.done .checklist-status { color: #1f9a55; }
.initiation-checklist { display: grid; gap: 8px; }
.payment-register-body .form-grid { margin-bottom: 4px; }
.payment-manage-field { margin-top: 8px; }
.payment-manage-field > label {
  display: block;
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ——— Ledger heading: push actions to the right ——— */
.ledger-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.ledger-heading-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  margin-left: auto;
  min-width: min(560px, 100%);
}
.ledger-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  width: 100%;
}
.ledger-search-spotlight {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.9);
  box-shadow: var(--shadow-soft);
}
.ledger-search-spotlight .input-control {
  flex: 1; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 4px 0 !important;
}
.filter-bar-merged .filter-spacer { flex: 1 1 24px; }
.ledger-filters { flex-direction: column; align-items: stretch; gap: 10px; }
.ledger-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ledger-filter-row .filter-label { min-width: 32px; }
.ledger-filter-row-amount { padding-top: 10px; border-top: 1px dashed var(--line); }
.ledger-filter-row .filter-divider { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.ledger-filter-row .filter-num { width: 96px; }
.btn-ghost { background: transparent; box-shadow: none; color: #5b52d6; }
.btn-ghost:hover { background: #eef0fa; }

/* table cell helpers */
.data-table td.cell-nowrap, .data-table td.cell-num { white-space: nowrap; }
.data-table td.cell-num { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.data-table td.cell-num .cell-unit { margin-left: 2px; font-size: 11px; color: var(--muted); font-weight: 500; }
.data-table .cell-muted { color: var(--muted); font-weight: 500; }
.data-table td.cell-num .contract-code { font-weight: 500; }

/* 付款台：同一单据多期次合并 */
.payment-table tr.pay-group-head td { background: #f8f9fc; }
.payment-table tr.pay-group-head:hover td { background: #f3f5fb; }
.payment-table tr.pay-group-sub td {
  padding-top: 8px;
  padding-bottom: 8px;
  background: #fff;
  border-bottom-color: #eef0f5;
  color: var(--muted);
}
.payment-table tr.pay-group-sub:hover td { background: #fafbff; }
.payment-table tr.pay-group-sub.pay-group-last td { border-bottom-color: var(--line); }
.payment-table .pay-sub-dot {
  display: inline-block;
  width: 14px;
  color: #b8beca;
  font-weight: 700;
}
.payment-table tr.pay-group-sub .status { transform: scale(0.92); transform-origin: left center; }

/* ——— Payment legend ——— */
.pay-legend {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}
.pay-legend-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pay-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f4f5fb;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 650;
}
.pay-legend-chip i {
  width: 14px; height: 8px; border-radius: 999px; display: inline-block;
}
.pay-legend-chip i.lg-signed { background: #cfd5f5; }
.pay-legend-chip i.lg-plan { background: linear-gradient(90deg, var(--teal), var(--violet)); }
.pay-legend-chip i.lg-cross { background: var(--sky); }
.pay-legend-hint {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

/* ——— Soft pickers (vendors / team) ——— */
.soft-picker-field > label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 4px;
}
.soft-picker-hint {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
}
.soft-picker {
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfbfe, #f5f6fb);
  box-shadow: inset 0 0 0 1px rgba(29,31,44,0.05);
}
.soft-chips, .team-selected.soft-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 40px;
}
.soft-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(70,78,130,0.08);
}
.soft-chip button {
  border: 0;
  background: #eef0fa;
  color: var(--muted);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  padding: 0;
}
.soft-chip button:hover { background: #ffe4ea; color: var(--rose); }
.team-input {
  flex: 1 1 140px;
  min-width: 120px;
  border: 0 !important;
  background: transparent !important;
  outline: none;
  font-size: 12px;
  padding: 6px 2px !important;
  box-shadow: none !important;
}
.team-picker { position: relative; }
.suggestions {
  display: none;
  position: absolute;
  left: 0; right: 0; top: calc(100% + 6px);
  z-index: 40;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow: auto;
}
.suggestions.show { display: grid; gap: 4px; }

/* ——— Sys code block stacked ——— */
.initiation-sys-code {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f7f8fc;
}
.initiation-sys-code label {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
}
.initiation-sys-code .input-control {
  max-width: 280px;
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 650;
}
.initiation-sys-code .field-hint {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

.chip-more { background: #e8ebf8 !important; color: #5b52d6 !important; }
.tag-cloud { gap: 8px; }

/* ——— Ops brief dashboard (货源晨报) ——— */
.ops-brief {
  --ops-ink: #152028;
  --ops-slate: #24323c;
  --ops-mist: #e8eef1;
  --ops-sand: #f3f1ea;
  --ops-teal: #1f9e85;
  --ops-coral: #d45d4a;
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
}
.ops-mast {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; flex-wrap: wrap;
  padding: 4px 2px 2px;
}
.ops-mast-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.ops-mast-date {
  margin: 0; font-size: 11px; font-weight: 650; letter-spacing: 0.04em;
  color: var(--muted); text-transform: none;
}
.ops-mast-title {
  margin: 0; font-family: "Syne", var(--font);
  font-size: clamp(28px, 3.6vw, 38px); font-weight: 700; letter-spacing: -0.03em;
  color: var(--ops-ink); line-height: 1.15;
}
.ops-mast-lead { margin: 0; max-width: 38ch; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.ops-mast-tools {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end;
}
.ops-mast-tools > .choice-box,
.ops-mast-tools > .cat-filter,
.ops-mast-tools > .btn {
  align-self: center;
}
.ops-mast-tools .cat-filter { position: relative; }
.ops-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.9fr);
  gap: 14px;
  align-items: start;
}
.ops-cash {
  position: relative; overflow: hidden;
  border-radius: 28px; padding: 22px 24px 20px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(139,124,246,0.2), transparent 48%),
    linear-gradient(180deg, #faf9ff, #f1effa);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.ops-cash::after {
  content: ""; position: absolute; right: -36px; top: -44px; width: 230px; height: 230px;
  border-radius: 50%; background: radial-gradient(circle, rgba(139,124,246,0.32), transparent 68%);
  pointer-events: none;
}
.ops-cash-top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); position: relative; z-index: 1;
}
.ops-cash-cta {
  border: 0; background: rgba(29, 31, 44, 0.06); color: var(--ink-2);
  border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 650;
}
.ops-cash-cta:hover { background: rgba(29, 31, 44, 0.1); color: var(--ink); }
.ops-cash-stack {
  position: relative; z-index: 1;
  display: grid; gap: 8px; justify-items: start; margin-top: 18px;
}
.ops-cash-label {
  margin: 0;
  font-size: 13px; color: var(--muted); font-weight: 600;
}
.ops-cash-hero {
  display: inline-flex; align-items: baseline; gap: 8px;
  margin: 0; line-height: 1;
  font-family: var(--font);
  color: var(--ink);
}
.ops-cash-num {
  font-size: clamp(40px, 5.2vw, 54px);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.ops-cash-unit {
  font-size: 16px; font-weight: 600;
  color: var(--muted);
  transform: translateY(-2px);
}
.ops-cash-note {
  margin: 0;
  font-size: 12px; color: var(--muted);
}
.ops-cash-meters {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px;
}
.ops-meter {
  display: grid; gap: 4px; text-align: left; color: inherit;
  border: 0; border-radius: 16px; padding: 12px 14px;
  background: rgba(255,255,255,0.72); cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line);
}
.ops-meter:hover { background: #fff; }
.ops-meter span { font-size: 11px; color: var(--muted); font-weight: 650; }
.ops-meter strong { font-size: 18px; letter-spacing: -0.02em; color: var(--ink); }
.ops-meter i {
  display: block; height: 4px; margin-top: 6px; border-radius: 999px;
  background: linear-gradient(90deg, #d45d4a, #e8a25a);
}
.ops-meter i.teal { background: linear-gradient(90deg, #1f9e85, #6ec8b5); }
.ops-meter em { font-style: normal; font-size: 10px; color: var(--muted); }
.ops-cash-foot {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px; color: var(--muted); font-weight: 600;
}
.ops-queue {
  border-radius: 28px; padding: 18px 18px 14px;
  background: linear-gradient(180deg, #fbfaf6, #f3f1ea);
  box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; min-height: 0;
}
.ops-queue-head h2 {
  margin: 0; font-family: "Syne", var(--font); font-size: 22px; letter-spacing: -0.03em;
}
.ops-queue-head p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.ops-q-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 12px;
}
.ops-q-tab {
  border: 0; border-radius: 999px; padding: 6px 11px;
  background: rgba(21,32,40,0.06); color: var(--ops-slate);
  font-size: 11px; font-weight: 650; cursor: pointer;
}
.ops-q-tab b { margin-left: 4px; }
.ops-q-tab.active { background: var(--ops-ink); color: #fff; }
.ops-q-list {
  display: grid; gap: 10px; overflow: auto;
  /* 默认约 4 行可视高度，其余滚动 */
  max-height: calc((12px * 2 + 38px) * 4 + 10px * 3);
  padding-right: 10px;
  scrollbar-gutter: stable;
}
.ops-q-row {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  width: 100%; border: 0; border-radius: 14px; padding: 12px 14px;
  background: rgba(255,255,255,0.72); text-align: left; color: inherit; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.ops-q-row:hover { background: #fff; transform: translateX(2px); }
.ops-q-ord {
  font-family: "Syne", var(--font); font-size: 13px; font-weight: 700;
  color: var(--muted);
}
.ops-q-body { min-width: 0; display: grid; gap: 4px; }
.ops-q-body strong {
  font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ops-q-body em { font-style: normal; font-size: 11px; color: var(--muted); }
.ops-q-code {
  font-size: 10px; color: var(--muted); font-weight: 600;
  white-space: nowrap; padding-right: 2px;
}
.ops-q-row.tone-stuck .ops-q-ord { color: var(--ops-coral); }
.ops-q-row.tone-service .ops-q-ord { color: #c47a2c; }
.ops-q-row.tone-missing .ops-q-ord { color: #3d7ea6; }
.ops-q-row.tone-pay .ops-q-ord { color: var(--ops-teal); }
.ops-q-empty {
  padding: 28px 12px; text-align: center; color: var(--muted); font-size: 13px;
}
.ops-flow-panel {
  border-radius: 24px; padding: 16px 18px 18px;
  background: rgba(255,255,255,0.88); box-shadow: var(--shadow-soft);
}
.ops-sec-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.ops-sec-kicker {
  margin: 0; font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ops-teal);
}
.ops-sec-head h2 {
  margin: 4px 0 0; font-family: "Syne", var(--font); font-size: 20px; letter-spacing: -0.03em;
}
.ops-sec-hint { margin: 0; font-size: 11px; color: var(--muted); }
.ops-flow-ribbon {
  display: flex; gap: 6px; min-height: 108px; align-items: stretch;
}
.ops-flow-seg {
  display: grid; align-content: space-between; gap: 6px;
  min-width: 72px; padding: 12px 10px; border: 0; border-radius: 18px;
  background: color-mix(in srgb, var(--seg) 14%, white);
  color: inherit; text-align: left; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ops-flow-seg:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(21,32,40,0.1);
}
.ops-flow-idx {
  font-size: 10px; font-weight: 700; color: var(--seg); letter-spacing: 0.04em;
}
.ops-flow-seg strong {
  font-size: 12px; font-weight: 700; line-height: 1.25; color: var(--ops-ink);
}
.ops-flow-seg b {
  font-family: "Syne", var(--font); font-size: 26px; letter-spacing: -0.04em; color: var(--ops-ink);
}
.ops-flow-seg em { font-style: normal; font-size: 10px; color: var(--muted); }
.ops-deep { display: grid; gap: 10px; }
.ops-deep-label {
  margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.ops-deep-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 14px;
}
.ops-pane {
  border-radius: 22px; padding: 16px; min-width: 0;
  background: rgba(255,255,255,0.9); box-shadow: var(--shadow-soft);
}
.ops-pane-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  margin-bottom: 12px;
}
.ops-pane-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.ops-pane-head span { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.budget-scroll-tall { max-height: 360px; }
.chart-wrap.soft, .budget-scroll.soft, .insight-panel-body.soft { padding: 0; }
.budget-toolbar.soft { padding: 0 0 12px; }

@keyframes opsRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.ops-rise { animation: opsRise .45s ease both; }
.ops-rise.delay { animation-delay: .06s; }
.ops-rise.delay2 { animation-delay: .12s; }
.ops-rise.delay3 { animation-delay: .18s; }

/* legacy bento hooks kept for bill dash / other pages */
.bento-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.bento-kicker {
  margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--violet);
}
.bento-title { margin: 0; font-size: 28px; letter-spacing: -0.03em; font-weight: 700; }
.bento-sub { margin: 6px 0 0; color: var(--muted); font-size: 12px; max-width: 520px; }
.bento-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bento-filters { margin-bottom: 16px; }
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.bento-card {
  background: rgba(255, 255, 255, 0.92);
  border: 0; border-radius: 24px; box-shadow: var(--shadow-soft);
  padding: 18px; min-width: 0; overflow: hidden;
}
.bento-wide { grid-column: span 12; }
.bento-half { grid-column: span 6; }
.bento-full { grid-column: span 12; }
.panel-head.flat { border: 0; padding: 0 0 12px; background: transparent; }

/* process stages — soft tiles, not boxed chips */
.process-stage-wrap { display: grid; gap: 12px; }
.process-stage-summary {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center;
  color: var(--muted); font-size: 12px;
}
.process-stage-summary b { color: var(--ink); font-weight: 700; }
.process-stage-summary i { width: 4px; height: 4px; border-radius: 50%; background: #c5cadb; }
.process-stage-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px;
}
.process-stage-card {
  padding: 14px 12px; border-radius: 18px; border: 0;
  background: var(--stage-soft, #f7f8fc);
  box-shadow: none;
}
.process-stage-label { font-size: 11px; font-weight: 700; color: var(--stage-accent, var(--ink-2)); }
.process-stage-num { margin: 8px 0 4px; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.process-stage-unit { font-size: 11px; color: var(--muted); margin-left: 3px; font-weight: 600; }
.process-stage-foot { font-size: 10px; color: var(--muted); }
.process-stage-card.is-done { outline: 1px solid rgba(15,118,110,0.12); }

/* ledger: kill nested square boxes */
.contract-info-btn {
  display: block; width: 100%; text-align: left;
  border: 0 !important; background: transparent !important;
  padding: 0; box-shadow: none !important; border-radius: 0;
  color: inherit; cursor: pointer;
}
.contract-info-btn:hover .contract-name { color: #5b52d6; }
.contract-name { font-size: 13px; font-weight: 650; color: var(--ink); line-height: 1.35; }
.contract-code { margin-top: 2px; font-size: 11px; color: var(--muted); }
.th-sort {
  border: 0; background: transparent; padding: 0; color: inherit;
  font: inherit; font-weight: 700; cursor: pointer;
}
.th-sort:hover { color: #5b52d6; }

.stage-filter {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px;
  padding: 0; background: transparent; border: 0;
}
.stage-card {
  flex: 1 1 120px; min-width: 108px; max-width: 200px;
  display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto;
  gap: 2px 10px; align-items: center;
  padding: 12px 14px; border: 0; border-radius: 18px;
  background: rgba(255,255,255,0.88); box-shadow: var(--shadow-soft);
  text-align: left; color: inherit; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.stage-card:hover { transform: translateY(-1px); }
.stage-card.active {
  background: linear-gradient(145deg, rgba(139,124,246,0.16), rgba(90,169,255,0.12));
  box-shadow: 0 12px 28px rgba(91,82,214,0.16);
}
.stage-index {
  grid-row: 1 / span 2; width: 28px; height: 28px; border-radius: 10px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: #eef0fa; color: var(--violet);
}
.stage-card.active .stage-index { background: #fff; color: #5b52d6; }
.stage-card strong { font-size: 13px; grid-column: 2; }
.stage-card > span:not(.stage-index) { grid-column: 2; font-size: 10px; color: var(--muted); }
.stage-card b { grid-column: 3; grid-row: 1 / span 2; font-size: 12px; color: var(--ink-2); font-weight: 700; }

/* files: split list, not dense squares */
.soft-bar { background: rgba(255,255,255,0.75); padding: 12px 14px; border-radius: 18px; box-shadow: var(--shadow-soft); }
.filter-spacer { flex: 1 1 40px; }
.search-box { display: inline-flex; align-items: center; gap: 6px; min-width: 220px; }
.search-icon { color: var(--muted); }
.files-split {
  display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 14px; align-items: stretch; min-height: 520px;
}
.files-rail {
  background: rgba(255,255,255,0.9); border-radius: 22px; box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; overflow: hidden; min-height: 0;
}
.files-rail-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.files-rail-head strong { font-size: 14px; }
.files-rail-head span {
  min-width: 28px; height: 22px; padding: 0 8px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: #eef0fa; color: #5b52d6; font-size: 11px; font-weight: 700;
}
.files-rail-list { overflow: auto; padding: 8px; flex: 1 1 auto; min-height: 0; }
.files-rail-pager {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px 12px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 11px;
  flex: 0 0 auto;
}
.file-list-item {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  padding: 12px 12px; margin-bottom: 4px; border: 0; border-radius: 14px;
  background: transparent; text-align: left; color: inherit; cursor: pointer;
}
.file-list-item:hover { background: #f4f5fb; }
.file-list-item.active { background: linear-gradient(135deg, rgba(139,124,246,0.14), rgba(90,169,255,0.1)); }
.file-list-main { min-width: 0; display: grid; gap: 3px; }
.file-list-main strong {
  font-size: 13px; font-weight: 650; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-list-main span { font-size: 11px; color: var(--muted); }
.file-list-item em {
  font-style: normal; font-size: 11px; font-weight: 700;
  color: var(--ink-2); background: #eef0fa; padding: 4px 8px; border-radius: 999px;
}
.files-detail.panel { margin: 0; min-height: 0; display: flex; flex-direction: column; }
.file-tag-panel.soft { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.tag-label { font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-tag {
  border: 0; border-radius: 999px; padding: 6px 11px;
  background: #f1f2f8; color: var(--ink-2); font-size: 11px; font-weight: 600; cursor: pointer;
}
.chip-tag:hover { background: #e6e8f4; }
.chip-tag.active { background: #1d1f2c; color: #fff; }
.tag-add-inline { display: flex; gap: 8px; margin-top: 10px; max-width: 420px; }
.file-progress.soft {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  font-size: 12px; color: var(--muted);
}
.file-progress.soft > div {
  flex: 1; height: 8px; border-radius: 999px; background: #eef0f7; overflow: hidden;
}
.file-progress.soft i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--violet));
}
.file-progress.soft b { color: var(--ink); font-size: 12px; }
.file-list.file-scroll { padding: 8px 12px 16px; overflow: auto; flex: 1; }
.file-row.soft {
  display: grid; grid-template-columns: auto 48px minmax(0, 1fr) auto auto auto;
  gap: 10px; align-items: center; padding: 12px 10px; border-radius: 14px; border: 0;
}
.file-row.soft:hover { background: #f7f8fc; }
.file-type {
  width: 40px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: #eef4ff; color: #3d6fd9; font-size: 10px; font-weight: 700;
}
.file-row-main { min-width: 0; display: grid; gap: 2px; }
.file-row-main strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row-main span { font-size: 11px; color: var(--muted); }
.file-row-meta { font-size: 11px; color: var(--muted); white-space: nowrap; }
.file-row-action {
  border: 0; background: transparent; color: #5b52d6; font-size: 12px; font-weight: 650; padding: 4px 6px;
}
.file-row-action:hover { text-decoration: underline; }
.file-select-bar { gap: 10px; }
.file-select-all { font-size: 12px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.file-check-count { font-size: 12px; color: var(--muted); }
.folder-path { margin-top: 4px; font-size: 12px; color: var(--muted); }

/* budget / supervise soft blocks */
.budget-scroll { display: grid; gap: 8px; max-height: 360px; overflow: auto; padding-right: 4px; }
.budget-link {
  width: 100%; border: 0; border-radius: 16px; padding: 12px 14px;
  background: #f7f8fc; text-align: left; color: inherit; cursor: pointer;
  display: grid; gap: 6px; transition: background .15s ease;
}
.budget-link:hover { background: #eef0fa; }
.budget-link.warn .budget-fill { background: linear-gradient(90deg, var(--rose), var(--amber)); }
.budget-link-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.budget-link-top strong { font-size: 13px; font-weight: 650; }
.budget-link-top b { font-size: 13px; color: #5b52d6; }
.budget-link > span { font-size: 11px; color: var(--muted); }
.budget-track { height: 7px; border-radius: 999px; background: #e6e8f2; overflow: hidden; }
.budget-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--violet)); }
.budget-link-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.budget-link-meta em { font-style: normal; font-size: 10px; color: var(--muted); }
.supervise-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.supervise-kpi {
  border: 0; border-radius: 16px; padding: 14px; text-align: left;
  background: #f7f8fc; color: inherit; cursor: pointer;
}
.supervise-kpi:hover { background: #eef0fa; }
.supervise-kpi-label { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.supervise-kpi-num { display: block; margin: 8px 0 4px; font-size: 24px; letter-spacing: -0.02em; }
.supervise-kpi-num span { font-size: 11px; color: var(--muted); margin-left: 3px; }
.supervise-kpi-tip { font-style: normal; font-size: 10px; color: var(--muted); }
.supervise-detail { margin-top: 12px; }
.supervise-detail-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.anomaly-list { display: grid; gap: 8px; }
.watch-tab {
  border: 0; border-radius: 999px; padding: 7px 12px; background: #eef0fa;
  color: var(--ink-2); font-size: 12px; font-weight: 600; cursor: pointer;
}
.watch-tab.active { background: #1d1f2c; color: #fff; }
.insight-note { padding: 12px 14px; border-radius: 14px; background: #fff8eb; color: #9a6b1a; font-size: 12px; margin-bottom: 12px; }

/* kill leftover bordered grids from old files UI */
.file-contract-panel, .file-contract-grid, .tag-add-bar { display: none !important; }
.filter-tag {
  border: 0; border-radius: 999px; padding: 6px 11px;
  background: #f1f2f8; color: var(--ink-2); font-size: 11px; font-weight: 600;
}

/* 合同详情弹窗（公开演示此前缺样式 → KPI 粘连、节点轮巨大留白） */
.modal-card.modal-wide {
  width: min(1160px, 96vw);
  height: min(780px, 82vh);
  max-width: 98vw;
  max-height: 92vh;
  min-width: min(800px, 96vw);
  min-height: min(520px, 80vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.modal-wide .modal-columns {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 14px;
  padding: 16px 24px 10px;
  overflow: hidden;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}
.modal-columns .detail-kpi-card { grid-column: 1; grid-row: 1; }
.modal-columns .detail-node-panel { grid-column: 2; grid-row: 1; }
.modal-columns .modal-col-left { grid-column: 1; grid-row: 2; }
.modal-columns .modal-col-right {
  grid-column: 2;
  grid-row: 2;
  border-left: 1px solid var(--line);
  padding-left: 14px;
}
.modal-col-left, .modal-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  padding-bottom: 8px;
}
.modal-wide .modal-footer {
  flex: 0 0 auto;
  position: relative;
  padding-right: 52px;
}
.detail-kpi-card {
  min-width: 0;
  padding: 16px 20px;
  border-radius: 14px;
  background: #f7f8fc;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
}
.detail-kpi-group {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 20px;
  align-items: center;
  min-width: 0;
}
.detail-kpi-group > div { min-width: 0; text-align: center; }
.detail-kpi-group > div > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.detail-kpi-group > div > strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.modal-columns .detail-node-panel {
  min-width: 0;
  padding: 14px 18px;
  border-radius: 14px;
  background: #f7f8fc;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.modal-columns .node-wheel-wrap { width: min(100%, 400px); }
.node-wheel-wrap { width: 100%; }
.node-wheel-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 8px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(139, 124, 246, 0.08);
  border: 1px solid rgba(139, 124, 246, 0.18);
  line-height: 1.35;
}
.node-wheel-note-tag {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--violet);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.node-wheel-note-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 10px;
  color: var(--ink-2);
  font-weight: 500;
  word-break: break-all;
}
.node-wheel {
  position: relative;
  width: 100%;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  --wheel-item-h: 34px;
}
.node-wheel-highlight {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: var(--wheel-item-h);
  margin-top: calc(var(--wheel-item-h) / -2);
  border-radius: 6px;
  background: #f7f8fc;
  box-shadow: inset 0 0 0 1px rgba(139, 124, 246, 0.28);
  pointer-events: none;
  z-index: 1;
}
.node-wheel-fade {
  position: absolute;
  left: 0;
  right: 0;
  height: calc(var(--wheel-item-h) + 8px);
  pointer-events: none;
  z-index: 3;
}
.node-wheel-fade-top {
  top: 0;
  background: linear-gradient(180deg, #fff 30%, rgba(255, 255, 255, 0));
}
.node-wheel-fade-bottom {
  bottom: 0;
  background: linear-gradient(0deg, #fff 30%, rgba(255, 255, 255, 0));
}
.node-wheel-viewport {
  position: relative;
  z-index: 2;
  height: calc(var(--wheel-item-h) * 3 + 8px);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.node-wheel-viewport::-webkit-scrollbar { display: none; }
.node-wheel-list { display: grid; gap: 0; }
.node-wheel-item {
  height: var(--wheel-item-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10px;
  user-select: none;
}
.node-wheel-line {
  display: flex;
  align-items: center;
  min-width: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.node-wheel-stage {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  color: #9aa8b8;
}
.node-wheel-dot {
  flex: 0 0 auto;
  margin: 0 4px;
  color: #c5ced8;
  font-size: 11px;
}
.node-wheel-sub {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 52%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  color: #9aa8b8;
}
.node-wheel-sep {
  display: none;
  flex: 0 0 auto;
  margin: 0 4px;
  color: #c5ced8;
  font-size: 10px;
}
.node-wheel-meta {
  display: none;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 10px;
  color: #6b7a8f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.node-wheel-item.is-near .node-wheel-stage,
.node-wheel-item.is-near .node-wheel-sub { color: #6b7a8f; }
.node-wheel-item.is-far .node-wheel-stage,
.node-wheel-item.is-far .node-wheel-sub { color: #b0bcc9; }
.node-wheel-item.is-center .node-wheel-stage { color: var(--violet); font-weight: 700; }
.node-wheel-item.is-center .node-wheel-sub { color: var(--ink-2); font-weight: 500; }
.node-wheel-item.is-center .node-wheel-sep,
.node-wheel-item.is-center .node-wheel-meta { display: inline; }
.node-wheel-item.is-done.is-center .node-wheel-stage,
.node-wheel-item.is-done.is-center .node-wheel-meta { color: #1a8f5c; }
.detail-section { padding: 4px 0 12px; }
.detail-section h3 { margin: 0 0 10px; font-size: 12px; color: var(--ink); }
.detail-lines {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
}
.detail-lines p {
  margin: 0;
  color: var(--ink-2);
  font-size: 11px;
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}
.detail-lines span {
  flex: 0 0 92px;
  color: var(--muted);
}
.registrar-section { margin-top: auto; padding-bottom: 8px; }
.registrar-name { margin: 0; color: var(--ink-2); font-size: 11px; }
.sys-code { color: var(--ink-2); }
.pay-list { display: grid; gap: 8px; }
.pay-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 8px;
  background: #f7f8fc;
  font-size: 11px;
  color: var(--ink-2);
}
.contract-file-links { display: grid; gap: 8px; }
.contract-file-links > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f7f8fc;
  color: var(--ink-2);
  font-size: 11px;
}
.modal-wide .file-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
}
.modal-wide .file-progress > div {
  height: 8px;
  border-radius: 8px;
  background: #edf1f5;
  overflow: hidden;
}
.modal-wide .file-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--violet));
}
.modal-resize {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 6;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(139, 124, 246, 0.35);
  background: #fff linear-gradient(135deg, transparent 0 44%, rgba(139,124,246,0.45) 44% 52%, transparent 52% 66%, rgba(139,124,246,0.45) 66% 74%, transparent 74%);
  cursor: nwse-resize;
}
.modal-wide.is-resizing { user-select: none; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .nova-top { grid-template-columns: 1fr; gap: 10px; }
  .nova-tabs { justify-content: flex-start; overflow-x: auto; }
  .bento-hero, .bento-side, .bento-half, .bento-wide, .bento-full { grid-column: span 12; }
  .ops-stage, .ops-deep-grid { grid-template-columns: 1fr; }
  .ops-flow-ribbon { flex-wrap: wrap; }
  .ops-flow-seg { flex: 1 1 140px !important; min-height: 96px; }
  .process-stage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .files-split { grid-template-columns: 1fr; }
  .workflow-layout { grid-template-columns: 1fr; }
  .stepper.is-horizontal .stepper-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stepper.is-horizontal .step:not(:last-child):after { display: none; }
  .modal-wide .modal-columns {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    overflow: auto;
  }
  .modal-columns .detail-kpi-card,
  .modal-columns .detail-node-panel,
  .modal-columns .modal-col-left,
  .modal-columns .modal-col-right { grid-column: 1; }
  .modal-columns .detail-kpi-card { grid-row: 1; }
  .modal-columns .detail-node-panel { grid-row: 2; }
  .modal-columns .modal-col-left { grid-row: 3; }
  .modal-columns .modal-col-right { grid-row: 4; border-left: 0; padding-left: 0; }
  .modal-card.modal-wide { width: 100%; min-width: 0; height: 86vh; max-height: 86vh; }
}
@media (max-width: 860px) {
  body.skin-nova { overflow: auto; }
  .desk { height: auto; min-height: 100vh; margin: 0; border-radius: 0; }
  .nova-rail { display: none; }
  .kpi-grid { grid-template-columns: 1fr; }
  .ops-cash-meters { grid-template-columns: 1fr; }
  .ops-mast-title { font-size: 30px; }
  .process-stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .file-row.soft { grid-template-columns: auto 40px minmax(0, 1fr); }
  .file-row-meta, .file-row-action { display: none; }
}

/* —— 自学版助手浮窗（不占用顶栏导航） —— */
.my-ai-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 16px;
  background: var(--ink, #1d1f2c);
  color: #fff;
  font: 650 13px/1 "DM Sans", "PingFang SC", sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(29, 31, 44, 0.28);
}
.my-ai-fab:hover { opacity: 0.94; }
.my-ai-fab.is-open { background: var(--violet, #8b7cf6); }
.my-ai-panel {
  position: fixed;
  right: 22px;
  bottom: 86px;
  z-index: 80;
  width: min(420px, calc(100vw - 28px));
  max-height: min(640px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(70, 78, 130, 0.22);
  overflow: hidden;
}
.my-ai-panel[hidden] { display: none !important; }
.my-ai-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(29, 31, 44, 0.08);
}
.my-ai-head strong { display: block; font-size: 15px; color: var(--ink, #1d1f2c); }
.my-ai-head span { display: block; margin-top: 3px; font-size: 11px; color: var(--muted, #8b90a5); line-height: 1.4; }
.my-ai-head-actions { display: flex; gap: 6px; }
.my-ai-gear {
  border: 0;
  background: #eef0fa;
  color: var(--ink, #1d1f2c);
  width: 28px;
  height: 28px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.my-ai-settings {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(29, 31, 44, 0.08);
  background: #fbfbfe;
  display: grid;
  gap: 8px;
}
.my-ai-settings[hidden] { display: none !important; }
.my-ai-settings label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted, #8b90a5);
}
.my-ai-settings input,
.my-ai-settings select {
  border: 1px solid rgba(29, 31, 44, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink, #1d1f2c);
  background: #fff;
}
.my-ai-settings-actions { display: flex; gap: 8px; }
.my-ai-save,
.my-ai-clear-key {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  font: 650 12px/1 "DM Sans", "PingFang SC", sans-serif;
  cursor: pointer;
}
.my-ai-save { background: var(--ink, #1d1f2c); color: #fff; }
.my-ai-clear-key { background: #eef0fa; color: var(--ink, #1d1f2c); }
.my-ai-warn {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: #5c6178;
  background: rgba(139, 124, 246, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
}
.my-ai-hint { margin: 0; font-size: 11px; color: var(--muted, #8b90a5); line-height: 1.45; }
.my-ai-hint a { color: var(--violet, #8b7cf6); }
.my-ai-bubble code {
  font-size: 11px;
  background: rgba(29, 31, 44, 0.06);
  padding: 1px 5px;
  border-radius: 5px;
}
.my-ai-input button:disabled { opacity: 0.55; cursor: wait; }
.my-ai-body {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
.my-ai-chat {
  padding: 12px 14px;
  overflow: auto;
  display: grid;
  gap: 8px;
  max-height: 280px;
}
.my-ai-bubble {
  max-width: 95%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink, #1d1f2c);
}
.my-ai-bubble.user {
  justify-self: end;
  background: var(--ink, #1d1f2c);
  color: #fff;
}
.my-ai-bubble.bot {
  justify-self: start;
  background: #f4f5fb;
}
.my-ai-bubble ul { margin: 6px 0 0; padding-left: 18px; }
.my-ai-bubble p { margin: 0 0 6px; }
.my-ai-bubble p:last-child { margin-bottom: 0; }
.my-ai-src { margin-top: 8px !important; font-size: 11px; color: var(--muted, #8b90a5); }
.my-ai-prompts { display: grid; gap: 6px; margin-top: 8px; }
.my-ai-prompt {
  text-align: left;
  border: 1px solid rgba(29, 31, 44, 0.1);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font: 600 12px/1.4 "DM Sans", "PingFang SC", sans-serif;
  color: var(--ink, #1d1f2c);
  cursor: pointer;
}
.my-ai-prompt:hover { border-color: rgba(139, 124, 246, 0.45); }
.my-ai-chain {
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(29, 31, 44, 0.08);
  background: rgba(247, 248, 252, 0.9);
  max-height: 160px;
  overflow: auto;
}
.my-ai-chain-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted, #8b90a5);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.my-ai-step {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  line-height: 1.4;
}
.my-ai-step i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(139, 124, 246, 0.15);
  color: var(--violet, #8b7cf6);
  font-style: normal;
  font-weight: 700;
  font-size: 10px;
  display: grid;
  place-items: center;
}
.my-ai-step b { display: block; color: var(--ink, #1d1f2c); }
.my-ai-step span { color: #5c6178; word-break: break-word; }
.my-ai-input {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(29, 31, 44, 0.08);
}
.my-ai-input input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(29, 31, 44, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  color: var(--ink, #1d1f2c);
}
.my-ai-input button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--ink, #1d1f2c);
  color: #fff;
  font: 650 13px/1 "DM Sans", "PingFang SC", sans-serif;
  cursor: pointer;
}
.my-ai-foot {
  margin: 0;
  padding: 0 14px 12px;
  font-size: 11px;
  color: var(--muted, #8b90a5);
}
.my-ai-foot a { color: var(--violet, #8b7cf6); }
