:root {
  color-scheme: light;
  --ink: #18211c;
  --ink-soft: #556159;
  --paper: #f4f6f1;
  --surface: #ffffff;
  --surface-soft: #edf1eb;
  --line: #dce3db;
  --line-strong: #c8d2c8;
  --brand: #176448;
  --brand-strong: #104c37;
  --brand-soft: #ddefe5;
  --amber: #a65f16;
  --amber-soft: #fff0d9;
  --red: #a83c38;
  --red-soft: #fbe7e5;
  --blue: #345f86;
  --blue-soft: #e5eef7;
  --violet: #67538b;
  --violet-soft: #eee9f8;
  --shadow-sm: 0 1px 2px rgb(24 33 28 / 5%), 0 4px 12px rgb(24 33 28 / 4%);
  --shadow-lg: 0 22px 48px rgb(24 33 28 / 14%);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --sidebar: 248px;
  font-family: "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-height: 100dvh; color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a, select { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; }
.skip-link { position: fixed; left: 12px; top: -64px; z-index: 1000; background: var(--ink); color: white; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid rgb(23 100 72 / 30%); outline-offset: 3px; }

.app-shell { min-height: 100dvh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; padding: 24px 18px; background: #e9eee7; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 0 8px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: white; background: var(--ink); box-shadow: var(--shadow-sm); }
.brand-mark svg { width: 23px; height: 23px; }
.brand-name { font-size: 17px; font-weight: 720; letter-spacing: .02em; }
.brand-sub { font-size: 11px; color: var(--ink-soft); letter-spacing: .08em; text-transform: uppercase; }
.nav { display: grid; gap: 5px; }
.nav-button { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 12px; color: var(--ink-soft); background: transparent; text-align: left; transition: background .18s ease, color .18s ease; }
.nav-button:hover { background: rgb(255 255 255 / 65%); color: var(--ink); }
.nav-button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 650; }
.nav-button svg { width: 19px; height: 19px; flex: 0 0 auto; }
.sidebar-foot { margin-top: auto; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgb(255 255 255 / 55%); }
.sidebar-foot strong { display: block; font-size: 13px; }
.sidebar-foot p { margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; }

.workspace { min-width: 0; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 clamp(20px, 4vw, 52px); border-bottom: 1px solid var(--line); background: rgb(244 246 241 / 88%); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 13px; }
.breadcrumb strong { color: var(--ink); font-weight: 650; }
.role-switch { display: flex; align-items: center; gap: 10px; }
.role-select { min-height: 42px; padding: 0 34px 0 13px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--ink); background: var(--surface); }
.actor-input { width: 126px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: white; font-size: 13px; font-weight: 700; }

