:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #dbe3ee;
  --blue: #2563eb;
  --blue-soft: #e8f0ff;
  --green: #0f9f6e;
  --green-soft: #e8f7f0;
  --amber: #b7791f;
  --amber-soft: #fff4dc;
  --red: #d9480f;
  --red-soft: #ffe9df;
  --cyan: #0e7490;
  --shadow: 0 18px 42px rgba(30, 41, 59, 0.08);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

.svg-sprite {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  background: #ffffff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #1f4f8f;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand span,
.sidebar-status,
.eyebrow,
.field span,
.setting-line small {
  color: var(--muted);
}

.brand span {
  font-size: 12px;
}

.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf2f7;
}

.role-switch button {
  border: 0;
  border-radius: 6px;
  min-height: 34px;
  color: #475569;
  background: transparent;
  font-weight: 800;
}

.role-switch button.active {
  color: #0f3d75;
  background: #fff;
  box-shadow: 0 3px 10px rgba(30, 41, 59, 0.08);
}

.side-nav {
  display: grid;
  gap: 8px;
}

.nav-group-title {
  padding: 8px 12px 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.nav-item {
  border: 0;
  color: #334155;
  background: transparent;
  height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}

.nav-item svg,
.button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

.nav-item.active,
.nav-item:hover {
  color: #0f3d75;
  background: var(--blue-soft);
}

.nav-item.is-hidden,
.nav-group-title.is-hidden,
.topbar-actions.is-hidden {
  display: none;
}

.sidebar-status {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(15, 159, 110, 0.13);
}

.workspace {
  min-width: 0;
  padding: 24px;
}

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

.topbar h1,
.panel h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar-actions,
.table-tools,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-actions-shell {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.topbar-actions-shared {
  align-items: center;
}

.app-refresh-button {
  min-width: 108px;
}

.app-refresh-button.is-loading svg {
  animation: app-refresh-spin .8s linear infinite;
}

.refresh-status {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.compact {
  min-width: 138px;
}

.field span {
  font-size: 12px;
  font-weight: 700;
}

.form-section {
  border: 1px solid #d6e1ee;
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 12px;
  background: #fff;
}

.form-section-staff {
  background: #f8fbff;
}

.form-section-property {
  background: #f7fbff;
  border-color: #bfd4ee;
}

.form-section-customer {
  background: #fffdf7;
  border-color: #ecd7a5;
}

.form-section-return {
  background: #fffaf4;
  border-color: #f3c783;
}

.form-section-return-detail {
  background: #fffaf4;
  border-color: #f3c783;
}

.form-section.is-guided-focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16), 0 14px 28px rgba(37, 99, 235, 0.12);
}

.upload-block.is-guided-focus {
  border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

/* Keep incomplete fields visible until the employee supplies the missing item. */
.validation-missing {
  border-color: #dc2626 !important;
  animation: validation-missing-pulse .5s ease-in-out 6;
}

.validation-missing .validation-hint {
  display: block;
  margin-top: 6px;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
}

@keyframes validation-missing-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.18); }
  50% { box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.42); }
}

.form-section-return-timeline {
  background: #fff;
  border-color: #dbe8f6;
}

.return-method-field {
  min-width: 138px;
  margin-left: auto;
  display: grid;
  gap: 3px;
}

.return-method-field span {
  color: #5c728d;
  font-size: 11px;
  font-weight: 900;
}

.return-method-field select {
  min-height: 34px;
  border-color: #bfdbfe;
  padding: 5px 30px 5px 9px;
  color: #0f3d75;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 900;
}

.return-resource-action-field.is-hidden {
  display: none;
}

.return-scene-flow {
  display: grid;
  gap: 10px;
}

.return-scene-selector-row.is-customer-scene {
  grid-template-columns: 1fr;
}

.return-scene-fields {
  display: grid;
  gap: 10px;
}

.return-scene-fields.is-hidden {
  display: none;
}

.return-scene-fields .form-section-body {
  padding: 0;
}

.log-form.is-return-mode .contact-type-top {
  order: 1;
}

.log-form.is-return-mode #oldCustomerSection {
  order: 10;
}

.log-form.is-return-mode #returnVisitRecordsSection {
  order: 20;
}

.log-form.is-return-mode #returnMaintenanceSection {
  order: 30;
}

.log-form.is-return-mode #siteSituationSection {
  order: 40;
}

.log-form.is-return-mode #proofInfoSection {
  order: 50;
}

.log-form.is-return-mode .note-voice-field {
  display: none;
}

.log-form.is-return-mode #returnCustomerTimelineSection {
  order: 60;
}

.log-form.is-return-mode #customerInfoSection {
  order: 70;
}

.log-form.is-return-mode #identityCheckPanel {
  order: 80;
}

.log-form.is-return-mode .form-actions {
  order: 90;
}

.log-form.is-return-mode #draftStatus {
  order: 100;
}

.log-form.is-return-mode #employeeDraftTray {
  order: 110;
}

.return-section-note {
  color: #9a5a16;
  font-size: 12px;
  font-weight: 800;
}

.form-section-store {
  background: #f7fbff;
  border-color: #9ec5fe;
}

.form-section-rest {
  background: #f8fbff;
  border-color: #9ec5fe;
}

.rest-section-note {
  color: #4b6b91;
  font-size: 12px;
  font-weight: 800;
}

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

.form-section-closed {
  background: #f7fbf8;
  border-color: #a7dfbf;
}

.form-section-after-sale {
  background: #f8fbff;
  border-color: #b8d3f5;
}

.form-section-installed-paid {
  background: #f6fdf9;
  border-color: #8fd7b4;
}

.form-section-site {
  background: #f8fff9;
  border-color: #bfe3ce;
}

.form-section-proof {
  background: #f9fafc;
}

.form-section-body {
  display: grid;
  gap: 12px;
}

.form-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.form-section-head strong {
  color: #123052;
  font-size: 15px;
}

.section-title-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.customer-source-badge {
  color: #dc2626;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.2;
}

.section-toggle {
  border: 1px solid #c9d8eb;
  border-radius: 8px;
  min-height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #29415f;
  font-weight: 800;
}

.section-toggle i {
  font-style: normal;
  color: var(--muted);
}

.form-section.is-collapsed .form-section-head {
  padding-bottom: 0;
  border-bottom: 0;
}

.old-customer-cascade {
  position: relative;
}

.cascade-trigger {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.cascade-trigger b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.cascade-trigger i {
  color: var(--muted);
  font-style: normal;
  font-size: 20px;
  line-height: 1;
}

.cascade-menu {
  position: absolute;
  z-index: 12;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  padding: 10px;
  display: block;
  background: #fff;
  box-shadow: 0 18px 36px rgba(30, 41, 59, 0.16);
}

.customer-cascade-panel {
  display: grid;
  gap: 8px;
}

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

.old-template-switch button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 6px;
  background: #f8fafc;
  color: #29415f;
  font-size: 14px;
  font-weight: 800;
}

.old-template-switch button.active {
  border-color: #8fb5ee;
  background: var(--blue-soft);
  color: #0f3d75;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.old-template-workarea,
.customer-template-panel {
  display: grid;
  gap: 8px;
}

.lifecycle-template-controls:empty {
  display: none;
}

.cascade-level {
  display: grid;
  align-content: start;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
}

.cascade-level strong {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 4px 2px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
}

.cascade-level button {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 8px 10px;
  display: grid;
  gap: 3px;
  text-align: left;
  background: #f8fafc;
  color: #29415f;
}

.cascade-level button.active {
  border-color: #9bbcf3;
  background: var(--blue-soft);
  color: #0f3d75;
  font-weight: 800;
}

.cascade-level button span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.resource-search-panel {
  display: grid;
  gap: 8px;
}

.resource-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.resource-result-summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.resource-result-list,
.customer-result-list {
  display: grid;
  gap: 7px;
  max-height: 320px;
  overflow: auto;
}

.resource-result-card,
.customer-result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 64px;
  padding: 9px 10px;
  display: grid;
  gap: 3px;
  text-align: left;
  color: #29415f;
  background: #f8fafc;
}

.customer-result-card {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  padding: 8px;
}

.customer-result-open {
  min-width: 0;
  border: 0;
  padding: 2px 4px;
  display: grid;
  gap: 3px;
  text-align: left;
  color: inherit;
  background: transparent;
}

.resource-result-card strong,
.customer-result-card strong {
  font-size: 15px;
  color: #123052;
}

.resource-result-card span,
.resource-result-card small,
.customer-result-card span,
.customer-result-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.resource-result-card.active,
.customer-result-card.active {
  color: #0f3d75;
  border-color: #9bbcf3;
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
}

.button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}

.button {
  padding: 0 14px;
}

.button:disabled,
.segmented button:disabled,
.contact-type-switch button:disabled,
.section-toggle:disabled,
.cascade-trigger:disabled,
.upload-add-tile:disabled,
.upload-remove:disabled,
.upload-replace-button:disabled,
.draft-delete-button:disabled,
.resource-result-card:disabled,
.customer-result-card:disabled {
  cursor: not-allowed;
  filter: grayscale(0.18);
}

.icon-button {
  width: 42px;
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.button.primary {
  background: var(--blue);
  color: #fff;
}

.button.draft {
  background: var(--amber-soft);
  color: #92400e;
  border-color: #f8d58a;
}

.button.secondary {
  background: #fff;
  color: #29415f;
  border-color: var(--line);
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(30, 41, 59, 0.08);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.metric strong {
  font-size: 30px;
}

.metric small {
  display: block;
  color: var(--green);
  margin-top: 8px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 14px;
}

#view-field .two-column {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
  align-items: start;
}

.employee-entry-panel {
  order: 0;
}

.quick-audio-panel {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px;
  max-width: 720px;
  margin: 0 auto 14px;
  background: #f8fbff;
  display: grid;
  gap: 10px;
}

.quick-audio-panel.is-collapsed {
  padding: 10px 12px;
  gap: 0;
}

.quick-audio-panel.is-collapsed .quick-audio-actions,
.quick-audio-panel.is-collapsed .quick-audio-body,
.quick-audio-panel.is-collapsed .quick-audio-head small {
  display: none;
}

.quick-audio-panel.is-collapsed .quick-audio-head {
  align-items: center;
}

.quick-audio-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.quick-audio-head h2 {
  font-size: 18px;
}

.quick-audio-head small {
  display: block;
  margin-top: 4px;
}

.quick-audio-library-button {
  min-height: 30px;
  border: 1px solid #c9d8eb;
  border-radius: 8px;
  background: #fff;
  color: #23496e;
  font-weight: 800;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.quick-audio-library-button:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}

.quick-audio-library-button b {
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #087f5b;
  background: #e4f8ef;
  font-size: 10px;
}

.quick-audio-head small,
.quick-audio-status,
.quick-audio-clip small,
.quick-audio-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.quick-audio-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
}

.quick-audio-button {
  min-height: 44px;
  justify-content: center;
}

.quick-audio-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.quick-audio-button.is-recording {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff1f2;
}

.quick-audio-status {
  min-height: 20px;
  font-weight: 800;
}

.quick-audio-status.recording {
  color: #b91c1c;
}

.quick-audio-summary {
  color: #4d647e;
  font-size: 12px;
  line-height: 1.5;
}

.quick-audio-pool {
  display: grid;
  gap: 8px;
}

.quick-audio-body {
  display: grid;
  gap: 8px;
}

.quick-audio-clip {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.quick-audio-clip strong {
  color: #123052;
  font-size: 14px;
}

.quick-audio-clip-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.audio-archive-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 800;
}

.audio-archive-status.unbound {
  color: #9a4f04;
  background: #fff0d5;
}

.audio-archive-status.bound {
  color: #087f5b;
  background: #e4f8ef;
}

.quick-audio-clip audio {
  width: 100%;
}

.quick-audio-clip-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.audio-archive-protect {
  display: grid;
  place-items: center;
  min-height: 42px;
  color: #087f5b;
  border: 1px solid #afe3ce;
  border-radius: 8px;
  background: #f0fdf6;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  padding: 6px;
}

.quick-audio-empty {
  border: 1px dashed #bfdbfe;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.audio-library-group {
  display: grid;
  gap: 7px;
}

.audio-library-group + .audio-library-group {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.audio-library-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #23496e;
}

.audio-library-group > header span {
  color: var(--muted);
  font-size: 12px;
}

.audio-library-list {
  display: grid;
  gap: 6px;
}

.audio-library-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.audio-library-row:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.audio-library-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.audio-library-name {
  overflow: hidden;
  color: #123052;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-library-more {
  width: 100%;
}

.audio-library-detail {
  display: grid;
  gap: 12px;
}

.audio-library-detail audio {
  width: 100%;
}

.audio-library-detail > small {
  color: var(--muted);
  font-size: 12px;
}

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

.audio-bind-panel {
  display: grid;
  gap: 14px;
}

.audio-bind-clip {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
  display: grid;
  gap: 4px;
}

.audio-bind-clip strong,
.audio-bind-step strong {
  color: #123052;
}

.audio-bind-clip span,
.audio-bind-step small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.audio-bind-current {
  border: 1px solid #afe3ce;
  border-radius: 8px;
  padding: 10px;
  color: #087f5b;
  background: #f0fdf6;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.audio-bind-new-draft {
  display: block;
  margin-top: 8px;
  border: 0;
  padding: 0;
  color: #0f5bc8;
  background: transparent;
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

.audio-bind-step {
  display: grid;
  gap: 8px;
}

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

.audio-bind-choice-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audio-bind-choice {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 48px;
  padding: 8px;
  background: #fff;
  color: #123052;
  font-weight: 900;
}

.audio-bind-choice.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.audio-bind-select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: #123052;
  font-size: 15px;
  font-weight: 800;
  background: #fff;
}

