:root {
  --ink: #1e293b;
  --muted: #64748b;
  --line: #d9e2ec;
  --surface: #ffffff;
  --page: #f5f7fb;
  --blue: #2f6fed;
  --green: #188a5a;
  --amber: #c97912;
  --red: #cf3f3f;
  --purple: #7c4dbe;
  --teal: #087f8c;
  --shadow: 0 16px 45px rgba(30, 41, 59, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.boot-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: var(--page);
  padding: 24px;
}

.boot-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(380px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.boot-card strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.boot-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: var(--page);
  padding: 24px;
}

.login-card {
  display: grid;
  gap: 16px;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 26px;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-card input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  padding: 8px 10px;
}

.wechat-login-button {
  min-height: 42px;
  border: 1px solid #b7dfc8;
  border-radius: 8px;
  color: #0f6b46;
  background: #f0fbf5;
  font-weight: 800;
}

.wechat-login-button:hover {
  background: #dcf7e8;
}

.wechat-login-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

button {
  cursor: pointer;
}

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

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

.sidebar {
  background: #172033;
  color: #f8fafc;
  padding: 24px 18px;
  min-width: 0;
  transition: padding 0.2s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-text {
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  background: #2f6fed;
  border-radius: 8px;
  font-weight: 800;
}

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

.brand span {
  color: #b7c2d6;
  font-size: 13px;
  margin-top: 3px;
}

.sidebar-toggle {
  display: grid;
  width: 32px;
  height: 32px;
  margin-left: auto;
  place-items: center;
  border: 1px solid rgba(217, 226, 236, 0.18);
  border-radius: 8px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
  font-size: 22px;
  line-height: 1;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

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

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group[hidden] {
  display: none;
}

.nav-group summary {
  cursor: pointer;
  list-style: none;
}

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

.nav-group-summary::after {
  content: "⌄";
  margin-left: auto;
  color: #9fb0c6;
  font-size: 12px;
}

.nav-group[open] .nav-group-summary::after {
  transform: rotate(180deg);
}

.nav-sublist {
  display: grid;
  gap: 6px;
  padding-left: 14px;
}

.nav-subitem {
  padding: 10px 12px;
  color: #c8d4e3;
  background: rgba(255, 255, 255, 0.04);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  color: #d9e2ec;
  background: transparent;
  text-align: left;
}

.nav-icon {
  display: none;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.nav-text {
  overflow: hidden;
  white-space: nowrap;
}

.nav-item:hover,
.nav-item.active,
.nav-group.active > .nav-group-summary {
  color: #ffffff;
  background: #26364f;
}

.sidebar-collapsed .sidebar {
  padding: 24px 14px;
}

.sidebar-collapsed .brand {
  justify-content: center;
}

.sidebar-collapsed .brand-text {
  display: none;
}

.sidebar-collapsed .brand-mark {
  width: 40px;
  height: 40px;
}

.sidebar-collapsed .sidebar-toggle {
  position: absolute;
  top: 70px;
  left: 22px;
  width: 32px;
  height: 28px;
  margin-left: 0;
  font-size: 18px;
}

.sidebar-collapsed .nav-list {
  margin-top: 48px;
}

.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 10px 8px;
}

.sidebar-collapsed .nav-group {
  gap: 4px;
}

.sidebar-collapsed .nav-group-summary::after {
  display: none;
}

.sidebar-collapsed .nav-sublist {
  padding-left: 0;
}

.sidebar-collapsed .nav-icon {
  display: grid;
}

.sidebar-collapsed .nav-text {
  display: none;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  padding: 24px;
}

@media (min-width: 621px) {
  .main {
    height: 100vh;
    overflow: auto;
  }
}

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

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

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

h1 {
  font-size: 28px;
}

h2 {
  font-size: 18px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-create-button,
.topbar-export-button {
  white-space: nowrap;
}

.mobile-account-menu {
  display: none;
}

.security-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #f2c94c;
  border-radius: 8px;
  background: #fff8db;
  color: #765100;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.search,
.account-switcher,
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px 12px;
}

.search {
  min-width: 280px;
}

.search-submit {
  height: 42px;
}

.config-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.ai-recognition-box,
.totp-setup {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
  background: #f8fbff;
}

.ai-recognition-box textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
}

.ai-actions,
.copy-line,
.inline-region {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.totp-setup img {
  display: block;
  width: 220px;
  height: 220px;
  margin: 12px auto;
}

.copy-line {
  justify-content: center;
}

.copy-line span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}

.inline-region .inline-edit-control {
  width: 80px;
}

.small-modal {
  max-width: 520px;
}

.account-switcher {
  min-width: 220px;
}

.user-chip {
  min-width: 220px;
  justify-content: space-between;
}

.search span,
.account-switcher span,
.user-chip span {
  color: var(--muted);
  font-size: 13px;
}

.search input,
.account-switcher select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.notification-button,
.primary-button,
.ghost-button,
.danger-button,
.segment {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  min-height: 40px;
}

.notification-button {
  position: relative;
  padding: 0 14px;
}

.badge {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.primary-button {
  border-color: var(--blue);
  color: #ffffff;
  background: var(--blue);
  padding: 0 14px;
}

.ghost-button {
  padding: 0 12px;
}

.danger-button {
  margin-right: auto;
  padding: 0 12px;
  color: #b42318;
  border-color: #f4b4ab;
  background: #fff5f3;
}

.danger-button:hover {
  color: #8f1d12;
  background: #ffe7e2;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.stamp-tool-view.active {
  display: flex;
  min-height: calc(100vh - 150px);
}

.stamp-tool-frame {
  width: 100%;
  min-height: calc(100vh - 150px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.dashboard-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px;
  margin-bottom: 18px;
}

.customer-date-filter {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.customer-date-filter > .segmented {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
}

.customer-date-filter > .date-range {
  flex: 0 0 auto;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-range label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.date-range input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  padding: 7px 9px;
}

.dashboard-sales-filter {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 0 8px 0 10px;
}

.dashboard-sales-filter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-sales-filter select {
  min-width: 112px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 800;
  padding: 0 18px 0 0;
}

.dashboard-sales-filter:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.summary-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

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

.metric-card {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  min-height: 128px;
  padding: 18px;
  text-align: left;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 10px 0;
  font-size: 32px;
}

.metric-card.is-blue {
  border-left-color: var(--blue);
}

.metric-card.is-amber {
  border-left-color: var(--amber);
}

.metric-card.is-red {
  border-left-color: var(--red);
}

.metric-card.is-green {
  border-left-color: var(--green);
}

.metric-card.is-purple {
  border-left-color: var(--purple);
}

.metric-card.is-slate {
  border-left-color: var(--muted);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.dashboard-panel {
  margin-top: 18px;
}

.panel,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.config-panel {
  margin-bottom: 18px;
}

.panel-head,
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.filter-stack {
  display: grid;
  gap: 8px;
}

#customers .toolbar {
  display: block;
  flex: 0 0 auto;
}

#customers .filter-stack {
  width: 100%;
}

.taobao-ops-summary {
  margin-bottom: 18px;
}

.taobao-ops-table th,
.taobao-ops-table td {
  white-space: nowrap;
}

.taobao-ops-table td:nth-child(2),
.taobao-ops-table td:nth-child(5) {
  white-space: normal;
}

.consultation-thumb-button {
  display: inline-grid;
  width: 56px;
  height: 56px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
  cursor: pointer;
}

.consultation-thumb-button img,
#consultationImagePreview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.consultation-image-field {
  display: grid;
  gap: 8px;
}

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

.consultation-image-control {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 132px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}

.consultation-image-control.drag-over {
  border-color: var(--primary);
  background: #eef6ff;
}

.consultation-image-control:focus,
.consultation-image-control:focus-visible {
  border-color: var(--primary);
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
  background: #eef6ff;
}

.consultation-image-control span {
  color: var(--muted);
  font-size: 13px;
}

#consultationImagePreview {
  grid-column: 1 / -1;
  width: 120px;
  height: 120px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.image-preview-dialog img {
  display: block;
  width: min(640px, 82vw, 70vh);
  aspect-ratio: 1;
  max-height: 70vh;
  border-radius: 8px;
  object-fit: contain;
  background: #f8fafc;
}

.muted-text {
  color: var(--muted);
}

.filter-panel {
  display: grid;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 12px;
}

.filter-compact-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.advanced-filter-panel {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.advanced-filter-toggle {
  grid-column: 3;
  justify-self: end;
  white-space: nowrap;
}

.advanced-filter-toggle.has-active-filters {
  color: var(--blue);
  border-color: #bfdbfe;
  background: #eff6ff;
}

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

.quick-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, 0.9fr);
  align-items: end;
  gap: 12px 16px;
}

.filter-select-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 10px;
}

.filter-select-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filter-select-row select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  padding: 6px 10px;
}

