/* AI 工作档案中心 3.0（组织空间）。深浅两套主题都落在页面根上，
   与 3.0 基准一致；所有颜色来自这两组变量，不在组件里写死。 */

.org-archive-page {
  --oa-bg: #0d111b;
  --oa-surface: #151d2b;
  --oa-surface-2: #1a2434;
  --oa-surface-3: #202c3e;
  --oa-line: #283448;
  --oa-line-soft: #223044;
  --oa-text: #edf2fb;
  --oa-muted: #9aa8bd;
  --oa-muted-2: #718098;
  --oa-primary: #958bff;
  --oa-primary-2: #b0a9ff;
  --oa-primary-soft: #29294b;
  --oa-cyan: #70c4e8;
  --oa-cyan-soft: #1c3547;
  --oa-green: #55c79d;
  --oa-green-soft: #1c3a35;
  --oa-amber: #edb96f;
  --oa-amber-soft: #3d3022;
  --oa-red: #ef8793;
  --oa-red-soft: #3d2731;
  --oa-shadow: 0 12px 34px rgba(0, 0, 0, .18);
  --oa-shadow-lg: 0 24px 70px rgba(0, 0, 0, .45);
  background: var(--oa-bg);
  color: var(--oa-text);
  border: 1px solid var(--oa-line);
  border-radius: 20px;
  padding: 0 28px 36px;
  min-width: 0;
  overflow: clip;
}

.org-archive-page[data-theme="light"] {
  --oa-bg: #f4f6fb;
  --oa-surface: #fff;
  --oa-surface-2: #f8f9fd;
  --oa-surface-3: #f0f2f8;
  --oa-line: #e8ebf3;
  --oa-line-soft: #eef1f7;
  --oa-text: #202638;
  --oa-muted: #7e879a;
  --oa-muted-2: #a1a9b8;
  --oa-primary: #7168f4;
  --oa-primary-2: #958cff;
  --oa-primary-soft: #f0efff;
  --oa-cyan: #49a9d7;
  --oa-cyan-soft: #eaf7fc;
  --oa-green: #25a47a;
  --oa-green-soft: #eaf8f2;
  --oa-amber: #d99742;
  --oa-amber-soft: #fff6e9;
  --oa-red: #d96775;
  --oa-red-soft: #fff0f2;
  --oa-shadow: 0 12px 34px rgba(29, 42, 74, .055);
  --oa-shadow-lg: 0 24px 70px rgba(10, 18, 38, .18);
}

.org-archive-page * { box-sizing: border-box; }
.org-archive-page button, .org-archive-page input, .org-archive-page select, .org-archive-page textarea { font: inherit; }
.org-archive-page button { cursor: pointer; }
.org-archive-page :focus-visible { outline: 2px solid var(--oa-primary); outline-offset: 2px; }
.org-archive-page .oa-icon { display: inline-flex; align-items: center; justify-content: center; }
.org-archive-page a { color: inherit; text-decoration: none; }

.oa-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 56px; border-bottom: 1px solid var(--oa-line);
}
.oa-crumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--oa-muted); }
.oa-crumb strong { color: var(--oa-text); font-weight: 650; }
.oa-crumb-link { border: 0; background: none; color: var(--oa-muted); padding: 2px; }
.oa-crumb-link:hover { color: var(--oa-primary); }
.oa-top-actions { display: flex; align-items: center; gap: 8px; }
.oa-icon-btn {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--oa-line); border-radius: 10px; background: var(--oa-surface);
  color: var(--oa-muted); flex: none; padding: 0;
}
.oa-icon-btn svg { display: block; }
.oa-icon-btn:hover { color: var(--oa-primary); border-color: var(--oa-primary); background: var(--oa-surface); }