.audio-bind-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.compact-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel-wide {
  min-height: 360px;
}

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

.form-panel-head {
  align-items: center;
}

.official-build-marker {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-top: 7px;
  padding: 2px 8px;
  border: 1px solid #a7d8bf;
  border-radius: 999px;
  color: #087b56;
  background: #effbf4;
  font-size: 11px;
  font-weight: 800;
}

.is-hidden {
  display: none !important;
}

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

.daily-task-panel {
  max-width: 720px;
  margin: 0 auto 14px;
  border-color: #cfe0f7;
  background: #f8fbff;
}

.outreach-plan {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #cfe1f7;
  border-radius: 8px;
  background: #f8fbff;
}

.outreach-plan-head,
.outreach-plan-result,
.outreach-customer-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.outreach-plan-head span,
.outreach-plan-hint,
.outreach-plan-result span,
.outreach-customer-list small {
  color: var(--muted);
  font-size: 12px;
}

.outreach-plan-selects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.outreach-plan-selects label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.outreach-plan-selects .outreach-period-field {
  grid-column: 1 / -1;
}

.outreach-plan-selects select,
.outreach-plan-selects input {
  min-width: 0;
  min-height: 38px;
}

.outreach-plan-selects .outreach-period-field select {
  min-height: 48px;
  padding: 8px 12px;
  touch-action: manipulation;
}

.outreach-plan-selects .outreach-period-field select:not(:disabled) {
  cursor: pointer;
}

.outreach-plan-selects .outreach-period-field select:disabled {
  cursor: not-allowed;
}

.outreach-period-field small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.outreach-plan-selects select[multiple] {
  min-height: 82px;
}

.outreach-plan-selects small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.outreach-plan-result {
  margin-top: 10px;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 6px;
  background: #e7f8f0;
  color: #087f5b;
}

.outreach-customer-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.outreach-customer-list article {
  padding: 8px 0;
  border-top: 1px solid #dbe7f5;
}

.outreach-customer-list article > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.outreach-customer-list button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #9bbcf3;
  border-radius: 6px;
  background: #fff;
  color: #17427a;
  font-weight: 800;
}

.outreach-empty {
  padding-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.daily-task-head > div:first-child {
  min-width: 0;
  width: 100%;
}

.daily-task-panel.is-collapsed .daily-task-head {
  margin-bottom: 0;
}

.daily-task-head small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.daily-work-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.daily-work-mode select {
  min-height: 32px;
  padding: 4px 28px 4px 8px;
}

.daily-work-types {
  min-width: 0;
}

.daily-task-controls {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.daily-work-type-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.daily-work-type-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 3px 5px;
  border: 1px solid #cfe0f7;
  border-radius: 7px;
  color: #315274;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.daily-work-type-option.is-selected {
  border-color: #2563eb;
  color: #0f3d75;
  background: #eaf2ff;
}

.daily-work-type-option input,
.daily-partner-list input {
  accent-color: #2563eb;
}

.daily-partner-plan {
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid #cfe1f7;
  border-radius: 7px;
  background: #fff;
}

.daily-partner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.daily-partner-head span,
.daily-partner-list small {
  color: var(--muted);
  font-size: 12px;
}

.daily-partner-list {
  display: grid;
  gap: 5px;
  margin-top: 7px;
}

.daily-partner-list label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid #e0eaf5;
  border-radius: 6px;
}

.daily-task-body {
  display: grid;
  gap: 10px;
}

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

.daily-task-card {
  border: 1px solid #dbe7f5;
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px 12px;
  background: #fff;
}

.daily-task-card.warn {
  border-left-color: #c47a18;
  background: #fffaf0;
}

.daily-task-card.good {
  border-left-color: #10a37f;
  background: #f8fffb;
}

.daily-task-priority {
  border-radius: 999px;
  padding: 6px 8px;
  align-self: start;
  color: #0f3d75;
  background: #eff6ff;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.daily-task-card.warn .daily-task-priority {
  color: #92400e;
  background: #ffedd5;
}

.daily-task-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.daily-task-copy strong {
  color: #123052;
  font-size: 16px;
}

.daily-task-copy p,
.daily-task-coach p {
  margin: 0;
  color: #334155;
  line-height: 1.55;
}

.daily-task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.daily-task-tags span {
  border: 1px solid #dbe7f5;
  border-radius: 999px;
  padding: 4px 8px;
  color: #475569;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.daily-task-coach {
  grid-column: 2;
  border: 1px dashed #bfdbfe;
  border-radius: 8px;
  padding: 9px 10px;
  display: grid;
  gap: 5px;
  background: #f8fbff;
}

.daily-task-coach b {
  color: #0f3d75;
  font-size: 13px;
}

.daily-task-actions {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.daily-task-actions button {
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  min-height: 38px;
  padding: 0 10px;
  color: #0f3d75;
  background: #fff;
  font-weight: 900;
}

.daily-task-actions button.primary {
  border-color: #2563eb;
  color: #fff;
  background: #2563eb;
}

.daily-task-empty {
  border: 1px dashed #afe3ce;
  border-radius: 8px;
  padding: 13px;
  display: grid;
  gap: 4px;
  color: #087f5b;
  background: var(--green-soft);
}

.daily-task-empty span {
  color: #47636b;
}

.segmented {
  position: relative;
  z-index: 2;
  display: flex;
  padding: 3px;
  gap: 3px;
  background: #edf2f7;
  border-radius: 8px;
}

.segmented button {
  border: 1px solid transparent;
  border-radius: 6px;
  min-width: 56px;
  padding: 7px 10px;
  color: #29415f;
  background: transparent;
  font-weight: 900;
  cursor: pointer;
  pointer-events: auto;
}

.segmented button.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.26);
}

/* 员工填报里的蓝色只留给下一步动作；当前页面和资料分类只作轻量定位。 */
body[data-role="employee"] .employee-entry-panel .segmented button.active,
body[data-role="employee"] .employee-entry-panel .contact-type-switch button.active {
  color: #17427a;
  border-color: #9ec5fe;
  background: #eaf3ff;
  box-shadow: inset 0 -2px 0 #2563eb;
}

.visit-mode-more {
  position: relative;
  min-width: 96px;
}

.visit-mode-more summary {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 7px 10px;
  display: grid;
  place-items: center;
  color: #52637a;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.visit-mode-more summary::-webkit-details-marker {
  display: none;
}

.visit-mode-more.active summary,
.visit-mode-more[open] summary {
  color: #fff;
  border-color: #475569;
  background: #475569;
}

.visit-mode-more > div {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  width: max-content;
  min-width: 168px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  display: grid;
  gap: 6px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

.visit-mode-more:not([open]) > div {
  display: none;
}

.visit-mode-more > div button {
  width: 100%;
  justify-content: flex-start;
  color: #475569;
  background: #f8fafc;
}

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

.contact-type-top {
  padding: 4px;
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  background: #f8fbff;
}

.contact-type-switch button {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  background: #fff;
  color: #29415f;
  font-weight: 900;
}

.contact-type-switch button.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.26);
}

.native-state-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.store-result-note {
  color: #4b6b91;
  font-size: 12px;
  font-weight: 800;
}

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

.store-result-grid button,
.store-contact-grid button {
  min-height: 58px;
  border: 1px solid #c7d7ed;
  border-radius: 8px;
  padding: 9px 8px;
  display: grid;
  gap: 3px;
  background: #fff;
  color: #27435f;
  text-align: left;
}

.store-result-grid button.active,
.store-contact-grid button.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.store-result-grid strong {
  font-size: 15px;
}

.store-result-grid span {
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  opacity: 0.9;
}

.store-contact-choice {
  display: grid;
  gap: 7px;
}

.store-contact-choice > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.store-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.store-contact-grid button {
  min-height: 44px;
  place-items: center;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
}

.scroll-picker {
  position: relative;
  display: grid;
  gap: 6px;
}

.scroll-picker-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.scroll-picker-trigger {
  width: 100%;
  min-height: 50px;
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.scroll-picker-trigger:focus-visible {
  border-color: var(--blue);
  outline: 3px solid rgba(37, 99, 235, 0.18);
}

.scroll-picker-trigger b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.scroll-picker-trigger i {
  color: var(--muted);
  font-style: normal;
  font-size: 20px;
}

.scroll-picker-trigger.is-disabled {
  color: #94a3b8;
  background: #f8fafc;
}

.scroll-picker-menu {
  position: absolute;
  z-index: 15;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 238px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  padding: 7px;
  display: grid;
  gap: 6px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(30, 41, 59, 0.18);
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.scroll-picker-menu button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  color: #29415f;
  background: #f8fafc;
  text-align: left;
  font-weight: 800;
}

.scroll-picker-menu button.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.custom-property-field,
.custom-result-field {
  margin-top: -2px;
}

.custom-result-field {
  grid-column: 1 / -1;
}

.contact-level-row {
  margin-top: 12px;
}

.route-map {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(14, 116, 144, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(14, 116, 144, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, #f8fbff 0%, #eef7f0 50%, #fff8eb 100%);
  background-size: 42px 42px, 42px 42px, auto;
}

.map-zone {
  position: absolute;
  border: 1px dashed rgba(30, 64, 175, 0.28);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.68);
  color: #31516f;
  font-size: 12px;
  font-weight: 700;
}

.map-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.22);
}

.map-pin[data-risk="true"] {
  background: var(--red);
}

.map-pin[data-status="paused"] {
  background: var(--amber);
}

.route-line {
  position: absolute;
  left: 12%;
  right: 11%;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--amber));
  transform: rotate(-8deg);
  opacity: 0.5;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.badge.good {
  color: var(--green);
  background: var(--green-soft);
}

.badge.warn {
  color: var(--amber);
  background: var(--amber-soft);
}

.badge.danger {
  color: var(--red);
  background: var(--red-soft);
}

.badge.info {
  color: var(--cyan);
  background: #e4f6fb;
}

button.badge {
  border: 0;
  cursor: pointer;
  font: inherit;
}

button.badge:hover,
button.badge:focus-visible {
  filter: brightness(0.96);
  outline: 2px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.warning-list,
.timeline,
.employee-grid,
.staff-list,
.lead-board {
  display: grid;
  gap: 12px;
}

.warning-item,
.timeline-item,
.employee-card,
.staff-row,
.lead-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.warning-item {
  border-left: 4px solid var(--red);
}

.warning-item.warn {
  border-left-color: var(--amber);
}

.warning-item.good {
  border-left-color: var(--green);
}

.warning-item.info {
  border-left-color: var(--blue);
}

.script-feedback-panel {
  display: grid;
  gap: 10px;
}

.ai-asset-panel {
  display: grid;
  gap: 10px;
}

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

.ai-asset-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: #fff;
}

.ai-asset-card.good {
  border-color: #afe3ce;
  background: var(--green-soft);
}

.ai-asset-card.warn {
  border-color: #f8d58a;
  background: var(--amber-soft);
}

.ai-asset-card span,
.ai-asset-card small,
.ai-asset-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.ai-asset-card b {
  color: #123052;
  font-size: 24px;
  line-height: 1;
}

.ai-asset-note {
  border: 1px dashed #bfdbfe;
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
}

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

.script-feedback-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: #fff;
}

.script-feedback-card.good {
  border-color: #afe3ce;
  background: var(--green-soft);
}

.script-feedback-card.warn {
  border-color: #f8d58a;
  background: var(--amber-soft);
}

.script-feedback-card.danger {
  border-color: #f2b8b8;
  background: var(--red-soft);
}

.script-feedback-card span,
.script-feedback-card small,
.script-feedback-row small,
.script-feedback-empty span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.script-feedback-card b {
  color: #123052;
  font-size: 24px;
  line-height: 1;
}

.script-feedback-list,
.script-feedback-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  display: grid;
  gap: 8px;
  background: #fff;
}

.script-feedback-list > strong,
.script-feedback-empty strong {
  color: #123052;
  font-size: 14px;
}

.script-feedback-row {
  display: grid;
  gap: 2px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding-top: 7px;
}

.script-feedback-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.script-feedback-row span {
  color: #29415f;
  font-weight: 800;
}

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