.filter-group {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

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

.filter-group-title,
.selected-filter-label,
.saved-filter-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-options,
.source-filter-options,
.selected-filter-list,
.saved-filter-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.source-filter-options {
  display: grid;
  gap: 8px;
}

.source-extra-options {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.source-detail-group {
  display: grid;
  gap: 6px;
}

.source-detail-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.more-source-button {
  color: var(--blue);
  border-color: #bfdbfe;
  background: #eff6ff;
}

.selected-filter-tags,
.saved-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.saved-filter-bar {
  justify-content: flex-start;
  padding: 0;
  background: transparent;
}

.saved-filter-list {
  flex: 1;
}

.saved-filter-menu {
  position: relative;
}

.saved-filter-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  padding: 0 12px;
}

.saved-filter-menu summary::-webkit-details-marker {
  display: none;
}

.saved-filter-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 10px;
}

.saved-filter-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.saved-filter-option > button:first-child {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  padding: 0 9px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.save-filter-menu-action {
  justify-content: center;
  width: 100%;
}

.filter-tag,
.filter-clear-button,
.saved-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}

.filter-tag span,
.saved-filter-delete {
  color: var(--muted);
  font-weight: 800;
}

.filter-clear-button {
  color: #b42318;
  border-color: #fecaca;
  background: #fff7f7;
}

.saved-filter-chip {
  padding: 0 4px 0 10px;
}

.saved-filter-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  min-height: 30px;
  padding: 0 4px;
}

.saved-filter-delete {
  min-width: 24px;
  border-radius: 999px;
}

.filter-date-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding-top: 0;
}

.custom-date-fields {
  display: none;
}

.custom-date-fields.is-visible {
  display: flex;
}

.bulk-action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 12px;
}

.bulk-action-bar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.bulk-action-bar select {
  min-height: 36px;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 6px 9px;
}

.source-date-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  width: 100%;
  gap: 12px;
}

.source-date-row #sourceChannelFilter {
  min-width: 0;
}

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

.inline-create {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-create input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.inline-create select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
}

.flat-table {
  box-shadow: none;
}

.segment {
  padding: 0 12px;
}

.segment.active {
  color: #ffffff;
  border-color: var(--ink);
  background: var(--ink);
}

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

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

.notice-item.unread {
  border-color: #99b9f4;
  background: #eef5ff;
}

.notice-item strong,
.notice-item span,
.notice-item small {
  display: block;
}

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

.notice-item small {
  margin-top: 5px;
}

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

.customer-table .customer-action-cell .row-actions {
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}

.customer-table .customer-action-cell .mini-button {
  white-space: nowrap;
}

.wechat-binding-cell {
  display: grid;
  gap: 4px;
  max-width: 260px;
}

.wechat-binding-cell strong {
  font-size: 13px;
}

.wechat-binding-cell span {
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  word-break: break-all;
}

.muted-text {
  color: var(--muted);
}

.mini-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
}

.mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.mini-button.danger-text {
  border-color: #fecaca;
  color: #b91c1c;
}

.link-button {
  border: 0;
  color: var(--blue);
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 800;
}

.sales-summary-table .link-button {
  color: var(--ink);
}