.oa-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding: 26px 0 18px; flex-wrap: wrap;
}
.oa-head-copy { min-width: 0; }
.oa-eyebrow { font-size: 9px; letter-spacing: 1.8px; color: var(--oa-primary); font-weight: 800; margin-bottom: 8px; }
.oa-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.oa-page-title { font-size: 25px; letter-spacing: -.7px; font-weight: 780; margin: 0; }
.oa-live-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 20px;
  font-size: 9px; color: var(--oa-green); background: var(--oa-green-soft); font-weight: 750;
}
.oa-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--oa-green); }
.oa-page-desc { font-size: 12px; color: var(--oa-muted); margin: 8px 0 0; line-height: 1.7; max-width: 760px; }
.oa-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.oa-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--oa-line); background: var(--oa-surface); color: var(--oa-text);
  padding: 8px 12px; border-radius: 10px; font-size: 11px; font-weight: 650;
  white-space: nowrap; transition: border-color .15s, color .15s, background .15s;
}
.oa-btn:hover:not(:disabled) { border-color: var(--oa-primary); color: var(--oa-primary); background: var(--oa-surface); }
.oa-btn:disabled { opacity: .55; cursor: default; }
.oa-btn-primary { background: var(--oa-primary); border-color: var(--oa-primary); color: #fff; }
.oa-btn-primary:hover:not(:disabled) { background: var(--oa-primary-2); border-color: var(--oa-primary-2); color: #fff; }
.oa-btn-ghost { background: transparent; color: var(--oa-muted); }
.oa-btn-small { padding: 6px 9px; font-size: 10px; border-radius: 8px; }
.oa-btn.is-selected { border-color: var(--oa-primary); background: var(--oa-primary-soft); color: var(--oa-primary); }
.oa-link {
  display: inline-flex; align-items: center; gap: 4px; border: 0; background: none;
  color: var(--oa-primary); font-size: 10px; font-weight: 700; padding: 4px;
}
.oa-link:hover { text-decoration: underline; }
.oa-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.oa-note { font-size: 10px; color: var(--oa-muted); }
.oa-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }

.oa-tabs {
  display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--oa-line);
  overflow-x: auto; scrollbar-width: none; margin-bottom: 18px;
}
.oa-tabs::-webkit-scrollbar { display: none; }
.oa-tab {
  position: relative; border: 0; background: transparent; color: var(--oa-muted);
  padding: 12px 12px 13px; font-size: 12px; font-weight: 620; white-space: nowrap;
  border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 6px;
}
.oa-tab:hover { color: var(--oa-text); background: transparent; }
.oa-tab.is-active { color: var(--oa-primary); border-color: var(--oa-primary); font-weight: 750; }
.oa-tab-count {
  font-size: 9px; padding: 2px 5px; border-radius: 8px;
  background: var(--oa-surface-3); color: var(--oa-muted); font-weight: 700;
}
.oa-tab.is-active .oa-tab-count { background: var(--oa-primary-soft); color: var(--oa-primary); }

.oa-body { min-height: 400px; }
.oa-card {
  background: var(--oa-surface); border: 1px solid var(--oa-line); border-radius: 16px;
  box-shadow: var(--oa-shadow); min-width: 0;
}
.oa-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 15px 17px 10px; flex-wrap: wrap;
}
.oa-card-head h3 { font-size: 13px; font-weight: 750; margin: 0; }
.oa-card-head p { font-size: 10px; color: var(--oa-muted); margin: 4px 0 0; }
.oa-head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.oa-select, .oa-input {
  border: 1px solid var(--oa-line); border-radius: 9px; background: var(--oa-surface-2);
  color: var(--oa-text); padding: 8px 10px; font-size: 11px; outline: none; max-width: 100%;
}
.oa-select { width: auto; flex: 0 0 auto; }
.oa-input { width: 100%; }
.oa-select:focus, .oa-input:focus { border-color: var(--oa-primary); }
textarea.oa-input { resize: vertical; min-height: 74px; line-height: 1.6; }

