: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;
}

.login-remember {
  align-items: center;
  margin-top: 2px;
}

.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.warning {
  color: #7a4b0c;
  background: #fff8e8;
  border-color: #e7bd72;
}

.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;
}

.btn.disabled,
.btn[aria-disabled="true"] {
  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.warning {
  border-color: #f4d68c;
  border-left-color: #bd7a00;
  color: #62450d;
  background: #fff9e8;
}

.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-meta-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 260px));
}

.duty-read-meta-compact {
  grid-template-columns: repeat(4, minmax(0, 260px));
}

.duty-fill-note {
  margin: 0;
  padding: 10px 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: #f8fbfb;
  font-size: 13px;
}

.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-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.handover-task-read-actions .btn {
  min-height: 30px;
  padding: 5px 10px;
}

.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;
}

.notam-ocr-panel {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
}

.notam-ocr-panel > span,
.notam-ocr-read > small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.notam-ocr-summary {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #cfe0e0;
  border-radius: 6px;
  background: #f7fbfb;
}

.notam-ocr-summary-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.notam-ocr-summary-heading strong {
  color: var(--ink);
  font-size: 13px;
}

.notam-ocr-summary-heading span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.notam-ocr-image-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.notam-ocr-image-status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid #d5dee0;
  border-radius: 5px;
  color: #6c7d80;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.notam-ocr-image-status.completed {
  border-color: #add8cf;
  color: #006c61;
  background: #edf9f5;
}

.notam-ocr-panel textarea {
  min-height: 108px;
  resize: vertical;
}

.notam-ocr-read {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
}

.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;
}

.fullscreen-task-list {
  min-height: min(54vh, 480px);
  overflow: auto;
  padding: 4px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fbfdfd;
}

.fullscreen-task-row {
  display: grid;
  grid-template-columns: 24px 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

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

.fullscreen-task-row > strong {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.7;
  white-space: pre-wrap;
}

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

.fullscreen-task-empty {
  display: grid;
  min-height: min(54vh, 480px);
  place-items: center;
  color: var(--muted);
}

.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: 1320px;
  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-table th:nth-child(3),
.phone-table td:nth-child(3) {
  min-width: 320px;
}

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

.phone-leaders-col {
  width: 220px;
}

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

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

.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;
}

.phone-table td > span {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.phone-report-leaders,
.phone-report-leaders-read {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.phone-report-leaders label {
  position: relative;
  cursor: pointer;
}

.phone-report-leaders input,
.phone-completion-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.phone-report-leaders label span,
.phone-report-leaders-read span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid #b7cdcf;
  border-radius: 6px;
  color: #34545a;
  background: #f8fbfb;
  font-size: 13px;
  line-height: 1.2;
}

.phone-report-leaders label:hover span,
.phone-report-leaders label:focus-within span {
  border-color: var(--primary);
  background: #f0faf9;
}

.phone-report-leaders label:has(input:checked) span,
.phone-report-leaders-read span {
  border-color: #5ea7a3;
  color: #005d59;
  background: #e9f6f5;
  font-weight: 700;
}

.phone-completion-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #b7cdcf;
  border-radius: 6px;
}

.phone-completion-toggle label {
  cursor: pointer;
}

.phone-completion-toggle label + label {
  border-left: 1px solid #b7cdcf;
}

.phone-completion-toggle span {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 4px 8px;
  color: #526b70;
  background: #fff;
  font-size: 13px;
  white-space: nowrap;
}

.phone-completion-toggle .pending:has(input:checked) span {
  color: #a3382e;
  background: #fff0ee;
  font-weight: 800;
}

.phone-completion-toggle .done:has(input:checked) span {
  color: #12643f;
  background: #edf8f2;
  font-weight: 800;
}

.phone-completion-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border: 1px solid;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.phone-completion-pill.pending {
  border-color: #efb2ac;
  color: #a3382e;
  background: #fff0ee;
}

.phone-completion-pill.done {
  border-color: #a8d2b4;
  color: #12643f;
  background: #edf8f2;
}

.phone-table th:nth-child(7),
.phone-table td:nth-child(7) {
  position: sticky;
  z-index: 2;
  right: 0;
  background: #fff;
  box-shadow: -8px 0 12px rgba(21, 52, 58, 0.05);
}

.phone-table th:nth-child(7) {
  z-index: 3;
  background: #edf4f4;
}

.phone-table.editing th:nth-child(7),
.phone-table.editing td:nth-child(7) {
  right: 74px;
}

.phone-table.editing th:nth-child(8),
.phone-table.editing td:nth-child(8) {
  position: sticky;
  z-index: 2;
  right: 0;
  background: #fff;
}

.phone-table.editing th:nth-child(8) {
  z-index: 3;
  background: #edf4f4;
}

.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;
}

.intake-field {
  align-self: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
}

