:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.62);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --border: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.16);
  --accent: #0071e3;
  --accent-dark: #005bbd;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --success: #248a3d;
  --warning: #b46a00;
  --danger: #d70015;
  --code-bg: #fbfbfd;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.08);
  --glow: 0 0 0 1px rgba(0, 113, 227, 0.12), 0 16px 36px rgba(0, 113, 227, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html {
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1120px;
  color: var(--text);
  background:
    radial-gradient(circle at 18% -8%, rgba(255, 255, 255, 0.95), transparent 30%),
    radial-gradient(circle at 86% 4%, rgba(0, 113, 227, 0.12), transparent 24%),
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 36%, #eef1f5 100%);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.62), transparent 42%),
    radial-gradient(circle at 70% 18%, rgba(0, 113, 227, 0.08), transparent 32%);
  background-size: auto;
  mask-image: none;
  z-index: -1;
}

.auth-body,
.scan-body {
  min-width: 0;
  min-height: 100dvh;
  display: block;
  padding: 16px;
}

.auth-shell,
.scan-shell {
  width: min(420px, 100%);
  margin: 0 auto;
}

.auth-card,
.scan-card {
  padding: 22px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.auth-body {
  display: grid;
  place-items: center;
}

.scan-body {
  color: #effaf8;
  background:
    linear-gradient(180deg, rgba(24, 211, 189, 0.16), transparent 32%),
    radial-gradient(circle at 90% 0%, rgba(255, 184, 77, 0.18), transparent 30%),
    #071011;
}

.scan-shell {
  display: grid;
  gap: 12px;
  padding-bottom: 26px;
}

.scan-hero-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  display: grid;
  align-content: space-between;
  padding: 22px;
  border: 1px solid rgba(24, 211, 189, 0.3);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(24, 211, 189, 0.18), rgba(255, 184, 77, 0.08)),
    rgba(12, 27, 31, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.scan-hero-card::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -28px;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(24, 211, 189, 0.24);
  border-radius: 50%;
}

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

.scan-card {
  padding: 16px;
  border-radius: 14px;
  background: rgba(14, 26, 29, 0.92);
}

.scan-submit-card {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 12px 0 0;
  background: linear-gradient(to top, #071011 72%, transparent);
}

.scan-submit-card .primary-button {
  width: 100%;
  min-height: 50px;
  font-size: 16px;
}

.scan-after-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.scan-after-actions.hidden {
  display: none;
}

.scan-progress-pill {
  width: fit-content;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  margin-top: 10px;
  padding: 0 13px;
  border: 1px solid rgba(24, 211, 189, 0.36);
  border-radius: 999px;
  color: #bff8ee;
  background: rgba(24, 211, 189, 0.1);
  font-size: 15px;
  font-weight: 860;
}

.scan-progress-pill.hidden,
.scan-push-button.hidden,
.scan-next-button.hidden {
  display: none;
}

.scan-progress-pill.complete {
  border-color: rgba(255, 184, 77, 0.62);
  color: #071011;
  background: var(--warning);
}

.scan-next-button,
.scan-push-button {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #effaf8;
  font-weight: 800;
}

.scan-next-button {
  background: rgba(255, 255, 255, 0.07);
}

.scan-push-button {
  color: #071011;
  background: var(--warning);
}

.scan-push-button:disabled,
.scan-next-button:disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

.scan-start-card {
  padding: 2px 0;
}

.scan-start-button {
  width: 100%;
  min-height: 142px;
  display: grid;
  place-items: center;
  gap: 7px;
  padding: 20px;
  border: 1px solid rgba(24, 211, 189, 0.45);
  border-radius: 18px;
  color: #effaf8;
  background:
    linear-gradient(135deg, rgba(24, 211, 189, 0.2), rgba(24, 211, 189, 0.06)),
    rgba(14, 26, 29, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.scan-start-button strong {
  font-size: 22px;
}

.scan-start-button span:last-child {
  color: #a9c3bf;
  font-size: 13px;
}

.scan-start-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #071011;
  background: var(--accent);
  box-shadow: 0 14px 28px rgba(24, 211, 189, 0.26);
}

.scan-start-icon svg {
  width: 40px;
  height: 40px;
}

.scan-start-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scan-camera-sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.68);
}

.scan-camera-sheet.hidden {
  display: none;
}

.scan-camera-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(24, 211, 189, 0.28);
  border-radius: 18px;
  background: #101c1f;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.46);
}

.scan-close-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #effaf8;
  background: rgba(255, 255, 255, 0.06);
}

.scan-camera-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 16px;
  background: #020707;
}

.scan-camera-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-camera-corners {
  position: absolute;
  inset: 13%;
  border: 2px solid rgba(24, 211, 189, 0.78);
  border-radius: 14px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.18);
}

.scan-camera-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.scan-card-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.scan-card-title strong {
  font-size: 15px;
}

.scan-card-title span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.auth-brand {
  margin-bottom: 22px;
}

.auth-brand h1 {
  margin: 0;
  font-size: 22px;
}

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

.scan-head {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.scan-head span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
}

.scan-head h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.12;
}

.scan-head p {
  margin: 0;
  color: var(--muted);
}

.scan-status-chip {
  position: relative;
  z-index: 1;
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid rgba(24, 211, 189, 0.28);
  border-radius: 999px;
  color: #bff8ee;
  background: rgba(24, 211, 189, 0.1);
  font-size: 12px;
}

