:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --line: #dde3e8;
  --text: #17212b;
  --muted: #66727d;
  --nav: #17232b;
  --nav-hover: #263640;
  --teal: #147d75;
  --teal-soft: #e5f3f1;
  --blue: #2d5f9a;
  --blue-soft: #eaf1f8;
  --amber: #a56516;
  --amber-soft: #fff2dc;
  --red: #b64040;
  --red-soft: #fdeaea;
  --green: #307a4c;
  --shadow: 0 14px 35px rgba(23, 33, 43, .12);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.hidden { display: none !important; }
.mobile-only, .icon-button.mobile-only { display: none; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #edf1f3; }
.login-panel { width: min(430px, 100%); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 34px; border-radius: 6px; }
.brand-lockup { display: flex; align-items: center; gap: 11px; color: #fff; min-width: 0; }
.brand-lockup.large { color: var(--text); margin-bottom: 30px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--teal); color: #fff; font-weight: 800; border-radius: 5px; flex: 0 0 auto; }
.brand-lockup strong, .brand-lockup small { display: block; white-space: nowrap; }
.brand-lockup strong { font-size: 14px; }
.brand-lockup.large strong { font-size: 18px; }
.brand-lockup small { color: #9eabb3; margin-top: 2px; font-size: 11px; }
.brand-lockup.large small { color: var(--muted); font-size: 12px; }
.login-form { display: grid; gap: 16px; }
label { color: #4c5964; font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; margin-top: 6px; border: 1px solid #cfd7dd; background: #fff; color: var(--text); border-radius: 4px; padding: 10px 11px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20, 125, 117, .12); }
textarea { min-height: 105px; resize: vertical; line-height: 1.55; }
button.primary { border: 1px solid var(--teal); color: #fff; background: var(--teal); border-radius: 4px; padding: 9px 14px; font-weight: 700; }
button.primary:hover { background: #106d66; }
button.wide { width: 100%; padding: 11px; }
.form-error { min-height: 18px; color: var(--red); margin: 0; }
.initial-accounts { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 15px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.initial-accounts strong, .initial-accounts span { display: block; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 220px; background: var(--nav); padding: 20px 13px; display: flex; flex-direction: column; z-index: 30; }
.sidebar .brand-lockup { padding: 0 7px 19px; border-bottom: 1px solid #31414a; }
.nav-list { display: grid; gap: 3px; margin-top: 18px; }
.nav-list button, .sidebar-settings { width: 100%; display: flex; align-items: center; gap: 11px; color: #c8d1d6; background: transparent; border: 0; padding: 10px 11px; border-radius: 4px; text-align: left; }
.nav-list button:hover, .sidebar-settings:hover { background: var(--nav-hover); color: #fff; }
.nav-list button.active { background: #e9f3f2; color: #155f59; font-weight: 700; }
.nav-list svg, .sidebar-settings svg { width: 17px; height: 17px; }
.sidebar-settings { margin-top: auto; }
.main-column { grid-column: 2; min-width: 0; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 26px; position: sticky; top: 0; z-index: 20; }
.topbar > div:first-child { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.topbar h1 { font-size: 18px; margin: 0; line-height: 1.25; }
.topbar p { font-size: 12px; color: var(--muted); margin: 3px 0 0; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; background: #fff; color: #4e5b65; border: 1px solid var(--line); border-radius: 4px; padding: 0; flex: 0 0 auto; }
.icon-button:hover { background: var(--surface-2); color: var(--teal); }
.icon-button svg { width: 17px; height: 17px; }
.server-status { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.server-status > span { width: 7px; height: 7px; background: #3ea764; border-radius: 50%; box-shadow: 0 0 0 3px #e5f4e9; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 0 7px; }
.user-chip > span:first-child { width: 31px; height: 31px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 4px; font-weight: 700; }
.user-chip strong, .user-chip small { display: block; white-space: nowrap; }
.user-chip strong { font-size: 12px; }
.user-chip small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.page-content { padding: 22px 26px 40px; max-width: 1600px; margin: 0 auto; }

.page-toolbar { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; }
.search-box { position: relative; width: min(310px, 38vw); }
.search-box svg { position: absolute; left: 10px; top: 50%; width: 15px; transform: translateY(-50%); color: #87929b; }
.search-box input { margin: 0; padding-left: 33px; height: 37px; }
.secondary-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 4px; padding: 8px 12px; background: #fff; border: 1px solid var(--line); color: #46535d; font-weight: 600; }
.secondary-button:hover { border-color: #aebac3; background: var(--surface-2); }
.danger-button { color: var(--red); border-color: #ebcaca; }
.secondary-button svg, .danger-button svg, button.primary svg { width: 16px; height: 16px; }

.stat-grid { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); border: 1px solid var(--line); background: var(--surface); margin-bottom: 20px; }
.stat-item { min-height: 104px; padding: 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.stat-item:last-child { border-right: 0; }
.stat-item span { color: var(--muted); font-size: 12px; }
.stat-item strong { font-size: 28px; line-height: 1; }
.stat-item small { color: #89949c; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(310px, .7fr); gap: 18px; }
.section-panel { background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.section-panel > header { min-height: 48px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.section-panel h2 { font-size: 14px; margin: 0; }
.section-panel header span { color: var(--muted); font-size: 12px; }
.activity-list { list-style: none; padding: 4px 15px; margin: 0; }
.activity-list li { padding: 11px 0; border-bottom: 1px solid #edf0f2; display: grid; gap: 4px; }
.activity-list li:last-child { border-bottom: 0; }
.activity-list strong { font-size: 12px; }
.activity-list span { color: var(--muted); font-size: 12px; line-height: 1.45; }

.table-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 850px; }
th { position: sticky; top: 0; z-index: 2; background: #f1f4f6; color: #53606a; text-align: left; font-size: 12px; font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid #edf0f2; color: #35414a; vertical-align: middle; }
tbody tr:hover { background: #f8fbfb; }
tbody tr.clickable { cursor: pointer; }
.title-cell { min-width: 190px; font-weight: 700; color: var(--text); }
.muted { color: var(--muted); }
.empty-state { min-height: 250px; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 30px; background: var(--surface); border: 1px solid var(--line); }
.empty-state svg { width: 34px; height: 34px; margin-bottom: 8px; color: #9eabb3; }
.badge { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 8px; border-radius: 3px; background: #eef1f3; color: #59656e; font-size: 12px; white-space: nowrap; }
.badge.account-mirror { color: #285788; background: #e3edf7; }
.badge.account-appliance { color: #12665f; background: #e0f0ec; }
.badge.teal { color: #12665f; background: var(--teal-soft); }
.badge.blue { color: #285788; background: var(--blue-soft); }
.badge.amber { color: #86530f; background: var(--amber-soft); }
.badge.red { color: #993838; background: var(--red-soft); }
.badge.green { color: #286b42; background: #e6f3e9; }
.row-actions { display: flex; gap: 5px; }
.row-actions .icon-button { width: 30px; height: 30px; }
.external-link { color: var(--blue); text-decoration: none; }
.external-link:hover { text-decoration: underline; }
.lead-photo-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; cursor: zoom-in; border: 1px solid #e5e7eb; vertical-align: middle; }
.lead-photo-cell { position: relative; display: inline-block; }
.lead-photo-count { position: absolute; top: -7px; right: -7px; min-width: 17px; height: 17px; border-radius: 999px; background: #2563eb; color: #fff; font-size: 10px; line-height: 17px; text-align: center; padding: 0 4px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.lead-photo-list { display: flex; flex-wrap: wrap; gap: 8px; }
.lead-photo-chip { position: relative; }
.lead-photo-chip img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e7eb; cursor: zoom-in; display: block; }
.lead-photo-remove { position: absolute; top: -6px; right: -6px; width: 19px; height: 19px; border-radius: 50%; border: none; background: #dc2626; color: #fff; font-size: 13px; line-height: 1; cursor: pointer; padding: 0; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.lead-photo-remove:hover { background: #b91c1c; }
.mini-progress { width: 110px; height: 22px; position: relative; background: #edf1f3; overflow: hidden; border-radius: 3px; }
.mini-progress span { position: absolute; inset: 0 auto 0 0; background: #c9e6e2; }
.mini-progress b { position: relative; z-index: 1; display: block; padding: 3px 7px; font-size: 11px; color: #31534f; }

.kanban-wrap { overflow-x: auto; padding-bottom: 8px; }
.kanban { display: grid; grid-template-columns: repeat(10, 265px); gap: 10px; align-items: start; }
.kanban-column { background: #e9edef; border: 1px solid #d9e0e4; min-height: 420px; }
.kanban-column > header { height: 43px; display: flex; align-items: center; justify-content: space-between; padding: 0 11px; border-bottom: 1px solid #d9e0e4; }
.kanban-column h3 { font-size: 12px; margin: 0; }
.kanban-column header span { min-width: 22px; height: 22px; display: grid; place-items: center; background: #fff; border-radius: 3px; color: var(--muted); font-size: 11px; }
.kanban-cards { display: grid; gap: 8px; padding: 8px; }
.kanban-card { background: #fff; border: 1px solid #d9e0e4; border-left: 3px solid var(--teal); padding: 11px; cursor: pointer; }
.kanban-card:hover { border-color: #aebbc3; border-left-color: var(--blue); }
.kanban-card strong { display: block; line-height: 1.45; margin-bottom: 8px; }
.kanban-card div { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.kanban-card .kanban-progress { display: block; height: 5px; background: #e3e8eb; margin-top: 10px; overflow: hidden; }
.kanban-card .kanban-progress span { display: block; height: 100%; background: var(--teal); }
.kanban-card > small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; text-align: right; }

.document-stats { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); background: #fff; border: 1px solid var(--line); margin-bottom: 16px; }
.document-stats > div { min-height: 86px; display: flex; flex-direction: column; justify-content: center; padding: 14px 18px; border-right: 1px solid var(--line); }
.document-stats > div:last-child { border-right: 0; }
.document-stats span { color: var(--muted); font-size: 12px; }
.document-stats strong { margin-top: 6px; font-size: 22px; }
.toolbar-select { width: 145px; height: 37px; margin: 0; }
.document-path-note { display: flex; align-items: center; gap: 8px; color: #52606a; background: #eef5f4; border: 1px solid #d2e5e2; padding: 10px 12px; margin-bottom: 12px; font-size: 12px; }
.document-path-note svg { width: 16px; height: 16px; color: var(--teal); }
.document-name { display: flex; align-items: center; gap: 9px; min-width: 230px; }
.document-name > svg { width: 19px; height: 19px; color: var(--blue); flex: 0 0 auto; }
.document-name span, .document-name small { display: block; }
.document-name small { margin-top: 3px; color: var(--muted); font-weight: 400; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.row-actions a.icon-button { text-decoration: none; }

.knowledge-stats { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); background: #fff; border: 1px solid var(--line); margin-bottom: 16px; }
.knowledge-stats > div { min-height: 92px; display: flex; flex-direction: column; justify-content: center; padding: 14px 17px; border-right: 1px solid var(--line); }
.knowledge-stats > div:last-child { border-right: 0; }
.knowledge-stats span, .knowledge-stats small { color: var(--muted); font-size: 11px; }
.knowledge-stats strong { margin: 6px 0 4px; font-size: 23px; }
.document-path-note code { color: #245d58; overflow-wrap: anywhere; }
.knowledge-section { margin-top: 19px; }
.knowledge-section > header { display: flex; align-items: center; justify-content: space-between; min-height: 42px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.knowledge-section > header > div { display: flex; align-items: baseline; gap: 10px; }
.knowledge-section h2 { margin: 0; font-size: 15px; }
.knowledge-section header span { color: var(--muted); font-size: 12px; }
.knowledge-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.knowledge-card { min-height: 174px; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start; padding: 15px; text-align: left; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 6px; }
.knowledge-card:hover { border-color: #9cb8b5; box-shadow: 0 5px 16px rgba(23, 33, 43, .07); }
.knowledge-card-icon { width: 38px; height: 38px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); border-radius: 5px; }
.knowledge-card-icon svg { width: 19px; height: 19px; }
.knowledge-card-body, .knowledge-card-body strong, .knowledge-card-body small { display: block; min-width: 0; }
.knowledge-card-meta { display: block; color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.knowledge-card-body strong { font-size: 14px; line-height: 1.4; }
.knowledge-card-body > small { color: #5d6972; line-height: 1.55; margin-top: 7px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.knowledge-card-footer { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 10px; }
.knowledge-toolbar { margin: 0; padding: 0 0 11px; }
.knowledge-source-name { display: flex; align-items: center; gap: 9px; min-width: 240px; }
.knowledge-source-name > svg { width: 18px; height: 18px; color: var(--blue); flex: 0 0 auto; }
.knowledge-source-name strong, .knowledge-source-name small { display: block; }
.knowledge-source-name small { color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 3px; }
.knowledge-table td:nth-child(7) { max-width: 310px; line-height: 1.45; }
.knowledge-table a.icon-button { text-decoration: none; }
.knowledge-detail { display: block; }
.knowledge-detail-summary { padding: 18px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.knowledge-detail-summary > div { display: flex; gap: 6px; margin-bottom: 10px; }
.knowledge-detail-summary p { margin: 0; line-height: 1.65; color: #45515b; }
.knowledge-detail-grid { display: grid; grid-template-columns: 1fr 1fr; }
.knowledge-detail-grid > div { padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 160px; }
.knowledge-detail-grid > div:nth-child(2n) { border-right: 0; }
.knowledge-detail-grid h3 { margin: 0 0 11px; font-size: 13px; }
.knowledge-detail-grid p, .knowledge-detail-grid li { color: #4f5b65; line-height: 1.65; }
.knowledge-detail-grid p { margin: 0; }
.knowledge-detail-grid ul { margin: 0; padding-left: 18px; }
.knowledge-caution { background: #fff9ef; }
.knowledge-caution h3 { color: #885a18; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(17, 26, 32, .55); display: grid; place-items: center; padding: 20px; z-index: 100; }
.modal-panel { width: min(820px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; box-shadow: var(--shadow); border-radius: 5px; }
.modal-panel.task-modal { width: min(1120px, 100%); }
.modal-panel > header { position: sticky; top: 0; z-index: 3; background: #fff; min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.modal-panel h2 { margin: 0; font-size: 16px; }
.modal-panel header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 20px; }
.form-grid label.full { grid-column: 1 / -1; }
.metrics-platform-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.metrics-platform { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 14px; background: var(--surface-2); }
.metrics-platform h4 { margin: 0 0 8px; font-size: 13px; font-weight: 500; }
.metrics-platform .pf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.metrics-platform .pf label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.metrics-platform .pf input { width: 100%; min-width: 0; }
.metric-title { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.metric-thumb { width: 36px; height: 64px; border-radius: 6px; overflow: hidden; flex: none; background: var(--line); display: grid; place-items: center; }
.metric-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.metric-thumb-empty svg { width: 16px; height: 16px; color: var(--muted); }
.metric-title strong { display: block; font-size: 13px; }
.metric-title small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.metrics-table td { vertical-align: middle; }
.metric-cell { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.metric-cell span { line-height: 1.7; }
.metric-cell .metric-inq { color: var(--teal); font-weight: 500; grid-column: 1 / -1; }
.metric-cell.metric-empty { font-style: italic; }
.form-grid .form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; padding-top: 7px; border-top: 1px solid var(--line); }
.form-grid .form-actions .danger-button { margin-right: auto; }
.field-help { color: var(--muted); font-weight: 400; font-size: 11px; display: block; margin-top: 4px; }
.ai-parse-ok { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; background: var(--teal-soft); color: #0f5f59; border: 1px solid #bfe3dd; border-radius: 6px; padding: 9px 12px; font-size: 13px; margin-bottom: 4px; }
.ai-parse-ok svg { width: 16px; height: 16px; flex: none; }
#aiLeadRaw { min-height: 130px; }
.task-detail-body { display: block; padding: 0; }
.task-summary { position: relative; padding: 18px 20px; background: #f8fafb; border-bottom: 1px solid var(--line); }
.task-badges { display: flex; gap: 6px; margin-bottom: 14px; }
.task-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-right: 130px; }
.task-meta span { color: var(--text); min-width: 0; }
.task-meta b { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.task-summary > button { position: absolute; top: 18px; right: 20px; }
.task-progress { margin-top: 16px; max-width: 540px; }
.task-progress > div:first-child { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; }
.progress-track { height: 7px; background: #dde4e7; overflow: hidden; border-radius: 3px; }
.progress-track span { display: block; height: 100%; background: var(--teal); }
.task-book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.task-book-section { padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 110px; }
.task-book-section:nth-child(even) { border-right: 0; }
.task-book-section h3, .task-checklist-panel h3, .task-updates-panel h3 { font-size: 13px; margin: 0 0 9px; }
.task-book-section > div { color: #46525b; line-height: 1.75; }
.task-workspace-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); }
.task-documents-panel { padding: 16px 20px 18px; border-bottom: 1px solid var(--line); }
.task-documents-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.task-documents-panel h3 { font-size: 13px; margin: 0; }
.task-documents-panel header span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.task-document-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.task-document-item { display: grid; grid-template-columns: minmax(0, 1fr) 38px; border: 1px solid var(--line); }
.task-document-item > button { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 10px 11px; background: #fff; color: var(--text); border: 0; text-align: left; min-width: 0; }
.task-document-item > a { display: grid; place-items: center; border-left: 1px solid var(--line); color: var(--teal); text-decoration: none; }
.task-document-item:hover { border-color: #9db7b4; background: #f8fbfb; }
.task-document-list svg { width: 17px; height: 17px; color: var(--teal); }
.task-document-list strong, .task-document-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-document-list small { color: var(--muted); margin-top: 4px; font-size: 11px; }
.task-document-list .review-note { color: var(--red); }
.task-checklist-panel, .task-updates-panel { padding: 18px 20px 22px; min-width: 0; }
.task-checklist-panel { border-right: 1px solid var(--line); }
.task-checklist-panel > header, .task-updates-panel > header { min-height: 34px; }
.task-checklist-panel > header > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-checklist-panel header span { color: var(--muted); font-size: 11px; }
.checklist-items { border-top: 1px solid var(--line); }
.checklist-item { min-height: 48px; display: grid; grid-template-columns: 20px minmax(0, 1fr) 30px; align-items: center; gap: 8px; border-bottom: 1px solid #edf0f2; color: var(--text); font-weight: 500; }
.checklist-item input { width: 16px; height: 16px; margin: 0; accent-color: var(--teal); }
.checklist-item small { display: block; color: var(--muted); margin-top: 4px; font-weight: 400; }
.checklist-item.done > span { color: #7b878f; text-decoration: line-through; }
.checklist-item .icon-button { width: 28px; height: 28px; }
.add-checklist { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: 13px; }
.add-checklist input { margin: 0; }
.update-composer { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 8px; padding: 12px; background: #f4f7f8; border: 1px solid var(--line); }
.update-composer select, .update-composer textarea, .update-composer input { margin: 0; }
.update-composer textarea { grid-column: 2; grid-row: 1 / span 2; min-height: 92px; }
.update-composer input { grid-column: 1 / -1; }
.update-composer button { justify-self: end; grid-column: 1 / -1; }
.task-action-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-bottom: 0; }
.task-action-tabs button { display: flex; justify-content: center; align-items: center; gap: 7px; padding: 10px; border: 0; border-right: 1px solid var(--line); background: #f4f6f8; color: var(--muted); font-weight: 700; }
.task-action-tabs button:last-child { border-right: 0; }
.task-action-tabs button.active { background: #fff; color: var(--teal); }
.task-action-tabs svg { width: 16px; height: 16px; }
.task-action-panel { padding: 14px; border: 1px solid var(--line); background: #fff; }
.task-action-panel textarea { min-height: 95px; }
.task-action-panel > button { display: flex; margin: 10px 0 0 auto; }
.progress-input-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.progress-input-head strong { color: var(--teal); }
.task-action-panel input[type="range"] { padding: 0; border: 0; box-shadow: none; accent-color: var(--teal); }
.submission-help, .manager-guidance { color: var(--muted); line-height: 1.6; margin-top: 0; }
.submission-documents { padding: 10px 0; }
.submission-documents > strong { display: block; margin-bottom: 7px; font-size: 12px; }
.submission-documents label { min-height: 38px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 7px; border-top: 1px solid #edf0f2; font-weight: 500; }
.submission-documents input { width: 15px; height: 15px; margin: 0; accent-color: var(--teal); }
.comment-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; margin-top: 12px; }
.comment-composer textarea { min-height: 67px; margin: 0; }
.task-submissions-section, .task-history-section { padding: 18px 20px; border-top: 1px solid var(--line); }
.task-submissions-section > header, .task-history-section > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.task-submissions-section h3, .task-history-section h3 { margin: 0; font-size: 13px; }
.task-submissions-section header span { color: var(--muted); font-size: 11px; }
.task-submission-list { display: grid; gap: 10px; }
.task-submission-record { border: 1px solid var(--line); padding: 13px; }
.task-submission-record > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-submission-record > header > div { display: flex; align-items: center; gap: 7px; }
.task-submission-record > header > span { color: var(--muted); font-size: 11px; }
.task-submission-record > p { color: #44515a; line-height: 1.65; }
.submission-files { display: flex; flex-wrap: wrap; gap: 6px; }
.submission-files a { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.submission-files svg { width: 15px; height: 15px; color: var(--blue); }
.submission-review-comment { padding: 10px 12px; margin-top: 10px; }
.submission-review-comment.revision { background: var(--red-soft); }
.submission-review-comment.approved { background: #e8f4eb; }
.submission-review-comment p { margin: 5px 0; line-height: 1.6; }
.submission-review-comment span { color: var(--muted); font-size: 11px; }
.submission-review-form { padding-top: 12px; margin-top: 10px; border-top: 1px solid var(--line); }
.submission-review-form textarea { min-height: 85px; }
.submission-review-form > div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.progress-event { color: var(--teal); background: var(--teal-soft); padding: 2px 6px; font-size: 11px; font-weight: 700; }
.task-timeline { margin-top: 16px; }
.task-timeline article { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; padding-bottom: 18px; }
.task-timeline article::before { content: ''; position: absolute; left: 5px; top: 13px; bottom: 0; border-left: 1px solid #d5dde2; }
.task-timeline article:last-child::before { display: none; }
.timeline-dot { width: 11px; height: 11px; margin-top: 4px; background: var(--teal); border: 3px solid #d8eeeb; border-radius: 50%; z-index: 1; }
.task-timeline article header { display: flex; align-items: center; gap: 7px; min-height: 22px; }
.task-timeline article time { margin-left: auto; color: var(--muted); font-size: 11px; }
.task-timeline article p { margin: 7px 0 0; color: #44515a; line-height: 1.65; }
.attachment-line { margin-top: 7px; }
.attachment-line code { display: block; padding: 7px 9px; background: #f1f4f6; color: #42515b; overflow-wrap: anywhere; }
.document-review-summary { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px 20px; background: #f8fafb; border-bottom: 1px solid var(--line); }
.document-file-mark { width: 50px; height: 50px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); border-radius: 5px; }
.document-file-mark svg { width: 25px; height: 25px; }
.document-review-summary h3 { margin: 0; font-size: 15px; }
.document-review-summary p { margin: 5px 0 0; color: var(--muted); }
.document-download { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; color: #fff; background: var(--teal); border: 1px solid var(--teal); border-radius: 4px; text-decoration: none; font-weight: 700; }
.document-download svg { width: 16px; height: 16px; }
.current-review { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.current-review.revision { background: var(--red-soft); border-color: #efcfcf; }
.current-review.approved { background: #eaf5ed; border-color: #cee5d4; }
.current-review h3 { margin: 0 0 6px; font-size: 13px; }
.current-review p { margin: 0; line-height: 1.65; }
.current-review span { display: block; color: var(--muted); font-size: 11px; margin-top: 7px; }
.document-review-grid { display: grid; grid-template-columns: 1fr 1fr; }
.document-review-grid > div:first-child { border-right: 1px solid var(--line); }
.review-section { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.review-section h3 { margin: 0 0 10px; font-size: 13px; }
.review-section > p { color: var(--muted); line-height: 1.6; }
.review-section dl { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 9px 12px; margin: 0; }
.review-section dt { color: var(--muted); }
.review-section dd { margin: 0; overflow-wrap: anywhere; }
.review-section code { padding: 3px 5px; background: #f0f3f5; }
.version-list { display: grid; gap: 7px; }
.version-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding: 10px; background: #fff; border: 1px solid var(--line); text-align: left; color: var(--text); }
.version-list button.active { border-color: var(--teal); background: var(--teal-soft); }
.version-list button small { grid-column: 1 / -1; color: var(--muted); }
.manager-review textarea { min-height: 120px; }
.manager-review > div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; }
.employee-revision button { margin-top: 8px; }
.review-history article { padding: 11px 0; border-bottom: 1px solid #edf0f2; }
.review-history article:last-child { border-bottom: 0; }
.review-history header { display: flex; align-items: center; gap: 8px; }
.review-history time { margin-left: auto; color: var(--muted); font-size: 11px; }
.review-history p { margin: 7px 0 0; color: #46525b; line-height: 1.6; }
.content-review-workspace { display: grid; grid-template-columns: minmax(300px, .75fr) minmax(0, 1.25fr); border-bottom: 1px solid var(--line); }
.content-version-submit, .content-version-history { padding: 18px 20px; min-width: 0; }
.content-version-submit { border-right: 1px solid var(--line); }
.content-version-submit h3, .content-version-history h3, .content-review-log h3 { margin: 0 0 8px; font-size: 13px; }
.content-version-submit > p { color: var(--muted); line-height: 1.6; }
.content-version-submit label { display: block; margin-top: 10px; }
.content-version-submit > button { display: flex; margin: 12px 0 0 auto; }
.content-version-history > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.content-version-history header span { color: var(--muted); font-size: 11px; }
.content-version-record { padding: 13px 0; border-bottom: 1px solid var(--line); }
.content-version-record > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.content-version-record > header > div { display: flex; align-items: center; gap: 7px; }
.content-version-record > header > span { color: var(--muted); font-size: 11px; }
.content-version-record > p { color: #45515a; line-height: 1.6; }
.content-version-record details { margin: 8px 0; border: 1px solid var(--line); }
.content-version-record summary { padding: 8px 10px; cursor: pointer; color: var(--blue); }
.content-version-record details > div { padding: 10px; border-top: 1px solid var(--line); line-height: 1.7; }
.content-review-log { padding: 18px 20px; }
.content-review-log article { padding: 10px 0; border-bottom: 1px solid #edf0f2; }
.content-review-log article > div { display: flex; align-items: center; gap: 8px; }
.content-review-log time { margin-left: auto; color: var(--muted); font-size: 11px; }
.content-review-log p { margin: 6px 0 0; color: #46525b; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 200; padding: 11px 15px; color: #fff; background: #26343d; border-radius: 4px; box-shadow: var(--shadow); max-width: 360px; }
.toast.error { background: var(--red); }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; }
.settings-block { padding: 18px; background: #fff; border: 1px solid var(--line); }
.settings-block h2 { font-size: 14px; margin: 0 0 8px; }
.settings-block p { color: var(--muted); line-height: 1.65; }
.settings-ai-key { display: flex; gap: 8px; margin: 10px 0 4px; }
.settings-ai-key input { margin: 0; flex: 1; }
.user-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.user-row:last-child { border-bottom: 0; }
.user-row strong, .user-row span { display: block; }
.user-row span { color: var(--muted); font-size: 12px; margin-top: 3px; }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-item { border-bottom: 1px solid var(--line); }
  .dashboard-grid, .settings-layout { grid-template-columns: 1fr; }
  .knowledge-stats { grid-template-columns: repeat(3, 1fr); }
  .knowledge-stats > div { border-bottom: 1px solid var(--line); }
  .knowledge-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .server-status { display: none; }
}

@media (max-width: 760px) {
  .mobile-only, .icon-button.mobile-only { display: grid; }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .main-column { width: 100%; }
  .topbar { height: 65px; padding: 0 13px; }
  .topbar > div:first-child { flex-direction: row; align-items: center; gap: 9px; }
  .topbar p, .user-chip span:last-child, #refreshButton { display: none; }
  .page-content { padding: 15px 12px 35px; }
  .document-stats { grid-template-columns: repeat(2, 1fr); }
  .document-stats > div { border-bottom: 1px solid var(--line); }
  .document-stats > div:nth-child(2) { border-right: 0; }
  .toolbar-left { flex-wrap: wrap; }
  .toolbar-select { width: 100%; }
  .knowledge-stats { grid-template-columns: repeat(2, 1fr); }
  .knowledge-stats > div { border-right: 1px solid var(--line); }
  .knowledge-stats > div:nth-child(2n) { border-right: 0; }
  .knowledge-card-grid { grid-template-columns: 1fr; }
  .knowledge-card { min-height: 0; }
  .knowledge-toolbar .toolbar-left { width: 100%; }
  .knowledge-detail-grid { grid-template-columns: 1fr; }
  .knowledge-detail-grid > div { border-right: 0; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item { min-height: 90px; padding: 14px; }
  .page-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-left, .toolbar-right { justify-content: space-between; }
  .search-box { width: 100%; }
  .form-grid { grid-template-columns: 1fr; padding: 15px; }
  .form-grid label.full, .form-grid .form-actions { grid-column: auto; }
  .metrics-platform-grid { grid-template-columns: 1fr; }
  .metrics-platform .pf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pw-script-cols { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 0; place-items: end center; }
  .modal-panel { max-height: 92vh; border-radius: 5px 5px 0 0; }
  .task-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-right: 0; }
  .task-summary > button { position: static; margin-top: 14px; }
  .task-book-grid, .task-workspace-grid { grid-template-columns: 1fr; }
  .task-document-list { grid-template-columns: 1fr; }
  .task-documents-panel > header { align-items: flex-start; }
  .task-book-section { border-right: 0; }
  .task-checklist-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .update-composer { grid-template-columns: 1fr; }
  .update-composer textarea, .update-composer input, .update-composer button { grid-column: 1; grid-row: auto; }
  .comment-composer { grid-template-columns: 1fr; }
  .task-submission-record > header, .content-version-record > header { align-items: flex-start; flex-direction: column; }
  .submission-review-form > div { flex-wrap: wrap; }
  .content-review-workspace { grid-template-columns: 1fr; }
  .content-version-submit { border-right: 0; border-bottom: 1px solid var(--line); }
  .document-review-summary { grid-template-columns: 44px minmax(0, 1fr); }
  .document-download { grid-column: 1 / -1; justify-content: center; }
  .document-review-grid { grid-template-columns: 1fr; }
  .document-review-grid > div:first-child { border-right: 0; }
}

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 16px; }
.card-grid-portrait { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ---------- 项目工作台 ---------- */
.project-workspace { padding: 20px 24px; display: flex; flex-direction: column; gap: 18px; }
.project-workspace h3 { font-size: 18px; margin: 8px 0 4px; }
.pw-head { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.pw-head .kanban-meta { margin-top: 6px; }
.pw-actions { display: flex; gap: 8px; margin-top: 10px; }
.pw-section h4 { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.pw-section h4 svg { width: 15px; height: 15px; color: var(--teal); }
.pw-section h4 .muted { font-weight: 400; font-size: 12px; }
.pw-count { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; font-size: 11px; }
.pw-script-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pw-script-col .col-label { font-size: 11px; color: var(--muted); font-weight: 500; margin-bottom: 6px; letter-spacing: .3px; }
.pw-script-col pre { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font-size: 13px; line-height: 1.8; font-family: inherit; margin: 0; max-height: 320px; overflow: auto; }
.pw-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.pw-media { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.pw-media-final { max-width: 260px; }
.pw-media .secondary-button { justify-content: center; }
.pw-media-meta strong { font-size: 12.5px; display: block; line-height: 1.4; }
.pw-media-meta small { font-size: 11px; color: var(--muted); }
.pw-actions-bottom { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; flex-wrap: wrap; }
.pw-actions-bottom .muted { margin-left: auto; }
.media-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .2s; }
.media-card:hover { box-shadow: var(--shadow); }
.media-card-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; }
.media-card-icon svg { width: 22px; height: 22px; }
.media-card-body h3 { margin: 4px 0 2px; font-size: 15px; }
.media-thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--line); display: grid; place-items: center; }
.media-thumb.portrait { aspect-ratio: 9 / 16; }
.media-thumb img, .media-thumb canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb .cover-download { position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px; border-radius: 7px; background: rgba(17,24,39,.72); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .15s, background .15s; z-index: 2; }
.media-thumb:hover .cover-download { opacity: 1; }
.media-thumb .cover-download:hover { background: #2563eb; }
.media-thumb .cover-download svg { width: 13px; height: 13px; }

/* 成片发布时间轴（按日期分组，同一天纵向堆叠） */
.media-timeline { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.media-timeline-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; margin-bottom: 12px; }
.media-timeline-head svg { width: 16px; height: 16px; color: #2563eb; }
.media-timeline-head .muted { font-size: 11px; font-weight: 400; color: #9ca3af; }
.media-timeline-track { display: flex; gap: 20px; overflow-x: auto; align-items: flex-start; padding-bottom: 6px; scrollbar-width: thin; }
.timeline-day { flex: none; width: 158px; display: flex; flex-direction: column; align-items: center; position: relative; }
.timeline-day::after { content: ''; position: absolute; top: 29px; bottom: 4px; left: 50%; width: 2px; background: #e5e7eb; transform: translateX(-50%); }
.timeline-day-head { display: flex; align-items: center; gap: 6px; position: relative; z-index: 1; background: #fff; padding: 0 4px; }
.timeline-dot { width: 12px; height: 12px; border-radius: 50%; background: #94a3b8; border: 2px solid #e2e8f0; flex: none; }
.timeline-day.today .timeline-dot { background: #dc2626; border-color: #fecaca; }
.timeline-date { font-size: 11px; color: #6b7280; font-weight: 600; white-space: nowrap; }
.timeline-day.today .timeline-date { color: #dc2626; font-weight: 700; }
.timeline-day-items { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 10px; position: relative; z-index: 1; }
.timeline-item { font-size: 11.5px; color: #374151; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 7px; padding: 6px 8px; text-align: left; cursor: pointer; font-family: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: border-color .12s, background .12s; }
.timeline-item:hover { border-color: #2563eb; background: #f5f8ff; }
.timeline-item.today { border-color: #fca5a5; background: #fef2f2; }
.timeline-flash { outline: 2px solid #f59e0b; outline-offset: 2px; border-radius: 12px; animation: tl-flash 1.6s ease; }
@keyframes tl-flash { 0% { outline-color: #f59e0b; } 100% { outline-color: transparent; } }
.media-thumb.video-thumb::after { content: ''; width: 34px; height: 34px; border-radius: 50%; background: rgba(23, 33, 43, .45); position: absolute; inset: 0; margin: auto; }
.media-thumb.video-thumb.has-frame::after { display: none; }
.video-thumb-badge { position: absolute; right: 8px; bottom: 8px; background: rgba(23, 33, 43, .6); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 999px; z-index: 1; }
.media-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.media-filter-bar label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.media-filter-bar select, .media-filter-bar input[type="date"] { height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13px; }
.media-meta-bits { display: flex; flex-wrap: wrap; gap: 5px; }
.media-meta-bits span { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--teal-soft); color: #12665f; }
.kanban-board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 8px; }
.kanban-column { flex: 0 0 225px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.kanban-column header { display: flex; justify-content: space-between; align-items: center; font-weight: 500; font-size: 14px; padding: 2px 4px 8px; }
.kanban-column header span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; font-size: 12px; color: var(--muted); }
.kanban-list { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.kanban-empty { text-align: center; color: var(--muted); font-size: 12px; padding: 16px 0; }
.kanban-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; transition: box-shadow .2s; }
.kanban-card:hover { box-shadow: var(--shadow); }
.kanban-card h3 { margin: 4px 0; font-size: 14px; }
.kanban-script { margin: 0 0 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.kanban-meta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.kanban-meta svg { width: 12px; height: 12px; vertical-align: -2px; }
.kanban-meta .overdue { color: var(--red); font-weight: 500; }
.kanban-link { font-size: 12px; color: var(--blue); margin-bottom: 6px; word-break: break-all; display: block; }
.kanban-link svg { width: 12px; height: 12px; vertical-align: -2px; }
.kanban-actions { display: flex; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.kanban-actions .secondary-button { flex: 1; padding: 4px 6px; font-size: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.kanban-actions .secondary-button:hover { background: var(--surface-2); }
.kanban-actions .secondary-button:disabled { opacity: .45; cursor: not-allowed; }
.kanban-actions .secondary-button:disabled:hover { background: var(--surface); }
.kanban-pending { flex: 1; text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.kanban-actions svg { width: 13px; height: 13px; }
.kanban-review { margin: 0 0 6px; padding: 5px 8px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); font-size: 12px; line-height: 1.5; }
.kanban-warn { margin-top: 6px; padding: 5px 8px; border-radius: 8px; background: var(--red-soft); color: var(--red); font-size: 12px; line-height: 1.5; display: flex; align-items: center; gap: 4px; }
.kanban-warn svg { width: 12px; height: 12px; flex: none; }
.cover-preview { display: block; width: 68px; height: 120px; border-radius: 6px; border: 1px solid var(--line); margin-top: 4px; object-fit: cover; }
/* 世界时间栏（项目页顶部） */
.world-clock { display: flex; align-items: center; gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; margin-bottom: 16px; }
.wc-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.wc-label svg { width: 16px; height: 16px; color: var(--teal); }
.wc-label b { color: var(--text); font-size: 13.5px; font-weight: 600; }
.wc-clocks { display: flex; gap: 28px; flex-wrap: wrap; }
.wc-city { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.wc-city-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.wc-city-name em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 11px; margin-left: 5px; }
.wc-time { font-family: Consolas, Menlo, monospace; font-size: 19px; font-weight: 700; color: var(--teal); letter-spacing: 0.5px; line-height: 1; }
.wc-date { font-size: 11.5px; color: var(--muted); }
@media (max-width: 720px) { .world-clock { align-items: flex-start; flex-direction: column; gap: 10px; } .wc-clocks { gap: 14px; } }
.tab-bar { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tab { padding: 8px 16px; border: 1px solid transparent; border-bottom: none; border-radius: 8px 8px 0 0; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); border-color: var(--line); color: var(--text); font-weight: 500; border-bottom: 2px solid var(--teal); margin-bottom: -1px; }
.tab-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--red-soft); color: var(--red); font-size: 12px; margin-left: 4px; }
.tab-badge.hidden { display: none; }
.review-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.review-section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; margin: 6px 0 12px; }
.review-section-title span { background: var(--red-soft); color: var(--red); border-radius: 999px; padding: 0 9px; font-size: 12px; }
.review-section-title + .review-section-title { margin-top: 22px; }
.review-card h3 { margin: 4px 0 6px; font-size: 15px; }
.review-script { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; margin: 8px 0; }
.review-comment { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); font-size: 13px; }
.review-actions { display: flex; gap: 10px; margin-top: 10px; align-items: stretch; }
.review-actions textarea { flex: 1; min-height: 52px; }
.review-buttons { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.review-buttons .primary, .review-buttons .danger-button { padding: 8px 14px; white-space: nowrap; }
.notif-wrap { position: relative; }
.notif-badge { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; box-sizing: border-box; }
.notif-panel { position: absolute; top: calc(100% + 8px); right: 0; width: 330px; max-height: 440px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 60; }
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13px; position: sticky; top: 0; background: var(--surface); }
.notif-header button { border: none; background: none; color: var(--blue); cursor: pointer; font-size: 12px; }
.notif-item { display: block; width: 100%; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; color: var(--text); background: var(--surface); }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--blue-soft); }
.notif-item .notif-time { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.notif-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 13px; }
.media-card-body p { margin: 0; color: var(--muted); font-size: 12px; }
.media-card-body small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.media-tags { margin-top: 6px; font-size: 12px; color: var(--teal); }
.media-project-link { margin-top: 6px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--teal); cursor: pointer; padding: 3px 9px; border-radius: 999px; background: var(--teal-soft); }
.media-project-link:hover { text-decoration: underline; }
.media-card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.media-card-actions .secondary-button { padding: 6px 12px; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.media-card-actions .secondary-button:hover { background: var(--surface-2); }
.media-card-actions .delete-media { color: var(--red); }
.media-card-actions .delete-media:hover { background: var(--red-soft); }

/* ================= 商务版 UI 升级（v20260804） ================= */
/* 侧栏商务化 */
.sidebar { width: 216px; background: #1f2937; padding: 16px 10px; }
.sidebar .brand-lockup { padding: 4px 8px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand-lockup small { color: #9ca3af; }
.sidebar .brand-mark { background: #fff; color: #1f2937; }
.nav-group { font-size: 10.5px; color: #6b7280; letter-spacing: .08em; padding: 14px 10px 5px; }
.nav-list { gap: 2px; margin-top: 4px; }
.nav-list button, .sidebar-settings { border-radius: 8px; padding: 9px 11px; color: #cbd5e1; }
.nav-list button:hover, .sidebar-settings:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-list button.active { background: #2563eb; color: #fff; font-weight: 500; }
.sidebar-settings { margin-top: auto; }

/* 看板 v2：列 330px 圆角、箭头滚动、隐藏滚动条 */
.kanban-board { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: smooth; gap: 14px; padding: 2px; }
.kanban-board::-webkit-scrollbar { display: none; }
.kanban-wrap { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: smooth; }
.kanban-wrap::-webkit-scrollbar { display: none; }
.kanban { display: flex; gap: 14px; align-items: flex-start; padding: 2px; min-width: max-content; }
.kanban-column { width: 330px; flex: none; min-height: 200px; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 12px; }
.kanban-column > header { height: 48px; display: flex; align-items: center; gap: 9px; padding: 0 14px; background: #fff; border-bottom: 1px solid #e5e7eb; border-radius: 12px 12px 0 0; }
.kanban-column h3 { font-size: 13.5px; font-weight: 600; color: #1f2937; }
.kanban-column header span { min-width: 22px; height: 22px; display: grid; place-items: center; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 999px; color: #64748b; font-size: 11px; }
.kanban-col-bar { width: 4px; height: 24px; border-radius: 2px; flex: none; }
.kanban-col-note { margin-left: auto; font-size: 10.5px; color: #d97706; font-weight: 500; }
.kanban-cards { display: grid; gap: 10px; padding: 10px; }
.kanban-list { display: grid; gap: 10px; padding: 10px; }
.kanban-card { border: 1px solid #e5e7eb; border-left: 0; border-radius: 10px; padding: 13px 14px; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: box-shadow .15s, border-color .15s; }
.kanban-card:hover { box-shadow: 0 6px 18px rgba(15,23,42,.09); border-color: #2563eb; }
.kanban-card strong { font-size: 13.5px; line-height: 1.5; margin-bottom: 6px; }
.kanban-script { font-size: 11.5px; color: #9ca3af; line-height: 1.5; }
.kanban-meta { font-size: 11.5px; color: #64748b; }
.kanban-meta .overdue { color: #dc2626; font-weight: 600; }
.kanban-link { font-size: 11.5px; color: #94a3b8; }
.kanban-review { font-size: 11px; color: #b91c1c; background: #fef2f2; border-radius: 7px; padding: 5px 9px; }
.kanban-actions { display: flex; gap: 6px; margin-top: 10px; }
.kanban-move { border-radius: 7px; border: 1px solid #e5e7eb; background: #fff; color: #475569; padding: 5px 11px; font-size: 11.5px; }
.kanban-move:hover { background: #f3f4f6; color: #1f2937; }
.kanban-actions .primary.kanban-move, .kanban-actions .primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.kanban-actions .primary.kanban-move:hover { background: #1d4ed8; }
.kanban-pending { font-size: 11px; color: #d97706; font-weight: 500; background: #fef3c7; border-radius: 7px; padding: 4px 10px; }
.kanban-warn { font-size: 10.5px; color: #b91c1c; background: #fef2f2; border-radius: 7px; padding: 5px 9px; margin-top: 8px; }
.kanban-empty { color: #cbd5e1; font-size: 11.5px; padding: 26px 0; border: 1.5px dashed #dbe2ea; border-radius: 9px; text-align: center; }
.task-badges .badge { border-radius: 5px; }
.kanban-card .task-badges { margin-bottom: 8px; }
.kanban-card .kanban-res { display: flex; gap: 12px; font-size: 11.5px; color: #94a3b8; margin-top: 9px; padding-top: 8px; border-top: 1px dashed #e2e8f0; }
.kanban-card .kanban-res b { color: #475569; }

/* 看板统计条 + 箭头 */
.board-head-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.board-head-row h2 { font-size: 14px; font-weight: 600; margin: 0; }
.board-head-row .muted { font-size: 11.5px; }
.board-stats { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.board-stat { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 9px 16px; display: flex; align-items: center; gap: 10px; }
.board-stat .bs-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.board-stat .bs-icon svg { width: 15px; height: 15px; }
.board-stat b { font-size: 16px; display: block; line-height: 1.15; }
.board-stat small { font-size: 11px; color: #9ca3af; }
.bs-blue { background: #dbeafe; color: #2563eb; }
.bs-amber { background: #fef3c7; color: #d97706; }
.bs-red { background: #fee2e2; color: #dc2626; }
.bs-green { background: #d1fae5; color: #059669; }
.bs-gray { background: #f1f5f9; color: #64748b; }
.board-arrows { display: flex; gap: 6px; margin-left: auto; }
.board-arrow { width: 30px; height: 30px; border-radius: 8px; border: 1px solid #e5e7eb; background: #fff; cursor: pointer; display: grid; place-items: center; color: #6b7280; }
.board-arrow:hover { background: #f3f4f6; color: #1f2937; }
.board-arrow svg { width: 15px; height: 15px; }
.board-arrow:disabled { opacity: .35; cursor: not-allowed; }

/* 全系统待办区 */
.board-todos { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 13px 16px; margin-bottom: 14px; }
.board-todos-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; margin-bottom: 10px; }
.board-todos-head svg { width: 16px; height: 16px; color: #2563eb; }
.board-todos-cnt { background: #2563eb; color: #fff; border-radius: 999px; font-size: 11px; padding: 0 9px; min-width: 22px; text-align: center; }
.board-todos-hint { margin-left: auto; font-size: 11px; color: #9ca3af; font-weight: 400; }
.board-todos-list { display: grid; gap: 7px; }
.board-todo { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid #e5e7eb; border-radius: 9px; background: #fafbfc; padding: 9px 13px; cursor: pointer; font-family: inherit; transition: border-color .12s, background .12s; }
.board-todo:hover { border-color: #2563eb; background: #f5f8ff; }
.todo-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.todo-ic svg { width: 14px; height: 14px; }
.todo-red .todo-ic { background: #fee2e2; color: #dc2626; }
.todo-orange .todo-ic { background: #fef3c7; color: #d97706; }
.todo-blue .todo-ic { background: #dbeafe; color: #2563eb; }
.todo-label { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; flex: none; }
.todo-red .todo-label { background: #fee2e2; color: #b91c1c; }
.todo-orange .todo-label { background: #fef3c7; color: #b45309; }
.todo-blue .todo-label { background: #dbeafe; color: #1d4ed8; }
.todo-text { font-size: 12.5px; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-go { margin-left: auto; font-size: 11.5px; color: #2563eb; font-weight: 500; flex: none; }
.board-todos-ok { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #059669; background: #ecfdf5; border: 1px dashed #6ee7b7; border-radius: 9px; padding: 10px 14px; }
.board-todos-ok svg { width: 15px; height: 15px; }

/* 外贸单证 */
.badge.purple { color: #5b3d8f; background: #f0e9fa; }
.doc-block-title { font-weight: 700; font-size: 13px; margin: 4px 0 8px; color: var(--text); border-left: 3px solid var(--teal); padding-left: 8px; }
.doc-item-row input { margin: 0; padding: 7px 8px; font-size: 13px; }
.doc-item-row .it_amount { font-size: 13px; color: var(--text); white-space: nowrap; }
#docSubtotal { font-size: 13.5px; border-top: 1px dashed var(--line); padding-top: 8px; }
#docItems { max-height: 260px; overflow-y: auto; padding: 2px; }
#docItems::-webkit-scrollbar { width: 8px; }
#docItems::-webkit-scrollbar-thumb { background: #c9d2d8; border-radius: 4px; }

/* 询盘单据数链接 */
.doc-count-link { display: inline-flex; align-items: center; gap: 4px; background: var(--teal-soft); color: #12665f; border: 1px solid #cfe6e2; border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; font-weight: 600; }
.doc-count-link:hover { background: #d4ece8; }
.doc-count-link svg { width: 12px; height: 12px; }
