:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #13253d;
  --muted: #63738a;
  --line: #dce5ef;
  --brand: #0b4b89;
  --brand-dark: #063967;
  --brand-soft: #eaf2fb;
  --accent: #1487a9;
  --red: #ef4444;
  --yellow: #f59e0b;
  --green: #22a06b;
  --blue: #2477b8;
  --shadow: 0 18px 46px rgba(10, 46, 82, 0.12);
  --customer-columns: minmax(118px, 1fr) minmax(108px, 0.78fr) minmax(104px, 0.72fr) minmax(104px, 0.72fr) minmax(108px, 0.74fr) minmax(112px, 0.78fr) minmax(108px, 0.72fr);
}

html {
  scrollbar-gutter: stable;
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

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

button {
  border: 0;
  border-radius: 8px;
  padding: 9px 13px;
  background: var(--brand);
  color: white;
  cursor: pointer;
}

button:hover {
  background: var(--brand-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

button.secondary {
  background: var(--brand-soft);
  color: var(--ink);
}

button.secondary:hover {
  background: #dce9f6;
}

button.danger {
  background: #feecec;
  color: #b91c1c;
}

button.danger:hover {
  background: #ffdede;
}

button.warning {
  background: #fff3d6;
  color: #9a5a00;
}

button.warning:hover {
  background: #ffe7ad;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: #edf2f7;
}

.login-card {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) 408px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid #d5e0ec;
  border-radius: 16px;
  box-shadow: var(--shadow);
  animation: login-card-in 0.42s ease-out both;
}

.login-visual {
  min-height: 590px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 40px;
  padding: 42px 48px;
  color: #f5f9ff;
  background: #082f5a;
  position: relative;
  overflow: hidden;
}

.login-visual::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -168px;
  top: -174px;
  border: 1px solid rgba(140, 211, 227, 0.24);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(140, 211, 227, 0.05), 0 0 0 70px rgba(140, 211, 227, 0.035);
}

.login-identity {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(241, 248, 255, 0.78);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  position: relative;
  z-index: 1;
}

.login-identity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #63c7dd;
  box-shadow: 0 0 0 5px rgba(99, 199, 221, 0.12);
}

.login-hero {
  display: grid;
  align-content: center;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 18px;
  max-width: none;
  position: relative;
  z-index: 1;
}

.login-hero-copy {
  min-width: 0;
}

.login-visual-kicker {
  margin: 0 0 14px;
  color: #8bd3e3;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.login-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.22;
  letter-spacing: 0.02em;
}

.login-hero-copy > p:not(.login-visual-kicker) {
  margin: 20px 0 0;
  max-width: 430px;
  color: rgba(238, 246, 255, 0.76);
  font-size: 15px;
  line-height: 1.85;
}

.login-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.login-capabilities span {
  padding: 7px 10px;
  border: 1px solid rgba(202, 228, 255, 0.25);
  border-radius: 999px;
  color: #d9ebfb;
  font-size: 12px;
  font-weight: 700;
}

.login-mascot {
  align-self: end;
  justify-self: end;
  width: 190px;
  height: 258px;
  position: relative;
  overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.92);
  border-radius: 96px 96px 18px 18px;
  background: #fff;
  box-shadow: 14px 16px 0 rgba(42, 161, 190, 0.26), 0 16px 30px rgba(1, 25, 51, 0.28);
  transform: rotate(2deg) translateY(6px);
}

.login-mascot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
}

.login-sound-ring {
  position: absolute;
  z-index: 1;
  border: 2px solid #43b9d3;
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  pointer-events: none;
}

.ring-one {
  width: 42px;
  height: 42px;
  right: 13px;
  top: 72px;
  transform: rotate(12deg);
}

.ring-two {
  width: 58px;
  height: 58px;
  right: 4px;
  top: 63px;
  opacity: 0.72;
  transform: rotate(12deg);
}

.login-encouragement {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-left: 2px solid #63c7dd;
  background: rgba(255, 255, 255, 0.07);
  position: relative;
  z-index: 1;
}

.login-encouragement span {
  color: #8bd3e3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.login-encouragement strong {
  color: #fff;
  font-size: 16px;
  line-height: 1.6;
}

.login-box {
  align-self: center;
  width: 100%;
  padding: 50px 44px;
}

.login-form-logo {
  display: none;
  width: 168px;
  margin-bottom: 20px;
}

.login-form-kicker {
  margin: 0 0 9px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.login-box h1 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  letter-spacing: -0.03em;
}

.login-form-copy {
  margin: 0;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.login-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 22px;
  position: relative;
  border-radius: 9px;
  box-shadow: 0 10px 18px rgba(11, 75, 137, 0.18);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.login-submit:hover {
  transform: translateY(-1px);
}

.login-form-footnote {
  margin: 18px 0 0;
  color: #8a9aaf;
  font-size: 12px;
  text-align: center;
}

.password-logout {
  width: 100%;
  margin-top: 10px;
}

.button-spinner {
  display: none;
  width: 15px;
  height: 15px;
  margin-left: 7px;
  vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
}

.login-submit.is-loading .button-spinner {
  display: inline-block;
  animation: login-spin 0.75s linear infinite;
}

@keyframes login-spin {
  to { transform: rotate(360deg); }
}

@keyframes login-card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes main-content-in {
  from { transform: translateY(3px); }
  to { transform: translateY(0); }
}

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

.field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

label {
  color: #334155;
  font-size: 13px;
  font-weight: 650;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 158, 193, 0.14);
  outline: none;
}

textarea {
  min-height: 82px;
  resize: vertical;
}

.app-shell {
  min-height: 100vh;
  background: var(--bg);
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #dce5ef;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.brand-logo {
  width: 142px;
  height: 38px;
  object-fit: contain;
  object-position: left center;
}