.warning-item strong,
.timeline-item strong,
.lead-card strong,
.employee-card strong {
  display: block;
  margin-bottom: 5px;
}

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

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 52px 1fr 32px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.bar-track,
.progress-track {
  height: 10px;
  background: #edf2f7;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill,
.progress-fill {
  display: block;
  height: 100%;
  width: var(--value);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.progress-head b {
  color: var(--ink);
}

.timeline-item {
  display: grid;
  grid-template-columns: 82px 1fr auto;
  gap: 12px;
  align-items: start;
}

.timeline-time {
  color: var(--muted);
  font-weight: 800;
}

.duration-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  padding: 4px 0;
  min-width: 54px;
  text-align: right;
}

.duration-link:hover,
.duration-link:focus-visible {
  color: var(--blue);
  text-decoration: underline;
  outline: none;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.draft-status {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.45;
}

.draft-status.success {
  color: #087f5b;
  border-color: #afe3ce;
  background: var(--green-soft);
}

.draft-status.saving {
  color: #0f3d75;
  border-color: #bfd4ee;
  background: var(--blue-soft);
}

.draft-status.warn {
  color: #92400e;
  border-color: #f8d58a;
  background: var(--amber-soft);
}

.identity-check-panel {
  border: 1px solid #f3c783;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 10px;
  background: #fff7ed;
}

.identity-check-panel.is-hidden {
  display: none;
}

.identity-check-panel.info {
  border-color: #8cc6f7;
  background: #eff8ff;
}

.identity-check-copy {
  display: grid;
  gap: 4px;
}

.identity-check-copy strong {
  color: #7c2d12;
  font-size: 15px;
}

.identity-check-panel.info .identity-check-copy strong {
  color: #0b5c9f;
}

.identity-check-copy span {
  color: #5d4b35;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.identity-check-copy small {
  color: #8a5a19;
  font-size: 12px;
  line-height: 1.35;
}

.identity-check-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.identity-check-actions .button {
  min-height: 42px;
  padding: 8px 6px;
  font-size: 13px;
}

.identity-check-actions .button.primary {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.identity-check-actions .button.secondary {
  border-color: #e16f2b;
  background: #fff;
  color: #a44812;
}

.identity-check-actions .button.draft {
  border-color: #8cc6f7;
  background: #fff;
  color: #0b5c9f;
}

.identity-check-link {
  width: 100%;
  min-height: 40px;
  border: 1px solid #8cc6f7;
  border-radius: 8px;
  color: #0b5c9f;
  background: #fff;
  font-size: 14px;
  font-weight: 900;
}

.form-edit-gate {
  border: 1px solid #f3c783;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #7c2d12;
  background: #fff7ed;
  line-height: 1.35;
}

.form-edit-gate strong {
  flex: 0 0 auto;
  font-size: 14px;
}

.form-edit-gate span {
  color: #9a5a16;
  font-size: 13px;
  font-weight: 800;
}

.form-edit-gate.is-hidden {
  display: none;
}

.log-form.is-locked .contact-type-switch,
.log-form.is-locked .form-section,
.log-form.is-locked .button:not(#newEntry),
.log-form.is-locked .draft-status {
  opacity: 0.58;
}

.log-form.is-locked .draft-quick-panel {
  opacity: 1;
}

.log-form.is-locked.is-return-picking .contact-type-switch,
.log-form.is-locked.is-return-picking #oldCustomerSection,
.log-form.is-locked.is-return-picking #returnVisitRecordsSection,
.log-form.is-locked.is-return-picking #returnCustomerTimelineSection {
  opacity: 1;
}

.log-form.is-closed-mode .form-edit-gate,
.log-form.is-closed-mode .contact-type-switch,
.log-form.is-closed-mode .form-section:not(#closedCustomerSection),
.log-form.is-closed-mode .form-actions,
.log-form.is-closed-mode .draft-status,
.log-form.is-closed-mode .draft-quick-panel {
  display: none !important;
}

.log-form.is-closed-mode #closedCustomerSection {
  opacity: 1;
}

.log-form.is-after-sale-mode .form-edit-gate,
.log-form.is-after-sale-mode .contact-type-switch,
.log-form.is-after-sale-mode .form-section:not(#afterSaleSection),
.log-form.is-after-sale-mode .form-actions,
.log-form.is-after-sale-mode .draft-status,
.log-form.is-after-sale-mode .draft-quick-panel {
  display: none !important;
}

.log-form.is-after-sale-mode #afterSaleSection {
  opacity: 1;
}

.log-form.is-installed-paid-mode .form-edit-gate,
.log-form.is-installed-paid-mode .contact-type-switch,
.log-form.is-installed-paid-mode .form-section:not(#installedPaidSection),
.log-form.is-installed-paid-mode .form-actions,
.log-form.is-installed-paid-mode .draft-status,
.log-form.is-installed-paid-mode .draft-quick-panel {
  display: none !important;
}

.log-form.is-installed-paid-mode #installedPaidSection {
  opacity: 1;
}

.log-form.is-locked #newEntry {
  color: #fff;
  border-color: #d97706;
  background: #d97706;
  box-shadow: 0 8px 18px rgba(146, 64, 14, 0.18);
}

.log-form.is-return-mode #newEntry {
  display: none;
}

.log-form.is-rest-mode #newEntry,
.log-form.is-rest-mode .contact-type-switch {
  display: none;
}

.log-form.is-rest-mode .form-actions .button {
  flex: 1 1 calc(50% - 4px);
}

.log-form.is-rest-mode .form-actions .button.primary {
  flex-basis: calc(50% - 4px);
}

.log-form.is-store-mode .contact-type-switch {
  display: none;
}

.draft-quick-panel {
  border: 1px solid #f4c979;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #fffaf0;
}

.draft-submit-note {
  border: 1px solid #afe3ce;
  border-radius: 8px;
  padding: 8px 10px;
  color: #087f5b;
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.draft-quick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #8a4b12;
  font-size: 13px;
  font-weight: 900;
}

.draft-quick-head span {
  color: #a06623;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.draft-quick-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding-right: 2px;
}

.draft-quick-card {
  position: relative;
  width: 100%;
  border: 1px solid #f3d39c;
  border-radius: 8px;
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: center;
  gap: 8px;
  text-align: left;
  background: #fff;
  color: #29415f;
  overflow: hidden;
}

.draft-quick-card.no-delete {
  grid-template-columns: minmax(0, 1fr);
}

.draft-quick-open {
  width: 100%;
  min-height: 74px;
  border: 0;
  padding: 10px 0 10px 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 106px;
  align-items: center;
  gap: 8px;
  text-align: left;
  color: inherit;
  background: transparent;
}

.draft-quick-card.no-delete .draft-quick-open {
  padding-right: 11px;
}

.draft-quick-main,
.draft-quick-card b,
.draft-quick-card small,
.draft-quick-action,
.draft-quick-action strong {
  display: block;
}

.draft-quick-main {
  min-width: 0;
}

.draft-quick-card b {
  color: #123052;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-quick-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.draft-quick-action {
  justify-self: end;
  display: grid;
  justify-items: end;
  gap: 4px;
}

.draft-quick-action strong {
  min-height: 26px;
  border: 1px solid #f3d39c;
  border-radius: 999px;
  padding: 4px 8px;
  text-align: center;
  color: #92400e;
  background: #fff7ed;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.draft-quick-action small {
  margin: 0;
  color: #9a5a16;
  font-size: 11px;
  white-space: nowrap;
}

.draft-quick-card.active {
  border-color: #d97706;
  background: #ffedd5;
  box-shadow: inset 0 0 0 2px rgba(217, 119, 6, 0.28), 0 8px 16px rgba(146, 64, 14, 0.12);
}

.draft-quick-card.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: #d97706;
}

.draft-quick-card.active b {
  color: #7c2d12;
  font-weight: 900;
}

.draft-quick-card.active .draft-quick-action strong {
  color: #fff;
  border-color: #d97706;
  background: #d97706;
  box-shadow: 0 5px 12px rgba(146, 64, 14, 0.18);
}

.draft-delete-button {
  align-self: stretch;
  min-width: 44px;
  margin: 8px 8px 8px 0;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0;
  color: #b91c1c;
  background: #fff5f5;
  font-size: 12px;
  font-weight: 900;
}

.draft-delete-button:hover {
  border-color: #ef4444;
  background: #fee2e2;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.switch span {
  width: 42px;
  height: 24px;
  padding: 3px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s ease;
}