.scan-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scan-link-button {
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #effaf8;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}

.scan-status-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.scan-choice {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.scan-choice.active {
  border-color: rgba(24, 211, 189, 0.72);
  background: rgba(24, 211, 189, 0.14);
  box-shadow: inset 0 0 0 1px rgba(24, 211, 189, 0.2);
}

.scan-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.scan-choice strong {
  font-size: 18px;
}

.scan-choice span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.scan-guide-card {
  margin-bottom: 12px;
}

.scan-guide-steps {
  display: grid;
  gap: 10px;
}

.scan-guide-steps div {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.scan-guide-steps strong {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #071011;
  background: var(--accent);
}

.scan-guide-steps span {
  color: #dbe9e7;
  font-size: 13px;
}

.scan-progress-overview-card {
  margin-bottom: 12px;
}

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

.scan-progress-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.scan-progress-item-info {
  display: grid;
  gap: 4px;
}

.scan-progress-item-name {
  color: #effaf8;
  font-size: 14px;
  font-weight: 760;
}

.scan-progress-item-status {
  color: #8ea19f;
  font-size: 12px;
}

.scan-progress-item-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 860;
  white-space: nowrap;
}

.scan-progress-item-badge.complete {
  background: rgba(69, 209, 138, 0.16);
  color: #45d18a;
  border: 1px solid rgba(69, 209, 138, 0.3);
}

.scan-progress-item-badge.in-progress {
  background: rgba(255, 184, 77, 0.16);
  color: #ffb84d;
  border: 1px solid rgba(255, 184, 77, 0.3);
}

.scan-progress-item-badge.not-started {
  background: rgba(255, 255, 255, 0.06);
  color: #8ea19f;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

.scan-step-item {
  position: relative;
  min-height: 44px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.scan-step-item strong {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #8ea19f;
  background: rgba(255, 255, 255, 0.07);
  font-size: 13px;
}

.scan-step-item span {
  min-width: 0;
  color: #effaf8;
  font-size: 14px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.scan-step-item small {
  display: block;
  margin-top: 2px;
  color: #8ea19f;
  font-size: 11px;
  font-weight: 620;
}

.scan-step-item em {
  color: #8ea19f;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.scan-step-item.current {
  border-color: rgba(24, 211, 189, 0.55);
  background: rgba(24, 211, 189, 0.1);
}

.scan-step-item.current::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
}

.scan-step-item.current strong {
  color: #071011;
  background: var(--accent);
}

.scan-step-item.done strong {
  color: #071011;
  background: #45d18a;
}

.scan-step-item.abnormal {
  border-color: rgba(255, 112, 112, 0.46);
  background: rgba(255, 112, 112, 0.1);
}

.scan-step-item.abnormal strong {
  color: #071011;
  background: #ff7070;
}

.scan-step-item.skipped {
  border-color: rgba(255, 184, 77, 0.4);
  background: rgba(255, 184, 77, 0.1);
}

.scan-step-item.skipped strong {
  color: #071011;
  background: #ffb84d;
}

.scan-body .field span {
  color: #b7c9c6;
}

.scan-body input,
.scan-body select,
.scan-body textarea {
  min-height: 44px;
  border-radius: 10px;
  font-size: 16px;
}

.scan-body textarea {
  min-height: 96px;
}

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

.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(7, 16, 17, 0.86);
  border-bottom: 1px solid rgba(24, 211, 189, 0.18);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #061111;
  border: 1px solid rgba(24, 211, 189, 0.5);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #d9fff4 58%, var(--warning));
  box-shadow: 0 0 24px rgba(24, 211, 189, 0.26);
}

.brand-mark svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 800;
}

h2 {
  font-size: 17px;
  line-height: 1.3;
  font-weight: 780;
}

h3 {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 720;
}

.brand p,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(69, 209, 138, 0.12), 0 0 18px rgba(69, 209, 138, 0.55);
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(9, 20, 22, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

.tab-button {
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #a5b8b6;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 160ms ease;
}

.tab-button.active {
  color: #04110f;
  border-color: rgba(24, 211, 189, 0.55);
  background: linear-gradient(135deg, var(--accent), #c9fff2);
  box-shadow: var(--glow);
}

.tab-button:hover:not(.active) {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.065);
}

.workspace {
  padding: 18px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(24, 36, 40, 0.94), rgba(12, 21, 23, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(24, 211, 189, 0.75), rgba(255, 184, 77, 0.5), transparent);
  opacity: 0.75;
}

.panel-title,
.subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

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

.subhead {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.subhead.compact {
  margin: 0;
  padding: 0;
  border: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 390px;
  gap: 16px;
}

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

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

.summary-card,
.shift-card,
.saved-record-card,
.session-card,
.log-item,
.segment-editor,
.reminder-item,
.compact-reminder {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.028));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.summary-card {
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(24, 211, 189, 0.13), rgba(255, 255, 255, 0.035)),
    var(--surface-soft);
}

.summary-card span,
.shift-card span,
.session-card span,
.reminder-item strong,
.reminder-item em {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  color: #f7fffb;
  font-size: 30px;
  line-height: 1.1;
  text-shadow: 0 0 18px rgba(24, 211, 189, 0.18);
}

.week-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.week-calendar.compact {
  margin-bottom: 14px;
}

.calendar-day {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 8px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.calendar-day span,
.calendar-day em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-day strong {
  color: #f6fffb;
  font-size: 18px;
  line-height: 1.1;
}

.calendar-day.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(24, 211, 189, 0.2), rgba(255, 184, 77, 0.08));
  box-shadow: var(--glow);
}

.calendar-day:hover {
  transform: translateY(-1px);
  border-color: rgba(24, 211, 189, 0.42);
  background: rgba(24, 211, 189, 0.095);
}

.saved-record-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.saved-record-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.saved-record-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.saved-record-card span,
.saved-record-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.saved-record-card strong {
  color: var(--text);
  font-size: 15px;
}

.saved-record-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--glow);
}

.saved-record-card:hover {
  border-color: rgba(24, 211, 189, 0.38);
  background: rgba(255, 255, 255, 0.065);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(560px, 1.08fr);
  gap: 16px;
}

.nested-grid {
  display: grid;
  grid-template-columns: minmax(680px, 1fr) 390px;
  align-items: start;
  gap: 16px;
}

.nested-main,
.nested-aside {
  display: grid;
  align-content: start;
  gap: 16px;
}

.nested-child {
  border-left: 4px solid rgba(24, 211, 189, 0.42);
}