.main { width: min(1440px, 100%); margin: 0 auto; padding: 38px clamp(20px, 4vw, 52px) 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.page-title { margin: 7px 0 7px; font-family: "Songti SC", "STSong", serif; font-size: clamp(30px, 4vw, 46px); line-height: 1.12; font-weight: 700; letter-spacing: -.03em; }
.page-copy { margin: 0; max-width: 650px; color: var(--ink-soft); font-size: 15px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.button { min-height: 44px; padding: 0 17px; border: 1px solid transparent; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.button:active { transform: scale(.98); }
.button-primary { color: white; background: var(--brand); }
.button-primary:hover { background: var(--brand-strong); }
.button-secondary { color: var(--ink); border-color: var(--line-strong); background: var(--surface); }
.button-secondary:hover { background: var(--surface-soft); }
.button-danger { color: var(--red); border-color: #e9b8b4; background: var(--red-soft); }
.button svg { width: 18px; height: 18px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
.metric { min-height: 126px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-label { color: var(--ink-soft); font-size: 13px; }
.metric-icon { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 10px; color: var(--brand); background: var(--brand-soft); }
.metric-icon svg { width: 17px; height: 17px; }
.metric-value { margin-top: 14px; font-size: 31px; line-height: 1; font-weight: 730; font-variant-numeric: tabular-nums; }
.metric-note { margin-top: 8px; color: var(--ink-soft); font-size: 12px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, .8fr); gap: 18px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { min-height: 74px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.panel-title { margin: 0; font-size: 17px; font-weight: 700; }
.panel-subtitle { margin-top: 3px; color: var(--ink-soft); font-size: 12px; }
.segmented { display: flex; padding: 3px; border-radius: 10px; background: var(--surface-soft); }
.segment { min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; color: var(--ink-soft); background: transparent; font-size: 12px; }
.segment.active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 4px rgb(24 33 28 / 10%); font-weight: 650; }
.task-list { display: grid; }
.task-row { min-width: 0; width: 100%; padding: 17px 22px; border: 0; border-bottom: 1px solid var(--line); background: transparent; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(110px, .6fr) minmax(120px, .65fr) auto; gap: 16px; align-items: center; text-align: left; transition: background .18s ease; }
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: #fafbf9; }
.task-code { color: var(--ink-soft); font-size: 11px; letter-spacing: .04em; }
.task-name { margin-top: 4px; font-weight: 680; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { margin-top: 4px; color: var(--ink-soft); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-label { display: block; color: var(--ink-soft); font-size: 11px; margin-bottom: 4px; }
.cell-value { font-size: 13px; font-weight: 590; }
.status { width: fit-content; display: inline-flex; align-items: center; gap: 6px; min-height: 27px; padding: 0 9px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 680; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.warning { color: var(--amber); background: var(--amber-soft); }
.status.danger { color: var(--red); background: var(--red-soft); }
.status.success { color: var(--brand); background: var(--brand-soft); }
.arrow { color: #8d9890; }
.arrow svg { width: 18px; height: 18px; }

.side-stack { display: grid; gap: 18px; }
.next-action { padding: 22px; background: var(--ink); color: white; }
.next-action .panel-subtitle { color: #afbab3; }
.next-card { margin-top: 21px; padding: 17px; border: 1px solid rgb(255 255 255 / 15%); border-radius: var(--radius-md); background: rgb(255 255 255 / 6%); }
.next-card strong { display: block; margin-bottom: 6px; font-size: 15px; }
.next-card p { margin: 0; color: #c6cec9; font-size: 12px; }
.next-action .button { width: 100%; margin-top: 17px; color: var(--ink); background: #eef6f0; }
.timeline { padding: 20px 22px 22px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 20px 1fr; gap: 12px; padding-bottom: 19px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 19px; height: 19px; border: 5px solid var(--surface); border-radius: 50%; background: var(--line-strong); box-shadow: 0 0 0 1px var(--line); z-index: 1; }
.timeline-item.done .timeline-dot { background: var(--brand); }
.timeline-item.current .timeline-dot { background: var(--amber); }
.timeline-item strong { display: block; font-size: 13px; }
.timeline-item span { color: var(--ink-soft); font-size: 11px; }

.empty { padding: 54px 24px; text-align: center; color: var(--ink-soft); }
.empty-icon { width: 48px; height: 48px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--brand); border-radius: 15px; background: var(--brand-soft); }
.empty-icon svg { width: 24px; height: 24px; }
.empty strong { display: block; color: var(--ink); margin-bottom: 5px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; background: rgb(16 24 19 / 42%); backdrop-filter: blur(3px); animation: fade .18s ease; }
.drawer { width: min(580px, 100%); height: 100%; background: var(--surface); box-shadow: var(--shadow-lg); overflow-y: auto; animation: slide .22s ease-out; }
.drawer-head { position: sticky; top: 0; z-index: 2; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 94%); backdrop-filter: blur(14px); }
.icon-button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; background: var(--surface); }
.icon-button svg { width: 19px; height: 19px; }
.drawer-body { padding: 26px 24px 42px; }
.detail-hero { padding: 23px; border-radius: var(--radius-lg); background: var(--surface-soft); }
.detail-hero h2 { margin: 7px 0 8px; font-family: "Songti SC", serif; font-size: 28px; line-height: 1.18; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--line); }
.detail-cell { padding: 16px; background: var(--surface); min-width: 0; }
.detail-cell.wide { grid-column: 1 / -1; }
.detail-cell span { display: block; color: var(--ink-soft); font-size: 11px; margin-bottom: 4px; }
.detail-cell strong, .detail-cell a { display: block; word-break: break-word; font-size: 13px; font-weight: 620; }
.detail-cell a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.action-card { margin-top: 20px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.action-card h3 { margin: 0 0 4px; font-size: 16px; }
.action-card > p { margin: 0 0 18px; color: var(--ink-soft); font-size: 12px; }
.form-grid { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 12px; font-weight: 650; }
.field small { color: var(--ink-soft); font-size: 11px; }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); color: var(--ink); }
.textarea { min-height: 112px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); outline: 3px solid rgb(23 100 72 / 12%); }
.radio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.radio-card { position: relative; min-height: 72px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card strong { display: block; }
.radio-card span { color: var(--ink-soft); font-size: 11px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.file-section { padding: 0; overflow: hidden; }
.file-head { padding: 20px 21px 14px; border-bottom: 1px solid var(--line); }
.file-head h3 { margin: 0; font-size: 16px; }
.file-head p { margin: 3px 0 0; color: var(--ink-soft); font-size: 12px; }
.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px 20px 20px; }
.media-card { min-width: 0; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--surface); }
.media-preview { position: relative; width: 100%; height: 132px; padding: 0; border: 0; display: grid; place-items: center; overflow: hidden; color: var(--brand); background: var(--surface-soft); }
.media-preview img, .media-preview video { width: 100%; height: 100%; object-fit: cover; }
.file-kind { min-width: 64px; padding: 9px 12px; border-radius: 10px; background: var(--brand-soft); font-size: 13px; font-weight: 750; }
.play-mark { position: absolute; width: 42px; height: 42px; display: grid; place-items: center; padding-left: 3px; border-radius: 50%; background: rgb(0 0 0 / 65%); color: white; box-shadow: 0 4px 18px rgb(0 0 0 / 22%); }
.media-info { display: grid; gap: 3px; padding: 12px; }
.media-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.media-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); font-size: 10px; }
.file-download { width: fit-content; margin-top: 4px; color: var(--brand); font-size: 11px; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.upload-box { margin: 0 20px 20px; padding: 16px; border: 1px dashed var(--line-strong); border-radius: 13px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; background: #fafbf9; }
.upload-copy { display: grid; }
.upload-copy strong { font-size: 13px; }
.upload-copy span, .selected-files { color: var(--ink-soft); font-size: 11px; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.selected-files { grid-column: 1 / -1; }
.upload-meta { grid-column: 1 / -1; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.upload-box > .button-primary { grid-column: 1 / -1; }
.upload-progress { grid-column: 1 / -1; height: 5px; border-radius: 999px; overflow: hidden; background: var(--line); }
.upload-progress span { display: block; width: 0; height: 100%; background: var(--brand); transition: width .2s ease; }
.viewer-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: rgb(10 15 12 / 82%); backdrop-filter: blur(7px); }
.viewer { width: min(1180px, 100%); height: min(820px, calc(100dvh - 48px)); display: grid; grid-template-rows: auto minmax(0, 1fr); border-radius: 18px; overflow: hidden; background: #111815; box-shadow: 0 30px 80px rgb(0 0 0 / 42%); }
.viewer header { min-height: 72px; padding: 12px 16px 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); }
.viewer header > div { min-width: 0; display: flex; align-items: center; gap: 10px; }
.viewer header > div:first-child { display: grid; }
.viewer header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer header span { color: var(--ink-soft); font-size: 11px; }
.viewer-body { min-height: 0; display: grid; place-items: center; overflow: auto; }
.viewer-body > img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-body > video { width: 100%; max-height: 100%; }
.viewer-body > iframe { width: 100%; height: 100%; border: 0; background: white; }
.audio-viewer, .unpreviewable { width: min(520px, calc(100% - 32px)); padding: 30px; border-radius: 18px; text-align: center; background: var(--surface); color: var(--ink); }
.audio-viewer audio { width: 100%; margin-top: 22px; }
.unpreviewable p { color: var(--ink-soft); }

.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 10px; }
.toast { width: min(360px, calc(100vw - 36px)); padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--ink); color: white; box-shadow: var(--shadow-lg); animation: toast-in .2s ease-out; }
.toast.error { background: #6e2926; }
.loading { min-height: 100dvh; display: grid; place-items: center; color: var(--ink-soft); }
.spinner { width: 25px; height: 25px; margin: 0 auto 12px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(28px); opacity: .8; } }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

@media (max-width: 1040px) {
  :root { --sidebar: 84px; }
  .brand-copy, .nav-button span, .sidebar-foot { display: none; }
  .brand { justify-content: center; padding: 0; }
  .nav-button { justify-content: center; padding: 0; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .side-stack { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .app-shell { display: block; padding-bottom: 74px; }
  .sidebar { position: fixed; inset: auto 0 0; z-index: 60; width: 100%; height: 70px; padding: 8px max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); border: 0; border-top: 1px solid var(--line); display: block; }
  .brand, .sidebar-foot { display: none; }
  .nav { grid-template-columns: repeat(4, 1fr); gap: 3px; }
  .nav-button { min-height: 52px; flex-direction: column; gap: 2px; border-radius: 10px; font-size: 10px; }
  .nav-button span { display: block; }
  .nav-button svg { width: 18px; height: 18px; }
  .topbar { height: auto; min-height: 68px; padding: 10px 16px; }
  .breadcrumb { display: none; }
  .role-switch { width: 100%; }
  .role-select { flex: 1; }
  .actor-input { flex: 1; min-width: 90px; }
  .main { padding: 27px 16px 40px; }
  .page-head { display: block; margin-bottom: 23px; }
  .page-title { font-size: 31px; }
  .head-actions { margin-top: 16px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric { min-height: 108px; padding: 16px; }
  .metric-value { font-size: 26px; }
  .task-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 16px; }
  .task-row > :nth-child(2), .task-row > :nth-child(3) { display: none; }
  .panel-head { padding: 16px; display: block; }
  .segmented { margin-top: 12px; overflow-x: auto; }
  .side-stack { grid-template-columns: 1fr; }
  .drawer { width: 100%; }
  .drawer-body { padding: 20px 16px 34px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-cell.wide { grid-column: auto; }
  .radio-grid { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: 1fr; padding: 14px; }
  .upload-box { margin: 0 14px 14px; grid-template-columns: 1fr; }
  .upload-meta { grid-template-columns: 1fr; }
  .viewer-backdrop { padding: 0; }
  .viewer { width: 100%; height: 100dvh; border-radius: 0; }
  .viewer header { min-height: 64px; padding: 10px 12px; }
  .viewer header .button { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* v2 workflow interface */
.login-page { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(380px, .8fr); align-items: stretch; background: var(--surface); }
.login-brand { padding: clamp(40px, 8vw, 120px); display: flex; flex-direction: column; justify-content: center; color: white; background: var(--ink); }
.login-brand .brand-mark { background: var(--brand); margin-bottom: 34px; }
.login-brand .eyebrow { color: #94c8b4; }
.login-brand h1 { max-width: 700px; margin: 10px 0 22px; font-family: "Songti SC", "STSong", serif; font-size: clamp(40px, 5.5vw, 76px); line-height: 1.08; letter-spacing: -.045em; }
.login-brand > p:not(.eyebrow) { max-width: 640px; color: #c6d0ca; font-size: 17px; }
.login-flow { margin-top: 58px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: #dce6df; font-size: 12px; }
.login-flow i { width: 34px; height: 1px; background: #527064; }
.login-card { width: min(430px, calc(100vw - 32px)); margin: auto; padding: 42px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-lg); }
.login-card h2 { margin: 7px 0 5px; font-family: "Songti SC", serif; font-size: 32px; }
.login-card > p:not(.eyebrow) { margin: 0 0 28px; color: var(--ink-soft); }
.login-card .button { width: 100%; margin-top: 20px; }
.top-actions, .identity { display: flex; align-items: center; gap: 10px; }
.identity > span:last-child { display: grid; }
.identity small { color: var(--ink-soft); font-size: 10px; }
.top-bell { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; color: var(--ink-soft); background: transparent; }
.top-bell svg { width: 20px; }
.top-bell b { position: absolute; right: 3px; top: 2px; min-width: 17px; height: 17px; padding: 0 4px; border: 2px solid var(--paper); border-radius: 999px; color: white; background: var(--red); font-size: 9px; line-height: 13px; }
.compact { min-height: 36px; padding: 0 12px; font-size: 12px; }
.notice-list { display: grid; }
.notice-item { position: relative; width: 100%; padding: 16px 20px; border: 0; border-bottom: 1px solid var(--line); display: grid; gap: 3px; text-align: left; background: transparent; }
.notice-item:last-child { border-bottom: 0; }
.notice-item:hover { background: var(--surface-soft); }
.notice-item strong { font-size: 13px; }
.notice-item span { color: var(--ink-soft); font-size: 12px; }
.notice-item time { margin-top: 3px; color: #849087; font-size: 10px; }
.notice-item.read { opacity: .62; }
.notice-list.full .notice-item { padding: 20px 24px 20px 42px; }
.unread-dot { position: absolute; left: 22px; top: 27px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.notice-item.read .unread-dot { background: var(--line-strong); }
.drawer.wide { width: min(920px, 100%); }
.project-hero { padding: 28px; border-radius: var(--radius-lg); display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; background: var(--ink); color: white; }
.project-hero h2 { margin: 6px 0 8px; font-family: "Songti SC", serif; font-size: 32px; line-height: 1.18; }
.project-hero p { margin: 0; color: #b8c3bc; }
.project-hero .task-code { color: #93a098; }
.assignment-card { margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.member-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--line); }
.member-grid > div { min-width: 0; padding: 14px; display: grid; background: var(--surface-soft); }
.member-grid small { color: var(--ink-soft); font-size: 10px; }
.member-grid strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.inline-form { margin-top: 16px; display: grid; grid-template-columns: minmax(150px, 1fr) minmax(160px, 1fr) auto; gap: 10px; align-items: end; }
.inline-form > label { grid-column: 1 / -1; font-size: 12px; font-weight: 650; }
.candidate-list { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.candidate-list > div { padding: 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.candidate-list > div:last-child { border-bottom: 0; }
.candidate-list > div > span:first-child { min-width: 0; flex: 1; display: grid; }
.candidate-list small { overflow: hidden; color: var(--ink-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hint { margin: 12px 0 0; color: var(--ink-soft); font-size: 12px; }
.success-copy { color: var(--brand); }
.detail-tabs { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(0, 1.4fr); gap: 18px; margin-top: 20px; align-items: start; }
.project-brief, .stage-stack { min-width: 0; }
.project-brief { position: sticky; top: 94px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.project-brief h3, .stage-stack > h3 { margin: 0 0 14px; font-size: 16px; }
.info-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row > span { color: var(--ink-soft); font-size: 10px; }
.info-row p { margin: 4px 0 0; white-space: pre-wrap; font-size: 12px; }
.stage-stack { display: grid; gap: 12px; }
.stage-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.stage-card.current { border-color: #9cbba9; box-shadow: 0 0 0 2px rgb(23 100 72 / 8%); }
.stage-card.muted { background: #f8f9f7; opacity: .72; }
.stage-card > header { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.stage-number { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--brand); background: var(--brand-soft); font-size: 10px; font-weight: 750; }
.stage-card header > span:nth-child(2) { min-width: 0; display: grid; }
.stage-card header small { color: var(--ink-soft); font-size: 10px; }
.stage-meta { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; color: var(--ink-soft); font-size: 10px; }
.stage-meta span { padding: 4px 7px; border-radius: 7px; background: var(--surface-soft); }
.submission-block { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--surface-soft); }
.submission-block p { margin: 4px 0 0; white-space: pre-wrap; font-size: 12px; }
.submission-block details { margin-top: 10px; font-size: 11px; }
.submission-block pre { max-height: 220px; overflow: auto; white-space: pre-wrap; font-family: inherit; }
.review-list { margin-top: 12px; display: grid; gap: 8px; }
.review-list article { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.review-list article .status { float: right; }
.review-list article strong, .review-list article small { display: block; font-size: 11px; }
.review-list article small { color: var(--ink-soft); }
.comment-thread { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.comment-thread h4 { margin: 0 0 8px; font-size: 12px; }
.comment-thread .inline-form { margin-top: 10px; grid-template-columns: minmax(110px, .45fr) minmax(180px, 1fr) auto; }
.comment-thread time { display: block; margin-top: 5px; color: var(--ink-soft); font-size: 10px; }
.compact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px 0 0; }
.compact-grid .media-preview { height: 90px; }
.stage-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.compact-area { min-height: 80px; }
.two-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-section { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.form-section h3 { margin: 0 0 16px; }
.form-section > .field + .field, .form-section > .two-fields + .field, .form-section > .field + .two-fields { margin-top: 14px; }
.textarea.tall { min-height: 180px; }
.deadline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.check-line { min-height: 44px; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sticky-submit { position: sticky; bottom: 12px; box-shadow: 0 8px 24px rgb(16 76 55 / 28%); }
.user-table { display: grid; }
.user-row { min-width: 0; padding: 14px 20px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 38px minmax(140px, 1fr) minmax(120px, 1fr) auto auto auto; gap: 12px; align-items: center; }
.user-row:last-child { border-bottom: 0; }
.user-main { min-width: 0; display: grid; }
.user-main small { color: var(--ink-soft); }
.tag-stack { display: flex; gap: 5px; flex-wrap: wrap; }
.tag-stack i { padding: 3px 7px; border-radius: 7px; color: var(--brand); background: var(--brand-soft); font-size: 10px; font-style: normal; }
.audit-panel { margin-top: 18px; }
.audit-list { max-height: 420px; overflow: auto; }
.audit-list > div { padding: 11px 20px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 115px 100px 1fr 1fr; gap: 10px; font-size: 11px; }
.audit-list time, .audit-list small { color: var(--ink-soft); }
.process-board { padding: 26px; }
.process-line { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.process-line article { position: relative; min-height: 190px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.process-line article > span { color: var(--brand); font-size: 12px; font-weight: 750; }
.process-line h2 { margin: 20px 0 7px; font-size: 18px; }
.process-line p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.process-line small { position: absolute; left: 22px; bottom: 18px; color: var(--brand); }
.workflow-note { margin-top: 18px; padding: 24px; border-radius: var(--radius-md); color: white; background: var(--ink); }
.workflow-note p { margin: 6px 0 0; color: #c5cec8; }
.settlement-button { width: 100%; margin-top: 20px; }

@media (max-width: 1100px) {
  .detail-tabs { grid-template-columns: 1fr; }
  .project-brief { position: static; }
  .process-line { grid-template-columns: repeat(2, 1fr); }
  .user-row { grid-template-columns: 38px minmax(130px, 1fr) auto auto; }
  .user-row .tag-stack { display: none; }
}
@media (max-width: 680px) {
  .comment-thread .inline-form { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .login-page { grid-template-columns: 1fr; background: var(--ink); }
  .login-brand { min-height: 42dvh; padding: 34px 24px; }
  .login-brand h1 { font-size: 38px; }
  .login-brand > p:not(.eyebrow), .login-flow { display: none; }
  .login-card { margin: -18px auto 24px; padding: 28px 22px; border-radius: 22px; }
  .top-actions .identity > span:last-child, .top-actions > .compact { display: none; }
  .member-grid { grid-template-columns: repeat(2, 1fr); }
  .project-hero { padding: 20px; display: grid; }
  .project-hero h2 { font-size: 27px; }
  .inline-form { grid-template-columns: 1fr; }
  .inline-form > label { grid-column: auto; }
  .compact-grid { grid-template-columns: 1fr 1fr; }
  .two-fields, .deadline-grid { grid-template-columns: 1fr; }
  .form-section { padding: 16px; }
  .process-line { grid-template-columns: 1fr; }
  .process-line article { min-height: 160px; }
  .user-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .user-row > .status { display: none; }
  .user-row .button:last-child { grid-column: 2 / -1; }
  .audit-list > div { grid-template-columns: 1fr 1fr; }
}
.view-as-banner { min-height: 42px; padding: 6px clamp(16px,4vw,52px); display: flex; align-items: center; justify-content: center; gap: 14px; color: white; background: #78511d; font-size: 12px; }
.view-as-banner .button { color: #5c3c12; background: white; }
.access-login { margin-top: 16px; color: var(--ink-soft); font-size: 12px; }
.access-login summary { cursor: pointer; }
.access-login .field { margin-top: 12px; }
.activation-card { margin-bottom: 18px; padding: 16px 18px; border: 1px solid #e1b56f; border-radius: 14px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fff8e8; }
.activation-card p { margin: 3px 0 0; color: var(--ink-soft); font-size: 12px; }
@media(max-width:720px){.activation-card{align-items:flex-start;flex-direction:column}.activation-card .button{width:100%}}
.feishu-login { width: 100%; margin-top: 10px !important; text-decoration: none; }