.switch span::after {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.switch input:checked + span {
  background: var(--green);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.employee-card header,
.staff-row header,
.lead-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.avatar-line {
  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: #1f4f8f;
  font-weight: 900;
}

.tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  text-decoration: none;
}

button.tag {
  cursor: pointer;
}

button.tag:hover,
button.tag:focus-visible {
  color: #0f3d75;
  border-color: #9bbcf3;
  background: var(--blue-soft);
  outline: none;
}

button.tag.danger {
  color: #b42318;
  border-color: #fda29b;
  background: #fff5f5;
}

.staff-row > [data-reset-employee-password] {
  float: right;
  margin: 0 0 8px 8px;
}

.field-status {
  border: 1px dashed #cbd7e6;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.45;
}

.field-status.success {
  color: #087f5b;
  border-color: #afe3ce;
  background: var(--green-soft);
}

.field-status.warn {
  color: #92400e;
  border-color: #f8d58a;
  background: var(--amber-soft);
}

.field-status strong {
  display: block;
  color: inherit;
  margin-bottom: 4px;
}

.field-status small {
  display: block;
  color: inherit;
  opacity: 0.86;
  line-height: 1.5;
}

.tag.draft-tag {
  color: #92400e;
  border-color: #f8d58a;
  background: var(--amber-soft);
}

button.tag.draft-tag:hover,
button.tag.draft-tag:focus-visible {
  color: #7c2d12;
  border-color: #f59e0b;
  background: #fff7ed;
}

.wechat-proof-button.has-proof {
  color: #087f5b;
  border-color: #afe3ce;
  background: var(--green-soft);
  font-weight: 800;
}

.wechat-proof-button.missing-proof {
  color: #7c8797;
  border-style: dashed;
}

.log-form {
  display: grid;
  gap: 14px;
  padding-bottom: var(--draft-open-scroll-room, 0px);
}

.mobile-form-context {
  display: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.custom-address-row {
  margin-top: 10px;
}

.field-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.follow-choice-field,
.follow-summary-field,
.follow-extra-panel {
  grid-column: 1 / -1;
}

.follow-record-context {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #f3c783;
  border-radius: 7px;
  background: #fff4e5;
}

.follow-record-context span {
  color: #81521c;
  font-size: 12px;
  font-weight: 800;
}

.follow-record-context strong {
  color: #1d4d87;
  font-size: 14px;
}

.follow-record-context small {
  color: #725d42;
  font-size: 12px;
}

.breakthrough-optional-section {
  grid-column: 1 / -1;
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  background: #f8fbff;
  overflow: hidden;
}

.breakthrough-optional-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #dbe7f5;
}

.breakthrough-optional-head > div {
  display: grid;
  gap: 3px;
}

.breakthrough-optional-head strong {
  color: #173b68;
  font-size: 14px;
}

.breakthrough-optional-head small {
  color: var(--muted);
  font-size: 11px;
}

.breakthrough-toggle {
  flex: 0 0 auto;
}

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

.breakthrough-optional-body .field {
  min-width: 0;
}

.breakthrough-optional-body .small-supervisor-field {
  grid-column: 1 / -1;
}

.choice-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-chip {
  border: 1px solid #dbe7f5;
  border-radius: 999px;
  min-height: 34px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #29415f;
  background: #f8fbff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.choice-chip:has(input:checked) {
  border-color: #2563eb;
  color: #0f3d75;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.choice-chip input {
  width: 14px;
  height: 14px;
  accent-color: var(--blue);
}

.small-supervisor-field {
  border-top: 1px solid #e7eef8;
  padding-top: 10px;
}

.small-supervisor-field > span {
  display: block;
  margin-bottom: 4px;
  color: #173b68;
  font-size: 13px;
  font-weight: 900;
}

.field-help {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.follow-summary-field textarea {
  min-height: 78px;
  resize: vertical;
}

.follow-extra-panel {
  border: 1px dashed #cfe0f7;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 10px;
  background: #f8fbff;
}

.follow-extra-panel summary {
  color: #0f3d75;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.follow-extra-panel[open] summary {
  margin-bottom: 8px;
}

.guide-summary-field {
  grid-column: 1 / -1;
}

.guide-summary-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.guide-summary-label b {
  font-size: 13px;
}

.guide-summary-label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.guide-summary-label small.warn {
  color: #b91c1c;
}

.guide-summary-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: stretch;
}

.guide-summary-input.note-summary-input {
  grid-template-columns: minmax(0, 1fr);
}

.note-summary-input {
  grid-template-columns: minmax(0, 1fr);
}

.guide-summary-input textarea {
  min-height: 92px;
  max-height: 180px;
  overflow-y: auto;
  resize: none;
}

.voice-mic-button {
  width: 44px;
  min-height: 44px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.voice-mic-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.voice-mic-button:hover,
.voice-mic-button:focus-visible {
  background: #1d4ed8;
}

.wechat-script-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.secondary-action {
  min-height: 40px;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  color: #0f4c9a;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.secondary-action:disabled {
  color: #94a3b8;
  border-color: #dbe3ee;
  background: #f8fafc;
  cursor: not-allowed;
}

.guide-summary-confirmation {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.guide-summary-confirmation strong {
  color: #0f3d75;
  font-size: 13px;
}

.guide-summary-confirmation p {
  margin: 0;
  max-height: 180px;
  overflow-y: auto;
  color: #29415f;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.summary-confirm-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 8px;
}

.primary-action {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #2563eb;
  border-radius: 8px;
  color: #fff;
  background: #2563eb;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.summary-confirmed {
  color: #047857;
  font-size: 12px;
  font-weight: 900;
}

.wechat-script-preview {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f8fbff;
}

.wechat-script-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wechat-script-preview-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.script-preview-action {
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #fff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.script-preview-action:hover {
  background: #eff6ff;
}

.wechat-script-preview.is-collapsed .wechat-script-option {
  display: none;
}

.wechat-script-preview > strong {
  color: #173b68;
  font-size: 13px;
}

.wechat-script-option {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  padding: 8px;
  border: 1px solid #dbe7f5;
  border-radius: 7px;
  color: #29415f;
  background: #fff;
  text-align: left;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}

.wechat-script-option .wechat-script-label {
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
}

.wechat-script-option > span:last-child {
  grid-column: 2;
}

.wechat-script-option b {
  color: #2563eb;
}

.wechat-script-option.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.form-section-return-records .form-section-head {
  align-items: flex-start;
}

.return-record-heading,
.return-section-heading {
  display: grid;
  gap: 3px;
}

.section-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.return-record-count {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 5px 9px;
  color: #0f3d75;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.return-record-summary {
  border: 1px solid #afe3ce;
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  color: #087f5b;
  background: var(--green-soft);
  font-weight: 900;
}

.return-record-summary.warn {
  border-color: #f8d58a;
  color: #92400e;
  background: var(--amber-soft);
}

.return-record-summary strong {
  font-size: 15px;
}

.return-record-summary span {
  font-size: 13px;
  line-height: 1.45;
}

.return-record-strip {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 8px;
  overflow: visible;
  padding: 2px;
}

.return-record-card {
  min-width: 0;
  overflow: hidden;
  min-height: 58px;
  border: 1px solid #cfe1f7;
  border-radius: 8px;
  padding: 7px;
  display: grid;
  gap: 4px;
  align-content: start;
  color: #123052;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 61, 117, 0.06);
  text-align: left;
  font-family: inherit;
}

.return-record-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.return-record-card-head b {
  color: #1d4ed8;
  font-size: 12px;
}

.return-record-card-head span,
.return-record-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.return-record-card strong {
  color: #0f2f57;
  font-size: 13px;
  line-height: 1.35;
}

.return-record-source {
  display: inline-block;
  margin: 4px 0 3px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #2167c5;
  background: #dcecff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.return-record-card em {
  color: #44546a;
  font-size: 11px;
  font-style: normal;
  line-height: 1.45;
}

.return-record-empty,
.return-record-empty-card {
  border-style: dashed;
  background: #f8fbff;
  box-shadow: none;
}

.return-record-empty {
  min-height: 92px;
  border: 1px dashed #bfdbfe;
  border-radius: 8px;
  padding: 14px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.return-record-add {
  border: 1px dashed #2563eb;
  justify-items: center;
  align-content: center;
  text-align: center;
  cursor: pointer;
  background: #eff6ff;
}

.return-record-add:hover,
.return-record-add:focus-visible {
  border-color: #1d4ed8;
  background: #dbeafe;
}

.return-record-add.is-active {
  border-color: #10b981;
  color: #047857;
  background: #ecfdf5;
}

.return-record-add.is-active .return-record-plus {
  background: #10b981;
}

.return-record-add.is-pending {
  border-color: #f59e0b;
  color: #92400e;
  background: #fffbeb;
}

.return-record-add.is-pending .return-record-plus {
  background: #f59e0b;
}

.return-record-plus {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}

.return-record-placeholder {
  min-height: 1px;
}

.form-row.wechat-quick-row {
  grid-template-columns: minmax(112px, 0.72fr) minmax(0, 1.28fr);
}

.form-row.contact-detail-grid {
  grid-template-columns: minmax(112px, 0.72fr) minmax(0, 1fr) minmax(118px, 0.86fr);
}

.contact-detail-grid .contact-type-field {
  order: 1;
}

.contact-detail-grid .contact-level-field {
  order: 2;
}

.contact-detail-grid .channel-custom-field {
  order: 3;
}

.contact-detail-grid .contact-name-field {
  order: 2;
}

.contact-detail-grid .customer-referral-field {
  order: 3;
}

.contact-detail-grid .room-field {
  order: 4;
}

.contact-detail-grid .contact-phone-field {
  order: 5;
  grid-column: span 2;
}

.contact-detail-grid.resource-mode .contact-name-field {
  order: 4;
}

.contact-detail-grid.resource-mode .contact-phone-field {
  order: 5;
  grid-column: auto;
}

.customer-referral-field select {
  border-color: #f87171;
  background: #fff7ed;
  color: #9f1239;
  font-weight: 900;
}

.readonly-select-value {
  min-height: 50px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  color: #dc2626;
  background: #fff1f2;
  font-size: 17px;
  font-weight: 950;
}

.form-row.site-main-row,
.form-row.site-extra-row {
  grid-template-columns: 1fr 1fr;
}

/* 微信一次常会聊多个话题，用点选标签代替难用的原生多选下拉。 */
#receptionField.wechat-multi-select {
  grid-column: 1 / -1;
}

.wechat-reception-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.wechat-reception-topic {
  position: relative;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  color: #38506f;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.wechat-reception-topic input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wechat-reception-topic:has(input:checked) {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #93c5fd;
}

.wechat-reception-topic:has(input:focus-visible) {
  outline: 3px solid rgba(37, 99, 235, 0.24);
  outline-offset: 2px;
}

.form-row.proof-upload-row {
  grid-template-columns: 1fr 1fr;
  align-items: end;
}

#wechatAvatarStatus {
  min-height: 50px;
  display: grid;
  align-content: center;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.native-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.proof-upload-stack {
  display: grid;
  gap: 12px;
}

.audio-capture-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.audio-record-button {
  min-height: 38px;
  padding: 0 12px;
}

.audio-record-button svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.audio-record-button.is-recording {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff1f2;
}

.upload-field {
  position: relative;
  min-width: 0;
}

.upload-block {
  display: grid;
  gap: 8px;
}

.upload-block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.upload-block-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.upload-block-head small {
  color: #7890aa;
  font-size: 11px;
  line-height: 1.3;
  text-align: right;
}

.upload-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  min-width: 0;
}

.avatar-preview-grid,
.chat-preview-grid {
  grid-template-columns: repeat(auto-fill, minmax(72px, 86px));
}

.audio-preview-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.audio-empty-state {
  grid-column: 1 / -1;
  border: 1px dashed #bfdbfe;
  border-radius: 8px;
  padding: 12px;
  color: #49627f;
  background: #f8fbff;
  font-size: 13px;
  font-weight: 800;
}

.upload-add-tile,
.upload-thumb {
  position: relative;
  aspect-ratio: 1;
  min-height: 72px;
  border-radius: 8px;
  overflow: hidden;
}

.upload-add-tile {
  border: 1px dashed #b7c7dd;
  color: #315174;
  background: #f8fbff;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 800;
}

.upload-add-tile svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.upload-add-tile small {
  color: #7890aa;
  font-size: 10px;
  font-weight: 700;
}

.upload-thumb {
  border: 1px solid #dbe5f1;
  background: #edf4fb;
}

.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.upload-thumb.audio-thumb {
  aspect-ratio: auto;
  min-height: 86px;
  align-content: center;
  padding: 10px;
}

.upload-thumb.audio-thumb audio {
  width: 100%;
  max-width: 100%;
}

.audio-record-thumb {
  display: grid;
  gap: 8px;
  min-height: 134px;
  padding-right: 38px;
}

.audio-name-field {
  display: grid;
  gap: 5px;
}

.audio-name-field span {
  color: #49627f;
  font-size: 12px;
  font-weight: 800;
}

.audio-name-field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #c9d8ec;
  border-radius: 8px;
  padding: 0 10px;
  color: #123052;
  background: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.audio-name-field input:focus {
  border-color: #2563eb;
  outline: 2px solid rgba(37, 99, 235, 0.16);
}

.audio-missing-note {
  color: #7890aa;
  font-size: 12px;
  line-height: 1.45;
}

.upload-thumb.is-placeholder {
  display: grid;
  place-items: center;
  padding: 8px;
  color: #49627f;
  background: #f5f8fc;
  text-align: center;
}

.upload-thumb-label {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border-radius: 6px;
  padding: 3px 4px;
  color: #ffffff;
  background: rgba(15, 38, 68, 0.72);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-thumb.is-placeholder .upload-thumb-label {
  position: static;
  color: #315174;
  background: transparent;
  white-space: normal;
}

.upload-thumb.is-compact-record {
  border-color: #afe3ce;
  background: var(--green-soft);
  color: #087f5b;
  gap: 6px;
}

.upload-thumb.is-compact-record .upload-thumb-label {
  color: #087f5b;
  font-weight: 900;
}

.upload-replace-button {
  border: 1px solid #afe3ce;
  border-radius: 999px;
  min-height: 24px;
  padding: 2px 8px;
  color: #087f5b;
  background: #fff;
  font-size: 11px;
  font-weight: 900;
}

.upload-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 38, 68, 0.76);
  font-size: 18px;
  line-height: 22px;
  font-weight: 800;
  box-sizing: border-box;
  z-index: 2;
  padding: 0;
  display: grid;
  place-items: center;
}

.upload-count-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #0f3d75;
  background: #d9e8ff;
  font-size: 11px;
  font-weight: 900;
}

.form-row.old-customer-row {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.closed-customer-count {
  border: 1px solid #a7dfbf;
  border-radius: 999px;
  padding: 5px 10px;
  color: #087f5b;
  background: #e9fbf1;
  font-size: 12px;
  font-weight: 900;
}

.closed-customer-note {
  border: 1px solid #c4ecd4;
  border-radius: 8px;
  padding: 9px 10px;
  color: #136647;
  background: #effdf5;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.store-transfer-note {
  border: 1px solid #f2c27b;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff7ed;
  color: #7c3d12;
  display: grid;
  gap: 5px;
  line-height: 1.45;
}

.store-transfer-note strong {
  color: #8a3a0a;
  font-size: 14px;
}

.store-transfer-note span {
  color: #29364a;
  font-size: 14px;
  font-weight: 800;
}

.store-transfer-note small {
  color: #8a5a24;
  font-size: 12px;
  font-weight: 800;
}

.closed-customer-search input {
  min-height: 42px;
}

.closed-customer-picker {
  position: relative;
}

.lifecycle-customer-picker {
  position: static;
}

.lifecycle-customer-picker .cascade-trigger {
  min-height: 42px;
  border-color: #9bbcf3;
  background: #eff6ff;
  color: #0f3d75;
}

.lifecycle-customer-picker .cascade-trigger b {
  width: 100%;
  text-align: center;
  font-size: 15px;
}

.lifecycle-section.is-picking .lifecycle-customer-picker .cascade-trigger {
  border-color: var(--blue);
  background: #eaf2ff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
}

.lifecycle-picker-menu {
  position: static;
  left: auto;
  right: auto;
  top: auto;
  margin-top: 8px;
  border-color: #c9dbf2;
  padding: 8px;
  background: #f8fbff;
  box-shadow: none;
}

.lifecycle-section.is-picking .closed-customer-detail,
.lifecycle-section.is-picking .after-sale-detail,
.lifecycle-section.is-picking .installed-paid-detail {
  display: none;
}

.form-section-after-sale.is-picking .after-sale-summary {
  display: none;
}

.form-section-installed-paid.is-picking .installed-paid-summary {
  display: none;
}

.lifecycle-picker-menu .old-template-switch button {
  min-height: 36px;
  font-size: 13px;
  line-height: 1.2;
}

.lifecycle-picker-menu .closed-customer-list,
.lifecycle-picker-menu .after-sale-list,
.lifecycle-picker-menu .installed-paid-list,
.lifecycle-picker-menu .customer-result-list {
  max-height: 270px;
  overflow: auto;
}

.lifecycle-picker-menu .customer-result-card {
  min-height: auto;
  padding: 7px 8px;
}

.lifecycle-picker-menu .customer-result-open strong {
  font-size: 14px;
  line-height: 1.25;
}

.lifecycle-picker-menu .customer-result-open span,
.lifecycle-picker-menu .customer-result-open small {
  font-size: 12px;
  line-height: 1.3;
}

.closed-picker-panel {
  display: grid;
  gap: 8px;
}

.closed-picker-panel input {
  width: 100%;
  min-height: 42px;
}

.closed-customer-list {
  display: grid;
  gap: 9px;
}

.closed-customer-detail {
  display: grid;
  gap: 10px;
}

.closed-customer-card,
.after-sale-card {
  border: 1px solid #cfe7d9;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #fff;
}

.after-sale-card {
  border-color: #c7d9f3;
}

.lifecycle-info-card {
  gap: 9px;
  background: #fbfdff;
}

.lifecycle-card-title,
.lifecycle-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lifecycle-card-title strong {
  color: #123052;
  font-size: 15px;
  line-height: 1.25;
}

.lifecycle-card-title b {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 10px;
  color: #087f5b;
  background: #e4f8ed;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 900;
}

.lifecycle-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(128px, 154px);
  gap: 8px;
  align-items: end;
}

.lifecycle-identity-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.lifecycle-identity strong {
  color: #06234a;
  font-size: 20px;
  line-height: 1.15;
}

.lifecycle-identity span,
.lifecycle-card-actions small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.deal-source-field {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.deal-source-field span {
  color: #5c728d;
  font-size: 12px;
  font-weight: 900;
}

.deal-source-field select {
  min-height: 38px;
  border-color: #bfdbfe;
  padding: 6px 8px;
  color: #0f3d75;
  background: #eff6ff;
  font-size: 14px;
  font-weight: 900;
}

.lifecycle-fact-list {
  display: grid;
  gap: 7px;
}

.lifecycle-fact-row {
  border: 1px solid #dbe8f6;
  border-radius: 8px;
  padding: 8px 9px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  background: #fff;
}

.lifecycle-fact-row span {
  color: #5c728d;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.lifecycle-fact-row b {
  min-width: 0;
  color: #123052;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  word-break: break-word;
}

.lifecycle-fact-row-note b {
  font-weight: 800;
}

.lifecycle-inline-select {
  min-height: 34px;
  border-color: #bfdbfe;
  padding: 5px 8px;
  color: #0f3d75;
  background: #eff6ff;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 900;
}

.lifecycle-card-actions {
  justify-content: stretch;
}

.lifecycle-record-button {
  width: 100%;
  min-height: 46px;
  font-size: 15px;
  justify-content: center;
}

.lifecycle-operation-card {
  background: #fff;
}

.closed-customer-main,
.closed-customer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.closed-customer-main strong {
  display: block;
  color: #123052;
  font-size: 16px;
  line-height: 1.25;
}

.closed-customer-main span,
.closed-customer-foot small {
  color: var(--muted);
  font-size: 12px;
}

.closed-customer-main b {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  color: #087f5b;
  background: #e4f8ed;
  font-size: 12px;
}

.closed-customer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.closed-customer-meta span {
  border-radius: 999px;
  padding: 4px 7px;
  color: #315174;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 800;
}

.closed-customer-card p,
.after-sale-card p {
  margin: 0;
  color: #43566f;
  font-size: 13px;
  line-height: 1.45;
}

.deal-archive-panel {
  border: 1px solid #cfe7d9;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 10px;
  background: #fff;
}

.deal-archive-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-end;
}