.oa-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.oa-kpi { padding: 14px 16px 13px; position: relative; overflow: hidden; }
.oa-kpi::after {
  content: ""; position: absolute; width: 100px; height: 100px; right: -46px; top: -48px;
  border-radius: 50%; background: var(--oa-kpi-soft, var(--oa-primary-soft)); opacity: .7;
}
.oa-kpi[data-tone="purple"] { --oa-kpi-color: var(--oa-primary); --oa-kpi-soft: var(--oa-primary-soft); }
.oa-kpi[data-tone="cyan"] { --oa-kpi-color: var(--oa-cyan); --oa-kpi-soft: var(--oa-cyan-soft); }
.oa-kpi[data-tone="green"] { --oa-kpi-color: var(--oa-green); --oa-kpi-soft: var(--oa-green-soft); }
.oa-kpi[data-tone="amber"] { --oa-kpi-color: var(--oa-amber); --oa-kpi-soft: var(--oa-amber-soft); }
.oa-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: relative; z-index: 1; }
.oa-kpi-label { font-size: 11px; color: var(--oa-muted); font-weight: 650; }
.oa-kpi-icon {
  width: 31px; height: 31px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--oa-kpi-soft); color: var(--oa-kpi-color);
}
.oa-kpi-value { font-size: 27px; letter-spacing: -1px; font-weight: 780; margin: 10px 0 5px; position: relative; z-index: 1; }
.oa-kpi-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--oa-muted); font-size: 9px; position: relative; z-index: 1; }
.oa-kpi-note { color: var(--oa-muted-2); }

.oa-grid { display: grid; gap: 13px; margin-bottom: 13px; }
.oa-grid-main { grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr); }
.oa-grid-lower { grid-template-columns: minmax(0, 1.45fr) minmax(280px, .85fr); }
.oa-chart-box { padding: 0 12px 12px; }
.oa-chart { width: 100%; height: 200px; display: block; }
.oa-chart-grid { stroke: var(--oa-line); stroke-width: 1; stroke-dasharray: 3 5; }
.oa-chart-label { fill: var(--oa-muted); font-size: 9px; }
.oa-chart-line { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.oa-chart-line.is-sessions { stroke: var(--oa-cyan); }
.oa-chart-line.is-runs { stroke: var(--oa-primary); }
.oa-legend { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; color: var(--oa-muted); }
.oa-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.oa-dot.is-runs { background: var(--oa-primary); }
.oa-dot.is-sessions { background: var(--oa-cyan); }

.oa-dept-list { display: grid; gap: 13px; padding: 4px 17px 2px; }
.oa-dept-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) 34px; align-items: center; gap: 9px; }
.oa-dept-name { font-size: 10px; color: var(--oa-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-progress { height: 7px; border-radius: 10px; background: var(--oa-surface-3); overflow: hidden; }
.oa-progress span { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--oa-primary), var(--oa-primary-2)); }
.oa-dept-value { text-align: right; font-size: 10px; font-weight: 750; }
.oa-dept-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--oa-line); margin: 14px 17px 0; padding: 11px 0 14px;
  font-size: 10px; color: var(--oa-muted); flex-wrap: wrap;
}
.oa-dept-foot b { color: var(--oa-text); }

