:root {
  color-scheme: light;
  --page: #f3f6fc;
  --surface: #ffffff;
  --ink: #131841;
  --muted: #4d5b78;
  --line: #dbe3f1;
  --nav: #11113e;
  --brand: #2222ca;
  --brand-hover: #141492;
  --brand-soft: #eef0ff;
  --radius: 14px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-size: 14px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #4040db; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.button.mobile-only { display: none; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.shell.guest { grid-template-columns: minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; height: 100dvh; min-height: 0; position: sticky; top: 0; align-self: start; background: linear-gradient(165deg, var(--nav) 20%, #1c1c5a 100%); color: #e8edff; padding: 22px 14px 15px; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 22px; padding-inline: 5px; }
.sidebar-collapse {
  flex: 0 0 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #ffffff35;
  border-radius: 7px;
  color: #e8edff;
  background: #ffffff0d;
  font-size: 25px;
  line-height: 1;
}
.sidebar-collapse:hover { background: #ffffff22; }
@media screen and (min-width: 1061px) {
  .shell.sidebar-collapsed:not(.guest) { grid-template-columns: 64px minmax(0, 1fr); }
  .sidebar-collapsed .sidebar { padding: 14px 8px; }
  .sidebar-collapsed .sidebar-top { justify-content: center; padding: 0; margin-bottom: 13px; }
  .sidebar-collapsed .sidebar-top .brand,
  .sidebar-collapsed :is(.nav-label, .sidebar-footer) { display: none; }
  .sidebar-collapsed .nav-list a { position: relative; justify-content: center; min-height: 44px; padding: 6px; }
  .sidebar-collapsed .nav-list a [data-i18n] {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
  }
  .sidebar-collapsed .nav-icon { font-size: 18px; }
}
.sidebar-main { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #565e93 transparent; }
.brand { display: flex; align-items: center; min-width: 0; }
.brand-logo-wrap { display: flex; align-items: center; background: #fff; padding: 8px 11px; border-radius: 8px; }
.brand-logo { display: block; height: 34px; width: auto; max-width: 175px; object-fit: contain; }
.nav-label { margin: 12px 9px 7px; color: #a7b2df; font-size: 11px; font-weight: 650; letter-spacing: .035em; }
.nav-list { display: grid; gap: 3px; }
.nav-list a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 8px 11px; border-radius: 7px; color: #dbe2ff; font-size: 13.5px; transition: background .15s, color .15s; }
.nav-list a span:last-child { overflow-wrap: anywhere; }
.nav-icon { color: #a9b9f8; flex: 0 0 16px; font-size: 16px; line-height: 1; text-align: center; }
.nav-list a:hover { background: #ffffff13; color: #fff; }
.nav-list a[aria-current="page"] { background: #3236aa; color: #fff; box-shadow: inset 3px 0 #8bdcff; font-weight: 650; }
.nav-list a[aria-current="page"] .nav-icon { color: #b8ebff; }
.sidebar :is(a, button):focus-visible { outline-color: #9fe9ff; outline-offset: -2px; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; margin: auto 6px 0; padding-top: 13px; border-top: 1px solid #aab8f43d; color: #bac6eb; font-size: 11.5px; }
.local-mark, .connection span { width: 7px; height: 7px; border-radius: 50%; background: #38bdf8; }

.main-area { min-width: 0; }
.topbar { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 11px clamp(18px, 3.5vw, 44px); background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 1px 8px #13184108; flex-wrap: wrap; }
.topbar-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.breadcrumb strong { color: var(--ink); font-weight: 650; }
.cohort-bar { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cohort-select { width: auto; max-width: 280px; padding: 6px 10px; font-size: 12.5px; font-weight: 650; border-color: #cbd6ee; background: #f7f8ff; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar-actions .language { width: auto; padding: 6px 8px; font-size: 12.5px; font-weight: 650; border-color: #cbd6ee; }
.account { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.account-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#account-toggle { display: none; }
.account-info { display: grid; text-align: right; line-height: 1.3; overflow-wrap: anywhere; }
.account-info strong { font-size: 13px; }
.account-info span { color: var(--muted); font-size: 11px; }
.account .button { white-space: nowrap; }
.connection { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.connection[data-state="ready"] span { background: #24816b; }
.connection[data-state="error"] span { background: #ba502c; }
.content { width: min(100%, 1390px); margin: 0 auto; padding: 30px clamp(18px, 3.5vw, 44px) 54px; }
.content:focus { outline: none; }
.loading-state { color: var(--muted); padding: 23px 0; }

.sign-in { width: min(100%, 442px); margin: clamp(32px, 8vh, 92px) auto; padding: 0 16px; }
.sign-in-brand { display: grid; gap: 10px; padding: 24px 24px 18px; background: #f8faff; border-bottom: 1px solid var(--line); }
.sign-in-logo { height: 54px; width: auto; max-width: 250px; object-fit: contain; }
.sign-in-brand p { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.sign-in form { display: grid; gap: 15px; padding: 24px; }
.sign-in h1 { font-size: 24px; }
.sign-in .form-error { margin: 0; }

.hero { position: relative; overflow: hidden; isolation: isolate; display: flex; justify-content: space-between; align-items: end; gap: 22px; background: var(--nav); color: #fff; padding: clamp(22px, 3vw, 36px); border-radius: var(--radius); }
.hero::before { position: absolute; content: ""; z-index: -1; inset: 0; background: radial-gradient(ellipse at 100% 0%, #534cef 0%, transparent 64%), linear-gradient(115deg, #15134b 20%, #2121ac 100%); }
.hero::after { position: absolute; content: ""; z-index: -1; width: 330px; height: 330px; border: 1px solid #ffffff24; border-radius: 50%; box-shadow: 0 0 0 38px #ffffff12, 0 0 0 76px #ffffff08; right: -48px; top: -172px; }
.hero-project { color: #c7d6ff; font-size: 13px; font-weight: 650; }
.hero h1 { margin: 6px 0 9px; font-size: clamp(27px, 3.6vw, 43px); font-weight: 750; line-height: 1.18; letter-spacing: -.03em; }
.hero-description { color: #dfe7fb; font-size: 13.5px; }
.hero-main { min-width: 0; flex: 1 1 auto; }
.hero-focus-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.hero-focus-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: 999px; border: 1px solid #ffffff42; background: #ffffff18; color: #f8fafc;
  font-size: 12px; font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s;
}
.hero-focus-pill:hover { background: #ffffff2b; border-color: #ffffff80; }
.hero-focus-pill.is-active { background: #fff; color: #162952; border-color: #fff; font-weight: 700; }
.hero-pill-tag { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; background: #ffffff24; }
.hero-focus-pill.is-active .hero-pill-tag { background: #e0e7ff; color: #1e3a8a; }
.hero-focus-more { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; border: 1px dashed #ffffff4d; color: #dbeafe; font-size: 11.5px; }
.hero-dates { margin-top: 6px; color: #b8cbff; font-size: 12.5px; }
.hero-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; flex-shrink: 0; }
.hero .button { border-color: #fff; color: #1a2f66; background: #fff; }
.hero .button:hover { background: #eef2ff; }
.hero .button.secondary { background: #ffffff1c; color: #fff; border-color: #ffffff59; }
.hero .button.secondary:hover { background: #ffffff30; }

.overview-hero.hero {
  align-items: center;
  min-height: 205px;
  padding: clamp(24px, 3.6vw, 44px);
  background: #101044;
}
.overview-hero.hero::before, .overview-hero.hero::after { content: none; }
.overview-hero-copy { position: relative; z-index: 1; max-width: min(68%, 690px); }
.overview-hero h1 { margin: 0 0 10px; }
.overview-hero .hero-actions { margin-top: 16px; }
.overview-hero .hero-actions .primary { background: var(--brand); color: #fff; border-color: #ffffff56; }
.overview-hero .hero-actions .primary:hover { background: var(--brand-hover); }
.overview-cohort-name { font-size: clamp(16px, 2vw, 21px); color: #fff; font-weight: 680; line-height: 1.35; }
.overview-cohort-name + .hero-description, .overview-hero .hero-project + .hero-description { margin-top: 5px; }
.overview-hero-art {
  position: absolute;
  inset: 0 0 0 53%;
  background: linear-gradient(90deg, #101044 0%, transparent 62%),
    url('/therapy-training-illustration.jpg') center 43% / cover no-repeat;
}
.overview-attention {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 20px;
  padding: 8px 2px 0;
  margin: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12.5px;
}
.overview-attention li { display: flex; align-items: baseline; gap: 7px; }
.overview-attention li::before { content: ''; display: inline-block; flex: 0 0 5px; height: 5px; border-radius: 50%; background: var(--brand); transform: translateY(-2px); }
.overview-switcher { margin: 14px 0; }
.overview-switcher .hero-focus-pill { border-color: var(--line); background: var(--surface); color: var(--ink); }
.overview-switcher .hero-focus-pill:hover, .overview-switcher .hero-focus-pill.is-active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.overview-switcher .hero-pill-tag { color: var(--brand); background: var(--brand-soft); }
.overview-switcher .hero-focus-more { color: var(--muted); border-color: var(--line); }
.overview-message-panels .item-actions .button { white-space: nowrap; }
.overview-panel-scroll .item-description { white-space: pre-wrap; overflow-wrap: anywhere; }

@media screen {
  .overview-message-panels > .panel {
    display: flex;
    flex-direction: column;
    height: clamp(265px, 45svh, 370px);
  }
  .overview-message-panels .panel-header { flex-shrink: 0; }
  .overview-panel-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #aebde1 transparent;
  }
  .overview-panel-scroll:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
}

@media (max-width: 700px) {
  .overview-hero.hero { align-items: stretch; min-height: 0; gap: 0; padding: 0; }
  .overview-hero-copy { max-width: none; padding: 22px; }
  .overview-hero-art {
    position: relative;
    inset: auto;
    min-height: 115px;
    background-image: linear-gradient(180deg, #101044 0%, transparent 45%), url('/therapy-training-illustration.jpg');
  }
}

@media print {
  .overview-hero.hero { min-height: 0; padding: 0 0 3mm; background: #fff; }
  .overview-hero-copy { max-width: none; padding: 0; }
  .overview-hero-art { display: none; }
  .overview-cohort-name { color: var(--ink); font-size: 13pt; }
  .overview-attention { margin: 0 0 3mm; padding: 0; font-size: 8pt; }
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(25px, 3vw, 36px); font-weight: 740; line-height: 1.2; letter-spacing: -.025em; }
.page-head p { color: var(--muted); margin-top: 6px; }
.page-actions, .item-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0 22px; }
.metric { padding: 15px 18px 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.metric:hover { border-color: #8fa4db; }
.metric span { display: block; color: var(--muted); font-size: 13px; }
.metric strong { display: block; font-size: 27px; line-height: 1.3; font-weight: 700; font-variant-numeric: tabular-nums; }
.metric .metric-demo { margin-top: 4px; color: #81531c; font-size: 11px; }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 17px; align-items: start; }
.triple-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.people-search { margin-bottom: 14px; max-width: 420px; }
.people-search input { min-height: 44px; }
.people-directory .item-actions .button { white-space: nowrap; }
.people-more { border-top: 1px solid var(--line); }
.people-more summary { padding: 12px 20px; cursor: pointer; color: var(--brand); font-weight: 650; }
.people-more[open] summary { border-bottom: 1px solid var(--line); }
.stack { display: grid; gap: 16px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; min-width: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-header h2 { font-size: 16px; font-weight: 720; }
.panel-header .text-link { flex-shrink: 0; }
.panel-body { padding: 17px 20px; }

.approval-summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 14px; }
.approval-summary .field { flex: 1 1 290px; max-width: 610px; }
.approval-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.approval-table td { vertical-align: top; min-width: 115px; }
.approval-table tbody th { min-width: 74px; vertical-align: top; color: var(--ink); background: var(--surface); border-top: 1px solid var(--line); font-size: 14px; }
.approval-table td:last-child { min-width: 140px; }
.approval-table td:nth-child(2), .approval-table td:nth-child(5) { white-space: normal; }
.approval-table .item-actions { justify-content: flex-start; }
.approval-note { max-width: 34ch; overflow-wrap: anywhere; white-space: pre-wrap; }
.approval-hint { margin-top: 10px; color: var(--muted); font-size: 12px; }
.approval-history { border-top: 1px solid var(--line); }
.approval-history summary { padding: 14px 20px; cursor: pointer; font-weight: 650; }
.communication-filters { display: flex; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid var(--line); }
.communication-filters .field { flex: 1 1 160px; max-width: 260px; }
.approval-editor-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .approval-editor-fields { grid-template-columns: 1fr; } }

.mic-sources { display: flex; flex-wrap: wrap; gap: 5px 14px; align-items: baseline; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.mic-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mic-card { display: flex; flex-direction: column; gap: 12px; padding: 15px; box-shadow: 0 8px 20px #13184108; }
.mic-card-head { padding: 2px 3px 0; }
.mic-card-head h2 { font-size: clamp(17px, 1.75vw, 21px); line-height: 1.3; overflow-wrap: anywhere; }
.mic-card-head p { margin-top: 5px; font-size: 13px; color: var(--muted); }
.mic-cover { position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: var(--brand-soft); }
.mic-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mic-cover figcaption {
  position: absolute; inset-inline-end: 10px; top: 10px; max-width: calc(100% - 20px);
  padding: 3px 9px; border-radius: 999px; background: #11113eee; color: #fff; font-size: 11px;
}
.mic-card-body { padding-inline: 3px; color: var(--muted); }
.mic-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.mic-chips .badge { white-space: normal; }
.mic-card-actions { display: flex; justify-content: flex-end; margin-top: auto; padding-inline: 3px; }
.mic-card-actions .button, .mic-back { min-height: 44px; }
.mic-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.mic-detail-profile > .mic-cover { max-height: 420px; border-radius: 0; }
.mic-detail-profile > .mic-cover img { object-fit: contain; }
.mic-detail-content { padding: 17px 20px; }
.mic-detail-content + .mic-detail-content { padding-top: 0; }
.mic-detail-content h2 { margin-bottom: 8px; font-size: 17px; }
.mic-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0; margin: 10px 0 0; list-style: none; }
.mic-topics li { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8faff; }
.mic-topics p { margin-top: 4px; color: var(--muted); }
.mic-planning-note { margin-top: 12px; color: var(--muted); font-size: 13px; }
.mic-print-profiles { display: none; }

@media screen and (min-width: 1061px) {
  .mic-card-compact { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 8px 12px; }
  .mic-card-compact .mic-cover { grid-area: 1 / 1 / 4 / 2; height: 100%; min-height: 160px; aspect-ratio: auto; }
  .mic-card-compact .mic-card-actions { grid-column: 2; }
  .mic-card-compact .mic-cover figcaption { inset-inline-start: 6px; inset-inline-end: auto; top: 7px; }
}
@media screen and (max-width: 640px) {
  .mic-gallery, .mic-topics { grid-template-columns: 1fr; gap: 12px; }
  .mic-card { padding: 12px; }
}
@media print {
  .mic-print-profiles { display: block; }
  .mic-print-profiles .panel { break-inside: avoid-page; }
  .mic-detail .mic-cover { display: none; }
  .mic-detail-content, .mic-sources { padding: 2.5mm 3.5mm; }
  .mic-detail-content h2 { font-size: 12pt; }
  .mic-topics { display: block; margin-top: 2mm; }
  .mic-topics li { background: #fff; padding: 1.5mm 2mm; margin-bottom: 1mm; break-inside: avoid-page; }
}
.empty { padding: 25px 20px; color: var(--muted); }
.empty .button { margin-top: 12px; }
.item-list { list-style: none; padding: 0; margin: 0; }
.item { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 15px 20px; }
.item + .item { border-top: 1px solid var(--line); }
.item-main { min-width: 0; overflow-wrap: anywhere; }
.item-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 700; }
.item-meta { color: var(--muted); margin-top: 4px; font-size: 12px; }
.item-description { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.item-actions { justify-content: flex-end; }

.session-item { display: grid; gap: 11px; }
.session-item .item-actions { justify-content: flex-start; }
.schedule-day + .schedule-day { border-top: 1px solid var(--line); }
.schedule-day-title { margin: 0; padding: 10px 20px; background: #f7f9fb; color: var(--muted); font-size: 13px; font-weight: 650; }
.schedule-timezone { color: var(--muted); font-size: 12px; }
.schedule-time { margin: 0 0 3px; color: var(--brand); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.session-roster { list-style: none; margin: 0; padding: 8px 12px; display: grid; gap: 6px; }
.session-roster-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 6px 8px; border-radius: 7px; background: #f8fafc; }
.session-procedures { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; }
.session-procedure { display: grid; gap: 8px; padding: 11px 13px; }
.session-procedure + .session-procedure { border-top: 1px solid var(--line); }
.session-prep-card { margin-top: 4px; border: 1px solid #d5e0ee; border-radius: 8px; background: #f8faff; }
.session-prep-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 11px; font-size: 12.5px; font-weight: 650; color: var(--brand); cursor: pointer; }
.session-prep-body { padding: 10px 12px 12px; border-top: 1px solid #dce6f2; }
.session-practices { border: 1px solid var(--line); border-radius: 8px; }
.session-practices > summary { padding: 9px 12px; font-weight: 650; cursor: pointer; }
.session-practices[open] > summary { border-bottom: 1px solid var(--line); }
.history-procedures { display: grid; gap: 8px; margin: 8px 0 0; padding-inline-start: 18px; }
.procedure-search { border-bottom: 1px solid var(--line); }
.procedure-search .field { max-width: 450px; }

.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; color: var(--ink); background: var(--surface); font-weight: 650; text-align: center; }
.button.primary { color: #fff; border-color: var(--brand); background: var(--brand); }
.button.primary:hover { background: var(--brand-hover); }
.button.secondary { border-color: #cdd7ee; }
.button.secondary:hover { background: var(--brand-soft); }
.button.danger { color: #8b3d29; border-color: #e4b7ab; }
.button.danger:hover { background: #faeae5; }
.button.small { font-size: 12px; padding: 5px 9px; }
.text-link { color: var(--brand); font-weight: 650; }
.text-link:hover { text-decoration: underline; }

.badge { display: inline-flex; align-items: center; color: #486174; background: #eaf1f5; padding: 2px 7px; border-radius: 5px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.badge.positive { background: #e3f4ee; color: #115e4e; }
.badge.pending { background: #f7eedf; color: #81531c; }
.badge.negative { background: #faeae5; color: #8b3d29; }
.badge.brand { background: var(--brand-soft); color: var(--brand); }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; white-space: nowrap; }
th, td { padding: 12px 16px; }
th { background: #f7f9fb; color: var(--muted); font-weight: 650; font-size: 12px; }
tbody td { border-top: 1px solid var(--line); }

dialog { padding: 0; width: min(calc(100vw - 28px), 620px); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: 15px; color: var(--ink); box-shadow: 0 15px 65px #142b403d; }
dialog::backdrop { background: #10213285; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 18px; }
.dialog-header .language { width: auto; margin-inline-start: auto; }
.icon-button { border: 0; color: var(--muted); font-size: 23px; line-height: 1; background: transparent; padding: 5px 7px; border-radius: 6px; }
.icon-button:hover { background: var(--page); }
.dialog-fields { display: grid; gap: 13px; padding: 18px 20px; max-height: calc(100dvh - 165px); overflow-y: auto; }
.field small { color: var(--muted); font-weight: 400; }
.field { display: grid; gap: 5px; }
.field > span:first-child { font-weight: 650; }
input, textarea, select { width: 100%; border: 1px solid #c7d6e1; border-radius: 7px; padding: 8px 10px; color: var(--ink); background: var(--surface); }
textarea { min-height: 76px; resize: vertical; }
.schedule-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.schedule-attendees { min-width: 0; margin: 0; padding: 8px 10px; border: 1px solid #c7d6e1; border-radius: 7px; }
.schedule-attendees legend { padding: 0 3px; font-weight: 650; }
.schedule-attendee-options { display: grid; gap: 4px; max-height: 170px; overflow-y: auto; }
.schedule-attendee-options label { display: flex; align-items: baseline; gap: 8px; padding: 4px 3px; }
.schedule-attendee-options input { width: auto; flex-shrink: 0; }
.schedule-roster-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 14px; margin-bottom: 8px; }
.schedule-roster-tools .field { flex: 1; min-width: 145px; }
.schedule-roster-tools [role="status"] { padding-block: 8px; }
.schedule-form-feedback { color: #8b3d29; font-weight: 650; }
.schedule-form-feedback:empty { display: none; }
.dialog-section-title { font-size: 13px; font-weight: 700; color: var(--brand); padding-top: 6px; border-top: 1px dashed var(--line); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.dialog-actions:has(#editor-save-draft:not([hidden])) { flex-wrap: wrap; }
.form-error { color: #8b3d29; background: #faeae5; border-radius: 6px; margin: 0 20px 13px; padding: 8px 10px; }
.toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; background: #18384b; color: #fff; border-radius: 8px; box-shadow: 0 7px 20px #152e4a25; padding: 10px 15px; max-width: min(370px, calc(100% - 44px)); }
.toast.error { background: #833e2c; }

/* Star Course & Auto-join Banner inside Dialog */
.star-checkbox-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid #ecc66a;
  border-radius: 9px;
  background: #fffcf0;
  cursor: pointer;
}
.star-checkbox-banner input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
}
.star-checkbox-banner span {
  display: grid;
  gap: 2px;
}
.star-checkbox-banner strong {
  color: #7d4c00;
  font-size: 13.5px;
}
.star-checkbox-banner small {
  color: var(--muted);
  font-size: 12px;
}

/* Learner Batch Import & Duplicate Highlighting */
.oa-learner-caption {
  padding: 12px 20px 0;
  color: var(--muted);
  font-size: 12.5px;
}
.oa-learner-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.oa-learner-import-wrap {
  padding-bottom: 0;
  display: grid;
  gap: 10px;
}
.oa-learner-import-box {
  border: 1px dashed #b9cadb;
  border-radius: 9px;
  padding: 10px 14px;
  background: #f8fbff;
}
.oa-learner-import-box > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--brand);
  font-size: 13.5px;
}
.oa-learner-import-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px 12px;
  margin-top: 12px;
}
.oa-learner-import-form .field {
  flex: 1 1 230px;
  max-width: 320px;
}
.oa-learner-import-form input[type="file"] {
  padding: 5px 8px;
  font-size: 12.5px;
}
.oa-learner-import-form small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 12px;
}
.oa-import-feedback {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
}
.oa-import-feedback.is-ok {
  background: #e5f6ef;
  color: #0e6351;
  border: 1px solid #b8e4d3;
}
.oa-import-feedback.is-warn {
  background: #fff3e3;
  color: #963c12;
  border: 1px solid #f4c697;
}
.oa-import-feedback.is-error {
  background: #faeae5;
  color: #8b3d29;
  border: 1px solid #ebbeb1;
}
.oa-duplicate-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff4e6;
  border: 1px solid #f2bf85;
  border-left: 5px solid #d9481f;
  color: #8a340f;
}
.oa-learner-table tbody.is-duplicate-conflict > tr:first-child > *,
tr.is-duplicate-row > td {
  background: #fff6ed;
}
.oa-learner-table tbody.is-duplicate-conflict > tr:first-child > th:first-child,
tr.is-duplicate-row > td:first-child {
  box-shadow: inset 4px 0 0 #d9481f;
}
.oa-learner-name-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.oa-dup-flag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fde6dc;
  border: 1px solid #f3b59d;
  color: #a12c0f;
  font-size: 11px;
  font-weight: 700;
}
.oa-learner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

/* Training Schedule & Course Catalog Viewing Modes */
.training-mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.training-mode-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.training-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f3f6fa;
  color: #395066;
  font-weight: 700;
  transition: all .15s;
}
.training-mode-tab strong {
  padding: 1px 7px;
  border-radius: 999px;
  background: #e1e9f2;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.training-mode-tab:hover {
  background: #e9eff8;
  color: var(--brand);
}
.training-mode-tab.is-active {
  background: var(--brand);
  color: #ffffff;
}
.training-mode-tab.is-active strong {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.schedule-focus-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px 20px;
  background: #f8fafd;
  border-bottom: 1px solid var(--line);
}
.schedule-focus-chip {
  appearance: none;
  border: 1px solid #d4dfe9;
  background: #ffffff;
  color: #384e63;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 650;
  transition: all .15s;
}
.schedule-focus-chip span {
  display: inline-block;
  margin-left: 3px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef3f7;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.schedule-focus-chip:hover { border-color: var(--brand); color: var(--brand); }
.schedule-focus-chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.schedule-focus-chip.is-active span { background: rgba(255, 255, 255, 0.24); color: #fff; }
.schedule-focus-chip.tone-warn.is-active { background: #c94622; border-color: #c94622; }
.schedule-focus-chip.tone-amber.is-active { background: #b57718; border-color: #b57718; }
.schedule-focus-chip.tone-star.is-active { background: #b57300; border-color: #b57300; }
.schedule-focus-chip.tone-purple.is-active { background: #6f2d75; border-color: #6f2d75; }
.schedule-focus-chip.tone-ok.is-active { background: #167a69; border-color: #167a69; }

.schedule-day-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 20px;
  background: #eef3f9;
  border-bottom: 1px solid var(--line);
}
.schedule-day-banner .schedule-day-title {
  padding: 0;
  background: transparent;
  color: #1c3552;
  font-size: 13.5px;
  font-weight: 720;
}

.session-item.is-gap { border-left: 4px solid #d9532f; background: linear-gradient(90deg, #fffaf7 0%, #ffffff 28%); }
.session-item.is-pending { border-left: 4px solid #c98a26; }
.session-item.is-approved { border-left: 4px solid #1d8a78; background: linear-gradient(90deg, #f7fcfa 0%, #ffffff 28%); }
.session-item.is-recorded { border-left: 4px solid #2e6395; background: linear-gradient(90deg, #f7faff 0%, #ffffff 28%); }

.session-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}
.session-time-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.schedule-time-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--brand);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.session-main-title {
  font-size: 15.5px;
}

.sched-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}
.sched-pill.star { background: #fff3cd; color: #8a5200; border: 1px solid #f0c965; font-weight: 750; }
.sched-pill.animal { background: #f6e8f6; color: #6f256d; border: 1px solid #e7c9e7; }
.sched-pill.general { background: #e8f3f8; color: #205772; }
.sched-pill.center { background: #e8eefb; color: #1f3b8f; font-weight: 700; }
.sched-pill.mentor { background: #edf5f0; color: #1b5c42; }
.sched-pill.neutral { background: #f1f4f8; color: #42586e; }
.sched-pill.warn { background: #fdebe5; color: #a83314; border: 1px solid #f5c3b5; font-weight: 700; }
.sched-pill.amber { background: #fcf1dc; color: #825313; border: 1px solid #eed6a6; }
.sched-pill.ok { background: #e2f5ee; color: #0e6655; border: 1px solid #b6e4d2; font-weight: 700; }

.session-procedures-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 0;
  background: transparent;
}
.session-procedures-grid .session-procedure {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
}
.session-procedures-grid .session-procedure + .session-procedure {
  border-top: 1px solid var(--line);
}
.session-procedures-grid .session-procedure.is-star {
  border-color: #e6be60;
  background: #fffef9;
}

/* Course Catalog Grid */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px 16px;
  background: #f9fbfd;
  border-bottom: 1px solid var(--line);
}
.catalog-search-field {
  flex: 1 1 260px;
  max-width: 440px;
}
.catalog-summary-text {
  color: var(--muted);
  font-size: 12.5px;
}
.course-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  padding: 16px 20px 20px;
  align-items: start;
}
.course-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-top-width: 3px;
  border-radius: 10px;
  background: #ffffff;
}
.course-card.tone-brand { border-top-color: #1f3b8f; }
.course-card.tone-teal { border-top-color: #178577; }
.course-card.tone-amber { border-top-color: #c9821e; }
.course-card.tone-purple { border-top-color: #7b3b8c; }
.course-card.tone-green { border-top-color: #267d49; }
.course-card.tone-indigo { border-top-color: #3f51b5; }

.course-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.course-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.course-cat-pill {
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}
.course-cat-pill.tone-brand { background: #e8edfb; color: #1f3b8f; }
.course-cat-pill.tone-teal { background: #e2f5f2; color: #0f685c; }
.course-cat-pill.tone-amber { background: #fdf1dc; color: #87520b; }
.course-cat-pill.tone-purple { background: #f5e9f8; color: #682778; }
.course-cat-pill.tone-green { background: #e5f5eb; color: #1c6539; }
.course-cat-pill.tone-indigo { background: #eaedfb; color: #2f3f9e; }

.course-card-prefix {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.course-card-title {
  font-size: 15px;
  font-weight: 720;
  color: var(--ink);
  line-height: 1.35;
}
.course-card-desc {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.course-card-footer {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #eef2f6;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1060px) {
  .course-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oa-learner-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .session-procedures-grid,
  .course-catalog-grid,
  .oa-learner-filters {
    grid-template-columns: 1fr;
  }
  .schedule-focus-bar { padding-inline: 14px; }
  .course-catalog-grid { padding-inline: 14px; }
}

.mobile-tabbar { display: none; }

@media (max-width: 1060px) {
  .triple-grid { grid-template-columns: 1fr; }
}

@media (max-width: 930px) {
  .shell { grid-template-columns: 192px minmax(0, 1fr); }
  .split { grid-template-columns: 1fr; }
  .hero { align-items: flex-start; flex-direction: column; }
  .topbar:has(.account:not([hidden])) .connection[data-state="ready"] { display: none; }
}

@media screen and (max-width: 1060px) {
  .shell { display: block; }
  .sidebar-collapse { display: none; }
  .button.mobile-only { display: inline-flex; }
  .sidebar { position: static; height: auto; min-height: auto; padding: 10px 16px; }
  .sidebar-top { margin-bottom: 0; padding-inline: 0; }
  .brand-logo { height: 28px; }
  .nav-label, .sidebar-footer { display: none; }
  .sidebar-main { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid #2b455e; }
  .sidebar-main.is-open { display: block; }
  .nav-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .nav-list a { min-height: 44px; padding: 9px 10px; font-size: 13px; }
  .topbar { position: sticky; top: 0; z-index: 8; padding: 8px 15px; gap: 8px; }
  .topbar-actions { flex: 0 0 auto; }
  .topbar:has(#account:not([hidden])) #connection[data-state="ready"] { display: none; }
  .account { position: relative; }
  #account-toggle { display: inline-flex; }
  .account-options {
    display: none; position: absolute; top: calc(100% + 6px); inset-inline-end: 0;
    min-width: max-content; padding: 10px; background: var(--surface);
    border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px #1c1c5a26;
  }
  #account-toggle[aria-expanded="true"] + .account-options { display: grid; }
  .account-info { text-align: start; }
  .topbar .language, #editor-language, #account-toggle, .account-options .button, #mobile-menu-toggle { min-height: 44px; }
  .cohort-select { max-width: 210px; }
}

@media (max-width: 768px) {
  .content { padding: 18px 14px 88px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 11px; }
  .item { flex-direction: column; gap: 9px; padding: 14px 15px; }
  .item-actions { justify-content: flex-start; }
  .session-roster-row { align-items: flex-start; flex-direction: column; }
  .metrics { gap: 9px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 12px 12px; }
  .metric strong { font-size: 22px; }
  .toast { bottom: 76px; right: 14px; }
  .mobile-tabbar:not([hidden]) {
    position: fixed;
    z-index: 15;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px #0f213714;
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 44px;
    padding: 5px 2px;
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
  }
  .mobile-tabbar a span { font-size: 16px; line-height: 1.1; }
  .mobile-tabbar a small { font-size: 10.5px; font-weight: 600; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .mobile-tabbar a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
}

@media (max-width: 470px) {
  .schedule-fields { grid-template-columns: 1fr; }
  .topbar-left { width: 100%; justify-content: space-between; }
  .topbar-actions { justify-content: flex-end; width: 100%; gap: 7px; }
  .breadcrumb span { display: none; }
  .schedule-attendee-options label { min-height: 44px; align-items: center; }
  .dialog-fields { padding: 12px; }
  .dialog-actions { padding: 10px 12px; }
}

/* ===== 架构重组 v2：分组导航、统一课次状态、驾驶舱 ===== */
.nav-list .nav-label { margin: 14px 9px 4px; }
.nav-list .nav-label:first-child { margin-top: 0; }

.stage-track { display: flex; align-items: stretch; gap: 6px; padding: 16px 18px 8px; overflow-x: auto; }
.stage-card { flex: 1 1 0; min-width: 128px; display: grid; gap: 4px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); border-top: 4px solid #c9d3de; background: #fff; transition: box-shadow .15s, transform .15s; }
a.stage-card:hover { box-shadow: 0 6px 18px rgba(23, 42, 61, .1); transform: translateY(-1px); }
.stage-card strong { font-size: 26px; line-height: 1.1; }
.stage-card small { color: var(--muted); font-size: 12px; }
.stage-card-label { font-weight: 700; font-size: 13px; }
.stage-card.tone-gap { border-top-color: #d95d39; }
.stage-card.tone-gap strong { color: #b8431f; }
.stage-card.tone-pending { border-top-color: #c58b2b; }
.stage-card.tone-pending strong { color: #946414; }
.stage-card.tone-approved { border-top-color: #1d8a78; }
.stage-card.tone-approved strong { color: #16705f; }
.stage-card.tone-recorded { border-top-color: #316494; }
.stage-card.tone-recorded strong { color: #264f78; }
.stage-card.tone-reviewed { border-top-color: #5243aa; }
.stage-card.tone-reviewed strong { color: #403294; }
.stage-card.is-reserved { background: #f6f8fb; border-style: dashed; border-top-style: solid; opacity: .75; }
.stage-arrow { align-self: center; color: #a6b4c2; font-size: 20px; }
.stage-funnel .oa-learner-caption, .team-push .oa-learner-caption, .project-targets .oa-learner-caption { padding: 0 18px 14px; }

.push-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; padding: 0 18px 18px; }
.push-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 10px; background: #fff; }
.push-card header { display: grid; gap: 2px; }
.push-card h3 { font-size: 15px; }
.push-card header small { color: var(--muted); font-size: 12px; }
.push-card.has-alert { border-color: #f0c98a; background: linear-gradient(180deg, #fffaf0 0%, #fff 60%); }
.push-card.is-unowned { border-style: dashed; }
.push-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.push-metrics a { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; background: #f4f6fa; }
.push-metrics a:hover { background: var(--brand-soft); }
.push-metrics strong { font-size: 22px; line-height: 1.1; color: var(--brand); }
.push-metrics span { font-size: 12px; color: var(--muted); }
.push-metrics em { font-style: normal; font-size: 12px; font-weight: 700; color: #b8431f; }

.sched-pill.stage { font-weight: 750; border: 1px solid transparent; }
.sched-pill.stage.tone-gap { background: #fdebe5; color: #a83314; border-color: #f5c3b5; }
.sched-pill.stage.tone-pending { background: #fcf1dc; color: #825313; border-color: #eed6a6; }
.sched-pill.stage.tone-approved { background: #e3f4ef; color: #146b5b; border-color: #b9e1d6; }
.sched-pill.stage.tone-recorded { background: #e6eef8; color: #234d77; border-color: #bfd2e8; }
.sched-pill.stage.tone-reviewed { background: #eae6ff; color: #403294; border-color: #c0b6f2; }

.gantt-stage { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 750; }
.gantt-stage.tone-gap { background: #fdebe5; color: #a83314; }
.gantt-stage.tone-pending { background: #fcf1dc; color: #825313; }
.gantt-stage.tone-approved { background: #e3f4ef; color: #146b5b; }
.gantt-stage.tone-recorded { background: #e6eef8; color: #234d77; }
.gantt-stage.tone-reviewed { background: #eae6ff; color: #403294; }

.schedule-focus-chip.tone-blue.is-active { background: #2e6395; border-color: #2e6395; }
.stage-chip-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.stage-chip-arrow { color: #a6b4c2; }
.schedule-timezone-line { margin: -6px 0 12px; display: block; }
.cockpit-footnote { margin: 4px 2px 18px; text-align: right; font-size: 13px; }

@media (max-width: 768px) {
  .stage-track { padding: 12px; }
  .stage-arrow { display: none; }
  .stage-card { min-width: 112px; }
  .push-grid { padding: 0 12px 12px; }
}

/* ===== v3：需求驱动、疗法体系、实践能力 ===== */
.need-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 14px; padding: 12px 16px;
  border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.need-banner.is-linked { border-left: 4px solid #1d8a78; background: linear-gradient(90deg, #f3fbf8 0%, #fff 40%); }
.need-banner.is-missing { border-left: 4px solid #d95d39; background: #fff6f2; display: grid; }
.need-banner.is-missing strong { color: #a83314; }
.need-banner-tag { font-size: 12px; font-weight: 700; color: #146b5b; background: #e3f4ef; border-radius: 999px; padding: 2px 10px; }
.need-banner span { color: var(--muted); }
.need-process { margin-bottom: 16px; }
.need-draft { margin-bottom: 12px; border-color: #c8d0f3; }
.need-draft .panel-header { border-bottom: 0; }
.need-draft p { margin-top: 4px; overflow-wrap: anywhere; }
.need-process-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 172px), 1fr));
  gap: 11px;
  margin: 0;
  padding: 14px;
  list-style: none;
}
.need-process-list li { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border-radius: 8px; background: #f5f6ff; }
.need-step-number {
  flex: 0 0 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-hover);
  background: #e7eaff;
  font-size: 12px;
  font-weight: 750;
}
.need-process-list h3 { margin: 2px 0 4px; font-size: 14px; }
.need-process-list p { color: var(--muted); font-size: 12.5px; }
@media screen and (max-width: 520px) {
  .need-process-list { grid-template-columns: 1fr; }
}
@media print {
  .need-process-list { display: block; padding: 2mm 3mm; }
  .need-process-list li { background: #fff; padding: 1.5mm 0; break-inside: avoid-page; }
  .need-process-list h3, .need-process-list p { font-size: 9pt; }
}

.needs-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.needs-strip-title { font-weight: 700; margin-right: 4px; }
.needs-strip-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.needs-strip-chip strong { font-size: 15px; }
.needs-strip-chip.tone-pending strong { color: #946414; }
.needs-strip-chip.tone-positive strong { color: #16705f; }
.needs-strip-chip.tone-negative strong { color: #a83314; }
.needs-strip-chip:hover { border-color: var(--brand); }

.compliance-note { border-left: 4px solid var(--brand); }
.compliance-note ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); display: grid; gap: 2px; }

.need-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.need-card { display: grid; gap: 10px; align-content: start; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.need-card { border-top: 4px solid #c9d3de; }
.need-card.tone-pending { border-top-color: #c58b2b; }
.need-card.tone-proposed { border-top-color: #5b7fd6; }
.need-card.tone-confirmed { border-top-color: #1d8a78; }
.need-card.tone-declined { border-top-color: #b9c2cc; opacity: .85; }
.need-card h3 { font-size: 16px; }
.need-card-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.need-goal { padding: 8px 10px; border-radius: 8px; background: #f4f6fa; }
.need-goal span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.need-facts { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 13px; }
.need-attested { color: #146b5b; }
.need-unattested { color: #a83314; font-weight: 700; }
.attest-banner { border-color: #f0c98a !important; background: #fffaf0 !important; }

.therapy-page { display: grid; gap: 25px; }
.therapy-hero.hero { display: flex; min-height: 270px; align-items: center; padding: clamp(26px, 4vw, 54px); background: #101044; }
.therapy-hero.hero::before, .therapy-hero.hero::after { content: none; }
.therapy-hero-copy { position: relative; z-index: 1; width: min(52%, 540px); }
.therapy-hero.hero h1 { margin: 0; font-size: clamp(32px, 4.25vw, 58px); line-height: 1.12; text-wrap: balance; }
.therapy-hero.hero .hero-description { max-width: 37ch; margin-top: 15px; font-size: clamp(14px, 1.3vw, 17px); }
.therapy-hero .hero-actions { margin-top: 25px; }
.therapy-hero-art {
  position: absolute;
  inset: 0 0 0 41%;
  background: linear-gradient(90deg, #101044 1%, transparent 51%), url('/therapy-training-illustration.jpg') center 47% / cover no-repeat;
}
.therapy-page .need-banner-gap { margin: 0; }
.therapy-library { min-width: 0; }
.therapy-library-toolbar, .therapy-library-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.therapy-library-toolbar { justify-content: space-between; margin-bottom: 15px; }
.therapy-library-toolbar h2 { font-size: clamp(22px, 2.35vw, 30px); line-height: 1.2; letter-spacing: -.025em; }
.therapy-result-count { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.therapy-library-controls { flex: 0 1 440px; justify-content: flex-end; }
.therapy-library-controls .field { flex: 1 1 215px; min-width: 0; max-width: 300px; }
.therapy-library-controls input { width: 100%; min-height: 40px; background: var(--surface); }
.therapy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 355px), 1fr)); gap: 16px; }
.therapy-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.therapy-card-heading { min-height: 64px; }
.therapy-card-heading h3 { color: var(--nav); font-size: clamp(18px, 2vw, 23px); line-height: 1.25; font-weight: 710; overflow-wrap: anywhere; }
.therapy-card-heading p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.therapy-metrics { display: grid; gap: 8px; margin: 0; }
.therapy-metrics div { display: flex; flex-direction: column-reverse; gap: 2px; min-width: 0; }
.therapy-metrics dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.therapy-metrics dt { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.therapy-metrics-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.therapy-metrics-main div { border-radius: 7px; background: var(--brand-soft); padding: 8px 12px; }
.therapy-metrics-main dd { font-size: 24px; color: var(--brand); line-height: 1.18; }
.therapy-metrics-context { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); }
.therapy-metrics-context dd { font-size: 16px; }
.therapy-levels { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 12px; }
.therapy-levels li { display: flex; align-items: baseline; gap: 8px; overflow-wrap: anywhere; }
.therapy-level-tag { color: var(--brand); font-weight: 700; flex: 0 0 46px; }
.therapy-card-courses .item-meta { margin: 0; }
.therapy-card-actions.item-actions { justify-content: flex-start; gap: 6px; }
#therapy-empty { margin-top: 8px; }

@media (max-width: 700px) {
  .therapy-hero.hero { min-height: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
  .therapy-hero-copy { width: auto; padding: 23px 22px 20px; }
  .therapy-hero .hero-actions { margin-top: 16px; }
  .therapy-hero-art {
    position: relative;
    inset: auto;
    min-height: 165px;
    background-image: linear-gradient(180deg, #101044 0%, transparent 43%), url('/therapy-training-illustration.jpg');
    background-position: center 48%;
  }
  .therapy-page { gap: 18px; }
  .therapy-library-controls { width: 100%; flex: 1 1 100%; justify-content: flex-start; }
  .therapy-library-controls .field { flex: 1 1 185px; max-width: none; }
  .therapy-card { padding: 17px; }
  .therapy-card-heading { min-height: 0; }
}

@media print {
  .therapy-page { display: block; }
  .therapy-hero.hero { min-height: 0; padding: 0 0 3mm; background: #fff; }
  .therapy-hero .therapy-hero-copy { width: auto; padding: 0; }
  .therapy-hero.hero h1 { color: #152536; font-size: 20pt; }
  .therapy-hero .hero-description { margin-top: 2mm; max-width: none; font-size: 10pt; }
  .therapy-hero-art, .therapy-library-controls { display: none; }
  .therapy-grid { display: block; }
  .therapy-library-toolbar { display: block; margin-top: 4mm; }
  .therapy-card { display: block; padding: 3mm; margin-bottom: 3mm; break-inside: avoid-page; }
  .therapy-card-heading { min-height: 0; }
  .therapy-card-heading h3 { font-size: 13pt; }
  .therapy-metrics { margin: 2mm 0; gap: 2mm; }
  .therapy-metrics-main div { padding: 1mm 2mm; }
  .therapy-metrics-main dd, .therapy-metrics-context dd { font-size: 12pt; }
  .therapy-metrics-context { padding-top: 2mm; }
}

.cap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cap-list li { display: grid; grid-template-columns: 110px 1fr 40px; align-items: center; gap: 10px; }
.cap-bar { width: 100%; height: 12px; display: block; }
.cap-bar .cap-track { fill: #eef2f7; }
.cap-bar rect { fill: #9fb3c8; }
.cap-bar .cap-primary_independent { fill: #1d8a78; }
.cap-bar .cap-primary_supervised { fill: #3f8fc9; }
.cap-bar .cap-assistant { fill: #c58b2b; }
.cap-bar .cap-observer { fill: #a6b4c2; }
.cap-list strong { text-align: right; }

/* 项目核心目标对标进度条与课次复盘横幅 */
.project-targets { margin: 0 0 18px; }
.target-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; padding: 0 18px 18px; }
.target-card { display: grid; gap: 6px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; transition: border-color .15s, box-shadow .15s; }
.target-card:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(23, 42, 61, .08); }
.target-card.is-complete { border-color: #b9e1d6; background: linear-gradient(180deg, #f3fbf8 0%, #fff 60%); }
.target-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.target-card-label { font-size: 13px; font-weight: 700; color: var(--ink); }
.target-card-pct { font-size: 12px; font-weight: 750; color: var(--brand); background: var(--brand-soft); padding: 1px 8px; border-radius: 999px; }
.target-card-val { font-size: 24px; line-height: 1.1; color: var(--ink); }
.target-card-val small { font-size: 13px; font-weight: 500; color: var(--muted); }
.target-bar { width: 100%; height: 8px; display: block; margin-top: 2px; }
.target-bar-track { fill: #eef2f7; }
.target-bar-fill { fill: #1d8a78; }

.session-review-box { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: #f4f2ff; border-left: 3px solid #5243aa; font-size: 13px; }
.session-review-box strong { display: block; font-size: 12px; color: #403294; margin-bottom: 2px; }
.session-review-box p { margin: 0; color: var(--ink); }

/* 课程库标签与关联术式目录模块 */
.course-meta-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.course-tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }
.course-tag.tone-or { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.course-tag.tone-cath { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.course-tag.tone-room { background: #f8fafc; color: #475569; border-color: #cbd5e1; }

.course-proc-box { margin-top: 4px; padding: 8px 10px; border-radius: 8px; background: #f8fafc; border: 1px solid #e5ebf1; display: grid; gap: 6px; }
.course-proc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.course-proc-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.course-proc-chip { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #fff; border: 1px solid #dbe4ee; font-size: 11.5px; color: var(--ink); line-height: 1.4; }
.course-proc-chip.is-star { border-color: #e6be60; background: #fffdf2; color: #8c5600; font-weight: 650; }
.course-proc-more { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 6px; background: #e8eef5; color: #334155; font-size: 11.5px; font-weight: 700; }

@media (max-width: 768px) {
  .need-grid { grid-template-columns: 1fr; }
  .target-grid { padding: 0 12px 12px; }
}

/* ComfyUI 风格培训拓扑连线图面板 */
.flow-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 0 18px 14px; }
.flow-toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.flow-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.flow-legend-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid #d5dfe9; background: #fff; color: var(--ink); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.flow-legend-btn:hover { border-color: var(--legend-color, var(--brand)); }
.flow-legend-btn.is-active { background: #1e293b; color: #fff; border-color: #1e293b; }
.flow-legend-btn small { opacity: .75; font-weight: 500; }
.flow-legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.flow-hint { font-size: 12px; color: var(--muted); }

.flow-canvas {
  position: relative;
  margin: 0 18px 18px;
  padding: 20px 24px 24px;
  border-radius: 12px;
  border: 1px solid #dce4ee;
  background-color: #f6f8fb;
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 18px 18px;
  overflow-x: auto;
}
.flow-svg { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.flow-edge { fill: none; stroke-width: 2.4; stroke-linecap: round; opacity: .78; transition: opacity .16s, stroke-width .16s; }
.flow-edge.is-highlighted { opacity: 1; stroke-width: 3.6; filter: drop-shadow(0 2px 4px rgba(15, 23, 42, .16)); }
.flow-edge.is-dimmed { opacity: .14; }

.flow-cols { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(200px, 1fr) minmax(260px, 1.35fr) minmax(210px, 1fr); gap: 64px; min-width: 760px; align-items: start; }
.flow-col { display: grid; gap: 14px; }
.flow-col-title { font-size: 12px; font-weight: 750; letter-spacing: .04em; color: #475569; text-transform: uppercase; padding-left: 4px; }

.flow-node {
  position: relative;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  border: 1.5px solid #d7e1ec;
  border-top: 3px solid var(--node-color, #475569);
  box-shadow: 0 3px 10px rgba(15, 23, 42, .05);
  transition: transform .15s, box-shadow .15s, opacity .15s, border-color .15s;
  cursor: default;
}
.flow-node.is-instructor { --node-color: #0f172a; }
.flow-node.is-learner { --node-color: #0d9488; }
.flow-node:hover, .flow-node.is-focused { transform: translateY(-1px); border-color: var(--node-color, var(--brand)); box-shadow: 0 8px 20px rgba(15, 23, 42, .12); }
.flow-node.is-dimmed { opacity: .24; }

.flow-node-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 5px; }
.flow-node-kicker { font-size: 11px; font-weight: 700; color: #64748b; }
.flow-node-badge { font-size: 11px; font-weight: 650; color: #334155; background: #f1f5f9; padding: 1px 7px; border-radius: 999px; }
.flow-time-pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid; }
.flow-node-title { display: block; font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.flow-node-meta { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.4; }

.flow-port {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--node-color, #475569);
  transform: translateY(-50%);
  box-shadow: 0 0 0 2px #f6f8fb;
}
.flow-port.is-in { left: -7px; }
.flow-port.is-out { right: -7px; }
.flow-empty-col { padding: 14px; border-radius: 10px; border: 1px dashed #cbd5e1; color: var(--muted); font-size: 12.5px; text-align: center; }

/* 逐级下放 Excel 式课程表 */
.schedule-cascade-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.schedule-cascade-left { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.schedule-cascade-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.schedule-person-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; border: 1px solid #d5dfe9; background: #fff; color: var(--ink); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .14s; }
.schedule-person-chip:hover { border-color: var(--brand); }
.schedule-person-chip.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.schedule-person-chip small { opacity: .78; font-weight: 500; font-size: 11px; }
.schedule-cascade-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.schedule-mode-switch { display: inline-flex; gap: 4px; }
.schedule-mode-switch .is-active { background: #1e293b; color: #fff; border-color: #1e293b; }

.excel-schedule-wrap { padding: 0 18px 18px; }
.excel-schedule-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border: 1px solid var(--line); }
.excel-schedule-table th { background: #f1f5f9; color: #334155; font-weight: 700; font-size: 12px; padding: 9px 10px; border: 1px solid #dbe4ee; text-align: left; white-space: nowrap; }
.excel-schedule-table td { padding: 9px 10px; border: 1px solid #e2e8f0; vertical-align: middle; }
.excel-row:hover td { background: #f8fbff; }
.excel-row.is-expanded td { background: #f4f8fd; }
.excel-date { white-space: nowrap; font-weight: 650; color: var(--ink); }
.excel-time { white-space: nowrap; }
.excel-time small { display: block; color: var(--muted); font-size: 11.5px; }
.excel-course-name { font-weight: 700; color: var(--ink); }
.excel-sub { color: var(--muted); font-size: 11.5px; }
.excel-warn { color: #b45309; font-weight: 600; font-size: 12px; }
.excel-actions { white-space: nowrap; }
.excel-actions > * + * { margin-left: 5px; }
.excel-detail-row > td { padding: 12px; background: #f8fafc; }

/* 程序式办事审批流程图（通过 / 否 一目了然） */
.wf-stack { display: grid; gap: 14px; padding: 0 18px 18px; }
.wf-card { border: 1px solid #dbe4ee; border-radius: 12px; background: #f8fafc; padding: 14px 16px; display: grid; gap: 12px; }
.wf-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.wf-card-head strong { font-size: 14.5px; color: var(--ink); }
.wf-date-span { margin-left: 10px; font-size: 12px; color: var(--muted); font-weight: 600; }

.wf-track { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.wf-node { flex: 1 1 165px; min-width: 155px; background: #fff; border: 1.5px solid #cbd5e1; border-radius: 10px; padding: 10px 11px; display: grid; gap: 5px; align-content: start; }
.wf-node.is-yes { border-color: #10b981; background: #f0fdf4; }
.wf-node.is-no { border-color: #ef4444; background: #fef2f2; }
.wf-node.is-wait { border-color: #f59e0b; background: #fffbeb; }
.wf-node-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.wf-step-num { font-size: 12px; font-weight: 800; color: #475569; }
.wf-judge { font-size: 11px; font-weight: 750; padding: 2px 8px; border-radius: 999px; }
.wf-judge.is-yes { background: #dcfce7; color: #166534; }
.wf-judge.is-no { background: #fee2e2; color: #991b1b; }
.wf-judge.is-wait { background: #fef3c7; color: #92400e; }
.wf-node-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.wf-owner { font-size: 11.5px; color: var(--muted); }
.wf-detail { font-size: 11.5px; color: #334155; margin-top: 2px; }
.wf-arrow { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: 11px; font-weight: 700; color: #64748b; padding: 0 2px; }
.wf-arrow.is-pass { color: #059669; }
.wf-branches { display: grid; gap: 4px; margin-top: 2px; }
.wf-branch { display: flex; justify-content: space-between; align-items: center; font-size: 11px; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.78); border: 1px solid #e2e8f0; }
.wf-branch.is-yes strong { color: #15803d; }
.wf-branch.is-no strong { color: #b91c1c; }
.wf-branch.is-wait strong { color: #b45309; }

/* 项目协同交流区 Comments 与历史项目折叠菜单 */
.fold-summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; font-weight: 700; font-size: 14.5px; color: var(--ink); cursor: pointer; list-style: none; }
.fold-summary::-webkit-details-marker { display: none; }
.comments-inner { padding: 0 18px 18px; display: grid; gap: 12px; }
.comment-form-row { display: flex; flex-wrap: wrap; gap: 8px; }
.comment-form-row select { max-width: 240px; }
.comment-form-row input { flex: 1 1 260px; }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.comment-item { padding: 10px 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #e2e8f0; }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 12.5px; }
.comment-time { margin-left: auto; color: var(--muted); font-size: 11.5px; }
.comment-body { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.5; }
.history-fold-body { padding: 0 18px 18px; display: grid; gap: 12px; }

/* A4 Paperwork 标准打印单据样式 */
.paperwork-sheet { padding: 14px 20px 22px; display: grid; gap: 14px; color: #152536; }
.paperwork-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 14px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 6px; background: #f8fafc; font-size: 13px; }
.paperwork-meta span { color: #475569; }
.paperwork-sessions { font-size: 12.5px; }
.paperwork-sessions ul { margin: 4px 0 0 18px; padding: 0; display: grid; gap: 2px; }
.paperwork-h3 { margin: 4px 0 0; font-size: 14px; font-weight: 700; color: #0f172a; }
.paperwork-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.paperwork-table th, .paperwork-table td { border: 1px solid #94a3b8; padding: 7px 8px; text-align: left; }
.paperwork-table th { background: #f1f5f9; font-weight: 700; }
.paperwork-table .sign-cell { height: 30px; }
.paperwork-sign-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-top: 18px; font-size: 12.5px; }
.paperwork-sign-box > div { display: flex; align-items: flex-end; gap: 6px; }
.sign-line { flex: 1; border-bottom: 1px solid #334155; height: 20px; }

/* 扁平化程序审批流程图（角色泳道 + 菱形审核节点 + 时间戳） */
.flat-wf-card { border: 1px solid #dce5f0; border-radius: 10px; background: #fafbfd; padding: 14px 16px; display: grid; gap: 12px; }
.flat-wf-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.flat-wf-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.flat-wf-title-row strong { font-size: 14px; color: var(--ink); }
.flat-wf-pct { font-size: 11.5px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 2px 9px; border-radius: 999px; }

.flat-wf-diagram { display: flex; align-items: flex-start; gap: 4px; overflow-x: auto; padding: 6px 4px 2px; }
.flat-wf-col { flex: 1 1 118px; min-width: 112px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.flat-wf-role {
  width: 100%; max-width: 138px; padding: 6px 8px; border-radius: 4px;
  background: #dbe6f6; border: 1px solid #9db6da; color: #1e293b;
  font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.flat-wf-vline { position: relative; width: 2px; height: 18px; background: #64748b; }
.flat-wf-vline::after { content: ''; position: absolute; left: -3px; bottom: -1px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid #64748b; }

.flat-wf-diamond-wrap { height: 58px; display: flex; align-items: center; justify-content: center; margin: 2px 0; }
.flat-wf-box { padding: 7px 14px; border-radius: 5px; font-size: 12px; font-weight: 700; border: 1.5px solid #94a3b8; background: #e2e8f0; color: #1e293b; }
.flat-wf-box.is-yes { background: #dcfce7; border-color: #16a34a; color: #166534; }
.flat-wf-diamond {
  width: 44px; height: 44px; transform: rotate(45deg);
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #b45309; background: #fef3c7; border-radius: 4px;
}
.flat-wf-diamond span { transform: rotate(-45deg); font-size: 10.5px; font-weight: 750; color: #78350f; white-space: nowrap; }
.flat-wf-diamond.is-yes { background: #dcfce7; border-color: #16a34a; }
.flat-wf-diamond.is-yes span { color: #166534; }
.flat-wf-diamond.is-doing { background: #dbeafe; border-color: #2563eb; }
.flat-wf-diamond.is-doing span { color: #1e40af; }
.flat-wf-diamond.is-wait { background: #fee2e2; border-color: #dc2626; }
.flat-wf-diamond.is-wait span { color: #991b1b; }

.flat-wf-harrow { display: flex; align-items: center; justify-content: center; padding-top: 66px; font-size: 16px; font-weight: 700; color: #94a3b8; flex: 0 0 18px; }
.flat-wf-harrow.is-pass { color: #16a34a; }
.flat-wf-meta { margin-top: 4px; font-size: 11px; color: #475569; font-variant-numeric: tabular-nums; }
.flat-wf-meta.is-yes { color: #15803d; font-weight: 600; }

/* 生产双通道认证登录与邮件安全审计样式 */
.sign-in {
  width: min(100%, 468px);
}
.sign-in-card {
  width: 100%;
  overflow: hidden;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 16px 24px 0;
}
.auth-tab {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.auth-tab:hover {
  border-color: #c7d2fe;
  color: var(--ink);
}
.auth-tab.is-active {
  background: #eef2ff;
  border-color: #1736b5;
  color: #101053;
}
.sign-in h1 {
  padding: 18px 24px 0;
}
.sign-in form[hidden] {
  display: none;
}
.code-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.code-input-row .button {
  white-space: nowrap;
  min-width: 112px;
}
.auth-tip {
  margin: 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 12.5px;
  line-height: 1.5;
}
.auth-footnote {
  margin: 0;
  padding: 0 24px 20px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

.badge.danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.badge.warn {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.audit-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 14px;
}
.audit-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
  display: grid;
  gap: 10px;
}
.audit-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.audit-card-head strong {
  font-size: 13.5px;
  color: var(--ink);
}
.audit-table-wrap {
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.audit-table-wrap table {
  width: 100%;
  font-size: 12.5px;
}
.audit-table-wrap th,
.audit-table-wrap td {
  padding: 7px 10px;
  vertical-align: top;
}
.audit-sub {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  word-break: break-word;
}

.team-therapy-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}
.team-therapy-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid #dbe3f1;
  border-radius: 8px;
  background: #f8fafc;
}
.team-perm-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: #1e293b;
  cursor: pointer;
}
.team-perm-switches {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 飞书/钉钉风格多维授权表格、快速排查筛选与诊断弹窗 */
.perm-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafd;
}
.perm-filter-bar .field {
  min-width: 170px;
  flex: 1 1 170px;
  max-width: 240px;
  margin: 0;
}
.perm-filter-summary {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.member-cell-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.member-avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13.5px;
  color: #fff;
  background: linear-gradient(135deg, #21409a, #3b63d6);
}
.member-avatar.is-global {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}
.member-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.perm-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.perm-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
}
.perm-chip.is-global {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}
.perm-chip.is-loc {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.perm-chip.is-therapy {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}
.perm-chip.is-proj {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}
.perm-chip.is-custom {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #6b21a8;
}
.perm-chip.is-muted {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
  font-weight: 500;
}
.perm-mod-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.perm-mod {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.perm-mod.is-on {
  background: #dcfce7;
  color: #166534;
}
.perm-mod.is-warn {
  background: #fef3c7;
  color: #92400e;
}
.perm-mod.is-off {
  background: #f1f5f9;
  color: #64748b;
}
.perm-dialog {
  width: min(760px, calc(100vw - 24px));
  max-width: 760px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}
.perm-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
}
.perm-dialog-body {
  padding: 18px 22px 20px;
  display: grid;
  gap: 14px;
  max-height: 76vh;
  overflow-y: auto;
}
.perm-inspect-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8faff, #eff4ff);
  border: 1px solid #dbe4ff;
}
.perm-inspect-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  display: grid;
  gap: 10px;
  background: #fff;
}
.perm-inspect-section h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #162952;
}
.perm-inspect-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.perm-matrix-list {
  display: grid;
  gap: 6px;
}
.perm-matrix-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12.5px;
}
.perm-matrix-row strong {
  color: #0f172a;
}
.perm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 22px 16px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}
.custom-scope-panel {
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8faff;
  display: grid;
  gap: 12px;
}
.custom-scope-panel.is-hidden {
  display: none;
}

/* CSP 无内联样式替身类 */
.need-banner-gap { margin-bottom: 14px; }
.pw-w36 { width: 36px; }
.pw-w110 { width: 110px; }
.pw-w90 { width: 90px; }
.flow-c0 { --node-color: #1736b5; --legend-color: #1736b5; --pill-bg: #1736b518; --pill-bd: #1736b544; }
.flow-c1 { --node-color: #059669; --legend-color: #059669; --pill-bg: #05966918; --pill-bd: #05966944; }
.flow-c2 { --node-color: #d97706; --legend-color: #d97706; --pill-bg: #d9770618; --pill-bd: #d9770644; }
.flow-c3 { --node-color: #7c3aed; --legend-color: #7c3aed; --pill-bg: #7c3aed18; --pill-bd: #7c3aed44; }
.flow-c4 { --node-color: #db2777; --legend-color: #db2777; --pill-bg: #db277718; --pill-bd: #db277744; }
.flow-c5 { --node-color: #0891b2; --legend-color: #0891b2; --pill-bg: #0891b218; --pill-bd: #0891b244; }
.flow-c6 { --node-color: #dc2626; --legend-color: #dc2626; --pill-bg: #dc262618; --pill-bd: #dc262644; }
.flow-c7 { --node-color: #4f46e5; --legend-color: #4f46e5; --pill-bg: #4f46e518; --pill-bd: #4f46e544; }
.flow-time-pill[class*="flow-c"] { background: var(--pill-bg); color: var(--node-color); border-color: var(--pill-bd); }
.flow-legend-dot[class*="flow-c"] { background: var(--legend-color); }