.intake-question {
  min-height: 44px;
  margin: -1px 0 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.intake-field textarea {
  min-height: 92px;
  background: #fff;
}

.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;
}

.history-filterbar {
  grid-template-columns: minmax(220px, 1.3fr) repeat(4, minmax(140px, 0.7fr)) auto auto;
}

.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;
}

.procedure-fallback {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #b9d8d5;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: #f3fbfa;
}

.fallback-kicker,
.danger-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.procedure-fallback h3 {
  margin: 3px 0 0;
  font-size: 18px;
}

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

.procedure-fallback-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.procedure-fallback-list button,
.procedure-directory-items button {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #bfdbd8;
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.procedure-fallback-list button:hover,
.procedure-directory-items button:hover {
  border-color: var(--primary);
  background: #f8fdfc;
}

.procedure-fallback-list strong,
.procedure-directory-items strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.procedure-fallback-list span,
.procedure-directory-items span {
  color: var(--muted);
  font-size: 12px;
}

.procedure-directory-action {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  font-size: 16px;
}

.quick-panel-empty {
  display: grid;
  gap: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.quick-panel-empty p {
  margin: 0;
}

.procedure-directory-dialog {
  width: min(960px, 92vw);
}

.procedure-directory-tree {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.procedure-directory-group {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbfb;
}

.procedure-directory-group h3 {
  margin: 0 0 10px;
  color: var(--primary-dark);
  font-size: 16px;
}

.procedure-directory-group p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.procedure-directory-items {
  display: grid;
  gap: 8px;
}

.handover-confirmation-panel,
.handover-preflight-panel {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #b9d8d5;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: #f7fbfb;
}

.handover-confirmation-panel.empty-confirmations {
  border-left-color: #9daeb2;
}

.handover-preflight-panel.has-missing {
  border-color: #edc778;
  border-left-color: var(--warn);
  background: #fffaf0;
}

.handover-confirmation-panel .section-title,
.handover-preflight-panel .section-title {
  margin: 0;
}

.handover-confirmation-list,
.handover-preflight-list {
  display: grid;
  gap: 8px;
}

.handover-confirmation-item {
  display: grid;
  grid-template-columns: auto 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 11px;
  border: 1px solid #d6e4e2;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.handover-confirmation-item.confirmed {
  border-color: #acd7bd;
  background: #f4fbf6;
}

.handover-confirmation-item input {
  width: 18px;
  min-height: 18px;
  margin: 3px 0 0;
}

.handover-confirmation-index {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
}

.handover-confirmation-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.handover-confirmation-copy small,
.handover-confirmation-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.handover-confirmation-copy strong {
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.handover-preflight-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #d8e2e3;
  border-radius: 6px;
  background: #fff;
}

.handover-preflight-list article.missing {
  border-color: #ebc16b;
  background: #fffdf7;
}

.handover-preflight-list article > span {
  min-width: 50px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.handover-preflight-list article.missing > span {
  color: #985f05;
}

.handover-preflight-list article strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.handover-preflight-list article small {
  color: var(--muted);
  font-size: 12px;
}

.handover-preflight-empty {
  padding: 11px 12px;
  border: 1px dashed #c7d6d7;
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
}

.handover-reminder-dialog {
  width: min(560px, 90vw);
  border-top: 4px solid var(--warn);
}

.handover-reminder-dialog h2 {
  margin: 4px 0 8px;
}

.handover-reminder-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.shortcut-settings-dialog {
  width: min(700px, 90vw);
}

.shortcut-settings-section {
  display: grid;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.shortcut-settings-section h3 {
  margin: 0;
  font-size: 16px;
}

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

.shortcut-settings-list label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fbfb;
}

.shortcut-settings-list label > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.shortcut-settings-list small,
.notification-permission span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.notification-permission {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #c8dcdc;
  border-radius: 6px;
  background: #f5fbfa;
}

.shortcut-settings-section .check-line {
  margin: 0;
}

.todo-dialog {
  width: min(620px, 90vw);
}

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

.todo-dialog-list article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fbfb;
}

.todo-dialog-list article > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
}

.todo-dialog-list article > div {
  display: grid;
  gap: 3px;
}

.todo-dialog-list small {
  color: var(--muted);
  font-size: 12px;
}

.record-audit-dialog {
  width: min(820px, 92vw);
}

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

.record-audit-list article {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  background: #fbfdfd;
}

.record-audit-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.record-audit-meta span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.record-audit-list p {
  margin: 0;
  color: #40555a;
  line-height: 1.55;
}

.record-audit-changes {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.record-audit-changes li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  color: #41565b;
  line-height: 1.55;
}

.record-audit-changes li strong {
  color: #263b40;
}

.audit-before {
  color: #8a3f37;
  text-decoration: line-through;
}

.audit-after {
  color: #176b43;
  font-weight: 700;
}

@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));
  }
}