.oa-table-card { overflow: hidden; }
.oa-table-wrap { overflow-x: auto; }
.oa-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.oa-table th {
  text-align: left; background: var(--oa-surface-2); padding: 9px 14px; color: var(--oa-muted);
  font-size: 9px; font-weight: 700; border-top: 1px solid var(--oa-line); border-bottom: 1px solid var(--oa-line);
}
.oa-table td { padding: 11px 14px; border-bottom: 1px solid var(--oa-line); font-size: 11px; color: var(--oa-muted); }
.oa-table tbody tr { cursor: pointer; }
.oa-table tbody tr:hover td { background: var(--oa-surface-2); color: var(--oa-text); }
.oa-table tbody tr:last-child td { border-bottom: 0; }
.oa-session-name { font-size: 11px; color: var(--oa-text); font-weight: 650; }
.oa-session-id { font-size: 9px; color: var(--oa-muted-2); margin-top: 3px; font-family: ui-monospace, Consolas, monospace; }
.oa-member { display: inline-flex; align-items: center; gap: 7px; }
.oa-avatar {
  width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--oa-primary-soft); color: var(--oa-primary); font-size: 10px; font-weight: 800; flex: none;
}
.oa-member b { font-size: 10px; color: var(--oa-text); font-weight: 650; display: block; }
.oa-member small { font-size: 9px; color: var(--oa-muted-2); }
.oa-type { font-size: 9px; color: var(--oa-primary); background: var(--oa-primary-soft); padding: 4px 6px; border-radius: 5px; font-weight: 700; }
.oa-pill {
  display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 20px;
  font-size: 9px; font-weight: 700; border: 1px solid transparent;
}
.oa-pill[data-tone="good"] { color: var(--oa-green); background: var(--oa-green-soft); }
.oa-pill[data-tone="info"] { color: var(--oa-cyan); background: var(--oa-cyan-soft); }
.oa-pill[data-tone="warn"] { color: var(--oa-amber); background: var(--oa-amber-soft); }
.oa-pill[data-tone="bad"] { color: var(--oa-red); background: var(--oa-red-soft); }
.oa-pill[data-tone="neutral"] { color: var(--oa-muted); background: var(--oa-surface-3); }

.oa-table-toolbar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--oa-line); flex-wrap: wrap;
}
.oa-table-toolbar b { font-size: 11px; }
.oa-table-toolbar p { font-size: 9px; color: var(--oa-muted); margin: 4px 0 0; }
.oa-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 15px; border-top: 1px solid var(--oa-line); font-size: 9px; color: var(--oa-muted);
  flex-wrap: wrap;
}
.oa-page-buttons { display: flex; align-items: center; gap: 4px; }
.oa-page-btn {
  min-width: 26px; height: 25px; border: 1px solid var(--oa-line); background: var(--oa-surface);
  border-radius: 7px; color: var(--oa-muted); font-size: 9px; padding: 0 6px;
}
.oa-page-btn.is-active { background: var(--oa-primary-soft); border-color: var(--oa-primary); color: var(--oa-primary); font-weight: 750; }
.oa-page-btn:disabled { opacity: .45; }
.oa-page-gap { color: var(--oa-muted-2); padding: 0 2px; }

.oa-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 13px; }
.oa-chip {
  border: 1px solid var(--oa-line); background: var(--oa-surface); border-radius: 9px;
  padding: 7px 10px; font-size: 10px; color: var(--oa-muted);
}
.oa-chip b { color: var(--oa-text); margin-left: 4px; }
.oa-chip b[data-tone="good"] { color: var(--oa-green); }
.oa-chip b[data-tone="info"] { color: var(--oa-cyan); }
.oa-chip b[data-tone="warn"] { color: var(--oa-amber); }
.oa-chip b[data-tone="bad"] { color: var(--oa-red); }

.oa-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 2px 0 14px; flex-wrap: wrap; }
.oa-section-title { font-size: 16px; font-weight: 760; margin: 0; letter-spacing: -.2px; }
.oa-section-desc { font-size: 11px; color: var(--oa-muted); margin: 5px 0 0; line-height: 1.65; max-width: 760px; }
.oa-filter {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px;
  background: var(--oa-surface); border: 1px solid var(--oa-line); border-radius: 12px; margin-bottom: 13px;
}
.oa-searchbox { position: relative; min-width: 220px; flex: 1 1 240px; }
.oa-searchbox .oa-icon { position: absolute; left: 10px; top: 9px; color: var(--oa-muted); }
.oa-search-input {
  width: 100%; height: 34px; border: 1px solid var(--oa-line); background: var(--oa-surface-2);
  color: var(--oa-text); border-radius: 9px; padding: 0 11px 0 32px; font-size: 11px; outline: none;
}
.oa-search-input:focus { border-color: var(--oa-primary); }
.oa-filter .oa-select { height: 34px; min-width: 108px; }