.sales-summary-table {
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

.sales-rank-grid {
  grid-template-columns: minmax(0, 1fr);
}

.sales-summary-table th,
.sales-summary-table td {
  padding: 11px 14px;
}

.sales-summary-table th {
  color: #334155;
  background: #f1f5f9;
  font-weight: 900;
}

.sales-summary-table th:first-child,
.sales-summary-table td:first-child {
  text-align: left;
}

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

.sales-summary-table tbody tr:hover {
  background: #f8fbff;
}

.sales-summary-table tbody tr.has-pending {
  background: #fffaf0;
}

.summary-badge {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
}

.summary-badge.pending {
  color: #92400e;
  background: #fef3c7;
}

.summary-badge.muted {
  color: #64748b;
  background: #f1f5f9;
}

.table-wrap {
  overflow: auto;
}

.customer-table-wrap {
  flex: none;
  position: relative;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 13px;
}

.customer-table {
  min-width: 1480px;
}

.customer-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
}

.customer-table th[data-customer-column-head],
.taobao-ops-table th[data-taobao-ops-column-head] {
  position: sticky;
}

.customer-column-head-inner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}

.column-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
}

.column-filter-button:hover,
.column-filter-button.active {
  border-color: var(--line);
  background: #ffffff;
  color: var(--blue);
}

.customer-table th.has-column-filter,
.taobao-ops-table th.has-column-filter {
  color: var(--blue);
}

.customer-table th.column-filter-open,
.taobao-ops-table th.column-filter-open {
  z-index: 30;
}

.customer-table th:first-child.column-filter-open {
  z-index: 31;
}

.customer-column-filter-menu {
  position: absolute;
  top: calc(100% - 1px);
  left: 8px;
  width: 270px;
  max-width: min(270px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
  color: var(--ink);
  font-size: 13px;
  white-space: normal;
}

.customer-column-filter-title {
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--ink);
}

.customer-column-filter-search {
  width: 100%;
  min-height: 34px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  outline: none;
}

.customer-column-filter-search:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.customer-column-filter-tools,
.customer-column-filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.customer-column-filter-tools {
  margin-bottom: 8px;
}

.customer-column-filter-options {
  max-height: 220px;
  overflow: auto;
  border: 1px solid #eef2f7;
  border-radius: 7px;
  background: #f8fafc;
}

.customer-column-filter-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border-bottom: 1px solid #eef2f7;
  cursor: pointer;
}

.customer-column-filter-option:last-child {
  border-bottom: 0;
}

.customer-column-filter-option:hover {
  background: #ffffff;
}

.customer-column-filter-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

.customer-column-filter-option small {
  color: var(--muted);
  font-size: 12px;
}

.customer-column-filter-empty {
  padding: 14px;
  color: var(--muted);
  text-align: center;
}

.customer-column-filter-actions {
  margin-top: 10px;
  justify-content: flex-end;
}

.customer-column-filter-actions .primary-button,
.customer-column-filter-actions .mini-button {
  min-height: 32px;
  padding: 6px 12px;
}

.customer-table th:first-child,
.customer-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 180px;
  min-width: 180px;
  max-width: 220px;
  background: #ffffff;
  box-shadow: 8px 0 14px -13px rgba(15, 23, 42, 0.42);
}

.customer-table th:first-child {
  z-index: 7;
  background: #f8fafc;
}

.customer-table th:last-child,
.customer-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 4;
  width: 250px;
  min-width: 250px;
  background: #ffffff;
  box-shadow: -8px 0 14px -13px rgba(15, 23, 42, 0.42);
}

.customer-table th:last-child {
  z-index: 8;
  background: #f8fafc;
}

.customer-table .inline-editing-row td,
.customer-table .inline-editing-row td:first-child,
.customer-table .inline-editing-row td:last-child {
  background: #f6f9ff;
}

.customer-table .empty-row td {
  position: static;
  width: auto;
  min-width: 0;
  max-width: none;
  background: #ffffff;
  box-shadow: none;
}

.mobile-customer-card-cell {
  display: none;
}

.mobile-customer-filter-menu {
  display: none;
}

.customer-pagination {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.pagination-total {
  margin-right: 4px;
  color: var(--ink);
}

.pagination-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.pagination-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  color: var(--blue);
  background: #eff6ff;
  font-weight: 800;
}

.pagination-size,
.pagination-jump-input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  padding: 6px 9px;
}

.pagination-size {
  min-width: 108px;
}

.pagination-jump-input {
  width: 74px;
}

.customer-name-cell strong {
  color: var(--ink);
  font-weight: 700;
}

.customer-contact-cell {
  color: var(--muted);
  font-weight: 400;
}

.note-cell {
  max-width: 320px;
  line-height: 1.5;
}

.note-ellipsis {
  display: block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.high-priority-row td:first-child {
  box-shadow: inset 4px 0 0 #ef4444, 8px 0 14px -13px rgba(15, 23, 42, 0.42);
}

.priority-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.inline-editing-row {
  background: #f6f9ff;
}

.inline-edit-control {
  width: 100%;
  min-width: 118px;
  min-height: 36px;
  border: 1px solid #b9cdf2;
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  padding: 7px 9px;
  font: inherit;
}

.inline-edit-textarea {
  min-width: 220px;
  resize: vertical;
}

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

.inline-save-state {
  align-self: center;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 700;
}

.inline-save-state.saving {
  color: #1d4ed8;
  background: #e8f1ff;
}

.inline-save-state.saved {
  color: #0f6842;
  background: #e4f8ed;
}

.inline-save-state.failed {
  color: #b42318;
  background: #fff0ee;
}

.status {
  display: inline-flex;
  min-width: 74px;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.status.new {
  color: #1d4ed8;
  background: #dbeafe;
}

.status.pending {
  color: #6d28d9;
  background: #ede9fe;
}

.status.following {
  color: #b45309;
  background: #fef3c7;
}

.status.closed {
  color: #047857;
  background: #d1fae5;
}

.status.finished {
  color: #475569;
  background: #e2e8f0;
}

.status.invalid {
  color: #991b1b;
  background: #fee2e2;
}

.intent-badge {
  display: inline-flex;
  min-width: 58px;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.intent-h {
  color: #b91c1c;
  background: #fee2e2;
}

.intent-a {
  color: #c2410c;
  background: #ffedd5;
}

.intent-b {
  color: #1d4ed8;
  background: #dbeafe;
}

.intent-c {
  color: #475569;
  background: #e2e8f0;
}

.ops-high {
  color: #047857;
  background: #d1fae5;
}

.intent-badge.muted {
  color: #64748b;
  background: #f1f5f9;
}

.bar-list,
.rank-list,
.funnel {
  display: grid;
  gap: 12px;
}

.bar-row,
.rank-row,
.funnel-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: center;
}

.ops-rank-row {
  grid-template-columns: 130px minmax(0, 1fr) 64px;
}

.bar-track,
.rank-track,
.funnel-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.bar-fill,
.rank-fill,
.funnel-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.rank-fill {
  background: var(--green);
}

.funnel-fill {
  background: var(--purple);
}

.bar-row.is-zero .bar-track,
.rank-row.is-zero .rank-track,
.funnel-row.is-zero .funnel-track {
  background: #f1f5f9;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  border-radius: 8px;
  color: #ffffff;
  background: #172033;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(30, 41, 59, 0.22);
  overflow: hidden;
  padding: 0;
}

.wide-modal {
  width: min(1180px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
}

.alert-modal {
  width: min(560px, calc(100vw - 32px));
}

.modal::backdrop {
  background: rgba(23, 32, 51, 0.42);
}

.modal form {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 20px;
}

.detail-modal {
  padding: 20px;
}

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

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

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

.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
}

.checkbox-field {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
}

.checkbox-field[hidden] {
  display: none !important;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
}

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

.choice-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 8px !important;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink) !important;
  padding: 8px 10px;
}

