:root { --text:#172033; --muted:#667085; --line:#e4e7ec; --surface:#fff; --bg:#f5f7fa; --blue:#1769d2; --blue-soft:#eaf2ff; --green:#18794e; --green-soft:#eaf7f0; --amber:#9a6700; --amber-soft:#fff6d8; --red:#b42318; --red-soft:#fff0ee; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); font-family:"Microsoft YaHei","Segoe UI",sans-serif; letter-spacing:0; }
button,input,select { font:inherit; letter-spacing:0; }
button,a { -webkit-tap-highlight-color:transparent; }
.hidden { display:none !important; }
.app-shell { min-height:100vh; }
header { min-height:72px; display:flex; align-items:center; justify-content:space-between; padding:0 28px; border-bottom:1px solid var(--line); background:#fff; }
.header-actions { display:flex; align-items:center; gap:8px; }
.home-link { white-space:nowrap; }
.brand { display:flex; align-items:center; gap:12px; min-width:0; }
.brand-mark { width:38px; height:38px; display:grid; place-items:center; flex:0 0 auto; border-radius:7px; background:var(--blue); color:#fff; font-size:17px; font-weight:700; }
.brand-mark.contract { background:#18794e; }
.brand h1 { margin:0; font-size:18px; }
.brand p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.icon-button { width:38px; height:38px; border:1px solid var(--line); border-radius:6px; background:#fff; color:#344054; font-size:22px; cursor:pointer; }
.module-nav { min-height:48px; display:flex; align-items:stretch; justify-content:center; gap:34px; padding:0 20px; border-bottom:1px solid var(--line); background:#fff; }
.module-nav:not(.access-ready) { visibility:hidden; }
.module-nav a { min-width:64px; display:grid; place-items:center; border-bottom:2px solid transparent; color:#475467; font-size:14px; font-weight:650; text-decoration:none; }
.module-nav a.business-module:not(.permitted) { display:none; }
.module-nav a:hover { color:var(--blue); }.module-nav a.active { border-bottom-color:var(--blue); color:var(--blue); }
main { max-width:1240px; margin:0 auto; padding:26px 24px 48px; }
.state { min-height:55vh; display:grid; place-items:center; align-content:center; gap:12px; text-align:center; }
.state h2 { margin:0; font-size:18px; }.state p { margin:0; color:var(--muted); font-size:13px; }
.spinner { width:30px; height:30px; border:3px solid #dce6f5; border-top-color:var(--blue); border-radius:50%; animation:spin .8s linear infinite; }
.error-mark { width:38px; height:38px; display:grid; place-items:center; border-radius:50%; background:var(--red-soft); color:var(--red); font-weight:700; }
@keyframes spin { to { transform:rotate(360deg); } }
.heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:18px; }
.heading h2 { margin:0; font-size:21px; }.heading p { margin:5px 0 0; color:var(--muted); font-size:12px; }
.primary,.secondary { min-height:40px; display:inline-flex; align-items:center; justify-content:center; padding:0 15px; border-radius:6px; font-size:13px; font-weight:650; text-decoration:none; cursor:pointer; }
.primary { border:1px solid var(--blue); background:var(--blue); color:#fff; }.secondary { border:1px solid var(--line); background:#fff; color:#344054; }
.metrics { display:grid; grid-template-columns:repeat(4,1fr); margin-bottom:14px; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:#fff; }
.metrics button { min-height:78px; padding:13px 18px; border:0; border-right:1px solid var(--line); background:#fff; text-align:left; cursor:pointer; }.metrics button:last-child { border-right:0; }.metrics button:hover { background:#f8fbff; }
.metrics span { display:block; color:var(--muted); font-size:12px; }.metrics strong { display:block; margin-top:6px; font-size:24px; }.metrics .danger { color:var(--red); }
.filters { min-height:58px; display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--line); border-bottom:0; border-radius:8px 8px 0 0; background:#fff; }
.segmented { display:flex; padding:3px; border-radius:6px; background:#f2f4f7; }.segmented button { height:32px; padding:0 12px; border:0; border-radius:4px; background:transparent; color:var(--muted); font-size:12px; }.segmented button.active { background:#fff; color:var(--text); box-shadow:0 1px 2px rgba(16,24,40,.12); }
.filters input,.filters select { height:38px; border:1px solid #cfd5df; border-radius:6px; background:#fff; color:var(--text); font-size:13px; }.filters input { flex:1; min-width:160px; padding:0 12px; }.filters select { min-width:160px; padding:0 9px; }
.table { border:1px solid var(--line); border-radius:0 0 8px 8px; overflow:hidden; background:#fff; }
.table-head,.document-row { display:grid; grid-template-columns:minmax(260px,1.6fr) 160px 140px 150px; gap:18px; align-items:center; padding:0 16px; }
.table-head { min-height:42px; background:#f8f9fb; border-bottom:1px solid var(--line); color:var(--muted); font-size:12px; font-weight:600; }
.document-row { width:100%; min-height:72px; border:0; border-bottom:1px solid #edf0f4; background:#fff; color:var(--text); text-align:left; cursor:pointer; }.document-row:last-child { border-bottom:0; }.document-row:hover { background:#f8fbff; }
.document-main { min-width:0; }.document-main strong,.document-main span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.document-main strong { font-size:14px; }.document-main span { margin-top:5px; color:var(--muted); font-size:12px; }
.status { width:fit-content; padding:4px 8px; border-radius:4px; background:var(--blue-soft); color:#175cb8; font-size:12px; }.status.done { background:var(--green-soft); color:var(--green); }.status.pending { background:var(--amber-soft); color:var(--amber); }
.assignee,.time { color:#475467; font-size:12px; }.time.overdue { color:var(--red); font-weight:650; }
.empty { padding:72px 20px; text-align:center; color:var(--muted); }.empty strong,.empty span { display:block; }.empty strong { color:#344054; font-size:15px; }.empty span { margin-top:7px; font-size:12px; }
.toast { position:fixed; left:50%; bottom:28px; z-index:10; transform:translateX(-50%); max-width:calc(100vw - 40px); padding:10px 14px; border-radius:6px; background:#172033; color:#fff; font-size:13px; }
.detail-backdrop { position:fixed; inset:0; z-index:20; background:rgba(16,24,40,.34); }
.detail-panel { position:fixed; top:0; right:0; bottom:0; z-index:21; width:min(560px,100vw); background:#fff; box-shadow:-12px 0 36px rgba(16,24,40,.16); transform:translateX(102%); transition:transform .2s ease; display:flex; flex-direction:column; }
.detail-panel.open { transform:translateX(0); }
.detail-head { min-height:74px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 20px; border-bottom:1px solid var(--line); }
.detail-head span { color:var(--muted); font-size:12px; }.detail-head h2 { margin:4px 0 0; font-size:18px; }
.detail-body { min-height:0; flex:1; overflow:auto; padding:20px; }
.detail-loading { min-height:300px; display:flex; align-items:center; justify-content:center; gap:12px; color:var(--muted); font-size:13px; }
.detail-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border:1px solid var(--line); border-radius:7px; overflow:hidden; }
.detail-summary div { min-width:0; padding:12px 14px; border-bottom:1px solid var(--line); }.detail-summary div:nth-child(odd) { border-right:1px solid var(--line); }.detail-summary div:nth-last-child(-n+2) { border-bottom:0; }
.detail-summary span,.detail-summary strong { display:block; }.detail-summary span { color:var(--muted); font-size:11px; }.detail-summary strong { margin-top:5px; overflow:hidden; text-overflow:ellipsis; font-size:13px; white-space:nowrap; }
.detail-section { margin-top:22px; }.detail-section h3 { margin:0 0 10px; font-size:14px; }
.file-list { display:flex; flex-wrap:wrap; gap:8px; }.file-link,.action-link { min-height:36px; display:inline-flex; align-items:center; padding:0 12px; border:1px solid var(--line); border-radius:6px; color:#175cb8; background:#fff; font-size:12px; font-weight:600; text-decoration:none; }
.timeline { margin:0; padding:0; list-style:none; border-left:2px solid #e4eaf2; }.timeline li { position:relative; display:grid; grid-template-columns:minmax(80px,.7fr) minmax(120px,1.5fr) auto; gap:10px; padding:0 0 15px 16px; font-size:12px; }.timeline li::before { content:""; position:absolute; left:-6px; top:4px; width:10px; height:10px; border-radius:50%; background:#fff; border:2px solid var(--blue); }.timeline strong { font-size:12px; }.timeline span { color:#475467; }.timeline time { color:var(--muted); white-space:nowrap; }
.detail-actions { position:sticky; bottom:-20px; display:flex; flex-wrap:wrap; gap:8px; margin:24px -20px -20px; padding:14px 20px; border-top:1px solid var(--line); background:#fff; }
.detail-actions button { min-height:38px; padding:0 13px; border-radius:6px; font-size:12px; font-weight:650; cursor:pointer; }.danger-button { border:1px solid #efc0bc; background:#fff; color:var(--red); }
.sync-error { margin:12px 0 0; padding:10px 12px; border-radius:6px; background:var(--red-soft); color:var(--red); font-size:12px; }.text-danger { color:var(--red) !important; }
@media (max-width:760px) { header { min-height:64px; padding:0 14px; } .module-nav { min-height:46px; gap:0; padding:0 12px; }.module-nav a { flex:1; min-width:0; } main { padding:18px 12px 34px; }.heading { align-items:flex-start; }.heading h2 { font-size:19px; }.primary { max-width:160px; padding:0 11px; text-align:center; }.metrics { grid-template-columns:repeat(2,1fr); }.metrics button { border-bottom:1px solid var(--line); }.metrics button:nth-child(2) { border-right:0; }.metrics button:nth-child(3),.metrics button:nth-child(4) { border-bottom:0; }.filters { flex-wrap:wrap; }.segmented { width:100%; }.segmented button { flex:1; }.filters input { flex-basis:100%; }.filters select { flex:1; min-width:0; }.table-head { display:none; }.document-row { min-height:104px; grid-template-columns:minmax(0,1fr) 105px; grid-template-areas:"main status" "main time" "assignee time"; gap:7px 12px; padding:13px 14px; align-items:start; }.document-main { grid-area:main; }.status { grid-area:status; justify-self:end; }.assignee { grid-area:assignee; }.time { grid-area:time; justify-self:end; text-align:right; } }
@media (max-width:560px) { .detail-body { padding:16px; }.detail-summary { grid-template-columns:1fr; }.detail-summary div,.detail-summary div:nth-child(odd),.detail-summary div:nth-last-child(-n+2) { border-right:0; border-bottom:1px solid var(--line); }.detail-summary div:last-child { border-bottom:0; }.timeline li { grid-template-columns:1fr auto; }.timeline span { grid-column:1 / -1; }.detail-actions { bottom:-16px; margin:20px -16px -16px; padding:12px 16px; }.detail-actions button,.detail-actions a { flex:1 1 calc(50% - 8px); text-align:center; justify-content:center; } }
@media (prefers-reduced-motion:reduce) { .spinner { animation:none; } }