.oa-asset-grid, .oa-knowledge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.oa-asset-card { padding: 14px; cursor: pointer; transition: transform .16s, border-color .16s, box-shadow .16s; }
.oa-asset-card:hover { transform: translateY(-2px); border-color: var(--oa-primary); box-shadow: var(--oa-shadow-lg); }
.oa-asset-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.oa-file-icon {
  width: 38px; height: 43px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 850; position: relative; background: var(--oa-surface-3); color: var(--oa-muted);
}
.oa-file-icon[data-kind="slide"] { background: var(--oa-amber-soft); color: var(--oa-amber); }
.oa-file-icon[data-kind="sheet"] { background: var(--oa-green-soft); color: var(--oa-green); }
.oa-file-icon[data-kind="doc"] { background: var(--oa-primary-soft); color: var(--oa-primary); }
.oa-file-icon[data-kind="pdf"] { background: var(--oa-red-soft); color: var(--oa-red); }
.oa-file-icon[data-kind="image"] { background: var(--oa-cyan-soft); color: var(--oa-cyan); }
.oa-file-icon[data-kind="office"], .oa-file-icon[data-kind="text"] { background: var(--oa-primary-soft); color: var(--oa-primary); }
.oa-asset-title { font-size: 12px; font-weight: 750; margin: 11px 0 4px; line-height: 1.5; overflow-wrap: anywhere; }
.oa-asset-desc { font-size: 10px; color: var(--oa-muted); margin: 0; line-height: 1.6; }
.oa-asset-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 9px; color: var(--oa-muted-2); margin-top: 9px; }
.oa-asset-foot {
  border-top: 1px solid var(--oa-line); margin-top: 11px; padding-top: 9px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 9px; color: var(--oa-muted);
}

.oa-knowledge-card { padding: 14px; min-height: 176px; display: flex; flex-direction: column; }
.oa-knowledge-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.oa-knowledge-icon {
  width: 33px; height: 33px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--oa-green-soft); color: var(--oa-green);
}
.oa-knowledge-icon[data-kind="prompt"] { background: var(--oa-primary-soft); color: var(--oa-primary); }
.oa-knowledge-icon[data-kind="skill"] { background: var(--oa-amber-soft); color: var(--oa-amber); }
.oa-knowledge-card h3 { font-size: 12px; margin: 11px 0 5px; line-height: 1.5; }
.oa-knowledge-summary { font-size: 10px; color: var(--oa-muted); line-height: 1.65; margin: 0; flex: 1; }
.oa-tag-row { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.oa-tag { font-size: 8px; padding: 3px 6px; border-radius: 5px; background: var(--oa-surface-3); color: var(--oa-muted); }
.oa-knowledge-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  border-top: 1px solid var(--oa-line); margin-top: 11px; padding-top: 9px; font-size: 9px; color: var(--oa-muted);
}
.oa-review-note { font-size: 9px; color: var(--oa-red); margin: 8px 0 0; }
.oa-review-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--oa-amber); background: var(--oa-amber-soft); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 13px;
}
.oa-review-banner strong { font-size: 12px; color: var(--oa-amber); }
.oa-review-banner p { font-size: 10px; color: var(--oa-muted); margin: 3px 0 0; }