.choice-pill input {
  width: 16px;
  min-height: 16px;
}

.form-grid textarea {
  min-height: 112px;
  resize: vertical;
}

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.wechat-bind-summary {
  border: 1px solid #d9e3f0;
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
  color: #26364a;
}

.wechat-qr-box {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 1px dashed #cbd8e7;
  border-radius: 8px;
  background: #fff;
}

.wechat-qr-box img {
  width: min(260px, 70vw);
  aspect-ratio: 1;
  object-fit: contain;
}

.wechat-qr-box img[hidden] {
  display: none;
}

.duplicate-customer-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.duplicate-customer-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.duplicate-customer-item:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.12);
}

.duplicate-customer-item span {
  color: var(--muted);
  font-size: 13px;
}

.duplicate-customer-item em {
  color: var(--blue);
  font-size: 13px;
  font-style: normal;
}

.deal-fields {
  border: 1px solid #b7dfc8;
  border-radius: 8px;
  background: #f0fbf5;
  padding: 14px;
  margin-top: 14px;
}

.compact-head {
  margin-bottom: 12px;
}

.deal-line {
  border-left: 3px solid var(--green);
  background: #f0fbf5;
  padding: 8px 10px;
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  margin-bottom: 14px;
}

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

.contact-card {
  display: grid;
  gap: 8px;
  grid-column: span 3;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  padding: 12px;
}

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

.contact-card strong {
  color: var(--text);
  font-size: 22px;
  letter-spacing: 0;
}

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

.alert-summary {
  grid-template-columns: 1fr 1fr;
  border-color: #99b9f4;
  background: #eef5ff;
}

.detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}

.inline-editor {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  margin: -4px 0 16px;
}

.inline-editor label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.inline-editor select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
}

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

.history-grid h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.timeline {
  display: grid;
  gap: 10px;
  max-height: 52vh;
  overflow: auto;
  padding-right: 4px;
}

.timeline-item,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.timeline-item strong,
.timeline-item span,
.timeline-item small {
  display: block;
}

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

.timeline-item p {
  margin: 8px 0;
  line-height: 1.5;
}

.detail-workbench {
  display: flex;
  max-height: calc(100vh - 24px);
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.detail-workbench-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}

.detail-title-block {
  min-width: 0;
}

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

.detail-title-row h2 {
  margin: 0;
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.detail-head-actions #detailSaveChanges {
  min-width: 96px;
}

.detail-draft-status {
  border: 1px solid #d7e0ec;
  border-radius: 6px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  padding: 8px 10px;
}

.detail-draft-status.dirty {
  border-color: #f4c26b;
  background: #fff8e7;
  color: #925c00;
}

.detail-workbench-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  max-height: calc(100vh - 92px);
  min-height: 620px;
}

.detail-main-panel,
.detail-side-panel {
  min-height: 0;
  overflow: auto;
}

.detail-main-panel {
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 18px;
}

.detail-side-panel {
  background: #f8fafc;
}

.detail-section {
  padding: 14px 0;
}

.detail-section + .detail-section,
.detail-record-panel {
  border-top: 1px solid #e8edf5;
}

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

.detail-section-head h3 {
  margin: 0;
  font-size: 15px;
}

.detail-stage-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
}

.detail-stage-step {
  position: relative;
  display: grid;
  min-height: 40px;
  place-items: center;
  border: 1px solid #cfe0f6;
  border-radius: 0;
  background: #f8fbff;
  color: #3975be;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0 10px;
}

.detail-stage-step:not(:last-child)::after {
  position: absolute;
  z-index: 1;
  right: -12px;
  width: 22px;
  height: 22px;
  border-top: 1px solid #cfe0f6;
  border-right: 1px solid #cfe0f6;
  background: inherit;
  content: "";
  transform: rotate(45deg);
}

.detail-stage-step span {
  position: relative;
  z-index: 2;
}

.detail-stage-step.passed,
.detail-stage-step.active {
  border-color: var(--blue);
  background: #2f80ed;
  color: #ffffff;
}

.detail-stage-step.active {
  background: #1f6fe5;
}

.detail-stage-step:disabled {
  cursor: default;
  opacity: 1;
}

#detailTerminalStatus {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.detail-terminal-button {
  min-height: 32px;
  border: 1px solid #cbd8e7;
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 6px 10px;
}

.detail-terminal-button.finished,
.detail-terminal-button.invalid {
  border-color: #f3b7b7;
  background: #fff1f2;
  color: #b42318;
}

.quick-follow-box {
  border: 1px solid #8bb8ff;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.quick-follow-box textarea {
  width: 100%;
  min-height: 112px;
  border: 0;
  resize: vertical;
}

.quick-follow-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 8px;
}

.quick-follow-actions span {
  flex: 1;
  color: var(--muted);
  font-size: 13px;
}

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