.deal-archive-head strong {
  color: #123052;
  font-size: 15px;
}

.deal-archive-head small {
  color: #7890aa;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.deal-image-grid {
  grid-template-columns: repeat(auto-fill, minmax(72px, 86px));
}

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

.deal-choice-field {
  grid-column: 1 / -1;
}

.deal-calculated-field {
  grid-column: 1 / -1;
  border: 1px solid #9bd7b5;
  border-radius: 8px;
  padding: 9px 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: #0f3d31;
  background: #f3fff7;
}

.deal-calculated-field span {
  font-size: 13px;
  font-weight: 900;
}

.deal-calculated-field b {
  min-width: 96px;
  text-align: right;
  color: #087f5b;
  font-size: 18px;
}

.deal-calculated-field-strong {
  border-color: #80cfa1;
  background: #e9fbf0;
}

.deal-choice-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.deal-choice-button {
  border: 1px solid #cfe0f3;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 4px;
  color: #29415f;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.deal-choice-button.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.2);
}

.deal-choice-grid.is-locked .deal-choice-button {
  cursor: not-allowed;
  color: #6b7d94;
  background: #f5f7fb;
  opacity: 0.75;
}

.deal-choice-grid.is-locked .deal-choice-button.active {
  color: #fff;
  border-color: #7b91b2;
  background: #7b91b2;
  box-shadow: none;
  opacity: 1;
}

.deal-change-field,
.deal-archive-save {
  grid-column: 1 / -1;
}

.deal-draft-hint {
  border: 1px solid #f3c27b;
  border-radius: 8px;
  padding: 8px 10px;
  color: #9a5b00;
  background: #fff8ed;
  font-size: 13px;
  font-weight: 900;
}

.deal-approval-hint {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 8px 10px;
  color: #0f3d75;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 900;
}

.deal-archive-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.deal-archive-actions .button {
  width: 100%;
  min-height: 46px;
  justify-content: center;
  font-size: 15px;
  line-height: 1.2;
}

.closed-record-button {
  border: 1px solid #9bd7b5;
  border-radius: 8px;
  min-height: 32px;
  padding: 0 10px;
  color: #087f5b;
  background: #f5fff8;
  font-weight: 900;
}

.closed-record-button:disabled {
  opacity: 0.5;
}

.after-sale-list {
  display: grid;
  gap: 9px;
}

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

.after-sale-top-search {
  order: 0;
}

.after-sale-top-search input {
  min-height: 42px;
  background: #fff;
}

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

.change-log-item {
  border: 1px solid #dbe8f6;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #fff;
}

.change-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.change-log-head strong {
  color: #123052;
  font-size: 14px;
}

.change-log-head time,
.change-log-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.change-log-meta,
.change-log-change {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.change-log-change span,
.change-log-change b {
  border-radius: 8px;
  padding: 6px 8px;
  background: #f8fafc;
  color: #29415f;
  font-size: 13px;
}

.change-log-change b {
  background: #e9fbf1;
  color: #087f5b;
}

.after-sale-summary-card {
  border: 1px solid #c7d9f3;
  border-radius: 8px;
  min-height: 112px;
  padding: 11px 10px;
  display: grid;
  grid-template-rows: minmax(50px, auto) minmax(34px, auto);
  gap: 7px;
  color: #29415f;
  background: #fff;
  text-align: left;
  align-content: start;
}

.after-sale-summary-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  min-width: 0;
}

.after-sale-summary-card.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.2);
}

.after-sale-summary-card.warning {
  border-color: #f3c27b;
  background: #fff8ed;
}

.after-sale-summary-card.warning.active {
  color: #fff;
  border-color: #d97706;
  background: #d97706;
  box-shadow: 0 7px 16px rgba(217, 119, 6, 0.2);
}

.after-sale-summary-card strong {
  min-width: 22px;
  color: inherit;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 950;
  text-align: right;
}

.after-sale-summary-card span {
  min-width: 0;
  color: inherit;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 950;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

.after-sale-summary-card small {
  display: block;
  min-height: 32px;
  color: inherit;
  opacity: 0.78;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.after-sale-detail {
  display: grid;
  gap: 10px;
}

.installed-paid-detail {
  display: grid;
  gap: 10px;
}

.installed-paid-badge {
  border: 1px solid #fca5a5;
  border-radius: 999px;
  padding: 8px 10px;
  color: #b91c1c;
  background: #fef2f2;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.installed-paid-card {
  border-color: #a7dfbf;
  background: #fbfffc;
}

.installed-paid-image-grid .detail-empty {
  grid-column: 1 / -1;
}

.after-sale-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, 142px);
  gap: 8px;
  align-items: start;
}