.oa-kpi-grid.is-analytics { margin-bottom: 14px; }
.oa-bar-chart { display: grid; gap: 10px; padding: 4px 17px 16px; }
.oa-bar-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 72px; align-items: center; gap: 9px; }
.oa-bar-name { font-size: 10px; color: var(--oa-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-bars { display: grid; gap: 3px; }
.oa-bar { height: 6px; border-radius: 6px; background: var(--oa-surface-3); overflow: hidden; }
.oa-bar-fill { display: block; height: 100%; border-radius: 6px; }
.oa-bar-fill.is-runs { background: var(--oa-primary); }
.oa-bar-fill.is-sessions { background: var(--oa-cyan); }
.oa-bar-value { text-align: right; font-size: 9px; color: var(--oa-muted); font-weight: 700; }
.oa-metric-list { display: grid; padding: 0 17px; }
.oa-metric-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--oa-line); padding: 10px 0; font-size: 11px; color: var(--oa-muted);
}
.oa-metric-row:last-child { border-bottom: 0; }
.oa-metric-row b { color: var(--oa-text); font-size: 11px; }
.oa-field-hint { font-size: 9px; color: var(--oa-muted-2); line-height: 1.6; margin: 10px 0 14px; padding: 0 17px; }

.oa-audit-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(250px, .75fr); gap: 13px; align-items: start; }
.oa-audit-side { display: grid; gap: 11px; }
.oa-security-card { padding: 15px 16px; }
.oa-security-card h3 { font-size: 12px; margin: 0 0 7px; }
.oa-security-card p { font-size: 10px; color: var(--oa-muted); line-height: 1.7; margin: 0; }
.oa-security-stat {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid var(--oa-line); font-size: 10px; color: var(--oa-muted);
}
.oa-security-stat:last-child { border-bottom: 0; }
.oa-security-stat b { color: var(--oa-text); }
.oa-security-stat b[data-tone="warn"] { color: var(--oa-amber); }

.oa-activity { display: grid; gap: 11px; padding: 4px 17px 6px; }
.oa-activity-item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; align-items: start; }
.oa-activity-icon {
  width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--oa-cyan-soft); color: var(--oa-cyan);
}
.oa-activity-icon[data-tone="success"] { background: var(--oa-green-soft); color: var(--oa-green); }
.oa-activity-icon[data-tone="warn"] { background: var(--oa-amber-soft); color: var(--oa-amber); }
.oa-activity-text { font-size: 10px; color: var(--oa-text); line-height: 1.55; }
.oa-activity-time { font-size: 9px; color: var(--oa-muted-2); margin-top: 2px; }
.oa-activity-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-top: 1px solid var(--oa-line); margin: 12px 17px 0; padding: 10px 0 14px;
  font-size: 9px; color: var(--oa-muted);
}

.oa-empty-inline { font-size: 11px; color: var(--oa-muted); padding: 16px 17px; margin: 0; line-height: 1.7; }
.oa-empty-block {
  display: grid; gap: 6px; justify-items: start; padding: 26px 20px;
  border: 1px dashed var(--oa-line); border-radius: 14px; background: var(--oa-surface-2);
}
.oa-empty-block strong { font-size: 13px; }
.oa-empty-block span { font-size: 11px; color: var(--oa-muted); line-height: 1.6; }
.oa-skeleton { display: grid; gap: 10px; padding: 14px 0; }
.oa-skeleton span {
  display: block; height: 54px; border-radius: 12px;
  background: linear-gradient(90deg, var(--oa-surface-2), var(--oa-surface-3), var(--oa-surface-2));
  background-size: 200% 100%; animation: oa-shimmer 1.4s linear infinite;
}
@keyframes oa-shimmer { to { background-position: -200% 0; } }
.oa-error {
  border: 1px solid var(--oa-red); background: var(--oa-red-soft); border-radius: 12px;
  padding: 14px 16px; display: grid; gap: 6px; justify-items: start;
}
.oa-error strong { font-size: 12px; color: var(--oa-red); }
.oa-error p { font-size: 10px; color: var(--oa-muted); margin: 0; line-height: 1.6; }