.detail-choice-group,
.detail-inline-field,
.detail-check-choice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid #d8e3f1;
  border-radius: 6px;
  background: #ffffff;
  color: #395069;
  padding: 8px;
  font-size: 13px;
}

.detail-choice-group > span,
.detail-inline-field > span {
  color: #34465c;
  font-weight: 700;
}

.detail-choice {
  min-height: 30px;
  border: 1px solid #cbd8e7;
  border-radius: 6px;
  background: #ffffff;
  color: #40546b;
  padding: 5px 9px;
}

.detail-choice.active,
.detail-check-choice.active {
  border-color: #9cc3ff;
  background: #eff6ff;
  color: #0f56c5;
}

.detail-check-choice {
  cursor: pointer;
}

.detail-check-choice input {
  width: 16px;
  min-height: 16px;
}

.detail-inline-field input,
.detail-inline-field select {
  min-width: 160px;
  min-height: 32px;
  border: 1px solid #d7e0ec;
  border-radius: 6px;
  background: #ffffff;
  color: #25364b;
  padding: 6px 8px;
}

.detail-record-panel {
  padding-top: 14px;
}

.detail-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--line);
}

.detail-tab {
  min-height: 38px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #40546b;
  padding: 8px 12px;
}

.detail-tab.active {
  border-bottom-color: var(--blue);
  color: #0f56c5;
  font-weight: 700;
}

.detail-tab-content {
  padding-top: 14px;
}

.detail-log-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.detail-log-head,
.detail-log-row {
  display: grid;
  grid-template-columns: 130px 120px minmax(0, 1fr) 170px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.detail-log-head {
  background: #f8fafc;
  color: #34465c;
  font-weight: 700;
}

.detail-log-row {
  border-top: 1px solid var(--line);
}

.detail-log-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-side-content {
  padding: 14px;
}

.detail-side-title {
  border-radius: 6px;
  background: #eef2f7;
  color: #25364b;
  font-weight: 700;
  padding: 8px 10px;
  text-align: center;
}

.detail-side-info,
.detail-basic-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

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

.detail-side-field {
  display: grid;
  gap: 6px;
}

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

.detail-side-field > span {
  color: #34465c;
  font-size: 13px;
  font-weight: 700;
}

.detail-readonly {
  min-height: 38px;
  border: 1px solid #d7e0ec;
  border-radius: 6px;
  background: #ffffff;
  color: #25364b;
  padding: 9px 10px;
  overflow-wrap: anywhere;
}

.detail-side-field input,
.detail-side-field select,
.detail-side-field textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d7e0ec;
  border-radius: 6px;
  background: #ffffff;
  color: #25364b;
  padding: 8px 10px;
}

.detail-side-field textarea {
  resize: vertical;
}

.detail-side-field input:disabled,
.detail-side-field select:disabled,
.detail-side-field textarea:disabled {
  background: #f1f5f9;
  color: #708096;
}

.detail-checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.detail-region-editor {
  display: grid;
  gap: 8px;
}

.detail-region-button {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d7e0ec;
  border-radius: 6px;
  background: #ffffff;
  color: #25364b;
  padding: 8px 10px;
  text-align: left;
}

.detail-region-popover {
  display: grid;
  gap: 8px;
  border: 1px solid #dbe6f3;
  border-radius: 6px;
  background: #f8fbff;
  padding: 10px;
}

.detail-region-popover label {
  display: grid;
  gap: 5px;
}

.detail-region-popover span {
  color: #52667d;
  font-size: 12px;
}

.detail-checkbox-field input {
  width: 16px;
  min-height: 16px;
}

.detail-contact-card {
  display: grid;
  gap: 8px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  padding: 12px;
}

.detail-contact-card span {
  color: var(--muted);
  font-size: 13px;
}

.detail-contact-card strong {
  font-size: 22px;
}

.detail-intent-editor {
  display: grid;
  margin: 14px 0 0;
  justify-content: stretch;
}