.session-editor-inline {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.session-editor-inline > .subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
}

.reminder-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1.08fr) minmax(420px, 0.92fr);
  align-items: start;
  gap: 16px;
}

.webhook-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(520px, 1.15fr);
  align-items: start;
  gap: 16px;
}

.inspection-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1.1fr) minmax(430px, 0.9fr);
  align-items: start;
  gap: 16px;
}

.inspection-side {
  display: grid;
  align-content: start;
  gap: 16px;
}

.side-stack {
  display: grid;
  grid-template-rows: 310px minmax(360px, 1fr);
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field span {
  color: #b7c8c6;
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(4, 11, 12, 0.74);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 211, 189, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.button-row {
  display: flex;
  gap: 8px;
}

.primary-button,
.ghost-button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: 150ms ease;
}

.primary-button {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, var(--accent), #d7fff4);
  color: #041210;
  font-weight: 760;
  font-size: 16px;
  box-shadow: 0 12px 32px rgba(24, 211, 189, 0.18);
}

.primary-button:hover {
  background: linear-gradient(135deg, #61f2df, #fff4c9);
  transform: translateY(-1px);
}

.primary-button:active,
.ghost-button:active,
.icon-button:active,
.tab-button:active,
.calendar-day:active,
.saved-record-card:active,
.reminder-item:active,
.compact-reminder:active,
.scan-start-button:active,
.scan-choice:active {
  transform: scale(0.98);
}

.primary-button:disabled {
  cursor: progress;
  background: #8abeb9;
}

.ghost-button {
  height: 34px;
  padding: 0 11px;
  color: #d5e4e1;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.11);
  font-size: 13px;
  white-space: nowrap;
}

.ghost-button:hover {
  color: #041210;
  border-color: rgba(24, 211, 189, 0.62);
  background: var(--accent);
  transform: translateY(-1px);
}

.icon-button {
  width: 32px;
  height: 32px;
  color: var(--danger);
  background: rgba(255, 107, 95, 0.12);
  border-color: rgba(255, 107, 95, 0.3);
  font-size: 20px;
  line-height: 1;
}

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

.people-grid.compact {
  grid-template-columns: 1fr;
}

.person-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 0;
}

.people-grid.compact .person-row {
  grid-template-columns: 1fr;
}

.person-row .field {
  margin-bottom: 0;
}

.shift-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.shift-picker {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.shift-picker-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
}

.shift-picker-head span {
  color: var(--muted);
}

.person-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check-pill,
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #c2d1cf;
  font-size: 13px;
}

.check-pill {
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  transition: 140ms ease;
}

.check-pill:has(input:checked) {
  color: #041210;
  border-color: rgba(24, 211, 189, 0.68);
  background: linear-gradient(135deg, var(--accent), #e2fff6);
  box-shadow: 0 10px 24px rgba(24, 211, 189, 0.14);
}

.check-pill input,
.inline-check input {
  width: auto;
}

.shift-overview,
.session-list,
.compact-reminders,
.reminder-list,
.log-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.shift-overview.compact {
  gap: 8px;
}

.shift-card {
  padding: 12px 14px;
}

.shift-card strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 15px;
}

.shift-card.empty strong {
  color: var(--muted);
}

.session-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
}

.session-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
}

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

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

.segment-editor {
  display: grid;
  grid-template-columns: 180px minmax(180px, 0.8fr) minmax(220px, 1fr) minmax(220px, 1.2fr) auto 34px;
  align-items: end;
  gap: 10px;
  padding: 12px;
}

.segment-editor .field {
  margin-bottom: 0;
}

.segment-people-field .person-options {
  max-height: 86px;
  overflow: auto;
}

.inspection-point-form {
  margin-bottom: 12px;
}

.inspection-point-list,
.inspection-record-list {
  display: grid;
  gap: 12px;
}

