.merchant-page .workspace-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 6px;
  margin: 0 0 18px; border: 1px solid #e5e7f2; border-radius: 14px;
  background: rgba(255,255,255,.75);
}
.merchant-page .workspace-tabs button {
  border: 0; border-radius: 10px; padding: 11px 18px; background: transparent;
  color: #637087; cursor: pointer; font: inherit; font-weight: 600;
}
.merchant-page .workspace-tabs button[aria-selected="true"] {
  background: #6869ef; color: white; box-shadow: 0 3px 10px #6769ef24;
}
.merchant-page .workspace-tabs button:focus-visible { outline: 2px solid #5558d8; outline-offset: 2px; }
.merchant-page .workspace-panel[hidden], .merchant-page .wizard-footer [hidden] { display: none !important; }
.merchant-page .workspace-panel { min-width: 0; }
.merchant-page #supervisor .workspace-panel { min-height: 0; }
.merchant-page #supervisor .supervisor-chat-card { height: clamp(560px, calc(100dvh - 280px), 820px); }
.merchant-page #supervisor .supervisor-messages { max-height: none; }
.merchant-page .persona-editor { max-width: 960px !important; }
.merchant-page #personaForm > .workspace-panel { min-height: 280px; }
.merchant-page #personasTable td:nth-child(2) { max-width: 380px; }
.merchant-page #personasTable td { overflow-wrap: anywhere; }
.merchant-page #personasTable { display: block; }
.merchant-page .persona-card-list { background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.merchant-page #personasTable thead { display: none; }
.merchant-page #personasTable tbody { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 16px; }
.merchant-page #personasTable tr { display: block; background: #fff; border: 1px solid #e6e8f3; border-radius: 16px; padding: 20px; }
.merchant-page #personasTable td { display: block; border: 0; padding: 4px 0; white-space: normal !important; }
.merchant-page #personasTable td:first-child { font-size: 18px; font-weight: 700; color: #303951; }
.merchant-page #personasTable td:nth-child(2) { max-width: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 6px 0 14px; }
.merchant-page #personasTable td:nth-child(3)::before { content: '联系方式：'; }
.merchant-page #personasTable td:nth-child(4)::before { content: '号码格式：'; }
.merchant-page #personasTable td:nth-child(5)::before { content: '给号策略：'; }
.merchant-page #personasTable td:nth-child(6)::before { content: '首条带号：'; }
.merchant-page #personasTable td:nth-child(7)::before { content: '默认人设：'; }
.merchant-page #personasTable td:last-child { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 16px; }
.merchant-page .task-wizard .modal-content { max-width: 860px !important; width: calc(100% - 32px); max-height: 90vh; }
.merchant-page .task-wizard .workspace-tabs { position: sticky; top: 0; z-index: 2; background: #f7f8fc; }
.merchant-page .task-wizard .workspace-tabs button { flex: 1; padding: 10px 8px; white-space: nowrap; }
.merchant-page .task-wizard .workspace-panel { min-height: 260px; }
.merchant-page .task-wizard #taskAdvanced { margin: 0; border: 0; padding: 0; }
.merchant-page .task-wizard #taskAdvanced > summary { display: none; }
.merchant-page .task-wizard #taskAdvanced .workspace-tabs { position: static; }
.merchant-page .task-wizard #taskPersonaSummary { padding: 12px; background: #f0f1ff; border-radius: 10px; line-height: 1.7; }
.merchant-page .task-wizard #taskPersonaHint { display: none; }
.merchant-page .wizard-footer { position: sticky; bottom: -1px; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; padding: 16px 0 2px; background: #fff; border-top: 1px solid #e5e7f2; }
.merchant-page .wizard-footer .form-error { width: 100%; }
.merchant-page .wizard-footer .form-error:empty { display: none; }
.merchant-page .wizard-footer #taskSubmitBtn { width: auto !important; }
.merchant-page #subscription .workspace-panel { margin-top: 0 !important; }
.merchant-page #subscription .service-product-card { min-height: 0; padding: 18px; }
.merchant-page #subscription .service-product-price { margin: 14px 0 6px; }
.merchant-page #subscription .service-product-meta { min-height: 0; margin-bottom: 12px; }
.merchant-page #subscription .service-product-features { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 12px 0; }
.merchant-page #subscription .service-product-footer { padding-top: 12px; }
@media (max-width: 640px) {
  .merchant-page #supervisor .supervisor-chat-card { height: auto; }
  .merchant-page #supervisor .supervisor-messages { max-height: 50vh; }
  .merchant-page .workspace-tabs button { padding: 10px; }
  .merchant-page .task-wizard .workspace-tabs button { flex: 1 1 40%; }
  .merchant-page .task-wizard .modal-content { padding: 16px; }
  .merchant-page .persona-editor .form-row { flex-direction: column; }
}
.merchant-page .compact-customer-workspace .card-heading { flex-wrap: wrap; gap: 12px; }
.merchant-page .compact-customer-workspace .inline-actions { flex-wrap: wrap; gap: 8px; }
.merchant-page .compact-customer-workspace .workspace-panel { margin-top: 0; }
.merchant-page .compact-customer-workspace .table-wrap { max-height: 56vh; overflow: auto; }
.merchant-page .compact-customer-workspace thead th { position: sticky; top: 0; z-index: 1; background: #f7f8fd; }
.merchant-page .compact-customer-workspace thead th { white-space: nowrap; }
.merchant-page #radarLeadsTable { min-width: 1120px; }
.merchant-page #contactsTable { min-width: 880px; }
.merchant-page #radarLeadsTable td:nth-child(7) { min-width: 100px; }
.merchant-page #radar .table-wrap { max-height: max(250px, calc(100vh - 470px)); }
.merchant-page #contacts .table-wrap { max-height: max(300px, calc(100vh - 330px)); }
.merchant-page .compact-customer-workspace td { padding: 12px 10px; vertical-align: top; }
.merchant-page .compact-customer-workspace td .comment-cell { min-width: 180px; max-width: 360px; line-height: 1.65; }
.merchant-page .compact-customer-workspace td select { padding: 6px 8px; border: 1px solid #e2e5ef; border-radius: 8px; background: #fff; max-width: 140px; }
.merchant-page #contactsTable td:nth-child(4), .merchant-page #radarLeadsTable td:nth-child(4) { max-width: 150px; overflow-wrap: anywhere; }
.merchant-page #contactsTable td:last-child { min-width: 96px; }
.merchant-page #contactsTable td .btn-danger { display: block; margin-top: 8px; padding: 4px 10px; background: #fff5f5; color: #c84040; box-shadow: none; border: 1px solid #f5dada; }
.merchant-page #radar .radar-stats { margin-bottom: 16px; }
.merchant-page #radar .metric-card { padding: 14px 18px; }
.merchant-page #radar .radar-bulk-actions { flex-wrap: wrap; gap: 8px; padding: 10px; }
.merchant-page #radar .radar-config-card { max-width: 1000px; }
.merchant-page #contacts .group-manager { margin: 16px 0 0; padding: 16px; }
.merchant-page #contacts .group-manager-create { display: flex; flex-wrap: wrap; gap: 8px; }
.merchant-page #contacts .group-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.merchant-page .customer-maintenance { max-width: 760px; }
.merchant-page #taskInboxOptional { margin: 14px 0; padding: 14px 16px; border: 1px solid #e2e5ef; border-radius: 12px; background: #fafbff; }
.merchant-page #taskInboxOptional > summary { cursor: pointer; font-weight: 600; color: #5554be; }
.merchant-page #taskInboxOptional[open] > summary { margin-bottom: 16px; }
.merchant-page #taskInboxOptional .form-group:last-child { margin-bottom: 0; }
.merchant-page .customer-maintenance p { line-height: 1.8; margin-bottom: 20px; }