.detail-intent-editor label,
.detail-intent-editor button {
  width: 100%;
}

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

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 14px;
  }

  .sidebar-toggle {
    display: none;
  }

  .sidebar-collapsed .brand-text {
    display: block;
  }

  .sidebar-collapsed .nav-list {
    margin-top: 0;
  }

  .sidebar-collapsed .nav-text {
    display: inline;
  }

  .sidebar-collapsed .nav-icon {
    display: none;
  }

  .brand {
    margin-bottom: 12px;
  }

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

  .nav-item {
    text-align: center;
    padding: 10px 8px;
  }

  .nav-group {
    min-width: 0;
  }

  .nav-sublist {
    padding-left: 0;
  }

  .topbar,
  .topbar-actions,
  .toolbar,
  .dashboard-filter,
  .content-grid {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

  .search {
    min-width: 0;
  }

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

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

  .quick-filter-grid {
    grid-template-columns: 1fr;
  }

  .filter-date-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .customer-date-filter {
    justify-content: flex-start;
  }

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

  .wide-modal {
    width: min(100vw - 16px, 920px);
  }

  .detail-workbench-body {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 86px);
    min-height: 0;
  }

  .detail-main-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-side-panel {
    max-height: none;
  }

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

  .detail-log-head,
  .detail-log-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 620px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .main {
    padding: 12px 12px 84px;
  }

  .sidebar {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    border-top: 1px solid var(--line);
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }

  .brand {
    display: none;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
    gap: 4px;
  }

  .nav-group {
    display: grid;
    gap: 4px;
  }

  .nav-group-summary::after {
    display: none;
  }

  .nav-sublist {
    display: grid;
    padding-left: 0;
  }

  .nav-item {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 52px;
    border-radius: 8px;
    color: var(--muted);
    padding: 5px 2px;
    text-align: center;
  }

  .nav-icon {
    display: grid;
    width: 22px;
    height: 22px;
    flex-basis: 22px;
    color: inherit;
    background: #eef2f7;
    font-size: 12px;
  }

  .nav-text {
    display: block;
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .nav-item:hover,
  .nav-item.active,
  .nav-group.active > .nav-group-summary {
    color: var(--blue);
    background: #eaf2ff;
  }

  .topbar {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
  }

  .topbar > div:first-child {
    min-width: 0;
  }

  .topbar .eyebrow {
    margin-bottom: 2px;
    font-size: 11px;
  }

  .topbar h1 {
    font-size: 22px;
    line-height: 1.15;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    align-items: center;
  }

  .topbar-actions .user-chip {
    display: none;
  }

  .mobile-account-menu {
    display: block;
    position: relative;
    min-width: 0;
    order: 1;
  }

  .mobile-account-menu summary {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    padding: 0 8px;
    list-style: none;
  }

  .mobile-account-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-account-menu summary span {
    overflow: hidden;
    max-width: 68px;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-account-menu summary strong {
    font-size: 13px;
  }

  .mobile-account-actions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    display: grid;
    width: 188px;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 10px;
  }

  .mobile-account-actions .mini-button {
    width: 100%;
    white-space: nowrap;
  }

  .topbar-export-button,
  .topbar-create-button,
  .notification-button {
    min-height: 40px;
    padding: 0 10px;
  }

  .topbar-export-button {
    order: 2;
  }

  .topbar-create-button {
    order: 3;
  }

  .notification-button {
    order: 4;
  }

  .search {
    grid-column: 1 / -1;
    min-width: 0;
    min-height: 40px;
    padding: 7px 10px;
    order: 5;
  }

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

  .security-warning {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.45;
  }

  .security-warning .mini-button {
    min-height: 34px;
    padding: 6px 9px;
    white-space: nowrap;
  }

  .dashboard-filter {
    display: grid;
    gap: 8px;
    padding: 8px;
    margin-bottom: 10px;
  }

  .customer-date-filter {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .filter-panel {
    gap: 10px;
    padding: 10px;
  }

  .filter-compact-row {
    grid-template-columns: 1fr auto;
  }

  .advanced-filter-toggle {
    grid-column: auto;
  }

  .filter-compact-row .selected-filter-tags {
    grid-column: 1 / -1;
  }

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

  .saved-filter-dropdown {
    min-width: min(280px, calc(100vw - 32px));
  }

  .saved-filter-bar,
  .selected-filter-tags {
    align-items: stretch;
    gap: 8px;
  }

  .saved-filter-list,
  .selected-filter-list,
  .filter-options {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .saved-filter-list::-webkit-scrollbar,
  .selected-filter-list::-webkit-scrollbar,
  .filter-options::-webkit-scrollbar {
    display: none;
  }

  .filter-group-title,
  .selected-filter-label,
  .saved-filter-title {
    font-size: 12px;
  }

  .customer-date-filter > .segmented {
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .customer-date-filter > .segmented::-webkit-scrollbar {
    display: none;
  }

  .dashboard-filter .segmented {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-filter .segmented::-webkit-scrollbar {
    display: none;
  }

  .dashboard-filter .segment,
  .customer-date-filter > .segmented .segment {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 12px;
    white-space: nowrap;
  }

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

  .custom-date-fields {
    display: none;
  }

  .custom-date-fields.is-visible {
    display: grid;
  }

  .date-range label {
    display: grid;
    gap: 4px;
    font-size: 11px;
  }

  .date-range .dashboard-sales-filter {
    display: flex;
    min-height: 34px;
    padding: 0 8px;
  }

  .dashboard-sales-filter select {
    width: 100%;
    min-width: 0;
  }

  .date-range input {
    width: 100%;
    min-height: 34px;
    padding: 5px 7px;
  }

  .summary-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 92px;
    padding: 12px;
  }

  .metric-card strong {
    margin: 6px 0;
    font-size: 24px;
  }

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

  .form-grid,
  .detail-summary,
  .history-grid {
    grid-template-columns: 1fr;
  }

  .detail-workbench-head,
  .detail-section-head,
  .quick-follow-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .detail-head-actions .icon-button {
    width: 100%;
  }

  .detail-main-panel,
  .detail-side-content {
    padding: 12px;
  }

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

  .detail-stage-step:not(:last-child)::after {
    display: none;
  }

  .detail-tabs {
    overflow-x: auto;
  }

  .detail-tab {
    flex: 0 0 auto;
  }

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

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

  .customer-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 12px;
  }

  .customer-table-wrap {
    flex: none;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .customer-table thead {
    display: none;
  }

  .customer-table,
  .customer-table tbody,
  .customer-table tr,
  .customer-table td {
    display: block;
    width: 100%;
  }

  .customer-table tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 8px 0;
  }

  .customer-table th,
  .customer-table th:first-child,
  .customer-table th:last-child,
  .customer-table td:first-child,
  .customer-table td:last-child {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: none;
    box-shadow: none;
  }

  .customer-table .high-priority-row {
    border-left: 4px solid #ef4444;
  }

  .customer-table tr.empty-row {
    padding: 0;
  }

  .customer-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    border-bottom: 0;
    padding: 9px 12px;
  }

  .customer-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .customer-table .empty-row td,
  .customer-table td[data-label="操作"] {
    display: block;
  }

  .customer-table .note-ellipsis {
    max-width: 100%;
  }

  .customer-table .empty-row td::before,
  .customer-table td[data-label="操作"]::before {
    display: none;
  }

  .customer-table .row-actions {
    margin-top: 4px;
  }

  .customer-table .mini-button,
  .customer-table .inline-edit-control,
  .customer-table .inline-edit-textarea {
    width: 100%;
  }

  .app-shell[data-active-view="customers"] .main {
    background: #f3f6fa;
    padding: 0 10px 84px;
  }

  .app-shell[data-active-view="customers"] .topbar {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin: 0 -10px 8px;
    border-bottom: 1px solid #edf1f6;
    background: #ffffff;
    padding: 8px 10px 10px;
  }

  .app-shell[data-active-view="customers"] .topbar > div:first-child {
    display: none;
  }

  .app-shell[data-active-view="customers"] .topbar .eyebrow {
    display: none;
  }

  .app-shell[data-active-view="customers"] .topbar h1 {
    font-size: 20px;
    font-weight: 900;
    line-height: 1.15;
  }

  .app-shell[data-active-view="customers"] .topbar-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .app-shell[data-active-view="customers"] .mobile-account-menu summary,
  .app-shell[data-active-view="customers"] .topbar-export-button,
  .app-shell[data-active-view="customers"] .topbar-create-button,
  .app-shell[data-active-view="customers"] .notification-button,
  .app-shell[data-active-view="customers"] .search-submit {
    min-height: 34px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    padding: 0 8px;
    white-space: nowrap;
  }

  .app-shell[data-active-view="customers"] .search {
    grid-column: 1 / 4;
    order: 5;
    min-height: 38px;
    border-color: #e5ebf2;
    border-radius: 999px;
    background: #f8fafc;
    padding: 6px 12px;
  }

  .app-shell[data-active-view="customers"] .search-submit {
    grid-column: 4;
    order: 6;
  }

  .app-shell[data-active-view="customers"] .search span {
    display: none;
  }

  .app-shell[data-active-view="customers"] .search input {
    min-width: 0;
    font-size: 14px;
  }

  .app-shell[data-active-view="customers"] #customers .toolbar {
    position: sticky;
    top: 0;
    z-index: 18;
    margin: 0 -10px 12px;
    background: #f3f6fa;
    padding: 0 10px 8px;
  }

  .app-shell[data-active-view="customers"] .filter-panel {
    gap: 7px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .app-shell[data-active-view="customers"] .mobile-customer-filter-menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    min-height: 48px;
    border-bottom: 1px solid #eef2f7;
    background: #ffffff;
    margin: 0 -10px;
  }

  .app-shell[data-active-view="customers"] .mobile-customer-filter-menu button {
    display: inline-flex;
    min-width: 0;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: #2f3440;
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
  }

  .app-shell[data-active-view="customers"] .mobile-customer-filter-menu button.active,
  .app-shell[data-active-view="customers"] .mobile-customer-filter-menu button:first-child,
  .app-shell[data-active-view="customers"] .mobile-customer-filter-menu button:last-child {
    color: var(--blue);
  }

  .app-shell[data-active-view="customers"] .mobile-customer-filter-menu span {
    color: currentColor;
    font-size: 11px;
  }

  .app-shell[data-active-view="customers"] .filter-compact-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .app-shell[data-active-view="customers"] [data-mobile-filter-panel] {
    display: none;
  }

  .app-shell[data-active-view="customers"] .filter-panel.mobile-menu-follow [data-mobile-filter-panel="follow"] {
    display: block;
  }

  .app-shell[data-active-view="customers"] .filter-panel.mobile-menu-tag [data-mobile-filter-panel="tag"] {
    display: block;
  }

  .app-shell[data-active-view="customers"] .filter-panel.mobile-menu-filter .filter-compact-row[data-mobile-filter-panel="filter"] {
    display: flex;
  }

  .app-shell[data-active-view="customers"] .filter-panel.mobile-menu-filter .quick-filter-grid[data-mobile-filter-panel="filter"] {
    display: grid;
  }

  .app-shell[data-active-view="customers"] .advanced-filter-toggle {
    display: none;
  }

  .app-shell[data-active-view="customers"] .quick-filter-grid {
    gap: 7px;
  }

  .app-shell[data-active-view="customers"] .filter-group-title {
    display: none;
  }

  .app-shell[data-active-view="customers"] .filter-options {
    gap: 6px;
  }

  .app-shell[data-active-view="customers"] .segment {
    flex: 0 0 auto;
    min-height: 34px;
    border: 0;
    border-radius: 7px;
    background: #ffffff;
    color: #5f6b7a;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    padding: 0 12px;
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
  }

  .app-shell[data-active-view="customers"] .segment.active {
    color: #ffffff;
    background: #2f80ed;
  }

  .app-shell[data-active-view="customers"] .filter-select-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .app-shell[data-active-view="customers"] .filter-select-row label {
    color: #2b3441;
    font-size: 11px;
    gap: 4px;
  }

  .app-shell[data-active-view="customers"] .filter-select-row select {
    min-height: 32px;
    border: 0;
    border-radius: 7px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    font-weight: 800;
    font-size: 13px;
    padding: 4px 7px;
  }

  .app-shell[data-active-view="customers"] .advanced-filter-toggle,
  .app-shell[data-active-view="customers"] .saved-filter-menu summary {
    min-height: 32px;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: var(--blue);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    font-size: 12px;
    font-weight: 900;
    padding: 0 10px;
  }

  .app-shell[data-active-view="customers"] .saved-filter-bar {
    flex: 0 0 auto;
  }

  .app-shell[data-active-view="customers"] .selected-filter-tags {
    order: 3;
    width: 100%;
    gap: 6px;
    background: transparent;
    padding: 0;
  }

  .app-shell[data-active-view="customers"] .selected-filter-label {
    display: none;
  }

  .app-shell[data-active-view="customers"] .selected-filter-list {
    gap: 6px;
  }

  .app-shell[data-active-view="customers"] .filter-tag,
  .app-shell[data-active-view="customers"] .filter-clear-button {
    min-height: 30px;
    border-radius: 999px;
    font-size: 12px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .app-shell[data-active-view="customers"] .customer-date-filter > .segmented {
    margin-right: -10px;
    padding-right: 10px;
  }

  .app-shell[data-active-view="customers"] .customer-date-filter > .segmented .segment {
    min-height: 32px;
    padding: 0 12px;
  }

  .app-shell[data-active-view="customers"] .advanced-filter-panel {
    border-top: 0;
    padding-top: 0;
  }

  .app-shell[data-active-view="customers"] .customer-table-wrap {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding-top: 0;
  }

  .app-shell[data-active-view="customers"] .customer-table {
    border-spacing: 0;
  }

  .app-shell[data-active-view="customers"] .customer-table tbody {
    display: grid;
    gap: 14px;
  }

  .app-shell[data-active-view="customers"] .customer-table tr {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .app-shell[data-active-view="customers"] .customer-table tr:not(.empty-row) > td:not(.mobile-customer-card-cell) {
    display: none;
  }

  .app-shell[data-active-view="customers"] .customer-table .mobile-customer-card-cell {
    display: block;
    border: 0;
    background: transparent;
    padding: 0;
  }

  .app-shell[data-active-view="customers"] .customer-table .mobile-customer-card-cell::before {
    display: none;
  }

  .mobile-customer-card {
    overflow: hidden;
    border: 1px solid #edf1f6;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
  }

  .mobile-customer-card-head,
  .mobile-contact-line,
  .mobile-source-line,
  .mobile-assign-line,
  .mobile-card-info {
    margin-right: 12px;
    margin-left: 12px;
  }

  .mobile-customer-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
  }

  .mobile-customer-title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
  }

  .mobile-customer-title strong {
    overflow: hidden;
    color: #171f2a;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-customer-card .status {
    min-width: auto;
    flex: 0 0 auto;
    border-radius: 0;
    background: transparent;
    padding: 2px 0;
    font-size: 15px;
  }

  .mobile-customer-card .status.new,
  .mobile-customer-card .status.following {
    color: #2f80ed;
  }

  .mobile-customer-card .status.pending {
    color: #7c4dbe;
  }

  .mobile-customer-card .status.closed {
    color: #57a857;
  }

  .mobile-customer-card .status.finished {
    color: #64748b;
  }

  .mobile-customer-card .status.invalid {
    color: #cf3f3f;
  }

  .mobile-contact-line {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 10px;
    color: #111827;
    font-size: 15px;
    line-height: 1.35;
  }

  .mobile-contact-line > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-text-button {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #2f80ed;
    font-size: 14px;
    font-weight: 900;
    padding: 0;
  }

  .mobile-source-line {
    display: flex;
    gap: 12px;
    padding-top: 7px;
    color: #111827;
    font-size: 14px;
    line-height: 1.4;
  }

  .mobile-card-info {
    display: grid;
    gap: 7px;
    margin-top: 10px;
    border-radius: 7px;
    background: #f8fafc;
    padding: 10px;
    color: #7a8491;
    font-size: 14px;
    line-height: 1.45;
  }

  .mobile-card-info strong {
    color: #6b7280;
    font-weight: 800;
  }

  .mobile-tag-row,
  .mobile-tag-row > div {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .mobile-tag-row em {
    border: 1px solid #e7c8c6;
    border-radius: 3px;
    background: #fff4f3;
    color: #2f3440;
    font-style: normal;
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1.3;
  }

  .mobile-tag-row em:nth-child(2n) {
    border-color: #ead6b6;
    background: #fff8ef;
  }

  .mobile-tag-row em:nth-child(3n) {
    border-color: #d8c8ea;
    background: #fbf5ff;
  }

  .mobile-assign-line {
    padding: 10px 0 10px;
    color: #8a94a3;
    font-size: 14px;
    line-height: 1.4;
  }

  .mobile-card-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
    border-top: 1px solid #edf1f6;
  }

  .mobile-card-actions button {
    display: flex;
    min-width: 0;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    background: #ffffff;
    color: #67717f;
    font-size: 14px;
    font-weight: 800;
    padding: 0 4px;
  }

  .mobile-card-actions button:first-child,
  .mobile-card-actions button:nth-child(2) {
    color: #2f80ed;
  }

  .mobile-card-actions span {
    color: currentColor;
    font-size: 16px;
    line-height: 1;
  }

  .customer-pagination {
    justify-content: center;
    padding-bottom: 8px;
  }

  .pagination-total {
    width: 100%;
    text-align: center;
  }

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

@media (max-width: 620px) {
  .app-shell[data-active-view="taobaoOps"] .main {
    background: #f3f6fa;
    padding: 0 10px 84px;
  }

  .app-shell[data-active-view="taobaoOps"] #taobaoOps .toolbar {
    position: sticky;
    top: 0;
    z-index: 18;
    margin: 0 -10px 12px;
    background: #f3f6fa;
    padding: 0 10px 8px;
  }

  .app-shell[data-active-view="taobaoOps"] .filter-panel {
    gap: 7px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .app-shell[data-active-view="taobaoOps"] .mobile-customer-filter-menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    min-height: 48px;
    border-bottom: 1px solid #eef2f7;
    background: #ffffff;
    margin: 0 -10px;
  }

  .app-shell[data-active-view="taobaoOps"] .mobile-customer-filter-menu button {
    display: inline-flex;
    min-width: 0;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: #2f3440;
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
  }

  .app-shell[data-active-view="taobaoOps"] .mobile-customer-filter-menu button.active,
  .app-shell[data-active-view="taobaoOps"] .mobile-customer-filter-menu button:first-child,
  .app-shell[data-active-view="taobaoOps"] .mobile-customer-filter-menu button:last-child {
    color: var(--blue);
  }

  .app-shell[data-active-view="taobaoOps"] [data-mobile-taobao-ops-filter-panel] {
    display: none;
  }

  .app-shell[data-active-view="taobaoOps"] .filter-panel.mobile-menu-follow [data-mobile-taobao-ops-filter-panel="follow"] {
    display: block;
  }

  .app-shell[data-active-view="taobaoOps"] .filter-panel.mobile-menu-tag [data-mobile-taobao-ops-filter-panel="tag"] {
    display: block;
  }

  .app-shell[data-active-view="taobaoOps"] .filter-panel.mobile-menu-filter .filter-compact-row[data-mobile-taobao-ops-filter-panel="filter"] {
    display: flex;
  }

  .app-shell[data-active-view="taobaoOps"] .filter-panel.mobile-menu-filter .quick-filter-grid[data-mobile-taobao-ops-filter-panel="filter"] {
    display: grid;
  }

  .app-shell[data-active-view="taobaoOps"] .quick-filter-grid,
  .app-shell[data-active-view="taobaoOps"] .filter-select-row {
    gap: 7px;
  }

  .app-shell[data-active-view="taobaoOps"] .filter-select-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-shell[data-active-view="taobaoOps"] .filter-group-title,
  .app-shell[data-active-view="taobaoOps"] .advanced-filter-toggle {
    display: none;
  }

  .app-shell[data-active-view="taobaoOps"] .filter-options,
  .app-shell[data-active-view="taobaoOps"] .customer-date-filter > .segmented {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .app-shell[data-active-view="taobaoOps"] .filter-options::-webkit-scrollbar,
  .app-shell[data-active-view="taobaoOps"] .customer-date-filter > .segmented::-webkit-scrollbar {
    display: none;
  }

  .app-shell[data-active-view="taobaoOps"] .segment {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .app-shell[data-active-view="taobaoOps"] .taobao-ops-table-wrap {
    overflow: auto;
  }
}

[hidden] {
  display: none !important;
}