.brand-title {
  display: grid;
  gap: 2px;
  min-width: 126px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.brand-title strong {
  color: var(--ink);
  font-size: 14px;
}

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

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.notification-menu,
.profile-menu {
  position: relative;
}

.notification-menu summary,
.profile-menu summary {
  display: block;
  list-style: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f3f7fb;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-menu summary {
  max-width: 250px;
}

.notification-menu summary:hover,
.profile-menu summary:hover {
  border-color: #cbdced;
  background: #edf4fb;
}

.notification-menu summary::-webkit-details-marker,
.profile-menu summary::-webkit-details-marker {
  display: none;
}

.notification-menu summary span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-size: 12px;
}

.notification-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(360px, calc(100vw - 32px));
  max-height: 420px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.profile-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(320px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.profile-panel .hint {
  margin: 8px 0 12px;
}

.identity-readonly {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dbe7f2;
  border-radius: 10px;
  background: #f7fafc;
}

.identity-readonly span,
.identity-readonly small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.identity-readonly strong {
  color: var(--brand);
  font-size: 18px;
}

.notification-actions {
  position: sticky;
  top: -8px;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  margin: -8px -8px 6px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.notification-actions button:disabled {
  opacity: 0.55;
  cursor: default;
}

.notification-item {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-align: left;
}

.notification-item:hover {
  background: var(--brand-soft);
}

.notification-item.unread {
  background: #f0f8ff;
}

.notification-item span,
.notification-item small,
.notification-empty {
  color: var(--muted);
}

.notification-empty {
  padding: 12px;
}

.notification-more {
  padding: 8px 10px 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.layout {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-height: calc(100vh - 64px);
}

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  background: #082f5a;
}

.sidebar-card {
  display: grid;
  gap: 5px;
  min-height: 88px;
  padding: 14px 15px;
  margin: 0 4px 20px;
  border: 1px solid rgba(208, 233, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-card strong,
.sidebar-card span {
  display: block;
}

.sidebar-card strong {
  color: #fff;
  font-size: 15px;
}

.sidebar-card span {
  color: rgba(229, 241, 253, 0.68);
  font-size: 12px;
  line-height: 1.4;
}

.sidebar-card .sidebar-card-kicker {
  color: #87cde0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.main {
  padding: 26px 28px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  animation: none;
}

.main.main-no-animation {
  animation: none;
}

.module-loading {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--brand);
  text-align: center;
}

.module-loading small {
  max-width: 460px;
  color: var(--muted);
  line-height: 1.55;
}

.module-loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #d8e9f4;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: module-loading-spin 700ms linear infinite;
}

@keyframes module-loading-spin {
  to { transform: rotate(360deg); }
}

.tabs {
  display: grid;
  gap: 4px;
}

.tab {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: transparent;
  color: rgba(239, 247, 255, 0.78);
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.tab.active {
  background: #eef6ff;
  border-color: #eef6ff;
  color: #073a6a;
  box-shadow: 0 6px 16px rgba(1, 20, 42, 0.16);
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: #a8d7e5;
}

.nav-icon svg {
  width: 19px;
  height: 19px;
}

.tab:hover .nav-icon {
  color: #d9f1f8;
}

.tab.active .nav-icon {
  color: #1590ae;
}

.nav-section-label {
  display: block;
  margin: 12px 12px 6px;
  color: rgba(169, 207, 237, 0.62);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.nav-section-label-management {
  margin-top: 22px;
}

.module-switch {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.module-switch button {
  min-width: 92px;
  padding: 8px 12px;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  font-weight: 700;
}

.module-switch button:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.module-switch button.active {
  background: var(--brand);
  color: #ffffff;
}

.placeholder-panel {
  min-height: 220px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
}

.placeholder-panel h2 {
  margin: 0 0 8px;
  color: var(--brand);
}

.placeholder-badge {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
  font-size: 13px;
}

.data-center-head {
  margin-bottom: 12px;
}

.data-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 14px;
}

.period-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(64px, 82px));
  flex: 0 1 352px;
  gap: 6px;
}

.period-tabs button {
  white-space: nowrap;
}

.period-tabs button.active {
  background: var(--brand);
  color: #fff;
}

.data-date-range {
  flex: 1 1 320px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.data-date-range.is-disabled {
  opacity: 0.58;
}

.data-toolbar select,
.data-toolbar input,
.data-toolbar button {
  min-width: 0;
  width: 100%;
}

#dataCenterStore {
  flex: 1 1 180px;
}

.data-store-select {
  flex: 1 1 260px;
}

.data-specialist-filter {
  display: grid;
  grid-template-columns: minmax(96px, 0.8fr) minmax(150px, 1fr);
  flex: 1 1 300px;
  gap: 6px;
}

#dataCenterChannel {
  flex: 1 1 180px;
}

#refreshDataCenterBtn {
  flex: 0 1 160px;
}

.data-section-switch {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 12px;
  max-width: 100%;
}

.data-section-switch button {
  flex: 1 1 128px;
  min-width: 0;
}

.data-refresh-line {
  min-height: 22px;
  margin: -2px 0 6px;
}

.data-tab-switch {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.data-tab-switch button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.data-tab-switch button.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.data-tab-panel {
  display: grid;
  gap: 14px;
}

.data-tab-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.data-tab-head h3,
.data-chart-card h3,
.data-store-quality h3 {
  margin: 0 0 5px;
  color: var(--brand);
  font-size: 18px;
}

.data-accordion {
  display: grid;
  gap: 10px;
}

.data-accordion-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.data-accordion-item.open {
  box-shadow: 0 8px 24px rgba(6, 63, 124, 0.05);
}

.data-accordion-head {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.data-accordion-head:hover {
  background: #f7fbff;
}

.data-accordion-head > div {
  flex: 1;
  min-width: 0;
}

.data-accordion-head h3 {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 17px;
}

.data-accordion-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.data-accordion-head::before {
  content: "＋";
  display: inline-flex;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 900;
}

.data-accordion-item.open .data-accordion-head::before {
  content: "－";
  background: var(--brand);
  color: #fff;
}

.data-accordion-body {
  padding: 0 16px 16px;
}

.mini-tag.warning {
  border-color: #f4c46a;
  background: #fff7df;
  color: #8a5b00;
}

.data-section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin: 4px 0 12px;
}

.data-section-head h3,
.data-drill-head h3,
.data-staff-panel h3 {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 18px;
}

.data-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.data-metric-grid.first-version {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-bottom: 0;
}

.data-metric-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.data-metric-card:hover,
.data-metric-card.active {
  border-color: #b8cde3;
  background: #f8fbff;
  box-shadow: 0 8px 22px rgba(6, 63, 124, 0.07);
}

.data-metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.data-metric-card strong {
  color: var(--brand);
  font-size: 28px;
  line-height: 1;
}

.data-metric-card small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.data-card-summary {
  display: grid;
  gap: 4px;
  width: 100%;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.data-card-summary em {
  font-style: normal;
  font-weight: 800;
}

.data-chart-card,
.data-double-ear-card,
.data-store-quality {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.data-pie-layout {
  display: grid;
  grid-template-columns: 160px minmax(180px, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 10px;
}

.data-pie {
  width: 150px;
  height: 150px;
}

.data-pie-legend {
  display: grid;
  gap: 8px;
}

.data-pie-legend div {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 13px;
}

.data-pie-legend span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.data-pie-legend strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-pie-legend em {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.data-warning-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.data-warning-line span {
  padding: 7px 10px;
  border: 1px solid #f1c57a;
  border-radius: 8px;
  background: #fff9e9;
  color: #8a5b00;
  font-size: 13px;
  font-weight: 900;
}

.data-double-ear-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.data-double-ear-card strong {
  display: block;
  margin: 8px 0;
  color: var(--brand);
  font-size: 34px;
  line-height: 1;
}

.data-double-ear-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.data-inline-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.data-inline-facts em {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
}

.data-store-quality-list {
  display: grid;
  gap: 10px;
}

.data-store-quality-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 72px minmax(160px, 2fr) minmax(160px, 1.2fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.data-store-quality-row strong {
  color: var(--ink);
}

.data-store-quality-row span {
  color: var(--brand);
  font-size: 18px;
  font-weight: 900;
}

.data-store-quality-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.data-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f0f8;
}

.data-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.people-growth-panel {
  overflow: hidden;
}

.people-growth-notice {
  padding: 10px 12px;
  border: 1px solid #f1c57a;
  border-radius: 8px;
  background: #fff9e9;
  color: #8a5b00;
  font-size: 13px;
  font-weight: 900;
}

.people-growth-notice.calm {
  border-color: #cfe0f1;
  background: #f7fbff;
  color: var(--brand);
}

.people-growth-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.people-growth-toolbar input {
  flex: 1 1 260px;
  min-width: 0;
}

.people-growth-toolbar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.people-compare-wrap {
  max-width: 100%;
  overflow-x: hidden;
}

.people-table-wrap {
  max-width: 100%;
  max-height: 430px;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 8px;
}

.people-table,
.people-compare-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.people-table th,
.people-compare-table th {
  padding: 0 10px 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.people-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 6px;
  background: #f6f9fd;
}

.people-table td,
.people-compare-table td {
  padding: 12px 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  white-space: normal;
  overflow-wrap: anywhere;
}

.people-table td:first-child,
.people-compare-table td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
}

.people-table td:last-child,
.people-compare-table td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 8px 8px 0;
}

.people-table tr.active td {
  border-color: #b8cde3;
  background: #f8fbff;
}

.people-name-button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-width: 120px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.people-name-button strong {
  color: var(--brand);
  font-size: 15px;
}

.people-name-button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.people-detail-panel,
.people-compare-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.people-detail-panel {
  display: grid;
  gap: 12px;
}

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

.people-dimension-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.people-dimension-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.people-dimension-card summary,
.people-compare-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  cursor: pointer;
}

.people-dimension-card summary::-webkit-details-marker,
.people-compare-group summary::-webkit-details-marker {
  display: none;
}

.people-dimension-card summary::after,
.people-compare-group summary::after {
  content: "展开";
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.people-dimension-card[open] summary::after,
.people-compare-group[open] summary::after {
  content: "收起";
  background: var(--brand);
  color: #fff;
}

.people-dimension-card summary strong {
  color: var(--brand);
  font-size: 15px;
}

.people-dimension-card summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.people-dimension-items {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.people-dimension-items div {
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

.people-dimension-items span,
.people-compare-table span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.people-dimension-items strong {
  color: var(--brand);
  font-size: 22px;
  line-height: 1;
}

.people-dimension-items small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.people-compare-table {
  min-width: 760px;
  table-layout: fixed;
}

.people-compare-metric-col {
  width: 360px;
}

.people-compare-person-col {
  width: calc((100% - 360px) / var(--compare-count));
}

.people-compare-panel {
  display: grid;
  gap: 12px;
}

.people-compare-groups {
  display: grid;
  gap: 10px;
}

.people-compare-group {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.people-compare-group summary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.people-compare-group summary strong {
  color: var(--brand);
  font-size: 15px;
}

.people-compare-group summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.people-compare-group summary em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.people-compare-group .people-compare-wrap {
  margin-top: 10px;
}

.people-compare-table td:first-child {
  display: grid;
  gap: 3px;
  min-width: 190px;
  white-space: normal;
}

.people-compare-table th:not(:first-child),
.people-compare-table td:not(:first-child) {
  text-align: center;
}

.data-completeness {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(280px, 2fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid #cfe0f1;
  border-radius: 8px;
  background: #f8fbff;
}

.data-completeness.warning {
  border-color: #f1c57a;
  background: #fff9e9;
}

.data-completeness strong {
  color: var(--brand);
}

.data-completeness p {
  margin: 4px 0;
  color: var(--ink);
  line-height: 1.45;
}

.data-completeness small {
  color: var(--muted);
}

.data-completeness-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.data-quality-chip {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.data-quality-chip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.data-quality-chip strong {
  color: var(--brand);
  font-size: 20px;
}

.data-quality-chip:not(.locked):hover {
  border-color: #b8cde3;
  background: #f8fbff;
}

.data-table-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

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

.data-table-tools .compact-btn.active {
  background: var(--brand);
  color: #fff;
}

.data-table-scroll {
  width: 100%;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.data-center-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
}

.data-center-table th,
.data-center-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.data-center-table th {
  background: #f6f9fc;
  color: var(--muted);
  font-weight: 900;
}

.data-center-table tr:last-child td {
  border-bottom: 0;
}

.data-table-value {
  min-width: 42px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f2f7fc;
  color: var(--brand);
  font-weight: 900;
}

.data-table-value:hover {
  border-color: #b8cde3;
  background: #eaf4ff;
}

.data-table-value.danger {
  background: #fff0f0;
  color: var(--red);
}

.data-table-value.warning {
  background: #fff7df;
  color: #8a5b00;
}

.data-table-value.opportunity {
  background: #edf9f0;
  color: var(--green);
}

.data-table-value.locked {
  display: inline-block;
  background: #eef3f7;
  color: var(--muted);
}

.data-metric-card.danger {
  border-top-color: var(--red);
}

.data-metric-card.danger strong {
  color: var(--red);
}

.data-metric-card.warning {
  border-top-color: var(--yellow);
}

.data-metric-card.warning strong {
  color: #9a6700;
}

.data-metric-card.opportunity {
  border-top-color: var(--green);
}

.data-metric-card.opportunity strong {
  color: var(--green);
}

.data-metric-card.locked {
  opacity: 0.72;
  cursor: not-allowed;
}

.data-drill-panel,
.data-staff-panel {
  margin-bottom: 14px;
}

.data-drill-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

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

.data-drill-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.3fr) minmax(140px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  cursor: pointer;
}

.data-drill-row:hover {
  border-color: #bdd3ea;
  background: #f5f9fd;
}

.data-record-status {
  color: var(--brand);
  font-weight: 900;
}

.data-staff-panel.locked {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.data-staff-table td,
.data-staff-table th {
  white-space: nowrap;
}

.compact-empty {
  min-height: 120px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.page-head h2 {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 20px;
}

.metric, .panel, .customer-row, .drawer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  padding: 14px;
  border-top: 3px solid var(--brand);
}

.metric strong {
  display: block;
  font-size: 28px;
  margin-top: 4px;
  color: var(--brand);
}

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

.task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-align: left;
}

.task-card {
  align-items: flex-start;
  flex-direction: column;
}

.task-card:hover,
.task-card.active {
  background: var(--brand-soft);
  border-color: #b8cde3;
}

.task-card span {
  font-weight: 700;
  color: var(--muted);
}

.task-card strong {
  color: var(--brand);
  font-size: 20px;
}

.task-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.task-card.loaner-overdue {
  border-color: #e6a2a2;
  background: #fff8f8;
}

.task-card.loaner-overdue span,
.task-card.loaner-overdue small,
.task-card.loaner-overdue strong { color: #bd3e3e; }

.service-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.service-title-line h2 {
  margin: 0;
}

.service-total-pill {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef5fb;
  color: var(--brand);
  font-size: 13px;
  font-weight: 850;
}

.service-total-pill.active,
.service-total-pill:hover {
  border-color: #b8cde3;
  background: var(--brand-soft);
}

.service-alert-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #f2b8b5;
  border-radius: 8px;
  background: #fff5f4;
}

.service-alert-bar strong,
.service-alert-bar span {
  display: block;
}

.service-alert-bar strong {
  color: var(--red);
  font-size: 15px;
}

.service-alert-bar span {
  margin-top: 2px;
  color: #7f4b45;
  font-size: 13px;
  line-height: 1.45;
}

.management-panel,
.more-filter-panel {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px 12px;
}

.management-panel > summary,
.more-filter-panel > summary,
.hearing-attachment-panel > summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 800;
  list-style: none;
}

.management-panel > summary::-webkit-details-marker,
.more-filter-panel > summary::-webkit-details-marker,
.hearing-attachment-panel > summary::-webkit-details-marker {
  display: none;
}

.management-panel .quality-grid,
.more-filter-panel .toolbar {
  margin: 10px 0 0;
}

.simple-service-toolbar {
  grid-template-columns: minmax(170px, 1.25fr) minmax(150px, 1fr) minmax(140px, 1fr) minmax(140px, 1fr) 108px;
}

.service-list-columns {
  display: grid;
  grid-template-columns: var(--customer-columns) auto;
  gap: 14px;
  align-items: center;
  margin: 14px 0 8px;
  padding: 0 14px;
  color: #5e7188;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.service-list-columns span:last-child {
  text-align: center;
}

/* 售后列表信息密度高，使用独立列宽，避免说明文字挤入相邻栏目。 */
.service-list-panel {
  margin-top: 14px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #e2eaf2;
  border-radius: 12px;
  background: #fff;
}

.service-list-panel .service-list-columns,
.service-list-panel .service-row {
  grid-template-columns:
    minmax(0, 1.15fr)
    minmax(0, 1.05fr)
    minmax(0, .92fr)
    minmax(0, 1fr)
    minmax(0, .72fr)
    minmax(0, .95fr)
    minmax(82px, .62fr);
}

.service-list-panel .service-list-columns {
  min-width: 0;
  gap: clamp(8px, 1vw, 16px);
  margin: 0;
  padding: 12px clamp(12px, 1.3vw, 20px);
  border-bottom: 1px solid #e2eaf2;
  background: #f7f9fc;
}

.service-list-panel .service-customer-list {
  min-width: 0;
  gap: 0;
}

.service-list-panel .service-row {
  min-height: 120px;
  gap: clamp(8px, 1vw, 16px);
  align-items: start;
  padding: 16px clamp(12px, 1.3vw, 20px);
  border: 0;
  border-bottom: 1px solid #e6edf4;
  border-radius: 0;
  box-shadow: none;
}

.service-list-panel .service-row:last-child { border-bottom: 0; }
.service-list-panel .service-row:hover { border-color: #e6edf4; background: #f8fbfe; box-shadow: inset 3px 0 0 var(--accent); }
.service-list-panel .service-row > div { min-width: 0; }
.service-list-panel .service-row > div > div:first-child { color: #263c56; font-weight: 800; line-height: 1.45; }
.service-list-panel .service-row .customer-name { font-size: 17px; }
.service-list-panel .service-row .muted {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: #718197;
  line-height: 1.48;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.service-list-panel .service-completeness-cell .muted { -webkit-line-clamp: 3; }
.service-list-panel .service-risk-cell .tag-line { margin-top: 8px; gap: 6px; }
.service-list-panel .service-risk-cell .mini-tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-list-panel .service-row > button { width: 100%; min-height: 42px; align-self: center; white-space: nowrap; }

.clear-filter-btn {
  min-height: 42px;
  width: 100%;
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.quality-grid > div {
  padding: 12px;
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quality-grid span,
.repair-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.quality-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--brand);
  font-size: 20px;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.customer-toolbar {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.toolbar input,
.toolbar select,
.toolbar details {
  width: 100%;
  min-width: 0;
}

.date-filter-group {
  display: grid;
  grid-column: span 4;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) 64px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.filter-name,
.filter-specialist,
.filter-status,
.filter-store,
.filter-age,
.filter-channel,
.filter-product {
  min-height: 48px;
}

.customer-toolbar input,
.customer-toolbar select,
.customer-toolbar .multi-select > summary {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  line-height: 1.2;
}

.customer-toolbar select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%) right 18px center / 6px 6px no-repeat,
    linear-gradient(135deg, var(--ink) 50%, transparent 50%) right 13px center / 6px 6px no-repeat,
    #ffffff;
}

.customer-toolbar .multi-select > summary {
  padding-right: 34px;
}

.customer-toolbar .compact-btn {
  height: 48px;
  padding: 0 10px;
}

.filter-name,
.filter-specialist {
  grid-column: span 3;
}

.filter-status,
.filter-store,
.filter-age,
.filter-channel,
.filter-product {
  grid-column: span 2;
}

.date-filter-group .compact-btn {
  white-space: nowrap;
}

.name-search,
.specialist-search,
.channel-search {
  min-height: 42px;
}

.multi-select {
  position: relative;
  min-height: 42px;
}

.multi-select summary {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.multi-select summary::-webkit-details-marker {
  display: none;
}

.multi-select summary::after {
  content: "▾";
  margin-left: auto;
  color: var(--ink);
}

.multi-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  width: max(100%, 260px);
  display: grid;
  gap: 4px;
  max-height: min(420px, 52vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.follow-result-multi .multi-options {
  max-height: min(300px, 42vh);
  z-index: 40;
}

.multi-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.multi-options label:hover {
  background: var(--brand-soft);
}

.multi-options input {
  width: auto;
}

.multi-actions {
  position: sticky;
  bottom: -8px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 4px -8px -8px;
  padding: 8px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.customer-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.customer-row {
  display: grid;
  grid-template-columns: var(--customer-columns) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.customer-list-panel .customer-row,
.service-list-panel .service-row {
  content-visibility: auto;
  contain-intrinsic-size: 112px;
}

.customer-row:hover {
  border-color: #bdd3ea;
  box-shadow: 0 8px 24px rgba(6, 63, 124, 0.07);
}

.customer-name {
  font-weight: 800;
  margin-bottom: 4px;
}

.trial-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  padding: 2px 7px;
  border: 1px solid #9ed7e1;
  border-radius: 999px;
  background: #eaf8fa;
  color: #08788a;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  vertical-align: 1px;
}

.customer-status-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.trial-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #08788a;
  font-weight: 800;
}

.trial-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #0f9aad;
}

.trial-edit-active {
  display: block;
  margin-top: 5px;
  color: #08788a;
  font-size: 14px;
}

.trial-focus-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid #9ed7e1;
  border-left: 4px solid #0f9aad;
  border-radius: 10px;
  background: #f3fcfd;
}

.trial-focus-kicker {
  display: block;
  color: #08788a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
}

.trial-focus-panel h3 {
  margin: 4px 0 0;
  color: #063f4d;
  font-size: 17px;
}

.trial-focus-panel p {
  margin: 5px 0 0;
  color: #3d6670;
  font-size: 13px;
}

.trial-focus-panel p strong { color: #08788a; }

.return-trial-btn {
  min-width: 92px;
  border-color: #0f9aad;
  background: #0f9aad;
  color: #fff;
}

.return-trial-btn:hover { background: #08788a; }

.loaner-device-focus-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid #b7cbe7;
  border-left: 4px solid #3d72af;
  border-radius: 10px;
  background: #f4f8fe;
}

.loaner-device-focus-panel.overdue {
  border-color: #e6a2a2;
  border-left-color: #c84b4b;
  background: #fff8f8;
}

.loaner-device-focus-kicker {
  display: block;
  color: #2b619e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
}

.loaner-device-focus-panel.overdue .loaner-device-focus-kicker { color: #bd3e3e; }

.loaner-device-focus-panel h3 {
  margin: 4px 0 0;
  color: #153f70;
  font-size: 17px;
}

.loaner-device-focus-panel p {
  margin: 5px 0 0;
  color: #466684;
  font-size: 13px;
}

.loaner-device-focus-panel p strong { color: #2b619e; }
.loaner-device-focus-panel.overdue p strong { color: #bd3e3e; }

.return-loaner-device-btn {
  min-width: 92px;
  border-color: #3d72af;
  background: #3d72af;
  color: #fff;
}

.return-loaner-device-btn:hover { background: #2b619e; }

.loaner-device-history-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.loaner-device-history-item {
  display: grid;
  grid-template-columns: minmax(150px, .85fr) minmax(220px, 1.3fr) minmax(140px, .8fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  font-size: 13px;
}

.loaner-device-history-item span,
.loaner-device-history-item small { color: var(--muted); }

.trial-history-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
}

.trial-history-item {
  display: grid;
  grid-template-columns: minmax(150px, .85fr) minmax(220px, 1.3fr) minmax(140px, .8fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  font-size: 13px;
}

.trial-history-item span,
.trial-history-item small { color: var(--muted); }

.important-star {
  display: inline-block;
  margin-right: 6px;
  color: #f5b301;
  font-size: 20px;
  line-height: 1;
  vertical-align: -1px;
}

.important-star.small {
  font-size: 15px;
}

.important-star.task-star {
  margin-right: 5px;
  font-size: 16px;
  vertical-align: -1px;
}

.edit-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.edit-title-row h2 {
  margin: 0;
}

.important-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.important-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.important-toggle span {
  color: #cbd5e1;
  font-size: 22px;
  line-height: 1;
}

.important-toggle strong {
  font-size: 13px;
}

.important-toggle:has(input[type="checkbox"]:checked) {
  border-color: #f2c75c;
  background: #fff8df;
  color: #8a5a00;
}

.important-toggle:has(input[type="checkbox"]:checked) span {
  color: #f5b301;
}

.entry-important-toggle {
  flex: 0 0 auto;
  margin-top: 2px;
}

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

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
  background: #edf2f7;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.status.blue { color: var(--blue); background: #e8f4fb; }
.status.yellow { color: var(--yellow); background: #fff7df; }
.status.green { color: var(--green); background: #e7f7ef; }
.status.red { color: var(--red); background: #feecec; }
.status.teal { color: #087c82; background: #e2f7f7; }

.ordered-follow-up-hint,
.ordered-follow-record-note {
  display: none;
  border: 1px solid #a8dfe2;
  border-left: 4px solid #15979d;
  border-radius: 10px;
  background: #effbfc;
  color: #135b61;
}

.ordered-follow-up-hint {
  padding: 12px 14px;
}

.ordered-follow-up-hint strong,
.ordered-follow-up-hint span {
  display: block;
}

.ordered-follow-up-hint span {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
}

.entry-form.is-ordered-awaiting .entry-follow-up-field {
  display: none;
}

.entry-form.is-ordered-awaiting .ordered-follow-up-hint {
  display: block;
}

.ordered-follow-record-note {
  display: block;
  margin-top: 10px;
  padding: 12px 14px;
  line-height: 1.55;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, clamp(300px, 28vw, 360px));
  gap: 16px;
}

.split > div {
  min-width: 0;
}

.panel {
  padding: 16px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

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

.drawer {
  padding: 18px;
  position: sticky;
  top: 86px;
  align-self: start;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer h2 {
  margin: 0 0 8px;
}

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

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

.detail-page {
  max-width: 1180px;
}

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

.detail-page .follow-form {
  max-width: 720px;
}

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

.detail-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdff;
}

.detail-grid span,
.detail-block label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.detail-block {
  margin-top: 12px;
}

.detail-block p {
  margin: 6px 0 0;
  line-height: 1.6;
  white-space: pre-wrap;
}

.follow-form {
  display: grid;
  gap: 10px;
}

.follow-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.service-plan {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.service-plan-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fbfdff;
}

.service-plan-item strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.service-plan-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.service-plan-item.done {
  border-left-color: var(--green);
  background: #f2fbf6;
}

.service-plan-item.due {
  border-left-color: var(--blue);
}

.service-plan-item.overdue {
  border-left-color: var(--red);
  background: #fff7f7;
}

.service-plan-item.soon {
  border-left-color: var(--yellow);
  background: #fffaf0;
}

.service-plan-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 220px;
  color: var(--muted);
  font-size: 13px;
}

.service-plan-meta em {
  min-width: 58px;
  font-style: normal;
  font-weight: 800;
  color: var(--brand);
}

.task-complete-note {
  flex-basis: 100%;
  text-align: right;
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}

.purchase-profile-list {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
}

.purchase-profile-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #fbfdff;
}

.purchase-profile-card.current {
  border-left-color: var(--green);
  background: #f3fbf6;
}

.purchase-profile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.purchase-profile-card-head strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.purchase-profile-card-head span:not(.mini-tag) {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

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

.purchase-profile-grid div {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.purchase-profile-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.purchase-profile-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.purchase-profile-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.purchase-profile-form textarea {
  min-height: 74px;
}

.archive-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.archive-banner.pending {
  border-color: #f7c66a;
  background: #fffaf0;
}

.archive-banner.complete {
  border-color: #b7dec8;
  background: #f3fbf6;
}

.archive-banner strong {
  display: block;
  color: var(--brand);
}

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

.service-detail-sections {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.service-detail-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.service-detail-tab {
  display: flex;
  min-width: 0;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--brand);
  box-shadow: none;
  text-align: left;
}

.service-detail-tab:hover {
  border-color: #9fc7e8;
  background: #f7fbff;
}

.service-detail-tab.active {
  border-color: #58a9d4;
  background: #eef8fc;
  box-shadow: inset 0 3px 0 #1599bd;
}

.service-detail-tab-copy {
  min-width: 0;
}

.service-detail-tab-copy strong,
.service-detail-tab-copy small {
  display: block;
}

.service-detail-tab-copy strong {
  font-size: 15px;
  font-weight: 900;
}

.service-detail-tab-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.service-detail-tab em {
  flex: 0 0 auto;
  max-width: 78px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #edf3f8;
  color: #476178;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
}

.service-detail-tab.active em {
  background: #d8f0f7;
  color: #087b99;
}

.service-detail-tabpanel {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.service-detail-tabpanel[hidden] {
  display: none !important;
}

.service-detail-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.service-detail-section.service-record-section[open] {
  overflow: visible;
}

.service-detail-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.service-detail-section > summary::-webkit-details-marker {
  display: none;
}

.service-detail-section > summary::after {
  content: "展开";
  flex: 0 0 auto;
  min-width: 42px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.service-detail-section[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.service-detail-section[open] > summary::after {
  content: "收起";
  color: var(--brand);
}

.service-detail-section summary strong,
.service-detail-section summary span {
  display: block;
}

.service-detail-section summary strong {
  color: var(--brand);
  font-size: 16px;
  font-weight: 900;
}

.service-detail-section summary span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.service-detail-section-body {
  padding: 14px;
}

.service-detail-section-body > .detail-grid:first-child,
.service-detail-section-body > .service-plan:first-child,
.service-detail-section-body > .repair-list:first-child,
.service-detail-section-body > .follow-list:first-child,
.service-detail-section-body > .hearing-archive:first-child {
  margin-top: 0;
}

.service-detail-section-body > .detail-grid:last-child,
.service-detail-section-body > .service-plan:last-child,
.service-detail-section-body > .repair-list:last-child,
.service-detail-section-body > .follow-list:last-child,
.service-detail-section-body > .hearing-archive:last-child {
  margin-bottom: 0;
}

.service-inner-fold {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.service-inner-fold > summary {
  cursor: pointer;
  color: var(--brand);
  font-size: 13px;
  font-weight: 850;
  list-style: none;
}

.service-inner-fold > summary::-webkit-details-marker {
  display: none;
}

.service-inner-fold > summary::after {
  content: "展开";
  float: right;
  color: var(--muted);
  font-weight: 800;
}

.service-inner-fold[open] > summary {
  margin-bottom: 10px;
}

.service-inner-fold[open] > summary::after {
  content: "收起";
  color: var(--brand);
}

.quick-record-form {
  max-width: none;
}

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

.quick-record-form > textarea {
  min-height: 86px;
}

.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef5fb;
  color: var(--brand);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.mini-tag.calm {
  color: var(--green);
  background: #edf8f2;
}

.inline-service-form {
  margin: 12px 0 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.service-post-follow-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin: 10px 0 2px;
  padding: 10px 12px;
  border: 1px solid #cfe2f1;
  border-radius: 8px;
  background: #f5faff;
  color: var(--ink);
  cursor: pointer;
}

.service-post-follow-toggle input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--brand);
}

.service-post-follow-toggle span {
  min-width: 0;
}

.service-post-follow-toggle strong,
.service-post-follow-toggle small {
  display: block;
}

.service-post-follow-toggle small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.repair-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.repair-item {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(3, minmax(110px, 0.7fr));
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.repair-item .wide {
  grid-column: span 2;
}

.repair-item .full {
  grid-column: 1 / -1;
}

.repair-title-block {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.repair-item strong {
  color: var(--ink);
}

.repair-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.repair-log-block {
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.repair-log-list {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.repair-log-list div {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f4f8fb;
}

.repair-log-list strong {
  display: block;
  font-size: 13px;
}

.repair-log-list em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.record-meta span {
  padding: 4px 7px;
  border-radius: 8px;
  background: #eef5fb;
  color: #334155;
  font-size: 12px;
}

.service-record-card-head,
.record-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.service-record-card-head {
  margin-bottom: 8px;
}

.service-record-card-head > strong {
  color: var(--ink);
}

.service-record-actions,
.record-form-actions {
  flex-wrap: wrap;
}

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

.record-form-actions button {
  flex: 1 1 180px;
}

.follow-template-header {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #b9d6f2;
  border-radius: 8px;
  background: #f3f8fd;
}

.follow-template-header strong {
  color: var(--brand);
  font-size: 15px;
}

.follow-template-header span {
  color: #38516b;
  font-size: 13px;
  line-height: 1.5;
}

.muted-template {
  border-color: var(--line);
  background: #fbfdff;
}

.contact-attempt-hint {
  display: none;
  margin: 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
}

.quick-record-form.is-contact-attempt .contact-attempt-hint {
  display: block;
}

.service-record-structured {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.service-record-structured div {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.service-record-structured span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.service-record-structured strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.service-record-item.attempt-only {
  border-left: 4px solid var(--yellow);
}

.hearing-archive {
  display: grid;
  gap: 12px;
  margin: 12px 0 18px;
}

.hearing-archive.is-collapsed {
  margin-bottom: 12px;
}

.hearing-archive-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.hearing-archive-summary > div:first-child {
  min-width: 0;
}

.hearing-archive-summary strong,
.hearing-archive-summary > div:first-child > span {
  display: block;
}

.hearing-archive-summary strong {
  color: var(--brand);
  font-size: 15px;
}

.hearing-archive-summary > div:first-child > span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.hearing-latest-card,
.hearing-test-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.section-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-headline strong,
.section-headline span {
  display: block;
}

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

.hearing-actions,
.hearing-chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.hearing-chart-toolbar {
  justify-content: space-between;
  width: 100%;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.hearing-toolbar-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hearing-compare-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.hearing-compare-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.hearing-compare-group > span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.hearing-chart-card {
  margin-top: 10px;
}

.hearing-chart-card.is-compact {
  margin-top: 8px;
}

.hearing-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  min-height: 26px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.hearing-current-label,
.hearing-compare-label {
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 800;
}

.hearing-current-label {
  background: #e9f5ef;
  color: #176b4c;
}

.hearing-compare-label {
  background: #eef5fb;
  color: #46657f;
}

.hearing-chart {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.hearing-chart-card.is-compact .hearing-chart {
  min-height: 340px;
}

.hearing-chart-card.is-compact .speech-summary,
.hearing-chart-card.is-compact .masking-summary {
  margin-top: 8px;
  padding: 8px 10px;
}

.hearing-chart-empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hearing-history-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px 12px;
}

.hearing-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--brand);
  font-weight: 800;
}

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

.hearing-test-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.hearing-test-item {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.hearing-test-item.is-comparing {
  border-color: #9ec8e6;
  background: #f5fbff;
}

.hearing-test-item.is-expanded {
  background: #fbfdff;
}

.hearing-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hearing-history-meta {
  min-width: 0;
}

.hearing-history-meta strong,
.hearing-history-meta span {
  display: block;
}

.hearing-history-meta span,
.hearing-test-item span {
  color: var(--muted);
  font-size: 13px;
}

.hearing-history-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.hearing-test-item .hearing-chart {
  margin-top: 10px;
  min-height: 300px;
}

.hearing-entry-section,
.hearing-advanced-panel {
  margin-top: 12px;
}

.hearing-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.hearing-form-head strong,
.hearing-form-head span {
  display: block;
}

.hearing-form-head strong {
  color: var(--brand);
  font-size: 15px;
}

.hearing-form-head span {
  color: var(--muted);
  font-size: 13px;
}

.hearing-entry-section h3,
.hearing-advanced-panel h3 {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 15px;
}

.hearing-input-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.hearing-input-table th,
.hearing-input-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 6px;
  vertical-align: top;
}

.hearing-input-table th {
  background: #eef5fb;
  color: var(--brand);
  font-size: 12px;
}

.hearing-input-table td {
  text-align: center;
}

.hearing-db-input {
  width: 62px;
  min-width: 0;
  padding: 6px 7px;
  text-align: center;
  font-size: 13px;
}

.hearing-db-input:disabled {
  background: #eef2f6;
  color: var(--muted);
}

.hearing-input-table.quick,
.hearing-input-table.compact {
  table-layout: fixed;
}

.hearing-input-table.quick th:first-child,
.hearing-input-table.compact th:first-child {
  width: 90px;
}

.hearing-input-scroll {
  overflow-x: hidden;
  padding-bottom: 2px;
}

.hearing-input-table.horizontal {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.hearing-input-table.horizontal th,
.hearing-input-table.horizontal td {
  min-width: 0;
  padding: 6px 3px;
  vertical-align: middle;
}

.hearing-input-table.horizontal th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 64px;
  width: 64px;
  background: #eef5fb;
}

.hearing-input-table.horizontal thead th:first-child {
  z-index: 3;
}

.hearing-point-control {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.hearing-point-control .hearing-db-input {
  width: 56px;
}

.hearing-point-control.is-no-response .hearing-db-input,
.hearing-mask-record-row.is-no-response .hearing-db-input:not(:disabled) {
  border-color: #c23b36;
  background: #fff8f6;
}

.hearing-nr-toggle {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.hearing-nr-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hearing-nr-toggle span {
  min-width: 46px;
  padding: 3px 4px;
  border: 1px solid #c9d5e3;
  border-radius: 4px;
  color: #607086;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.hearing-nr-toggle input:checked + span {
  border-color: #c23b36;
  color: #a52722;
  background: #fff1ef;
}

.hearing-nr-toggle input:focus-visible + span {
  outline: 2px solid #1d66d1;
  outline-offset: 2px;
}

.hearing-split-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.hearing-option-switches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.switch-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.switch-check input {
  width: auto;
}

.hearing-option-section,
.hearing-attachment-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hearing-option-section.is-hidden {
  display: none;
}

.hearing-option-section textarea {
  margin-top: 8px;
}

.hearing-advanced-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hearing-advanced-panel > summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 800;
  list-style: none;
}

.hearing-advanced-panel > summary::-webkit-details-marker {
  display: none;
}

.hearing-advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.hearing-advanced-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.hearing-mini-table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
}

.hearing-mini-table th,
.hearing-mini-table td {
  padding: 5px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
}

.masking-record-table {
  table-layout: fixed;
  margin-top: 8px;
}

.masking-record-table th:nth-child(1),
.masking-record-table th:nth-child(2) {
  width: 92px;
}

.masking-record-table th:nth-child(3) {
  width: 104px;
}

.masking-record-table th:nth-child(6) {
  width: 54px;
}

.masking-record-table select,
.masking-record-table input {
  min-height: 34px;
}

.masking-record-table select {
  width: 100%;
  min-width: 0;
  padding: 6px;
}

.speech-summary,
.masking-summary {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.speech-summary strong,
.masking-summary strong {
  color: var(--brand);
  font-size: 13px;
}

.speech-summary div,
.masking-summary div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--ink);
  font-size: 13px;
}

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

.speech-compare-panel {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.speech-compare-panel > strong {
  color: var(--brand);
  font-size: 13px;
}

.speech-compare-panel > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.speech-compare-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.speech-compare-item {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 13px;
}

.speech-compare-item.is-current {
  border-color: #a8d7c1;
  background: #f5fbf8;
}

.speech-compare-item div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--brand);
  font-weight: 800;
}

.speech-compare-item span {
  color: var(--ink);
}

.mini-check {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 4px 4px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mini-check input {
  width: auto;
}

.attachment-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.follow-item {
  border-left: 3px solid var(--accent);
  padding: 8px 10px;
  background: #f7fbfe;
}

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

.change-item {
  border-left: 3px solid var(--brand);
  padding: 8px 10px;
  background: #fbfdff;
  line-height: 1.6;
}

.suggestion-item {
  border-left-color: var(--yellow);
  background: #fffaf0;
}

.advice-form {
  max-width: 720px;
  margin: 10px 0 16px;
}

.empty-state {
  min-height: 240px;
  display: grid;
  place-items: center;
  gap: 10px;
  color: var(--muted);
}

.empty-state img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  opacity: 0.9;
}

.entry-panel {
  max-width: 980px;
}

.entry-form textarea {
  min-height: 120px;
}

.entry-hearing-panel {
  margin-top: 14px;
}

.entry-hearing-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.entry-hearing-summary::-webkit-details-marker {
  display: none;
}

.entry-hearing-summary > span:first-child {
  color: var(--brand);
  font-size: 16px;
  font-weight: 900;
}

.entry-hearing-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 92px;
  padding: 7px 12px;
  border: 1px solid #b8cde3;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.entry-hearing-toggle::before {
  content: "展开录入";
}

.entry-hearing-panel[open] .entry-hearing-toggle {
  background: #eef5fb;
  color: var(--brand);
}

.entry-hearing-panel[open] .entry-hearing-toggle::before {
  content: "收起录入";
}

.entry-hearing-fields {
  margin-top: 10px;
}

.success-note {
  margin-bottom: 14px;
  border: 1px solid #b7ead0;
  border-radius: 8px;
  background: #eefbf4;
  color: #16804f;
  padding: 10px 12px;
  font-weight: 700;
}

.success-toast {
  position: fixed;
  z-index: 60;
  top: 80px;
  right: 24px;
  width: min(380px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 28px;
  gap: 11px;
  align-items: center;
  overflow: hidden;
  padding: 13px 12px 14px;
  border: 1px solid #c5e8d6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(16, 53, 82, 0.16);
  animation: success-toast-in 180ms ease-out both;
}

.success-toast-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e7f8ef;
  color: #137a4b;
  font-size: 18px;
  font-weight: 900;
}

.success-toast-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.success-toast-copy small {
  color: #628075;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.success-toast-copy strong {
  overflow-wrap: anywhere;
  color: #173b32;
  font-size: 15px;
  line-height: 1.45;
}

.success-toast-close {
  width: 28px;
  height: 28px;
  min-height: 0;
  align-self: start;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #789087;
  font-size: 21px;
  font-weight: 500;
}

.success-toast-close:hover {
  background: #f0f6f3;
  color: #254c40;
}

.success-toast-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  transform-origin: left;
  background: #39a66f;
  animation: success-toast-progress linear both;
}

.success-toast.is-leaving {
  pointer-events: none;
  animation: success-toast-out 180ms ease-in both;
}

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

@keyframes success-toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-6px) scale(0.98); }
}

@keyframes success-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.conversion-panel {
  margin: 12px 0 16px;
  border: 1px solid #f2c579;
  border-radius: 8px;
  background: #fff8e8;
  padding: 14px;
}

.conversion-panel > div:first-child {
  margin-bottom: 10px;
}

.conversion-panel strong {
  color: #8a4d00;
}

.conversion-panel .hint {
  margin: 4px 0 0;
  color: #6f5a37;
}

.conversion-panel .conversion-form {
  margin-top: 14px;
}

.conversion-panel .entry-section {
  border-color: #f0d8a8;
  background: rgba(255, 255, 255, 0.76);
}

.conversion-panel .entry-section-head h3 {
  color: #8a4d00;
}

.conversion-panel .entry-section-head > span {
  background: #fff0cf;
  color: #8a4d00;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: 8px;
  overflow: hidden;
}

.users-table-wrap {
  width: 100%;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.users-table-wrap .users-table {
  border-radius: 0;
}

.account-table {
  table-layout: fixed;
  min-width: 0;
}

.account-table .account-col,
.account-table .stores-col,
.account-table .role-col,
.account-table .login-col,
.account-table .wecom-col,
.account-table .status-col,
.account-table .action-col { width: auto; }

.users-table th, .users-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 12px 14px;
  vertical-align: top;
  line-height: 1.5;
  word-break: normal;
  overflow-wrap: anywhere;
}

.users-table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  background: #f8fbfe;
}

.account-cell-main {
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
}

.account-cell-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.store-scope-cell {
  color: var(--ink);
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef5fb;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.editing-row {
  background: #f3f8fd;
}

.employment-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.employment-status.active {
  background: #e8f8ef;
  color: #16794a;
}

.employment-status.disabled {
  background: #fff4d9;
  color: #9a5a00;
}

.employment-status.departed {
  background: #eef1f5;
  color: #5d6875;
}

.management-grid {
  display: grid;
  gap: 18px;
}

.management-grid > * {
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-head h3,
.settings-card h3 {
  margin: 0;
  color: var(--brand);
  font-size: 16px;
}

.group-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.group-filter {
  width: auto;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.group-filter.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.group-heading-row td {
  background: #f3f8fd;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.settings-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.collapsible-card summary {
  cursor: pointer;
  color: var(--brand);
  font-size: 16px;
  font-weight: 800;
  list-style: none;
}

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

.collapsible-card summary::after {
  content: "展开";
  float: right;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.collapsible-card[open] summary {
  margin-bottom: 12px;
}

.collapsible-card[open] summary::after {
  content: "收起";
}

.management-section > summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 34px;
  padding-right: 52px;
}

.management-section-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  min-width: 0;
}

.management-section-title {
  color: var(--brand);
  font-size: 16px;
  font-weight: 900;
}

.management-section-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.management-section > summary::after {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.management-section-form .section-head {
  margin-bottom: 14px;
}

.management-section-form .section-head .hint {
  margin: 0;
}

.wecom-callback-panel {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding: 16px;
  border: 1px solid #cfe1f2;
  border-radius: 10px;
  background: #f7fbff;
}

.wecom-callback-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.wecom-callback-heading strong {
  color: var(--brand);
  font-size: 15px;
}

.wecom-callback-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wecom-callback-panel .hint {
  margin: 0;
}

.wecom-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.wecom-copy-row input[readonly] {
  background: #fff;
  color: var(--ink);
}

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

.account-identity-field {
  align-self: start;
  align-content: start;
  min-width: 0;
}

.account-identity-field > label {
  display: flex;
  align-items: center;
  min-height: 20px;
}

.account-identity-field > input {
  height: 46px;
}

.account-identity-note {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin: 2px 0 0;
  padding: 7px 10px;
  border: 1px solid #d8e8f5;
  border-radius: 8px;
  background: #f5faff;
  color: #5d7187;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.account-identity-note > span {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2f1fb;
  color: #0f6794;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.account-identity-note.needs-review {
  border-color: #efd19b;
  background: #fff9ed;
  color: #7a551e;
}

.account-identity-note.needs-review > span {
  background: #ffedc7;
  color: #9a5a00;
}

.identity-alias-field {
  padding: 12px 14px;
  border: 1px solid #d8e8f5;
  border-radius: 10px;
  background: #f8fbfe;
}

.identity-alias-field > label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.identity-alias-field > label > span {
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2f1fb;
  color: #0f6794;
  font-size: 11px;
  font-weight: 900;
}

.handover-section {
  border-color: #f1c79d;
  box-shadow: 0 10px 28px rgba(146, 77, 14, 0.08);
}

.handover-section .management-section-title {
  color: #9a5200;
}

.handover-warning {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #f3d1ad;
  border-radius: 10px;
  background: #fff8ec;
  color: #75410b;
}

.handover-warning span {
  color: #8a6237;
  font-size: 13px;
}

.handover-warning.handover-blocked {
  border-color: #efb0b0;
  background: #fff1f1;
  color: #a32626;
}

.handover-identity-review {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.handover-identity-review > div {
  display: grid;
  gap: 4px;
}

.handover-legacy-matches {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #b9decf;
  border-radius: 10px;
  background: #f1faf6;
  color: #245f4b;
}

.handover-legacy-matches > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.handover-legacy-matches span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #dff3ea;
  color: #24664e;
  font-size: 12px;
  font-weight: 800;
}

.handover-warning.handover-blocked span {
  color: #994848;
}

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

.handover-stats > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbfd;
}

.handover-stats span,
.handover-stats small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.handover-stats strong {
  color: var(--brand);
  font-size: 24px;
}

.handover-confirm {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 9px;
  background: #f7fafc;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.handover-confirm input {
  width: auto;
  margin-top: 2px;
}

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

.settings-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.inline-edit-form,
.inline-create-form {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr auto;
  gap: 10px;
  align-items: center;
}

.store-edit-form,
.inline-create-form {
  grid-template-columns: minmax(180px, 360px) auto auto;
  justify-content: start;
}

.inline-create-form {
  grid-template-columns: minmax(180px, 360px) auto;
}

.inline-create-form {
  margin-top: 12px;
}

.compact-btn {
  padding: 7px 10px;
  min-width: 64px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-checks {
  margin-top: 0;
}

.role-sync-option {
  grid-column: 2 / 3;
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.role-sync-option input {
  width: auto;
  margin-top: 2px;
}

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

.checkboxes label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.checkboxes input {
  width: auto;
}

.store-checks {
  max-height: 180px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.error {
  color: #b91c1c;
  margin-top: 10px;
  font-size: 13px;
}

.login-error[hidden] {
  display: none;
}

@media (max-width: 1280px) {
  .data-toolbar {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "period dates"
      "store specialist"
      "channel refresh";
  }

  .customer-toolbar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .date-filter-group {
    grid-column: span 6;
  }

  .filter-name,
  .filter-specialist,
  .filter-status,
  .filter-store,
  .filter-age,
  .filter-channel,
  .filter-product {
    grid-column: span 3;
  }

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

  .drawer {
    position: static;
    max-height: none;
  }
}

@media (max-width: 980px) {
  .customer-list-panel .customer-row,
  .service-list-panel .service-row {
    contain-intrinsic-size: 220px;
  }

  .login-card, .layout, .split {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: auto;
    gap: 28px;
    padding: 30px;
  }

  .login-hero {
    grid-template-columns: minmax(0, 1fr) 158px;
  }

  .login-mascot {
    width: 158px;
    height: 215px;
  }

  .login-form-logo {
    display: block;
  }

  .sidebar {
    border: 0;
    padding: 14px;
  }

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

  .nav-section-label {
    grid-column: 1 / -1;
  }

  .summary-grid, .toolbar, .customer-row, .form-grid, .detail-grid, .repair-item, .hearing-split-tables, .data-toolbar, .data-drill-row, .purchase-profile-grid {
    grid-template-columns: 1fr;
  }

  .data-toolbar {
    grid-template-areas:
      "period"
      "dates"
      "store"
      "specialist"
      "channel"
      "refresh";
  }

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

  .data-drill-head,
  .data-section-head,
  .data-staff-panel.locked,
  .data-accordion-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .hearing-history-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .hearing-history-actions {
    justify-content: flex-start;
  }

  .hearing-chart-toolbar,
  .hearing-history-head,
  .hearing-archive-summary,
  .hearing-form-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hearing-compare-options {
    grid-template-columns: 1fr;
  }

  .hearing-history-head-actions {
    justify-content: flex-start;
  }

  .archive-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .repair-item .wide {
    grid-column: auto;
  }

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

  .date-filter-group {
    grid-column: 1 / -1;
  }

  .data-date-range {
    grid-column: auto;
  }

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

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

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

  .inline-edit-form,
  .inline-create-form,
  .store-edit-form {
    grid-template-columns: 1fr;
  }

  .role-sync-option {
    grid-column: auto;
  }

  .wecom-callback-secret-grid,
  .wecom-copy-row {
    grid-template-columns: 1fr;
  }

  .management-section > summary {
    align-items: flex-start;
    padding-right: 52px;
  }

  .drawer {
    position: static;
  }

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

@media (max-width: 640px) {
  .customer-list-panel .customer-row,
  .service-list-panel .service-row {
    contain-intrinsic-size: 360px;
  }

  .success-toast {
    top: 12px;
    right: 12px;
    width: calc(100vw - 24px);
  }

  .customer-toolbar,
  .date-filter-group {
    grid-template-columns: 1fr;
  }

  .date-filter-group {
    grid-column: auto;
  }

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

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

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

  .service-detail-tabs {
    gap: 8px;
  }

  .service-detail-tab {
    min-height: 84px;
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    padding: 11px;
  }

  .service-detail-tab em {
    max-width: 100%;
    white-space: normal;
  }

  .service-alert-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hearing-option-switches {
    grid-template-columns: 1fr;
  }

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

  .brand-logo {
    width: 132px;
  }

  .brand-title {
    min-width: 0;
    padding-left: 10px;
  }

  .main {
    padding: 14px;
  }

  .login-shell {
    padding: 14px;
  }

  .login-box {
    padding: 28px 22px;
  }

  .login-visual {
    padding: 28px 22px;
  }

  .login-hero {
    grid-template-columns: 1fr;
  }

  .login-mascot {
    display: none;
  }

  .login-hero h2 {
    font-size: 30px;
  }

  .login-capabilities {
    margin-top: 20px;
  }

  .login-encouragement {
    padding: 14px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .success-toast,
  .success-toast.is-leaving,
  .success-toast-progress {
    animation: none;
  }
}

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

.entry-section {
  padding: 16px;
  border: 1px solid #dfe8f1;
  border-radius: 10px;
  background: #fbfdff;
}

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

.entry-section-head h3 {
  margin: 0;
  color: var(--brand);
  font-size: 16px;
}

.entry-section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.entry-section-head > span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
}

.entry-section .field { margin-top: 0; }

.service-delivery-section {
  border-color: #c7ddeb;
  background: linear-gradient(135deg, #f8fcff 0%, #f2f8fc 100%);
}

.service-delivery-mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid #d8e5ef;
  border-radius: 9px;
  background: #edf3f8;
}

.service-delivery-mode-switch button {
  min-height: 48px;
  border: 1px solid transparent;
  background: transparent;
  color: #52657a;
  font-weight: 800;
}

.service-delivery-mode-switch button:hover {
  background: #e5f0f8;
  color: var(--brand);
}

.service-delivery-mode-switch button.active {
  border-color: #d4e2ec;
  background: #fff;
  box-shadow: 0 2px 8px rgba(8, 47, 90, .1);
  color: var(--brand);
}

.service-delivery-mode-switch button:focus-visible {
  outline: 3px solid rgba(20, 135, 169, .35);
  outline-offset: 2px;
}

.service-delivery-mode-note {
  margin: 10px 0 0;
  color: #5b7087;
  font-size: 12px;
  line-height: 1.5;
}

.service-entry-mode-block {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #d5e3ed;
  border-radius: 10px;
  background: #f6fafc;
}

.service-entry-mode-head,
.legacy-follow-progress-head {
  display: grid;
  gap: 4px;
}

.service-entry-mode-head strong,
.legacy-follow-progress-head strong {
  color: var(--brand-dark);
  font-size: 14px;
}

.service-entry-mode-head span,
.legacy-follow-progress-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.service-entry-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.service-entry-mode-options > label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #dce6ee;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.service-entry-mode-options > label.active {
  border-color: #79aec5;
  background: #edf7fa;
  box-shadow: inset 0 0 0 1px rgba(20, 135, 169, .15);
}

.service-entry-mode-options input,
.legacy-follow-option input {
  flex: 0 0 auto;
  width: auto;
  min-width: 14px;
  margin-top: 3px;
}

.service-entry-mode-options span,
.legacy-follow-option > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.service-entry-mode-options strong,
.legacy-follow-option strong {
  color: var(--ink);
  font-size: 13px;
}

.service-entry-mode-options small,
.legacy-follow-option small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.legacy-follow-progress {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #d5e3ed;
}

.legacy-follow-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.legacy-follow-option {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 11px;
  border: 1px solid #dce6ee;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.legacy-follow-option:has(input:checked) {
  border-color: #5ba0bb;
  background: #edf8fb;
  box-shadow: inset 0 0 0 1px rgba(20, 135, 169, .18);
}

.legacy-follow-option em {
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.legacy-follow-option.stable-option {
  grid-column: 1 / -1;
  border-color: #b8d9c7;
  background: #f4fbf7;
}

.service-record-link-field {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #d5e3ed;
  border-radius: 9px;
  background: #f6fafc;
}

.service-record-link-field label {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
}

.service-record-link-field span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.entry-section label em {
  margin-left: 4px;
  color: #d14343;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.entry-section label small {
  margin-left: 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.entry-follow-up-field { position: relative; }

.entry-field-note {
  margin-top: -1px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.entry-optional-panel {
  overflow: hidden;
  border: 1px solid #dfe8f1;
  border-radius: 10px;
  background: #fff;
}

.entry-optional-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  color: var(--brand);
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}

.entry-optional-panel summary::-webkit-details-marker { display: none; }

.entry-optional-panel summary::after {
  content: "展开";
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.entry-optional-panel[open] summary { border-bottom: 1px solid #e3ebf3; }
.entry-optional-panel[open] summary::after { content: "收起"; }

.entry-optional-panel summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.entry-optional-panel .form-grid { padding: 16px; }
.entry-optional-panel .field { margin-top: 0; }

.entry-optional-panel.is-relevant {
  border-color: #efcf88;
  background: #fffdf8;
}

.entry-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0 0;
}

.entry-form-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.entry-form-actions button {
  flex: 0 0 auto;
  min-width: 132px;
  min-height: 42px;
}

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

.customer-work-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding: 22px 24px;
  border: 1px solid #d6e2ee;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(8, 47, 90, .06);
}

.customer-work-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .09em;
}

.customer-work-hero h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  letter-spacing: -.02em;
}

.customer-work-hero p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.customer-work-hero p strong { color: var(--brand); font-size: 16px; }

.customer-all-btn {
  flex: 0 0 auto;
  min-width: 150px;
  min-height: 44px;
  border-color: #c7d8e8;
  background: #f6f9fc;
}

.customer-all-btn.active { border-color: var(--brand); background: var(--brand); color: #fff; }

.customer-hero-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }

.customer-ordered-summary {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 4px 8px;
  min-width: 118px;
  min-height: 52px;
  padding: 9px 12px;
  border: 1px solid #9ed4d5;
  border-radius: 10px;
  background: #effafa;
  color: #17636a;
  text-align: left;
}

.customer-ordered-summary span { font-size: 12px; font-weight: 800; }
.customer-ordered-summary strong { font-size: 18px; line-height: 1; }
.customer-ordered-summary small { grid-column: 1 / -1; margin-top: 2px; color: #4a777b; font-size: 11px; }
.customer-ordered-summary:hover { border-color: #15979d; background: #e2f7f7; transform: translateY(-1px); }
.customer-ordered-summary.active { border-color: #087c82; background: #087c82; color: #fff; }
.customer-ordered-summary.active small { color: #dff8f8; }

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

.customer-task-card {
  display: grid;
  gap: 5px;
  min-height: 108px;
  padding: 14px 15px;
  border: 1px solid #d9e3ed;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 5px 16px rgba(8, 47, 90, .035);
}

.customer-task-card:hover { border-color: #aac8df; background: #f8fbfe; transform: translateY(-1px); }
.customer-task-card.active { border-color: #77b7cb; background: #edf7fa; box-shadow: inset 0 3px 0 var(--accent), 0 7px 18px rgba(8, 47, 90, .08); }
.customer-task-label { color: #53667d; font-size: 13px; font-weight: 800; }
.customer-task-card strong { color: var(--brand-dark); font-size: 26px; line-height: 1.1; }
.customer-task-card small { color: #7a899d; font-size: 12px; }
.customer-task-card.task-overdue strong { color: #bd3e3e; }
.customer-task-card.task-today strong { color: #b66a18; }
.customer-task-card.task-next3 strong { color: #1b6e9b; }
.customer-task-card.has-overdue { border-color: #e6a2a2; background: #fff8f8; }
.customer-task-card.has-overdue .customer-task-label,
.customer-task-card.has-overdue small,
.customer-task-card small.has-trial-task { color: #b44747; font-weight: 800; }
.trial-overdue-count { color: #bd3e3e; }

.customer-list-panel {
  overflow: visible;
  border: 1px solid #d8e3ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(8, 47, 90, .055);
}

.customer-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 14px;
}

.customer-list-title-line { display: flex; align-items: center; gap: 10px; }
.customer-list-title-line h3 { margin: 0; color: var(--ink); font-size: 19px; }
.customer-list-title-line span { padding: 3px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 800; }
.customer-list-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.customer-filter-toolbar { display: grid; gap: 10px; padding: 0 22px 18px; position: relative; overflow-anchor: none; }
.customer-filter-row { display: grid; align-items: center; gap: 10px; min-width: 0; }
.customer-filter-row-primary { grid-template-columns: minmax(250px, 1.45fr) minmax(180px, 1fr) minmax(150px, .8fr) minmax(150px, .8fr); }
.customer-filter-row-secondary { grid-template-columns: minmax(255px, 1.45fr) auto minmax(145px, .82fr) minmax(125px, .72fr) minmax(145px, .82fr) auto; }
.customer-filter-row > input,
.customer-filter-row > select,
.customer-filter-row > button,
.customer-direct-filter > summary { min-width: 0; min-height: 44px; }

.customer-filter-row > .filter-name,
.customer-filter-row > .filter-specialist,
.customer-filter-row > .filter-store,
.customer-filter-row > .filter-status { grid-column: auto; }

.customer-direct-filter { width: 100%; min-width: 0; }
.customer-direct-filter > summary { padding: 0 12px; font-size: 13px; font-weight: 700; }
.customer-date-filter-inline { display: grid; grid-template-columns: auto minmax(92px, 1fr) auto minmax(92px, 1fr); align-items: center; gap: 7px; min-width: 0; }
.customer-date-filter-inline > span { color: #52647a; font-size: 12px; font-weight: 800; white-space: nowrap; }
.customer-date-filter-inline > i { color: #8492a5; font-size: 12px; font-style: normal; font-weight: 700; }
.customer-date-filter-inline input { width: 100%; min-width: 0; min-height: 44px; }
.customer-clear-date-btn, .customer-clear-all-btn { white-space: nowrap; }
.customer-clear-all-btn:not(:disabled) { border-color: #bed1e3; color: var(--brand); }
.customer-clear-all-btn:disabled { opacity: .52; cursor: not-allowed; }
.customer-active-filter-bar { display: flex; align-items: flex-start; gap: 10px; margin-top: 2px; padding-top: 12px; border-top: 1px solid #e5edf5; }
.customer-active-filter-bar > span { flex: 0 0 auto; padding-top: 6px; color: #6c7d92; font-size: 12px; font-weight: 800; }
.customer-filter-chip-list { display: flex; flex: 1; flex-wrap: wrap; gap: 7px; min-width: 0; }
.customer-filter-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 28px; padding: 4px 8px 4px 10px; border: 1px solid #c6dceb; border-radius: 999px; background: #f4f9fd; color: #176b9b; font-size: 12px; font-weight: 800; line-height: 1.25; cursor: pointer; }
.customer-filter-chip:hover { border-color: #82b8d7; background: #eaf5fb; }
.customer-filter-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-filter-chip b { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #d9ebf7; color: #176b9b; font-size: 14px; line-height: 1; }

.customer-list-columns,
.customer-list-panel .customer-row { grid-template-columns: minmax(165px, 1.1fr) minmax(185px, 1.3fr) minmax(130px, .8fr) minmax(105px, .65fr) minmax(140px, .9fr) 124px; }

.customer-list-columns {
  display: grid;
  gap: 16px;
  padding: 11px 22px;
  border-top: 1px solid #e2eaf2;
  border-bottom: 1px solid #e2eaf2;
  background: #f7f9fc;
  color: #728197;
  font-size: 12px;
  font-weight: 800;
}

.customer-list-panel .customer-list { gap: 0; }

.customer-list-panel .customer-row {
  gap: 16px;
  padding: 16px 22px;
  border: 0;
  border-bottom: 1px solid #e6edf4;
  border-radius: 0;
  box-shadow: none;
}

.customer-list-panel .customer-row:last-child { border-bottom: 0; }
.customer-list-panel .customer-row:hover { border-color: #e6edf4; background: #f8fbfe; box-shadow: inset 3px 0 0 var(--accent); }
.customer-primary-cell small, .customer-next-cell small { display: block; margin-top: 5px; color: #8190a3; font-size: 11px; line-height: 1.45; }
.customer-next-cell > div { margin-top: 6px; color: #33465d; font-size: 13px; font-weight: 700; }
.customer-work-status { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 900; }
.customer-work-status.danger { background: #fff0f0; color: #b42323; }
.customer-work-status.warning { background: #fff6e8; color: #a65b0b; }
.customer-work-status.info { background: #eaf6fa; color: #147790; }
.customer-work-status.neutral { background: #f1f4f7; color: #657488; }
.customer-row-action { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 0 12px; border: 1px solid #c5d8e8; border-radius: 8px; background: #f7fbff; color: var(--brand); font-size: 13px; font-weight: 800; }
.customer-row-action span { font-size: 20px; line-height: 1; }
.customer-row-action:hover { border-color: var(--brand); background: var(--brand); color: #fff; }

@media (max-width: 1200px) {
  .customer-task-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .customer-list-columns, .customer-list-panel .customer-row { grid-template-columns: minmax(160px, 1.1fr) minmax(180px, 1.25fr) minmax(125px, .8fr) minmax(105px, .65fr) 124px; }
  .customer-list-columns span:nth-child(5), .customer-source-cell { display: none; }
}

@media (max-width: 1280px) {
  .customer-filter-row-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-filter-row-secondary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .customer-date-filter-inline { grid-column: span 2; }
}

@media (max-width: 980px) {
  .customer-work-hero { align-items: flex-start; }
  .customer-filter-row-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-date-filter-inline { grid-column: 1 / -1; }
  .customer-list-columns, .service-list-columns { display: none; }
  .customer-list-panel .customer-list { gap: 10px; padding: 10px; }
  .customer-list-panel .customer-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; padding: 15px; border: 1px solid #dde7f0; border-radius: 9px; }
  .customer-list-panel .customer-row:last-child { border-bottom: 1px solid #dde7f0; }
  .customer-source-cell { display: block; }
  .customer-row-action { align-self: end; }
}

@media (max-width: 640px) {
  .entry-panel .page-head, .customer-work-hero { align-items: flex-start; flex-direction: column; }
  .entry-section { padding: 14px; }
  .entry-section-head { gap: 10px; }
  .service-delivery-mode-switch { grid-template-columns: 1fr; }
  .service-entry-mode-options, .legacy-follow-options { grid-template-columns: 1fr; }
  .legacy-follow-option.stable-option { grid-column: auto; }
  .entry-form-actions { align-items: stretch; flex-direction: column; }
  .entry-form-actions button { width: 100%; }
  .customer-work-hero { padding: 18px; }
  .customer-work-hero h2 { font-size: 21px; }
  .customer-hero-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .customer-all-btn, .customer-ordered-summary { width: 100%; }
  .customer-task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-task-card { min-height: 102px; }
  .customer-list-head { align-items: flex-start; flex-direction: column; padding: 18px 16px 12px; }
  .customer-filter-toolbar { padding: 0 16px 16px; }
  .customer-filter-row-primary, .customer-filter-row-secondary { grid-template-columns: 1fr; }
  .customer-date-filter-inline { grid-column: auto; }
  .customer-active-filter-bar { align-items: stretch; flex-direction: column; gap: 6px; }
  .customer-active-filter-bar > span { padding-top: 0; }
  .customer-list-panel .customer-row { grid-template-columns: 1fr; }
  .customer-row-action { width: 100%; }
}

@media (max-width: 980px) {
  .service-list-panel { overflow: visible; border: 0; background: transparent; }
  .service-list-panel .service-list-columns { display: none; }
  .service-list-panel .service-customer-list { min-width: 0; gap: 10px; }
  .service-list-panel .service-row {
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 15px;
    border: 1px solid #dde7f0;
    border-radius: 9px;
  }
  .service-list-panel .service-row:last-child { border-bottom: 1px solid #dde7f0; }
  .service-list-panel .service-row > button { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .service-list-panel .service-row { grid-template-columns: 1fr; }
}

/* 中等屏幕仍保留纵向阅读，不让侧栏压缩后的主区产生横向滚动。 */
@media (max-width: 1120px) {
  .simple-service-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-list-panel { overflow: visible; border: 0; background: transparent; }
  .service-list-panel .service-list-columns { display: none; }
  .service-list-panel .service-customer-list { gap: 10px; }
  .service-list-panel .service-row {
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 15px;
    border: 1px solid #dde7f0;
    border-radius: 9px;
  }
  .service-list-panel .service-row:last-child { border-bottom: 1px solid #dde7f0; }
  .service-list-panel .service-row > button { grid-column: 1 / -1; }

  .customer-list-columns { display: none; }
  .customer-list-panel .customer-list { gap: 10px; padding: 10px; }
  .customer-list-panel .customer-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 14px;
    padding: 15px;
    border: 1px solid #dde7f0;
    border-radius: 9px;
  }
  .customer-list-panel .customer-row:last-child { border-bottom: 1px solid #dde7f0; }
  .customer-source-cell { display: block; }

  .data-store-quality-row,
  .data-completeness { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .simple-service-toolbar { grid-template-columns: 1fr; }
  .service-list-panel .service-row,
  .customer-list-panel .customer-row { grid-template-columns: 1fr; }
  .hearing-input-table.horizontal th,
  .hearing-input-table.horizontal td { padding: 4px 1px; font-size: 11px; }
  .hearing-input-table.horizontal th:first-child { min-width: 48px; width: 48px; }
  .hearing-point-control .hearing-db-input { width: 32px; padding: 4px 1px; font-size: 11px; }
  .people-table th,
  .people-table td,
  .people-compare-table th,
  .people-compare-table td,
  .data-center-table th,
  .data-center-table td,
  .users-table th,
  .users-table td { padding: 8px 5px; font-size: 11px; }
}

@media (max-width: 980px) {
  .handover-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .handover-stats {
    grid-template-columns: 1fr;
  }

  .handover-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

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