.inspection-point-card {
  display: grid;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.qr-box {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border: 1px solid rgba(24, 211, 189, 0.28);
  border-radius: 8px;
  background: #f8fffc;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.qr-box img {
  width: 96px;
  height: 96px;
}

.qr-box.small {
  width: 72px;
  height: 72px;
}

.qr-box.small img {
  width: 62px;
  height: 62px;
}

.inspection-point-info {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 7px;
}

.inspection-point-info strong {
  font-size: 16px;
}

.inspection-name-input {
  height: 38px;
  font-weight: 720;
}

.inspection-point-info span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspection-item-editor {
  display: grid;
  gap: 7px;
  margin: 4px 0;
}

.inspection-edit-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.inspection-edit-row.with-qr {
  grid-template-columns: 76px minmax(160px, 1fr) auto auto auto;
  align-items: center;
}

.inspection-session-qr-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.inspection-session-qr {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.inspection-session-qr strong {
  color: var(--text);
  font-size: 13px;
}

.scan-panel textarea {
  min-height: 112px;
  font-family: inherit;
}

.inspection-check-items {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.inspection-check-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.inspection-check-row strong {
  display: block;
  margin-bottom: 8px;
}

.inspection-status-toggle {
  display: flex;
  gap: 12px;
  color: #c2d1cf;
  font-size: 13px;
}

.inspection-status-toggle input {
  width: auto;
}

.inspection-item-note {
  align-self: center;
}

.status-ok {
  background: var(--success);
}

.status-bad {
  background: var(--danger);
}

.inspection-submit-result {
  margin-top: 12px;
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.scan-submit-card .inspection-submit-result:empty {
  min-height: 0;
  margin-top: 0;
}

.inspection-record {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left-width: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.inspection-record.ok {
  border-left-color: var(--success);
}

.inspection-record.bad {
  border-left-color: var(--danger);
}

.inspection-record.skip {
  border-left-color: var(--warning);
}

.inspection-record strong,
.inspection-record span,
.inspection-record p {
  display: block;
}

.inspection-record span,
.inspection-record em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.inspection-record p {
  margin-top: 6px;
  color: #dce9e7;
  font-size: 13px;
}

.reminder-list {
  max-height: calc(100vh - 190px);
  overflow: auto;
}

.reminder-plan-card {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
}

.reminder-plan-list {
  display: grid;
  gap: 10px;
  max-height: 62vh;
  overflow: auto;
}

.reminder-plan-item {
  width: 100%;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
  cursor: pointer;
  transition: 150ms ease;
}

.reminder-plan-item:hover {
  border-color: rgba(0, 113, 227, 0.24);
  background: rgba(255, 255, 255, 0.94);
  transform: translateY(-1px);
}

.reminder-plan-item.active {
  border-color: rgba(0, 113, 227, 0.38);
  background: rgba(240, 248, 255, 0.96);
  box-shadow: 0 12px 28px rgba(0, 113, 227, 0.1);
}

.reminder-plan-item time {
  color: #0071e3;
  font-size: 17px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-weight: 780;
}

.reminder-plan-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.reminder-plan-title {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.reminder-plan-item strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reminder-plan-item span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reminder-plan-item small {
  color: #51606c;
  font-size: 12px;
  line-height: 1.45;
}

.reminder-plan-item em,
.status-pill {
  min-width: 58px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
  text-align: center;
  white-space: nowrap;
}

.reminder-plan-item em.pending,
.status-pill.pending {
  color: #0066d6;
  background: rgba(0, 113, 227, 0.1);
}

.reminder-plan-item em.due,
.status-pill.due {
  color: #8a4b00;
  background: rgba(255, 149, 0, 0.14);
}

.reminder-plan-item em.sent,
.status-pill.sent {
  color: #1f7a3a;
  background: rgba(52, 199, 89, 0.12);
}

.reminder-plan-item em.missing,
.status-pill.missing {
  color: var(--muted);
  background: rgba(0, 0, 0, 0.06);
}

.schedule-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.schedule-controls .field {
  margin-bottom: 0;
}

.auto-status {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid rgba(24, 211, 189, 0.24);
  border-radius: 8px;
  background: rgba(24, 211, 189, 0.08);
  color: #c4dbd8;
  font-size: 13px;
}

.mention-help {
  margin: -4px 0 12px;
  padding: 9px 11px;
  border: 1px solid rgba(24, 211, 189, 0.22);
  border-radius: 8px;
  background: rgba(24, 211, 189, 0.075);
  color: #c4dbd8;
  font-size: 13px;
  line-height: 1.5;
}

.template-editor-shell {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.54);
}

.reminder-config-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.56);
}

.reminder-config-group summary {
  list-style: none;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 760;
}

.reminder-config-group summary::-webkit-details-marker {
  display: none;
}

.reminder-rule-list {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.reminder-rule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.reminder-rule-row strong,
.reminder-rule-row span {
  display: block;
}

.reminder-rule-row strong {
  font-size: 14px;
}

.reminder-rule-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.rule-inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.compact-field {
  margin-bottom: 0;
}

.reminder-template-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding: 0 12px 12px;
}

.reminder-template-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
}

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

.reminder-template-head em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.template-message {
  min-height: 120px;
}

.reminder-template-card summary {
  list-style: none;
  cursor: pointer;
}

.reminder-template-card summary::-webkit-details-marker {
  display: none;
}

.reminder-template-card[open] {
  background: rgba(255, 255, 255, 0.88);
}

.reminder-template-body {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 160;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.toast-message {
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  font-size: 13px;
  line-height: 1.5;
}

.toast-message.success {
  border-color: rgba(52, 199, 89, 0.26);
  background: rgba(239, 255, 244, 0.94);
}

.toast-message.error {
  border-color: rgba(215, 0, 21, 0.22);
  background: rgba(255, 241, 242, 0.94);
}

.confirm-dialog-copy {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.danger-button {
  width: auto;
  min-width: 112px;
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: var(--danger);
  font-weight: 760;
  cursor: pointer;
}

.mention-help.warning {
  border-color: rgba(255, 184, 77, 0.42);
  background: rgba(255, 184, 77, 0.11);
  color: #ffd899;
}

.reminder-item {
  display: grid;
  width: 100%;
  gap: 4px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
}

.reminder-item span {
  font-weight: 740;
}

.reminder-item em {
  margin-top: 2px;
  font-style: normal;
}

.reminder-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--glow);
}

.compact-reminder {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.compact-reminder strong {
  color: #0071e3;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.compact-reminder span {
  font-size: 13px;
  font-weight: 720;
}

.reminder-preview pre,
.payload-panel textarea,
pre {
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #dbe9e6;
  background: var(--code-bg);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.reminder-preview-card {
  display: grid;
  gap: 14px;
}

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

.reminder-preview-head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.reminder-preview-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reminder-preview-meta div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}

.reminder-preview-meta span,
.reminder-preview-meta strong {
  display: block;
}

.reminder-preview-meta span {
  color: var(--muted);
  font-size: 12px;
}

.reminder-preview-meta strong {
  overflow-wrap: anywhere;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
}

.reminder-preview-issue {
  padding: 10px 12px;
  border: 1px solid rgba(255, 149, 0, 0.24);
  border-radius: 10px;
  background: rgba(255, 149, 0, 0.12);
  color: #8a4b00;
  font-size: 13px;
  line-height: 1.5;
}

.payload-panel {
  display: grid;
  grid-template-rows: auto minmax(560px, 1fr) auto;
}

.request-preview-panel {
  display: grid;
  grid-template-rows: auto 1fr;
}

.preview-form {
  display: grid;
  align-content: start;
}

.preview-message-field textarea {
  min-height: 260px;
  font-family: inherit;
  line-height: 1.55;
}

textarea {
  min-height: 560px;
  resize: none;
  tab-size: 2;
}

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.editor-footer .invalid {
  color: var(--danger);
  font-weight: 700;
}

.result-state,
.log-list {
  height: calc(100% - 46px);
}

.empty-state {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  font-size: 14px;
}

.empty-state.small {
  min-height: 42px;
  padding: 10px;
}

.result-card {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
}

.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 8px;
  border: 1px solid;
  font-weight: 720;
}

.status-banner.success {
  color: var(--success);
  background: rgba(69, 209, 138, 0.12);
  border-color: rgba(69, 209, 138, 0.32);
}

.status-banner.fail {
  color: var(--danger);
  background: rgba(255, 107, 95, 0.12);
  border-color: rgba(255, 107, 95, 0.32);
}

.result-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.result-meta strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  margin-top: 3px;
}

.log-list {
  overflow: auto;
}

.log-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 10px 12px;
  font-size: 13px;
}

