:root {
  color-scheme: light;
  --primary: #08796b;
  --primary-strong: #056257;
  --primary-soft: #e8f4f1;
  --graphite: #17211f;
  --graphite-2: #22302d;
  --graphite-3: #31413d;
  --ink: #17201f;
  --muted: #66736f;
  --line: #dce4e0;
  --line-strong: #c4d0cb;
  --surface: #ffffff;
  --canvas: #f4f7f6;
  --soft: #eef3f1;
  --green: #14805c;
  --green-bg: #e8f5ef;
  --amber: #a86608;
  --amber-bg: #fff4dd;
  --red: #b53d38;
  --red-bg: #fceceb;
  --blue: #2b6f9c;
  --blue-bg: #e9f2f8;
  --shadow-sm: 0 1px 2px rgba(18, 35, 31, 0.05);
  --shadow: 0 20px 54px rgba(12, 28, 24, 0.18);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); }
body { min-width: 320px; overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(420px, 0.65fr);
  background: var(--surface);
}
.login-visual {
  min-width: 0;
  min-height: 100vh;
  border-top: 5px solid var(--primary);
  border-right: 1px solid var(--line);
  background: url("/assets/login-port.jpg") center / cover no-repeat;
}
.login-panel {
  width: min(430px, 100%);
  align-self: center;
  justify-self: center;
  padding: 42px 42px 36px;
  background: var(--surface);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.brand-mark { display: flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 800; letter-spacing: 0; color: var(--graphite); }
.brand-box { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; border-radius: 6px; background: var(--primary); color: white; font-size: 17px; }
.login-heading { margin: 48px 0 27px; }
.login-panel h1 { margin: 0; font-size: 28px; line-height: 1.3; letter-spacing: 0; }
.login-help { margin-top: 20px; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }

.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field label { color: #344440; font-size: 13px; font-weight: 700; }
.input, .select, .textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  outline: none;
  background: white;
  color: var(--ink);
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 107, 94, 0.11); }
.input:disabled, .select:disabled, .textarea:disabled { background: #f1f3f2; color: #9aa5a1; cursor: not-allowed; }
.textarea { min-height: 112px; resize: vertical; line-height: 1.6; }
.textarea-compact { min-height: 82px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 750;
  white-space: nowrap;
}
.btn:hover { filter: brightness(0.975); }
.btn:focus-visible { outline: 3px solid rgba(11, 107, 94, 0.2); outline-offset: 1px; }
.btn:disabled { cursor: not-allowed; opacity: 0.55; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-strong); }
.btn-success { background: var(--green); color: white; }
.btn-danger { background: var(--red); color: white; }
.btn-outline { border-color: var(--line-strong); background: white; }
.btn-link { min-height: auto; padding: 4px 2px; background: transparent; color: var(--primary); }
.btn-block { width: 100%; min-height: 46px; }
.btn-sm { min-height: 32px; padding: 5px 10px; font-size: 12px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 20px 13px;
  background: var(--graphite);
  color: white;
}
.sidebar .brand-mark { padding: 0 8px 24px; color: white; }
.sidebar .brand-box { background: #1b8576; }
.workspace-label { padding: 14px 12px 7px; color: #91a49f; font-size: 11px; font-weight: 750; }
.nav { display: grid; gap: 3px; }
.nav-button {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #cbd8d4;
  font-weight: 650;
  text-align: left;
}
.nav-button:hover { background: #2a3b37; color: white; }
.nav-button.active { background: #dcebe6; color: #164f47; }
.sidebar-footer { margin-top: auto; padding: 17px 8px 3px; display: flex; gap: 10px; align-items: center; border-top: 1px solid #364844; }
.user-avatar, .person-avatar { display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; font-weight: 800; }
.user-avatar { width: 34px; height: 34px; background: #dcebe6; color: var(--primary-strong); }
.sidebar-user { margin-bottom: 3px; font-size: 13px; font-weight: 750; }
.sidebar-role { max-width: 150px; overflow: hidden; color: #94a8a3; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-scrim { display: none; }

.main { min-width: 0; }
.topbar {
  height: 70px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}
.topbar-left { min-width: 0; display: flex; align-items: center; gap: 12px; }
.page-heading { overflow: hidden; font-size: 17px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.topbar-caption { margin-top: 3px; color: var(--muted); font-size: 10px; }
.topbar-meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; }
.role-chip { padding: 5px 9px; border-radius: 999px; background: var(--green-bg); color: var(--primary-strong); font-weight: 750; }
.menu-toggle { width: 38px; height: 38px; display: none; place-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 5px; background: white; }
.menu-toggle span { width: 17px; height: 2px; display: block; background: var(--graphite); }
.content { width: 100%; max-width: 1560px; min-width: 0; margin: 0 auto; padding: 27px 28px 48px; }

.page-intro { margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.page-intro h1 { margin: 0 0 7px; font-size: 23px; line-height: 1.35; letter-spacing: 0; }
.page-intro p { max-width: 720px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.dashboard-intro { align-items: flex-end; }
.actions, .dashboard-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.review-actions { align-items: center; }
.review-date { width: 154px; }
.review-header-stat { min-height: 38px; padding: 8px 11px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: white; color: var(--muted); font-size: 12px; }
.review-header-stat strong { color: var(--ink); font-size: 15px; }
.review-viewbar { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.review-viewbar > span { color: var(--muted); font-size: 11px; }
.dashboard-controls .period-input { width: 156px; }
.context-strip {
  min-height: 38px;
  margin-bottom: 14px;
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #f9fbfa;
  color: var(--muted);
  font-size: 12px;
}
.context-strip strong { color: var(--ink); }
.context-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.context-separator { width: 1px; height: 14px; margin: 0 3px; background: var(--line-strong); }

.kpi-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; }
.dashboard-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi { min-height: 120px; padding: 17px 18px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: white; }
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--blue); }
.kpi.good::before { background: var(--green); }
.kpi.bonus::before { background: #2876a7; }
.kpi.warn::before { background: var(--amber); }
.kpi.risk::before { background: var(--red); }
.kpi-label { color: var(--muted); font-size: 12px; font-weight: 750; }
.kpi-value { margin: 12px 0 6px; color: var(--ink); font-size: 31px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.kpi-value span { margin-left: 2px; color: var(--muted); font-size: 16px; }
.kpi-note { color: var(--muted); font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(310px, 0.75fr); gap: 16px; }
.dashboard-grid > * { min-width: 0; }
.section { min-width: 0; max-width: 100%; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.section-header { min-height: 59px; padding: 14px 17px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.section-title { font-size: 15px; font-weight: 800; }
.section-subtitle { margin-top: 4px; color: var(--muted); font-size: 11px; }
.section-count { padding: 4px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 11px; font-weight: 750; }
.section-body { padding: 18px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 18px; }
.two-col > * { min-width: 0; }

.table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; }
.data-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.data-table th { padding: 10px 12px; border-bottom: 1px solid var(--line-strong); background: #f5f8f6; color: #52625e; font-size: 11px; font-weight: 750; text-align: left; white-space: nowrap; }
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 12px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafcfb; }
.data-table tbody tr.selected-row { background: #eef7f3; }
.dashboard-table { min-width: 790px; }
.table-primary { color: var(--ink); font-weight: 750; line-height: 1.45; }
.table-secondary { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.table-secondary.inline { margin: 0; }
.table-action { text-align: right; }
.person-cell { display: flex; align-items: center; gap: 9px; min-width: 138px; }
.person-avatar { width: 29px; height: 29px; background: var(--soft); color: var(--primary-strong); font-size: 11px; }
.progress-cell { min-width: 112px; display: grid; grid-template-columns: minmax(62px, 1fr) 34px; gap: 8px; align-items: center; }
.progress-cell strong { font-size: 11px; }
.muted-value { color: #9aa5a1; }

.bar { height: 7px; overflow: hidden; border-radius: 2px; background: #e9eeeb; }
.bar > span { height: 100%; display: block; background: var(--green); }
.bar.amber > span { background: #d49322; }
.bar.red > span { background: var(--red); }
.status-section .section-body { display: grid; justify-items: center; gap: 21px; }
.completion-ring { width: 132px; height: 132px; display: grid; place-items: center; position: relative; border: 10px solid var(--green-bg); border-radius: 50%; background: #f9fbfa; box-shadow: inset 0 0 0 1px #c9ded4; }
.completion-ring::before { content: none; }
.completion-ring > div { z-index: 1; display: grid; gap: 3px; text-align: center; }
.completion-ring strong { font-size: 23px; }
.completion-ring span { color: var(--muted); font-size: 11px; }
.status-breakdown { width: 100%; }
.status-row { margin: 12px 0; display: grid; grid-template-columns: 88px minmax(70px, 1fr) 34px; gap: 10px; align-items: center; }
.status-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.status-value { font-size: 12px; font-weight: 800; text-align: right; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.legend-dot.green { background: var(--green); }
.legend-dot.amber { background: var(--amber); }
.legend-dot.red { background: var(--red); }

.employee-detail-summary { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: #f7f9f8; }
.employee-detail-summary > div { min-width: 0; padding: 11px 13px; display: grid; gap: 4px; border-right: 1px solid var(--line); }
.employee-detail-summary > div:last-child { border-right: 0; }
.employee-detail-summary span { color: var(--muted); font-size: 10px; font-weight: 750; }
.employee-detail-summary strong { font-size: 20px; }
.employee-detail-list { display: grid; gap: 10px; }
.employee-detail-item { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: white; }
.employee-detail-item-head { padding: 13px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.employee-detail-item-head > div { min-width: 0; }
.employee-detail-item-head .task-title { margin-bottom: 6px; }
.employee-detail-requirement { padding: 8px 14px; display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 10px; border-top: 1px solid var(--line); background: #f8faf9; color: #4a5b56; font-size: 11px; line-height: 1.6; }
.employee-detail-requirement strong { color: var(--primary-strong); }
.employee-task-records { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.employee-task-record { min-width: 0; padding: 10px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.employee-task-record:nth-child(2n) { border-right: 0; }
.employee-task-record span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 750; }
.employee-task-record p { margin: 0; overflow-wrap: anywhere; color: #3f504b; font-size: 11px; line-height: 1.6; }
.employee-evidence-links { display: flex; flex-wrap: wrap; gap: 6px; }

.badge { min-height: 23px; padding: 3px 8px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--soft); color: #50605c; font-size: 10px; font-weight: 800; white-space: nowrap; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }

.toolbar { margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar .input { max-width: 340px; }
.toolbar .select { width: auto; min-width: 130px; }
.segmented { display: inline-flex; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 5px; background: white; }
.segment { min-height: 40px; padding: 7px 12px; border: 0; border-right: 1px solid var(--line); background: white; color: var(--muted); font-size: 12px; font-weight: 750; }
.segment:last-child { border-right: 0; }
.segment.active { background: var(--graphite); color: white; }

.task-list { display: grid; gap: 9px; }
.task-card { padding: 15px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: 6px; background: white; }
.task-card.submitted { border-left-color: var(--amber); }
.task-card.completed { border-left-color: var(--green); }
.task-card.overdue, .task-card.missed, .task-card.rejected { border-left-color: var(--red); }
.task-title { margin-bottom: 7px; font-weight: 800; line-height: 1.5; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px 13px; color: var(--muted); font-size: 11px; }
.task-standard { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); color: #475752; font-size: 11px; line-height: 1.65; }
.task-operation { margin-top: 10px; padding: 9px 11px; border-left: 2px solid var(--primary); background: #f1f7f4; color: #3c504a; font-size: 12px; line-height: 1.65; }
.task-operation span { margin-right: 9px; color: var(--primary-strong); font-size: 10px; font-weight: 800; }
.task-actions { min-width: 112px; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.review-evidence { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.review-evidence > strong { color: var(--ink); font-size: 11px; }
.review-evidence > div { display: flex; flex-wrap: wrap; gap: 6px; }
.review-result { margin-top: 10px; padding: 10px 11px; border-left: 3px solid var(--primary); background: #f4f8f6; color: #465751; }
.review-result-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 12px; }
.review-result-head strong { color: var(--ink); font-size: 11px; }
.review-result-head span { color: var(--muted); font-size: 10px; }
.review-result-scores { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 7px 14px; font-size: 11px; }
.review-result-comment { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); overflow-wrap: anywhere; font-size: 11px; line-height: 1.6; }
.review-revision-note { margin-top: 8px; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 5px 12px; border-top: 1px dashed var(--line-strong); color: var(--muted); font-size: 10px; line-height: 1.55; }
.review-revision-note strong { color: var(--primary-strong); }
.review-revision-note span { overflow-wrap: anywhere; }
.required-mark { color: var(--red); font-size: 10px; }
.operation-summary { margin-top: 7px; padding: 7px 9px; border-left: 2px solid var(--primary); background: #f2f7f5; color: #52615d; font-size: 11px; line-height: 1.55; }
.operation-summary strong { margin-right: 7px; color: var(--primary-strong); }

.empty { padding: 46px 22px; color: var(--muted); text-align: center; }
.empty.compact { padding: 28px 18px; font-size: 12px; }
.empty-title { margin-bottom: 6px; color: var(--ink); font-weight: 800; }
.notice { margin-bottom: 17px; padding: 12px 14px; border-left: 3px solid var(--blue); background: var(--blue-bg); color: #385264; font-size: 12px; line-height: 1.65; }
.notice.warn { border-left-color: var(--amber); background: var(--amber-bg); color: #704b0c; }
.notice.red { border-left-color: var(--red); background: var(--red-bg); color: #7c2822; }

.audit-list { display: grid; }
.audit-item { padding: 11px 0; display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 14px; border-bottom: 1px solid var(--line); }
.audit-item:last-child { border-bottom: 0; }
.audit-time { color: var(--muted); font-size: 11px; }
.audit-text { font-size: 12px; line-height: 1.5; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; padding: 20px; display: grid; place-items: center; background: rgba(12, 25, 22, 0.53); }
.modal { width: min(680px, 100%); max-height: min(90vh, 820px); overflow: auto; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: var(--shadow); }
.modal.modal-wide { width: min(920px, 100%); }
.modal-header { padding: 18px 21px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 17px; font-weight: 800; }
.modal-subtitle { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.icon-button { width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--muted); font-size: 19px; line-height: 1; }
.modal-body { padding: 21px; }
.modal-footer { padding: 14px 21px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.file-box { padding: 13px; border: 1px dashed var(--line-strong); border-radius: 5px; background: #f8faf9; }
.file-box input { width: 100%; }
.help-text { margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.task-brief { margin-bottom: 18px; border: 1px solid var(--line); background: #f8faf9; }
.task-brief > div { padding: 10px 12px; display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; border-bottom: 1px solid var(--line); }
.task-brief > div:last-child { border-bottom: 0; }
.task-brief span { color: var(--muted); font-size: 11px; font-weight: 750; }
.task-brief p { margin: 0; color: #394944; font-size: 12px; line-height: 1.65; }
.review-score-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }

.toast { max-width: min(420px, calc(100vw - 40px)); position: fixed; right: 20px; bottom: 20px; z-index: 200; padding: 12px 15px; border-radius: 5px; background: var(--graphite); color: white; box-shadow: var(--shadow); font-size: 12px; }
.toast.error { background: var(--red); }
.loading { min-height: 50vh; display: grid; place-items: center; color: var(--muted); }
.mono { font-family: Consolas, "Microsoft YaHei", monospace; }
.money { font-variant-numeric: tabular-nums; }
.text-red { color: var(--red); font-weight: 700; }
.text-green { color: var(--green); font-weight: 700; }
.nowrap { white-space: nowrap; }

@media (max-width: 1380px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .status-section .section-body { grid-template-columns: 150px minmax(0, 1fr); align-items: center; }
  .status-breakdown { max-width: 540px; }
}

@media (max-width: 980px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
  .dashboard-intro { align-items: flex-start; flex-direction: column; }
  .dashboard-controls { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; align-content: start; }
  .login-visual { min-height: 180px; height: 26vh; max-height: 240px; border-right: 0; background-position: center 56%; }
  .login-panel { width: 100%; padding: 30px 24px 29px; }
  .login-heading { margin-top: 34px; }
  .app-shell { display: block; }
  .sidebar { width: 232px; position: fixed; left: 0; transform: translateX(-105%); box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 25; border: 0; background: rgba(14, 25, 22, 0.4); }
  .sidebar-scrim.visible { display: block; }
  .menu-toggle { display: grid; }
  .topbar { height: 64px; padding: 0 14px; }
  .topbar-caption, .topbar-meta .date-label { display: none; }
  .topbar-meta { gap: 6px; }
  .topbar-meta .btn { padding-inline: 8px; }
  .content { padding: 20px 13px 36px; }
  .page-intro { display: grid; }
  .actions, .dashboard-controls { justify-content: flex-start; }
  .dashboard-controls { width: 100%; }
  .dashboard-controls .period-input { width: 148px; }
  .dashboard-controls .btn { min-height: 40px; }
  .task-card { grid-template-columns: 1fr; }
  .task-actions { min-width: 0; flex-direction: row; align-items: center; justify-content: space-between; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .review-score-grid { grid-template-columns: 1fr; }
  .review-viewbar { align-items: flex-start; flex-direction: column; }
  .audit-item { grid-template-columns: 1fr; gap: 3px; }
  .employee-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-detail-summary > div:nth-child(2) { border-right: 0; }
  .employee-detail-summary > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .employee-detail-item-head { align-items: flex-start; }
  .employee-detail-requirement { grid-template-columns: 1fr; gap: 4px; }
  .employee-task-records { grid-template-columns: 1fr; }
  .employee-task-record { border-right: 0; }
  .status-section .section-body { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { min-height: 105px; padding: 14px; }
  .kpi-value { margin-top: 10px; font-size: 25px; }
  .kpi-label, .kpi-note { overflow-wrap: anywhere; }
  .role-chip { max-width: 88px; overflow: hidden; text-overflow: ellipsis; }
  .dashboard-controls .period-input { width: calc(100% - 114px); min-width: 145px; }
  .task-brief > div { grid-template-columns: 1fr; gap: 5px; }
  .modal-backdrop { padding: 8px; }
  .modal { max-height: 96vh; }
  .modal-header, .modal-body { padding: 15px; }
  .modal-footer { flex-wrap: wrap; }
}

@media (max-width: 365px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .topbar-meta .role-chip { display: none; }
}

/* Operations console visual system */
body {
  line-height: 1.5;
  background: var(--canvas);
  text-rendering: optimizeLegibility;
}

button,
.btn,
.input,
.select,
.textarea {
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(8, 121, 107, 0.22);
  outline-offset: 2px;
}

.login-shell {
  grid-template-columns: minmax(0, 1.55fr) minmax(400px, 0.7fr);
  background: var(--surface);
}

.login-visual {
  border-top: 0;
  border-right-color: #d2dbd7;
  background-color: var(--graphite);
  background-image: url("/assets/login-port.jpg");
  background-position: center;
}

.login-panel {
  width: min(420px, 100%);
  padding: 44px 46px 38px;
}

.login-panel .brand-mark {
  color: var(--graphite);
}

.login-heading {
  margin: 50px 0 28px;
}

.login-panel h1 {
  font-size: 27px;
  font-weight: 800;
}

.login-help {
  margin-top: 18px;
  color: #7a8582;
}

.brand-box {
  border-radius: 6px;
  background: var(--primary);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.field label {
  color: #34423f;
}

.input,
.select,
.textarea {
  min-width: 0;
  border-color: var(--line-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(20, 38, 34, 0.02);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #aabbb4;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 121, 107, 0.12);
}

.btn {
  min-height: 40px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.btn:hover {
  filter: none;
  box-shadow: 0 2px 8px rgba(17, 34, 30, 0.1);
}

.btn-primary {
  background: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-strong);
}

.btn-success {
  background: var(--green);
}

.btn-danger {
  background: var(--red);
}

.btn-outline {
  border-color: var(--line-strong);
  background: #fff;
}

.btn-outline:hover {
  border-color: #9cafaa;
  background: #f8faf9;
}

.btn-link {
  color: var(--primary-strong);
  box-shadow: none;
}

.btn-link:hover {
  color: var(--primary);
  box-shadow: none;
}

.btn-sm {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--canvas);
}

.sidebar {
  padding: 21px 14px 16px;
  background: var(--graphite);
  border-right: 1px solid #2a3935;
  scrollbar-color: #465a55 transparent;
  scrollbar-width: thin;
}

.sidebar .brand-mark {
  padding: 0 9px 6px;
  gap: 10px;
  color: #f4f8f6;
  font-size: 17px;
}

.sidebar .brand-box {
  background: #0a8a78;
}

.sidebar-kicker {
  padding: 0 10px 20px 57px;
  color: #839b95;
  font-size: 10px;
  line-height: 1.4;
}

.workspace-label,
.nav-group-label {
  padding: 16px 12px 7px;
  color: #789089;
  font-size: 10px;
  font-weight: 700;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav-group {
  display: grid;
  gap: 3px;
}

.nav-group .nav-group-label:first-child {
  padding-top: 5px;
}

.nav-button {
  min-height: 42px;
  padding: 8px 12px 8px 8px;
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #b9c8c4;
  font-size: 13px;
  font-weight: 650;
}

.nav-button:not(:has(.nav-item-label)) {
  display: flex;
  padding-left: 15px;
}

.nav-button:hover {
  border-color: #344742;
  background: var(--graphite-2);
  color: #fff;
}

.nav-button.active {
  border-color: #36534c;
  background: #263b36;
  color: #fff;
}

.nav-indicator {
  width: 3px;
  height: 20px;
  border-radius: 3px;
  background: transparent;
}

.nav-button.active .nav-indicator {
  background: #34bba4;
}

.nav-item-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer {
  padding: 17px 9px 2px;
  border-top-color: #34443f;
}

.user-avatar {
  background: #dff3ed;
  color: var(--primary-strong);
}

.sidebar-role {
  color: #8da19c;
}

.main {
  width: 100%;
  min-width: 0;
}

.topbar {
  height: 68px;
  padding: 0 30px;
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(18, 35, 31, 0.02);
}

.page-heading {
  color: #172421;
  font-size: 17px;
}

.topbar-caption {
  color: #7a8985;
}

.role-chip {
  border: 1px solid #cce2da;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.content {
  max-width: 1500px;
  padding: 30px 32px 54px;
}

.app-shell.view-tasks .content,
.app-shell.view-review .content {
  max-width: 1180px;
}

.page-intro {
  margin-bottom: 21px;
  align-items: flex-end;
}

.page-intro h1 {
  margin-bottom: 6px;
  color: #17211f;
  font-size: 22px;
}

.page-intro p {
  color: #6a7774;
}

.context-strip,
.review-header-stat {
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.kpi-grid {
  gap: 13px;
}

.kpi {
  min-height: 116px;
  padding: 17px 18px 16px;
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
}

.kpi::before {
  inset: 0 0 auto 0;
  width: auto;
  height: 3px;
  background: var(--blue);
}

.kpi-value {
  margin: 10px 0 5px;
  font-size: 30px;
}

.kpi-note {
  line-height: 1.5;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.72fr);
  gap: 16px;
}

.section {
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
}

.section-header {
  min-height: 60px;
  padding: 14px 18px;
}

.section-title {
  color: #1c2926;
}

.section-body {
  padding: 18px;
}

.section-count,
.badge {
  border-radius: 999px;
}

.table-wrap {
  overscroll-behavior-x: contain;
  scrollbar-color: #b6c4bf #eef2f0;
  scrollbar-width: thin;
}

.data-table th {
  padding: 11px 13px;
  background: #f5f8f7;
  color: #53635f;
}

.data-table td {
  padding: 12px 13px;
  line-height: 1.55;
}

.data-table tbody tr:hover {
  background: #f8fbfa;
}

.person-avatar {
  background: #e9f2ef;
}

.bar {
  height: 7px;
  background: #e5ebe8;
}

.completion-ring {
  width: 136px;
  height: 136px;
  isolation: isolate;
  border: 0;
  background: conic-gradient(var(--green) calc(var(--progress, 0) * 1%), #e2ebe7 0);
  box-shadow: none;
}

.completion-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border: 1px solid #d8e3de;
  border-radius: 50%;
  background: #fff;
}

.completion-ring strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.employee-detail-summary,
.task-brief {
  border-radius: 6px;
  overflow: hidden;
}

.employee-detail-item {
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
}

.toolbar {
  min-width: 0;
}

.segmented {
  max-width: 100%;
  border-radius: 6px;
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar {
  display: none;
}

.segment {
  min-height: 40px;
  flex: 0 0 auto;
}

.segment.active {
  background: var(--graphite-2);
}

.task-summary {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summary-item {
  min-width: 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.summary-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.summary-item strong {
  color: var(--ink);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.summary-item.good {
  border-top: 3px solid var(--green);
}

.summary-item.warn {
  border-top: 3px solid var(--amber);
}

.summary-item.risk {
  border-top: 3px solid var(--red);
}

.summary-item.info {
  border-top: 3px solid var(--blue);
}

.task-list {
  gap: 11px;
}

.task-card {
  padding: 0;
  display: block;
  overflow: hidden;
  border-left-width: 4px;
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
}

.task-card-main {
  min-width: 0;
  padding: 17px 18px 15px;
}

.task-card > div:first-child:not(.task-card-main):not(.task-card-footer) {
  min-width: 0;
  padding: 17px 18px 15px;
}

.task-card-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.task-card-head > div {
  min-width: 0;
}

.task-title {
  margin-bottom: 7px;
  color: #182522;
  font-size: 14px;
  line-height: 1.55;
}

.task-owner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #40534e;
  font-size: 12px;
  font-weight: 700;
}

.task-meta {
  gap: 5px 13px;
  line-height: 1.55;
}

.task-detail-grid {
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.task-detail-block {
  min-width: 0;
  padding: 11px 13px;
  background: #fafcfb;
  color: #42534f;
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.task-detail-block.full,
.task-detail-block.wide {
  grid-column: 1 / -1;
}

.task-detail-label {
  margin-bottom: 5px;
  display: block;
  color: #71807c;
  font-size: 10px;
  font-weight: 800;
}

.task-standard {
  color: #445650;
}

.task-operation {
  border-left-color: var(--primary);
  background: var(--primary-soft);
}

.task-card-footer {
  min-height: 56px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: #fbfcfc;
}

.task-actions,
.task-card > .task-actions {
  min-width: 0;
  padding: 0;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.task-card > .task-actions {
  min-height: 56px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: #fbfcfc;
}

.review-evidence {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.review-result {
  margin: 12px -18px -15px;
  padding: 12px 18px;
  border: 0;
  border-top: 1px solid #d3e4dd;
  background: #f0f7f4;
}

.review-result-head strong {
  color: var(--primary-strong);
}

.review-result-scores {
  gap: 8px 18px;
  font-variant-numeric: tabular-nums;
}

.review-revision-note {
  padding: 8px 10px;
  border: 0;
  border-left: 3px solid var(--amber);
  border-radius: 4px;
  background: var(--amber-bg);
  color: #795418;
}

.review-revision-note strong {
  color: #875b10;
}

.notice {
  border-radius: 0 6px 6px 0;
}

.modal-backdrop {
  padding: 24px;
  background: rgba(10, 22, 19, 0.58);
}

.modal {
  max-height: min(90vh, 820px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 8px;
}

.modal-header {
  padding: 18px 21px;
  background: #fff;
}

.modal-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #b5c4bf #eef2f0;
  scrollbar-width: thin;
}

.modal-footer {
  background: #f8faf9;
}

.icon-button {
  border-radius: 6px;
}

.review-score-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 12px;
}

.review-score-grid > *,
.review-score-grid .input {
  min-width: 0;
}

body.modal-open {
  overflow: hidden;
}

.drawer-backdrop {
  padding: 0;
  place-items: stretch end;
}

.modal.modal-drawer {
  width: min(580px, 100%);
  height: 100dvh;
  max-height: 100dvh;
  border-block: 0;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  animation: drawer-enter 180ms ease-out;
}

.modal.modal-drawer.modal-drawer-wide {
  width: min(720px, 100%);
}

.submission-form-section {
  min-width: 0;
  margin: 22px 0 20px;
  padding-top: 19px;
  border-top: 1px solid var(--line-strong);
}

.submission-form-heading,
.submission-record-header,
.submission-review-meta {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.submission-form-heading > div,
.submission-record-header > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.submission-form-heading span,
.submission-record-kicker {
  color: var(--primary-strong);
  font-size: 10px;
  font-weight: 800;
}

.submission-form-heading strong,
.submission-record-header strong {
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.submission-form-heading code {
  max-width: 42%;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f5f8f7;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.submission-form-description,
.submission-record-description {
  margin: 9px 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.submission-fields {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}

.submission-field,
.submission-field .input,
.submission-field .select,
.submission-field .textarea {
  min-width: 0;
}

.submission-field-wide {
  grid-column: 1 / -1;
}

.field-error {
  color: var(--red);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
}

.field-error:empty {
  display: none;
}

.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"],
.submission-checkbox input[aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(181, 57, 45, 0.1);
}

.submission-checkbox-field {
  margin-bottom: 17px;
}

.submission-checkbox {
  min-width: 0;
  padding: 11px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #f8faf9;
  cursor: pointer;
}

.submission-checkbox input {
  width: 19px;
  height: 19px;
  margin: 1px 0 0;
  flex: 0 0 19px;
  accent-color: var(--primary);
}

.submission-checkbox span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.submission-checkbox strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.submission-checkbox small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.submission-note-field,
.submission-files-field {
  min-width: 0;
}

.submission-files-field .file-box {
  min-width: 0;
}

.submission-files-field input[type="file"] {
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
}

.selected-file-list {
  min-width: 0;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  list-style: none;
}

.selected-file-list li {
  min-width: 0;
  padding-top: 6px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 11px;
}

.selected-file-list li span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.selected-file-list li small {
  flex: 0 0 auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.existing-submission-files {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.existing-submission-files > span,
.submission-record-attachments > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.existing-submission-files > div,
.submission-record-attachments > div {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.submission-record {
  min-width: 0;
  margin: 20px 0;
  padding: 17px 0;
  border-block: 1px solid var(--line-strong);
}

.submission-record.compact {
  margin: 13px 0 0;
  padding: 13px 0;
}

.submission-record-header > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.submission-record-summary {
  margin: 12px 0;
  padding: 9px 11px;
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
}

.submission-record-summary span {
  color: var(--primary-strong);
  font-size: 10px;
  font-weight: 800;
}

.submission-record-summary p,
.submission-review-readonly p {
  margin: 4px 0 0;
  color: #344641;
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.submission-record-grid {
  min-width: 0;
  margin: 11px 0 0;
  display: grid;
}

.submission-record-field {
  min-width: 0;
  padding: 9px 0;
  display: grid;
  grid-template-columns: minmax(112px, 30%) minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.submission-record-field dt,
.submission-record-field dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.submission-record-field dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.submission-record-field dd {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.submission-record-url {
  color: var(--primary-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.submission-record-attachments {
  min-width: 0;
  padding-top: 12px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.submission-file-link {
  max-width: 100%;
  height: auto;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

.submission-empty {
  padding: 13px 0 2px;
  color: var(--muted);
  font-size: 12px;
}

.submission-history {
  min-width: 0;
  margin: 20px 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.submission-history-heading {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.submission-history-heading strong {
  color: var(--ink);
  font-size: 13px;
}

.submission-attempt {
  border-bottom: 1px solid var(--line);
}

.submission-attempt summary {
  min-height: 44px;
  padding: 10px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.submission-attempt summary time {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.submission-attempt-body {
  padding: 0 2px 14px;
}

.review-decision-section,
.submission-review-readonly {
  min-width: 0;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.submission-review-meta {
  margin-top: 8px;
  align-items: baseline;
}

.submission-review-meta strong {
  color: var(--ink);
  font-size: 13px;
}

.submission-review-meta span {
  color: var(--muted);
  font-size: 10px;
}

.submission-table-summary {
  max-width: 320px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  line-height: 1.55;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@keyframes drawer-enter {
  from { transform: translateX(18px); opacity: 0.75; }
  to { transform: translateX(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .modal.modal-drawer {
    animation: none;
  }
}

.compact-filter {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.compact-filter .select,
.compact-filter .input {
  width: auto;
  min-width: 138px;
  min-height: 40px;
}

.task-toolbar {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8faf9;
}

.task-toolbar > .segmented {
  min-width: 0;
  overflow-x: auto;
}

.segment-count {
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding-inline: 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #edf1ef;
  color: #52615d;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.segment.active .segment-count {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.filter-result {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.review-viewbar {
  align-items: stretch;
}

.review-filter-group,
.review-list-actions {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.review-filter-group > .segmented {
  min-width: 0;
}

.review-list-actions {
  justify-content: flex-end;
}

.review-list-actions > span {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.task-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.table-section .data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table tbody tr:nth-child(even) {
  background: #fbfcfc;
}

.data-table tbody tr:nth-child(even):hover {
  background: #f6faf8;
}

.table-numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.audit-details {
  max-width: 540px;
  overflow-wrap: anywhere;
  white-space: normal;
}

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

  .status-section .section-body {
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
  }

  .status-breakdown {
    max-width: 560px;
  }
}

@media (max-width: 980px) {
  .content {
    padding-inline: 24px;
  }

  .task-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .login-shell {
    min-height: 100dvh;
    display: block;
  }

  .login-visual {
    width: 100%;
    min-height: 130px;
    height: 22vh;
    max-height: 180px;
    border-right: 0;
    border-bottom: 3px solid var(--primary);
    background-position: center 56%;
  }

  .login-panel {
    width: min(440px, 100%);
    margin: 0 auto;
    padding: 26px 22px 30px;
  }

  .login-heading {
    margin: 28px 0 23px;
  }

  .login-panel h1 {
    font-size: 23px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    width: min(280px, 86vw);
    height: 100dvh;
    padding-top: 18px;
    transition: transform 180ms ease;
  }

  .topbar {
    height: 62px;
    padding: 0 12px;
  }

  .menu-toggle,
  .icon-button {
    width: 44px;
    height: 44px;
  }

  .content,
  .app-shell.view-tasks .content,
  .app-shell.view-review .content {
    max-width: none;
    padding: 19px 12px 36px;
  }

  .page-intro {
    margin-bottom: 17px;
    display: grid;
    align-items: start;
    gap: 13px;
  }

  .page-intro h1 {
    font-size: 20px;
  }

  .actions,
  .review-actions,
  .dashboard-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .actions > .input,
  .actions > .select,
  .review-date {
    min-height: 44px;
  }

  .toolbar {
    max-width: 100%;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .toolbar > .segmented,
  .review-viewbar .segmented {
    width: 100%;
    overflow-x: auto;
  }

  .task-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .task-toolbar > .segmented {
    width: 100%;
  }

  .compact-filter {
    width: 100%;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .compact-filter .select,
  .compact-filter .input {
    width: 100%;
    min-width: 0;
  }

  .filter-result {
    margin-left: 0;
  }

  .review-viewbar {
    align-items: stretch;
    flex-direction: column;
  }

  .review-filter-group,
  .review-list-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .review-list-actions .btn {
    margin-left: auto;
  }

  .segment {
    min-height: 44px;
    padding-inline: 13px;
  }

  .btn,
  .btn-sm {
    min-height: 44px;
  }

  .task-card-head {
    display: grid;
    gap: 9px;
  }

  .task-card-main,
  .task-card > div:first-child:not(.task-card-main):not(.task-card-footer) {
    padding: 15px 14px 13px;
  }

  .task-detail-grid {
    grid-template-columns: 1fr;
  }

  .task-detail-block.full,
  .task-detail-block.wide {
    grid-column: auto;
  }

  .task-card-footer,
  .task-card > .task-actions {
    padding: 10px 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .task-actions,
  .task-card > .task-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .task-actions .btn {
    flex: 1 1 auto;
  }

  .review-result {
    margin: 12px -14px -13px;
    padding: 12px 14px;
  }

  .review-score-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 8px;
  }

  .review-score-grid .field label {
    font-size: 11px;
  }

  .review-score-grid .input {
    padding-inline: 8px;
  }

  .modal-backdrop {
    padding: 8px;
  }

  .modal {
    max-height: calc(100dvh - 16px);
  }

  .drawer-backdrop {
    padding: 0;
  }

  .modal.modal-drawer {
    width: 100%;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .modal-header,
  .modal-body {
    padding: 15px 14px;
  }

  .modal-footer {
    padding: 10px 14px max(10px, env(safe-area-inset-bottom));
  }

  .submission-form-heading,
  .submission-record-header {
    display: grid;
  }

  .submission-form-heading code {
    max-width: 100%;
    width: fit-content;
  }

  .submission-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .submission-field-wide {
    grid-column: auto;
  }

  .submission-field .input,
  .submission-field .select,
  .submission-field .textarea {
    width: 100%;
    max-width: 100%;
  }

  .submission-record-field,
  .submission-record-attachments,
  .existing-submission-files {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .submission-record-header > span {
    flex: none;
  }

  .submission-attempt summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .submission-file-link {
    width: 100%;
    justify-content: flex-start;
  }

  .selected-file-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .submission-table-summary {
    max-width: none;
  }

  .table-wrap:has(> .responsive-table) {
    overflow: visible;
  }

  .responsive-table {
    min-width: 0;
    display: block;
    background: transparent;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody {
    display: grid;
    gap: 10px;
  }

  .responsive-table tr {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    box-shadow: var(--shadow-sm);
  }

  .responsive-table td {
    min-width: 0;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
  }

  .responsive-table td[data-label] {
    display: grid;
    grid-template-columns: minmax(82px, 31%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .responsive-table td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
  }

  .responsive-table td:last-child {
    border-bottom: 0;
  }

  .responsive-table td[colspan] {
    display: block;
    padding: 0;
  }

  .responsive-table .table-action {
    text-align: left;
  }

  .responsive-table .table-numeric {
    text-align: left;
  }

  .status-section .section-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .topbar-meta .date-label,
  .topbar-caption {
    display: none;
  }

  .topbar-meta {
    gap: 4px;
  }

  .topbar-meta .btn {
    min-width: 44px;
    padding-inline: 7px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .summary-item {
    padding: 11px 12px;
  }

  .summary-item strong {
    font-size: 18px;
  }

  .review-actions .review-date {
    width: 145px;
  }

  .modal-footer {
    flex-wrap: nowrap;
  }

  .modal-footer .btn {
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (max-width: 365px) {
  .task-summary,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .review-score-grid {
    gap: 0 6px;
  }

  .review-score-grid .input {
    padding-inline: 6px;
  }
}