/* 外部 Word 单据导入建流程 */
.procedure-import-panel {
  display: grid;
  gap: 12px;
  border-left: 4px solid var(--primary);
  background: #f7fbfa;
}

.procedure-import-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.procedure-import-head h3,
.procedure-import-head p {
  margin: 0;
}

.procedure-import-head p {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.6;
}

.procedure-import-actions,
.procedure-import-result-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.procedure-import-actions .btn,
.procedure-import-result-actions .btn,
.procedure-import-log-list .btn {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.procedure-import-notes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid #d5e4e2;
}

.procedure-import-notes span {
  padding: 4px 8px;
  border: 1px solid #c5dbd8;
  border-radius: 5px;
  background: #fff;
  color: #426461;
  font-size: 12px;
}

.procedure-import-audit {
  border-top: 1px solid #d5e4e2;
}

.procedure-import-audit summary {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 0 0;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.procedure-import-audit summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.procedure-import-log-list {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

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

.procedure-import-log-list article > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.procedure-import-log-list strong,
.procedure-import-log-list small,
.procedure-import-log-list p {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.procedure-import-log-list small,
.procedure-import-log-list p {
  color: var(--muted);
  font-size: 12px;
}

.procedure-import-log-list p {
  color: var(--danger);
}

.import-status {
  min-width: 42px;
  padding: 3px 6px;
  border: 1px solid;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.import-status.success {
  border-color: #9bcdb1;
  background: #edf8f1;
  color: #147a45;
}

.import-status.failed {
  border-color: #edb4ad;
  background: #fff1ef;
  color: var(--danger);
}

.procedure-import-result-dialog {
  width: min(880px, 92vw);
  max-height: min(820px, 90vh);
  overflow-y: auto;
}

.procedure-import-result-banner {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid;
  border-radius: 6px;
}

.procedure-import-result-banner.success {
  border-color: #a7d2b7;
  background: #eff8f2;
  color: #155f38;
}

.procedure-import-result-banner.failed {
  border-color: #efb7b0;
  background: #fff2f0;
  color: #9f2f25;
}

.procedure-import-result-banner span {
  line-height: 1.55;
}

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

.procedure-import-summary-grid > div {
  display: grid;
  gap: 2px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9f9;
}

.procedure-import-summary-grid strong {
  font-size: 22px;
}

.procedure-import-summary-grid span {
  color: var(--muted);
  font-size: 12px;
}

.procedure-import-step-result {
  display: grid;
  gap: 7px;
}

.procedure-import-step-result article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
}

.procedure-import-step-result article > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #e6f2f0;
  color: var(--primary);
  font-weight: 800;
}

.procedure-import-step-result article > div {
  display: grid;
  gap: 2px;
}

.procedure-import-step-result small {
  color: var(--muted);
}

.procedure-import-warnings {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #e6c777;
  border-radius: 6px;
  background: #fff8e5;
}

.procedure-import-warnings h3,
.procedure-import-warnings ul {
  margin: 0;
}

.procedure-import-warnings ul {
  margin-top: 7px;
  padding-left: 20px;
  color: #6f571b;
  line-height: 1.6;
}

.procedure-import-result-actions {
  margin-top: 16px;
}

.procedure-import-source {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

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

.config-empty-state {
  min-height: 220px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.config-empty-state h2,
.config-empty-state p {
  margin: 0;
}

.config-empty-state p {
  margin-top: 7px;
  color: var(--muted);
}

@media (max-width: 1360px) {
  .procedure-import-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .procedure-import-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

/* 西昌机场机坪检查记录 */
.apron-inspection-page {
  display: grid;
  width: 100%;
  max-width: 1660px;
  gap: 16px;
}

.apron-inspection-page > * {
  min-width: 0;
}

.apron-inspection-hero {
  grid-template-columns: auto minmax(320px, 1fr) auto;
}

.apron-day-meta {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, .7fr) minmax(220px, .7fr);
  gap: 18px;
  align-items: end;
  padding: 18px 20px;
}

.apron-day-meta-copy {
  display: grid;
  gap: 5px;
  align-self: center;
}

.apron-day-meta-copy span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.apron-day-meta-copy strong {
  font-size: 18px;
}

.apron-progress-nav {
  position: sticky;
  z-index: 8;
  top: calc(var(--sticky-topbar-height, 84px) + 8px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px;
  border-color: #b8d2d0;
  box-shadow: 0 8px 22px rgba(24, 52, 58, .1);
}

.apron-progress-summary {
  display: grid;
  grid-template-columns: auto auto minmax(160px, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  padding: 3px 6px;
}

.apron-progress-summary strong {
  color: var(--primary);
  font-size: 19px;
}

.apron-progress-summary > span {
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.apron-progress-track {
  grid-column: 3;
  height: 7px;
  overflow: hidden;
  border-radius: 3px;
  background: #dce8e8;
}

.apron-progress-tools {
  grid-column: 4;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.apron-progress-tools .btn {
  white-space: nowrap;
}

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

.apron-progress-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
}

.apron-progress-links button {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  background: #f7faf9;
  cursor: pointer;
}

.apron-progress-links button:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.apron-progress-links button.active {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
  background: var(--primary-soft);
}

.apron-progress-links button.complete:not(.active) {
  border-color: #b8dcc8;
  background: #f1f8f4;
}

.apron-progress-links button.issue:not(.active) {
  border-color: #e4bd8b;
  background: #fff7eb;
}

.apron-progress-links button > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 4px;
  color: #fff;
  background: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.apron-progress-links button strong {
  overflow: hidden;
  font-size: 13px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apron-progress-links button small {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.apron-sections {
  display: grid;
  gap: 18px;
}

.apron-inspection-section {
  scroll-margin-top: calc(var(--sticky-topbar-height, 84px) + 150px);
  overflow: hidden;
  padding: 0;
}

.apron-section-head {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #f3f8f7;
}

.apron-section-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 5px;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
}

.apron-section-head h3,
.apron-section-head p {
  margin: 0;
}

.apron-section-head > div:nth-child(2) > span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.apron-section-head h3 {
  font-size: 20px;
}

.apron-section-progress {
  display: grid;
  min-width: 112px;
  gap: 2px;
  text-align: right;
}

.apron-section-progress strong {
  color: var(--primary);
  font-size: 18px;
}

.apron-section-progress span {
  color: var(--muted);
  font-size: 12px;
}

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

.apron-section-actions .confirming {
  color: #7c3d12;
  border-color: #d99b60;
  background: #fff2df;
}

.apron-inspection-section.collapsed .apron-section-head {
  border-bottom: 0;
}

.apron-inspection-section.collapsed .apron-section-body {
  display: none;
}

.apron-section-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.apron-section-meta.readonly-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.apron-check-list {
  display: grid;
}

.apron-check-item {
  border-bottom: 1px solid var(--line);
  border-left: 4px solid transparent;
  background: #fff;
  transition: border-color .16s ease, background-color .16s ease;
}

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

.apron-check-item.checked {
  border-left-color: #52a47a;
}

.apron-check-item.noncompliant {
  border-left-color: #cf7a35;
  background: #fffaf3;
}

.apron-check-item.attention {
  animation: apron-item-attention 1.8s ease;
}

@keyframes apron-item-attention {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(0, 126, 120, 0); }
  30% { box-shadow: inset 0 0 0 2px rgba(0, 126, 120, .55); }
}

.apron-item-main {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 15px 18px;
}

.apron-item-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 4px;
  color: #53686d;
  background: #eaf0f1;
  font-size: 12px;
  font-weight: 800;
}

.apron-item-main p {
  margin: 2px 0 0;
  color: #24383e;
  line-height: 1.72;
  white-space: pre-wrap;
}

.apron-result-control {
  display: inline-grid;
  grid-template-columns: repeat(3, 74px);
  gap: 0;
  overflow: hidden;
  border: 1px solid #b8c9cc;
  border-radius: 5px;
  background: #fff;
}

.apron-result-control button {
  min-height: 34px;
  padding: 5px 8px;
  border-right: 1px solid #d1dcde;
  color: #465c62;
  background: transparent;
  cursor: pointer;
}

.apron-result-control button:last-child {
  border-right: 0;
}

.apron-result-control button:hover,
.apron-result-control button.selected {
  color: #fff;
  background: var(--primary);
}

.apron-result-control button.warning:hover,
.apron-result-control button.warning.selected {
  background: #b75f20;
}

.apron-result-badge,
.apron-freeform-label {
  display: inline-flex;
  min-width: 72px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: #f4f7f7;
  font-size: 13px;
  font-weight: 700;
}

.apron-result-badge.checked {
  color: #17633f;
  border-color: #b8dcc8;
  background: #eef8f2;
}

.apron-result-badge.noncompliant {
  color: #8d440d;
  border-color: #e4bd8b;
  background: #fff3df;
}

.apron-item-details {
  margin: 0 18px 15px 60px;
  border: 1px solid #d5e0e1;
  border-radius: 5px;
  background: #f8faf9;
}

.apron-item-details summary {
  padding: 9px 12px;
  color: #416067;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.apron-remark-fields,
.apron-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border-top: 1px solid #dce5e6;
}

.apron-remark-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.apron-detail-grid textarea {
  width: 100%;
  min-height: 70px;
  resize: vertical;
}

.apron-item-read-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 18px 15px 60px;
  padding: 11px 12px;
  border: 1px solid #d7e1e2;
  background: #f8faf9;
}

.apron-item-read-details div {
  min-width: 0;
}

.apron-item-read-details span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.apron-item-read-details p {
  margin: 4px 0 0;
  line-height: 1.6;
  white-space: pre-wrap;
}

@media (max-width: 1400px) {
  .apron-progress-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .apron-progress-links {
    grid-template-columns: repeat(5, minmax(112px, 1fr));
  }

  .apron-section-head {
    grid-template-columns: auto minmax(220px, 1fr) auto;
  }

  .apron-section-actions {
    grid-column: 2 / -1;
    justify-self: end;
  }

  .apron-item-main {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .apron-result-control,
  .apron-result-badge,
  .apron-freeform-label {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 1100px) {
  .apron-day-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .apron-day-meta-copy {
    grid-column: 1 / -1;
  }

  .apron-progress-summary {
    grid-template-columns: auto 1fr;
  }

  .apron-progress-track,
  .apron-progress-tools {
    grid-column: 1 / -1;
  }

  .apron-progress-tools {
    justify-content: flex-start;
  }

  .apron-progress-links {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .apron-section-head {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .apron-section-progress,
  .apron-section-actions {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .apron-section-actions {
    flex-wrap: wrap;
  }
}

@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-workbench.report-finalization-mode { grid-template-columns: minmax(0, 1fr); }
.report-finalization-mode .review-list-panel { display: none; }
.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; }
.report-final-state { padding: 3px 8px; border: 1px solid #e0b76b; border-radius: 999px; color: #7a4b0c; background: #fff8e8; font-weight: 700; }
.report-final-state.saved { border-color: #a8d2b4; color: var(--ok); background: var(--ok-soft); }
.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-edit-field input[readonly] { color: #17383b; background: #f2f6f6; font-weight: 800; }
.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-decision-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.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;
  }
}

/* 机场级值守配置与广元部门表格：保持在当前主题的有效作用域。 */
.duty-config-page { display: grid; gap: 16px; max-width: 1500px; }
.duty-config-intro,
.duty-config-section,
.duty-config-actions { padding: 20px; }
.duty-config-summary { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 10px; margin-top: 16px; }
.duty-config-summary > div { display: flex; min-height: 68px; flex-direction: column; justify-content: center; gap: 5px; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface-soft); }
.duty-config-summary span,
.duty-module-option small,
.duty-department-preview p,
.duty-config-note p { color: var(--muted); }
.duty-config-summary strong { font-size: 20px; }
.duty-module-options { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 12px; }
.duty-module-option { display: flex; min-height: 72px; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.duty-module-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.duty-module-option.fixed { cursor: default; }
.duty-module-option input { width: 18px; height: 18px; flex: 0 0 auto; }
.duty-module-option span { display: grid; gap: 4px; }
.duty-department-editor { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.duty-department-editor textarea { min-height: 280px; line-height: 1.75; }
.duty-department-preview { min-width: 0; overflow-x: auto; padding: 14px; border: 1px solid var(--line); background: var(--surface-soft); }
.department-preview-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(104px, 1fr); min-width: max-content; margin: 12px 0 8px; border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); }
.department-preview-row span { display: grid; min-height: 56px; place-items: center; padding: 8px; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); text-align: center; font-weight: 700; }
.duty-config-note { display: grid; gap: 6px; }
.duty-config-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gy-readiness-wrap { overflow-x: auto; padding: 20px 24px 24px; }
.gy-readiness-table { width: max(100%, calc(var(--gy-column-count, 9) * 112px)); min-width: 1120px; border-collapse: collapse; table-layout: fixed; }
.gy-readiness-table th,
.gy-readiness-table td { padding: 11px 9px; border: 1px solid #cfdcde; text-align: center; vertical-align: middle; }
.gy-readiness-table thead th,
.gy-readiness-table tbody th { background: #eef5f4; font-weight: 700; }
.gy-readiness-table thead th:first-child,
.gy-readiness-table tbody th:first-child { position: sticky; left: 0; z-index: 2; width: 104px; min-width: 104px; box-shadow: 1px 0 0 #cfdcde; }
.gy-readiness-table input { width: 100%; min-width: 88px; border: 0; border-bottom: 1px solid #8daeb0; border-radius: 0; background: transparent; text-align: center; }

@media (max-width: 1100px) {
  .duty-config-summary,
  .duty-module-options,
  .duty-department-editor { grid-template-columns: 1fr; }
}

/* 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: "SOCP / 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 .login-brand-title {
  font-size: 48px;
  line-height: 1.15;
}

.login-aside .login-system-name {
  font-size: 16px;
  font-weight: 600;
}

.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);
}

.gy-handover-page,
.control-log-page {
  display: grid;
  gap: 18px;
}

.gy-duty-sheet,
.control-log-sheet {
  padding: 0;
  overflow: hidden;
}

.gy-sheet-heading,
.control-log-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  background: #f7faf9;
}

.gy-sheet-heading h3,
.control-log-title-row h3 {
  margin: 0;
  font-size: 22px;
}

.gy-sheet-heading p,
.control-log-title-row span {
  margin: 5px 0 0;
  color: var(--muted);
}

.gy-date-field {
  width: 250px;
  flex: 0 0 250px;
}

.gy-readiness-wrap {
  overflow-x: auto;
  padding: 20px 24px 24px;
}

.gy-readiness-table {
  width: max(100%, calc(var(--gy-column-count, 9) * 112px));
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
}

.gy-readiness-table th,
.gy-readiness-table td {
  padding: 11px 9px;
  border: 1px solid #cfdcde;
  text-align: center;
  vertical-align: middle;
}

.gy-readiness-table thead th,
.gy-readiness-table tbody th {
  background: #eef5f4;
  font-weight: 700;
}

.gy-readiness-table thead th:first-child,
.gy-readiness-table tbody th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 104px;
  min-width: 104px;
  box-shadow: 1px 0 0 #cfdcde;
}

.gy-readiness-table input {
  width: 100%;
  min-width: 96px;
  border: 0;
  border-bottom: 1px solid #8daeb0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.gy-shift-sheet {
  scroll-margin-top: 96px;
}

.gy-shift-number {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
}

.gy-shift-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
}

.gy-shift-meta > label,
.gy-shift-meta > .readonly-field {
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--border);
}

.gy-shift-meta > :last-child {
  border-right: 0;
}

.gy-shift-meta label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.gy-shift-meta input {
  width: 100%;
}

.gy-handover-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
}

.gy-detail-field,
.gy-handover-detail-grid > .readonly-field {
  min-width: 0;
  padding: 15px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.gy-detail-field:nth-child(3n),
.gy-handover-detail-grid > .readonly-field:nth-child(3n) {
  border-right: 0;
}

.gy-detail-field > span {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
}

.gy-detail-field > span b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
}

.gy-detail-field textarea {
  width: 100%;
  min-height: 94px;
  resize: vertical;
}

.gy-transfer-list,
.gy-transfer-read {
  display: grid;
  gap: 10px;
  padding: 18px 24px 24px;
}

.gy-transfer-item,
.gy-transfer-read-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #cddcde;
  border-radius: 6px;
  background: #fff;
}

.gy-transfer-item.done,
.gy-transfer-read-item.done {
  border-color: #b9dacb;
  background: #f1f9f5;
}

.gy-transfer-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.carried-badge {
  padding: 4px 7px;
  border-radius: 4px;
  color: #745514;
  background: #fff3cd;
  font-size: 12px;
  font-weight: 700;
}

.gy-transfer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gy-transfer-note {
  color: var(--muted);
  font-size: 13px;
}

.gy-transfer-read-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.gy-transfer-read-item .ui-icon {
  color: var(--primary);
}

.control-log-title-row > div:first-child span {
  display: block;
  margin: 0 0 4px;
  color: var(--primary);
  font-weight: 800;
}

.control-log-section {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  border-bottom: 1px solid var(--border);
}

.control-log-section:last-child {
  border-bottom: 0;
}

.control-log-section-head {
  display: flex;
  gap: 12px;
  padding: 22px;
  background: #eef5f4;
}

.control-log-section-head > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 5px;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
}

.duty-config-page {
  display: grid;
  gap: 16px;
  max-width: 1500px;
}

.duty-config-intro,
.duty-config-section,
.duty-config-actions {
  padding: 20px;
}

.duty-config-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.duty-config-summary > div {
  display: flex;
  min-height: 68px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.duty-config-summary span,
.duty-module-option small,
.duty-department-preview p,
.duty-config-note p {
  color: var(--muted);
}

.duty-config-summary strong {
  font-size: 20px;
}

.duty-module-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.duty-module-option {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.duty-module-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.duty-module-option.fixed {
  cursor: default;
}

.duty-module-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.duty-module-option span {
  display: grid;
  gap: 4px;
}

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

.duty-department-editor textarea {
  min-height: 280px;
  line-height: 1.75;
}

.duty-department-preview {
  min-width: 0;
  overflow-x: auto;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.department-preview-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(104px, 1fr);
  min-width: max-content;
  margin: 12px 0 8px;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.department-preview-row span {
  display: grid;
  min-height: 56px;
  place-items: center;
  padding: 8px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  text-align: center;
  font-weight: 700;
}

.duty-config-note {
  display: grid;
  gap: 6px;
}

.duty-config-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 1100px) {
  .duty-config-summary,
  .duty-module-options {
    grid-template-columns: 1fr;
  }

  .duty-department-editor {
    grid-template-columns: 1fr;
  }
}

.control-log-section-head h3,
.control-log-section-head p {
  margin: 0;
}

.control-log-section-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.control-log-grid,
.control-log-read-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
}

.control-log-grid > .field,
.control-log-read-grid > .readonly-field {
  min-width: 0;
  padding: 15px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.control-log-grid > .field:nth-child(3n),
.control-log-read-grid > .readonly-field:nth-child(3n) {
  border-right: 0;
}

.control-log-grid > .wide-field {
  grid-column: span 3;
  border-right: 0;
}

.control-log-grid input,
.control-log-grid textarea {
  width: 100%;
}

.control-log-grid textarea {
  min-height: 90px;
  resize: vertical;
}

.control-log-equipment-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 108px;
}

.control-log-equipment-field select {
  width: 100%;
  min-height: 42px;
  border-color: #9fbdbb;
  background: #fff;
  font-weight: 700;
}

.control-log-equipment-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 126, 119, 0.12);
}

.equipment-abnormal-detail textarea {
  min-height: 70px;
  border-color: #d99c55;
  background: #fffaf1;
}

.equipment-abnormal-detail[hidden] {
  display: none;
}

.control-log-equipment-read {
  min-height: 104px;
}

.equipment-read-value {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
}

.equipment-read-value p {
  margin: 0;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
}

.equipment-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
}

.equipment-status.normal {
  color: #126a43;
  border-color: #b9dfcd;
  background: #edf8f2;
}

.equipment-status.abnormal {
  color: #9a4a09;
  border-color: #ebc693;
  background: #fff4df;
}

.equipment-status.empty {
  color: var(--muted);
  border-color: var(--border);
  background: var(--surface-soft);
}

@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;
  }

  .gy-handover-detail-grid,
  .control-log-grid,
  .control-log-read-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gy-detail-field:nth-child(3n),
  .gy-handover-detail-grid > .readonly-field:nth-child(3n),
  .control-log-grid > .field:nth-child(3n),
  .control-log-read-grid > .readonly-field:nth-child(3n) {
    border-right: 1px solid var(--border);
  }

  .gy-detail-field:nth-child(2n),
  .gy-handover-detail-grid > .readonly-field:nth-child(2n),
  .control-log-grid > .field:nth-child(2n),
  .control-log-read-grid > .readonly-field:nth-child(2n) {
    border-right: 0;
  }

  .control-log-grid > .wide-field {
    grid-column: span 2;
  }
}

@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;
  }
}
}

/* 历史案例录入与知识库统计 */
.case-entry-page {
  display: grid;
  gap: 16px;
}

.case-entry-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.case-entry-hero h2,
.case-entry-hero p {
  margin: 0;
}

.case-entry-hero p {
  margin-top: 6px;
  color: var(--muted);
}

.case-entry-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.case-word-import-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-left: 4px solid var(--primary);
  background: #f7fbfa;
}

.case-word-import-copy h3,
.case-word-import-copy p {
  margin: 0;
}

.case-word-import-copy p {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.6;
}

.case-word-import-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.case-word-import-actions .btn,
.case-attachment-head .btn {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.case-word-result-dialog {
  width: min(880px, 92vw);
}

.case-import-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.case-import-summary > div {
  display: grid;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8faf9;
}

.case-import-summary strong {
  font-size: 24px;
}

.case-import-summary .success strong { color: #147a45; }
.case-import-summary .failed strong { color: var(--danger); }

.case-import-success-list,
.case-import-failure-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.case-import-success-list h3,
.case-import-failure-list h3 {
  margin: 0 0 4px;
}

.case-import-success-list > div,
.case-import-failure-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f9fbfb;
}

.case-import-success-list span,
.case-import-failure-list p {
  margin: 0;
  color: var(--muted);
}

.case-import-failure-list article {
  grid-template-columns: 76px minmax(0, 1fr);
  border-color: #efc2bd;
  background: #fff8f7;
}

.case-import-failure-list article > span {
  color: var(--danger);
  font-weight: 700;
}

.case-import-all-success {
  padding: 13px;
  border-left: 3px solid #2f8b5b;
  background: #f0faf4;
  color: #236b47;
}

.case-entry-settings {
  display: grid;
  grid-template-columns: minmax(320px, 1.5fr) minmax(240px, 1fr) minmax(240px, 1fr);
  gap: 16px;
  align-items: end;
}

.case-entry-settings .wide-field {
  grid-column: auto;
}

.case-category-control {
  width: 100%;
}

.case-category-control button {
  flex: 1;
  min-height: 42px;
}

.case-entry-review-note {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border-left: 3px solid var(--primary);
  background: #f2f8f8;
  color: #52616b;
}

.case-entry-review-note strong {
  color: #075c5a;
  white-space: nowrap;
}

.case-entry-editor {
  min-width: 0;
  overflow: hidden;
}

.case-entry-editor .report-editor-sheet {
  margin-top: 4px;
}

.case-detail-extras {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
  border-top: 1px solid var(--border);
  background: #f8faf9;
}

.case-detail-extras .section-title {
  margin: 0;
}

.case-detail-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.case-detail-tags span {
  padding: 4px 9px;
  border: 1px solid #9bc9c7;
  border-radius: 999px;
  background: #edf8f7;
  color: #006c69;
  font-size: 12px;
  font-weight: 700;
}

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

.case-detail-knowledge-grid label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.case-detail-knowledge-grid textarea {
  min-height: 110px;
  font-weight: 400;
}

.case-attachment-section {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.case-attachment-head,
.case-attachment-list article,
.case-attachment-list article > div {
  display: flex;
  align-items: center;
}

.case-attachment-head {
  justify-content: space-between;
  gap: 14px;
}

.case-attachment-head h4,
.case-attachment-head p {
  margin: 0;
}

.case-attachment-head p {
  margin-top: 4px;
  color: var(--muted);
}

.case-attachment-list {
  display: grid;
  gap: 7px;
}

.case-attachment-list article {
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.case-attachment-list article > div {
  gap: 8px;
}

.case-attachment-list article span {
  display: grid;
  gap: 2px;
}

.case-attachment-list small {
  color: var(--muted);
}

.record-source-badge {
  display: inline-flex;
  width: max-content;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  border: 1px solid #9bc9c7;
  border-radius: 999px;
  background: #edf8f7;
  color: #006c69;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.record-source-badge.warning {
  border-color: #e4b86d;
  background: #fff5dd;
  color: #8a5200;
}

.similar-case-list article > div .record-source-badge {
  margin: 4px 0 0;
}

.knowledge-base-analytics {
  margin-top: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

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

@media (max-width: 1180px) {
  .case-word-import-panel {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .case-word-import-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

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

  .case-entry-settings .wide-field,
  .case-entry-review-note {
    grid-column: 1 / -1;
  }

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

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

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

.phone-period-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-right: auto;
}

.phone-period-filter label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  white-space: nowrap;
}

.phone-period-filter select {
  width: 118px;
  min-height: 36px;
  padding: 5px 9px;
  font-size: 14px;
}

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

.phone-records-expanded .phone-table-wrap {
  overflow: auto;
}

.phone-records-expanded .phone-table {
  table-layout: fixed;
  min-width: 1160px;
}

.phone-records-expanded .phone-time-col { width: 136px; }
.phone-records-expanded .phone-caller-col { width: 120px; }
.phone-records-expanded .phone-tags-col { width: 132px; }
.phone-records-expanded .phone-leaders-col { width: 152px; }
.phone-records-expanded .phone-recorder-col { width: 96px; }
.phone-records-expanded .phone-status-col { width: 96px; }
.phone-records-expanded .phone-action-col { width: 64px; }

.phone-records-expanded .phone-table th:nth-child(n+7),
.phone-records-expanded .phone-table td:nth-child(n+7) {
  position: static;
  right: auto;
  box-shadow: none;
}

.phone-records-expanded .template-fill-editor {
  min-width: 0;
}

.phone-records-expanded .event-tag-editor,
.phone-records-expanded .phone-time-input {
  min-width: 0;
}

.phone-records-expanded .phone-table input:not([type="checkbox"]):not([type="radio"]) {
  padding-inline: 6px;
}

.phone-records-expanded .phone-completion-toggle {
  grid-template-columns: 1fr;
}

.phone-records-expanded .phone-completion-toggle label + label {
  border-left: 0;
  border-top: 1px solid #b7cdcf;
}

.phone-records-expanded .template-chunk {
  min-width: 0;
  align-items: flex-start;
  white-space: normal;
}

.phone-records-expanded .template-chunk-wide {
  flex-basis: 100%;
  width: 100%;
  flex-wrap: wrap;
}

.phone-records-expanded textarea {
  overflow: hidden;
  overflow-wrap: anywhere;
  resize: none;
  max-height: none;
}

.phone-records-expanded textarea[data-phone-field="content"] {
  min-height: 108px;
  line-height: 1.7;
}

.phone-records-expanded .template-gap-multiline {
  min-height: 30px;
  max-width: 100%;
  line-height: 1.65;
  white-space: pre-wrap;
  font-weight: 500;
}

.phone-records-expanded .template-chunk-wide .template-gap-multiline {
  width: 100%;
  flex: 1 1 100%;
  min-width: 0;
  min-height: 78px;
}

.phone-notified-units {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.phone-notified-units-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.7;
}

.phone-notified-units-line > span:first-child,
.phone-notified-units-line > span:last-child {
  flex: 0 0 auto;
  padding-top: 4px;
}

.phone-table .phone-notified-units-input {
  flex: 1;
  min-width: 0;
  min-height: 32px;
  padding: 4px 2px;
  border: 0;
  border-bottom: 1px solid #6a9d9a;
  border-radius: 0;
  background: transparent;
  line-height: 1.7;
}

.phone-notified-units-value {
  flex: 1;
  min-width: 0;
  padding: 4px 2px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.phone-notified-units-value.empty {
  border-bottom: 1px solid var(--line-strong);
}