.log-title {
  font-weight: 720;
}

.log-time,
.log-detail {
  color: var(--muted);
}

.badge {
  align-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 720;
}

.badge.success {
  color: var(--success);
  background: rgba(69, 209, 138, 0.12);
}

.badge.fail {
  color: var(--danger);
  background: rgba(255, 107, 95, 0.12);
}

/* Apple-inspired DESIGN.md refresh: premium white space, SF-style system type, soft glass surfaces. */
:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.62);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --border: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.16);
  --accent: #0071e3;
  --accent-dark: #005bbd;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --success: #248a3d;
  --warning: #b46a00;
  --danger: #d70015;
  --code-bg: #fbfbfd;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.08);
  --glow: 0 0 0 1px rgba(0, 113, 227, 0.12), 0 16px 36px rgba(0, 113, 227, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 18% -8%, rgba(255, 255, 255, 0.95), transparent 30%),
    radial-gradient(circle at 86% 4%, rgba(0, 113, 227, 0.12), transparent 24%),
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 36%, #eef1f5 100%);
}

body::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.62), transparent 42%),
    radial-gradient(circle at 70% 18%, rgba(0, 113, 227, 0.08), transparent 32%);
  background-size: auto;
  mask-image: none;
}

.topbar,
.tabs {
  background: rgba(251, 251, 253, 0.78);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.88), 0 14px 40px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(24px) saturate(180%);
}

.brand-mark {
  color: #ffffff;
  border-color: rgba(0, 113, 227, 0.16);
  border-radius: 8px;
  background: linear-gradient(145deg, #007aff, #34aadc);
  box-shadow: 0 14px 32px rgba(0, 113, 227, 0.18);
}

h1 {
  font-weight: 760;
}

h2,
h3 {
  font-weight: 700;
}

.status-dot {
  background: #30d158;
  box-shadow: 0 0 0 5px rgba(48, 209, 88, 0.12);
}

.tab-button {
  color: #5f6368;
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.tab-button.active {
  color: #ffffff;
  border-color: rgba(0, 113, 227, 0.16);
  background: linear-gradient(180deg, #0a84ff, #0071e3);
  box-shadow: 0 8px 22px rgba(0, 113, 227, 0.2);
}

.tab-button:hover:not(.active) {
  color: var(--text);
  border-color: rgba(0, 113, 227, 0.16);
  background: rgba(255, 255, 255, 0.88);
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.72));
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(160%);
}

.panel::before {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.96), transparent);
  opacity: 1;
}

.summary-card,
.shift-card,
.saved-record-card,
.session-card,
.log-item,
.segment-editor,
.reminder-item,
.compact-reminder,
.inspection-point-card,
.inspection-record,
.shift-picker,
.inspection-check-row {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 10px 24px rgba(0, 0, 0, 0.035);
}

.summary-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 252, 0.86));
}

.summary-card strong,
.calendar-day strong,
.saved-record-card strong,
.shift-card strong,
.session-card strong {
  color: var(--text);
  text-shadow: none;
}

