:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --navy: #16345f;
  --blue: #245ca6;
  --blue-dark: #19477f;
  --blue-soft: #eaf1fa;
  --green: #19715b;
  --green-soft: #e5f4ef;
  --amber: #9a6410;
  --amber-soft: #fff2d8;
  --red: #a63a3a;
  --red-soft: #fdeaea;
  --ink: #17243a;
  --muted: #65728a;
  --line: #dbe3ee;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  background: var(--canvas);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: linear-gradient(180deg, #f8fafd 0, var(--canvas) 360px); }
a { color: var(--blue); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
.skip-link { position: fixed; z-index: 100; top: -50px; left: 16px; padding: 10px 14px; background: var(--navy); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 10px; }

.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid rgba(219, 227, 238, .9); background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px); }
.site-header__inner { width: min(1240px, calc(100% - 32px)); min-height: 72px; margin: auto; display: flex; align-items: center; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand__mark { width: 38px; height: 38px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, var(--navy), var(--blue)); border-radius: 11px; font-weight: 800; box-shadow: 0 7px 18px rgba(22, 52, 95, .2); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.site-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.site-nav a { padding: 9px 11px; border-radius: 8px; color: #43516a; text-decoration: none; font-size: 14px; font-weight: 650; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a.is-active { background: var(--blue-soft); color: var(--blue-dark); }
.site-nav a.is-active { box-shadow: inset 0 -2px 0 var(--blue); }
.account-actions { display: flex; align-items: center; gap: 10px; }
.account-actions form { margin: 0; }
.account-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }

.page-shell { width: min(1180px, calc(100% - 32px)); min-height: calc(100vh - 160px); margin: 36px auto 56px; }
.site-footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 32px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; }
h1 { margin: 5px 0 10px; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.03em; }
h2 { margin: 0 0 8px; font-size: 21px; }
h3 { margin: 0 0 5px; font-size: 16px; }
p { line-height: 1.65; }
.muted, .help-text { color: var(--muted); }
.help-text { margin: 6px 0; font-size: 13px; }
.eyebrow { margin: 0 0 6px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.lead { max-width: 680px; color: #53627a; font-size: 18px; }

.page-heading { margin-bottom: 24px; }
.page-heading > div { min-width: 0; }
.page-heading > div > p:last-child { margin: 0; color: var(--muted); }
.page-heading--with-action { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.card { margin-bottom: 20px; padding: 24px; background: var(--surface); border: 1px solid rgba(219, 227, 238, .85); border-radius: 16px; box-shadow: 0 10px 30px rgba(25, 54, 91, .07); }
.card__header, .review-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.card__header p, .review-card__header p { margin: 0; color: var(--muted); }

.hero--home { min-height: 560px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); align-items: center; gap: 60px; padding: 62px; background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(244,248,253,.95)); border: 1px solid #dce6f2; border-radius: 24px; box-shadow: 0 25px 80px rgba(22, 52, 95, .12); }
.hero-steps { display: grid; gap: 12px; }
.hero-steps > div { display: grid; grid-template-columns: 42px 1fr; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 25px rgba(28, 58, 94, .06); }
.hero-steps span { grid-row: 1 / span 2; align-self: center; color: var(--blue); font-size: 13px; font-weight: 800; }
.hero-steps strong { font-size: 16px; }
.hero-steps small { color: var(--muted); }
.home-welcome { margin: 0 0 8px; color: var(--navy); font-size: 22px; font-weight: 800; }

.actions, .form-actions, .filter-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.actions { margin-top: 20px; }
.button, button.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 17px; border: 1px solid transparent; border-radius: 9px; background: var(--blue); color: white; text-decoration: none; font-weight: 750; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; }
.button:hover { background: var(--blue-dark); box-shadow: 0 6px 16px rgba(36, 92, 166, .18); transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button--secondary { border-color: #cbd9eb; background: var(--blue-soft); color: var(--blue-dark); }
.button--secondary:hover { background: #dce8f7; }
.button--ghost { border-color: var(--line); background: white; color: #44536b; }
.button--ghost:hover { background: #f6f8fb; color: var(--ink); }
.button--small { min-height: 34px; padding: 7px 11px; font-size: 13px; }
.button--full { width: 100%; margin-top: 10px; }
.button--danger, button.button--danger { border-color: #efc3c3; background: var(--red-soft); color: var(--red); }
.button--danger:hover, button.button--danger:hover { background: #f8d6d6; color: #8d2d2d; }
.text-button { border: 0; padding: 4px; background: none; color: var(--blue); cursor: pointer; }

.field { min-width: 0; }
.field label, fieldset legend { display: block; margin-bottom: 7px; color: #2c3d56; font-size: 14px; font-weight: 750; }
input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #c6d2e1; border-radius: 8px; background: white; color: var(--ink); outline: none; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36, 92, 166, .13); }
.form-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 22px; }
.form-layout--single { display: grid; grid-template-columns: 1fr; }
.form-card-narrow { max-width: 680px; }
.field--wide { grid-column: 1 / -1; }
.errorlist { margin: 7px 0 0; padding-left: 20px; color: var(--red); font-size: 13px; }
.form-errors { padding: 12px 15px; border: 1px solid #f1bcbc; border-radius: 9px; background: var(--red-soft); color: var(--red); }

.upload-options { margin: 0; padding: 0; border: 0; }
.upload-option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 13px; }
.upload-picker { position: relative; min-height: 142px; padding: 24px; display: flex !important; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed #9db4d2; border-radius: 13px; background: #f8fbff; text-align: center; cursor: pointer; }
.upload-picker:hover, .upload-picker:focus-within { border-color: var(--blue); background: var(--blue-soft); }
.upload-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-picker__icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 9px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 24px; }
.upload-picker small { margin-top: 5px; color: var(--muted); font-weight: 400; }
.file-summary { margin-top: 15px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.file-summary__header { display: flex; justify-content: space-between; align-items: center; }
.file-summary ul, .file-links, .activity-list { margin: 10px 0 0; padding: 0; list-style: none; }
.file-summary li, .file-links li { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; border-top: 1px solid #edf1f6; overflow-wrap: anywhere; }
.file-summary li small, .file-state { flex: 0 0 auto; color: var(--muted); font-size: 12px; }

.meta-row { display: flex; flex-wrap: wrap; gap: 14px 30px; margin: 14px 0; color: #46556d; }
.meta-row span { display: flex; flex-direction: column; gap: 2px; }
.meta-row strong { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.submission-list { margin-top: 20px; border-top: 1px solid var(--line); }
.submission-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.submission-item p { margin: 0; color: var(--muted); font-size: 13px; }
.empty-state { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--ink); font-size: 17px; }
.empty-state p { margin-bottom: 0; }

.badge { display: inline-flex; align-items: center; width: max-content; padding: 5px 9px; border-radius: 999px; background: #edf1f5; color: #516078; font-size: 12px; font-weight: 750; white-space: nowrap; }
.badge--open, .badge--accepted, .badge--ready, .badge--published { background: var(--green-soft); color: var(--green); }
.badge--submitted, .badge--processing { background: var(--blue-soft); color: var(--blue-dark); }
.badge--returned, .badge--failed { background: var(--red-soft); color: var(--red); }
.badge--closed, .badge--archived, .badge--void { background: #eceef2; color: #657087; }
.badge--draft, .badge--pending { background: var(--amber-soft); color: var(--amber); }

.filter-bar { display: grid; grid-template-columns: 1.35fr repeat(4, 1fr); gap: 14px; align-items: end; }
.filter-actions { grid-column: 1 / -1; }
.result-summary { margin: -5px 0 14px; color: var(--muted); }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.review-card { margin: 0; }
.review-card h2 { overflow-wrap: anywhere; }
.review-note { margin-top: 15px; padding: 12px; border-left: 3px solid var(--amber); background: var(--amber-soft); color: #6f4b12; }
.review-note strong { display: block; margin-bottom: 4px; }
.pagination { margin: 24px 0; display: flex; justify-content: center; align-items: center; gap: 20px; }
.two-column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .72fr); gap: 20px; align-items: start; }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.metric-card { padding: 20px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); text-decoration: none; box-shadow: 0 8px 22px rgba(28, 58, 94, .06); }
.metric-card span, .metric-card small { color: var(--muted); }
.metric-card strong { margin: 8px 0; color: var(--blue); font-size: 34px; }
.metric-card--attention { border-color: #dfc58f; background: #fffbf2; }
.metric-card--attention strong { color: var(--amber); }
.metric-card--danger { border-color: #efb9b9; background: #fff7f7; }
.metric-card--danger strong { color: var(--red); }
.table-scroll, .table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
th { background: #f2f6fb; color: #53627a; font-size: 12px; letter-spacing: .03em; }
.table-subtext { display: block; margin-top: 4px; color: var(--muted); }
.progress-row { padding: 14px 0; border-top: 1px solid var(--line); }
.progress-row > div:first-child { display: flex; justify-content: space-between; margin-bottom: 8px; }
.progress { height: 8px; margin-bottom: 8px; overflow: hidden; border-radius: 999px; background: #e8edf4; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #3e8a76); }
.activity-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.activity-list span, .activity-list small { display: block; }
.activity-list small { margin-top: 3px; color: var(--muted); }
.unit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.unit-card { padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.unit-card p { margin: 5px 0 0; }
.score-value { color: var(--green); font-size: 20px; }

.auth-layout { min-height: 580px; display: grid; grid-template-columns: 1fr 430px; align-items: center; gap: 80px; }
.auth-intro { padding: 40px; }
.auth-intro ol { padding-left: 20px; color: #53627a; line-height: 2; }
.auth-card { padding: 32px; }
.auth-card h2 { margin-bottom: 22px; }
.auth-card .field { margin-bottom: 16px; }
.messages { margin-bottom: 18px; }
.message { padding: 12px 15px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.message--success { border-color: #a9d5c7; background: var(--green-soft); color: #125948; }
.message--error { border-color: #f1bcbc; background: var(--red-soft); color: var(--red); }

@media (max-width: 900px) {
  .site-header__inner { flex-wrap: wrap; gap: 8px 18px; padding: 12px 0; }
  .site-nav { order: 3; flex: 0 0 100%; width: 100%; flex-wrap: wrap; overflow: visible; }
  .site-nav a { white-space: nowrap; }
  .project-nav__menu { position: fixed; top: 112px; left: 11px; width: min(360px, calc(100vw - 22px)); }
  .account-actions { margin-left: auto; }
  .hero--home, .auth-layout, .two-column { grid-template-columns: 1fr; }
  .hero--home { padding: 38px; gap: 30px; }
  .auth-layout { gap: 10px; }
  .auth-intro { padding: 24px 6px; }
  .filter-bar { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .page-shell, .site-header__inner, .site-footer { width: min(100% - 22px, 1180px); }
  .page-shell { margin-top: 24px; }
  .brand small, .account-name { display: none; }
  .site-nav a { padding: 8px; font-size: 13px; }
  .page-heading--with-action, .card__header, .review-card__header, .submission-item { align-items: flex-start; flex-direction: column; }
  .hero--home { min-height: auto; padding: 28px 22px; border-radius: 18px; }
  .hero--home h1 { font-size: 36px; }
  .card { padding: 18px; border-radius: 13px; }
  .form-layout, .upload-option-grid, .filter-bar, .metric-grid, .unit-grid { grid-template-columns: 1fr; }
  .filter-actions { grid-column: auto; }
  .meta-row { display: grid; grid-template-columns: 1fr 1fr; }
  .file-summary li, .file-links li { flex-direction: column; gap: 4px; }
  .site-footer { flex-direction: column; }
}
/* Shared record and workspace components */
.back-link { display: inline-flex; margin-bottom: 12px; color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--blue); }
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.title-row h1 { margin: 0; }
.workspace-heading { margin-bottom: 20px; }
.workspace-heading p, .form-page-heading > p:last-child { margin: 6px 0 0; color: var(--muted); }
.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 p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.status-pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); font-size: 12px; font-weight: 750; }
.detail-list { display: grid; grid-template-columns: 130px 1fr; margin: 18px 0 0; }
.detail-list dt, .detail-list dd { margin: 0; padding: 11px 0; border-top: 1px solid #edf1f6; }
.detail-list dt { color: var(--muted); font-size: 13px; }
.detail-list dd { overflow-wrap: anywhere; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card-grid > .card { margin: 0; }

/* Space landing */
.space-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.space-card { min-height: 230px; padding: 26px; display: flex; gap: 22px; border: 1px solid var(--line); border-radius: 18px; background: white; color: var(--ink); text-decoration: none; box-shadow: 0 12px 34px rgba(25, 54, 91, .07); transition: transform .18s, box-shadow .18s, border-color .18s; }
.space-card:hover { transform: translateY(-3px); border-color: #b8cae2; box-shadow: 0 18px 44px rgba(25, 54, 91, .12); }
.space-card__icon, .app-icon { flex: 0 0 auto; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px; background: var(--blue-soft); color: var(--blue); font-size: 24px; font-weight: 900; }
.space-card--personal .space-card__icon { background: var(--amber-soft); color: var(--amber); }
.space-card__content { min-width: 0; }
.space-card h2 { margin-top: 16px; font-size: 25px; }
.space-card p { min-height: 52px; color: var(--muted); }
.space-card strong { display: inline-flex; gap: 8px; color: var(--blue); }
.space-card--empty { border-style: dashed; box-shadow: none; }
.quick-guide { margin-top: 20px; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 18px; }
.quick-guide > div { display: flex; align-items: center; gap: 12px; }
.quick-guide > span { color: #a5b1c2; }
.quick-guide__number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 800; }
.quick-guide p, .quick-guide strong, .quick-guide small { display: block; margin: 0; }
.quick-guide small { margin-top: 3px; color: var(--muted); }

/* File manager */
.file-manager { min-height: 600px; display: grid; grid-template-columns: 250px minmax(0, 1fr); overflow: visible; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 14px 42px rgba(25, 54, 91, .08); }
.file-sidebar { min-width: 0; padding: 20px 12px; border-right: 1px solid var(--line); background: #f8fafd; border-radius: 18px 0 0 18px; }
.file-sidebar__title { padding: 0 8px 18px; display: flex; align-items: center; gap: 11px; }
.file-sidebar__title .app-icon { width: 38px; height: 38px; border-radius: 10px; font-size: 17px; }
.file-sidebar__title strong, .file-sidebar__title small { display: block; }
.file-sidebar__title small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.folder-tree { max-height: 460px; overflow: auto; padding-right: 3px; }
.folder-tree__item { min-height: 40px; margin: 2px 0 2px var(--tree-indent, 0); padding: 8px 9px; display: flex; align-items: center; gap: 8px; border-radius: 8px; color: #43516a; font-size: 13px; text-decoration: none; }
.folder-tree__item > span:nth-child(2), .folder-tree__item > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-tree__item small { margin-left: auto; color: #909bad; font-size: 10px; }
.folder-tree__item:hover, .folder-tree__item.is-active { background: #e7effa; color: var(--blue-dark); }
.folder-tree__item.is-active { font-weight: 750; }
.sidebar-note { margin: 18px 7px 0; padding: 12px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid #d9e5f4; border-radius: 10px; background: #f0f6fd; color: #52647c; }
.sidebar-note > span { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: white; font-size: 11px; font-weight: 800; }
.sidebar-note p { margin: 0; font-size: 11px; line-height: 1.55; }
.file-content { min-width: 0; }
.file-toolbar { min-height: 86px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.file-toolbar__path { min-width: 160px; }
.file-toolbar__path small { display: block; margin-top: 6px; color: var(--muted); }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.breadcrumbs a { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 14px; font-weight: 750; text-decoration: none; }
.breadcrumbs span { color: #a7b1c0; }
.file-toolbar__actions { display: flex; align-items: center; gap: 8px; }
.file-search { width: 220px; position: relative; display: flex; align-items: center; }
.file-search > span { position: absolute; left: 11px; color: #738097; }
.file-search input { min-height: 40px; padding-left: 32px; background: #f6f8fb; }
.file-search a { position: absolute; right: 9px; padding: 4px; background: #f6f8fb; font-size: 11px; text-decoration: none; }
.file-list__head, .file-row { display: grid; grid-template-columns: minmax(260px, 1fr) 100px 150px 86px; align-items: center; gap: 12px; }
.file-list__head { min-height: 42px; padding: 0 20px; background: #fbfcfe; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 750; }
.file-row { min-height: 70px; padding: 10px 20px; border-bottom: 1px solid #edf1f6; transition: background .12s; }
.file-row:hover { background: #f8fbff; }
.file-name-cell { min-width: 0; display: flex; align-items: center; gap: 13px; }
.file-name-cell > div { min-width: 0; }
.file-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 14px; font-weight: 750; text-decoration: none; }
.file-title:hover { color: var(--blue); }
.file-name-cell small { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.file-icon { flex: 0 0 auto; width: 36px; height: 36px; position: relative; display: inline-block; }
.file-icon--folder { height: 29px; margin-top: 4px; border-radius: 4px; background: #f3b948; box-shadow: inset 0 -3px 0 rgba(150, 91, 0, .08); }
.file-icon--folder::before { content: ""; position: absolute; left: 2px; top: -5px; width: 16px; height: 7px; border-radius: 4px 4px 0 0; background: #e7a72e; }
.file-icon--project { background: #4f85ca; box-shadow: inset 0 -3px 0 rgba(18, 55, 106, .12); }
.file-icon--project::before { background: #346eb7; }
.file-icon--recycle, .file-icon--muted { filter: grayscale(1); opacity: .68; }
.file-icon--document { border: 2px solid #7fa0ca; border-radius: 4px; background: #f5f9ff; }
.file-icon--document::after { content: ""; position: absolute; left: 7px; right: 7px; top: 10px; height: 2px; background: #a8bfdc; box-shadow: 0 6px #a8bfdc, 0 12px #a8bfdc; }
.file-size, .file-date { color: var(--muted); font-size: 12px; }
.file-row__actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #52627a; text-decoration: none; cursor: pointer; list-style: none; }
.icon-button:hover { background: var(--blue-soft); color: var(--blue); }
.context-menu { position: relative; }
.context-menu summary::-webkit-details-marker { display: none; }
.context-menu__panel { position: absolute; z-index: 12; top: 39px; right: 0; width: 170px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 14px 34px rgba(26, 45, 77, .16); }
.context-menu__panel a, .context-menu__panel button { width: 100%; min-height: 36px; padding: 8px 10px; display: block; border: 0; border-radius: 7px; background: white; color: var(--ink); text-align: left; text-decoration: none; font-size: 12px; cursor: pointer; }
.context-menu__panel a:hover, .context-menu__panel button:hover { background: #f3f6fa; }
.context-menu__panel button { color: var(--red); }
.file-empty { min-height: 380px; padding: 60px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.file-empty__icon { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; background: var(--blue-soft); color: var(--blue); font-size: 38px; }
.file-empty h2 { margin-top: 18px; }
.file-empty p { margin: 0 0 18px; color: var(--muted); }

/* Dialogs and upload controls */
.app-dialog { width: min(500px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 18px; background: white; box-shadow: 0 30px 80px rgba(16, 34, 64, .28); }
.app-dialog--wide { width: min(700px, calc(100% - 28px)); }
.app-dialog::backdrop { background: rgba(15, 28, 50, .48); backdrop-filter: blur(3px); }
.app-dialog > form { padding: 24px; }
.app-dialog .field { margin-top: 16px; }
.app-dialog .field label span { color: var(--muted); font-weight: 400; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dialog-header h2, .dialog-header p { margin: 0; }
.dialog-header p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.dialog-close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f1f4f8; color: #5b687c; font-size: 23px; cursor: pointer; }
.dialog-actions { margin-top: 22px; padding-top: 18px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); }
.upload-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.upload-dropzone { min-height: 170px; position: relative; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed #9eb4d1; border-radius: 14px; background: #f8fbff; text-align: center; cursor: pointer; }
.upload-dropzone:hover, .upload-dropzone:focus-within { border-color: var(--blue); background: var(--blue-soft); }
.upload-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-dropzone strong, .upload-dropzone small { display: block; }
.upload-dropzone small { max-width: 230px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.upload-dropzone__icon { width: 44px; height: 44px; margin-bottom: 10px; display: grid; place-items: center; border-radius: 13px; background: white; color: var(--blue); font-size: 24px; box-shadow: 0 5px 16px rgba(35, 78, 134, .1); }
.upload-dropzone--large { min-height: 210px; }
.selected-files { margin-top: 14px; padding: 12px 14px; display: flex; justify-content: space-between; border: 1px solid #bbd9cf; border-radius: 9px; background: var(--green-soft); color: var(--green); }
.selected-files[hidden] { display: none; }

/* Honor management */
.summary-strip { margin-bottom: 20px; padding: 17px 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: center; gap: 18px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 8px 26px rgba(25, 54, 91, .05); }
.summary-strip > div, .summary-strip > a { min-width: 0; display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.summary-strip > a:last-child { color: var(--blue); font-size: 13px; font-weight: 750; }
.summary-strip p, .summary-strip strong { display: block; margin: 0; }
.summary-strip p { color: var(--muted); font-size: 11px; }
.summary-strip strong { margin-top: 2px; color: var(--ink); font-size: 22px; }
.summary-icon { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; font-size: 18px; font-weight: 900; }
.summary-icon--gold { background: var(--amber-soft); color: var(--amber); }
.summary-icon--blue { background: var(--blue-soft); color: var(--blue); }
.summary-icon--green { background: var(--green-soft); color: var(--green); }
.summary-icon--gray { background: #edf0f4; color: #6b778a; }
.honor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.honor-main { margin: 0; }
.honor-item { padding: 18px 0; display: flex; align-items: flex-start; gap: 15px; border-top: 1px solid var(--line); }
.honor-emblem { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--amber-soft); color: var(--amber); font-size: 20px; }
.honor-item__body { min-width: 0; flex: 1; }
.honor-item__title { display: flex; justify-content: space-between; gap: 12px; }
.honor-item__title h3 { margin: 0; font-size: 16px; }
.honor-item__body > p { margin: 6px 0; color: #4f5e74; font-size: 13px; }
.honor-item__body p span, .review-row p span { margin: 0 5px; color: #a0aaba; }
.honor-meta { display: flex; gap: 18px; color: var(--muted); font-size: 11px; }
.honor-feedback { margin-top: 11px; padding: 10px 12px; border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0; background: #f2f7fd; color: #4a5c74; font-size: 12px; }
.honor-feedback strong { display: block; margin-bottom: 3px; color: var(--ink); }
.formal-honor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.formal-honor { padding: 16px; display: flex; align-items: flex-start; gap: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fffdf8; }
.formal-honor h3, .formal-honor p { margin: 0; }
.formal-honor p { margin-top: 5px; color: #536178; font-size: 12px; }
.formal-honor small { display: block; margin-top: 4px; color: var(--muted); }
.guide-card { margin: 0; position: sticky; top: 92px; }
.guide-card__icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 900; }
.guide-card h2 { margin-top: 15px; }
.guide-card ol { margin: 18px 0; padding: 0; list-style: none; }
.guide-card li { display: flex; gap: 11px; padding: 11px 0; border-top: 1px solid var(--line); }
.guide-card li > span { flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #edf3fa; color: var(--blue); font-size: 11px; font-weight: 800; }
.guide-card li strong, .guide-card li p { display: block; margin: 0; }
.guide-card li p { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.guide-tip { padding: 11px; border-radius: 9px; background: var(--amber-soft); color: #76531d; font-size: 11px; line-height: 1.55; }
.empty-state--illustrated { min-height: 310px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-state__symbol { width: 64px; height: 64px; margin-bottom: 14px; display: grid; place-items: center; border-radius: 20px; background: var(--amber-soft); color: var(--amber); font-size: 30px; }
.form-page-heading { max-width: 760px; margin-bottom: 22px; }
.record-form { max-width: 900px; }
.form-section { padding: 28px; }
.form-section__heading { display: flex; gap: 13px; margin-bottom: 22px; }
.form-section__heading > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 900; }
.form-section__heading h2, .form-section__heading p { margin: 0; }
.form-section__heading p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label b { color: var(--red); }
.sticky-form-actions { position: sticky; z-index: 8; bottom: 12px; padding: 15px 18px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 12px 34px rgba(22, 43, 78, .14); backdrop-filter: blur(12px); }
.sticky-form-actions > div { margin-right: auto; }
.sticky-form-actions strong, .sticky-form-actions small { display: block; }
.sticky-form-actions small { margin-top: 2px; color: var(--muted); }
.summary-strip--admin { grid-template-columns: repeat(3, 1fr); }
.honor-filter { display: grid; grid-template-columns: 2fr 1fr auto; gap: 14px; align-items: end; }
.filter-buttons { display: flex; gap: 8px; }
.honor-review-list { padding-bottom: 8px; }
.review-row { min-height: 86px; padding: 15px 0; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; border-top: 1px solid var(--line); }
.person-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, var(--navy), var(--blue)); color: white; font-weight: 800; }
.person-avatar--large { width: 58px; height: 58px; font-size: 20px; }
.review-row__main { min-width: 0; }
.review-row__main > div { display: flex; align-items: center; gap: 9px; }
.review-row h3, .review-row p { margin: 0; }
.review-row p { margin-top: 5px; color: #536178; font-size: 13px; }
.review-row small { display: block; margin-top: 4px; color: var(--muted); }
.review-detail-layout { margin-top: 8px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.review-summary__top { display: flex; align-items: center; gap: 15px; }
.review-summary h1 { font-size: 30px; }
.record-details { display: grid; grid-template-columns: 1fr 1fr; margin: 24px 0 0; border-top: 1px solid var(--line); }
.record-details > div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.record-details dt { color: var(--muted); font-size: 11px; }
.record-details dd { margin: 5px 0 0; }
.record-details__wide { grid-column: 1 / -1; }
.attachment-list { margin: 0; padding: 0; list-style: none; }
.attachment-list li { padding: 11px 0; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.attachment-list .file-icon { width: 30px; height: 32px; }
.attachment-list strong, .attachment-list small { display: block; }
.attachment-list small { margin-top: 3px; color: var(--muted); }
.decision-card { position: sticky; top: 92px; }
.decision-card > p { color: var(--muted); font-size: 13px; }
.decision-options { margin: 16px 0; display: grid; gap: 9px; }
.decision-options label { padding: 12px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.decision-options label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.decision-options input { margin-top: 3px; }
.decision-options strong, .decision-options small { display: block; }
.decision-options small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.actions--compact { margin-top: 0; }
.actions--compact form { margin: 0; }
.task-form__main { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.task-stepbar { max-width: 680px; margin: 0 auto 24px; display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 750; }
.task-stepbar span { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.task-stepbar b { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #e8edf4; color: #65728a; }
.task-stepbar .is-active { color: var(--blue-dark); }
.task-stepbar .is-active b { background: var(--blue); color: white; }
.task-stepbar i { height: 1px; background: var(--line); }
.task-section { padding: 0; overflow: hidden; }
.task-section__heading { padding: 20px 22px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: #f9fbfd; }
.task-section__heading > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 900; }
.task-section__heading h2, .task-section__heading p { margin: 0; }
.task-section__heading p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.task-form__identity { padding: 22px; display: grid; grid-template-columns: .75fr 1.25fr; gap: 20px; }
.task-form__schedule { padding: 22px; display: grid; grid-template-columns: .7fr 1fr auto 1fr 1.2fr; align-items: end; gap: 14px; }
.schedule-arrow { padding-bottom: 12px; color: #9aa7ba; }
.check-row span strong, .check-row span small { display: block; }
.check-row span small { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 400; }
.check-row { min-height: 42px; padding: 10px 12px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafd; }
.task-people-grid { padding: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.task-people-grid--single { grid-template-columns: minmax(0, 1fr); }
.people-picker { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfe; }
.people-picker__header { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 14px; align-items: end; }
.people-picker__header h2, .people-picker__header h3, .people-picker__header p { margin: 0; }
.people-picker__header p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.people-picker__header input { min-height: 36px; }
.selection-count { display: inline-flex; min-width: 25px; padding: 3px 7px; justify-content: center; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); font-size: 11px; }
.picker-tools { margin-top: 12px; display: flex; gap: 12px; }
.picker-tools button { padding: 0; border: 0; background: none; color: var(--blue); font-size: 12px; cursor: pointer; }
.choice-list { height: 340px; margin-top: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; background: white; scrollbar-gutter: stable; }
.choice-list > div, .choice-list ul { margin: 0; padding: 6px; list-style: none; }
.choice-list > div > div, .choice-list li { margin: 0; }
.choice-list label { min-height: 42px; padding: 8px 10px; display: flex; align-items: center; gap: 10px; border-radius: 7px; color: var(--ink); cursor: pointer; font-size: 13px; line-height: 1.35; }
.choice-list label:hover, .choice-list label:has(input:checked) { background: var(--blue-soft); color: var(--blue-dark); }
.choice-list input[type="checkbox"] { width: 18px; height: 18px; margin: 0; flex: 0 0 18px; accent-color: var(--blue); }
.choice-list label[hidden] { display: none; }
.choice-list__empty { margin: 0; padding: 26px 14px; color: var(--muted); text-align: center; font-size: 12px; }
.choice-list__empty[hidden] { display: none; }
.people-picker__meta { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.people-picker__meta strong { color: var(--blue-dark); }
.file-content { position: relative; }
.file-drop-hint { min-height: 48px; margin: 12px 18px 4px; padding: 9px 14px; display: flex; align-items: center; gap: 9px; border: 1px dashed #a7bcd7; border-radius: 10px; background: #f7faff; color: #405574; }
.file-drop-hint > span { color: var(--blue); font-size: 20px; }
.file-drop-hint small { margin-left: auto; color: var(--muted); }
.file-row[draggable="true"] { cursor: grab; }
.file-row[draggable="true"]:active { cursor: grabbing; }
.file-row.is-dragging { opacity: .42; background: var(--blue-soft); }
.is-drop-target { outline: 2px solid var(--blue); outline-offset: -2px; background: #e5f0ff !important; }
.file-drop-overlay { position: absolute; z-index: 14; inset: 74px 14px 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px dashed var(--blue); border-radius: 14px; background: rgba(234, 241, 250, .95); color: var(--blue-dark); pointer-events: none; }
.file-drop-overlay[hidden] { display: none; }
.file-drop-overlay span { font-size: 48px; }
.file-drop-overlay strong { margin-top: 10px; font-size: 18px; }
.desktop-context-menu { position: fixed; z-index: 80; width: 190px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 18px 45px rgba(20, 42, 75, .22); }
.desktop-context-menu[hidden] { display: none; }
.desktop-context-menu button { width: 100%; min-height: 38px; padding: 8px 10px; border: 0; border-radius: 7px; background: white; color: var(--ink); text-align: left; cursor: pointer; }
.desktop-context-menu button:hover { background: var(--blue-soft); }
.operation-toast { position: fixed; z-index: 90; right: 24px; bottom: 24px; max-width: 380px; padding: 13px 17px; border-radius: 10px; background: var(--navy); color: white; box-shadow: 0 14px 35px rgba(15, 36, 66, .26); }
.operation-toast[hidden] { display: none; }
.operation-toast.is-error { background: var(--red); }

/* Reviewer workspace */
.review-workspace-heading { margin-bottom: 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.review-workspace-heading h1, .review-workspace-heading p { margin: 0; }
.review-workspace-heading > div:first-child > p:last-child { margin-top: 7px; color: var(--muted); }
.review-deadline { min-width: 220px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.review-deadline small, .review-deadline strong { display: block; }
.review-deadline small { color: var(--muted); font-size: 11px; }
.review-deadline strong { margin-top: 4px; font-size: 14px; }
.review-workspace { min-height: 620px; display: grid; grid-template-columns: 220px 230px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: white; box-shadow: 0 14px 42px rgba(25, 54, 91, .08); }
.review-departments, .review-people { min-width: 0; padding: 18px 12px; border-right: 1px solid var(--line); background: #f8fafd; }
.review-people { background: #fcfdff; }
.review-panel-title { padding: 0 7px 15px; display: flex; align-items: center; gap: 9px; }
.review-panel-title > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 900; }
.review-panel-title strong, .review-panel-title small { display: block; }
.review-panel-title small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.review-departments nav, .review-people nav { display: grid; gap: 4px; }
.review-department, .review-person { padding: 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid transparent; border-radius: 10px; color: var(--ink); text-decoration: none; }
.review-department:hover, .review-person:hover { background: white; border-color: var(--line); }
.review-department.is-active, .review-person.is-active { border-color: #b9cce5; background: white; box-shadow: 0 5px 15px rgba(28, 58, 94, .07); }
.review-department strong, .review-department small, .review-person strong, .review-person small { display: block; }
.review-department small, .review-person small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.review-state { flex: 0 0 auto; color: var(--amber); font-size: 10px; font-weight: 750; }
.review-state--done { color: var(--green); }
.review-help { padding: 12px; color: var(--muted); font-size: 11px; }
.review-person { justify-content: flex-start; }
.review-person .person-avatar { width: 34px; height: 34px; font-size: 12px; }
.review-person > span:nth-child(2) { min-width: 0; flex: 1; }
.review-person > b { color: #9ca9ba; }
.review-files { min-width: 0; }
.review-files__header { min-height: 104px; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.review-person-identity { min-width: 0; display: flex; align-items: center; gap: 13px; }
.review-person-identity h2, .review-person-identity p { margin: 0; }
.review-person-identity small { color: var(--blue); font-weight: 750; }
.review-person-identity p { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.review-file-list__head, .review-file-row { display: grid; grid-template-columns: minmax(220px, 1fr) 90px 42px; align-items: center; gap: 12px; }
.review-file-list__head { min-height: 40px; padding: 0 20px; background: #fbfcfe; color: var(--muted); font-size: 10px; font-weight: 750; }
.review-file-row { min-height: 68px; padding: 10px 20px; border-top: 1px solid #edf1f6; }
.review-file-row strong, .review-file-row small { display: block; }
.review-file-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.review-file-row small, .review-file-row time { margin-top: 3px; color: var(--muted); font-size: 10px; }
.review-file-row > a { font-size: 12px; font-weight: 750; text-decoration: none; }
.review-files-empty { min-height: 390px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.review-files-empty > span { font-size: 52px; color: #aab8ca; }
.review-files-empty strong { margin-top: 12px; color: var(--ink); }
.review-files-empty p { margin: 4px 0; font-size: 12px; }

/* Recycle bin */
.recycle-warning { margin-bottom: 18px; padding: 14px 17px; display: flex; align-items: center; gap: 12px; border: 1px solid #edc8a2; border-radius: 13px; background: #fff8ed; color: #765126; }
.recycle-warning > span { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--amber-soft); color: var(--amber); font-weight: 900; }
.recycle-warning p, .recycle-warning strong { display: block; margin: 0; }
.recycle-warning p { font-size: 12px; }
.recycle-warning strong { margin-bottom: 2px; color: #5e3d18; font-size: 13px; }
.recycle-card { padding: 0; overflow: hidden; }
.recycle-list__head, .recycle-row { display: grid; grid-template-columns: minmax(280px, 1fr) 130px 145px 220px; align-items: center; gap: 14px; }
.recycle-list__head { min-height: 43px; padding: 0 20px; background: #f7f9fc; color: var(--muted); font-size: 11px; font-weight: 750; }
.recycle-row { min-height: 82px; padding: 13px 20px; border-top: 1px solid var(--line); }
.recycle-row strong, .recycle-row small { display: block; }
.recycle-row small, .recycle-row time, .recycle-size { color: var(--muted); font-size: 11px; }
.recycle-size small { margin-top: 3px; }
.recycle-actions { display: flex; justify-content: flex-end; gap: 7px; }
.recycle-actions form { margin: 0; }
.recycle-empty { min-height: 350px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.recycle-empty > span { color: #9ba8b9; font-size: 58px; }
.recycle-empty h2 { margin: 12px 0 3px; }
.recycle-empty p { margin: 0; }

@media (max-width: 980px) {
  .task-form__main { grid-template-columns: 1fr 1fr; }
  .task-people-grid { grid-template-columns: 1fr; }
  .file-manager { grid-template-columns: 210px minmax(0, 1fr); }
  .file-toolbar { align-items: flex-start; flex-direction: column; }
  .file-toolbar__actions { width: 100%; }
  .file-search { flex: 1; }
  .file-list__head, .file-row { grid-template-columns: minmax(220px, 1fr) 130px 70px; }
  .file-list__head span:nth-child(2), .file-size { display: none; }
  .honor-layout, .review-detail-layout { grid-template-columns: 1fr; }
  .guide-card, .decision-card { position: static; }
  .task-form__schedule { grid-template-columns: 1fr 1fr; }
  .schedule-arrow { display: none; }
  .review-workspace { grid-template-columns: 190px 210px minmax(0, 1fr); }
  .recycle-list__head, .recycle-row { grid-template-columns: minmax(230px, 1fr) 110px 190px; }
  .recycle-list__head span:nth-child(3), .recycle-row time { display: none; }
}

@media (max-width: 700px) {
  .task-form__main, .people-picker__header { grid-template-columns: 1fr; }
  .file-drop-hint { display: none; }
  .space-grid, .card-grid, .form-grid, .upload-choice-grid, .formal-honor-grid { grid-template-columns: 1fr; }
  .space-card { min-height: 0; padding: 20px; }
  .quick-guide { grid-template-columns: 1fr; }
  .quick-guide > span { display: none; }
  .file-manager { display: block; min-height: 0; overflow: hidden; }
  .file-sidebar { padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; }
  .file-sidebar__title, .sidebar-note { display: none; }
  .folder-tree { max-height: none; display: flex; overflow-x: auto; }
  .folder-tree__item { flex: 0 0 auto; margin-left: 0 !important; white-space: nowrap; }
  .folder-tree__item small { display: none; }
  .file-toolbar { padding: 14px; }
  .file-toolbar__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .file-search { width: 100%; grid-column: 1 / -1; }
  .file-toolbar__actions .button { padding: 9px 11px; }
  .file-list__head { display: none; }
  .file-row { min-height: 74px; padding: 11px 14px; grid-template-columns: minmax(0, 1fr) auto; }
  .file-size, .file-date { display: none; }
  .file-empty { min-height: 300px; }
  .summary-strip { grid-template-columns: repeat(3, 1fr); padding: 13px; gap: 7px; }
  .summary-strip > div, .summary-strip > a { flex-direction: column; align-items: flex-start; }
  .summary-strip > a:last-child { display: none; }
  .summary-icon { width: 34px; height: 34px; }
  .honor-item__title { flex-direction: column; gap: 6px; }
  .honor-item__title .badge { align-self: flex-start; }
  .honor-meta { flex-direction: column; gap: 2px; }
  .form-section { padding: 20px; }
  .sticky-form-actions { position: static; align-items: stretch; flex-direction: column; }
  .sticky-form-actions > div { margin: 0 0 5px; }
  .honor-filter { grid-template-columns: 1fr; }
  .review-row { grid-template-columns: 40px minmax(0, 1fr); }
  .review-row > .button { grid-column: 1 / -1; }
  .record-details { grid-template-columns: 1fr; }
  .record-details__wide { grid-column: auto; }
  .task-stepbar { display: none; }
  .task-form__identity, .task-form__schedule { grid-template-columns: 1fr; }
  .review-workspace-heading { align-items: stretch; flex-direction: column; }
  .review-workspace { display: block; min-height: 0; }
  .review-departments, .review-people { border-right: 0; border-bottom: 1px solid var(--line); }
  .review-departments nav, .review-people nav { display: flex; overflow-x: auto; }
  .review-department, .review-person { flex: 0 0 auto; }
  .review-files__header { align-items: flex-start; flex-direction: column; }
  .review-file-list__head { display: none; }
  .review-file-row { grid-template-columns: minmax(0, 1fr) auto; }
  .review-file-row time { display: none; }
  .recycle-list__head { display: none; }
  .recycle-row { grid-template-columns: 1fr; align-items: start; }
  .recycle-actions { justify-content: flex-start; }
}

/* Continuous reviewer workspace */
.review-workspace-shell { position: relative; left: 50%; width: min(1540px, calc(100vw - 32px)); transform: translateX(-50%); }
.review-continuous-workspace { min-height: 690px; height: calc(100vh - 210px); max-height: 920px; display: grid; grid-template-columns: 250px 370px minmax(480px, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 14px 42px rgba(25, 54, 91, .08); }
.review-navigator { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #f8fafd; }
.review-navigator__section { padding: 16px 12px; }
.review-navigator__section:first-child { flex: 0 0 auto; border-bottom: 1px solid var(--line); }
.review-navigator__people { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.review-department-list { display: grid; gap: 4px; }
.review-person-list { min-height: 0; display: grid; align-content: start; gap: 4px; overflow-y: auto; }
.review-library { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #fff; }
.review-library__person { min-height: 105px; padding: 17px 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 13px; border-bottom: 1px solid var(--line); }
.review-person-stepper { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.review-person-stepper a, .review-person-stepper span { min-height: 33px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; text-align: center; text-decoration: none; font-size: 11px; font-weight: 750; }
.review-person-stepper a { background: #fff; color: var(--blue); }
.review-person-stepper a:hover { border-color: #aac0dd; background: var(--blue-soft); }
.review-person-stepper span { color: #aab3c0; background: #f6f8fa; }
.review-directory-heading { padding: 13px 17px 9px; display: flex; align-items: center; gap: 9px; }
.review-directory-heading > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 900; }
.review-directory-heading strong, .review-directory-heading small { display: block; }
.review-directory-heading small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.review-folder-tree { max-height: 190px; padding: 0 12px 12px; display: grid; align-content: start; gap: 3px; overflow-y: auto; }
.review-folder-tree__item { min-width: 0; min-height: 32px; margin-left: var(--tree-indent, 0); padding: 6px 9px; display: flex; align-items: center; gap: 7px; border-radius: 7px; color: #45546b; text-decoration: none; font-size: 11px; }
.review-folder-tree__item:hover { background: #f3f6fa; color: var(--ink); }
.review-folder-tree__item.is-active { background: var(--blue-soft); color: var(--blue-dark); }
.review-folder-tree__item span:last-child, .review-folder-tree__item strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-current-folder { min-height: 54px; padding: 10px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fbfcfe; }
.review-current-folder > small { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.review-breadcrumbs { display: flex; align-items: center; gap: 6px; overflow-x: auto; white-space: nowrap; font-size: 11px; }
.review-breadcrumbs a { font-weight: 700; text-decoration: none; }
.review-breadcrumbs span { color: #9ca8b8; }
.review-file-browser { min-height: 0; flex: 1; overflow-y: auto; }
.review-browser-item { min-height: 66px; padding: 10px 15px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid #edf1f6; color: var(--ink); text-decoration: none; }
.review-browser-item:hover { background: #f8faff; }
.review-browser-item.is-active { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.review-browser-item > span:nth-child(2) { min-width: 0; }
.review-browser-item strong, .review-browser-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-browser-item strong { font-size: 12px; }
.review-browser-item small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.review-browser-item > b { color: var(--blue); font-size: 10px; }
.review-browser-empty { min-height: 210px; padding: 30px 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.review-browser-empty > span { color: #aab8ca; font-size: 42px; }
.review-browser-empty strong { margin-top: 9px; color: var(--ink); }
.review-browser-empty small { margin-top: 4px; }
.review-preview-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #f2f5f9; }
.review-preview-header { min-height: 82px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: white; }
.review-preview-header h2, .review-preview-header p { margin: 0; }
.review-preview-header h2 { max-width: 520px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.review-preview-header p { margin-top: 3px; color: var(--muted); font-size: 10px; }
.review-preview-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; }
.review-file-description { margin: 0; padding: 9px 18px; border-bottom: 1px solid var(--line); background: #fffdf7; color: #685c43; font-size: 11px; }
.review-preview-toolbar { min-height: 47px; padding: 7px 14px; display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--line); background: white; }
.review-preview-toolbar button { min-width: 38px; min-height: 34px; padding: 6px 10px; border: 1px solid #c9d4e2; border-radius: 8px; background: #fff; color: var(--blue-dark); font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.review-preview-toolbar button:hover { border-color: #9eb5d2; background: var(--blue-soft); }
.review-preview-toolbar button:disabled { opacity: .42; cursor: default; }
.review-preview-toolbar output { min-width: 50px; color: var(--ink); text-align: center; font-size: 12px; font-weight: 800; }
.review-preview-toolbar .review-preview-reset { min-width: auto; font-size: 11px; }
.review-preview-toolbar small { margin-left: auto; color: var(--muted); font-size: 10px; }
.review-preview-stage { min-height: 0; flex: 1; padding: 14px; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
.review-preview-zoom-surface { position: relative; min-width: 100%; min-height: 520px; }
.review-preview-zoom-canvas { position: absolute; inset: 0 auto auto 0; display: flex; align-items: center; justify-content: center; transform-origin: top left; will-change: transform; }
.review-preview-stage iframe { width: 100%; height: 100%; min-height: 520px; border: 1px solid #cad4e1; border-radius: 8px; background: white; box-shadow: 0 7px 24px rgba(24, 45, 74, .08); }
.review-preview-stage img { max-width: 100%; max-height: 100%; border-radius: 7px; background: white; box-shadow: 0 7px 24px rgba(24, 45, 74, .13); }
.review-preview-note { margin: 0; padding: 9px 15px; border-top: 1px solid #ead5a8; background: #fff9ea; color: #74541f; font-size: 10px; text-align: center; }
.review-preview-placeholder { min-height: 0; flex: 1; padding: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.review-preview-placeholder > span:not(.preview-spinner) { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: #e6edf6; color: #6b7e98; font-size: 28px; }
.review-preview-placeholder h2, .review-preview-placeholder h3 { margin: 15px 0 5px; color: var(--ink); }
.review-preview-placeholder p { max-width: 430px; margin: 0 0 14px; font-size: 12px; }
.review-preview-placeholder small { max-width: 480px; }
.preview-spinner { width: 42px; height: 42px; border: 4px solid #d7e2f0; border-top-color: var(--blue); border-radius: 50%; animation: preview-spin .8s linear infinite; }
@keyframes preview-spin { to { transform: rotate(360deg); } }

/* Project manager and scoring workspace */
.setup-unit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.setup-unit-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.setup-unit-card .check-row { margin-top: 12px; }
.task-toggle-stack { display: grid; gap: 9px; }
.department-management { display: grid; gap: 18px; }
.department-add { padding: 16px; border: 1px dashed #b8c7da; border-radius: 12px; background: #f8fbff; }
.department-add small { display: block; margin-top: 6px; color: var(--muted); }
.department-assignment { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.department-assignment .card__header { margin: 0; padding: 16px 18px; border-bottom: 1px solid var(--line); background: #f7f9fc; }
.department-person-list { display: grid; }
.department-person-row { min-width: 0; padding: 13px 18px; display: grid; grid-template-columns: minmax(180px, .55fr) minmax(320px, 1fr); align-items: center; gap: 18px; border-top: 1px solid #edf1f6; }
.department-person-row:first-child { border-top: 0; }
.department-person-row[hidden] { display: none; }
.department-person-row__identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.department-person-row__identity > span:last-child { min-width: 0; }
.department-person-row__identity strong, .department-person-row__identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.department-person-row__identity small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.department-choice-grid > div, .department-checkbox-list { display: flex; flex-wrap: wrap; gap: 7px; }
.department-choice-grid label, .department-checkbox-list label { margin: 0; padding: 7px 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cbd7e6; border-radius: 999px; background: white; color: #43516a; font-size: 12px; font-weight: 700; cursor: pointer; }
.department-choice-grid label:has(input:checked), .department-checkbox-list label:has(input:checked) { border-color: #98b5da; background: var(--blue-soft); color: var(--blue-dark); }
.department-choice-grid input, .department-checkbox-list input { width: 15px; height: 15px; accent-color: var(--blue); }
.reviewer-scope-fields { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
.reviewer-scope-fields .reviewer-all-toggle { margin: 0; white-space: nowrap; }
.reviewer-scope-fields .department-choice-grid input:disabled + span,
.reviewer-scope-fields .department-choice-grid label:has(input:disabled) { opacity: .48; cursor: not-allowed; }
.category-formset { display: grid; gap: 14px; }
.category-form-list { display: grid; gap: 14px; }
.category-config-card { margin-bottom: 0; }
.category-config-card__heading { margin-bottom: 16px; display: flex; align-items: center; gap: 11px; }
.category-config-card__heading > div { min-width: 0; }
.category-delete-button { margin-left: auto; flex: 0 0 auto; }
.category-config-card__heading strong, .category-config-card__heading small { display: block; }
.category-config-card__heading small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.category-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue-dark); font-size: 11px; font-weight: 900; }
.category-config-grid { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(300px, 1.3fr) minmax(260px, 1fr); align-items: start; gap: 16px; }
.category-toggles { display: flex; flex-wrap: wrap; gap: 9px; grid-column: 1 / -1; }
.category-toggles .check-row { margin: 0; }
.scoring-switch { display: grid; justify-items: start; gap: 7px; }
.scoring-switch form { margin: 0; }
.project-nav { position: relative; flex: 0 0 auto; }
.project-nav summary { min-height: 38px; padding: 8px 10px; display: flex; align-items: center; gap: 6px; border: 1px solid #cbd9eb; border-radius: 9px; background: #f1f6fd; color: var(--navy); font-size: 13px; cursor: pointer; list-style: none; }
.project-nav summary::-webkit-details-marker { display: none; }
.project-nav summary strong { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 850; }
.project-nav[open] summary, .project-nav.is-active summary { border-color: #8eacd2; background: #e1ecf9; box-shadow: inset 0 -2px 0 var(--blue); }
.project-nav__menu { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: 270px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 16px 45px rgba(22, 52, 95, .18); }
.project-nav__heading { padding: 8px 9px 10px; border-bottom: 1px solid #edf1f6; }
.project-nav__heading strong, .project-nav__heading small { display: block; }
.project-nav__heading strong { overflow-wrap: anywhere; font-size: 13px; }
.project-nav__heading small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.site-nav .project-nav__menu a { margin-top: 4px; padding: 9px; display: block; }
.project-nav__menu a span, .project-nav__menu a small { display: block; }
.project-nav__menu a span { font-weight: 800; }
.project-nav__menu a small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 500; }
.setup-reviewer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.setup-reviewer-row { min-width: 0; padding: 12px; display: grid; grid-template-columns: 38px minmax(100px, .7fr) minmax(150px, 1fr); align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.setup-reviewer-row > div { min-width: 0; }
.setup-reviewer-row strong, .setup-reviewer-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setup-reviewer-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.score-sheet-form { max-width: 1120px; }
.score-rule-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: linear-gradient(135deg, #fff, #eef5ff); }
.score-rule-card strong { font-size: 22px; }
.score-rule-card p { margin: 5px 0 0; color: var(--muted); }
.score-live-total { min-width: 180px; padding: 14px 18px; border: 1px solid #cbdcf0; border-radius: 12px; background: white; text-align: right; }
.score-live-total small { display: block; color: var(--muted); font-size: 11px; }
.score-live-total output { color: var(--blue); font-size: 34px; font-weight: 850; font-variant-numeric: tabular-nums; }
.score-live-total output.is-valid { color: var(--green); }
.score-live-total output.is-invalid { color: var(--red); }
.score-live-total span { color: var(--muted); font-size: 13px; }
.score-criterion-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.score-criterion { margin-bottom: 0; padding: 20px; }
.score-criterion__heading { display: flex; align-items: center; gap: 10px; }
.score-criterion__heading > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 850; }
.score-criterion__heading h2, .score-criterion__heading p { margin: 0; }
.score-criterion__heading h2 { font-size: 17px; }
.score-criterion__heading p { margin-top: 2px; color: var(--muted); font-size: 11px; }
.score-input-wrap { margin-top: 18px; display: flex; align-items: center; gap: 8px; }
.score-input-wrap input { min-width: 0; height: 58px; text-align: center; font-size: 25px; font-weight: 800; font-variant-numeric: tabular-nums; }
.score-input-wrap b { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.score-detail-table th small { display: block; margin-top: 3px; color: var(--muted); font-weight: 500; }

@media (max-width: 1200px) {
  .review-continuous-workspace { grid-template-columns: 220px 330px minmax(400px, 1fr); }
}

@media (max-width: 980px) {
  .setup-unit-grid, .score-criterion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-reviewer-grid { grid-template-columns: 1fr; }
  .department-person-row { grid-template-columns: 1fr; }
  .category-config-grid { grid-template-columns: 1fr 1fr; }
  .category-description { grid-column: span 1; }
  .review-workspace-shell { width: min(100%, calc(100vw - 32px)); }
  .review-continuous-workspace { height: auto; max-height: none; grid-template-columns: 220px minmax(0, 1fr); }
  .review-navigator { grid-row: 1 / 3; }
  .review-library { min-height: 650px; border-right: 0; }
  .review-preview-panel { min-height: 640px; grid-column: 2; border-top: 1px solid var(--line); }
  .review-preview-stage { height: 560px; flex: none; }
}

@media (max-width: 700px) {
  .setup-unit-grid, .score-criterion-grid { grid-template-columns: 1fr; }
  .setup-reviewer-row { grid-template-columns: 38px minmax(0, 1fr); }
  .setup-reviewer-row > input { grid-column: 1 / -1; }
  .department-person-row { padding: 13px; }
  .reviewer-scope-fields, .category-config-grid { grid-template-columns: 1fr; }
  .department-choice-grid > div, .department-checkbox-list { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  .department-choice-grid label, .department-checkbox-list label { flex: 0 0 auto; }
  .score-rule-card { align-items: stretch; flex-direction: column; }
  .score-live-total { width: 100%; text-align: left; }
  .review-workspace-shell { width: 100%; }
  .review-continuous-workspace { display: block; border-radius: 14px; }
  .review-navigator { border-right: 0; }
  .review-navigator__section:first-child { border-bottom: 1px solid var(--line); }
  .review-department-list, .review-person-list { display: flex; overflow-x: auto; }
  .review-department, .review-person { flex: 0 0 190px; }
  .review-library { min-height: 560px; border-top: 1px solid var(--line); }
  .review-folder-tree { max-height: none; display: flex; overflow-x: auto; }
  .review-folder-tree__item { flex: 0 0 auto; margin-left: 0; }
  .review-preview-panel { min-height: 560px; border-top: 1px solid var(--line); }
  .review-preview-header { align-items: flex-start; flex-direction: column; }
  .review-preview-toolbar { position: sticky; top: 110px; z-index: 2; flex-wrap: wrap; padding: 8px 12px; }
  .review-preview-toolbar button { min-width: 42px; min-height: 40px; }
  .review-preview-toolbar .review-preview-reset { min-width: 84px; }
  .review-preview-toolbar small { width: 100%; margin: 0; }
  .review-preview-stage { height: min(72vh, 620px); min-height: 420px; max-height: 620px; padding: 10px; }
  .review-preview-zoom-surface { min-height: 440px; }
  .review-preview-stage iframe { min-height: 440px; }
}