.oa-drawer-layer, .oa-modal-layer { position: fixed; inset: 0; z-index: 60; }
.oa-drawer-mask, .oa-modal-mask { position: absolute; inset: 0; background: rgba(5, 10, 20, .55); backdrop-filter: blur(3px); }
.oa-drawer {
  position: absolute; right: 0; top: 0; height: 100vh; width: min(790px, 94vw);
  background: var(--oa-surface); border-left: 1px solid var(--oa-line);
  box-shadow: var(--oa-shadow-lg); display: flex; flex-direction: column;
}
.oa-drawer-head { padding: 19px 22px 14px; border-bottom: 1px solid var(--oa-line); }
.oa-drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.oa-drawer-kicker { font-size: 8px; letter-spacing: 1.5px; color: var(--oa-primary); font-weight: 800; }
.oa-drawer-title { font-size: 17px; font-weight: 780; letter-spacing: -.3px; margin: 10px 0 6px; }
.oa-drawer-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 9px; color: var(--oa-muted); }
.oa-drawer-meta > span + span::before { content: "·"; margin-right: 7px; color: var(--oa-muted-2); }
.oa-drawer-tabs {
  display: flex; gap: 2px; padding: 0 18px; border-bottom: 1px solid var(--oa-line);
  overflow-x: auto; scrollbar-width: none;
}
.oa-drawer-tabs::-webkit-scrollbar { display: none; }
.oa-drawer-tab {
  border: 0; background: transparent; padding: 12px 10px; color: var(--oa-muted);
  font-size: 11px; font-weight: 650; white-space: nowrap; border-bottom: 2px solid transparent;
}
.oa-drawer-tab.is-active { color: var(--oa-primary); border-color: var(--oa-primary); }
.oa-drawer-body { padding: 17px 22px; overflow: auto; flex: 1; }
.oa-drawer-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 20px; border-top: 1px solid var(--oa-line); font-size: 9px; color: var(--oa-muted);
}
.oa-drawer-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 15px; }
.oa-drawer-stat { background: var(--oa-surface-2); border: 1px solid var(--oa-line); border-radius: 10px; padding: 9px; }
.oa-drawer-stat span { display: block; font-size: 8px; color: var(--oa-muted); }
.oa-drawer-stat b { display: block; font-size: 12px; margin-top: 4px; }
.oa-message {
  padding: 12px 13px; border: 1px solid var(--oa-line); border-radius: 11px; margin-bottom: 10px;
  background: var(--oa-surface-2); max-width: 94%;
}
.oa-message.is-user { margin-left: auto; background: var(--oa-primary-soft); }
.oa-message-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 9px; color: var(--oa-muted); margin-bottom: 6px; }
.oa-message-head b { color: var(--oa-text); font-size: 10px; }
.oa-message-body { font-size: 11px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.oa-load-more { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 0 2px; flex-wrap: wrap; }
.oa-detail-box {
  border: 1px solid var(--oa-line); background: var(--oa-surface-2); border-radius: 11px;
  padding: 12px 14px; margin-bottom: 11px;
}
.oa-detail-box h4 { font-size: 10px; margin: 0 0 5px; }
.oa-detail-box p { font-size: 11px; color: var(--oa-muted); line-height: 1.65; margin: 3px 0; }
.oa-trace { display: grid; gap: 11px; }
.oa-trace-item { border-left: 2px solid var(--oa-primary); padding: 0 0 0 12px; }
.oa-trace-time { display: block; font-size: 8px; color: var(--oa-muted-2); margin-bottom: 3px; }
.oa-trace-item b { font-size: 11px; }
.oa-trace-item p { font-size: 10px; color: var(--oa-muted); line-height: 1.6; margin: 3px 0 0; }
.oa-drawer-file {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--oa-line);
  border-radius: 11px; padding: 10px 12px; margin-bottom: 9px; background: var(--oa-surface-2);
}
.oa-drawer-file-info { flex: 1; min-width: 0; }
.oa-drawer-file-info b { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-drawer-file-info p { font-size: 9px; color: var(--oa-muted); margin: 3px 0 0; }

.oa-modal-layer { display: flex; align-items: center; justify-content: center; padding: 18px; }
.oa-modal {
  position: relative; width: min(500px, 100%); max-height: 90vh; overflow: auto;
  background: var(--oa-surface); border: 1px solid var(--oa-line); border-radius: 16px;
  padding: 20px; box-shadow: var(--oa-shadow-lg);
}
.oa-modal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.oa-modal h3 { font-size: 15px; margin: 0 0 5px; }
.oa-modal-top p { font-size: 10px; color: var(--oa-muted); margin: 0 0 14px; line-height: 1.6; }
.oa-modal-body { display: grid; gap: 10px; }
.oa-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.oa-field { display: grid; gap: 5px; }
.oa-field-label { font-size: 10px; font-weight: 700; }
.oa-field-hint { font-size: 9px; color: var(--oa-muted); line-height: 1.5; }
.oa-field .oa-field-hint { padding: 0; margin: 0; }
.oa-field[hidden] { display: none; }
.oa-member-picker {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px;
  max-height: 160px; overflow: auto; border: 1px solid var(--oa-line); border-radius: 9px; padding: 8px;
  background: var(--oa-surface-2);
}
.oa-member-option { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--oa-muted); }
.oa-detail-text { font-size: 11px; color: var(--oa-muted); line-height: 1.7; margin: 0; }
.oa-review-actions { margin: 4px 0; }
.oa-knowledge-content {
  max-height: 280px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--oa-surface-2); border: 1px solid var(--oa-line); border-radius: 10px;
  padding: 11px; font: 11px/1.7 ui-monospace, Consolas, monospace; margin: 0;
}
.oa-preview-body { display: grid; gap: 10px; }
.oa-preview-text {
  max-height: 360px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--oa-surface-2); border: 1px solid var(--oa-line); border-radius: 10px;
  padding: 11px; font: 11px/1.7 ui-monospace, Consolas, monospace; margin: 0;
}
.oa-preview-image { max-width: 100%; border-radius: 10px; display: block; }
.oa-preview-frame { width: 100%; height: 460px; border: 1px solid var(--oa-line); border-radius: 10px; background: #fff; }

.oa-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px);
  background: #202a3a; color: #fff; padding: 9px 14px; border-radius: 9px;
  font-size: 11px; z-index: 70; opacity: 0; pointer-events: none; transition: .2s;
  box-shadow: 0 8px 25px rgba(0, 0, 0, .3); max-width: min(520px, 90vw);
}
.oa-toast.is-open { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  .oa-kpi-grid, .oa-kpi-grid.is-analytics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oa-grid-main, .oa-grid-lower, .oa-audit-layout { grid-template-columns: 1fr; }
  .oa-asset-grid, .oa-knowledge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .org-archive-page { padding: 0 20px 30px; }
}

@media (max-width: 760px) {
  .org-archive-page { border-radius: 14px; padding: 0 12px 24px; }
  .oa-page-title { font-size: 21px; }
  .oa-head { padding: 20px 0 14px; }
  .oa-head-actions { width: 100%; }
  .oa-head-actions .oa-btn { flex: 1; }
  .oa-asset-grid, .oa-knowledge-grid { grid-template-columns: 1fr; }
  .oa-drawer { width: 100vw; }
  .oa-drawer-summary { grid-template-columns: repeat(2, 1fr); }
  .oa-searchbox { min-width: 100%; flex-basis: 100%; }
  .oa-filter .oa-select { flex: 1; }
  .oa-bar-row { grid-template-columns: 54px minmax(0, 1fr) 62px; }
  .oa-table-toolbar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .org-archive-page { padding-left: 9px; padding-right: 9px; }
  .oa-kpi-value { font-size: 22px; }
  .oa-tab { padding-left: 9px; padding-right: 9px; font-size: 11px; }
  .oa-drawer-body { padding: 13px; }
  .oa-modal { padding: 15px; }
  .oa-member-picker { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .oa-asset-card, .oa-toast, .oa-skeleton span { transition: none; animation: none; }
}