.after-sale-customer-block {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.after-sale-customer-brief {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.after-sale-customer-brief strong {
  color: #123052;
  font-size: 18px;
  line-height: 1.2;
}

.after-sale-customer-brief span {
  color: var(--muted);
  font-size: 12px;
}

.after-sale-status-button {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.after-sale-status-button span {
  color: #0f3d75;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.after-sale-status-button select {
  min-height: 52px;
  border-color: var(--blue);
  padding: 0 10px;
  color: #fff;
  background: var(--blue);
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.after-sale-status-button select:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18), 0 8px 18px rgba(37, 99, 235, 0.22);
}

.after-sale-status-button option {
  color: #123052;
  background: #fff;
}

body[data-role="employee"] .after-sale-status-button select {
  min-height: 52px;
  padding: 0 10px;
}

.after-sale-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.after-sale-save {
  min-height: 42px;
  white-space: nowrap;
}

.after-sale-status-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.after-sale-issue-panel {
  border: 1px solid #f1d6a8;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 10px;
  background: #fffaf2;
}

.after-sale-issue-panel p {
  margin: 0;
  color: #7c4a12;
  font-size: 13px;
  line-height: 1.45;
}

.after-sale-detail-foot {
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.table-head {
  align-items: center;
}

.table-tools input {
  min-width: 240px;
}

.boss-log-filters {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(150px, .8fr) minmax(260px, 1.5fr) auto;
  gap: 10px;
  align-items: end;
  margin: 14px 0 10px;
}

.boss-log-search input {
  min-width: 0;
  width: 100%;
}

.boss-log-filter-row,
.boss-log-fields {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0;
}

.boss-log-fields {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.boss-log-fields small {
  display: block;
  color: var(--muted);
  margin-top: 9px;
}

.filter-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.boss-log-employee-filters,
.boss-log-field-picker {
  display: inline-flex;
  gap: 7px;
  flex-wrap: wrap;
}

.filter-chip,
.field-chip {
  border: 1px solid #d5e2f0;
  border-radius: 7px;
  padding: 7px 11px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.filter-chip.active,
.field-chip.active {
  border-color: #2470e8;
  background: #2470e8;
  color: #fff;
}

.boss-log-row {
  cursor: pointer;
}

.boss-log-row:hover {
  background: #f5f9ff;
}

.link-button,
.timeline-summary-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #1769d2;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.timeline-summary-button span,
.table-note {
  color: var(--muted);
  font-size: 12px;
}

.boss-customer-info,
.boss-ai-panel,
.boss-progress-panel,
.boss-return-timeline {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
}

.boss-detail-facts {
  display: flex;
  gap: 10px 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.boss-detail-facts span {
  padding: 7px 9px;
  border: 1px solid #e2ebf5;
  border-radius: 6px;
  background: #f8fbff;
}

.boss-ai-panel header,
.boss-progress-panel header,
.boss-return-timeline header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.boss-total-score {
  color: #1769d2;
  font-size: 26px;
}

.boss-score-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.boss-score-item {
  border: 1px solid #e2ebf5;
  border-radius: 7px;
  padding: 10px;
  background: #f8fbff;
}

.boss-score-item span,
.boss-score-item b {
  display: block;
}

.boss-score-item span,
.boss-progress-panel small {
  color: var(--muted);
  font-size: 12px;
}

.boss-score-item b {
  margin-top: 5px;
  color: #173f74;
  font-size: 18px;
}

.boss-ai-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.boss-progress-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.boss-progress-step {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid #d9e5f3;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.boss-progress-step i {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  background: #edf3fa;
  font-style: normal;
  font-size: 11px;
}

.boss-progress-step.done {
  border-color: #b9e4d0;
  color: #147a58;
  background: #f0fbf5;
}

.boss-progress-step.current {
  border-color: #2470e8;
  color: #fff;
  background: #2470e8;
}

.boss-progress-step.current i {
  background: rgba(255,255,255,.22);
}

.boss-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.boss-detail-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.boss-detail-timeline-item {
  display: grid;
  gap: 6px;
  min-height: 90px;
  padding: 11px;
  border: 1px solid #d5e2f0;
  border-radius: 7px;
  background: #f8fbff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.boss-detail-timeline-item:hover {
  border-color: #2470e8;
  background: #f2f7ff;
}

.boss-detail-timeline-item span {
  color: #1769d2;
  font-weight: 700;
}

.boss-detail-timeline-item small {
  color: var(--muted);
}

.boss-attachment-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0;
}

.boss-attachment-columns article,
.detail-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.boss-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.attachment-chip {
  padding: 7px 9px;
  border: 1px dashed #9fc3ed;
  border-radius: 6px;
  background: #f5f9ff;
  color: #365a82;
  font-size: 12px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
}

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

.lead-card {
  display: grid;
  gap: 10px;
}

.customer-tracker-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 14px;
  align-items: start;
}

.tracker-tools {
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.tracker-category-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7fb;
}

.tracker-category-switch button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tracker-category-switch button.active {
  border-color: #9bbcf3;
  background: #fff;
  color: var(--blue);
}

.tracker-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.monthly-summary-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.monthly-summary-tools .field {
  min-width: 160px;
  margin: 0;
}

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

.monthly-summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 10px;
  display: grid;
  gap: 5px;
  background: #fff;
}

.monthly-summary-card strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.monthly-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.monthly-summary-card.customer { border-top: 3px solid #2563eb; }
.monthly-summary-card.master { border-top: 3px solid #10a37f; }
.monthly-summary-card.channel { border-top: 3px solid #8b5cf6; }
.monthly-summary-card.return { border-top: 3px solid #f59e0b; }
.monthly-summary-card.store { border-top: 3px solid #64748b; }

.employee-reminder-panel {
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  background: #f8fbff;
}

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

.employee-reminder-head p,
.employee-reminder-head h3,
.employee-reminder-head small {
  margin: 0;
}

.employee-reminder-head p {
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
}

.employee-reminder-head h3 {
  margin-top: 3px;
  font-size: 17px;
}

.employee-reminder-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.employee-reminder-head > span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

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

.employee-reminder-card {
  border: 1px solid var(--line);
  border-left: 5px solid #b9d6ff;
  border-radius: 8px;
  padding: 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: #fff;
}

.employee-reminder-card.warn {
  border-left-color: #c47a18;
}

.employee-reminder-card.good {
  border-left-color: #10a37f;
}

.employee-reminder-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.employee-reminder-copy strong {
  font-size: 15px;
}

.employee-reminder-copy p {
  margin: 0;
  color: #334155;
  line-height: 1.5;
}

.employee-reminder-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.employee-reminder-tags span {
  border: 1px solid #dbe7f5;
  border-radius: 999px;
  padding: 4px 8px;
  color: #475569;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.employee-reminder-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.employee-reminder-actions button {
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  min-width: 68px;
  min-height: 34px;
  padding: 0 10px;
  color: #0f3d75;
  background: #fff;
  font-weight: 900;
}

.employee-reminder-actions button.primary {
  border-color: #2563eb;
  color: #fff;
  background: #2563eb;
}

.employee-reminder-empty {
  border: 1px dashed #afe3ce;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 4px;
  color: #087f5b;
  background: var(--green-soft);
}

.employee-reminder-empty span {
  color: #47636b;
}

.summary-action {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 4px;
  text-align: left;
  background: #fff;
  color: var(--ink);
}

.summary-action strong {
  font-size: 24px;
  line-height: 1;
}

.summary-action span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.summary-action.good {
  border-color: #afe3ce;
  background: var(--green-soft);
}

.summary-action.info {
  border-color: #b9d6ff;
  background: var(--blue-soft);
}

.summary-action.warn {
  border-color: #f8d58a;
  background: var(--amber-soft);
}

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

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

.customer-card.active {
  border-color: #9bbcf3;
  background: var(--blue-soft);
}

.customer-card-main,
.customer-card-side {
  display: grid;
  gap: 4px;
}

.customer-card-main b {
  font-size: 17px;
}

.customer-card-main small,
.customer-card-side small {
  color: var(--muted);
  line-height: 1.35;
}

.customer-card-side {
  justify-items: end;
  flex: 0 0 88px;
}

.customer-card-side em {
  border-radius: 999px;
  padding: 5px 9px;
  color: #92400e;
  background: var(--amber-soft);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.customer-card-side em.hot {
  color: #087f5b;
  background: var(--green-soft);
}

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

.customer-focus {
  border: 1px solid #f8d58a;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: var(--amber-soft);
}

.customer-focus.hot {
  border-color: #afe3ce;
  background: var(--green-soft);
}

.customer-focus p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-focus strong {
  font-size: 18px;
  line-height: 1.45;
}

.customer-focus span {
  align-self: flex-start;
  border-radius: 999px;
  padding: 6px 10px;
  color: #0f3d75;
  background: #fff;
  font-weight: 900;
  white-space: nowrap;
}

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

.customer-facts div,
.simple-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.customer-facts div {
  padding: 10px;
  display: grid;
  gap: 4px;
}

.customer-facts span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-facts b {
  font-size: 14px;
}

.simple-card {
  padding: 13px;
}

.simple-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.simple-card p {
  margin: 0;
  color: #334155;
  line-height: 1.6;
}

.ai-insight-card {
  border: 1px solid #b9d6ff;
  border-radius: 8px;
  padding: 13px;
  display: grid;
  gap: 12px;
  background: #f8fbff;
}

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

.ai-insight-head p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ai-insight-head strong {
  display: block;
  color: #123052;
  font-size: 15px;
  line-height: 1.5;
}

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

.ownership-score-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ai-score-grid div,
.ownership-score-row div {
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: #fff;
}

.ai-score-grid span,
.ownership-score-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ai-score-grid b,
.ownership-score-row b {
  color: #0f3d75;
  font-size: 20px;
  line-height: 1.15;
}

.ai-score-grid small {
  color: #5f748f;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
}

.ai-advice-box,
.ai-script-box {
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 6px;
  background: #fff;
}

.ai-advice-box b,
.ai-script-box b {
  color: #123052;
  font-size: 14px;
}

.ai-advice-box p,
.ai-script-box p {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.55;
}

.ownership-advice-card .tags {
  margin-bottom: 8px;
}

.ownership-board {
  display: grid;
  gap: 10px;
}

.ownership-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  display: grid;
  gap: 10px;
  background: #fff;
}

.ownership-card.warn {
  border-color: #f8d58a;
  background: #fffaf0;
}

.ownership-card.protected {
  border-color: #afe3ce;
  background: #f3fff7;
}

.ownership-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.ownership-card header strong {
  display: block;
  color: #123052;
  font-size: 16px;
  line-height: 1.3;
}

.ownership-card header span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.ownership-card p,
.ownership-card small {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.55;
}

.ownership-card small {
  color: #5f748f;
  font-weight: 800;
}

.simple-timeline {
  display: grid;
  gap: 10px;
}

.return-customer-timeline {
  display: grid;
  gap: 10px;
}

.return-follow-alert {
  border: 1px solid #f8d58a;
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  background: var(--amber-soft);
}

.return-follow-alert.good {
  border-color: #afe3ce;
  background: var(--green-soft);
}

.return-follow-alert strong {
  color: #7c2d12;
  font-size: 15px;
}

.return-follow-alert.good strong {
  color: #087f5b;
}

.return-follow-alert span {
  color: #5d4b35;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.return-timeline-card {
  background: rgba(255, 255, 255, 0.78);
}

.simple-step {
  border-left: 4px solid var(--blue);
  padding-left: 10px;
  display: grid;
  gap: 3px;
}

.simple-step b {
  color: #0f3d75;
}

.simple-step span {
  font-weight: 800;
}

.simple-step small {
  color: var(--muted);
  line-height: 1.45;
}

.voice-summary-details {
  color: var(--muted);
  line-height: 1.45;
}

.voice-summary-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

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

.voice-summary-details summary i {
  flex: 0 0 auto;
  color: var(--blue);
  font-style: normal;
  font-weight: 800;
}

.voice-summary-details[open] summary i {
  font-size: 0;
}

.voice-summary-details[open] summary i::after {
  content: "收起";
  font-size: 12px;
}

.voice-summary-digest {
  display: grid;
  gap: 3px;
  margin-top: 6px;
  padding: 8px 10px;
  border-left: 3px solid #9bbcf3;
  background: #f8fbff;
}

.voice-summary-digest b {
  color: var(--ink);
  font-size: 12px;
}

.voice-summary-tag {
  display: inline-block;
  max-width: 100%;
}

.voice-summary-tag .voice-summary-details {
  min-width: 180px;
}

.mobile-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}

.danger-action {
  color: #9a3412;
  border-color: #f4b195;
}

.danger-action:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.settings-panel {
  max-width: 960px;
}

.settings-grid {
  display: grid;
  gap: 12px;
}

.employee-profile-panel { max-width: 720px; }
.profile-card {
  display:flex; align-items:center; gap:16px; padding:18px;
  border:1px solid #cfe0f7; border-radius:8px; background:#f8fbff;
}
.profile-avatar-wrap { position:relative; flex:0 0 auto; }
.profile-avatar {
  width:78px; height:78px; display:grid; place-items:center; overflow:hidden;
  border:2px solid #bfdbfe; border-radius:50%; color:#0f4c9a; background:#e8f1ff;
  font-size:28px; font-weight:900;
}
.profile-avatar img { width:100%; height:100%; object-fit:cover; }
.profile-avatar-upload {
  position:absolute; right:-3px; bottom:-3px; width:28px; height:28px;
  display:grid; place-items:center; border:2px solid #fff; border-radius:50%;
  color:#fff; background:#2563eb; cursor:pointer;
}
.profile-avatar-upload svg { width:15px; height:15px; fill:currentColor; }
.profile-avatar-upload input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.profile-main { display:grid; gap:5px; min-width:0; }
.profile-main strong { font-size:20px; }
.profile-main span { color:var(--muted); font-size:13px; }
.profile-name-line { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.profile-name-edit { padding:2px 8px; border:1px solid #b9d3f5; border-radius:6px; color:#2167c5; background:#f5f9ff; font-size:12px; font-weight:700; }
.profile-name-form { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.profile-name-form input { width:150px; padding:6px 8px; border:1px solid #b9cde3; border-radius:6px; font:inherit; }
.profile-name-form .button { padding:6px 10px; font-size:12px; }
.profile-status { color:#07855f !important; font-weight:800; }
.profile-logout-button { padding:2px 8px; border:1px solid #f2b8b5; border-radius:6px; color:#b42318; background:#fff7f6; font-size:12px; font-weight:700; cursor:pointer; }
.profile-logout-button:disabled { opacity:.6; cursor:wait; }
.profile-setting-section { margin-top:14px; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:#fff; }
.profile-setting-head { padding:12px 14px; color:#173b68; border-bottom:1px solid #e5edf7; font-size:14px; }
.profile-setting-row {
  width:100%; display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:14px; border:0; border-bottom:1px solid #edf2f8; color:var(--ink); background:#fff; text-align:left; cursor:pointer;
}
.profile-setting-row:last-child { border-bottom:0; }
.profile-setting-row span:first-child { display:grid; gap:4px; }
.profile-setting-row small { color:var(--muted); font-size:12px; }
.profile-setting-row.is-static { cursor:default; }
.profile-arrow { color:#59718f; font-size:24px; line-height:1; }
.change-password-form { padding:12px 14px 14px; border-top:1px solid #e5edf7; background:#fbfdff; }
.password-input-wrap { position:relative; display:block; }
.password-input-wrap input { width:100%; padding-right:48px; }
.password-visibility-toggle { position:absolute; top:50%; right:8px; transform:translateY(-50%); width:36px; height:36px; display:grid; place-items:center; border:0; border-radius:6px; color:#59718f; background:transparent; cursor:pointer; }
.password-visibility-toggle:hover, .password-visibility-toggle:focus-visible { color:#0f3d75; background:#edf4ff; outline:2px solid #9fc2ff; outline-offset:1px; }
.password-visibility-toggle svg { width:20px; height:20px; fill:currentColor; }
.profile-form-actions { display:flex; gap:8px; justify-content:flex-end; }
.profile-form-status { min-height:20px; margin-top:8px; color:#b42318; font-size:12px; }

.setting-line {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.setting-line strong,
.setting-line small {
  display: block;
}

.setting-line small {
  margin-top: 4px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 22px);
  opacity: 0;
  pointer-events: none;
  color: #fff;
  background: #1e293b;
  padding: 11px 16px;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(30, 41, 59, 0.2);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.detail-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(760px, 88vh);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.detail-head h2 {
  margin: 0;
  font-size: 20px;
}

.close-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.close-button:hover {
  color: #0f3d75;
  background: var(--blue-soft);
}

.detail-body {
  overflow: auto;
  padding: 16px 18px 18px;
  display: grid;
  gap: 12px;
}

.detail-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
  background: #fff;
}

.detail-row header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.detail-row strong {
  display: block;
  margin-bottom: 4px;
}

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

.detail-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: #f8fafc;
}

.detail-note {
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 12px;
  color: #29415f;
  background: var(--blue-soft);
  line-height: 1.65;
}

.wechat-proof-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(280px, 1.15fr);
  gap: 14px;
}

.wechat-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
  display: grid;
  gap: 12px;
}

.wechat-preview header {
  display: grid;
  gap: 4px;
}

.wechat-phone {
  border: 1px solid #c9d6e4;
  border-radius: 8px;
  overflow: hidden;
  background: #eef2f5;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.wechat-topbar {
  padding: 10px;
  text-align: center;
  font-weight: 800;
  background: #f7f8fa;
  border-bottom: 1px solid #d8e0ea;
}

.wechat-screen {
  min-height: 280px;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.wechat-message {
  display: grid;
  gap: 4px;
  max-width: 86%;
}

.wechat-message span {
  color: #8793a4;
  font-size: 11px;
}

.wechat-message p {
  margin: 0;
  padding: 9px 10px;
  border-radius: 8px;
  line-height: 1.5;
  font-size: 13px;
  background: #fff;
}

.wechat-message.staff {
  justify-self: end;
}

.wechat-message.staff span {
  text-align: right;
}

.wechat-message.staff p {
  background: #c6f6d5;
}

.wechat-info {
  align-self: start;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .brand div:not(.brand-mark),
  .nav-item span,
  .nav-group-title,
  .sidebar-status span:last-child {
    display: none;
  }

  .role-switch {
    grid-template-columns: 1fr;
  }

  .role-switch button {
    display: block;
    min-height: 30px;
    padding: 0 2px;
    font-size: 12px;
  }

  .nav-item {
    justify-content: center;
  }

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

  .dashboard-grid,
  .two-column,
  .customer-tracker-layout,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  #view-field .two-column {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    display: none;
  }

  .role-switch {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .role-switch button {
    display: block;
  }

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

  body[data-role="employee"] .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-status {
    display: none;
  }

  .workspace {
    padding: 16px;
  }

  .daily-task-panel {
    margin-bottom: 8px;
  }

  .daily-task-panel .panel-head {
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 1.2fr);
  }

  .daily-task-head .section-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .daily-task-head {
    margin-bottom: 6px;
  }

  .daily-task-head small {
    margin-top: 3px;
    line-height: 1.3;
  }

  .daily-work-mode {
    width: 100%;
    justify-content: space-between;
    margin-top: 5px;
  }

  .daily-work-mode select {
    min-width: 120px;
  }

  .daily-work-type-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .daily-work-type-option {
    min-height: 32px;
    font-size: 12px;
  }

  .outreach-plan {
    margin-top: 7px;
    padding: 8px;
  }

  .outreach-plan-selects {
    gap: 6px;
    margin-top: 6px;
  }

  .topbar,
  .panel-head,
  .table-head {
    display: grid;
  }

  .topbar-actions,
  .topbar-actions-shell,
  .table-tools,
  .form-actions {
    width: 100%;
  }

  .topbar-actions-shell {
    justify-content: stretch;
  }

  .topbar-actions-shared {
    width: auto;
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .field.compact,
  .table-tools input,
  .table-tools select,
  .button,
  .icon-button {
    width: 100%;
  }

  .metric-grid,
  .lead-board,
  .tracker-tools,
  .outreach-plan-selects,
  .tracker-summary,
  .customer-facts,
  .daily-task-card,
  .employee-reminder-card,
  .form-row {
    grid-template-columns: 1fr;
  }

  .daily-task-coach,
  .daily-task-actions {
    grid-column: 1;
  }

  .monthly-summary-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .monthly-summary-tools .field {
    min-width: 0;
  }

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

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

  .quick-audio-actions,
  .quick-audio-clip-actions,
  .audio-bind-actions,
  .audio-bind-choice-grid,
  .audio-bind-choice-grid.two {
    grid-template-columns: 1fr;
  }

  .quick-audio-head {
    display: grid;
  }

  .employee-reminder-head {
    display: grid;
  }

  .employee-reminder-actions {
    grid-template-columns: 1fr 1fr;
  }

  .form-row.contact-detail-grid {
    grid-template-columns: minmax(96px, 0.64fr) minmax(0, 1fr) minmax(112px, 0.86fr);
  }

  .form-row.wechat-quick-row {
    grid-template-columns: minmax(96px, 0.72fr) minmax(0, 1.28fr);
  }

  .form-row.site-main-row,
  .form-row.site-extra-row {
    grid-template-columns: 1fr 1fr;
  }

  .form-row.rest-date-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-row.proof-upload-row {
    grid-template-columns: 1fr 1fr;
  }

  .form-row.old-customer-row {
    grid-template-columns: 1fr;
  }

  .customer-card {
    min-height: 84px;
  }

  .customer-card-main b {
    font-size: 18px;
  }

  .customer-focus,
  .customer-card {
    align-items: stretch;
  }

  .customer-focus {
    display: grid;
  }

  .ai-insight-head,
  .ownership-card header {
    display: grid;
  }

  .ai-score-grid,
  .ownership-score-row {
    grid-template-columns: 1fr;
  }

  .contact-type-switch {
    gap: 6px;
  }

  .contact-type-switch button {
    min-height: 46px;
    padding: 0 4px;
    font-size: 14px;
  }

  body[data-role="employee"] .workspace {
    padding: 8px;
  }

  body[data-role="employee"] .panel {
    padding: 10px;
  }

  body[data-role="employee"] .panel-head {
    margin-bottom: 8px;
    gap: 8px;
  }

  body[data-role="employee"] .panel-head h2 {
    font-size: 17px;
  }

  body[data-role="employee"] .log-form {
    gap: 8px;
  }

  body[data-role="employee"] .mobile-form-context {
    position: sticky;
    top: 0;
    z-index: 12;
    display: block;
    min-height: 36px;
    padding: 9px 12px;
    color: #174477;
    background: rgba(232, 240, 255, 0.98);
    border: 1px solid #b9d0f2;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(30, 41, 59, 0.08);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
  }

  body[data-role="employee"] .form-section {
    padding: 10px;
    gap: 8px;
  }

  body[data-role="employee"] .form-section-body {
    gap: 8px;
  }

  body[data-role="employee"] .form-section-head {
    padding-bottom: 6px;
  }

  body[data-role="employee"] .form-section-head strong {
    font-size: 15px;
  }

  body[data-role="employee"] .section-toggle {
    min-height: 30px;
    padding: 0 9px;
  }

  body[data-role="employee"] .field {
    gap: 4px;
  }

  body[data-role="employee"] .field span {
    line-height: 1.2;
  }

  body[data-role="employee"] input,
  body[data-role="employee"] select,
  body[data-role="employee"] textarea {
    min-height: 40px;
    padding: 7px 10px;
  }

  body[data-role="employee"] textarea {
    min-height: 84px;
  }

  body[data-role="employee"] .form-row {
    gap: 8px;
  }

  body[data-role="employee"] .form-row.contact-detail-grid {
    grid-template-columns: minmax(88px, 0.62fr) minmax(0, 1fr) minmax(104px, 0.86fr);
  }

  body[data-role="employee"] .form-row.wechat-quick-row {
    grid-template-columns: minmax(88px, 0.64fr) minmax(0, 1.36fr);
  }

  body[data-role="employee"] .form-row.site-main-row,
  body[data-role="employee"] .form-row.site-extra-row {
    grid-template-columns: 1fr 1fr;
  }

  body[data-role="employee"] .form-row.proof-upload-row {
    grid-template-columns: 1fr 1fr;
  }

  body[data-role="employee"] .form-row.old-customer-row {
    grid-template-columns: 1fr;
  }

  body[data-role="employee"] .contact-type-switch {
    gap: 6px;
  }

  body[data-role="employee"] .contact-type-switch button {
    min-height: 40px;
    padding: 0 3px;
    font-size: 14px;
  }

  body[data-role="employee"] .visit-mode button {
    min-height: 36px;
    padding: 6px 10px;
  }

  body[data-role="employee"] .store-result-grid {
    gap: 7px;
  }

  body[data-role="employee"] .store-result-grid button {
    min-height: 54px;
    padding: 8px 7px;
  }

  body[data-role="employee"] .store-result-grid strong {
    font-size: 14px;
  }

  body[data-role="employee"] .store-result-grid span {
    font-size: 11px;
  }

  body[data-role="employee"] .store-contact-grid button {
    min-height: 42px;
  }

  body[data-role="employee"] .scroll-picker-trigger {
    min-height: 42px;
    padding: 0 10px;
  }

  body[data-role="employee"] .scroll-picker-menu {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    z-index: 80;
    max-height: min(62vh, 420px);
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.24);
  }

  body[data-role="employee"] .scroll-picker-menu button {
    min-height: 46px;
    font-size: 15px;
  }

  body[data-role="employee"] .cascade-trigger {
    min-height: 42px;
    padding: 0 10px;
  }

  body[data-role="employee"] .contact-level-row {
    margin-top: 4px;
  }

  body[data-role="employee"] .field-status {
    padding: 7px 8px;
    font-size: 12px;
    line-height: 1.35;
  }

  body[data-role="employee"] .proof-upload-row .field-status {
    min-height: 40px;
    align-self: end;
    overflow-wrap: anywhere;
  }

  body[data-role="employee"] #wechatAvatarStatus {
    min-height: 46px;
    font-size: 12px;
  }

  body[data-role="employee"] .identity-check-panel {
    padding: 9px;
    gap: 8px;
  }

  body[data-role="employee"] .identity-check-copy strong {
    font-size: 15px;
  }

  body[data-role="employee"] .identity-check-copy span {
    font-size: 12px;
  }

  body[data-role="employee"] .identity-check-actions {
    grid-template-columns: 1fr;
  }

  body[data-role="employee"] .identity-check-actions .button,
  body[data-role="employee"] .identity-check-link {
    min-height: 44px;
    font-size: 14px;
  }

  body[data-role="employee"] .proof-upload-stack {
    gap: 10px;
  }

  body[data-role="employee"] .upload-block-head {
    align-items: flex-start;
  }

  body[data-role="employee"] .upload-block-head small {
    max-width: 220px;
  }

  body[data-role="employee"] .upload-thumb-grid {
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    gap: 7px;
  }

  body[data-role="employee"] .return-record-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    overflow: hidden;
  }

  body[data-role="employee"] .return-record-card {
    min-height: 54px;
    padding: 6px;
    overflow: hidden;
    overflow-wrap: anywhere;
  }

  body[data-role="employee"] .return-record-card-head {
    min-width: 0;
  }

  body[data-role="employee"] .return-record-card-head span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-role="employee"] .avatar-preview-grid,
  body[data-role="employee"] .chat-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(68px, 80px));
  }

  body[data-role="employee"] .old-customer-row .field-status {
    padding: 6px 8px;
  }

  body[data-role="employee"] .draft-quick-panel {
    padding: 8px;
    gap: 7px;
  }

  body[data-role="employee"] .draft-quick-card {
    min-height: 70px;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 7px;
  }

  body[data-role="employee"] .draft-quick-card.no-delete {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-role="employee"] .draft-quick-open {
    min-height: 70px;
    grid-template-columns: minmax(0, 1fr) 88px;
    padding: 9px 0 9px 10px;
  }

  body[data-role="employee"] .draft-delete-button {
    min-width: 40px;
    margin: 7px 7px 7px 0;
  }

  body[data-role="employee"] .draft-quick-action strong {
    padding: 4px 7px;
  }

  body[data-role="employee"] .form-actions {
    gap: 8px;
  }

  body[data-role="employee"] .employee-entry-panel {
    padding-bottom: 24px;
  }

  body[data-role="employee"] .log-form.is-closed-mode,
  body[data-role="employee"] .log-form.is-after-sale-mode,
  body[data-role="employee"] .log-form.is-installed-paid-mode {
    padding-bottom: 42px;
  }

  body[data-role="employee"] .after-sale-summary {
    gap: 8px;
  }

  body[data-role="employee"] .after-sale-summary-card {
    min-height: 106px;
    padding: 10px 9px;
    grid-template-rows: minmax(48px, auto) minmax(32px, auto);
  }

  body[data-role="employee"] .after-sale-summary-card strong,
  body[data-role="employee"] .after-sale-summary-card span {
    font-size: 18px;
    line-height: 1.16;
  }

  body[data-role="employee"] .after-sale-summary-card small {
    font-size: 12px;
    line-height: 1.32;
  }

  body[data-role="employee"] .lifecycle-card-title strong,
  body[data-role="employee"] .lifecycle-record-button {
    font-size: 15px;
  }

  body[data-role="employee"] .lifecycle-record-button {
    min-height: 50px;
  }

  body[data-role="employee"] .lifecycle-fact-row span,
  body[data-role="employee"] .lifecycle-fact-row b,
  body[data-role="employee"] .lifecycle-inline-select {
    font-size: 13px;
    line-height: 1.3;
  }

  body[data-role="employee"] .deal-archive-actions {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 2px;
  }

  body[data-role="employee"] .deal-archive-actions .button {
    width: 100%;
    min-height: 50px;
    padding: 0 12px;
    font-size: 15px;
  }

  body[data-role="employee"] .form-edit-gate {
    padding: 8px 10px;
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  body[data-role="employee"] .form-edit-gate span {
    font-size: 12px;
  }

  body[data-role="employee"] .visit-mode {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body[data-role="employee"] .visit-mode button {
    min-width: 0;
    padding: 8px 3px;
    font-size: 12px;
    white-space: nowrap;
  }

  body[data-role="employee"] .form-actions .button {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  body[data-role="employee"] .form-actions .button.primary {
    flex-basis: 100%;
  }

  body[data-role="employee"] .log-form.is-return-mode .form-actions .button {
    flex: 1 1 calc(50% - 4px);
  }

  body[data-role="employee"] .log-form.is-return-mode .form-actions .button.primary {
    flex-basis: calc(50% - 4px);
  }

  .cascade-menu {
    position: static;
    margin-top: 8px;
  }

  .customer-cascade-panel {
    grid-template-columns: 1fr;
  }

  .cascade-level {
    max-height: 180px;
  }

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

  .resource-result-list {
    max-height: 300px;
  }

  .mobile-actions {
    grid-template-columns: 1fr;
  }

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

  .setting-line {
    grid-template-columns: 1fr;
  }

  .detail-dialog {
    max-height: 92vh;
  }

  .detail-row header {
    display: grid;
  }

  .wechat-proof-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .daily-task-panel .panel-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .daily-work-type-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wechat-script-actions,
  .summary-confirm-actions {
    grid-template-columns: 1fr;
  }
}
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f3f7fc; }
.login-card { width: min(420px, 100%); background: #fff; border: 1px solid #dbe5f1; border-radius: 8px; padding: 32px; box-shadow: 0 18px 50px rgba(25, 59, 99, .12); }
.login-brand { width: 52px; height: 52px; display: grid; place-items: center; color: #fff; background: #245da8; border-radius: 8px; font-weight: 800; }
.login-card h1 { margin: 18px 0 4px; font-size: 28px; }
.login-card p { margin: 0 0 24px; color: #687b91; }
.login-card form, .login-card label { display: grid; gap: 8px; }
.login-card form { gap: 18px; }
.login-card input { width: 100%; min-height: 48px; border: 1px solid #cad7e6; border-radius: 6px; padding: 0 14px; font: inherit; }
.login-card button { min-height: 48px; border: 0; border-radius: 6px; color: #fff; background: #2465dc; font: inherit; font-weight: 700; cursor: pointer; }
.login-card button:disabled { opacity: .65; }
#loginMessage { min-height: 22px; color: #c0392b; }
body[data-account-role="employee"] [data-role-switch="boss"],
body[data-account-role="employee"] [data-role-label="boss"],
body[data-account-role="employee"] .nav-item[data-role="boss"] { display: none !important; }

@media (max-width: 1100px) {
  body[data-role="employee"] .nav-item span {
    display: block;
    font-size: 14px;
    white-space: nowrap;
  }

  body[data-role="employee"] .nav-item {
    gap: 6px;
    justify-content: center;
  }
}
.customer-ai-section {
  padding: 0;
  border: 0;
  background: transparent;
}

.customer-ai-assistant {
  margin-top: 14px;
  border: 1px solid #bfd3f4;
  border-radius: 8px;
  background: #f7faff;
  overflow: hidden;
}

.customer-ai-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #dbe7f7;
  background: #eef5ff;
}

.customer-ai-head p,
.customer-ai-head h3,
.customer-ai-head small {
  margin: 0;
}

.customer-ai-head p {
  margin-bottom: 3px;
  color: #32639d;
  font-size: 12px;
  font-weight: 700;
}

.customer-ai-head h3 {
  color: #163a68;
  font-size: 18px;
}

.customer-ai-head small {
  display: block;
  margin-top: 5px;
  color: #61748c;
  line-height: 1.55;
}

.customer-ai-status {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #087a55;
  background: #dff7ec;
  font-size: 12px;
  font-weight: 700;
}

.customer-ai-status.warn {
  color: #9a5a00;
  background: #fff0cf;
}

.customer-ai-profile {
  padding: 0 16px;
}

.customer-ai-facts {
  margin-top: 12px;
  padding: 12px;
  border-radius: 6px;
}

.customer-ai-facts.confirmed {
  border: 1px solid #b9e2d0;
  background: #effaf5;
}

.customer-ai-facts.pending {
  border: 1px solid #f0d096;
  background: #fff9ed;
}

.customer-ai-facts > b {
  display: block;
  margin-bottom: 8px;
  color: #17395f;
}

.customer-ai-facts.confirmed > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.customer-ai-facts.confirmed span {
  padding: 5px 8px;
  border: 1px solid #cae9dc;
  border-radius: 999px;
  background: #fff;
  color: #285f4b;
  font-size: 12px;
}

.customer-ai-facts.pending article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #f2ddb7;
}

.customer-ai-facts.pending article:first-child {
  border-top: 0;
}

.customer-ai-facts.pending article p {
  display: flex;
  gap: 6px;
  margin: 0;
}

.customer-ai-facts.pending button,
.customer-ai-message button {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid #b9cbe1;
  border-radius: 6px;
  color: #214e80;
  background: #fff;
  cursor: pointer;
}

.customer-ai-setup-note {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #efd39f;
  border-radius: 6px;
  color: #875314;
  background: #fff8e9;
  line-height: 1.55;
}

.customer-ai-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  margin: 12px 16px;
  padding: 12px;
  overflow-y: auto;
  border: 1px solid #dbe5f2;
  border-radius: 6px;
  background: #fff;
}

.customer-ai-empty {
  padding: 16px;
  color: #6b7d91;
  text-align: center;
  line-height: 1.6;
}

.customer-ai-empty.error {
  color: #a43a35;
}

.customer-ai-message {
  width: min(88%, 620px);
  padding: 10px 12px;
  border-radius: 6px;
}

.customer-ai-message.assistant {
  align-self: flex-start;
  border: 1px solid #c8d9ef;
  background: #eef5ff;
}

.customer-ai-message.employee {
  align-self: flex-end;
  border: 1px solid #c6e5d6;
  background: #effaf5;
}

.customer-ai-message b,
.customer-ai-message p,
.customer-ai-message small {
  display: block;
  margin: 0;
}

.customer-ai-message p {
  margin: 5px 0;
  color: #24384f;
  line-height: 1.65;
  white-space: pre-wrap;
}

.customer-ai-message small {
  color: #74859a;
}

.customer-ai-message button {
  margin-top: 7px;
}

.customer-ai-compose {
  padding: 0 16px 16px;
}

.customer-ai-compose label > span {
  display: block;
  margin-bottom: 6px;
  color: #294967;
  font-weight: 700;
}

.customer-ai-compose textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
}

.customer-ai-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 8px;
  margin-top: 8px;
}

.customer-ai-actions .button {
  width: 100%;
}

.customer-ai-voice svg {
  width: 18px;
  height: 18px;
}

.customer-ai-compose-hint {
  display: block;
  margin-top: 8px;
  color: #687b91;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .customer-ai-head {
    padding: 13px;
  }

  .customer-ai-head h3 {
    font-size: 16px;
  }

  .customer-ai-profile {
    padding: 0 12px;
  }

  .customer-ai-messages {
    max-height: 300px;
    margin: 10px 12px;
    padding: 9px;
  }

  .customer-ai-message {
    width: 94%;
  }

  .customer-ai-compose {
    padding: 0 12px 13px;
  }

  .customer-ai-facts.pending article {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* 现场录音暂时关闭：保留原有代码、数据和历史展示，先隐藏员工端录音入口。 */
#quickAudioPanel,
#audioProofBlock {
  display: none !important;
}

.tracker-module {
  border-top: 1px solid #e1e9f3;
  padding: 12px 0;
}
.tracker-module:first-of-type { border-top: 0; }
.tracker-module-head,
.tracker-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tracker-module-body { padding-top: 10px; }
.tracker-detail-head { justify-content: flex-end; margin-bottom: 10px; }

.change-request-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #cfe0f5;
  border-radius: 10px;
  background: #f7fbff;
}
.change-request-form { display: grid; gap: 8px; }
.change-request-form textarea { min-height: 72px; resize: vertical; }
.change-request-inline { display: grid; gap: 6px; margin-top: 7px; }
.change-request-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.button.tiny { min-height: 30px; padding: 5px 9px; font-size: 12px; }
.button.tiny.danger { color: #a23a35; border-color: #efb8b3; background: #fff7f6; }
.change-notification-button { position: relative; }
.change-notification-button.has-notification { border-color: #f0a34a; color: #a45a08; }
.notification-count { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: #ef6b5f; color: #fff; font-size: 12px; line-height: 18px; }
.change-diff { display: grid; gap: 5px; margin-top: 8px; padding: 9px; border: 1px dashed #c7d8ec; border-radius: 8px; background: #fbfdff; }
.change-diff div { display: grid; grid-template-columns: 64px minmax(0, 1fr) 18px minmax(0, 1fr); gap: 6px; align-items: start; font-size: 13px; }
.change-diff del { color: #a14d49; }
.change-diff ins { color: #18754d; text-decoration: none; }

#saveFeedback { position:fixed; z-index:10000; left:50%; bottom:calc(18px + env(safe-area-inset-bottom, 0px)); transform:translateX(-50%); width:max-content; max-width:calc(100% - 32px); padding:8px 12px; border:1px solid #16794b; border-radius:6px; background:#effcf5; color:#155335; box-shadow:0 3px 14px #0002; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
#saveFeedback[hidden] { display:none; }
#saveFeedback[data-status="saving"], #saveFeedback[data-status="local"] { border-color:#2862ad; background:#f1f7ff; color:#17416d; }
#saveFeedback[data-status="failed"] { border-color:#b22d2d; background:#fff5f5; color:#8b2020; }
#retryCloudSave { margin-left:12px; padding:6px 10px; border:1px solid currentColor; border-radius:4px; color:inherit; background:white; }
.toast { z-index:10001; bottom:100px; }
.auto-save-status { display:block; min-height:18px; margin-top:4px; font-size:12px; line-height:18px; font-weight:400; color:#527065; overflow-wrap:anywhere; }
.auto-save-status[data-status="failed"] { color:#9b2525; }
@media (max-width: 760px) {
  body[data-role="employee"] .mobile-form-context::after { content:attr(data-save-status); display:block; min-height:15px; margin-top:2px; font-size:11px; line-height:15px; font-weight:400; color:#527065; }
  body[data-role="employee"] .mobile-form-context[data-save-result="failed"]::after { color:#9b2525; }
}
.duplicate-choice { display:flex; align-items:flex-start; gap:10px; padding:10px 0; border-bottom:1px solid #e2e8f0; }
.duplicate-choice input { width:20px; height:20px; flex:0 0 20px; }
.duplicate-choice span { min-width:0; overflow-wrap:anywhere; }
.duplicate-choice small { display:block; margin-top:4px; color:#61718b; }
.change-diff del, .change-diff ins { min-width:0; overflow-wrap:anywhere; white-space:pre-wrap; }
.change-request-form textarea { width:100%; box-sizing:border-box; }
.correction-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.correction-fields fieldset { min-width:0; border:1px solid #d8e3ed; }
.correction-fields textarea, .correction-fields input { max-width:100%; box-sizing:border-box; }
@media(max-width:760px) { .correction-fields { grid-template-columns:minmax(0,1fr); } }
.session-renew-dialog { width: min(420px, calc(100% - 32px)); max-height: 85dvh; overflow: auto; padding: 24px; border: 1px solid #cbd5e1; border-radius: 8px; color: #17202a; }
.session-renew-dialog::backdrop { background: #0007; }
.session-renew-dialog label { display: grid; gap: 6px; margin: 12px 0; }
.session-renew-dialog input { min-width: 0; width: 100%; box-sizing: border-box; padding: 12px; font-size: 16px; }
.session-renew-dialog button, .boot-retry-panel button { padding: 12px; cursor: pointer; }
.session-renew-dialog [role="alert"] { color: #b42318; }
.session-renew-dialog form > div { display: flex; justify-content: space-between; gap: 12px; }
.boot-retry-panel { position: fixed; inset: auto 16px 24px; z-index: 10000; background: white; border: 1px solid #b42318; padding: 16px; border-radius: 8px; }

.timeline-summary-list{display:grid;gap:4px;margin-top:5px;text-align:left}.timeline-summary-row{display:grid;grid-template-columns:50px 56px minmax(76px,1fr);gap:8px;align-items:center;white-space:nowrap}.timeline-summary-row em{font-style:normal;color:var(--ink-muted)}.timeline-summary-row i{font-style:normal;color:var(--ink-muted)}.timeline-summary-row strong{font-weight:600}.customer-source-badge{white-space:nowrap}.boss-photo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.boss-photo-item{border:1px solid var(--line);border-radius:6px;padding:12px;display:grid;grid-template-columns:28px 1fr;gap:8px;background:var(--surface-soft)}.boss-photo-item b{color:var(--blue)}.boss-photo-item small{grid-column:2;color:var(--ink-muted)}

.boss-photo-preview{display:block;width:100%;aspect-ratio:4/3;overflow:hidden;border:1px solid #d8e4f3;border-radius:6px;background:#f4f8fc}.boss-photo-preview img{display:block;width:100%;height:100%;object-fit:cover}.boss-photo-item{min-width:132px}.boss-photo-item small{display:block;margin-top:5px;color:#6d7f96;font-size:12px}

.boss-photo-item .boss-photo-preview{grid-column:1/-1;grid-row:1;width:100%;min-height:150px}.boss-photo-item .boss-photo-preview img{min-height:150px}

.detail-modal.boss-detail-modal .detail-dialog{width:min(1180px,100%);max-height:min(900px,94vh)}.boss-gallery{display:grid;gap:14px}.boss-gallery-tabs{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:8px}.boss-gallery-tab{border:0;border-bottom:3px solid transparent;padding:9px 12px;background:transparent;color:var(--muted);cursor:pointer;font:inherit;font-weight:700}.boss-gallery-tab.active{color:#1769d2;border-bottom-color:#2470e8}.boss-gallery-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:14px;min-height:520px}.boss-gallery-stage{position:relative;min-height:480px;overflow:hidden;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px;background:#f2f5f8}.boss-gallery-stage [data-boss-gallery-main]{max-width:100%;max-height:100%;object-fit:contain;transition:transform .2s ease}.boss-gallery-main-empty{max-width:70%;padding:24px;color:var(--muted);text-align:center}.boss-gallery-nav{position:absolute;z-index:2;top:50%;width:42px;height:42px;border:0;border-radius:50%;background:#0f172acc;color:#fff;cursor:pointer;font-size:30px;line-height:1}.boss-gallery-nav.prev{left:16px}.boss-gallery-nav.next{right:16px}.boss-gallery-counter{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);border-radius:999px;padding:6px 12px;background:#0f172acc;color:#fff;font-size:12px}.boss-gallery-thumbs{display:grid;align-content:start;gap:10px;max-height:520px;overflow:auto}.boss-gallery-thumb{display:grid;gap:6px;padding:6px;border:2px solid var(--line);border-radius:7px;background:#fff;cursor:pointer;text-align:left}.boss-gallery-thumb.active{border-color:#2470e8}.boss-gallery-thumb img,.boss-gallery-thumb-empty{width:100%;aspect-ratio:16/10;display:grid;place-items:center;object-fit:cover;border-radius:4px;background:#f2f5f8;color:var(--muted);font-size:12px}.boss-gallery-thumb small{color:var(--ink);font-size:12px}.boss-gallery-footer{display:flex;justify-content:space-between;gap:12px;align-items:center;border-top:1px solid var(--line);padding-top:10px;color:var(--muted)}.boss-gallery-tools{display:flex;align-items:center;gap:8px}.boss-gallery-tools button,.boss-gallery-tools a{min-height:32px;padding:5px 10px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--ink);cursor:pointer;text-decoration:none}.boss-customer-fact-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;align-items:center}.boss-customer-fact-grid>*{padding:10px;border-bottom:1px solid #e7eef7}.boss-customer-fact-grid strong{grid-row:span 2;font-size:20px;color:#173f74}.boss-customer-visits,.boss-selected-visit{border:1px solid var(--line);border-radius:8px;padding:14px;margin-bottom:12px;background:#fff}.boss-customer-visits header,.boss-selected-visit header,.boss-return-media header{display:flex;justify-content:space-between;gap:12px;align-items:baseline}.boss-customer-visit-list{display:grid;gap:8px;margin-top:10px}.boss-customer-visit{display:grid;grid-template-columns:28px 72px 110px 1fr;gap:10px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);cursor:pointer;text-align:left}.boss-customer-visit.active{border-color:#2470e8;background:#f2f7ff;color:#1769d2}.boss-customer-visit-index{display:grid;width:24px;height:24px;place-items:center;border-radius:50%;background:#edf3fa}.boss-selected-visit-grid{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:12px}.boss-selected-visit-grid>div{padding:12px;border:1px solid #e2ebf5;border-radius:7px;background:#f8fbff}.boss-selected-visit-grid span{display:block;color:var(--muted);font-size:12px}.boss-customer-media-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}.boss-customer-media-card{display:grid;gap:6px;padding:0;border:1px solid var(--line);border-radius:7px;overflow:hidden;background:#fff;cursor:pointer;text-align:left}.boss-customer-media-card img,.boss-customer-media-empty{width:100%;aspect-ratio:16/10;display:grid;place-items:center;object-fit:cover;background:#f2f5f8;color:var(--muted)}.boss-customer-media-card>span:last-child{padding:0 9px 9px;color:var(--ink);font-size:12px}@media(max-width:760px){.detail-modal.boss-detail-modal .detail-dialog{max-height:94vh}.boss-gallery-layout,.boss-selected-visit-grid{grid-template-columns:1fr}.boss-gallery-stage{min-height:330px}.boss-gallery-thumbs{grid-template-columns:repeat(3,minmax(0,1fr));max-height:220px}.boss-customer-fact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.boss-customer-fact-grid strong{grid-row:auto;grid-column:1/-1}.boss-customer-visit{grid-template-columns:28px 60px 90px 1fr}.boss-customer-media-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
