:root {
  --bg: #f4f7f8;
  --panel: #ffffff;
  --panel-soft: #f8fbfb;
  --line: #dbe4e6;
  --line-strong: #b8c8cc;
  --text: #17252a;
  --muted: #65777d;
  --muted-2: #7f9095;
  --primary: #05736f;
  --primary-dark: #045d5a;
  --primary-soft: #e2f2f0;
  --accent: #b54d1f;
  --accent-soft: #fff1e8;
  --ok: #247a3d;
  --ok-soft: #e8f5eb;
  --warn: #b7791f;
  --warn-soft: #fff7df;
  --danger: #b42318;
  --shadow: 0 12px 34px rgba(22, 44, 51, 0.1);
  --sticky-topbar-height: 93px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: clip;
}

#app {
  width: 100%;
  min-height: 100vh;
  overflow-x: clip;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.boot-panel {
  display: grid;
  gap: 14px;
  justify-items: center;
  color: var(--muted);
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--primary);
  font-size: 28px;
  font-weight: 800;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(360px, 1fr);
  background: #edf4f4;
}

.login-aside {
  padding: clamp(28px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #0c4f4d;
  color: #f6ffff;
}

.login-aside h1 {
  margin: 24px 0 14px;
  font-size: 48px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.login-aside p {
  max-width: 560px;
  margin: 0;
  color: #cde5e3;
  line-height: 1.8;
}

.login-system-name {
  margin-bottom: 8px !important;
  color: #f6ffff !important;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.55 !important;
  overflow-wrap: anywhere;
}

.login-points {
  display: grid;
  gap: 10px;
  margin-top: 34px;
}

.login-point {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #ecfbfb;
  line-height: 1.7;
}

.login-point::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f5b46a;
}

.login-main {
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-card {
  width: min(100%, 520px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title h2,
.section-title h3 {
  margin: 0;
  line-height: 1.25;
}

.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.field-stack {
  display: grid;
  gap: 14px;
}

.field {
  position: relative;
}

.field label,
.field-title {
  display: block;
  margin-bottom: 7px;
  color: #34454b;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  outline: none;
}

input,
select {
  min-height: 40px;
  padding: 0 12px;
}

textarea {
  min-height: 84px;
  resize: vertical;
  padding: 10px 12px;
  line-height: 1.6;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 115, 111, 0.12);
}

.suggestion-picks-template {
  display: none;
}

.suggestion-popover {
  position: fixed;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  z-index: 1200;
  max-width: calc(100vw - 24px);
  max-height: 132px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #b9dddd;
  border-radius: 8px;
  background: rgba(250, 254, 253, 0.98);
  box-shadow: 0 10px 28px rgba(17, 54, 59, 0.16);
}

.suggestion-popover span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.suggestion-popover button {
  max-width: min(260px, 100%);
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #b9dddd;
  border-radius: 6px;
  color: #045d5a;
  background: #f2fbfa;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.suggestion-popover button:hover {
  border-color: var(--primary);
  background: #e2f2f0;
}

.date-combo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}

.date-picker-native {
  min-width: 44px;
  padding: 0 8px;
  color: transparent;
  cursor: pointer;
}

.date-picker-native::-webkit-calendar-picker-indicator {
  opacity: 1;
  cursor: pointer;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 6px;
  padding: 0 14px;
  color: #223136;
  background: #edf2f3;
  border: 1px solid #d3dedf;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.btn:hover:not(:disabled) {
  background: #e2eaeb;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(18, 61, 66, 0.08);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.btn.primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

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

.btn.danger {
  color: var(--danger);
  background: #fff3f1;
  border-color: #ffc9c3;
}

.btn.ghost {
  background: transparent;
}

.sidebar .btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.42);
}

.sidebar .btn.ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.btn:disabled {
  cursor: not-allowed;
  color: #9aa7ab;
  background: #eef2f3;
  border-color: #dde5e6;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(240, 168, 75, 0.5);
  outline-offset: 2px;
}

.message {
  min-height: 20px;
  margin-top: 12px;
  color: var(--danger);
  font-size: 14px;
}

.app-toast {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 200;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #b8d7c1;
  border-left: 5px solid var(--ok);
  border-radius: 8px;
  color: #17351f;
  background: #f1fbf4;
  box-shadow: 0 16px 40px rgba(23, 37, 42, 0.16);
  animation: toast-in 0.22s ease-out;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-toast.danger {
  border-color: #ffc9c3;
  border-left-color: var(--danger);
  color: #6d1c15;
  background: #fff5f3;
}

.app-toast strong {
  font-size: 15px;
}

.app-toast span {
  color: inherit;
  line-height: 1.55;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  overflow-x: clip;
  transition: grid-template-columns 0.2s ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 88px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  color: #f7ffff;
  background: #123d42;
  transition: padding 0.2s ease;
}

.sidebar-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px 2px;
}

.side-brand-button {
  width: 100%;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.side-brand-button:hover,
.side-brand-button:focus-visible {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.side-brand-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 3px;
}

.side-brand .brand-mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f0a84b;
  color: #103235;
  font-size: 23px;
}

.side-brand strong,
.side-brand span {
  display: block;
}

.side-brand-copy {
  min-width: 0;
}

.side-brand strong {
  font-size: 18px;
  line-height: 1.1;
}

.side-brand span {
  margin-top: 3px;
  color: #b9d1d3;
  font-size: 12px;
  white-space: nowrap;
}

.sidebar-toggle {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  color: #dceff0;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.sidebar-toggle span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.app-shell:not(.sidebar-collapsed) .sidebar-toggle .ui-icon {
  transform: rotate(180deg);
}

.sidebar-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.sidebar-toggle:active {
  transform: translateY(0);
}

.sidebar-toggle .ui-icon {
  transition: transform 0.2s ease;
}

.user-box {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.user-avatar {
  width: 34px;
  height: 34px;
  display: grid !important;
  place-items: center;
  border-radius: 50%;
  color: #123d42 !important;
  background: #f0a84b;
  font-size: 15px !important;
  font-weight: 800;
}

.user-box strong,
.user-box span {
  display: block;
}

.user-box span {
  color: #bdd2d5;
  font-size: 13px;
  margin-top: 4px;
}

.nav-list {
  display: grid;
  align-content: start;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-section-title {
  margin: 12px 2px 1px;
  color: #9fbbbd;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.nav-subsection {
  margin: 6px 2px 0;
  padding-left: 8px;
  color: #b8d1d2;
  font-size: 12px;
}

.nav-btn {
  position: relative;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 12px 0 14px;
  border-radius: 6px;
  color: #dceff0;
  background: transparent;
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  transform: translateX(2px);
}

.nav-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 3px 0 #f0a84b;
  font-weight: 700;
}

.ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-btn .ui-icon {
  color: #b8d1d2;
}

.nav-btn:hover .ui-icon,
.nav-btn.active .ui-icon {
  color: #fff;
}

.icon-btn-text {
  gap: 8px;
}

.icon-tile {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: var(--primary);
  background: #e8f4f3;
}

.icon-tile.soft {
  width: 32px;
  height: 32px;
  background: #eef6f6;
}

.icon-tile.large {
  width: 48px;
  height: 48px;
}

.nav-btn-sub {
  min-height: 36px;
  padding-left: 22px;
}

.sidebar-collapsed .sidebar {
  align-items: center;
  gap: 12px;
  padding: 16px 12px;
}

.sidebar-collapsed .sidebar-head {
  width: 100%;
  grid-template-columns: 1fr;
  justify-items: center;
}

.sidebar-collapsed .side-brand {
  width: 100%;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.sidebar-collapsed .side-brand-button {
  display: grid;
  place-items: center;
}

.sidebar-collapsed .side-brand > :not(.brand-mark),
.sidebar-collapsed .user-box {
  display: none;
}

.sidebar-collapsed .nav-section-title {
  width: 30px;
  height: 1px;
  margin: 5px auto;
  overflow: hidden;
  color: transparent;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0;
}

.sidebar-collapsed .nav-btn span,
.sidebar-collapsed .sidebar-toggle span {
  position: absolute;
  width: 1px;
  height: 1px;
  font-size: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.sidebar-collapsed .side-bottom .btn {
  font-size: 0;
}

.sidebar-collapsed .sidebar-toggle,
.sidebar-collapsed .nav-btn,
.sidebar-collapsed .side-bottom .btn {
  width: 44px;
  min-width: 44px;
  justify-content: center;
  padding: 0;
}

.sidebar-collapsed .nav-btn.active {
  box-shadow: inset 3px 0 #f0a84b;
}

.sidebar-collapsed .nav-btn:hover {
  transform: translateY(-1px);
}

.sidebar-collapsed .nav-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-right: 0;
  overflow-x: hidden;
  scrollbar-width: none;
}

.sidebar-collapsed .nav-list::-webkit-scrollbar {
  display: none;
}

.sidebar-collapsed .side-bottom {
  width: 100%;
}

.side-bottom {
  flex: 0 0 auto;
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.side-bottom .btn {
  width: 100%;
  min-height: 40px;
  justify-content: center;
}

.side-bottom .btn .ui-icon {
  width: 17px;
  height: 17px;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 78px;
  padding: 14px 22px;
  background: rgba(244, 247, 248, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.save-status {
  min-width: 116px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #d7e3e4;
  border-radius: 6px;
  color: var(--muted);
  background: #eef4f4;
  font-size: 13px;
}

.progress-line {
  width: min(320px, 44vw);
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8ea;
}

.progress-line span {
  display: block;
  height: 100%;
  background: var(--primary);
  transition: width 0.24s ease;
}

.content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 22px;
  min-width: 0;
}

.content > * {
  width: 100%;
}

.finder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.dashboard-page {
  display: grid;
  gap: 16px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
}

.dashboard-eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-hero h2 {
  margin: 0;
  font-size: 24px;
}

.dashboard-hero p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-stat {
  min-height: 108px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dashboard-stat-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-stat strong,
.dashboard-stat span,
.dashboard-stat small {
  display: block;
}

.dashboard-stat strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.dashboard-stat span {
  color: #173b3e;
  font-weight: 700;
}

.dashboard-stat small {
  color: var(--muted);
  line-height: 1.45;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.dashboard-card {
  display: grid;
  gap: 12px;
}

.dashboard-list {
  display: grid;
  gap: 8px;
}

.dashboard-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.dashboard-row button {
  width: 100%;
  min-height: 72px;
  display: grid;
  gap: 4px;
  padding: 12px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.dashboard-row-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-row-main > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-row:hover {
  border-color: var(--primary);
  background: #f7fbfb;
}

.dashboard-row strong,
.dashboard-row span,
.dashboard-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-row strong {
  color: var(--ink);
}

.dashboard-row span,
.dashboard-row small {
  color: var(--muted);
}

.dashboard-finder {
  display: grid;
}

.panel,
.procedure-card,
.step-card,
.record-item,
.config-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel {
  padding: 18px;
}

.search-box {
  display: grid;
  gap: 12px;
}

.procedure-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 16px;
  align-items: stretch;
}

.procedure-card {
  width: 100%;
  min-height: 176px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  align-content: start;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.procedure-card:hover,
.procedure-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 115, 111, 0.1);
}

.procedure-card:hover {
  transform: translateY(-1px);
  background: #fbfdfd;
}

.procedure-card.selected {
  background: linear-gradient(180deg, #f5fbfa 0%, #ffffff 100%);
}

.procedure-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.procedure-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  color: #29474a;
  background: #e8eff0;
  font-size: 12px;
}

.tag.urgent {
  color: #87410f;
  background: var(--accent-soft);
}

.event-tag-list,
.event-tag-selected,
.event-tag-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.event-tag-list {
  margin-top: 6px;
}

.event-tag-current {
  color: #31565b;
  font-size: 13px;
  font-weight: 800;
}

.event-tag,
.event-tag-presets button,
.event-tag-selected button {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #bee0dd;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--primary-dark);
  background: #f2fbfa;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

button.event-tag {
  cursor: pointer;
}

.event-tag.selected,
.event-tag-presets button.selected,
.event-tag-selected button {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
}

.event-tag-editor {
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 1301;
}

.event-tag-actions {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 8px;
}

.event-tag-actions input {
  min-height: 34px;
}

.event-tag-block {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
}

.event-tag-block > label,
.read-tag-line small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.read-tag-line {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.template-fill-editor {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dcebea;
  border-radius: 6px;
  background: #fbfefd;
}

.template-fill-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.template-fill-heading strong {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--primary-dark);
  background: #edf8f6;
  font-size: 12px;
}

.template-fill-rows {
  display: grid;
  gap: 6px;
}

.template-fill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 4px;
  color: #10242a;
  line-height: 2.15;
  font-size: 16px;
}

.template-chunk {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  max-width: 100%;
  white-space: nowrap;
}

.duty-field-template {
  grid-column: 1 / -1;
  border-right: 0;
  overflow: visible;
}

.duty-field-template .template-fill-row {
  gap: 10px 6px;
}

.duty-field-template [data-template-tag="应急"] [data-template-gap="6"] {
  width: 12ch;
  min-width: 10ch;
}

.duty-field-template [data-template-tag="应急"] [data-template-gap="7"] {
  width: 10ch;
  min-width: 8ch;
}

.template-extra-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.template-extra-field textarea {
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid #b7d4d0;
  border-radius: 0;
  padding: 4px 2px;
  color: #10242a;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}

.template-fixed-text {
  white-space: pre-wrap;
}

.template-gap-input {
  width: calc(var(--gap-ch, 8ch) + 0.5ch);
  min-width: 62px;
  max-width: 240px;
  min-height: 28px;
  border: 0;
  border-bottom: 2px solid #6daea8;
  border-radius: 0;
  padding: 0 4px 2px;
  color: #10242a;
  background: transparent;
  font-weight: 700;
  text-align: left;
  box-shadow: none;
}

.template-gap-input:focus {
  border-bottom-color: var(--primary);
  outline: 0;
  background: linear-gradient(to top, rgba(0, 121, 113, 0.08), rgba(0, 121, 113, 0));
}

.template-gap-input::placeholder {
  color: #7ea9a5;
  font-weight: 500;
  letter-spacing: 0;
}

.template-read-value {
  display: grid;
  gap: 6px;
  color: #10242a;
}

.template-read-extra {
  white-space: pre-wrap;
}

.template-read-rows {
  display: grid;
  gap: 4px;
}

.template-read-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 3px;
  line-height: 1.9;
}

.template-read-chunk {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}

.template-read-fixed {
  white-space: pre-wrap;
}

.template-read-chunk .template-read-fixed {
  white-space: nowrap;
}

.template-read-gap {
  display: inline-block;
  min-width: 42px;
  border-bottom: 1.5px solid #6daea8;
  padding: 0 4px 1px;
  color: #10242a;
  font-weight: 800;
  line-height: 1.35;
  white-space: pre-wrap;
}

.template-read-gap.blank {
  width: min(var(--blank-ch, 6ch), 100%);
  border-bottom-color: #b7d4d0;
  color: transparent;
  font-weight: 400;
}

.template-read-gap.filled {
  background: linear-gradient(to top, rgba(0, 121, 113, 0.07), rgba(0, 121, 113, 0));
}

.match-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: end;
}

.match-reasons span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #c8e1df;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #f2fbfa;
  font-size: 12px;
  font-weight: 700;
}

.quick-panel {
  position: sticky;
  top: 98px;
}

.quick-panel ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.75;
}

.record-workspace {
  display: grid;
  gap: 16px;
  align-items: start;
}

.mode-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mode-panel > div:first-child {
  display: grid;
  gap: 4px;
}

.mode-panel span {
  color: var(--muted);
  line-height: 1.6;
}

.mode-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.change-summary {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #efd28b;
  border-radius: 8px;
  background: #fff9e8;
}

.change-summary > div:first-child {
  display: grid;
  gap: 3px;
}

.change-summary span,
.change-summary small {
  color: #6f5a23;
}

.change-list {
  display: grid;
  gap: 8px;
}

.change-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.change-row b {
  color: #483a17;
}

.change-row i {
  color: var(--warn);
  font-style: normal;
}

.inline-change,
.inline-change-placeholder {
  margin-top: 8px;
}

.inline-change-placeholder {
  display: none;
}

.inline-change {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  padding: 2px 0;
  color: #31515a;
  font-size: 12px;
  line-height: 1.5;
}

.inline-change i {
  margin: 0 4px;
  color: #7b8d93;
  font-style: normal;
}

.diff-text {
  display: inline-flex;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.revision-old,
.revision-new {
  display: inline-flex;
  max-width: 100%;
  padding: 1px 5px;
  border-radius: 5px;
  word-break: break-word;
}

.revision-old {
  color: #a13b36;
  background: #fff1f0;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.revision-new {
  color: #12643f;
  background: #edf8f2;
  font-weight: 800;
}

.phone-table .inline-change {
  margin-top: 6px;
  font-size: 12px;
}

.readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.compact-readonly {
  padding: 0;
}

.read-field {
  display: grid;
  gap: 7px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
}

.read-field > span:first-child {
  color: #31565b;
  font-size: 13px;
  font-weight: 800;
}

.read-field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.read-field-heading span {
  color: #31565b;
  font-size: 13px;
  font-weight: 800;
}

.read-field-heading small {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.read-field-zoomable {
  cursor: zoom-in;
}

.read-field-zoomable:hover,
.read-field-zoomable:focus-visible {
  border-color: var(--primary);
  background: #fff;
  outline: 3px solid rgba(5, 115, 111, 0.1);
}

.read-field > span:last-child,
.read-field strong {
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
}

.muted-value {
  color: var(--muted-2) !important;
}

.read-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.read-images img {
  width: 112px;
  height: 80px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: #fff;
  cursor: zoom-in;
}

.record-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

.duty-page {
  display: grid;
  gap: 16px;
}

.duty-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.duty-hero > .icon-tile + div {
  flex: 1 1 auto;
  min-width: 0;
}

.duty-list-hero {
  align-items: center;
  padding: 16px 18px;
}

.duty-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.duty-hero h2 {
  margin: 0;
  font-size: 22px;
}

.duty-hero p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.phone-panel {
  display: grid;
  gap: 16px;
}

.duty-entry-panel {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.tag-stats-panel {
  display: grid;
  gap: 12px;
}

.tag-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tag-stats-head h3 {
  margin: 0;
  font-size: 18px;
}

.tag-stats-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.tag-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.tag-stat-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.tag-stat-card strong {
  color: var(--primary-dark);
  font-size: 16px;
}

.tag-stat-card div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.tag-stat-card span {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
}

.tag-stat-card b {
  color: var(--ink);
  font-size: 20px;
}

.list-bulkbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfd;
}

.history-bulkbar {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.bulk-check,
.row-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #31515a;
  font-size: 13px;
  font-weight: 700;
}

.row-check {
  justify-content: center;
}

.bulk-check input,
.row-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.bulk-count {
  color: var(--muted);
  font-size: 13px;
}

.duty-entry-list {
  display: grid;
}

.duty-entry-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.duty-entry-item:last-child {
  border-bottom: 0;
}

.duty-entry-item:hover {
  background: #f7fbfb;
}

.duty-entry-open {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) minmax(200px, 1.3fr) minmax(140px, 0.75fr) minmax(86px, 0.5fr) minmax(150px, 0.75fr);
  gap: 12px;
  align-items: center;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.duty-entry-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.duty-entry-open .event-tag-list {
  margin-top: 0;
}

.duty-entry-item strong {
  min-width: 0;
  display: block;
  color: var(--ink);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-summary,
.entry-owner,
.entry-time {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-owner {
  color: #315c5f;
}

.entry-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.duty-form {
  display: block;
  padding: 0;
  overflow: hidden;
}

.duty-meta-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.duty-meta-grid .field {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.duty-meta-grid .field:last-child {
  border-right: 0;
}

.duty-section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f2f8f7;
}

.duty-section-title h3 {
  margin: 0;
  font-size: 18px;
}

.duty-section-title span {
  color: var(--muted);
  font-size: 13px;
}

.duty-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.duty-field {
  padding: 12px 14px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.duty-field:nth-child(2n) {
  border-right: 0;
}

.duty-form .field label {
  color: #173b3e;
  font-weight: 700;
}

.duty-field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.duty-field-heading span,
.field-hint {
  color: var(--muted);
  font-size: 12px;
}

.duty-field-zoomable {
  cursor: default;
}

.duty-field textarea {
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid #cddcdf;
  border-radius: 6px;
  color: #173b3e;
  background: #fbfdfd;
  font-size: 14px;
  line-height: 1.65;
  resize: vertical;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.duty-field textarea:hover {
  border-color: #a9c3c6;
  background: #fff;
}

.duty-field textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(5, 115, 111, 0.11);
}

.duty-field textarea::placeholder {
  color: #7f9398;
}

.handover-task-field,
.handover-task-read-field {
  grid-column: 1 / -1;
}

.handover-task-field {
  padding: 16px;
  border-right: 0;
}

.handover-task-heading {
  align-items: flex-start;
  margin-bottom: 10px;
}

.handover-task-heading > div {
  display: grid;
  gap: 4px;
}

.handover-task-heading label {
  margin: 0;
  font-size: 15px;
}

.handover-task-heading > div > span {
  color: var(--muted);
  font-size: 12px;
}

.task-count {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 6px;
  color: #31565b;
  background: #eef5f5;
  font-size: 12px;
}

.task-count b {
  color: var(--primary);
  font-size: 14px;
}

.handover-task-list,
.handover-task-read-list {
  border-top: 1px solid var(--line);
}

.handover-task-row {
  display: grid;
  grid-template-columns: 28px minmax(260px, 1fr) auto 78px 34px;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.16s ease;
}

.handover-task-row:hover {
  background: #f8fbfb;
}

.handover-task-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #557277;
  background: #edf3f3;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.handover-task-text {
  min-height: 40px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid #b9cbce;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
}

.handover-task-text:focus {
  border-color: var(--primary);
  box-shadow: 0 2px 0 rgba(5, 115, 111, 0.18);
}

.handover-task-row.completed .handover-task-text {
  color: #73868a;
  text-decoration: line-through;
}

.carried-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid #b7d9d5;
  border-radius: 6px;
  color: #236964;
  background: #eef8f6;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.handover-task-check {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  color: #31565b !important;
  cursor: pointer;
  white-space: nowrap;
}

.handover-task-check input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.task-icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #a13b36;
  background: transparent;
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.task-icon-button:hover {
  border-color: #ffc9c3;
  background: #fff3f1;
}

.task-icon-button .ui-icon,
.handover-task-actions .ui-icon {
  width: 17px;
  height: 17px;
}

.handover-task-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
}

.handover-task-actions small {
  color: var(--muted);
}

.handover-task-read-field {
  min-height: 0;
}

.handover-task-read-row {
  display: grid;
  grid-template-columns: 22px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
}

.handover-task-read-row:last-child {
  border-bottom: 0;
}

.task-read-check {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid #9eb3b6;
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.handover-task-read-row.completed .task-read-check {
  border-color: var(--primary);
  background: var(--primary);
}

.handover-task-read-row > strong {
  font-weight: 600;
  white-space: normal;
}

.handover-task-read-row.completed > strong {
  color: #718589;
  text-decoration: line-through;
}

.duty-image-field {
  min-height: 144px;
}

.handover-image-box {
  display: grid;
  place-items: center;
  min-height: 86px;
  margin-top: 8px;
  border: 1px dashed var(--line-strong);
  background: #f8fbfb;
}

.handover-image-box.has-image {
  border-style: solid;
  background: #fff;
}

.handover-image-box img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  cursor: zoom-in;
}

.handover-image-box.multi-image {
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  align-items: stretch;
  gap: 10px;
  padding: 10px;
}

.handover-image-thumb {
  min-width: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  align-content: start;
}

.handover-image-thumb img {
  height: 118px;
  max-height: 118px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.handover-image-thumb figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.text-danger {
  border: 0;
  padding: 0;
  color: #b42318;
  background: transparent;
  cursor: pointer;
}

.image-placeholder {
  color: var(--muted);
  font-size: 14px;
}

.image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.hidden-file-input {
  display: none;
}

.duty-actions {
  padding: 14px 16px;
  justify-content: flex-end;
}

.fullscreen-layer {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(6, 28, 32, 0.76);
}

.image-fullscreen {
  z-index: 6000;
  isolation: isolate;
}

.fullscreen-panel,
.image-fullscreen-panel {
  width: min(1120px, 96vw);
  max-height: 92vh;
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.fullscreen-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.fullscreen-head h2 {
  margin: 0;
  font-size: 24px;
}

.fullscreen-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.fullscreen-textarea {
  width: 100%;
  min-height: min(62vh, 560px);
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.75;
  resize: vertical;
}

.fullscreen-readonly {
  min-height: min(54vh, 480px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfdfd;
  font-size: 28px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.image-fullscreen-panel img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #f8fafc;
}

.phone-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.phone-toolbar .field {
  width: 220px;
}

.phone-table-wrap {
  overflow-x: auto;
}

.phone-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}

.phone-table th,
.phone-table td {
  border: 1px solid var(--line-strong);
  padding: 8px;
  vertical-align: top;
}

.phone-table th {
  color: #203236;
  background: #edf4f4;
  font-weight: 800;
  text-align: center;
}

.phone-table input,
.phone-table textarea {
  min-height: 38px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.phone-table textarea {
  min-height: 62px;
}

.phone-table input[type="time"] {
  font-variant-numeric: tabular-nums;
}

.phone-time-input {
  min-width: 112px;
}

.phone-time-col {
  width: 128px;
}

.phone-caller-col {
  width: 150px;
}

.phone-content-col {
  width: auto;
}

.phone-tags-col {
  width: 190px;
}

.phone-recorder-col {
  width: 120px;
}

.phone-action-col {
  width: 74px;
}

.phone-table .event-tag-editor {
  min-width: 170px;
}

.phone-table .event-tag-actions {
  grid-template-columns: 1fr;
}

.phone-table .event-tag-actions .btn {
  justify-self: start;
}

.phone-table .template-fill-editor {
  min-width: 430px;
  padding: 9px 10px;
}

.phone-table .template-fill-rows {
  gap: 5px;
}

.phone-table .template-fill-row {
  line-height: 2;
}

.phone-table .template-extra-field textarea {
  border-color: #b7d4d0;
  background: transparent;
}

.phone-table .template-gap-input {
  border-color: #6daea8;
  background: transparent;
  box-shadow: none;
}

.compact-btn {
  min-height: 32px;
  padding: 0 10px;
}

.flow-main {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.flow-strip {
  position: sticky;
  top: var(--sticky-topbar-height);
  z-index: 29;
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 28px rgba(22, 44, 51, 0.12);
  backdrop-filter: blur(14px);
}

.flow-node {
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #f9fbfb;
}

.flow-node strong {
  font-size: 13px;
}

.flow-node span {
  color: var(--muted);
  font-size: 12px;
}

.flow-node.done {
  border-color: #9fd0aa;
  background: var(--ok-soft);
}

.flow-node.current {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.flow-node.locked {
  color: #7c8b90;
  background: #eef2f3;
}

.intake-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.steps-grid {
  display: grid;
  gap: 14px;
}

.step-card {
  padding: 16px;
  border-left: 5px solid var(--line-strong);
}

.step-card.done {
  border-left-color: var(--ok);
}

.step-card.current {
  border-left-color: var(--primary);
}

.step-card.locked {
  color: #6f7f84;
  background: #f3f6f6;
}

.step-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.step-head h3 {
  margin: 0;
  font-size: 19px;
}

.step-goal {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: #47565b;
  background: #edf2f3;
  font-size: 12px;
  white-space: nowrap;
}

.status-pill.done {
  color: var(--ok);
  background: var(--ok-soft);
}

.status-pill.current {
  color: var(--primary);
  background: var(--primary-soft);
}

.status-pill.locked {
  color: #79888d;
}

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

.info-box {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.info-box h4 {
  margin: 0 0 9px;
  font-size: 14px;
}

.info-box ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: #34454b;
  line-height: 1.65;
}

.warning-box {
  background: var(--warn-soft);
  border-color: #efd38c;
}

.checks {
  display: grid;
  gap: 8px;
}

.check-line {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: #34454b;
  line-height: 1.45;
}

.check-line input {
  width: 16px;
  height: 16px;
  min-height: auto;
  margin-top: 2px;
}

.step-records {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.time-node-list {
  display: grid;
  gap: 8px;
}

.time-node {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, auto);
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.time-node strong,
.time-node span {
  display: block;
}

.time-node span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.time-node-controls {
  display: grid;
  grid-template-columns: minmax(190px, 230px) auto;
  gap: 8px;
  align-items: center;
}

.time-node-controls input {
  min-height: 38px;
  font-size: 14px;
}

.step-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.step-time {
  color: var(--muted);
  font-size: 13px;
}

.reference-panel {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 14px;
}

.doc-list {
  display: grid;
  gap: 10px;
}

.doc-item {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.doc-item strong,
.doc-item span,
.doc-item small,
.doc-item em,
.doc-item p {
  display: block;
}

.doc-item span {
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.doc-item small,
.doc-item em {
  color: #31515a;
  font-size: 12px;
  font-style: normal;
}

.doc-item p {
  margin: 0;
  color: #263b43;
  font-size: 13px;
  line-height: 1.55;
}

.doc-usage {
  padding: 8px;
  border-radius: 6px;
  background: #eef8f6;
}

.doc-auto-note {
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid #cce2dc;
  border-radius: 6px;
  background: #f4fbf8;
  color: var(--primary-dark);
  font-weight: 700;
}

.doc-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 2px;
}

.doc-ref-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.doc-ref-list a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid #bddbd6;
  border-radius: 6px;
  background: #f6fcfb;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.doc-ref-list a:hover {
  border-color: var(--primary);
  background: #e6f5f2;
}

.doc-ref-list a[data-auto-reference="true"] {
  border-style: dashed;
}

.page-guide {
  display: grid;
  gap: 8px;
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid #c8e1df;
  border-radius: 6px;
  background: #f1faf8;
}

.page-guide strong {
  color: var(--primary-dark);
}

.page-guide ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #31464d;
  line-height: 1.55;
}

.history-list {
  display: grid;
  gap: 10px;
}

.list-filterbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) auto auto;
  gap: 12px;
  align-items: end;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
}

.list-filterbar .field {
  min-width: 0;
}

.wide-filter {
  grid-column: span 2;
}

.filter-count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.record-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  text-align: left;
}

.record-item:hover {
  border-color: var(--primary);
}

.record-item.trashed {
  background: #fbfcfc;
}

.record-open {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.record-open.static {
  cursor: default;
}

.record-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.record-item h3 {
  margin: 0;
  font-size: 18px;
}

.record-item p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.record-meta {
  display: grid;
  gap: 5px;
  justify-items: end;
  color: var(--muted);
  font-size: 13px;
}

.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
}

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

.field-help {
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
}

.user-admin-layout {
  display: grid;
  gap: 16px;
}

.user-create-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.user-create-form .form-actions {
  margin-top: 0;
}

.user-list-table {
  display: grid;
  gap: 10px;
}

.user-list-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.1fr) minmax(140px, 0.85fr) minmax(150px, 0.9fr) minmax(200px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.user-list-row.is-admin {
  background: #fff;
}

.user-identity {
  display: grid;
  gap: 4px;
  align-self: center;
}

.user-identity strong {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 16px;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e5f4ef;
  color: #007a78;
  font-size: 12px;
  font-weight: 700;
}

.user-identity span {
  color: var(--muted);
  font-size: 13px;
}

.user-identity .mini-badge {
  color: #007a78;
  font-size: 12px;
}

.compact-field {
  padding: 0;
  border: 0;
  background: transparent;
}

.compact-field span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.config-workbench {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.config-menu {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 8px;
}

.config-add-procedure {
  width: 100%;
}

.config-search {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.config-search label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.config-search input {
  min-height: 34px;
}

.config-search small {
  color: var(--muted-2);
  font-size: 12px;
}

.config-procedure-list {
  display: grid;
  gap: 8px;
}

.compact-empty {
  padding: 14px;
}

.config-procedure {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--panel-soft);
  text-align: left;
  cursor: pointer;
}

.config-procedure:hover,
.config-procedure.active {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(5, 115, 111, 0.08);
}

.config-procedure span,
.config-procedure small {
  color: var(--muted);
  line-height: 1.45;
}

.config-procedure small {
  font-size: 12px;
}

.config-main {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.config-toolbar {
  position: static;
}

.section-title.compact {
  margin-bottom: 12px;
}

.config-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.config-stats div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.config-stats strong,
.config-stats span {
  display: block;
}

.config-stats strong {
  font-size: 20px;
  line-height: 1.1;
}

.config-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.config-tabs,
.config-step-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.config-tabs button,
.config-step-tabs button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: #2d4449;
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.config-tabs button.active,
.config-step-tabs button.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.config-step-tabs {
  margin-bottom: 12px;
}

.config-step-tabs span {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  font-size: 12px;
  font-weight: 700;
}

.config-step-tabs button:not(.active) span {
  color: var(--primary);
  background: var(--primary-soft);
}

.config-savebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.config-savebar .form-actions {
  margin-top: 0;
}

.config-form {
  display: grid;
  gap: 14px;
}

.config-block {
  padding: 16px;
}

.config-block h3 {
  margin: 0 0 12px;
}

.config-list {
  display: grid;
  gap: 12px;
}

.config-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.config-item.active {
  background: #fff;
  border-color: var(--primary);
}

.config-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.doc-file-tools-field {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7fbfb;
}

.doc-file-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.file-picker {
  position: relative;
  overflow: hidden;
}

.file-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.doc-file-current {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
}

.doc-file-current.empty-file {
  color: var(--muted-2);
}

.config-step {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.config-step:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.config-check {
  align-self: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.config-preview {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 14px;
}

.preview-title {
  display: grid;
  gap: 5px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.preview-title strong {
  font-size: 18px;
}

.preview-title span,
.preview-overview {
  color: var(--muted);
  line-height: 1.65;
}

.preview-flow {
  display: grid;
  gap: 9px;
}

.preview-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.preview-step > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  font-weight: 700;
}

.preview-step strong,
.preview-step small {
  display: block;
}

.preview-step small {
  margin-top: 4px;
  color: var(--muted);
}

.preview-docs {
  display: grid;
  gap: 8px;
}

.preview-docs span {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
}

.mobile-top {
  display: none;
}

@media (max-width: 1420px) {
  .config-workbench {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .config-preview {
    grid-column: 1 / -1;
    position: static;
  }
}

@media (max-width: 1180px) {
  .finder-grid,
  .record-layout,
  .config-workbench,
  .dashboard-hero,
  .dashboard-grid,
  .user-create-form,
  .user-list-row {
    grid-template-columns: 1fr;
  }

  .quick-panel,
  .reference-panel,
  .config-menu,
  .config-toolbar,
  .config-preview {
    position: static;
  }

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

  .dashboard-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 1320px) {
  .topbar,
  .dashboard-hero,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .top-actions,
  .dashboard-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 860px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-aside {
    min-height: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
  }

  .sidebar-collapsed .sidebar {
    align-items: stretch;
    gap: 8px;
    padding: 12px;
  }

  .side-brand,
  .user-box,
  .sidebar-toggle {
    display: none;
  }

  .sidebar-head {
    display: none;
  }

  .nav-list {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
  }

  .sidebar-collapsed .nav-list {
    width: auto;
    justify-items: stretch;
  }

  .sidebar-collapsed .nav-section-title,
  .sidebar-collapsed .nav-btn span {
    font-size: inherit;
  }

  .sidebar-collapsed .nav-btn {
    width: auto;
    min-width: auto;
    justify-content: flex-start;
    padding: 0 12px;
  }

  .side-bottom {
    display: none;
  }

  .mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 2px 0;
  }

  .topbar {
    top: 0;
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .flow-strip {
    top: var(--sticky-topbar-height);
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

  .content {
    padding: 14px;
  }

  .procedure-list {
    grid-template-columns: 1fr;
  }

  .intake-grid,
  .step-columns,
  .detail-grid,
  .duty-meta-grid,
  .duty-grid,
  .dashboard-stats,
  .config-grid,
  .config-stats,
  .reference-panel {
    grid-template-columns: 1fr;
  }

  .mode-panel,
  .duty-hero,
  .phone-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .mode-switch {
    justify-content: flex-start;
  }

  .change-row {
    grid-template-columns: 1fr;
  }

  .readonly-grid {
    grid-template-columns: 1fr;
  }

  .duty-hero-actions {
    justify-content: flex-start;
  }

  .duty-entry-item {
    grid-template-columns: 1fr;
  }

  .record-item {
    grid-template-columns: 1fr;
  }

  .list-bulkbar {
    align-items: stretch;
    justify-content: flex-start;
  }

  .list-filterbar {
    grid-template-columns: 1fr;
  }

  .wide-filter {
    grid-column: auto;
  }

  .row-check {
    justify-content: flex-start;
  }

  .duty-entry-open {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .duty-entry-open strong,
  .entry-summary,
  .entry-owner,
  .entry-time {
    white-space: normal;
  }

  .entry-actions {
    justify-content: flex-start;
  }

  .user-create-form,
  .user-list-row {
    align-items: stretch;
  }

  .duty-meta-grid .field,
  .duty-field {
    border-right: 0;
  }

  .fullscreen-layer {
    padding: 12px;
  }

  .fullscreen-panel,
  .image-fullscreen-panel {
    width: 100%;
    max-height: 94vh;
    padding: 14px;
  }

  .fullscreen-head {
    flex-direction: column;
  }

  .fullscreen-textarea {
    min-height: 58vh;
    font-size: 22px;
  }

  .phone-toolbar .field {
    width: 100%;
  }

  .config-savebar {
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  .login-main,
  .login-aside {
    padding: 20px;
  }

  .login-card {
    padding: 20px;
  }

  .login-aside h1 {
    font-size: 38px;
  }

  .login-system-name {
    font-size: 17px;
  }

  .topbar {
    padding: 12px 14px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .progress-line {
    width: 100%;
  }

  .section-title,
  .step-head,
  .record-item,
  .record-open,
  .time-node,
  .time-node-controls,
  .config-item-head {
    grid-template-columns: 1fr;
  }

  .record-meta {
    justify-items: start;
  }

  .record-actions {
    justify-content: stretch;
  }

  .record-actions .btn {
    width: 100%;
  }

  .form-actions,
  .step-footer,
  .top-actions,
  .config-savebar .form-actions {
    align-items: stretch;
  }

  .form-actions .btn,
  .step-footer .btn,
  .top-actions .btn,
  .time-node-controls .btn,
  .config-savebar .btn {
    width: 100%;
  }
}

.quick-field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.handling-toolbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-left: 5px solid #8796a5;
}

.handling-toolbar.status-active { border-left-color: #007a78; }
.handling-toolbar.status-suspended { border-left-color: #d28b16; }
.handling-toolbar.status-completed { border-left-color: #218838; }

.handling-toolbar.status-pending {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 24px;
  text-align: center;
}

.handling-toolbar.status-pending .handling-summary,
.handling-toolbar.status-pending .handling-actions {
  justify-content: center;
}

.handling-toolbar.status-pending .countdown-empty {
  width: 100%;
  text-align: center;
}

.btn.start-handling-btn {
  min-width: 220px;
  min-height: 58px;
  padding: 14px 32px;
  border-color: var(--danger);
  color: #fff;
  background: var(--danger);
  font-size: 19px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(180, 35, 24, .18);
}

.btn.start-handling-btn:hover {
  border-color: #8f1c14;
  color: #fff;
  background: #8f1c14;
}

.prestart-locked-panel :is(input, textarea, select):disabled,
.step-card.locked :is(input, textarea, select):disabled {
  color: #6c7a80;
  background: #edf2f3;
  border-color: #d1dcdf;
  cursor: not-allowed;
}

.handling-summary,
.handling-actions,
.countdown-item,
.countdown-item > div {
  display: flex;
  align-items: center;
}

.handling-summary { gap: 14px; }
.handling-summary > div,
.countdown-item > div { display: grid; gap: 2px; }
.handling-summary span:not(.handling-status),
.countdown-item span { color: #667085; font-size: 13px; }
.handling-status { padding: 6px 10px; border-radius: 999px; color: #005f5d; background: #e4f3f1; font-weight: 800; white-space: nowrap; }
.status-suspended .handling-status { color: #8b5a00; background: #fff2cf; }
.status-completed .handling-status { color: #18762b; background: #e7f6ea; }
.handling-actions { justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.countdown-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #dce5e8;
}

.countdown-item {
  min-height: 52px;
  gap: 12px;
  padding: 8px 10px 8px 14px;
  border: 1px solid #cfe2e1;
  border-left: 4px solid #007a78;
  border-radius: 6px;
  background: #f7fbfb;
}

.countdown-item > div { flex: 1; }
.countdown-item b { min-width: 112px; color: #006d6b; font-variant-numeric: tabular-nums; text-align: right; }
.countdown-item.overdue { border-color: #cf3030; background: #fff1f0; animation: overduePulse 1s ease-in-out infinite; }
.countdown-item.overdue b { color: #b42318; }
.countdown-empty { grid-column: 1 / -1; color: #667085; font-size: 13px; }

.countdown-overdue-alert {
  position: sticky;
  z-index: 24;
  top: calc(var(--sticky-topbar-height, 80px) + 8px);
  margin-bottom: 10px;
  padding: 12px 18px;
  border: 2px solid #b42318;
  border-radius: 6px;
  color: #fff;
  background: #b42318;
  font-weight: 800;
  text-align: center;
  animation: overduePulse 1s ease-in-out infinite;
}

@keyframes overduePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, 0); }
  50% { box-shadow: 0 0 0 5px rgba(180, 35, 24, .18); }
}

.branch-selector {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(260px, 420px);
  gap: 10px 18px;
  align-items: center;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #95c9c6;
  border-radius: 6px;
  background: #f2fbfa;
}

.branch-selector > div { display: grid; gap: 3px; }
.branch-selector span { color: #667085; font-size: 13px; }
.branch-selector ul { grid-column: 1 / -1; margin: 0; padding-left: 22px; }
.branch-countdown-empty {
  grid-column: 1 / -1;
  padding: 9px 12px;
  border: 1px dashed #8abfbc;
  border-radius: 6px;
  color: #4d666b;
  background: #fff;
  font-size: 13px;
}
.branch-countdown-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
}
.branch-countdown-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px auto;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 8px 10px 8px 13px;
  border: 1px solid #94c9c6;
  border-left: 4px solid #007a78;
  border-radius: 6px;
  background: #fff;
}
.branch-countdown-item span { display: grid; gap: 2px; }
.branch-countdown-item small { color: #667085; }
.branch-countdown-item b { color: #006d6b; font-variant-numeric: tabular-nums; text-align: right; }
.branch-countdown-item.overdue { border-color: #cf3030; background: #fff1f0; animation: overduePulse 1s ease-in-out infinite; }
.branch-countdown-item.overdue b { color: #b42318; }

.ongoing-cases button,
.review-record-list button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.ongoing-cases button:hover,
.review-record-list button:hover,
.review-record-list button.active { border-color: #9bc9c7; background: #edf8f7; }
.ongoing-cases button span,
.review-record-list button span { min-width: 0; display: grid; gap: 2px; }
.ongoing-cases small,
.review-record-list small { overflow: hidden; color: #667085; text-overflow: ellipsis; white-space: nowrap; }
.ongoing-cases em,
.review-record-list em { color: #007a78; font-size: 12px; font-style: normal; white-space: nowrap; }

.dialog-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 40px;
  background: rgba(13, 32, 42, .42);
}

.dialog-panel {
  width: min(820px, 90vw);
  max-height: 80vh;
  overflow: auto;
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(17, 35, 48, .25);
}

.similar-case-list { display: grid; gap: 8px; }
.similar-case-list article { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px; border: 1px solid #d9e3e7; border-radius: 6px; }
.similar-case-list article > div { display: grid; gap: 3px; }
.similar-case-list span { color: #667085; font-size: 13px; }

.review-workbench { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.review-list-panel { position: sticky; top: calc(var(--sticky-topbar-height, 80px) + 14px); }
.review-record-list { max-height: calc(100vh - 290px); overflow: auto; display: grid; gap: 4px; }
.review-editor textarea { min-height: 150px; }
.review-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; color: #667085; }
.review-empty { min-height: 380px; display: grid; place-content: center; justify-items: center; gap: 8px; color: #667085; text-align: center; }
.review-empty strong { color: #172033; font-size: 20px; }
.review-editor { min-width: 0; overflow: hidden; }
.review-toolbar {
  position: sticky;
  z-index: 8;
  top: calc(var(--sticky-topbar-height, 80px) + 8px);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: -4px -4px 18px;
  padding: 8px 4px 12px;
  border-bottom: 1px solid #d9e3e7;
  background: #fff;
}
.review-toolbar h2 { margin: 0 0 4px; }
.review-toolbar .review-meta { margin: 0; font-size: 13px; }
.review-toolbar-actions { display: flex; justify-content: flex-end; gap: 8px; align-items: end; flex-wrap: wrap; }
.review-status-control { display: grid; gap: 3px; min-width: 120px; }
.review-status-control span { color: #667085; font-size: 12px; }
.review-status-control select { min-height: 38px; }
.report-editor-sheet { position: relative; isolation: isolate; overflow: hidden; padding: 24px; border: 1px solid #aebdc3; background: #fff; }
.report-editor-sheet > :not(.report-editor-watermark) { position: relative; z-index: 1; }
.report-editor-watermark {
  position: absolute;
  z-index: 0;
  top: 38%;
  left: 50%;
  color: rgba(155, 45, 45, .08);
  font-size: clamp(42px, 5vw, 70px);
  font-weight: 800;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-24deg);
  pointer-events: none;
  user-select: none;
}
.report-editor-sheet > h3 { margin: 0 0 20px; font-size: 24px; text-align: center; }
.report-form-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.report-form-table th,
.report-form-table td { border: 1px solid #7f8f96; padding: 0; vertical-align: top; }
.report-form-table th {
  width: 84px;
  padding: 12px 8px;
  color: #17383b;
  background: #eaf4f3;
  text-align: center;
  white-space: nowrap;
}
.report-edit-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  min-height: 46px;
  background: #fff;
}
.report-edit-field input {
  min-width: 0;
  min-height: 44px;
  padding: 9px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.report-edit-field input:focus { position: relative; z-index: 1; box-shadow: inset 0 0 0 2px #007a78; }
.report-mark-select {
  min-width: 0;
  min-height: 34px;
  margin: 5px;
  padding: 4px 6px;
  border-color: #c8d5da;
  font-size: 12px;
}
.report-timeline-row > th { padding-top: 18px; }
.report-timeline-row > td { padding: 0; }
.report-timeline-editor { display: grid; }
.report-timeline-section { padding: 12px 14px; border-bottom: 1px solid #cfd9dc; background: #fff; }
.report-timeline-section:last-child { border-bottom: 0; }
.report-timeline-section header { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 6px; }
.report-timeline-section header strong { color: #005f5d; font-size: 15px; }
.report-timeline-section .report-mark-select { width: 92px; margin: 0; }
.report-timeline-section textarea {
  width: 100%;
  min-height: 94px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  line-height: 1.7;
  resize: vertical;
}
.report-timeline-section textarea:focus { border-color: #55a9a5; background: #fff; }
.report-edit-field.mark-red input,
.report-timeline-section.mark-red textarea { color: #c62828; }
.report-edit-field.mark-yellow,
.report-timeline-section.mark-yellow { background: #fff3a6; }
.report-edit-field.mark-green,
.report-timeline-section.mark-green { background: #dff3e4; }

@media (max-width: 1500px) {
  .review-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-list-panel {
    position: static;
  }

  .review-record-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 260px;
  }
}

@media (max-width: 860px) {
  .review-record-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.config-timer-list { display: grid; gap: 8px; }
.config-timer-row { display: grid; grid-template-columns: 34px minmax(240px, 1fr) 150px auto; gap: 10px; align-items: center; padding: 9px; border: 1px solid #d7e2e6; border-radius: 6px; background: #f9fbfc; }
.config-timer-row > span { font-weight: 800; text-align: center; }
.config-timer-row > label { display: flex; align-items: center; gap: 6px; }
.config-timer-row > label input { width: 92px; }
.timing-branch-title { margin-top: 28px; }
.config-branch-steps,
.config-branch-list { display: grid; gap: 14px; }
.config-branch-item { padding: 14px; border: 1px solid #b8d8d6; border-radius: 6px; background: #f8fcfc; }
.branch-timer-head { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 8px; }

.risk-assessment {
  margin: 22px -20px -20px;
  padding: 20px;
  border-top: 2px solid #88aaa9;
  background: #f7faf9;
}
.risk-assessment.level-1 { border-top-color: #b42318; background: #fff7f6; }
.risk-assessment.level-2 { border-top-color: #c45b18; background: #fff9f3; }
.risk-assessment.level-3 { border-top-color: #a37816; background: #fffbef; }
.risk-assessment.level-4 { border-top-color: #287451; background: #f5fbf7; }
.risk-assessment-head,
.risk-assessment-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.risk-assessment-head h3 { margin: 4px 0 5px; font-size: 20px; }
.risk-assessment-head p { margin: 0; color: var(--muted); line-height: 1.6; }
.risk-kicker,
.danger-kicker { color: var(--primary); font-size: 12px; font-weight: 800; }
.danger-kicker { color: var(--danger); }
.risk-confirm-status {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid #e6b2ad;
  border-radius: 999px;
  color: var(--danger);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}
.risk-confirm-status.confirmed { border-color: #a8d2b4; color: var(--ok); background: var(--ok-soft); }
.risk-field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.risk-field { gap: 5px; }
.risk-field > span { color: #45575d; font-size: 13px; font-weight: 700; }
.risk-field input,
.risk-field select { min-width: 0; min-height: 40px; }
.risk-result-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 0; margin-top: 18px; border-block: 1px solid #d7e2df; }
.risk-result-grid > div { min-width: 0; display: grid; align-content: start; gap: 6px; padding: 14px 16px; border-right: 1px solid #d7e2df; }
.risk-result-grid > div:last-child { border-right: 0; }
.risk-result-grid span { color: var(--muted); font-size: 12px; font-weight: 700; }
.risk-result-grid strong { line-height: 1.55; }
.risk-result-grid small { color: var(--muted); line-height: 1.55; }
.risk-result-grid ul { margin: 0; padding-left: 18px; line-height: 1.65; }
.risk-assessment-foot { align-items: center; padding-top: 14px; }
.risk-assessment-foot > small { max-width: 780px; color: var(--muted); line-height: 1.55; }
.risk-read-values { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; color: #41545a; }
.risk-read-values span { display: flex; gap: 6px; }
.risk-read-values b { color: var(--muted); }

.compliance-event-count { color: var(--danger); }
.compliance-backdrop { background: rgba(48, 16, 14, .55); }
.compliance-dialog { width: min(660px, 90vw); border-top: 5px solid var(--danger); }
.compliance-warning-icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 50%; color: #fff; background: var(--danger); font-size: 28px; font-weight: 900; }
.compliance-dialog h2 { margin: 5px 0 8px; }
.compliance-dialog p { margin: 0; color: #74423d; line-height: 1.65; }
.compliance-dialog .compliance-required-note { margin-top: 10px; font-weight: 800; color: var(--danger); }
.compliance-dialog .compliance-basis { display: inline-flex; gap: 5px; margin-top: 9px; padding: 7px 10px; border-left: 3px solid var(--danger); background: #fff1f0; color: #6f211b; }
.compliance-dialog ul { margin: 18px 0; padding: 14px 14px 14px 34px; border: 1px solid #efb5af; background: #fff7f6; color: #7a241c; line-height: 1.7; }
.compliance-ack { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #dfc1bd; background: #fff; cursor: pointer; }
.compliance-ack input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--danger); }
.compliance-dialog .form-actions { justify-content: flex-end; margin-top: 18px; }
.compliance-audit-list { display: grid; gap: 9px; }
.compliance-audit-list article { padding: 10px 0; border-top: 1px solid #ead6d3; }
.compliance-audit-list article:first-child { border-top: 0; }
.compliance-audit-list strong,
.compliance-audit-list span { display: block; }
.compliance-audit-list span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.compliance-audit-list p { margin: 7px 0 0; color: #7a332d; font-size: 13px; line-height: 1.55; }

.config-compliance { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0 16px; padding: 11px 13px; border-left: 4px solid var(--ok); background: var(--ok-soft); }
.config-compliance > div { min-width: 0; }
.config-compliance strong,
.config-compliance > div > span { display: block; }
.config-compliance strong { color: var(--ok); }
.config-compliance > div > span { margin-top: 3px; color: #43614c; line-height: 1.5; }
.config-compliance-mark { flex: 0 0 26px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--ok); font-weight: 900; }
.config-compliance ul { margin: 7px 0 0; padding: 0; list-style: none; }
.config-compliance li + li { margin-top: 7px; }
.config-compliance li span,
.config-compliance li small { display: block; }
.config-compliance li span { color: #7a241c; font-weight: 750; }
.config-compliance li small { margin-top: 2px; color: #81514c; line-height: 1.45; }
.config-compliance.invalid { border-left-color: var(--danger); background: #fff1f0; }
.config-compliance.invalid strong { color: var(--danger); }
.config-compliance.invalid .config-compliance-mark { background: var(--danger); }

.dashboard-analytics { margin-top: 22px; }
.analytics-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 14px; }
.analytics-heading h2 { margin: 4px 0 5px; font-size: 24px; }
.analytics-heading p { margin: 0; color: var(--muted); }
.segmented-control { flex: 0 0 auto; display: inline-grid; grid-template-columns: repeat(2, 88px); padding: 3px; border: 1px solid var(--line-strong); border-radius: 6px; background: #edf2f3; }
.segmented-control button { min-height: 34px; border-radius: 4px; color: #52656b; background: transparent; cursor: pointer; }
.segmented-control button.active { color: #fff; background: var(--primary); font-weight: 700; box-shadow: 0 2px 8px rgba(5, 115, 111, .2); }
.analytics-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.analytics-card { min-width: 0; min-height: 312px; }
.analytics-card.analytics-wide { grid-column: 1 / -1; min-height: 220px; }
.analytics-bars { display: grid; gap: 11px; }
.analytics-bar-row { display: grid; grid-template-columns: minmax(110px, 160px) minmax(120px, 1fr) minmax(82px, auto); gap: 10px; align-items: center; min-height: 28px; }
.analytics-bar-row > span { overflow: hidden; color: #394d53; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.analytics-bar-row > div { height: 10px; overflow: hidden; border-radius: 2px; background: #e6edef; }
.analytics-bar-row i { display: block; height: 100%; min-width: 3px; background: var(--primary); transform-origin: left; animation: analyticsGrow .45s ease-out both; }
.analytics-bar-row b { color: #31474d; font-size: 12px; text-align: right; white-space: nowrap; }
.analytics-trend { height: 196px; display: grid; grid-template-columns: repeat(auto-fit, minmax(34px, 1fr)); gap: 8px; align-items: stretch; padding-top: 8px; border-bottom: 1px solid #bac9cd; }
.trend-column { min-width: 0; display: grid; grid-template-rows: 1fr auto; gap: 7px; align-items: end; }
.trend-bars { height: 100%; display: flex; gap: 3px; align-items: end; justify-content: center; }
.trend-bars i { width: min(15px, 42%); min-height: 0; background: var(--primary); animation: analyticsGrowY .45s ease-out both; transform-origin: bottom; }
.trend-bars i.overdue { background: #bd4d2a; }
.trend-column > span { overflow: hidden; color: var(--muted); font-size: 11px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.analytics-legend { display: flex; gap: 18px; justify-content: flex-end; margin-top: 9px; color: var(--muted); font-size: 12px; }
.analytics-legend span { display: flex; gap: 6px; align-items: center; }
.analytics-legend i { width: 12px; height: 8px; display: inline-block; background: var(--primary); }
.analytics-legend i.overdue { background: #bd4d2a; }
@keyframes analyticsGrow { from { transform: scaleX(.1); opacity: .45; } to { transform: scaleX(1); opacity: 1; } }
@keyframes analyticsGrowY { from { transform: scaleY(.1); opacity: .45; } to { transform: scaleY(1); opacity: 1; } }

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

/* 2026-07 control-room visual system（已回退，保留代码仅便于追溯） */
@media screen and (max-width: 0px) and (min-width: 1px) {
html {
  scrollbar-color: #9baeb3 #e7ecee;
  scrollbar-width: thin;
}

::selection {
  color: #fff;
  background: var(--primary);
}

body {
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

input,
textarea,
select {
  border-color: #b9c8cc;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #94aaaf;
}

input::placeholder,
textarea::placeholder {
  color: #8a999d;
}

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

.field label,
.field-title {
  color: #30454b;
  font-size: 13px;
  font-weight: 750;
}

.btn {
  min-height: 40px;
  padding-inline: 15px;
  border-color: #ced9dc;
  color: #263a40;
  background: #f2f5f5;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .75) inset;
}

.btn:hover:not(:disabled) {
  border-color: #b8c7ca;
  background: #e8eeee;
  box-shadow: 0 5px 14px rgba(24, 48, 55, .09);
}

.btn.primary {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 4px 10px rgba(8, 123, 117, .18);
}

.btn.primary:hover:not(:disabled) {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(6, 98, 94, .22);
}

.btn.danger {
  border-color: #efbbb6;
  color: #a62f27;
  background: #fff7f6;
  box-shadow: none;
}

.btn.danger:hover:not(:disabled) {
  border-color: #d88e87;
  color: #90251e;
  background: #fff0ee;
}

.compact-btn {
  min-height: 34px;
}

.panel,
.procedure-card,
.step-card,
.record-item,
.config-block {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 20px;
}

.section-title {
  margin-bottom: 20px;
}

.section-title h2 {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
}

.section-title h3 {
  color: var(--ink);
  font-size: 19px;
}

.section-title p {
  color: var(--muted);
  line-height: 1.65;
}

.icon-tile {
  border-radius: 7px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  transition: color .16s ease, background-color .16s ease, transform .16s ease;
}

.status-pill,
.save-status {
  border: 1px solid #d4dfe1;
  border-radius: 999px;
  background: #f3f6f6;
  font-weight: 700;
}

.status-pill.current,
.save-status.dirty {
  border-color: #b9ddd9;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  transition: grid-template-columns .22s ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.sidebar {
  gap: 12px;
  padding: 18px 14px 14px;
  border-right: 1px solid #243a41;
  color: #f6fafb;
  background: var(--sidebar);
  box-shadow: 8px 0 24px rgba(17, 34, 40, .08);
}

.sidebar-head {
  grid-template-columns: minmax(0, 1fr) 38px;
  padding: 0 0 15px;
  border-color: rgba(255, 255, 255, .1);
}

.side-brand {
  gap: 11px;
  padding: 3px 2px;
}

.side-brand .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: #172c33;
  background: #efa43f;
  box-shadow: 0 5px 14px rgba(239, 164, 63, .2);
  font-family: "Bahnschrift", "Segoe UI", sans-serif;
}

.side-brand strong {
  font-family: "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 19px;
}

.side-brand span {
  color: #a9c0c6;
  font-size: 11px;
}

.sidebar-toggle {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  border-color: rgba(255, 255, 255, .18);
  color: #c8d9dc;
  background: rgba(255, 255, 255, .045);
}

.sidebar-toggle:hover {
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .1);
}

.user-box {
  grid-template-columns: 36px minmax(0, 1fr);
  padding: 10px 11px;
  border-color: #345058;
  background: var(--sidebar-soft);
  box-shadow: 0 8px 18px rgba(7, 24, 29, .12);
}

.user-avatar {
  width: 36px;
  height: 36px;
  color: #173039 !important;
  background: #f2b054;
}

.user-box strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-box span {
  color: #a9c1c6;
  font-size: 12px;
}

.nav-list {
  gap: 5px;
  padding: 2px 2px 8px 0;
}

.nav-list::-webkit-scrollbar {
  width: 5px;
}

.nav-list::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: #536b72;
}

.nav-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 15px 8px 4px;
  color: #83a2a9;
  font-size: 11px;
  font-weight: 750;
}

.nav-section-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(151, 181, 187, .14);
}

.nav-btn {
  min-height: 44px;
  gap: 11px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #d4e1e4;
}

.nav-btn .ui-icon {
  color: #84aaa9;
}

.nav-btn:hover {
  border-color: rgba(255, 255, 255, .07);
  color: #fff;
  background: #22383f;
  transform: translateX(2px);
}

.nav-btn.active {
  border-color: #3d5a61;
  color: #fff;
  background: #2a444b;
  box-shadow: inset 3px 0 #efa43f, 0 5px 13px rgba(8, 24, 29, .14);
}

.nav-btn.active::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: auto;
  border-radius: 50%;
  background: #efa43f;
  box-shadow: 0 0 0 3px rgba(239, 164, 63, .12);
}

.nav-btn.active .ui-icon {
  color: #8fd1ca;
}

.side-bottom {
  padding-top: 13px;
  border-color: rgba(255, 255, 255, .1);
}

.sidebar .btn.ghost {
  border-color: #4c6870;
  color: #dce8ea;
  background: #223940;
}

.sidebar .btn.ghost:hover {
  border-color: #6d8990;
  background: #263f46;
}

.sidebar-collapsed .sidebar {
  padding: 18px 10px 14px;
}

.sidebar-collapsed .sidebar-toggle,
.sidebar-collapsed .nav-btn,
.sidebar-collapsed .side-bottom .btn {
  width: 42px;
  min-width: 42px;
}

.sidebar-collapsed .nav-btn.active::after {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 4px;
  height: 4px;
}

.sidebar-collapsed .nav-section-title::after {
  display: none;
}

.topbar {
  min-height: 84px;
  padding: 15px 28px;
  border-color: #d5dfe1;
  background: rgba(237, 241, 242, .95);
  box-shadow: 0 3px 12px rgba(27, 47, 54, .045);
  backdrop-filter: blur(16px);
}

.topbar > div:first-child {
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

.topbar h1 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
}

.topbar p {
  margin-top: 4px;
  color: #687b81;
  font-size: 12px;
}

.save-status {
  min-width: 108px;
  min-height: 34px;
  padding-inline: 12px;
  color: #52686e;
  background: rgba(255, 255, 255, .65);
}

.progress-line {
  height: 6px;
  background: #d9e2e4;
}

.progress-line span {
  background: var(--primary);
}

.content {
  padding: 24px 28px 42px;
}

.content > * {
  animation: aods-page-enter .22s ease-out both;
}

@keyframes aods-page-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-shell {
  grid-template-columns: minmax(420px, .86fr) minmax(520px, 1.14fr);
  background: #eef2f3;
}

.login-aside {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 84px);
  border-right: 6px solid #d08a30;
  background: var(--sidebar);
}

.login-aside::after {
  content: "AODS / OPS";
  position: absolute;
  right: 34px;
  bottom: 30px;
  color: rgba(255, 255, 255, .055);
  font-family: "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 54px;
  font-weight: 800;
  pointer-events: none;
}

.login-aside .brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  color: #173039;
  background: #efa43f;
  font-family: "Bahnschrift", "Segoe UI", sans-serif;
  box-shadow: 0 8px 24px rgba(239, 164, 63, .24);
}

.login-aside h1 {
  margin: 30px 0 12px;
  font-family: "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 64px;
  line-height: 1;
}

.login-aside p {
  color: #b9cdd1;
}

.login-system-name {
  max-width: 620px;
  color: #f6fafb !important;
  font-size: 18px;
}

.login-system-cn {
  white-space: nowrap;
}

.login-point {
  max-width: 600px;
  padding-left: 14px;
  border-left: 2px solid #5f8389;
  color: #d7e5e7;
}

.login-point::before {
  display: none;
}

.login-card {
  width: min(100%, 500px);
  padding: 34px;
  border-top: 4px solid var(--accent);
  box-shadow: 0 24px 60px rgba(30, 48, 55, .12);
}

.login-card .form-actions .btn {
  width: 100%;
  min-height: 44px;
}

.dashboard-page {
  gap: 18px;
}

.dashboard-hero {
  position: relative;
  padding: 22px 24px;
  border-left: 4px solid var(--accent);
  overflow: hidden;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 88px;
  height: 4px;
  background: var(--primary);
}

.dashboard-eyebrow {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-hero h2 {
  color: var(--ink);
  font-size: 27px;
}

.dashboard-stats,
.analytics-summary {
  gap: 14px;
}

.dashboard-stat {
  position: relative;
  min-height: 116px;
  padding: 18px;
  overflow: hidden;
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

.dashboard-stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--primary);
}

.dashboard-stat:nth-child(2)::before { background: var(--accent); }
.dashboard-stat:nth-child(3)::before { background: var(--info); }
.dashboard-stat:nth-child(4)::before { background: var(--ok); }

.dashboard-stat:nth-child(2) .icon-tile { color: #965610; background: var(--accent-soft); }
.dashboard-stat:nth-child(3) .icon-tile { color: var(--info); background: var(--info-soft); }
.dashboard-stat:nth-child(4) .icon-tile { color: var(--ok); background: var(--ok-soft); }

.dashboard-stat strong,
.config-stats strong,
.analytics-bar-row b,
.countdown-item b,
.branch-countdown-item b {
  font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  font-variant-numeric: tabular-nums;
}

.dashboard-stat strong {
  color: var(--ink);
  font-size: 32px;
}

.dashboard-card {
  padding: 20px;
}

.dashboard-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard-row {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  transition: background-color .16s ease, box-shadow .16s ease;
}

.dashboard-row:last-child {
  border-bottom: 0;
}

.dashboard-row button {
  min-height: 76px;
  padding: 13px 14px;
}

.dashboard-row:hover {
  border-color: var(--line);
  background: #f4f8f7;
  box-shadow: inset 3px 0 var(--primary);
}

.dashboard-row:hover .icon-tile {
  transform: translateX(2px);
}

.dashboard-analytics {
  margin-top: 26px;
  padding-top: 6px;
  border-top: 1px solid #d4dee0;
}

.analytics-heading h2 {
  color: var(--ink);
  font-size: 25px;
}

.analytics-card {
  border-top: 3px solid #c9d6d9;
}

.analytics-card:nth-child(2n) {
  border-top-color: #d5a25e;
}

.analytics-bar-row > div {
  height: 8px;
  background: #e4eaec;
}

.analytics-bar-row i {
  background: var(--primary);
}

.finder-grid {
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
}

.search-box {
  gap: 14px;
}

.search-box > .section-title h2,
.search-box > div:first-child h2 {
  color: var(--ink);
}

.search-box textarea {
  min-height: 96px;
  font-size: 16px;
}

.procedure-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.procedure-card {
  position: relative;
  min-height: 190px;
  padding: 17px;
  box-shadow: none;
}

.procedure-card::after {
  content: "";
  position: absolute;
  inset: auto 16px 0 16px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}

.procedure-card:hover {
  border-color: #9abdbb;
  background: #fafcfc;
  box-shadow: 0 8px 22px rgba(25, 48, 55, .08);
  transform: translateY(-2px);
}

.procedure-card.selected {
  border-color: var(--primary);
  background: #f7fbfa;
  box-shadow: 0 0 0 3px rgba(8, 123, 117, .09);
}

.procedure-card.selected::after {
  background: var(--primary);
}

.procedure-card h3 {
  color: var(--ink);
  font-size: 18px;
}

.tag {
  min-height: 23px;
  border-radius: 5px;
  background: #eaf0f1;
}

.tag.urgent {
  color: #8c4e14;
  background: var(--accent-soft);
}

.quick-panel {
  top: 104px;
  border-top: 3px solid var(--accent);
}

.duty-page {
  gap: 18px;
}

.duty-hero {
  padding: 20px 22px;
  border-left: 4px solid var(--primary);
}

.duty-list-hero {
  padding: 18px 20px;
}

.duty-hero h2 {
  color: var(--ink);
  font-size: 23px;
}

.duty-entry-panel {
  box-shadow: var(--shadow-soft);
}

.duty-entry-item {
  min-height: 66px;
  padding: 12px 15px;
  background: #fff;
  transition: background-color .16s ease, box-shadow .16s ease;
}

.duty-entry-item:hover {
  background: #f5f8f8;
  box-shadow: inset 3px 0 var(--primary);
}

.duty-form {
  box-shadow: var(--shadow-soft);
}

.duty-meta-grid {
  background: #f7f9f9;
}

.duty-meta-grid .field {
  padding: 15px 17px;
}

.duty-section-title {
  position: relative;
  padding: 15px 18px;
  background: #eef4f3;
}

.duty-section-title::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--primary);
}

.duty-section-title h3 {
  color: var(--ink);
  font-size: 19px;
}

.duty-field {
  padding: 15px 17px 17px;
  background: #fff;
}

.duty-field textarea {
  min-height: 86px;
  border-color: #c7d3d6;
  color: var(--text);
  background: #fafcfc;
}

.duty-field textarea:hover,
.duty-field textarea:focus {
  background: #fff;
}

.handover-task-field {
  padding: 18px;
}

.handover-task-list,
.handover-task-read-list {
  border-color: #d6dfe1;
}

.handover-task-row {
  min-height: 58px;
  padding-inline: 4px;
}

.task-count,
.carried-badge {
  border-radius: 5px;
}

.handover-image-box {
  border-radius: 7px;
  background: #f7faf9;
}

.phone-panel {
  gap: 18px;
}

.phone-toolbar {
  padding-bottom: 4px;
}

.phone-table-wrap {
  overflow: hidden auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.phone-table th,
.phone-table td {
  border-color: #cbd6d9;
}

.phone-table th {
  padding: 11px 9px;
  color: #243940;
  background: #e9eff0;
  font-size: 13px;
}

.phone-table tbody tr {
  transition: background-color .16s ease;
}

.phone-table tbody tr:hover {
  background: #f7faf9;
}

.phone-table td:focus-within {
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(8, 123, 117, .55);
}

.list-filterbar {
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border-color: #d3dddf;
  background: #f3f6f6;
}

.list-bulkbar {
  min-height: 48px;
  padding: 10px 14px;
  background: #f8faf9;
}

.history-bulkbar {
  margin-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.history-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.history-bulkbar + .history-list {
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.record-item {
  min-height: 82px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  transition: background-color .16s ease, box-shadow .16s ease;
}

.record-item:last-child {
  border-bottom: 0;
}

.record-item:hover {
  border-color: var(--line);
  background: #f6f9f8;
  box-shadow: inset 3px 0 var(--primary);
}

.record-item.trashed {
  background: #fcfafa;
}

.record-item.trashed:hover {
  box-shadow: inset 3px 0 var(--accent);
}

.record-item h3 {
  color: var(--ink);
  font-size: 17px;
}

.record-item p {
  margin-top: 4px;
}

.record-meta {
  min-width: 150px;
  gap: 3px;
  font-size: 12px;
}

.record-actions .btn.danger {
  min-height: 36px;
  background: transparent;
}

.empty {
  border-color: #c7d3d6;
  background: #fafcfc;
}

.review-workbench {
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}

.review-list-panel {
  top: calc(var(--sticky-topbar-height, 84px) + 18px);
  padding: 18px;
  border-top: 3px solid var(--accent);
}

.review-record-list {
  gap: 0;
  border-top: 1px solid var(--line);
}

.review-record-list button {
  min-height: 64px;
  padding: 11px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.review-record-list button:hover,
.review-record-list button.active {
  border-color: var(--line);
  background: #f0f6f5;
  box-shadow: inset 3px 0 var(--primary);
}

.review-empty {
  min-height: 420px;
  border: 1px dashed #c5d2d5;
  border-radius: 8px;
  background: #fafcfc;
}

.review-empty::before {
  content: "";
  width: 48px;
  height: 3px;
  margin-bottom: 5px;
  background: var(--accent);
}

.review-editor {
  border-top: 3px solid var(--primary);
}

.review-toolbar {
  top: calc(var(--sticky-topbar-height, 84px) + 8px);
}

.report-editor-sheet {
  border-color: #9eaeb3;
  box-shadow: 0 8px 24px rgba(31, 50, 57, .08);
}

.user-admin-layout {
  gap: 18px;
}

.user-create-panel {
  border-top: 3px solid var(--accent);
}

.user-list-panel {
  border-top: 3px solid var(--primary);
}

.user-list-table {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.user-list-row,
.user-list-row.is-admin {
  min-height: 82px;
  padding: 14px 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  transition: background-color .16s ease, box-shadow .16s ease;
}

.user-list-row:last-child {
  border-bottom: 0;
}

.user-list-row:hover {
  background: #f6f9f8;
  box-shadow: inset 3px 0 var(--primary);
}

.user-list-row.is-admin {
  background: #fffaf4;
}

.user-list-row.is-admin:hover {
  box-shadow: inset 3px 0 var(--accent);
}

.user-identity strong {
  color: var(--ink);
}

.mini-badge {
  border-radius: 5px;
}

.config-workbench {
  grid-template-columns: 286px minmax(0, 1fr) 310px;
  gap: 18px;
}

.config-menu,
.config-preview {
  top: 104px;
  max-height: calc(100vh - 126px);
  overflow: hidden;
}

.config-menu {
  grid-template-rows: auto auto auto minmax(0, 1fr);
  padding: 17px;
  border-top: 3px solid var(--accent);
}

.config-procedure-list {
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 5px 2px 0;
  scrollbar-color: #a4b6ba #edf1f2;
  scrollbar-width: thin;
}

.config-search {
  border-color: #d2dddf;
  background: #f6f8f8;
}

.config-procedure {
  gap: 4px;
  padding: 11px 12px;
  border-color: transparent;
  border-bottom-color: #dbe3e5;
  border-radius: 6px;
  background: #f7f9f9;
  box-shadow: none;
}

.config-procedure:hover {
  border-color: #b9cecc;
  background: #fff;
  box-shadow: none;
}

.config-procedure.active {
  border-color: #89bbb7;
  background: #eef7f5;
  box-shadow: inset 3px 0 var(--primary);
}

.config-toolbar {
  border-top: 3px solid var(--primary);
}

.config-stats {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.config-stats div {
  padding: 11px 13px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #f7f9f9;
}

.config-stats div:last-child {
  border-right: 0;
}

.config-tabs,
.config-step-tabs {
  gap: 3px;
  padding: 3px;
  border: 1px solid #ccd8da;
  border-radius: 7px;
  background: #edf2f2;
}

.config-tabs button,
.config-step-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  background: transparent;
}

.config-tabs button:hover,
.config-step-tabs button:hover {
  background: rgba(255, 255, 255, .75);
}

.config-tabs button.active,
.config-step-tabs button.active {
  background: var(--primary);
  box-shadow: 0 3px 9px rgba(8, 123, 117, .17);
}

.config-block {
  padding: 19px;
  border-top: 3px solid #c8d5d7;
}

.config-item,
.config-branch-item,
.config-timer-row {
  border-color: #d4dfe1;
  background: #f7f9f9;
  box-shadow: none;
}

.config-item.active {
  border-color: #8abbb7;
  background: #fff;
  box-shadow: inset 3px 0 var(--primary);
}

.config-preview {
  overflow-y: auto;
  padding: 17px;
  border-top: 3px solid var(--info);
  scrollbar-color: #a4b6ba #edf1f2;
  scrollbar-width: thin;
}

.preview-step {
  position: relative;
  border-color: #d5dfe1;
  background: #f7f9f9;
}

.preview-step > span {
  background: var(--primary);
}

.preview-docs span {
  border-left: 3px solid var(--info);
  border-radius: 4px;
  color: #285873;
  background: var(--info-soft);
}

.record-workspace {
  gap: 18px;
}

.mode-panel {
  padding: 16px 20px;
  border-left: 4px solid var(--info);
}

.record-layout {
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
}

.flow-main {
  gap: 18px;
}

.flow-strip {
  gap: 5px;
  padding: 7px;
  border-color: #ccd7da;
  box-shadow: 0 10px 26px rgba(29, 48, 55, .12);
}

.flow-node {
  min-height: 58px;
  padding: 10px 12px;
  border-color: transparent;
  border-radius: 6px;
  background: #f1f4f4;
}

.flow-node.done {
  border-color: transparent;
  color: #245e3d;
  background: var(--ok-soft);
}

.flow-node.current {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 -3px var(--primary);
}

.flow-node.locked {
  border-color: transparent;
  background: #edf1f2;
}

.handling-toolbar {
  border-left-width: 4px;
  box-shadow: var(--shadow-soft);
}

.handling-toolbar.status-pending {
  padding-block: 24px;
  border-top: 3px solid #d4a05b;
}

.start-handling-btn {
  min-height: 58px;
  padding-inline: 30px;
  border-radius: 7px;
  box-shadow: 0 7px 18px rgba(182, 56, 46, .2);
}

.start-handling-btn.btn.danger,
.start-handling-btn.btn.danger:hover:not(:disabled) {
  border-color: var(--danger);
  color: #fff;
  background: var(--danger);
}

.countdown-item,
.branch-countdown-item {
  border-color: #b7d1cf;
  border-left-color: var(--primary);
  background: #f8fbfa;
}

.step-card {
  padding: 19px;
  border-left-width: 4px;
  box-shadow: var(--shadow-soft);
}

.step-card.current {
  box-shadow: 0 10px 28px rgba(8, 123, 117, .09);
}

.step-card.locked {
  box-shadow: none;
  background: #f3f5f5;
}

.step-head h3 {
  color: var(--ink);
  font-size: 20px;
}

.step-columns {
  gap: 14px;
}

.info-box {
  padding: 14px;
  border-color: #d5dfe1;
  background: #f7f9f9;
}

.info-box h4 {
  color: #263c42;
}

.warning-box {
  border-color: #e7c878;
  background: var(--warn-soft);
}

.step-records {
  padding-top: 3px;
}

.time-node {
  padding: 10px 12px;
  border-color: #d4dfe1;
  background: #f9fbfb;
}

.reference-panel {
  top: 104px;
  gap: 16px;
  border-top: 3px solid var(--info);
}

.doc-list {
  gap: 9px;
}

.doc-item {
  padding: 13px;
  border-color: #d4dfe1;
  background: #f7f9f9;
}

.doc-usage {
  border-left: 3px solid var(--primary);
  border-radius: 4px;
}

.page-guide {
  border-color: #bed9d6;
  border-left: 3px solid var(--primary);
  background: #f1f8f7;
}

.risk-assessment {
  background: #f5f8f7;
}

.dialog-backdrop {
  background: rgba(16, 35, 42, .54);
  backdrop-filter: blur(3px);
}

.dialog-panel,
.fullscreen-panel,
.image-fullscreen-panel {
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: 0 28px 72px rgba(12, 29, 35, .3);
}

.app-toast {
  top: 22px;
  right: 28px;
  border-radius: 7px;
  box-shadow: 0 18px 46px rgba(25, 44, 50, .2);
}

@media (max-width: 1420px) {
  .config-workbench {
    grid-template-columns: 270px minmax(0, 1fr);
  }

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

  .review-list-panel {
    position: static;
  }

  .review-record-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 260px;
  }

  .config-preview {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
  }
}

@media (max-width: 1180px) {
  .finder-grid,
  .record-layout,
  .review-workbench,
  .user-create-form,
  .user-list-row {
    grid-template-columns: 1fr;
  }

  .quick-panel,
  .reference-panel,
  .review-list-panel,
  .config-menu {
    position: static;
    max-height: none;
  }

  .config-procedure-list {
    max-height: 380px;
  }
}

@media (max-width: 860px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 16px;
  }

  .topbar {
    padding: 14px 16px;
  }

  .topbar > div:first-child {
    padding-left: 10px;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-aside {
    border-right: 0;
    border-bottom: 5px solid #d08a30;
  }
}

@media (prefers-reduced-motion: reduce) {
  .content > * {
    animation: none;
  }
}
}