.calendar-day {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.calendar-day.active,
.saved-record-card.active,
.reminder-item.active {
  border-color: rgba(0, 113, 227, 0.28);
  background: linear-gradient(180deg, rgba(230, 242, 255, 0.98), rgba(242, 247, 255, 0.86));
  box-shadow: var(--glow);
}

.calendar-day:hover,
.saved-record-card:hover {
  border-color: rgba(0, 113, 227, 0.2);
  background: rgba(255, 255, 255, 0.92);
}

.nested-child {
  border-left-color: rgba(0, 113, 227, 0.28);
}

.field span,
.check-pill,
.inline-check,
.inspection-status-toggle {
  color: #4b5563;
}

input,
select,
textarea {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(0, 113, 227, 0.7);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(180deg, #0a84ff, #0071e3);
  box-shadow: 0 12px 30px rgba(0, 113, 227, 0.18);
}

.primary-button:hover {
  background: linear-gradient(180deg, #2997ff, #0077ed);
}

.primary-button:disabled {
  background: #a7c7ea;
}

.ghost-button {
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(0, 0, 0, 0.12);
}

.ghost-button:hover {
  color: #ffffff;
  border-color: rgba(0, 113, 227, 0.22);
  background: #0071e3;
}

.ghost-button.danger-outline {
  color: var(--danger);
  border-color: rgba(215, 0, 21, 0.35);
}

.ghost-button.danger-outline:hover {
  color: #ffffff;
  border-color: var(--danger);
  background: var(--danger);
}

.icon-button {
  color: var(--danger);
  background: rgba(255, 69, 58, 0.08);
  border-color: rgba(215, 0, 21, 0.18);
}

.check-pill {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.68);
}

.check-pill:has(input:checked) {
  color: #ffffff;
  border-color: rgba(0, 113, 227, 0.22);
  background: linear-gradient(180deg, #0a84ff, #0071e3);
  box-shadow: 0 10px 22px rgba(0, 113, 227, 0.18);
}

.qr-box {
  border-color: rgba(0, 0, 0, 0.1);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.auto-status,
.mention-help {
  color: #3f4b5b;
  border-color: rgba(0, 113, 227, 0.16);
  background: rgba(232, 244, 255, 0.72);
}

.mention-help.warning {
  color: #7a4b00;
  border-color: rgba(255, 149, 0, 0.22);
  background: rgba(255, 244, 224, 0.82);
}

.reminder-preview pre,
.payload-panel textarea,
pre {
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(0, 0, 0, 0.1);
}

.empty-state {
  background: rgba(255, 255, 255, 0.46);
  border-color: rgba(0, 0, 0, 0.12);
}

.status-banner.success,
.badge.success {
  color: #1f7a3a;
  background: rgba(52, 199, 89, 0.12);
  border-color: rgba(52, 199, 89, 0.22);
}

.status-banner.fail,
.badge.fail {
  color: var(--danger);
  background: rgba(255, 59, 48, 0.1);
  border-color: rgba(255, 59, 48, 0.2);
}

.hidden {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(245, 245, 247, 0.62);
  backdrop-filter: blur(18px) saturate(160%);
}

.modal-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.18);
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inspection-modal-progress {
  width: fit-content;
  margin: 18px 0 12px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(180deg, #0a84ff, #0071e3);
  font-size: 18px;
  font-weight: 760;
  box-shadow: 0 12px 28px rgba(0, 113, 227, 0.18);
}

#inspectionModalSummary {
  max-height: 320px;
  margin-bottom: 16px;
}

.modal-send-button {
  width: auto;
  min-width: 132px;
  padding: 0 18px;
}

@media (max-width: 1180px) {
  body {
    min-width: 0;
  }

  .topbar {
    height: auto;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 12px;
    flex-direction: column;
  }

  .tabs {
    overflow: auto;
  }

  .tab-button {
    min-width: 88px;
    flex: 0 0 auto;
  }

  .dashboard-grid,
  .two-column,
  .nested-grid,
  .reminder-layout,
  .inspection-grid,
  .webhook-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .summary-grid,
  .week-calendar,
  .shift-form-grid,
  .form-grid,
  .people-grid {
    grid-template-columns: 1fr;
  }

  .schedule-controls {
    grid-template-columns: 1fr;
  }

  .reminder-plan-item {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .reminder-rule-row,
  .reminder-preview-meta {
    grid-template-columns: 1fr;
  }

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

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

  .side-stack {
    grid-template-rows: auto auto;
  }
}

/* Product Design refresh: Apple-style mobile scanning flow */
body.scan-body {
  color-scheme: light;
  min-width: 0;
  overflow-x: hidden;
  color: #1d1d1f;
  background:
    linear-gradient(180deg, #f9fafc 0%, #f2f4f8 48%, #ffffff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.scan-body::before {
  display: none;
}

.scan-shell {
  width: min(430px, 100%);
  gap: 14px;
  padding: 8px 0 28px;
}

.scan-card-stack {
  padding-bottom: 168px;
}

#scanForm > .scan-card:nth-last-child(2) {
  margin-bottom: 82px;
}

.scan-summary-mode [data-scan-step-card] {
  display: none;
}

.scan-summary-mode #scanSkipButton,
.scan-summary-mode #scanSubmitButton {
  display: none;
}

.scan-hero-card,
.scan-card,
.scan-camera-panel {
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.scan-hero-card {
  min-height: 148px;
  padding: 22px;
  border-radius: 26px;
}

.scan-hero-card::after {
  display: none;
}

.scan-card {
  padding: 16px;
  border-radius: 22px;
}

.scan-head span {
  color: #007aff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.scan-head h1 {
  color: #111827;
  font-size: 32px;
  font-weight: 760;
  line-height: 1.08;
}

.scan-head p,
.scan-card-title span,
.scan-choice span,
.scan-guide-steps span,
.scan-camera-panel p,
.inspection-submit-result,
.scan-progress-item-status,
.scan-step-item em {
  color: #6e6e73;
}

.scan-status-chip,
.scan-link-button {
  border: 1px solid rgba(0, 122, 255, 0.14);
  color: #0066d6;
  background: rgba(0, 122, 255, 0.08);
}

.scan-link-button {
  min-height: 34px;
  border-radius: 999px;
}

.scan-card-title {
  align-items: start;
  margin-bottom: 12px;
}

.scan-card-title strong {
  color: #1d1d1f;
  font-size: 15px;
  font-weight: 760;
}

.scan-progress-pill {
  min-height: 36px;
  margin-top: 0;
  border: 0;
  color: #ffffff;
  background: #007aff;
  box-shadow: 0 10px 24px rgba(0, 122, 255, 0.18);
}

.scan-progress-pill.complete {
  color: #ffffff;
  background: #34c759;
  box-shadow: 0 10px 24px rgba(52, 199, 89, 0.18);
}

.scan-submit-card {
  position: fixed;
  right: auto;
  left: 50%;
  bottom: 0;
  width: min(430px, calc(100% - 20px));
  transform: translateX(-50%);
  padding: 14px 0 0;
  background: linear-gradient(to top, rgba(249, 250, 252, 0.98) 76%, rgba(249, 250, 252, 0));
}

.scan-submit-card .primary-button,
.scan-start-button,
.scan-push-button {
  border: 0;
  color: #ffffff;
  background: #007aff;
  box-shadow: 0 14px 30px rgba(0, 122, 255, 0.22);
}

.scan-submit-card .primary-button {
  min-height: 54px;
  border-radius: 17px;
}

.scan-next-button {
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #007aff;
  background: rgba(255, 255, 255, 0.92);
}

.scan-push-button {
  color: #ffffff;
  background: #34c759;
  box-shadow: 0 14px 30px rgba(52, 199, 89, 0.2);
}

.scan-start-card {
  padding: 0;
}

.scan-start-button {
  min-height: 118px;
  border-radius: 24px;
}

.scan-start-button span:last-child {
  color: rgba(255, 255, 255, 0.82);
}

.scan-start-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: #007aff;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
}

.scan-status-cards {
  gap: 12px;
}

.scan-choice {
  min-height: 112px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.scan-choice.active {
  border-color: rgba(0, 122, 255, 0.42);
  background: rgba(0, 122, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.16), 0 12px 28px rgba(0, 122, 255, 0.1);
}

.scan-choice strong,
.scan-progress-item-name,
.scan-step-item span {
  color: #1d1d1f;
}

.scan-step-item small {
  color: #6e6e73;
}

.scan-body .field span {
  color: #6e6e73;
}

.scan-body input,
.scan-body select,
.scan-body textarea {
  min-height: 48px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.scan-body input:focus,
.scan-body select:focus,
.scan-body textarea:focus {
  border-color: rgba(0, 122, 255, 0.58);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

.scan-guide-steps div,
.scan-progress-item,
.scan-step-item {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
}

.scan-guide-steps strong,
.scan-step-item.current strong {
  color: #ffffff;
  background: #007aff;
}

.scan-step-item strong {
  color: #6e6e73;
  background: #f2f2f7;
}

.scan-step-item.current {
  border-color: rgba(0, 122, 255, 0.34);
  background: rgba(0, 122, 255, 0.08);
}

.scan-step-item.done strong {
  color: #ffffff;
  background: #34c759;
}

.scan-step-item.abnormal {
  border-color: rgba(255, 59, 48, 0.28);
  background: rgba(255, 59, 48, 0.08);
}

.scan-step-item.abnormal strong {
  color: #ffffff;
  background: #ff3b30;
}

.scan-progress-item-badge.complete {
  color: #0f7a33;
  background: rgba(52, 199, 89, 0.12);
  border-color: rgba(52, 199, 89, 0.24);
}

.scan-progress-item-badge.in-progress {
  color: #a15c00;
  background: rgba(255, 149, 0, 0.12);
  border-color: rgba(255, 149, 0, 0.22);
}

.scan-progress-item-badge.not-started {
  color: #6e6e73;
  background: #f2f2f7;
  border-color: transparent;
}

.scan-camera-sheet {
  background: rgba(248, 248, 248, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.scan-camera-panel {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
}

.scan-close-button {
  border: 0;
  color: #007aff;
  background: #f2f2f7;
}

.scan-camera-frame {
  border-radius: 24px;
  background: #111827;
}

.scan-camera-corners {
  border-color: rgba(0, 122, 255, 0.86);
  box-shadow: 0 0 0 999px rgba(255, 255, 255, 0.18);
}

.inspection-session-qr {
  border-color: rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.inspection-session-qr strong {
  color: #1d1d1f;
}

.qr-box {
  border-color: rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

@media (max-width: 480px) {
  .scan-body {
    padding: 10px;
  }

  .scan-head h1 {
    font-size: 30px;
  }

  .scan-hero-card {
    border-radius: 24px;
  }

  .scan-card {
    border-radius: 20px;
  }
}

.scan-inspector-line {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
}

.scan-inspector-line span,
.scan-inspector-line em {
  color: #6e6e73;
  font-size: 12px;
  font-style: normal;
}

.scan-inspector-line strong {
  min-width: 0;
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.scan-inspector-line em {
  grid-column: 2;
  margin-top: -4px;
}

.scan-step-item.current {
  border-color: rgba(0, 122, 255, 0.34);
  background: rgba(0, 122, 255, 0.08);
}

.scan-step-item.current::before {
  background: #007aff;
}

.scan-step-item.done {
  border-color: rgba(52, 199, 89, 0.22);
  background: rgba(52, 199, 89, 0.08);
}

.scan-step-item.skipped {
  border-color: rgba(255, 149, 0, 0.26);
  background: rgba(255, 149, 0, 0.1);
}

.scan-step-item.skipped strong {
  color: #ffffff;
  background: #ff9500;
}

.scan-step-item.clickable {
  cursor: pointer;
}

.scan-progress-item {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.scan-progress-item:active {
  transform: translateY(1px);
}

.scan-progress-item-status.has-abnormal {
  color: #ff3b30;
  font-weight: 760;
}

.scan-pill-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scan-pill-row .scan-progress-pill {
  margin-top: 0;
}

.scan-abnormal-badge {
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 13px;
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: 999px;
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.1);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.scan-skip-button {
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  border: 1px solid rgba(255, 149, 0, 0.4);
  border-radius: 15px;
  color: #b46a00;
  background: rgba(255, 149, 0, 0.1);
  font-weight: 760;
  cursor: pointer;
}

.scan-skip-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.scan-skip-button.hidden {
  display: none;
}

.scan-summary-card {
  border-color: rgba(0, 122, 255, 0.22);
}

.scan-summary-body {
  display: grid;
  gap: 12px;
}

.scan-summary-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.scan-summary-count {
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 12px 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.scan-summary-count strong {
  font-size: 22px;
  font-weight: 800;
  color: #1d1d1f;
}

.scan-summary-count span {
  font-size: 12px;
  color: #6e6e73;
}

.scan-summary-count.ok strong {
  color: #34c759;
}

.scan-summary-count.bad strong {
  color: #ff3b30;
}

.scan-summary-count.skip strong {
  color: #ff9500;
}

.scan-summary-abnormal-list {
  display: grid;
  gap: 8px;
}

.scan-summary-abnormal-item {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 59, 48, 0.22);
  border-radius: 14px;
  background: rgba(255, 59, 48, 0.06);
}

.scan-summary-abnormal-item strong {
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 760;
}

.scan-summary-abnormal-item span {
  color: #6e6e73;
  font-size: 13px;
  line-height: 1.45;
}

.scan-summary-allok {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(52, 199, 89, 0.24);
  border-radius: 14px;
  color: #248a3d;
  background: rgba(52, 199, 89, 0.08);
  font-size: 14px;
  font-weight: 640;
}

.scan-progress-tip {
  margin: 8px 0 0;
  color: #6e6e73;
  font-size: 12px;
}

/* 班次必查规则：扫码端软提示 */
.scan-required-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border: 1px solid rgba(0, 122, 255, 0.3);
  border-radius: 999px;
  color: #007aff;
  background: rgba(0, 122, 255, 0.08);
  font-size: 11px;
  font-weight: 760;
  vertical-align: 1px;
  white-space: nowrap;
}

.scan-progress-item.required {
  border-color: rgba(0, 122, 255, 0.26);
}

.scan-progress-item.optional {
  opacity: 0.62;
}

/* 管理端：班次必查规则配置 */
.shift-rule-list {
  display: grid;
  gap: 10px;
}

.shift-rule-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.shift-rule-row > strong {
  padding-top: 3px;
  font-size: 13px;
}

.shift-rule-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.shift-rule-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  cursor: pointer;
}

.shift-rule-option input {
  accent-color: var(--accent);
}

/* 检查模式：检查项横向滑动大卡轨道，当前项放大居中 */
.scan-step-list.carousel {
  display: flex;
  gap: 10px;
  margin: 4px -16px 0;
  padding: 10px 16px 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scan-step-list.carousel::-webkit-scrollbar {
  display: none;
}

.scan-step-list.carousel .scan-step-item {
  flex: 0 0 72%;
  min-height: 116px;
  display: grid;
  grid-template-columns: none;
  grid-template-rows: auto 1fr auto;
  align-items: start;
  justify-items: start;
  gap: 6px;
  padding: 14px;
  border-radius: 20px;
  scroll-snap-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  opacity: 0.62;
}

.scan-step-list.carousel .scan-step-item strong {
  width: 34px;
  height: 34px;
  font-size: 15px;
}

.scan-step-list.carousel .scan-step-item span {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
}

.scan-step-list.carousel .scan-step-item small {
  font-size: 12px;
}

.scan-step-list.carousel .scan-step-item em {
  font-size: 13px;
  font-weight: 700;
}

.scan-step-list.carousel .scan-step-item.current {
  opacity: 1;
  transform: scale(1.03);
  box-shadow: 0 16px 36px rgba(0, 122, 255, 0.18);
}

.scan-step-list.carousel .scan-step-item.current::before {
  display: none;
}

.scan-step-list.carousel .scan-step-item.current em {
  color: #007aff;
}

.scan-context-bar {
  margin-bottom: 0;
  align-items: center;
}

.scan-context-bar span {
  font-size: 13px;
  color: #1d1d1f;
  font-weight: 640;
}

.scan-context-setup-card {
  display: grid;
  gap: 12px;
}

.scan-context-setup-copy {
  margin: -4px 0 2px;
  color: #6e6e73;
  font-size: 13px;
  line-height: 1.45;
}

.scan-bind-button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  color: #ffffff;
  background: #007aff;
  box-shadow: 0 14px 30px rgba(0, 122, 255, 0.22);
  font-weight: 760;
}

.reminder-plan-item em.skipped,
.status-pill.skipped {
  color: var(--muted);
  background: rgba(0, 0, 0, 0.06);
  text-decoration: line-through;
}

.reminder-webhook-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 149, 0, 0.4);
  border-radius: 8px;
  background: rgba(255, 149, 0, 0.12);
  color: #8a4b00;
  font-size: 13px;
  font-weight: 640;
}

.reminder-webhook-warning[hidden] {
  display: none;
}

.reminder-preview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.catchup-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  margin: 12px 0;
}

.catchup-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.catchup-item input {
  margin-top: 3px;
}

.catchup-item span {
  display: grid;
  gap: 2px;
}

.catchup-item small {
  color: var(--muted);
  font-size: 12px;
}

.compact-reminder em {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.compact-reminder em.pending {
  color: #0066d6;
  background: rgba(0, 113, 227, 0.1);
}

.compact-reminder em.due {
  color: #8a4b00;
  background: rgba(255, 149, 0, 0.14);
}

.compact-reminder em.sent {
  color: #1f7a3a;
  background: rgba(52, 199, 89, 0.12);
}

.compact-reminder em.missing,
.compact-reminder em.skipped {
  color: var(--muted);
  background: rgba(0, 0, 0, 0.06);
}

.compact-more {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
}

/* 场次编辑器默认折叠 */
.session-editor-details > summary {
  cursor: pointer;
  padding: 10px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
}

.session-editor-details > summary:hover {
  color: var(--accent);
  border-color: rgba(0, 113, 227, 0.4);
}

.session-editor-details[open] > summary {
  margin-bottom: 12px;
}

.reminder-plan-item em.expired,
.status-pill.expired,
.compact-reminder em.expired {
  color: var(--muted);
  background: rgba(0, 0, 0, 0.06);
}

.catchup-item input[type="checkbox"] {
  flex: none;
  width: 16px;
  height: 16px;
}

.catchup-item span {
  flex: 1;
  text-align: left;
}

/* 巡查页手动补录默认折叠 */
.manual-inspection-details > summary {
  list-style: none;
  cursor: pointer;
}

.manual-inspection-details > summary::-webkit-details-marker {
  display: none;
}

.manual-inspection-details > summary .panel-title {
  margin-bottom: 0;
}

.manual-inspection-details > summary:hover h2 {
  color: var(--accent);
}

.manual-inspection-details[open] > summary {
  margin-bottom: 14px;
}

.template-switch {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 8px;
  margin-left: auto;
  cursor: pointer;
  user-select: none;
}

.template-switch input {
  display: none;
}

.template-switch i {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  transition: background 0.15s ease;
}

.template-switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: left 0.15s ease;
}

.template-switch input:checked + i {
  background: #34c759;
}

.template-switch input:checked + i::after {
  left: 18px;
}

.template-state {
  min-width: 40px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.template-switch input:checked ~ .template-state {
  color: #1f7a3a;
}

.reminder-template-card.disabled {
  border-style: dashed;
  background: rgba(0, 0, 0, 0.03);
}

.reminder-template-card.disabled .reminder-template-head > span:first-child,
.reminder-template-card.disabled .reminder-template-head em,
.reminder-template-card.disabled .reminder-template-body {
  opacity: 0.55;
}
