:root {
  --ink: #17233c;
  --muted: #66728a;
  --line: #e5e9f1;
  --panel: #ffffff;
  --canvas: #f4f6fa;
  --navy: #0e1d37;
  --navy-2: #152a4b;
  --blue: #3568e8;
  --blue-soft: #edf3ff;
  --accent-2: #14a8b7;
  --accent-rgb: 53, 104, 232;
  --cyan: #14a8b7;
  --violet: #7657d8;
  --amber: #e69a27;
  --red: #d54d5d;
  --green: #15956a;
  --shadow: 0 12px 32px rgba(35, 49, 80, .08);
  --radius: 18px;
}

.theme-teal { --blue: #157f8a; --blue-soft: #e9f7f7; --accent-2: #45b7a5; --accent-rgb: 21, 127, 138; }
.theme-violet { --blue: #7054cb; --blue-soft: #f0edfb; --accent-2: #a06cc5; --accent-rgb: 112, 84, 203; }
.theme-emerald { --blue: #23805f; --blue-soft: #eaf7f1; --accent-2: #68aa78; --accent-rgb: 35, 128, 95; }

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
textarea { resize: vertical; }

.internal-ribbon { position: fixed; z-index: 80; inset: 0 0 auto 0; height: 30px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #dbe6ff; background: #071329; font-size: 11px; letter-spacing: .07em; }
.environment-pill { margin-left: 8px; padding: 3px 8px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: #91e4ed; letter-spacing: 0; }
.pulse-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #36c99a; box-shadow: 0 0 0 4px rgba(54,201,154,.13); }
.anonymous .internal-ribbon { color: #4a5b76; background: rgba(255,255,255,.94); border-bottom: 1px solid #e6ebf2; box-shadow: 0 5px 18px rgba(39,65,116,.045); backdrop-filter: blur(12px); letter-spacing: .035em; }
.anonymous .environment-pill { color: #456aa8; background: #f3f7fd; border-color: #dce6f5; }
.anonymous .pulse-dot { background: #4776ca; box-shadow: 0 0 0 4px rgba(71,118,202,.11); }

.app-frame { display: grid; grid-template-columns: 242px minmax(0, 1fr); min-height: 100vh; padding-top: 30px; }
.app-sidebar { position: fixed; z-index: 40; left: 0; top: 30px; bottom: 0; width: 242px; display: flex; flex-direction: column; padding: 22px 15px 16px; color: #b7c3d9; background: linear-gradient(180deg, #0f203d 0%, #0a172d 100%); }
.sidebar-brand { display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 0 8px 21px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-symbol { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--blue), var(--accent-2)); font-weight: 800; font-size: 13px; letter-spacing: .06em; box-shadow: 0 7px 16px rgba(var(--accent-rgb),.24); }
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand strong { font-size: 16px; }
.sidebar-brand small { margin-top: 3px; color: #7790b6; font-size: 9px; letter-spacing: .13em; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 0; scrollbar-width: thin; }
.nav-group { margin: 14px 0; }
.nav-heading { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 11px; color: #7f93b2; font-size: 11px; font-weight: 700; }
.nav-heading small { color: #4e6588; font-size: 8px; letter-spacing: .12em; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 42px; margin: 3px 0; padding: 8px 11px; border-radius: 11px; transition: .18s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(var(--accent-rgb),.35), rgba(var(--accent-rgb),.10)); box-shadow: inset 3px 0 var(--blue); }
.nav-child { padding-left: 13px; }
.nav-grandchild { min-height: 35px; padding: 6px 10px 6px 34px; font-size: 12px; }
.nav-icon { display: grid; place-items: center; flex: 0 0 25px; height: 25px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; font-size: 11px; }
.tree-line { color: #526b91; font-size: 17px; }
.admin-group { padding-top: 10px; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar-user { display: grid; grid-template-columns: 38px 1fr 30px; align-items: center; gap: 9px; padding: 13px 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: #fff; background: linear-gradient(135deg, #5b78df, #16a5ad); font-weight: 800; }
.small-avatar { width: 34px; height: 34px; border-radius: 10px; }
.sidebar-user-copy strong, .sidebar-user-copy small { display: block; }
.sidebar-user-copy strong { color: #eef4ff; }
.sidebar-user-copy small { margin-top: 2px; color: #7389aa; font-size: 10px; }
.icon-button { width: 30px; height: 30px; color: #90a1bd; border: 0; border-radius: 8px; background: rgba(255,255,255,.05); }

.main-panel { grid-column: 2; min-width: 0; min-height: calc(100vh - 30px); }
.app-topbar { position: sticky; z-index: 30; top: 30px; display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 12px 28px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.app-topbar strong, .app-topbar small { display: block; }
.app-topbar strong { font-size: 16px; }
.app-topbar small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.privacy-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; color: #386052; background: #effaf6; border: 1px solid #d7f0e6; border-radius: 999px; font-size: 11px; font-weight: 700; }
.credential-warning { padding: 11px 28px; color: #815316; background: #fff8e6; border-bottom: 1px solid #f4dfac; font-size: 12px; }
.credential-warning a { margin-left: 8px; color: #9a5b00; font-weight: 800; }
.content-shell { width: min(1480px, 100%); margin: 0 auto; padding: 28px; }
.app-footer { padding: 10px 28px 24px; color: #98a1b2; text-align: center; font-size: 10px; }
.app-footer a, .filing-footer a { color: inherit; text-decoration: none; }
.app-footer a:hover, .filing-footer a:hover { color: #5572a8; text-decoration: underline; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font-weight: 700; font-size: 12px; transition: .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--blue), var(--accent-2)); box-shadow: 0 7px 18px rgba(var(--accent-rgb),.2); }
.button-secondary { color: #176b73; background: #eaf8f8; border-color: #cdebec; }
.button-soft { color: #45536c; background: #f4f6fa; border-color: #e1e5ed; }
.button-dark { min-height: 34px; color: #dce7fa; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.13); }
.button-accent { color: #071c25; background: linear-gradient(135deg, #58d5c3, #46b9e3); }
.button-warning { color: #2e2007; background: linear-gradient(135deg, #f4c15f, #e79a2e); }
.button-danger-soft { color: #a23948; background: #fff0f2; border-color: #f3d3d8; }
.button-small { min-height: 32px; padding: 0 11px; font-size: 11px; }
.button-wide { width: 100%; }

.surface-card { margin-bottom: 22px; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-heading h2, .section-heading p { margin: 0; }
.section-heading h2 { font-size: 17px; }
.section-heading p { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.section-heading > span { padding: 5px 9px; color: #5a6780; background: #f4f6fa; border-radius: 999px; white-space: nowrap; font-size: 10px; }
.eyebrow { margin-bottom: 8px; color: #4775d5; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.alert { margin-bottom: 16px; padding: 12px 15px; border: 1px solid; border-radius: 11px; font-weight: 650; font-size: 12px; }
.alert-success { color: #17694f; background: #edf9f4; border-color: #cfeadf; }
.alert-error { color: #a13b49; background: #fff1f3; border-color: #f1ccd2; }
.empty-state { padding: 34px 18px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; color: var(--ink); font-size: 15px; }
.empty-state p { margin: 7px 0 0; }
.empty-state.mini { padding: 15px; }
.wide-empty { grid-column: 1 / -1; }

.welcome-hero, .page-hero, .project-detail-hero, .module-banner { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 22px; overflow: hidden; padding: 30px 34px; border-radius: 22px; }
.welcome-hero { color: #fff; background: radial-gradient(circle at 80% 10%, rgba(85,217,210,.25), transparent 31%), linear-gradient(125deg, #142a51, #234b7c 60%, #236c78); box-shadow: 0 18px 40px rgba(24,54,97,.18); }
.welcome-hero h1, .page-hero h1, .project-detail-hero h1, .module-banner h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; }
.welcome-hero p, .page-hero p, .project-detail-hero p, .module-banner p { max-width: 680px; margin: 10px 0 0; line-height: 1.8; }
.welcome-hero p { color: #bdd1ed; }
.welcome-hero .eyebrow { color: #69ddd4; }
.hero-date, .hero-summary { flex: 0 0 auto; min-width: 155px; padding: 18px 21px; border-radius: 16px; text-align: right; }
.hero-date { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); }
.hero-date span, .hero-date strong, .hero-date small, .hero-summary strong, .hero-summary span { display: block; }
.hero-date span, .hero-date small { color: #adbed8; font-size: 10px; }
.hero-date strong { margin: 6px 0; font-size: 20px; }
.page-hero { border: 1px solid #dfe6f4; background: linear-gradient(120deg, #f9fbff, #edf3ff); }
.paper-hero { background: radial-gradient(circle at 90% 20%, #e9e4ff, transparent 33%), linear-gradient(120deg, #fafbff, #eef3ff); }
.study-hero { background: radial-gradient(circle at 90% 20%, #d9f5ed, transparent 35%), linear-gradient(120deg, #f9fffd, #edf8f5); }
.imaging-hero { background: radial-gradient(circle at 92% 18%, #dff8f6, transparent 34%), linear-gradient(120deg, #f9fcff, #eaf3fb); }
.interpretation-hero { background: radial-gradient(circle at 88% 10%, #e7deff, transparent 38%), linear-gradient(120deg, #fbfaff, #f0edff); }
.admin-hero { background: radial-gradient(circle at 88% 10%, #dbe9ff, transparent 35%), linear-gradient(120deg, #fafdff, #eef4ff); }
.security-hero { background: radial-gradient(circle at 90% 15%, #d8f1e8, transparent 34%), linear-gradient(120deg, #f9fdfc, #edf7f4); }
.audit-hero { background: radial-gradient(circle at 90% 15%, #eee4ff, transparent 34%), linear-gradient(120deg, #fcfaff, #f4f0ff); }
.page-hero p { color: #5f6d84; }
.hero-summary { color: #2450a4; background: rgba(255,255,255,.72); border: 1px solid rgba(74,112,182,.15); }
.hero-summary strong { font-size: 30px; }
.hero-summary span { margin-top: 5px; color: #6c7890; font-size: 10px; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.metric-card { position: relative; min-height: 126px; overflow: hidden; padding: 19px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 7px 22px rgba(35,49,80,.055); }
.metric-card::after { position: absolute; right: -16px; bottom: -24px; width: 84px; height: 84px; border-radius: 50%; background: currentColor; content: ""; opacity: .07; }
.metric-card span, .metric-card strong, .metric-card small { display: block; }
.metric-card span { color: #66738b; font-size: 11px; }
.metric-card strong { margin: 8px 0 6px; color: var(--ink); font-size: 27px; }
.metric-card small { color: #8a94a7; font-size: 10px; }
.metric-blue { color: var(--blue); border-top: 3px solid var(--blue); }
.metric-violet { color: var(--violet); border-top: 3px solid var(--violet); }
.metric-cyan { color: var(--cyan); border-top: 3px solid var(--cyan); }
.metric-amber { color: var(--amber); border-top: 3px solid var(--amber); }
.compact-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 22px; }
.recent-row { display: grid; grid-template-columns: 40px minmax(0,1fr) auto 24px; align-items: center; gap: 12px; padding: 13px 6px; border-top: 1px solid #eef0f4; }
.recent-row:first-child { border-top: 0; }
.recent-main strong, .recent-main small { display: block; }
.recent-main small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.project-kind { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; font-weight: 800; }
.kind-paper { color: #4d5fc4; background: #eef0ff; }
.kind-study { color: #187d6b; background: #eaf8f4; }
.row-arrow { color: #a2aabd; }
.action-card > a { display: grid; grid-template-columns: 38px 1fr 20px; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid #eef0f4; }
.quick-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #315ec3; background: #edf3ff; font-weight: 800; }
.action-card strong, .action-card small { display: block; }
.action-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.action-card b { color: #a0a9ba; }

.status-badge, .plain-chip, .priority-chip, .grade-chip, .scan-chip, .live-chip, .revision-chip, .account-state { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-badge { color: #3d61af; background: #eaf1ff; }
.status-accepted, .status-published, .status-completed, .status-implementation { color: #15745a; background: #e7f7f0; }
.status-revision, .status-peer_review, .status-compliance, .status-grant_writing { color: #95611c; background: #fff5df; }
.status-rejected, .status-withdrawn, .status-not_funded { color: #ac3c4c; background: #fff0f2; }
.plain-chip { color: #5c687d; background: #f1f3f7; }
.priority-routine { color: #53627a; background: #f0f3f7; }
.priority-priority { color: #ac3f50; background: #fff0f2; }
.grade-normal { color: #24805e !important; background: #e8f8f1; }
.grade-mild { color: #28758b !important; background: #e8f6fa; }
.grade-moderate { color: #9a671d !important; background: #fff4dd; }
.grade-severe { color: #b23f4f !important; background: #fff0f2; }

.create-panel summary, .upload-panel summary, .inline-admin summary, .transfer-panel summary { cursor: pointer; list-style: none; }
.create-panel summary::-webkit-details-marker, .upload-panel summary::-webkit-details-marker, .inline-admin summary::-webkit-details-marker, .transfer-panel summary::-webkit-details-marker { display: none; }
.create-panel > summary { display: flex; align-items: center; justify-content: space-between; color: #2d5fc8; font-weight: 800; }
.create-panel > summary small { color: var(--muted); font-weight: 500; }
.create-panel[open] > summary { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.compact-form { margin-top: 18px; }
.span-2 { grid-column: span 2; }
.stack-form { display: grid; gap: 13px; }
.form-grid label, .stack-form label, .dark-label { display: grid; gap: 7px; color: #46536a; font-size: 11px; font-weight: 700; }
input, select, textarea { width: 100%; color: var(--ink); background: #fff; border: 1px solid #dce1ea; border-radius: 10px; outline: 0; }
input, select { min-height: 42px; padding: 0 12px; }
textarea { padding: 11px 12px; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.1); }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: auto; padding: 0; }
input[type="file"] { padding: 9px; }
label small { color: #8b94a4; font-weight: 500; }
.checkbox-line { display: flex !important; align-items: center; gap: 9px !important; padding-top: 27px; }
.form-actions { display: flex; justify-content: flex-end; }

.project-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.project-card { padding: 23px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); transition: .18s ease; }
.project-card:hover { transform: translateY(-3px); border-color: #cdd9f2; box-shadow: 0 18px 35px rgba(35,49,80,.11); }
.project-card-top { display: flex; justify-content: space-between; }
.project-card h2 { margin: 18px 0 8px; font-size: 18px; }
.project-card > p { min-height: 44px; margin: 0; color: var(--muted); line-height: 1.7; }
.project-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; padding: 15px; background: #f8f9fc; border-radius: 12px; }
.project-meta div, .hero-facts div, .task-card dl div, .user-facts div { min-width: 0; }
.project-meta dt, .hero-facts dt, .task-card dt, .user-facts dt { color: #8a94a7; font-size: 9px; }
.project-meta dd, .hero-facts dd, .task-card dd, .user-facts dd { overflow: hidden; margin: 4px 0 0; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.project-card-footer { display: flex; justify-content: space-between; padding-top: 13px; border-top: 1px solid #edf0f4; color: var(--muted); font-size: 10px; }
.project-card-footer strong { color: #3c65c4; }

.project-detail-hero { align-items: stretch; color: #fff; background: radial-gradient(circle at 88% 12%, rgba(79,207,192,.2), transparent 35%), linear-gradient(120deg, #14294d, #254d79); box-shadow: 0 16px 38px rgba(22,48,88,.17); }
.project-detail-copy { align-self: center; }
.project-detail-hero .eyebrow { color: #68d6ce; }
.project-detail-hero p { color: #bfd0e6; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.project-detail-hero .plain-chip { color: #dce8f9; background: rgba(255,255,255,.1); }
.hero-facts { display: grid; min-width: 245px; margin: 0; padding: 16px 20px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 15px; }
.hero-facts div { padding: 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.hero-facts div:first-child { border-top: 0; }
.hero-facts dt { color: #9fb3cf; }
.hero-facts dd { color: #fff; }

.workflow-steps { display: flex; padding: 10px 0 4px; list-style: none; overflow-x: auto; }
.workflow-steps li { position: relative; flex: 1 0 76px; display: grid; justify-items: center; gap: 8px; color: #9aa3b3; text-align: center; }
.workflow-steps li::before { position: absolute; z-index: 0; top: 15px; left: -50%; width: 100%; height: 2px; background: #e6e9ef; content: ""; }
.workflow-steps li:first-child::before { display: none; }
.workflow-steps span { position: relative; z-index: 1; display: grid; place-items: center; width: 31px; height: 31px; border: 2px solid #dde2eb; border-radius: 50%; background: #fff; font-size: 10px; font-weight: 800; }
.workflow-steps .done span { color: #fff; background: #34a983; border-color: #34a983; }
.workflow-steps .done::before, .workflow-steps .current::before { background: #56b99a; }
.workflow-steps .current span { color: #fff; background: #416fe0; border-color: #416fe0; box-shadow: 0 0 0 5px #e9efff; }
.workflow-steps .done small, .workflow-steps .current small { color: #34435b; font-weight: 700; }
.status-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.compliance-card { border-left: 4px solid #44a889; }
.gate-status { padding: 7px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.gate-ready { color: #157255; background: #e7f8f0; }
.gate-blocked { color: #9b621a; background: #fff4da; }
.compliance-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-bottom: 18px; }
.compliance-overview article { display: flex; align-items: center; gap: 12px; padding: 15px; background: #f7faf9; border: 1px solid #e2eee9; border-radius: 13px; }
.check-icon { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: #40a985; border-radius: 50%; font-weight: 900; }
.compliance-overview strong, .compliance-overview small { display: block; }
.compliance-overview small { margin-top: 4px; color: var(--muted); }
.detail-columns { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.8fr); gap: 22px; align-items: start; }
.side-stack { display: grid; gap: 0; }
.upload-panel { margin-bottom: 15px; padding: 14px; background: #f8faff; border: 1px dashed #cdd9ef; border-radius: 12px; }
.upload-panel > summary { color: #3865c6; font-weight: 800; }
.file-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid #eef0f4; }
.file-icon { display: grid; place-items: center; width: 39px; height: 43px; color: #4665a4; background: #edf2fb; border-radius: 8px; font-size: 9px; font-weight: 800; }
.file-main strong, .file-main small { display: block; }
.file-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-main small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.scan-chip { color: #8a681f; background: #fff6de; }
.member-row { display: grid; grid-template-columns: 35px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 10px 0; border-top: 1px solid #eef0f4; }
.member-row:first-child { border-top: 0; }
.member-row strong, .member-row small { display: block; }
.member-row small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.member-row b { color: #4e6080; font-size: 9px; }
.member-permission { display: grid; justify-items: end; gap: 4px; }
.member-permission form { margin: 0; }
.member-permission button { padding: 0; color: #b04957; background: transparent; border: 0; font-size: 9px; }
.member-form { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 15px 1fr; gap: 10px; padding-bottom: 17px; }
.timeline li > span { position: relative; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: #5080e5; }
.timeline li > span::after { position: absolute; top: 11px; left: 4px; width: 1px; height: 42px; background: #dfe4ee; content: ""; }
.timeline li:last-child > span::after { display: none; }
.timeline strong, .timeline small { display: block; }
.timeline small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.timeline p { margin: 5px 0 0; color: #59667d; font-size: 10px; line-height: 1.5; }

.imaging-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 22px; }
.mode-card { position: relative; overflow: hidden; min-height: 270px; padding: 26px; color: #fff; border-radius: 20px; box-shadow: 0 15px 35px rgba(25,46,85,.15); }
.mode-card::after { position: absolute; top: -70px; right: -50px; width: 210px; height: 210px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; content: ""; }
.interpretation-card { background: linear-gradient(135deg, #41376f, #6254a0); }
.review-card { background: linear-gradient(135deg, #174b64, #167c83); }
.mode-number { color: rgba(255,255,255,.45); font-size: 10px; letter-spacing: .15em; }
.mode-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 22px 0 16px; border: 1px solid rgba(255,255,255,.22); border-radius: 15px; background: rgba(255,255,255,.11); font-size: 18px; font-weight: 800; }
.mode-card h2 { margin: 0; font-size: 22px; }
.mode-card p { max-width: 460px; min-height: 48px; color: rgba(255,255,255,.72); line-height: 1.7; }
.mode-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); font-size: 11px; }
.locked-card { filter: grayscale(.35); opacity: .72; }
.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.module-card { display: grid; grid-template-columns: 65px minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 18px; background: #f7faff; border: 1px solid #dce6f7; border-radius: 15px; }
.module-card h3, .module-card p { margin: 5px 0 0; }
.module-card p { color: var(--muted); font-size: 10px; }
.module-card > strong { color: #3763bd; font-size: 11px; }
.coming-card { grid-template-columns: 65px 1fr; opacity: .68; }
.module-plus { display: grid; place-items: center; width: 60px; height: 60px; color: #8390a6; background: #edf0f5; border-radius: 16px; font-size: 26px; }
.spine-mark { display: grid; align-content: center; justify-items: center; width: 60px; height: 60px; padding: 8px; background: linear-gradient(150deg, #1e496d, #19777b); border-radius: 17px; }
.spine-mark span { width: 20px; height: 5px; margin: 1px; background: #a8e5e3; border-radius: 6px 6px 3px 3px; transform: rotate(-4deg); }
.spine-mark span:nth-child(2), .spine-mark span:nth-child(4) { transform: rotate(5deg); }
.spine-mark.large { flex: 0 0 75px; width: 75px; height: 75px; }
.module-banner { color: #fff; background: radial-gradient(circle at 88% 14%, rgba(76,216,200,.2), transparent 33%), linear-gradient(120deg, #102841, #1d5567); }
.module-banner .eyebrow { color: #67dbcf; }
.module-banner p { color: #b9cfd8; }
.banner-badges { display: grid; gap: 8px; text-align: right; }
.banner-badges span { padding: 5px 9px; color: #92e0d7; background: rgba(255,255,255,.08); border-radius: 999px; font-size: 10px; }
.banner-badges strong { font-size: 18px; }

.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 12px; color: #7e899b; background: #f7f8fb; text-align: left; font-size: 9px; letter-spacing: .04em; }
td { padding: 13px 12px; border-top: 1px solid #edf0f4; vertical-align: middle; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.task-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.task-card { padding: 21px; background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }
.task-card-head { display: flex; align-items: center; justify-content: space-between; }
.task-card-head small { color: var(--muted); }
.task-card h2 { margin: 17px 0 7px; font-size: 17px; }
.task-card > p { min-height: 45px; color: var(--muted); line-height: 1.6; }
.task-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; background: #f8f9fc; border-radius: 11px; }
.task-card > strong { display: block; margin-top: 15px; color: #4f60be; text-align: right; font-size: 11px; }

.review-workspace, .reading-workspace { overflow: hidden; color: #d9e3f3; background: #08111f; border: 1px solid #1b2c44; border-radius: 18px; box-shadow: 0 20px 50px rgba(6,16,31,.25); }
.workspace-header { display: flex; align-items: center; justify-content: space-between; min-height: 61px; padding: 11px 16px; background: #0d1a2d; border-bottom: 1px solid #21324a; }
.workspace-header > div { display: flex; align-items: center; gap: 10px; }
.workspace-header strong { color: #fff; font-size: 14px; }
.workspace-header small { color: #8494ac; }
.live-chip { color: #71ded1; background: rgba(76,202,187,.12); border: 1px solid rgba(77,209,194,.2); }
.revision-chip { color: #9aacc6; background: #14243a; }
.review-grid { display: grid; grid-template-columns: 210px minmax(430px,1fr) 315px; min-height: 670px; }
.case-rail { min-width: 0; background: #0c1728; border-right: 1px solid #1c2a3f; }
.rail-heading { display: flex; justify-content: space-between; padding: 16px; border-bottom: 1px solid #1c2a3f; }
.rail-heading small { color: #718199; }
.rail-list { max-height: 630px; overflow-y: auto; }
.rail-case { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 12px 11px; border-bottom: 1px solid #17243a; }
.rail-case:hover, .rail-case.active { background: #14253d; }
.rail-case.active { box-shadow: inset 3px 0 #47c8bc; }
.rail-status { width: 7px; height: 7px; border-radius: 50%; background: #e4a843; }
.rail-status.complete { background: #4bc394; }
.rail-case strong, .rail-case small { display: block; }
.rail-case strong { color: #dce6f5; font-size: 10px; }
.rail-case small { overflow: hidden; margin-top: 3px; color: #6f8099; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.rail-case b { color: #8da0ba; font-size: 8px; }
.scan-stage { min-width: 0; padding: 13px; background: #060c16; }
.viewer-toolbar { display: flex; justify-content: space-between; padding: 8px 4px 12px; color: #92a3ba; font-size: 10px; }
.viewer-toolbar small { color: #62728b; }
.primary-viewers { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.viewer-panel { min-width: 0; overflow: hidden; background: #03070c; border: 1px solid #1c293c; border-radius: 10px; }
.viewer-label { display: flex; justify-content: space-between; padding: 8px 10px; color: #6bcfc4; background: #0d1725; font-size: 8px; letter-spacing: .1em; }
.viewer-label small { color: #687991; letter-spacing: 0; }
.medical-image-frame { display: grid; min-height: 320px; place-items: center; overflow: hidden; background: #020407; }
.medical-image { display: block; width: 100%; max-height: 520px; aspect-ratio: 1; object-fit: contain; background: #020407; }
.scan-placeholder { position: relative; display: grid; place-items: center; min-height: 320px; overflow: hidden; background: radial-gradient(circle at center, #59606a 0, #2c3138 20%, #11151b 48%, #05080c 72%); }
.scan-placeholder::before, .scan-placeholder::after { position: absolute; border-radius: 50%; content: ""; }
.scan-placeholder::before { width: 78%; height: 70%; border: 18px solid rgba(204,208,210,.16); filter: blur(3px); }
.scan-placeholder::after { width: 54%; height: 48%; border: 12px solid rgba(235,236,230,.18); }
.scan-placeholder > span { position: absolute; bottom: 12px; z-index: 4; padding: 4px 7px; color: #7d8796; background: rgba(0,0,0,.45); border-radius: 5px; font-size: 8px; }
.scan-ring { position: relative; z-index: 2; width: 88px; height: 66px; border: 10px solid rgba(235,232,218,.32); border-radius: 47%; box-shadow: 0 0 20px rgba(255,255,255,.1); }
.scan-center { position: absolute; z-index: 3; width: 28px; height: 20px; background: #0a0c10; border: 4px solid rgba(221,217,205,.2); border-radius: 45%; }
.sagittal-scan { background: radial-gradient(ellipse at 52% 50%, #545b63 0, #30353c 22%, #12161c 52%, #05080c 75%); }
.spine-silhouette { position: relative; z-index: 3; width: 55px; height: 220px; background: repeating-linear-gradient(to bottom, rgba(235,229,208,.58) 0 17px, rgba(42,46,51,.95) 18px 24px); border-radius: 42% 50% 43% 48%; transform: rotate(6deg); filter: blur(.4px); box-shadow: 0 0 20px rgba(240,235,215,.12); }
.locator-line { position: absolute; z-index: 4; left: 12%; right: 12%; height: 1px; background: #5fe0d3; box-shadow: 0 0 6px #5fe0d3; }
.slice-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 9px; }
.slice-card { padding: 6px; background: #0b1421; border: 1px solid #1c293c; border-radius: 8px; text-align: center; }
.slice-card.active { border-color: #41bfb4; box-shadow: inset 0 0 0 1px #41bfb4; }
.slice-card img { display: block; width: 100%; height: 80px; object-fit: cover; background: #020407; border-radius: 4px; }
.mini-scan { display: grid; place-items: center; height: 80px; background: radial-gradient(circle, #60656b, #282d33 34%, #070a0e 72%); }
.mini-scan i { width: 25px; height: 18px; border: 5px solid rgba(230,226,213,.28); border-radius: 50%; }
.slice-card span { display: block; padding: 5px 0 1px; color: #6f8098; font-size: 8px; }
.interpretation-return { margin-top: 10px; padding: 13px; background: #102238; border: 1px solid #294762; border-left: 3px solid #6d64d6; border-radius: 9px; }
.interpretation-return span, .interpretation-return strong, .interpretation-return small { display: block; }
.interpretation-return span { color: #a79eea; font-size: 9px; }
.interpretation-return strong { margin: 6px 0; color: #eef3fc; }
.interpretation-return small, .interpretation-return p { color: #7f91aa; font-size: 9px; }
.interpretation-return p { margin: 7px 0 0; }
.decision-panel { padding: 15px; background: #0d1727; border-left: 1px solid #1c2a3f; }
.model-card { padding: 16px; text-align: center; background: #111f33; border: 1px solid #243650; border-radius: 11px; }
.model-card span, .model-card strong, .model-card small { display: block; }
.model-card span { color: #8293ac; font-size: 9px; }
.model-card strong { width: fit-content; margin: 9px auto; padding: 6px 13px; border-radius: 999px; font-size: 19px; }
.model-card small { color: #697a93; font-size: 8px; }
.decision-form { margin-top: 15px; }
.decision-form fieldset { display: grid; gap: 7px; margin: 0 0 12px; padding: 0; border: 0; }
.decision-form legend { margin-bottom: 9px; color: #a9b7cb; font-size: 10px; font-weight: 800; }
.decision-option { display: block; cursor: pointer; }
.decision-option input { position: absolute; opacity: 0; }
.decision-option > span { display: grid; grid-template-columns: 14px 1fr; column-gap: 9px; padding: 10px; background: #111e30; border: 1px solid #223249; border-radius: 9px; }
.decision-option i { grid-row: span 2; width: 13px; height: 13px; margin-top: 2px; border: 2px solid #60718b; border-radius: 50%; }
.decision-option strong { color: #dce5f1; font-size: 10px; }
.decision-option small { margin-top: 3px; color: #667791; font-size: 8px; }
.decision-option input:checked + span { background: #15323b; border-color: #43c1b4; box-shadow: inset 3px 0 #43c1b4; }
.decision-option input:checked + span i { border: 4px solid #43c1b4; }
.quality-fieldset { padding: 11px !important; background: #101b2b; border: 1px solid #243650 !important; border-radius: 9px; }
.quality-check { display: flex; align-items: center; gap: 8px; color: #aebbd0; font-size: 9px; }
.quality-check input { accent-color: #43c1b4; }
.dark-label { margin-bottom: 12px; color: #a7b5c9; }
.dark-label textarea, .dark-form input, .dark-form select, .dark-form textarea { color: #e4eaf3; background: #0a1423; border-color: #2a3a52; }
.dark-label textarea::placeholder, .dark-form textarea::placeholder { color: #506079; }
.transfer-panel { margin-top: 14px; padding: 12px; background: #111d2e; border: 1px solid #26364d; border-radius: 10px; }
.transfer-panel > summary { color: #edba61; font-size: 10px; font-weight: 800; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 17px 12px 2px; color: var(--muted); }
.is-disabled { pointer-events: none; opacity: .45; }
.alert-warning { color: #815114; background: #fff6df; border-color: #efd08a; }
.transfer-panel > p { color: #687b95; font-size: 8px; line-height: 1.6; }
.dark-empty { padding: 12px; color: #71829a; background: #0b1523; border-radius: 8px; font-size: 9px; }

.reading-grid { display: grid; grid-template-columns: 1fr 1fr 330px; min-height: 610px; padding: 12px; gap: 10px; }
.reading-grid .scan-placeholder { min-height: 535px; }
.reading-form-panel { padding: 18px; background: #0d1a2c; border: 1px solid #21324a; border-radius: 10px; }
.panel-kicker { color: #9f94eb; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.transfer-reason { min-height: 50px; color: #d8e0ed; line-height: 1.7; }
.case-facts { margin: 15px 0; padding: 12px; background: #091321; border-radius: 9px; }
.case-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid #1d2b40; }
.case-facts div:first-child { border-top: 0; }
.case-facts dt { color: #687a94; }
.case-facts dd { margin: 0; color: #d5dfed; font-weight: 700; }

.role-fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; border: 0; }
.role-fieldset legend { margin-bottom: 8px; color: #46536a; font-size: 11px; font-weight: 700; }
.role-option { display: grid !important; grid-template-columns: 18px 1fr; align-items: center; gap: 9px !important; padding: 12px; background: #f8f9fc; border: 1px solid #e2e6ee; border-radius: 11px; }
.role-option strong, .role-option small { display: block; }
.role-option small { margin-top: 3px; }
.user-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-bottom: 22px; }
.user-card { margin: 0; padding: 18px; }
.user-card header { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 10px; }
.user-card h2, .user-card p { margin: 0; }
.user-card h2 { font-size: 15px; }
.user-card p { margin-top: 3px; color: var(--muted); font-size: 10px; }
.account-state.active { color: #197255; background: #e8f7f0; }
.account-state.inactive { color: #8a5760; background: #f5eef0; }
.role-chips { display: flex; flex-wrap: wrap; gap: 5px; min-height: 26px; margin: 14px 0; }
.role-chips span { padding: 4px 7px; color: #4d5faa; background: #eef0ff; border-radius: 999px; font-size: 8px; font-weight: 700; }
.role-chips .muted-chip { color: #7b8597; background: #f1f2f5; }
.user-facts { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; padding: 10px; background: #f8f9fb; border-radius: 10px; }
.user-facts dd { font-size: 10px; }
.inline-admin { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.inline-admin > summary { color: #59667c; font-size: 10px; font-weight: 700; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin: 10px 0 7px; }
.inline-form input { min-height: 33px; }
.inline-role-form { margin: 10px 0; }
.compact-role-fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 0; padding: 10px; background: #f8f9fb; border: 1px solid #e5e9f0; border-radius: 10px; }
.compact-role-fieldset legend { color: #5c687c; font-size: 10px; font-weight: 700; }
.compact-role-fieldset label { display: flex; align-items: center; gap: 5px; color: #536076; font-size: 9px; }
.permission-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 18px; }
.permission-flow article { min-height: 125px; padding: 16px; background: #f8f9fc; border-radius: 13px; }
.permission-flow article > span { display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: 11px; color: #fff; background: #4972d6; border-radius: 8px; font-weight: 800; }
.permission-flow strong { display: block; }
.permission-flow p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.permission-flow i { color: #a1abba; font-style: normal; }

.security-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.control-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.control-list li { display: grid; grid-template-columns: 31px 1fr; align-items: center; gap: 11px; padding: 11px; border: 1px solid; border-radius: 11px; }
.control-list li > span { display: grid; place-items: center; width: 28px; height: 28px; color: #fff; border-radius: 9px; font-weight: 900; }
.control-list strong, .control-list p { margin: 0; }
.control-list p { margin-top: 3px; font-size: 9px; line-height: 1.5; }
.control-list .ok { color: #256650; background: #f2faf6; border-color: #d7ede4; }
.control-list .ok > span { background: #36a47d; }
.control-list .warn { color: #7c5a22; background: #fffaf0; border-color: #f1e3c4; }
.control-list .warn > span { background: #dda345; }
.audit-table { min-width: 920px; }
.audit-table code { color: #495a8e; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.details-cell span { display: inline-block; margin: 2px; padding: 3px 5px; background: #f2f4f7; border-radius: 5px; font-size: 8px; }

.settings-hero { background: radial-gradient(circle at 90% 10%, rgba(var(--accent-rgb),.11), transparent 34%), linear-gradient(120deg, #fbfdff, var(--blue-soft)); border: 1px solid #dfe6f1; }
.settings-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(280px,.72fr); gap: 22px; }
.settings-form { gap: 18px; }
.appearance-fieldset { margin: 0; padding: 0; border: 0; }
.appearance-fieldset legend { margin-bottom: 9px; color: #46536a; font-size: 11px; font-weight: 700; }
.theme-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.theme-option { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 8px; padding: 11px; background: #fafbfc; border: 1px solid #e3e7ed; border-radius: 11px; cursor: pointer; }
.theme-option:has(input:checked) { background: var(--blue-soft); border-color: var(--blue); box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.08); }
.theme-option input { grid-row: span 2; }
.theme-option strong { font-size: 10px; }
.theme-swatch { display: flex; gap: 3px; }
.theme-swatch i { display: block; width: 13px; height: 8px; border-radius: 4px; }
.theme-preview-academic_blue .theme-swatch i:nth-child(1) { background: #3568e8; }
.theme-preview-academic_blue .theme-swatch i:nth-child(2) { background: #14a8b7; }
.theme-preview-academic_blue .theme-swatch i:nth-child(3) { background: #a9c0f3; }
.theme-preview-teal .theme-swatch i:nth-child(1) { background: #157f8a; }
.theme-preview-teal .theme-swatch i:nth-child(2) { background: #45b7a5; }
.theme-preview-teal .theme-swatch i:nth-child(3) { background: #aadbd3; }
.theme-preview-violet .theme-swatch i:nth-child(1) { background: #7054cb; }
.theme-preview-violet .theme-swatch i:nth-child(2) { background: #a06cc5; }
.theme-preview-violet .theme-swatch i:nth-child(3) { background: #d0c5eb; }
.theme-preview-emerald .theme-swatch i:nth-child(1) { background: #23805f; }
.theme-preview-emerald .theme-swatch i:nth-child(2) { background: #68aa78; }
.theme-preview-emerald .theme-swatch i:nth-child(3) { background: #b8dcc5; }
.density-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.density-options label { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 8px; padding: 12px; background: #fafbfc; border: 1px solid #e3e7ed; border-radius: 11px; cursor: pointer; }
.density-options label:has(input:checked) { background: var(--blue-soft); border-color: var(--blue); }
.density-options strong, .density-options small { display: block; }
.density-options small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.settings-facts { display: grid; gap: 9px; margin: 13px 0 0; }
.settings-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #eef0f4; }
.settings-facts dt { color: var(--muted); }
.settings-facts dd { margin: 0; color: #3d4d68; font-weight: 700; text-align: right; }
.security-actions form { margin-top: 9px; }

.density-compact .content-shell { padding: 20px; }
.density-compact .surface-card { margin-bottom: 16px; padding: 17px; }
.density-compact .metric-card { min-height: 106px; padding: 15px; }
.density-compact .nav-item { min-height: 37px; }
.density-compact .app-topbar { min-height: 60px; }

.error-card { max-width: 620px; margin: 60px auto; padding: 34px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.error-card > span { display: inline-block; color: #bf4758; font-size: 34px; font-weight: 800; }
.error-card h1 { font-size: 20px; }
.error-card p { color: var(--muted); line-height: 1.7; }
.error-card > div { display: flex; justify-content: center; gap: 8px; }

.anonymous { min-height: 100vh; color: var(--ink); background: #fff; }
.login-shell { min-height: 100vh; padding-top: 30px; }
.filing-footer { position: fixed; z-index: 5; right: 0; bottom: 8px; left: 0; color: #98a1b2; text-align: center; font-size: 10px; }
.login-page { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(360px,.65fr); align-items: center; gap: clamp(30px, 7vw, 100px); width: min(1200px, calc(100% - 48px)); min-height: calc(100vh - 30px); margin: 0 auto; padding: 45px 0; }
.login-page::before { position: fixed; z-index: 0; inset: 30px 0 0; background: radial-gradient(circle at 16% 18%, rgba(77,126,231,.11), transparent 31%), radial-gradient(circle at 84% 76%, rgba(33,177,176,.10), transparent 28%), radial-gradient(circle at 72% 14%, rgba(119,86,216,.055), transparent 23%), linear-gradient(145deg, #fff 0%, #fbfdff 48%, #f7fbff 100%); content: ""; }
.login-page::after { position: fixed; z-index: 0; right: clamp(-170px, -8vw, -70px); bottom: clamp(-190px, -10vw, -90px); width: min(520px, 52vw); aspect-ratio: 1; border: 1px solid rgba(57,104,202,.10); border-radius: 50%; background: radial-gradient(circle, transparent 0 46%, rgba(255,255,255,.72) 46.4% 47%, transparent 47.4% 62%, rgba(48,168,177,.06) 62.4% 63%, transparent 63.4%); content: ""; pointer-events: none; }
.login-story, .login-card { position: relative; z-index: 1; }
.story-mark { width: fit-content; padding: 6px 10px; color: #70d9d0; background: rgba(65,190,180,.09); border: 1px solid rgba(99,211,202,.2); border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.login-story h1 { margin: 22px 0 14px; font-size: clamp(30px,4.2vw,54px); line-height: 1.24; letter-spacing: -.04em; }
.login-story > p { max-width: 690px; color: #9eb0ca; line-height: 1.9; }
.login-feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 690px; margin-top: 31px; }
.login-feature-grid article { display: grid; grid-template-columns: 35px 1fr; padding: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: 13px; }
.login-feature-grid span { grid-row: span 2; color: #59c9c0; font-size: 10px; font-weight: 800; }
.login-feature-grid strong, .login-feature-grid small { display: block; }
.login-feature-grid small { margin-top: 4px; color: #7084a1; font-size: 9px; }
.login-card { padding: 30px; color: var(--ink); background: rgba(255,255,255,.94); border: 1px solid #e5eaf2; border-radius: 22px; box-shadow: 0 28px 70px rgba(39,65,116,.13), 0 3px 12px rgba(39,65,116,.05); backdrop-filter: blur(12px); }
.login-lock { width: fit-content; padding: 5px 9px; color: #97601d; background: #fff3dc; border-radius: 999px; font-size: 9px; font-weight: 800; }
.login-card h2 { margin: 18px 0 7px; font-size: 24px; }
.login-card > p { margin: 0 0 20px; color: var(--muted); line-height: 1.6; }
.security-copy { margin-top: 16px; color: #718097; text-align: center; font-size: 9px; }
.login-minimal { grid-template-columns: minmax(320px, 420px); justify-content: center; width: min(480px, calc(100% - 30px)); }
.login-card-minimal { overflow: hidden; padding: 36px; }
.login-card-minimal::before { position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, #3f73e6, #27aeb5 58%, #79c9c1); content: ""; }
.login-card-minimal h1 { margin: 22px 0 20px; font-size: 25px; }
.minimal-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.minimal-brand .brand-symbol { flex: 0 0 42px; }
.minimal-brand strong { font-size: 18px; }
.login-card-minimal .login-lock { margin-bottom: 0; }
.login-card-minimal input { background: #fbfcff; border-color: #dfe5ee; }
.login-card-minimal input:hover { border-color: #cbd5e5; }
.single-panel { grid-template-columns: minmax(320px,560px); justify-content: center; }

@media (max-width: 1180px) {
  .review-grid { grid-template-columns: 180px minmax(390px,1fr) 285px; }
  .user-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reading-grid { grid-template-columns: 1fr 1fr; }
  .reading-form-panel { grid-column: 1 / -1; }
  .reading-grid .scan-placeholder { min-height: 390px; }
}

@media (max-width: 980px) {
  .app-frame { grid-template-columns: 76px minmax(0,1fr); }
  .app-sidebar { width: 76px; padding: 18px 9px 12px; }
  .sidebar-brand { justify-content: center; padding: 0 0 18px; }
  .sidebar-brand > span:last-child, .nav-heading, .nav-item > span:last-child, .tree-line, .sidebar-user-copy, .sidebar-user form { display: none; }
  .nav-item { justify-content: center; padding: 8px; }
  .nav-grandchild { padding: 7px; }
  .sidebar-user { display: flex; justify-content: center; padding: 12px 0 0; }
  .dashboard-grid, .detail-columns, .security-layout, .settings-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .review-grid { display: block; }
  .case-rail { display: none; }
  .decision-panel { border: 0; border-top: 1px solid #1c2a3f; }
  .task-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 720px) {
  .internal-ribbon { justify-content: flex-start; overflow: hidden; padding: 0 10px; white-space: nowrap; }
  .environment-pill { margin-left: auto; }
  .app-frame { display: block; }
  .app-sidebar { position: static; width: 100%; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 8px 10px; }
  .sidebar-brand { flex: 0 0 auto; padding: 0 9px 0 0; border: 0; }
  .brand-symbol { width: 35px; height: 35px; }
  .sidebar-nav { display: flex; flex: 1; padding: 0; overflow: visible; }
  .nav-group { display: contents; }
  .nav-item { flex: 0 0 40px; margin: 0 2px; }
  .admin-group { border: 0; }
  .sidebar-user { padding: 0; border: 0; }
  .sidebar-user .avatar { width: 35px; height: 35px; }
  .main-panel { min-height: auto; }
  .app-topbar { top: 30px; padding: 10px 15px; }
  .app-topbar small, .privacy-chip { display: none; }
  .content-shell { padding: 16px; }
  .welcome-hero, .page-hero, .project-detail-hero, .module-banner { align-items: flex-start; flex-direction: column; padding: 24px; }
  .hero-date, .hero-summary, .hero-facts { width: 100%; min-width: 0; text-align: left; }
  .metric-grid, .compact-metrics, .project-card-grid, .imaging-mode-grid, .module-grid, .task-grid, .user-grid, .compliance-overview, .settings-grid { grid-template-columns: 1fr; }
  .form-grid, .role-fieldset, .theme-options, .density-options, .compact-role-fieldset { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .project-meta { grid-template-columns: 1fr; }
  .permission-flow { grid-template-columns: 1fr; }
  .permission-flow i { display: none; }
  .file-row { grid-template-columns: 40px minmax(0,1fr) auto; }
  .scan-chip { display: none; }
  .primary-viewers, .reading-grid { grid-template-columns: 1fr; }
  .reading-form-panel { grid-column: auto; }
  .review-workspace, .reading-workspace { margin: 0 -8px; border-radius: 12px; }
  .workspace-header { align-items: flex-start; flex-direction: column; }
  .workspace-header > div { flex-wrap: wrap; }
  .scan-placeholder, .reading-grid .scan-placeholder { min-height: 330px; }
  .login-page { grid-template-columns: 1fr; width: min(520px, calc(100% - 30px)); }
  .login-story { display: none; }
  .login-card { padding: 24px; }
}

/* Collapsible application navigation and full-width diagnostic workspace. */
.app-frame, .app-sidebar, .main-panel { transition: grid-template-columns .18s ease, transform .18s ease; }
.sidebar-toggle { position: fixed; z-index: 55; top: 108px; left: 218px; display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 9px; color: #dce8fa; background: #142b4e; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; box-shadow: 0 5px 16px rgba(6,16,31,.2); cursor: pointer; transition: left .18s ease; }
.sidebar-toggle span { font-size: 20px; line-height: 1; }
.sidebar-toggle b { font-size: 9px; }
.sidebar-collapsed .app-frame { grid-template-columns: 0 minmax(0,1fr); }
.sidebar-collapsed .app-sidebar { transform: translateX(-105%); }
.sidebar-collapsed .main-panel { grid-column: 2; }
.sidebar-collapsed .sidebar-toggle { left: 10px; }
.sidebar-collapsed .sidebar-toggle b { display: none; }

.review-page .content-shell { width: 100%; max-width: none; padding: 12px; }
.review-page .app-footer { padding: 5px 16px 8px; }
.review-page .review-workspace { height: calc(100vh - 145px); min-height: 640px; }
.review-page .workspace-header { height: 61px; }
.review-page .review-grid { height: calc(100% - 61px); min-height: 0; grid-template-columns: 225px minmax(600px,1fr) 330px; }
.review-page .case-rail, .review-page .scan-stage, .review-page .decision-panel { min-height: 0; overflow-y: auto; scrollbar-color: #36546d #0a1422; scrollbar-width: thin; }
.review-page .case-rail-collapsed .review-grid { grid-template-columns: 0 minmax(600px,1fr) 330px; }
.review-page .case-rail-collapsed .case-rail { visibility: hidden; overflow: hidden; border: 0; }
.workspace-actions { flex-wrap: wrap; justify-content: flex-end; }
.compact-alert { margin: 0 0 8px; padding: 8px 13px; }

.rail-search { display: block; padding: 10px 12px; border-bottom: 1px solid #1c2a3f; }
.rail-search span { display: block; margin-bottom: 5px; color: #7587a1; font-size: 9px; }
.rail-search input { width: 100%; padding: 8px 9px; color: #dce7f6; background: #07111e; border: 1px solid #263a54; border-radius: 7px; outline: 0; }
.rail-search input:focus { border-color: #4bc9bd; }
.rail-filter-links { display: grid; grid-template-columns: repeat(2,1fr); gap: 5px; padding: 9px 10px; border-bottom: 1px solid #1c2a3f; }
.rail-filter-links a { padding: 5px; color: #8ea1bd; background: #111f32; border-radius: 6px; text-align: center; font-size: 9px; }
.rail-list { max-height: none; overflow: visible; }
.rail-status.assigned { background: #e7b552; box-shadow: 0 0 0 3px rgba(231,181,82,.12); }

.review-page .scan-stage { padding: 11px; }
.review-page .primary-viewers { align-items: stretch; }
.review-page .viewer-panel { min-width: 0; overflow: hidden; background: #03070d; border: 1px solid #1c2d44; border-radius: 10px; }
.review-page .viewer-label { min-height: 37px; align-items: center; }
.viewer-actions { display: flex; align-items: center; gap: 7px; }
.viewer-actions button, .viewer-label button { padding: 4px 7px; color: #d5e1f2; background: #16263b; border: 1px solid #334a66; border-radius: 6px; cursor: pointer; font-size: 9px; }
.review-page .medical-image-frame { position: relative; min-height: 370px; height: clamp(370px, 47vh, 610px); cursor: zoom-in; }
.review-page .medical-image { height: 100%; max-height: none; aspect-ratio: auto; }
.stage-tip { position: absolute; z-index: 3; top: 9px; left: 9px; max-width: calc(100% - 18px); padding: 5px 7px; color: #d7e1ef; background: rgba(0,0,0,.67); border-radius: 6px; font-size: 8px; pointer-events: none; }
.roi-inset { position: absolute; z-index: 4; right: 10px; bottom: 10px; display: grid; grid-template-rows: 28px minmax(0,1fr); width: min(43%,220px); min-width: 160px; aspect-ratio: 1; padding: 0; overflow: hidden; color: #ffe794; background: #020407; border: 2px solid #eac24c; border-radius: 9px; box-shadow: 0 9px 28px rgba(0,0,0,.68); cursor: zoom-in; }
.roi-inset:hover { border-color: #ffe477; box-shadow: 0 0 0 3px rgba(255,214,88,.14),0 10px 30px rgba(0,0,0,.72); }
.roi-inset > span { display: flex; align-items: center; justify-content: space-between; padding: 0 7px; background: #2a250d; font-size: 8px; }
.roi-inset canvas { display: block; width: 100%; height: 100%; min-height: 0; }
.slice-tools { display: flex; align-items: center; min-height: 38px; margin-top: 9px; padding: 8px 10px; color: #91a4bd; background: #0d1827; border: 1px solid #1e3048; border-radius: 8px; font-size: 9px; }
.slice-tools .ok { color: #69d4a5; }
.slice-tools .error { color: #ff9a8d; }
.review-page .slice-card { position: relative; color: #b8c5d8; cursor: pointer; }
.review-page .slice-card:disabled { opacity: .55; cursor: wait; }
.review-page .slice-card.best::after { content: "✓ 最适配"; position: absolute; top: 9px; right: 9px; padding: 3px 5px; color: #15150b; background: #ead15b; border-radius: 5px; font-size: 7px; font-weight: 800; }
.review-page .slice-card span { display: flex; justify-content: space-between; gap: 5px; }
.review-page .slice-card i { color: #72849e; font-style: normal; }

.decision-panel .read-only-note { margin-bottom: 11px; padding: 9px 10px; color: #ffd58d; background: #2b2113; border: 1px solid #815f2f; border-radius: 8px; font-size: 10px; line-height: 1.5; }
.decision-form { display: grid; gap: 11px; margin-top: 12px; }
.decision-fieldset, .quality-fieldset { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; }
.decision-fieldset legend, .quality-fieldset legend { margin-bottom: 5px; color: #dce6f3; font-size: 13px; font-weight: 800; }
.quality-fieldset legend small { color: #74869f; font-size: 8px; font-weight: 500; }
.decision-question { margin: -2px 0 3px; color: #8496af; font-size: 9px; }
.decision-choice { width: 100%; min-height: 53px; padding: 9px 11px; color: #dce5f1; background: #132438; border: 1px solid #304660; border-radius: 9px; text-align: left; cursor: pointer; transition: .12s ease; }
.decision-choice:hover:not(:disabled) { transform: translateY(-1px); background: #173149; border-color: #4bc5bb; }
.decision-choice:disabled { opacity: .48; cursor: wait; }
.decision-choice b, .decision-choice small { display: block; }
.decision-choice b { font-size: 12px; }
.decision-choice small { margin-top: 3px; color: #8799b1; font-size: 8px; }
.decision-choice.correct b { color: #72d8ac; }
.transfer-trigger { margin-top: -1px; }
.quality-fieldset { padding: 10px; background: #101e30; border: 1px solid #273a54; border-radius: 9px; }
.save-note { min-height: 37px; padding: 8px 9px; color: #8193ad; background: #091321; border-radius: 7px; font-size: 9px; line-height: 1.5; }
.save-note.ok { color: #6ed5a8; }
.save-note.error { color: #ff998c; }
.completed-result { margin-top: 12px; padding: 13px; background: #10263a; border: 1px solid #2c4c65; border-radius: 9px; }
.completed-result span, .completed-result strong, .completed-result small { display: block; }
.completed-result span { color: #8598b0; font-size: 9px; }
.completed-result strong { margin: 5px 0; color: #77ddbb; font-size: 16px; }
.completed-result small, .completed-result p { color: #8294ad; font-size: 9px; }
.completed-result p { margin: 7px 0 0; }
.review-ops { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.review-ops form { margin: 0; }
.keyboard-help { margin: 11px 0 0; color: #64758e; font-size: 8px; line-height: 1.5; }

.image-lightbox { position: fixed; z-index: 100; inset: 0; display: grid; grid-template-rows: 58px minmax(0,1fr); color: #e7eef8; background: rgba(0,0,0,.96); }
.image-lightbox[hidden] { display: none; }
.lightbox-head { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; background: #0c1725; border-bottom: 1px solid #26384e; }
.lightbox-head button { padding: 8px 14px; color: #e3ebf6; background: #17283c; border: 1px solid #40556f; border-radius: 8px; cursor: pointer; }
.lightbox-stage { display: grid; min-height: 0; place-items: center; overflow: hidden; padding: 12px; }
.lightbox-stage img, .lightbox-stage canvas { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-stage [hidden] { display: none; }
.lightbox-stage canvas { width: min(86vh,86vw); height: min(86vh,86vw); }
.lightbox-open { overflow: hidden; }

.portal-modal { position: fixed; z-index: 110; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(2,7,14,.82); }
.portal-modal[hidden] { display: none; }
.portal-modal-card { width: min(520px,94vw); padding: 20px; color: #dce6f3; background: #101d2d; border: 1px solid #334861; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.portal-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.portal-modal-head h3 { margin: 0; }
.portal-modal-head button { padding: 6px 9px; color: #dce6f3; background: #17273a; border: 1px solid #3a4f68; border-radius: 7px; cursor: pointer; }
.portal-modal-card > p { color: #93a4ba; font-size: 11px; line-height: 1.6; }
.portal-modal-card label { color: #aebdd0; }
.portal-modal-card textarea { color: #e3ebf5; background: #07111e; border-color: #344a64; }

.queue-heading-actions, .queue-toolbar, .status-tabs, .queue-search { display: flex; align-items: center; gap: 8px; }
.queue-toolbar { justify-content: space-between; gap: 14px; margin: 15px 0; padding: 11px; background: #f6f8fc; border: 1px solid #e3e8f1; border-radius: 11px; }
.status-tabs { flex-wrap: wrap; }
.status-tab { padding: 8px 12px; color: #59677e; background: #fff; border: 1px solid #dce3ee; border-radius: 8px; font-size: 11px; font-weight: 700; }
.status-tab.active { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 5px 12px rgba(var(--accent-rgb),.2); }
.queue-search { flex: 1; justify-content: flex-end; }
.queue-search input { width: min(280px,100%); min-height: 36px; padding: 0 10px; color: var(--ink); background: #fff; border: 1px solid #d8e0ec; border-radius: 8px; }
.queue-notice { margin: 0 0 13px; padding: 10px 12px; color: #805b20; background: #fff8e9; border: 1px solid #efd9a9; border-radius: 9px; font-size: 11px; }
.queue-state { display: inline-flex; padding: 4px 7px; border-radius: 99px; font-size: 9px; font-weight: 800; }
.queue-state.pending { color: #267266; background: #e6f7f3; }
.queue-state.assigned { color: #8a611a; background: #fff4da; }
.queue-state.complete { color: #395fa2; background: #eaf0fc; }

@media (max-width: 1250px) {
  .review-page .review-grid { grid-template-columns: 190px minmax(520px,1fr) 300px; }
  .review-page .case-rail-collapsed .review-grid { grid-template-columns: 0 minmax(520px,1fr) 300px; }
  .review-page .medical-image-frame { min-height: 320px; height: 42vh; }
}

@media (max-width: 980px) {
  .sidebar-toggle { display: none; }
  .review-page .review-workspace { height: auto; min-height: 0; }
  .review-page .review-grid { display: block; height: auto; }
  .review-page .case-rail { display: none; }
  .review-page .scan-stage, .review-page .decision-panel { overflow: visible; }
  .queue-toolbar { align-items: stretch; flex-direction: column; }
  .queue-search { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .review-page .content-shell { padding: 9px; }
  .review-page .medical-image-frame { height: min(86vw,520px); }
  .roi-inset { min-width: 125px; }
  .queue-heading-actions { align-items: flex-end; flex-direction: column; }
  .queue-search { flex-wrap: wrap; }
}
