:root {
  --bg: #f7f7f5;
  --panel: #ffffff;
  --ink: #202124;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #c62828;
  --brand-dark: #8f1d1d;
  --brand-soft: #fff1f1;
  --soft-panel: #fbfaf8;
  --warm-panel: #fff8f1;
  --shadow-soft: 0 10px 28px rgba(31, 41, 55, 0.06);
  --focus: #2563eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  overflow-x: hidden;
}

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

button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

button:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.primary-button,
.record-form button[type="submit"] {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.primary-button {
  padding: 0 18px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(14px, 4vw, 36px);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

h1,
h2 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(22px, 4vw, 34px);
}

h2 {
  font-size: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.date-picker {
  min-width: 180px;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-bar span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.user-bar button {
  min-height: 34px;
  padding: 0 10px;
}

.login-panel {
  display: grid;
  min-height: 54vh;
  place-items: center;
  position: relative;
  min-height: calc(100vh - 132px);
  margin: -14px clamp(-30px, -3vw, -10px) -36px;
  padding: 48px clamp(16px, 4vw, 42px);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(226, 61, 46, 0.2), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(226, 61, 46, 0.1), transparent 30%),
    linear-gradient(135deg, #15171c 0%, #1f232b 48%, #f7f8fa 48%, #f7f8fa 100%);
}

.login-panel::before {
  content: "红色通信一号店";
  position: absolute;
  top: 38px;
  left: clamp(22px, 6vw, 72px);
  color: #ffffff;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0;
}

.login-panel::after {
  content: "";
  position: absolute;
  top: 78px;
  left: clamp(22px, 6vw, 72px);
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: #e23d2e;
}

.login-form {
  display: grid;
  gap: 14px;
  width: min(440px, 100%);
  padding: 26px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(17, 24, 39, 0.2);
  z-index: 1;
}

.login-form input,
.login-form select {
  min-height: 46px;
  border-radius: 10px;
}

.login-form button[type="submit"],
.login-form .primary-button {
  min-height: 46px;
  border-color: #e23d2e;
  border-radius: 10px;
  background: #e23d2e;
}

.login-form button[type="submit"]:hover,
.login-form .primary-button:hover {
  border-color: #d92d20;
  background: #d92d20;
}

.login-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.module-audience {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

main {
  padding: 14px clamp(10px, 3vw, 30px) 36px;
}

[hidden] {
  display: none !important;
}

.role-select {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  align-items: stretch;
  max-width: 980px;
  margin: 22px auto 0;
}

.role-intro {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 4px;
}

.role-intro p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

.role-button {
  min-height: 150px;
  padding: 18px;
  text-align: left;
  border-color: #ddd6d6;
  background: #fff;
}

.role-button strong,
.role-button span {
  display: block;
}

.role-button strong {
  font-size: 26px;
  line-height: 1.2;
}

.role-button span {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.role-staff {
  border-color: var(--brand);
  background: var(--brand);
}

.role-staff strong,
.role-staff span {
  color: #fff;
}

.role-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.role-action-groups {
  display: grid;
  gap: 12px;
}

.role-dashboard {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.staff-console-shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}

.staff-console-sidebar,
.staff-console-main {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.staff-console-sidebar {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.staff-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

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

.staff-sidebar-head strong {
  font-size: 16px;
}

.staff-sidebar-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.staff-sidebar-head button {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
}

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

.staff-sidebar-nav button {
  min-height: 54px;
  padding: 9px 10px;
  text-align: left;
  border-color: transparent;
  background: #fff;
}

.staff-sidebar-nav button strong,
.staff-sidebar-nav button span {
  display: block;
}

.staff-sidebar-nav button strong {
  font-size: 14px;
}

.staff-sidebar-nav button span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.staff-sidebar-nav button:hover,
.staff-sidebar-nav button.active {
  border-color: #f3c5c5;
  background: var(--brand-soft);
}

.staff-sidebar-nav button.active strong {
  color: var(--brand);
}

.staff-console-main {
  min-width: 0;
  padding: 14px;
}

.staff-console-pane {
  display: grid;
  gap: 12px;
}

.staff-pane-head {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.staff-pane-head p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

body.is-staff-console .quick-entry {
  margin-top: 0;
}

body.is-staff-console #roleActionGroups {
  display: none !important;
}

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

.staff-console-shell.is-collapsed .staff-sidebar-head div,
.staff-console-shell.is-collapsed .staff-sidebar-nav button span {
  display: none;
}

.staff-console-shell.is-collapsed .staff-sidebar-nav button {
  min-height: 48px;
  padding: 8px;
  text-align: center;
}

.staff-console-shell.is-collapsed .staff-sidebar-nav button strong {
  font-size: 12px;
  line-height: 1.25;
}

.summary-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
}

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

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

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.summary-card.action-card {
  cursor: pointer;
}

.summary-card.danger strong {
  color: var(--brand);
}

.summary-panel h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

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

.section-title-row h3,
.section-title-row p {
  margin-top: 0;
}

.reminder-center-panel {
  border-color: #fecaca;
  background: #fffafa;
}

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

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

.reminder-card h4 {
  margin: 0;
  font-size: 24px;
}

.reminder-card p {
  margin: 0;
  color: var(--muted);
}

.metric-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.appointment-overview-page,
.appointment-overview-panel,
.reminder-dialog-body {
  display: grid;
  gap: 12px;
}

.appointment-metrics {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.appointment-table-wrap .mini-table td:last-child {
  min-width: 210px;
}

.appointment-table-wrap .mini-table td:last-child button {
  margin: 2px 4px 2px 0;
}

.boss-home {
  display: grid;
  gap: 12px;
}

.boss-page-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.manager-workbench .summary-panel:first-child,
.manager-workbench .summary-panel:nth-child(2) {
  grid-column: 1 / -1;
}

.boss-panel .simple-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.boss-store-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.boss-store-overview-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.boss-store-overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.boss-store-overview-head span {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

.boss-store-overview-visit {
  text-align: right;
}

.boss-store-overview-visit small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.boss-store-overview-head strong {
  color: var(--text);
  font-size: 34px;
  line-height: 1;
}

.boss-store-overview-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 10px;
}

.boss-store-overview-stats div {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

.boss-store-overview-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.boss-store-overview-stats b {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
}

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

.panel-title-row h3 {
  margin: 0;
}

.simple-stat-button {
  width: 100%;
  border: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.simple-stat-button:hover,
.simple-stat-button.active {
  border-color: var(--brand);
  background: #fff5f5;
}

.boss-advanced-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.boss-advanced-panel {
  padding: 0;
  overflow: hidden;
}

.boss-advanced-panel > summary,
.entry-group-collapsed > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.boss-advanced-panel > summary::-webkit-details-marker,
.entry-group-collapsed > summary::-webkit-details-marker {
  display: none;
}

.boss-advanced-panel > summary span,
.entry-group-collapsed > summary em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.when-open {
  display: none;
}

.boss-advanced-panel[open] > summary .when-closed,
.entry-group-collapsed[open] > summary .when-closed {
  display: none;
}

.boss-advanced-panel[open] > summary .when-open,
.entry-group-collapsed[open] > summary .when-open {
  display: inline;
}

.boss-advanced-panel[open] > summary,
.entry-group-collapsed[open] > summary {
  border-bottom: 1px solid var(--line);
}

.boss-advanced-grid {
  display: grid;
  gap: 14px;
  padding: 12px;
}

.boss-advanced-grid section {
  display: grid;
  gap: 8px;
}

.import-panel,
.assign-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.import-panel h3,
.assign-panel h3 {
  margin: 0;
  font-size: 17px;
}

.import-panel textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.import-result {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.import-result strong {
  color: var(--ink);
}

.import-result ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.pagination-bar div {
  display: flex;
  gap: 8px;
}

.file-import {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.file-import input,
.assign-panel input,
.assign-panel select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.assign-panel {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 1fr) auto auto;
  align-items: end;
}

.assign-panel > div {
  align-self: center;
}

.assign-count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.select-cell {
  width: 42px;
  text-align: center;
}

.quick-call-customer {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff7ed;
}

.quick-call-customer strong {
  font-size: 18px;
}

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

.primary-mini {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.ghost-mini {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  padding: 6px 10px;
  cursor: pointer;
}

.list-quick-filters {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 10px;
}

.list-quick-filters button.is-empty:not(.active) {
  opacity: 0.5;
  background: #fff;
  color: var(--muted);
}

.list-quick-filters button {
  border-color: #f2d4d4;
  background: #fff7f7;
  color: var(--brand);
  font-weight: 700;
}

.list-quick-filters button.active {
  border-color: var(--brand);
  background: #b81c1c;
  color: #fff;
  box-shadow: 0 6px 16px rgba(184, 28, 28, 0.16);
}

.equity-inline-hint {
  display: inline-flex;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #b45309;
  font-size: 12px;
  font-weight: 700;
}

.asset-classification-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.asset-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.asset-category-card {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.asset-category-card.active {
  border-color: var(--brand);
  background: #fff7f7;
  box-shadow: 0 6px 18px rgba(184, 28, 28, 0.08);
}

.asset-category-card span {
  font-weight: 700;
}

.asset-category-card strong {
  color: var(--brand);
  font-size: 26px;
  line-height: 1;
}

.asset-category-card small {
  color: var(--muted);
  font-size: 12px;
}

.asset-category-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

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

.asset-profile-summary-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.asset-profile-summary-card.strong {
  border-color: #fed7aa;
  background: #fff7ed;
}

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

.asset-profile-summary-card strong {
  display: block;
  margin: 6px 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.asset-profile-required {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
}

.asset-owner-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.asset-owner-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

.asset-owner-chip.muted {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--muted);
}

.asset-missing-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.asset-missing-chip {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
  white-space: nowrap;
}

.asset-filter-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
}

.asset-filter-main,
.asset-filter-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.asset-filter-panel label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.asset-more-filters {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

@media (max-width: 720px) {
  .asset-profile-summary {
    grid-template-columns: 1fr;
  }
}

.asset-more-filters summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.asset-more-filters[open] summary {
  margin-bottom: 8px;
}

.asset-filter-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.complete-contact-actions {
  display: flex;
  justify-content: flex-end;
}

.readonly-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid var(--line);
}

.readonly-panel div {
  min-width: 0;
}

.readonly-panel span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.readonly-panel strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.checkbox-group-label {
  display: block;
}

.checkbox-group-label > span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.checkbox-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.checkbox-chip input {
  width: auto;
  margin: 0;
}

.recovery-preview-box {
  margin-top: 8px;
  min-width: 0;
}

.record-dialog.recovery-dialog {
  display: flex;
  flex-direction: column;
  width: min(1100px, 90vw);
  max-width: calc(100vw - 32px);
  height: min(85vh, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
}

.record-dialog.recovery-dialog .dialog-head {
  flex: 0 0 auto;
}

.record-dialog.recovery-dialog .record-form {
  flex: 1 1 auto;
  min-height: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 16px;
}

.record-dialog.recovery-dialog .record-form > * {
  min-width: 0;
}

.record-dialog.recovery-dialog .form-actions {
  position: static;
  grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(0, auto));
  align-items: center;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.record-dialog.recovery-dialog .form-actions button {
  min-width: 104px;
}

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

.recovery-filter-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
}

.recovery-filter-panel label {
  min-width: 0;
}

.recovery-filter-panel input,
.recovery-filter-panel select {
  width: 100%;
}

.recovery-filter-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.recovery-filter-actions button {
  min-height: 38px;
}

.recovery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.recovery-toolbar button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.recovery-toolbar span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.recovery-table-wrap {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding-bottom: 2px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.recovery-table-wrap::-webkit-scrollbar {
  height: 12px;
}

.recovery-table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.recovery-table-wrap::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.recovery-table {
  min-width: 760px;
  width: 100%;
  table-layout: fixed;
}

.recovery-table th,
.recovery-table td {
  white-space: normal;
  word-break: break-word;
}

.recovery-table th:first-child,
.recovery-table td:first-child {
  width: 54px;
  text-align: center;
}

.recovery-table th:nth-child(2),
.recovery-table td:nth-child(2) {
  width: 16%;
}

.recovery-table th:nth-child(3),
.recovery-table td:nth-child(3) {
  width: 15%;
}

.recovery-table th:nth-child(4),
.recovery-table td:nth-child(4) {
  width: 14%;
}

.recovery-table th:nth-child(7),
.recovery-table td:nth-child(7) {
  width: 90px;
  text-align: center;
}

.recovery-row-detail {
  margin-top: 8px;
}

.recovery-detail-panel {
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.recovery-detail-group {
  margin-top: 12px;
}

.recovery-detail-group:first-of-type {
  margin-top: 0;
}

.recovery-detail-group h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
}

.recovery-detail-group .readonly-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recovery-detail-group strong {
  word-break: break-word;
}

.recovery-detail-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.recovery-detail-title strong {
  font-size: 15px;
}

.recovery-detail-title button,
.small-button {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.inline-detail summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 700;
}

.metric-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.metric-list div {
  padding: 8px;
  border-radius: 8px;
  background: #fafafa;
}

.metric-list .metric-action {
  cursor: pointer;
  border: 1px solid var(--line);
}

.metric-list .metric-action:active {
  transform: translateY(1px);
}

.metric-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric-list strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.data-admin-summary {
  display: grid;
  gap: 12px;
}

.data-admin-summary .summary-panel h3 {
  font-size: 19px;
}

.data-admin-summary .metric-list {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.data-admin-summary .metric-list div {
  padding: 12px;
}

.data-admin-summary .metric-list span {
  font-size: 14px;
}

.data-admin-summary .metric-list strong {
  font-size: 24px;
}

.outbound-staff-summary {
  display: grid;
  gap: 12px;
}

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

.outbound-staff-summary .outbound-focus-card .metric-list {
  grid-template-columns: 1fr;
}

.outbound-staff-summary .outbound-focus-card .metric-list strong {
  font-size: 34px;
}

.outbound-staff-summary .metric-list {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.outbound-staff-summary .metric-list div {
  padding: 12px;
}

.outbound-staff-summary .metric-list span {
  font-size: 14px;
}

.outbound-staff-summary .metric-list strong {
  font-size: 24px;
}

.manager-store-outbound-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.manager-store-outbound-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.manager-store-outbound-title strong {
  display: block;
  font-size: 18px;
  color: #111827;
}

.manager-store-outbound-title span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}

.manager-store-outbound-title .manager-store-outbound-rate {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 7px 10px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

.manager-store-outbound-metrics {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-bottom: 0;
}

.manager-store-outbound-metrics div,
.manager-store-outbound-metrics .manager-store-outbound-metric {
  padding: 12px;
  border: 1px solid #eef2f7;
  background: #f8fafc;
}

.manager-store-outbound-metric {
  width: 100%;
  border-radius: 8px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.manager-store-outbound-metric:hover,
.manager-store-outbound-metric.active {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.manager-store-outbound-metrics span {
  font-size: 13px;
}

.manager-store-outbound-metrics strong {
  font-size: 24px;
}

.manager-store-outbound-active-view {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 13px;
}

.manager-store-outbound-active-view button {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 700;
  cursor: pointer;
}

.manager-store-outbound-table-wrap {
  overflow-x: auto;
  border: 1px solid #eef2f7;
  border-radius: 10px;
}

.manager-store-outbound-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.manager-store-outbound-table th,
.manager-store-outbound-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  white-space: nowrap;
}

.manager-store-outbound-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
}

.manager-store-outbound-table tr:last-child td {
  border-bottom: 0;
}

.manager-store-outbound-table-link {
  min-width: 42px;
  padding: 5px 9px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
}

.manager-store-outbound-table-link:hover,
.manager-store-outbound-table-link.active {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.honor-board {
  display: grid;
  gap: 12px;
}

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

.honor-board-title p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.honor-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

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

.honor-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

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

.honor-rank-row {
  display: grid;
  grid-template-columns: 34px minmax(78px, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.honor-rank-row.is-top {
  border-color: #f0c36a;
  background: #fff8e8;
}

.honor-rank-row.is-me {
  box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.12);
}

.honor-rank-medal {
  font-weight: 800;
  text-align: center;
}

.honor-rank-name {
  font-weight: 700;
}

.honor-rank-name b {
  display: inline-block;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  padding: 1px 6px;
  font-size: 12px;
}

.honor-rank-row strong {
  color: #111827;
  font-size: 16px;
  white-space: nowrap;
}

.honor-rank-row.is-me strong {
  color: var(--brand-dark);
}

.honor-rank-row small {
  grid-column: 2 / 4;
  color: var(--muted);
  font-size: 12px;
}

.business-counts,
.rank-list,
.employee-follow-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.daily-review-summary {
  display: grid;
  gap: 10px;
}

.empty-inline {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.review-customer-table {
  min-width: 820px;
}

.business-counts span,
.rank-list span,
.employee-follow-links button {
  padding: 7px 9px;
  border-radius: 8px;
  background: #fafafa;
  color: var(--ink);
  font-size: 13px;
}

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

.mini-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.mini-table th,
.mini-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.role-topbar button {
  flex: 0 0 auto;
  padding: 0 12px;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(9, minmax(120px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.metric {
  min-width: 120px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.quick-entry {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.entry-group {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.manager-recover-page {
  display: grid;
  gap: 14px;
}

.manager-recover-head,
.manager-recover-reason {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.manager-recover-head h3 {
  margin: 4px 0 8px;
  font-size: 22px;
}

.manager-recover-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
}

.manager-recover-stats div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.manager-recover-stats span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.manager-recover-stats strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 24px;
}

.manager-recover-reason label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.manager-recover-message {
  min-height: 20px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.manager-recover-table td,
.manager-recover-table th {
  white-space: normal;
}

.account-management-page {
  display: grid;
  gap: 14px;
}

.account-management-head,
.account-management-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.account-management-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.account-management-head h3 {
  margin: 4px 0 8px;
  font-size: 22px;
}

.account-management-head p,
.account-management-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.account-management-panel-head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.account-management-panel-head strong,
.account-management-confirm-panel strong {
  color: var(--ink);
  font-size: 16px;
}

.account-management-panel-head span {
  color: var(--muted);
  font-size: 13px;
}

.account-management-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.account-management-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.account-management-form .account-management-actions {
  grid-column: 1 / -1;
}

.account-management-confirm-panel {
  display: grid;
  gap: 10px;
  border-color: #fed7aa;
  background: #fff7ed;
}

.account-management-confirm-panel label {
  max-width: 360px;
}

.account-management-table th,
.account-management-table td {
  white-space: normal;
}

.account-management-table .record-actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.manager-submission-overview-detail {
  display: grid;
  gap: 12px;
}

.manager-submission-overview-detail-card {
  background: #fafafa;
}

.manager-submission-overview-detail-list {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.manager-submission-overview-detail-list dt {
  color: var(--muted);
  font-weight: 700;
}

.manager-submission-overview-detail-list dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
  white-space: pre-wrap;
}

.knowledge-page {
  display: grid;
  gap: 16px;
}

.knowledge-home-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-color: #e5e7eb;
  background: #ffffff;
}

.knowledge-home-notice h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
}

.knowledge-home-notice .eyebrow {
  margin: 0 0 4px;
  color: #64748b;
}

.knowledge-home-notice button {
  flex: 0 0 auto;
  border-color: #d1d5db;
  background: #ffffff;
  color: #111827;
}

.knowledge-home-notice button:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.knowledge-page-head {
  align-items: flex-start;
}

.knowledge-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

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

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

.knowledge-panel-head h3,
.knowledge-card h4 {
  margin: 0;
  color: var(--ink);
}

.knowledge-panel-head p,
.knowledge-card p,
.knowledge-meta,
.knowledge-detail-list dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.knowledge-toolbar,
.knowledge-form,
.knowledge-inline-form {
  display: grid;
  gap: 12px;
}

.knowledge-toolbar {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 240px) auto;
  align-items: end;
}

.knowledge-toolbar-single {
  grid-template-columns: minmax(220px, 1fr) auto;
}

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

.knowledge-toolbar label,
.knowledge-form label,
.knowledge-inline-form label {
  display: grid;
  gap: 6px;
  color: #374151;
  font-weight: 700;
}

.knowledge-toolbar input,
.knowledge-toolbar select,
.knowledge-form input,
.knowledge-form textarea,
.knowledge-inline-form input,
.knowledge-inline-form textarea {
  min-height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.knowledge-form textarea,
.knowledge-inline-form textarea {
  min-height: 88px;
  resize: vertical;
}

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

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

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

.knowledge-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}

.knowledge-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.knowledge-detail-list {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.knowledge-detail-list dt {
  color: #374151;
  font-weight: 800;
}

.knowledge-detail-list dd {
  white-space: pre-wrap;
}

.knowledge-dialog-detail {
  padding: 4px 0;
}

.knowledge-promote-form {
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.outbound-script-card {
  border-left: 4px solid #111827;
}

.outbound-script-detail dt {
  color: #111827;
}

.outbound-script-form {
  padding: 14px;
  border: 1px dashed #9ca3af;
  border-radius: 10px;
  background: #fafafa;
}

@media (max-width: 720px) {
  .knowledge-toolbar,
  .knowledge-toolbar-single,
  .knowledge-form-grid {
    grid-template-columns: 1fr;
  }
}

.manager-flight-log-page {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f7f8fa;
}

.manager-flight-log-head,
.manager-flight-log-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.manager-flight-log-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-top: 3px solid var(--brand);
}

.manager-flight-log-head h3 {
  margin: 4px 0 8px;
  font-size: 22px;
}

.manager-flight-log-head p,
.manager-flight-log-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.manager-flight-log-status {
  min-width: 140px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.manager-flight-log-status span,
.manager-flight-metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.manager-flight-log-status strong,
.manager-flight-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
}

.manager-flight-log-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
}

.manager-flight-log-toolbar label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.manager-flight-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.manager-flight-metrics div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fafb;
}

.manager-flight-log-panel h4 {
  margin: 0 0 12px;
  font-size: 17px;
}

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

.manager-flight-section-head h4 {
  margin-bottom: 6px;
}

.manager-flight-timeline {
  display: grid;
  gap: 12px;
}

.manager-flight-timeline-card,
.manager-flight-period-tasks article {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.manager-flight-timeline-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 14px;
  border-left: 3px solid var(--brand);
}

.manager-flight-timeline-step {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
}

.manager-flight-timeline-title strong,
.manager-flight-period-tasks strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 16px;
}

.manager-flight-timeline-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.manager-flight-timeline-title span {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 800;
}

.manager-flight-timeline-card dl {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 8px 12px;
  margin: 0;
}

.manager-flight-timeline-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.manager-flight-timeline-card dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.manager-flight-timeline-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.manager-flight-timeline-checks label {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  font-weight: 700;
}

.manager-flight-timeline-checks input {
  margin-top: 3px;
}

.manager-flight-timeline-checks span,
.manager-flight-timeline-checks small {
  display: block;
}

.manager-flight-timeline-checks small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.manager-flight-timeline-remark {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-weight: 700;
}

.manager-flight-timeline-remark span {
  color: var(--muted);
  font-size: 13px;
}

.manager-flight-timeline-remark textarea {
  min-height: 64px;
  border-radius: 8px;
  resize: vertical;
}

.manager-flight-period-tasks {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 14px;
}

.manager-flight-period-tasks article {
  padding: 16px;
}

.manager-flight-period-checks {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.manager-flight-period-checks label {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.manager-flight-period-checks input {
  margin-top: 3px;
}

.manager-flight-period-checks span,
.manager-flight-period-checks small {
  display: block;
}

.manager-flight-period-checks span strong {
  margin-bottom: 3px;
  font-size: 14px;
}

.manager-flight-period-checks small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.manager-flight-period-checks em {
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #f3f4f6;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.manager-submission-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.manager-submission-status-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.manager-submission-status-card span,
.manager-submission-status-card strong {
  display: block;
}

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

.manager-submission-status-card strong {
  margin-top: 4px;
  font-size: 18px;
}

.manager-submission-status-card.is-submitted strong {
  color: #15803d;
}

.manager-submission-status-card.is-missing {
  border-color: #fed7aa;
  background: #fff7ed;
}

.manager-submission-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fafb;
}

.manager-submission-form h4 {
  margin: 0;
}

.manager-submission-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.manager-submission-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.manager-submission-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.manager-flight-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.manager-flight-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
  font-weight: 700;
}

.manager-flight-log-form {
  display: grid;
  gap: 12px;
}

.manager-flight-log-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.manager-flight-log-form textarea {
  min-height: 92px;
  border-radius: 10px;
}

.manager-flight-log-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.manager-flight-log-message {
  min-height: 20px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.recovery-muted-action {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fafafa;
  font-size: 13px;
}

.entry-title {
  margin-bottom: 10px;
}

.entry-title h2 {
  font-size: 18px;
}

.entry-group-collapsed {
  padding: 0;
}

.entry-group-collapsed > summary strong {
  font-size: 18px;
}

.entry-group-collapsed > summary .eyebrow {
  margin: 0;
}

.entry-group-collapsed > .entry-buttons {
  padding: 12px;
}

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

.entry-buttons.compact {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.entry-button {
  min-height: 88px;
  padding: 14px;
  text-align: left;
  border-color: #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.entry-button strong,
.entry-button span {
  display: block;
}

.entry-button strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.entry-button span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.entry-button:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.entry-primary {
  position: relative;
  min-height: 96px;
  border-color: #d8dee8;
  border-left: 4px solid var(--brand);
  background: #ffffff;
}

.entry-primary strong,
.entry-primary span {
  color: inherit;
}

.entry-primary strong {
  color: var(--ink);
  font-size: 20px;
}

.entry-primary span {
  color: var(--muted);
}

.entry-primary::after {
  content: "重点";
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

body.is-staff-console {
  background: #f7f8fa;
}

body.is-staff-console .app-header {
  background: #15171c;
  border-bottom-color: #1f232b;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

body.is-staff-console .app-header .eyebrow {
  margin-bottom: 4px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

body.is-staff-console .app-header .eyebrow::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 7px;
  border-radius: 999px;
  background: #e23d2e;
}

body.is-staff-console .app-header h1 {
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  font-weight: 600;
}

body.is-staff-console .user-bar span {
  color: rgba(255, 255, 255, 0.62);
}

body.is-staff-console .user-bar button {
  border-color: rgba(255, 255, 255, 0.16);
  background: #1f232b;
  color: #ffffff;
}

body.is-staff-console .user-bar button:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

body.is-staff-console .role-topbar {
  border-color: #e5e7eb;
  border-left: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.045);
}

body.is-staff-console #roleTitle {
  color: #111827;
  font-weight: 800;
}

body.is-staff-console #backHomeButton {
  border-color: #e5e7eb;
  background: #ffffff;
  color: #374151;
}

body.is-staff-console #backHomeButton:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #111827;
}

.staff-console-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 22px;
}

.staff-console-sidebar {
  border-color: #15171c;
  background: #15171c;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.18);
  min-height: calc(100vh - 118px);
  max-height: calc(100vh - 118px);
  box-sizing: border-box;
  align-content: start;
  overflow: hidden auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.staff-console-sidebar::-webkit-scrollbar {
  width: 8px;
}

.staff-console-sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.staff-console-main {
  border-color: #e5e7eb;
  background: #f7f8fa;
  box-shadow: none;
  padding: 30px;
}

.staff-console-main .primary-button,
body.is-staff-console .record-form button[type="submit"] {
  border-color: #e23d2e;
  background: #e23d2e;
}

.staff-console-main .primary-button:hover,
body.is-staff-console .record-form button[type="submit"]:hover {
  border-color: #d92d20;
  background: #d92d20;
}

.staff-console-main .primary-button:active,
body.is-staff-console .record-form button[type="submit"]:active {
  border-color: #b42318;
  background: #b42318;
}

.staff-console-main button:not(.primary-button):not(.entry-primary):not(.metric-action) {
  border-color: #e5e7eb;
}

.staff-console-main button:not(.primary-button):not(.entry-primary):not(.metric-action):hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.staff-sidebar-head {
  position: relative;
  display: block;
  min-height: 128px;
  padding: 0 0 14px;
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

.staff-sidebar-head::before {
  content: "红色通信一号店";
  display: block;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.18;
}

.staff-sidebar-head::after {
  content: "门店日常经营系统";
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 600;
}

.staff-sidebar-head > div {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
}

.staff-sidebar-head strong {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.staff-sidebar-head span {
  color: rgba(255, 255, 255, 0.48);
}

.staff-sidebar-head button {
  position: absolute;
  top: 0;
  right: 0;
  border-color: rgba(255, 255, 255, 0.26);
  background: #1f232b;
  color: #ffffff;
}

.staff-sidebar-head button:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.staff-sidebar-nav button {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border-color: transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  padding: 11px 12px;
}

.staff-menu-index {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.62);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.staff-menu-copy {
  min-width: 0;
}

.staff-sidebar-nav button strong {
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 1.25;
}

.staff-sidebar-nav button span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12.5px;
  line-height: 1.45;
}

.staff-sidebar-nav button:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.staff-sidebar-nav button.active {
  border-color: #ffffff;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.18);
}

.staff-sidebar-nav button.active strong {
  color: #111827;
}

.staff-sidebar-nav button.active span {
  color: #6b7280;
}

.staff-sidebar-nav button.active .staff-menu-index {
  border-color: #e5e7eb;
  background: #f8fafc;
  color: #475569;
}

.staff-sidebar-nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: #cbd5e1;
}

.staff-console-main .summary-panel,
.staff-console-main .staff-pane-head {
  border-color: #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
  position: relative;
}

.staff-console-main .summary-panel h3 {
  color: #111827;
  font-size: 18px;
}

.staff-operation-manual {
  display: grid;
  gap: 14px;
}

.staff-flow-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.staff-flow-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 4px 0;
}

.staff-flow-list li > span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.staff-flow-list strong {
  display: block;
  color: #111827;
  font-size: 15px;
}

.staff-flow-list p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.staff-store-entry-guide {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.55;
}

.staff-store-entry-guide strong {
  color: #1d4ed8;
  font-size: 14px;
}

.staff-store-entry-guide p {
  margin: 4px 0;
}

.staff-store-entry-guide p span {
  display: inline-block;
  min-width: 64px;
  margin-right: 8px;
  color: #111827;
  font-weight: 800;
}

.staff-flow-rules {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.55;
}

.staff-flow-rules strong {
  white-space: nowrap;
}

.staff-today-workspace {
  gap: 18px;
}

.staff-today-workspace .staff-pane-head {
  padding: 18px;
}

.staff-today-workspace .staff-pane-head::before,
.staff-console-main .reminder-center-panel::before,
.staff-today-outcome-lite::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  width: 44px;
  height: 2px;
  border-radius: 999px;
  background: #cbd5e1;
}

.staff-today-workspace .staff-pane-head h2 {
  margin-bottom: 6px;
  color: #111827;
  font-size: 24px;
  font-weight: 800;
}

.staff-main-task-zone,
.staff-assist-zone,
.staff-feedback-zone {
  display: grid;
  gap: 12px;
}

.staff-main-task-zone {
  padding: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.07);
}

.staff-main-task-zone .staff-console-card-group {
  border: 0;
  box-shadow: none;
}

.staff-main-task-zone .staff-console-card-group h3 {
  font-size: 20px;
}

.staff-console-main .reminder-center-panel {
  border-color: #e5e7eb;
  background: #ffffff;
}

.staff-reminder-assist {
  opacity: 0.96;
}

.staff-reminder-assist .section-title-row h3 {
  font-size: 17px;
}

.staff-console-main .reminder-center-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.staff-console-main .reminder-card {
  border-color: #e5e7eb;
  border-radius: 10px;
  background: #fbfcfe;
  box-shadow: none;
}

.staff-console-main .reminder-card h4 {
  color: #111827;
}

.staff-console-main .reminder-card .eyebrow {
  color: #64748b;
}

.staff-console-card-group .entry-button {
  min-height: 82px;
  border-color: #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
}

.staff-console-card-group .entry-button:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.staff-console-card-group .entry-primary {
  position: relative;
  border-color: #e5e7eb;
  border-left: 4px solid #e23d2e;
  background: #ffffff;
}

.staff-console-card-group .entry-primary:hover {
  border-color: #cbd5e1;
  border-left-color: #d92d20;
  background: #f8fafc;
}

.staff-console-card-group .entry-primary::after {
  content: "重点";
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.staff-console-card-group .entry-primary strong {
  color: #111827;
}

.staff-console-card-group .entry-primary span {
  color: #6b7280;
}

.staff-console-main .summary-panel.staff-console-card-group,
.staff-today-outcome-lite {
  border-top: 1px solid #e5e7eb;
}

.staff-outcome-feedback {
  background: #fbfcfe;
}

.staff-today-outcome-lite .daily-review-clickable-metrics {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.staff-today-outcome-lite .metric-action {
  position: relative;
  min-height: 76px;
  padding: 12px;
  border-color: #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.staff-today-outcome-lite .metric-action:hover {
  border-color: #e23d2e;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
  transform: translateY(-1px);
}

.staff-today-outcome-lite .metric-action::after {
  content: "点击查看 >";
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: #6b7280;
  font-size: 12px;
}

.staff-today-outcome-lite .metric-action:hover::after,
.staff-today-outcome-lite .metric-action.is-active::after {
  color: #e23d2e;
}

.staff-today-outcome-lite .metric-action strong {
  color: #111827;
  font-size: 22px;
}

.staff-today-outcome-lite .metric-action:nth-child(2) strong {
  color: #e23d2e;
}

.staff-today-outcome-lite .metric-action:nth-child(4) strong {
  color: #f79009;
}

.staff-today-outcome-lite .metric-action.is-active {
  border-color: #e23d2e;
  background: #fff1f0;
}

.staff-console-main .daily-review-detail-panel {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  padding: 12px;
}

body.is-staff-console .staff-console-main .list-quick-filters {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

body.is-staff-console .staff-console-main .list-quick-filters button {
  min-height: 30px;
  padding: 0 12px;
  border-color: #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #374151;
  box-shadow: none;
  font-weight: 600;
}

body.is-staff-console .staff-console-main .list-quick-filters button:hover {
  border-color: #fca5a5;
  background: #fff7f6;
  color: #b42318;
}

body.is-staff-console .staff-console-main .list-quick-filters button.active {
  border-color: #fca5a5;
  background: #fff1f0;
  color: #b42318;
  box-shadow: none;
}

body.is-staff-console .store-outbound-filter-panel {
  display: block;
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f8fafc;
  overflow-x: auto;
}

body.is-staff-console .store-outbound-filter-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

body.is-staff-console .store-outbound-filter-label {
  padding-top: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

body.is-staff-console .store-outbound-filter-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: 8px;
  min-width: 0;
}

body.is-staff-console .store-outbound-filter-buttons button {
  min-height: 46px;
  padding: 7px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #334155;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

body.is-staff-console .store-outbound-filter-buttons button span {
  min-width: 0;
}

body.is-staff-console .store-outbound-filter-buttons button strong {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

body.is-staff-console .store-outbound-filter-buttons button:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

body.is-staff-console .store-outbound-filter-buttons button.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

body.is-staff-console .store-outbound-filter-buttons button.active strong {
  background: #2563eb;
  color: #ffffff;
}

body.is-staff-console .store-outbound-filter-buttons button.is-empty:not(.active) {
  opacity: 0.5;
}

body.is-staff-console .staff-follow-tabs button.active,
body.is-staff-console .manager-follow-tabs.staff-follow-tabs button.active {
  border-color: #e23d2e;
  background: #fff1f0;
  color: #b42318;
  box-shadow: inset 0 0 0 1px rgba(226, 61, 46, 0.18), 0 8px 18px rgba(226, 61, 46, 0.08);
}

body.is-staff-console .staff-console-main .filters > .staff-follow-tabs,
body.is-staff-console .staff-console-main .filters > .follow-current-view,
body.is-staff-console .staff-console-main .filters > .staff-follow-tabs ~ .list-hint {
  grid-column: 1 / -1;
}

body.is-staff-console .staff-console-main .filters > .staff-follow-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
}

body.is-staff-console .staff-console-main .filters > .staff-follow-tabs button {
  flex: 1 1 132px;
  min-height: 36px;
  border-radius: 10px;
  background: #ffffff;
}

.follow-current-view {
  margin: 8px 0 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #e23d2e;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}

body.is-staff-console .staff-console-main .filters > .follow-current-view {
  margin: 0;
  border-left-width: 1px;
  background: #f8fafc;
  color: #475569;
  box-shadow: none;
}

body.is-staff-console .staff-console-main .filters > .staff-follow-tabs ~ .list-hint {
  margin: 0;
  border-color: #e5e7eb;
  background: #ffffff;
  color: #64748b;
}

.follow-loading-hint {
  border-style: solid;
  background: #f9fafb;
  color: #4b5563;
}

.return-row-notice-wrap {
  margin-bottom: 6px;
}

.return-row-notice {
  white-space: normal;
}

.appointment-table-wrap .primary-mini {
  margin: 2px 4px 2px 0;
}

body.is-staff-console .workbench,
body.is-staff-console .dashboard-section,
body.is-staff-console .chart-card,
body.is-staff-console .assign-panel,
body.is-staff-console .list-summary,
body.is-staff-console .records-table-wrap,
body.is-staff-console .mini-table-wrap,
body.is-staff-console .record-fields div {
  border-color: #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.045);
}

body.is-staff-console .workbench {
  padding: 18px;
}

body.is-staff-console .staff-console-main,
body.is-staff-console .staff-console-pane,
body.is-staff-console .workbench,
body.is-staff-console .dashboard-section,
body.is-staff-console .summary-panel,
body.is-staff-console .filters,
body.is-staff-console .manager-follow-panel,
body.is-staff-console .manager-follow-filters,
body.is-staff-console .records-table-wrap,
body.is-staff-console .mini-table-wrap {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

body.is-staff-console .records-table-wrap,
body.is-staff-console .mini-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
}

body.is-staff-console .manager-follow-table-wrap,
body.is-staff-console .manager-follow-tabs {
  min-width: 0;
  max-width: 100%;
}

body.is-staff-console .manager-follow-tabs {
  overflow-x: auto;
}

body.is-staff-console .manager-follow-tabs button {
  min-width: 0;
  white-space: normal;
}

body.is-staff-console .section-head {
  align-items: center;
  padding: 0 0 12px;
  border-bottom: 1px solid #eef0f3;
}

body.is-staff-console .section-head h2,
body.is-staff-console .panel-title-row h3 {
  color: #111827;
  font-weight: 800;
}

body.is-staff-console .filters,
body.is-staff-console .manager-follow-filters {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
}

body.is-staff-console label {
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

body.is-staff-console input,
body.is-staff-console select,
body.is-staff-console textarea,
body.is-staff-console .assign-panel input,
body.is-staff-console .assign-panel select {
  min-height: 42px;
  border-color: #dfe3ea;
  border-radius: 10px;
  background: #ffffff;
}

body.is-staff-console input:focus,
body.is-staff-console select:focus,
body.is-staff-console textarea:focus {
  border-color: #e23d2e;
  outline: 3px solid rgba(226, 61, 46, 0.13);
  outline-offset: 0;
}

body.is-staff-console .filter-actions {
  gap: 8px;
}

body.is-staff-console .staff-console-main .filters:has(.staff-follow-tabs) .filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-self: end;
}

body.is-staff-console .filter-actions button,
body.is-staff-console .assign-panel button,
body.is-staff-console .record-actions-cell button,
body.is-staff-console .mini-table button {
  min-height: 34px;
  border-radius: 9px;
}

body.is-staff-console .records-table,
body.is-staff-console .mini-table {
  border-collapse: separate;
  border-spacing: 0;
}

body.is-staff-console .records-table th,
body.is-staff-console .mini-table th {
  padding: 11px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #4b5563;
  font-size: 12.5px;
  font-weight: 800;
}

body.is-staff-console .records-table td,
body.is-staff-console .mini-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #eef0f3;
  color: #1f2937;
  font-size: 13.5px;
  line-height: 1.45;
}

body.is-staff-console .records-table tbody tr:hover td,
body.is-staff-console .mini-table tbody tr:hover td {
  background: #fafafa;
}

body.is-staff-console .status-tag {
  min-height: 24px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}

body.is-staff-console .list-hint {
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
}

body.is-staff-console .record-fields span {
  color: #6b7280;
}

body.is-staff-console .record-fields strong {
  color: #111827;
}

/* UI upgrade phase 1: visual-only unification. */
.login-panel {
  min-height: calc(100vh - 120px);
  background:
    radial-gradient(circle at 16% 20%, rgba(226, 61, 46, 0.22), transparent 24%),
    radial-gradient(circle at 74% 14%, rgba(255, 255, 255, 0.08), transparent 18%),
    linear-gradient(135deg, #15171c 0%, #15171c 46%, #f7f8fa 46%, #f7f8fa 100%);
}

.login-panel::before {
  color: #ffffff;
  font-size: 28px;
  line-height: 1.15;
}

.login-form {
  gap: 16px;
  padding: 28px;
  border-color: rgba(229, 231, 235, 0.92);
  border-radius: 18px;
  box-shadow: 0 28px 76px rgba(17, 24, 39, 0.22);
}

.login-form label {
  color: #374151;
}

.login-form input,
.login-form select {
  min-height: 48px;
  border-color: #dfe3ea;
  border-radius: 12px;
}

.login-hint {
  color: #6b7280;
}

.staff-console-shell {
  align-items: stretch;
}

.staff-console-pane {
  gap: 16px;
}

.staff-console-sidebar {
  border-radius: 14px;
}

.staff-sidebar-nav {
  gap: 8px;
}

.staff-sidebar-nav button {
  min-height: 58px;
}

.staff-console-main {
  border-radius: 14px;
}

.staff-console-main .summary-panel,
.staff-console-main .staff-pane-head,
body.is-staff-console .workbench,
body.is-staff-console .dashboard-section,
body.is-staff-console .chart-card,
body.is-staff-console .assign-panel,
body.is-staff-console .list-summary,
body.is-staff-console .records-table-wrap,
body.is-staff-console .mini-table-wrap {
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.055);
}

.staff-console-main .reminder-card,
.staff-console-card-group .entry-button,
.staff-today-outcome-lite .metric-action {
  border-radius: 12px;
}

.staff-console-card-group .entry-button {
  min-height: 88px;
}

.primary-mini,
body.is-staff-console .staff-console-main .primary-button,
body.is-staff-console .record-form button[type="submit"] {
  border-color: #e23d2e;
  background: #e23d2e;
  color: #ffffff;
}

.primary-mini:hover,
body.is-staff-console .staff-console-main .primary-button:hover,
body.is-staff-console .record-form button[type="submit"]:hover {
  border-color: #d92d20;
  background: #d92d20;
}

body.is-staff-console .filters,
body.is-staff-console .manager-follow-filters,
body.is-staff-console .assign-panel {
  gap: 12px;
  padding: 16px;
}

body.is-staff-console .filter-actions button,
body.is-staff-console .assign-panel button,
body.is-staff-console .record-actions-cell button,
body.is-staff-console .mini-table button,
body.is-staff-console .records-table button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ffffff;
  color: #374151;
  font-weight: 700;
}

body.is-staff-console .filter-actions button:hover,
body.is-staff-console .assign-panel button:hover,
body.is-staff-console .record-actions-cell button:hover,
body.is-staff-console .mini-table button:hover,
body.is-staff-console .records-table button:hover {
  border-color: #fca5a5;
  background: #fff1f0;
  color: #b42318;
}

body.is-staff-console .records-table-wrap,
body.is-staff-console .mini-table-wrap {
  overflow: auto;
}

body.is-staff-console .records-table th,
body.is-staff-console .mini-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  letter-spacing: 0.01em;
}

body.is-staff-console .records-table td,
body.is-staff-console .mini-table td {
  height: 46px;
}

body.is-staff-console .record-main-row.is-returned td,
body.is-staff-console .record-main-row.is-return-pending td,
body.is-staff-console .record-main-row.is-return-rejected td {
  background: #fff7f7;
}

body.is-staff-console .status-tag,
body.is-staff-console .status-tag-warning,
body.is-staff-console .status-tag-danger,
body.is-staff-console .status-tag-process,
body.is-staff-console .status-tag-done,
body.is-staff-console .status-tag-neutral {
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0;
}

body.is-staff-console .status-tag-danger {
  border-color: #fecaca;
  background: #fff1f0;
  color: #b42318;
}

body.is-staff-console .status-tag-process {
  border-color: #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
}

body.is-staff-console .status-tag-done {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

body.is-staff-console .record-dialog {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(17, 24, 39, 0.28);
}

body.is-staff-console .record-dialog::backdrop {
  background: rgba(17, 24, 39, 0.52);
}

body.is-staff-console .dialog-head {
  padding: 16px 18px;
  border-bottom-color: #e5e7eb;
  background: #ffffff;
}

body.is-staff-console .dialog-head h3,
body.is-staff-console .dialog-head h2 {
  color: #111827;
}

body.is-staff-console .dialog-head button {
  border-radius: 999px;
  background: #f9fafb;
}

body.is-staff-console .record-dialog .record-form {
  gap: 12px;
  padding: 18px;
}

body.is-staff-console .record-form .form-actions {
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid #eef0f3;
}

body.is-staff-console .form-section-title {
  border-left-color: #e23d2e;
  background: #fff1f0;
  color: #b42318;
}

body.is-staff-console .form-section-title.form-section-visual {
  margin-top: 8px;
  padding: 10px 12px;
  border-left: 0;
  border-radius: 12px;
  background: #f9fafb;
  color: #111827;
  font-size: 15px;
  font-weight: 800;
}

body.is-staff-console .form-section-title.form-section-visual::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 999px;
  background: #e23d2e;
  vertical-align: 1px;
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #15171c;
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.28);
}

.staff-console-shell.is-collapsed .staff-sidebar-head {
  min-height: 48px;
}

.staff-console-shell.is-collapsed .staff-sidebar-head::before,
.staff-console-shell.is-collapsed .staff-sidebar-head::after {
  display: none;
}

.staff-console-shell.is-collapsed .staff-sidebar-head button {
  position: static;
}

.advanced-nav {
  margin: 14px 0;
}

.advanced-nav > button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--muted);
  background: #fff;
}

.module-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 10px;
  padding-bottom: 4px;
}

.module-tabs.is-hidden {
  display: none;
}

.module-tabs button {
  flex: 0 0 auto;
  padding: 0 14px;
  white-space: nowrap;
}

.module-tabs button.active {
  border-color: var(--brand);
  background: #fff4f4;
  color: var(--brand-dark);
  font-weight: 700;
}

.workbench {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

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

.filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
}

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

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

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

input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.field-help {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.filter-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 1fr));
  gap: 8px;
  align-self: end;
}

.record-form {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 10px;
}

.form-section-title {
  margin-top: 4px;
  padding: 8px 10px;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #fff6f6;
  color: var(--brand-dark);
  font-weight: 700;
}

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

.communication-form-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.communication-safe-hint {
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.5;
}

.communication-readonly-board {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.communication-readonly-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.communication-readonly-group h4,
.communication-readonly-group > summary {
  margin: 0;
  padding: 10px 12px;
  background: #f9fafb;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.communication-readonly-group > summary {
  cursor: pointer;
}

.communication-readonly-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 8px;
  padding: 12px;
}

.communication-readonly-fields div {
  padding: 8px 10px;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #fafafa;
}

.communication-readonly-fields span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.communication-readonly-fields strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.communication-form-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  cursor: pointer;
  background: #f9fafb;
}

.communication-form-group > summary strong {
  color: var(--ink);
}

.communication-form-group > summary span {
  color: var(--muted);
  font-size: 12px;
}

.communication-form-fields {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.empty,
.empty-list {
  color: var(--muted);
  text-align: center;
  padding: 30px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fcfcfb;
}

.records-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.list-summary {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.list-hint {
  margin: 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff7ed;
  color: #8a4b13;
  font-size: 13px;
}

.list-summary strong {
  display: block;
  margin-bottom: 8px;
}

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

.list-summary span {
  padding: 6px 8px;
  border-radius: 8px;
  background: #fafafa;
  color: var(--ink);
  font-size: 13px;
}

.records-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.records-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.records-table th,
.records-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.records-table th {
  background: #fafafa;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.record-main-row:last-child td {
  border-bottom: 0;
}

.record-main-row.is-returned td {
  background: #fff1f2;
}

.record-main-row.is-return-pending td {
  background: #fff7ed;
}

.record-main-row.is-return-rejected td {
  background: #f3f4f6;
}

.record-main-row.is-returned td[data-label="客户状态"],
.record-main-row.is-returned td[data-label="退单状态/退单原因"],
.record-main-row.is-return-pending td[data-label="退单状态/退单原因"],
.record-main-row.is-return-rejected td[data-label="退单状态/退单原因"] {
  color: #b91c1c;
  font-weight: 700;
}

.record-main-row.is-return-rejected td[data-label="退单状态/退单原因"] {
  color: #6b7280;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #f9fafb;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.status-tag-warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.status-tag-danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.status-tag-process {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.status-tag-done {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.status-tag-neutral {
  border-color: #e5e7eb;
  background: #f8fafc;
  color: #475569;
}

.business-line-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.business-line-tag-mobile {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.business-line-tag-telecom {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.business-line-tag-empty {
  border-style: dashed;
  background: #fafafa;
  color: #6b7280;
}

.package-group-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border: 1px solid #e5e5ea;
  border-radius: 999px;
  background: #f5f5f7;
  color: #3f3f46;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.package-group-new {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.package-group-old {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.package-group-empty {
  border-style: dashed;
  background: #fafafa;
  color: #6b7280;
}

.business-line-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 6px;
}

.business-line-breakdown-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #374151;
  flex-wrap: wrap;
}

.business-line-breakdown-card strong {
  margin-right: auto;
  color: #111827;
  font-size: 13px;
}

.business-line-breakdown-card span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
}

.record-actions-cell {
  white-space: nowrap;
}

.record-actions-cell button {
  min-height: 32px;
  padding: 0 10px;
}

.record-actions-cell button + button {
  margin-left: 6px;
}

.outbound-quick-feedback-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 6px 6px 0;
  vertical-align: middle;
}

.outbound-quick-feedback-actions .quick-feedback-title {
  flex: 0 0 100%;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

.outbound-quick-feedback-actions .quick-feedback-note {
  flex: 0 0 100%;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}

.record-actions-cell .outbound-quick-feedback-actions {
  max-width: 520px;
  white-space: normal;
}

.outbound-quick-feedback-actions .quick-feedback-button {
  min-height: 30px;
  padding: 0 10px;
  border-color: #e5e7eb;
  background: #ffffff;
  color: #374151;
  font-weight: 700;
}

.outbound-quick-feedback-actions .quick-feedback-button:hover {
  border-color: #fca5a5;
  background: #fff1f0;
  color: #b42318;
}

.quick-feedback-panel {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
}

.record-actions-cell .danger-link {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff7f7;
}

.record-actions-cell .danger-link:hover {
  border-color: #fca5a5;
  background: #fee2e2;
}

.record-detail-row td {
  background: #fcfcfb;
  padding: 10px;
}

.record-detail-row .record-fields {
  margin: 0;
}

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

.record-fields div {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.record-fields span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.record-fields strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.complete-detail-overview {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.complete-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.complete-detail-status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.complete-detail-hero h3 {
  margin: 4px 0 6px;
  color: var(--ink);
  font-size: 22px;
}

.complete-detail-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.complete-detail-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.complete-contact-plan {
  display: grid;
  gap: 12px;
  margin: 0;
}

.complete-section-head h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 18px;
}

.complete-timeline-summary {
  display: grid;
  gap: 12px;
}

.complete-timeline-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.complete-timeline-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.complete-timeline-chip strong {
  color: var(--ink);
}

.complete-timeline-chip em {
  font-style: normal;
}

.complete-timeline-mini-list {
  display: grid;
  gap: 8px;
}

.complete-timeline-mini-list div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.complete-timeline-mini-list span {
  color: var(--muted);
  font-size: 12px;
}

.complete-detail-next-action {
  padding: 14px;
  border: 1px solid #fecaca;
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
}

.complete-detail-next-action-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.complete-detail-next-action-head h4 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 18px;
}

.complete-detail-next-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px;
}

.complete-detail-next-grid div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
}

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

.complete-detail-next-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.complete-detail-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.complete-detail-card h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
}

.complete-detail-card-fields {
  display: grid;
  gap: 8px;
}

.complete-detail-card-fields span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.complete-detail-card-fields strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.complete-detail-full-panel {
  margin-top: 12px;
}

.complete-detail-full-panel > summary {
  cursor: pointer;
}

.complete-detail-full-panel .boss-advanced-panel {
  margin-top: 12px;
  box-shadow: none;
}

.complete-latest-action {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

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

.complete-latest-action-head h3 {
  margin: 4px 0 0;
}

.complete-latest-action-head > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.complete-latest-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}

.complete-latest-action-grid div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
}

.complete-latest-action-grid .is-wide {
  grid-column: 1 / -1;
}

.complete-latest-action-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.complete-latest-action-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.complete-history-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.complete-history-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.complete-history-card > summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
}

.complete-history-card > summary span,
.complete-history-card > summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.complete-history-card > summary strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.complete-history-detail {
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #f9fafb;
}

.history-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.history-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fafafa;
  color: var(--text);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.detail-page {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}

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

.detail-page-header h3 {
  margin: 4px 0 0;
  font-size: 20px;
}

/* Legacy class kept harmless in case an old cached row is still present. */
.record-actions {
  display: flex;
  gap: 6px;
}

.record-actions button {
  min-height: 34px;
  padding: 0 10px;
}

.record-dialog {
  width: min(620px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  border: 0;
  border-radius: 10px;
  padding: 0;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.25);
}

.record-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.dialog-head {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.dialog-head button {
  position: relative;
  z-index: 11;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  pointer-events: auto;
}

.record-dialog .record-form {
  padding: 14px;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: none;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #202124;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.toast.show {
  display: block;
}

.outbound-dashboard {
  display: grid;
  gap: 14px;
}

.outbound-call-stats-home {
  display: grid;
  gap: 12px;
}

.outbound-call-stats-home .form-actions {
  justify-content: flex-start;
}

.outbound-call-lookup {
  display: grid;
  gap: 12px;
}

.outbound-call-lookup .simple-stat-grid {
  margin-bottom: 4px;
}

.outbound-manager-home,
.outbound-manager-overview {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.outbound-manager-progress {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.outbound-manager-store-appointments {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.outbound-store-appointment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.outbound-store-appointment-card {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.outbound-store-appointment-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.outbound-store-appointment-card strong {
  color: var(--text);
  font-size: 34px;
  line-height: 1;
}

.outbound-progress-table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.outbound-progress-table {
  min-width: 760px;
  border: 0;
}

.outbound-progress-table th,
.outbound-progress-table td {
  white-space: nowrap;
}

.outbound-progress-table td:first-child strong {
  display: block;
  margin-bottom: 4px;
}

.outbound-progress-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.outbound-progress-actions button {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.outbound-progress-actions button:hover {
  border-color: #f3b8b2;
  background: #fff7f6;
  color: #b42318;
}

.outbound-progress-actions button.is-attention {
  border-color: #f3b8b2;
  background: #fff1f0;
  color: #b42318;
  font-weight: 700;
}

.outbound-progress-actions button.is-secondary {
  color: var(--muted);
}

.outbound-progress-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.outbound-progress-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f9fafb;
  color: #4b5563;
  font-size: 12px;
}

.outbound-manager-reminders,
.outbound-manager-team-summary,
.outbound-manager-more-stats {
  border-color: #e5e7eb;
}

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

.outbound-manager-reminder-item {
  display: grid;
  grid-template-columns: auto minmax(80px, 120px) 1fr;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  background: #fbfcfe;
}

.outbound-manager-reminder-item small {
  color: var(--muted);
}

.outbound-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
}

.dashboard-section,
.chart-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dashboard-section h3,
.chart-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.dashboard-section h4 {
  margin: 14px 0 8px;
  font-size: 15px;
}

.simple-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.simple-stat {
  padding: 10px;
  border-radius: 8px;
  background: #fafafa;
}

.simple-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.simple-stat strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}

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

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

.bar-row {
  display: grid;
  grid-template-columns: minmax(76px, 110px) 1fr 34px;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f5f9;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

@media (max-width: 960px) {
  .staff-console-shell,
  .staff-console-shell.is-collapsed {
    grid-template-columns: 1fr;
  }

  .staff-console-sidebar {
    position: static;
    min-height: auto;
  }

  .staff-console-shell.is-collapsed .staff-sidebar-head div,
  .staff-console-shell.is-collapsed .staff-sidebar-nav button span {
    display: block;
  }

  .staff-console-shell.is-collapsed .staff-sidebar-nav button {
    text-align: left;
  }

  .staff-sidebar-nav {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .assign-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .role-select {
    grid-template-columns: 1fr;
    min-height: auto;
    max-width: 520px;
  }

  .role-button {
    min-height: 112px;
  }

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

  .summary-group,
  .metric-list,
  .honor-board-grid,
  .outbound-metrics,
  .manager-workbench,
  .simple-stat-grid,
  .boss-panel .simple-stat-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .manager-workbench .summary-panel:first-child,
  .manager-workbench .summary-panel:nth-child(2) {
    grid-column: auto;
  }

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

  .filters {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .entry-buttons,
  .entry-buttons.compact {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .record-fields {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 620px) {
  .staff-flow-list {
    grid-template-columns: 1fr;
  }

  .staff-flow-rules {
    display: block;
  }

  .staff-flow-rules strong {
    display: block;
    margin-bottom: 4px;
  }

  .staff-sidebar-nav {
    grid-template-columns: 1fr;
  }

  .app-header,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .user-bar {
    justify-content: space-between;
  }

  .role-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .role-button strong {
    font-size: 23px;
  }

  .primary-button {
    min-height: 48px;
    font-size: 16px;
  }

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

  .summary-group,
  .metric-list,
  .honor-board-grid,
  .outbound-metrics,
  .manager-workbench,
  .simple-stat-grid,
  .boss-panel .simple-stat-grid {
    grid-template-columns: 1fr;
  }

  .honor-board-title {
    display: block;
  }

  .honor-board-title p {
    text-align: left;
  }

  .entry-group {
    padding: 12px;
  }

  .entry-group-collapsed {
    padding: 0;
  }

  .entry-buttons,
  .entry-buttons.compact {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .entry-button {
    min-height: 76px;
  }

  .entry-primary {
    min-height: 96px;
  }

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

  .record-form {
    gap: 9px;
  }

  .records-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .records-table {
    min-width: 0;
  }

  .records-table thead {
    display: none;
  }

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

  .record-main-row {
    margin-bottom: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .records-table td {
    border: 0;
    padding: 3px 0;
    font-size: 13px;
    line-height: 1.35;
  }

  .record-main-row td::before {
    content: attr(data-label) "：";
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .record-actions-cell {
    display: flex !important;
    justify-content: flex-end;
    gap: 6px;
    padding-top: 8px !important;
  }

  .record-actions-cell::before {
    display: none;
  }

  .record-actions-cell button + button {
    margin-left: 0;
  }

  .record-detail-row {
    margin: -4px 0 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fcfcfb;
  }

  .record-detail-row td {
    padding: 8px !important;
  }

  .record-fields {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .readonly-panel {
    grid-template-columns: 1fr;
  }

  .record-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .record-dialog.recovery-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
  }

  .record-dialog .record-form {
    padding: 10px;
    padding-bottom: 24px;
  }

  .record-dialog.recovery-dialog .form-actions {
    grid-template-columns: 1fr;
  }

  .record-dialog.recovery-dialog .form-actions button {
    width: 100%;
  }

  .recovery-action-summary {
    text-align: center;
  }

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

  .recovery-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    border: 1px solid var(--line);
    padding-bottom: 2px;
  }

  .recovery-table {
    min-width: 680px;
    width: 100%;
  }

  .recovery-table.records-table {
    display: table;
  }

  .recovery-table.records-table thead {
    display: table-header-group;
  }

  .recovery-table.records-table tbody {
    display: table-row-group;
  }

  .recovery-table.records-table tr {
    display: table-row;
    width: auto;
  }

  .recovery-table.records-table th,
  .recovery-table.records-table td {
    display: table-cell;
    width: auto;
    padding: 7px;
    border-bottom: 1px solid var(--line);
    white-space: normal;
  }

  .recovery-table.records-table td::before {
    content: none;
  }

  .recovery-detail-group .readonly-panel {
    grid-template-columns: 1fr;
  }

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

  .workbench {
    padding: 10px;
  }
}

.manager-follow-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.manager-follow-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.manager-follow-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.manager-follow-tabs button.active {
  border-color: rgba(197, 0, 0, 0.45);
  background: #fff4f4;
  color: var(--primary);
  box-shadow: 0 8px 18px rgba(197, 0, 0, 0.08);
}

.manager-follow-filters {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(220px, 1fr) minmax(140px, 180px) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.manager-follow-filter-actions {
  display: flex;
  gap: 8px;
}

.manager-follow-table td,
.manager-follow-table th {
  white-space: normal;
}

.manager-follow-profile {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
  padding: 6px;
  border-radius: 12px;
  background: #f8fafc;
}

.manager-follow-profile-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.manager-follow-profile-card h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
}

.manager-follow-profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
}

.manager-follow-profile-fields div {
  padding: 8px 10px;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #fafafa;
}

.manager-follow-profile-fields span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.manager-follow-profile-fields strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.manager-follow-profile-footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.quick-call-customer {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.quick-call-customer strong {
  font-size: 17px;
}

.quick-call-customer span {
  color: var(--muted);
  line-height: 1.45;
}

.outbound-number-picker {
  display: grid;
  gap: 8px;
}

.outbound-number-option {
  display: grid;
  grid-template-columns: minmax(74px, auto) 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.outbound-number-option span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.outbound-number-option strong {
  overflow-wrap: anywhere;
}

.outbound-full-data,
.outbound-advanced-fields {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.outbound-full-data > summary,
.outbound-advanced-fields > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.outbound-full-data[open] > summary,
.outbound-advanced-fields[open] > summary {
  margin-bottom: 10px;
}

.outbound-detail-primary-action {
  justify-content: flex-start;
  padding: 12px;
  border: 1px solid rgba(226, 61, 46, 0.18);
  border-radius: 10px;
  background: #fff8f7;
}

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

.outbound-history-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.outbound-history-card > summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px 12px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
}

.outbound-history-card > summary span,
.outbound-history-card > summary small {
  color: var(--muted);
}

.outbound-history-card > summary strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.outbound-history-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #f9fafb;
}

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

.outbound-history-detail strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .manager-follow-filters {
    grid-template-columns: 1fr;
  }

  .manager-follow-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .outbound-number-option,
  .outbound-history-card > summary,
  .outbound-history-detail {
    grid-template-columns: 1fr;
  }
}

/* Apple-style visual cleanup: presentation only, no business behavior changes. */
:root {
  --bg: #f5f5f7;
  --panel: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --brand: #c24135;
  --brand-dark: #8f2d27;
  --brand-soft: #fff5f3;
  --soft-panel: #fbfbfd;
  --warm-panel: #fffaf4;
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.045);
  --focus: #007aff;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.login-panel {
  background: linear-gradient(135deg, #f5f5f7 0%, #ffffff 100%);
}

.login-panel::before {
  content: "红色通信一号店";
  color: var(--ink);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.86);
  border-bottom-color: rgba(0, 0, 0, 0.08);
  backdrop-filter: saturate(180%) blur(18px);
}

button,
input,
select,
textarea {
  border-color: var(--line);
  border-radius: 8px;
}

button {
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button:hover {
  border-color: #c7c7cc;
  background: #f5f5f7;
}

.primary-button,
.primary-mini,
.login-form button[type="submit"],
.login-form .primary-button,
.record-form button[type="submit"],
.staff-console-main .primary-button,
body.is-staff-console .staff-console-main .primary-button,
body.is-staff-console .record-form button[type="submit"] {
  border-color: #1d1d1f;
  background: #1d1d1f;
  color: #ffffff;
  font-weight: 700;
}

.primary-button:hover,
.primary-mini:hover,
.login-form button[type="submit"]:hover,
.login-form .primary-button:hover,
.record-form button[type="submit"]:hover,
.staff-console-main .primary-button:hover,
body.is-staff-console .staff-console-main .primary-button:hover,
body.is-staff-console .record-form button[type="submit"]:hover {
  border-color: #000000;
  background: #000000;
}

input,
select,
textarea {
  background: #ffffff;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: 2px solid rgba(0, 122, 255, 0.42);
  outline-offset: 2px;
}

.eyebrow {
  color: #86868b;
  font-weight: 650;
}

.login-form,
.role-button,
.summary-card,
.summary-panel,
.workbench,
.dashboard-section,
.chart-card,
.assign-panel,
.list-summary,
.records-table-wrap,
.mini-table-wrap,
.entry-group,
.entry-button,
.record-dialog,
.staff-console-sidebar,
.staff-console-main,
.knowledge-panel,
.knowledge-card,
.complete-detail-card,
.outbound-history-card,
.manager-follow-profile-card {
  border-color: rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
}

.entry-button {
  min-height: 84px;
  box-shadow: none;
}

.entry-button:hover {
  border-color: #c7c7cc;
  background: #fbfbfd;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.055);
}

.entry-primary,
.staff-console-card-group .entry-primary {
  border-left: 0;
  border-color: #c7c7cc;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
}

.entry-primary:hover,
.staff-console-card-group .entry-primary:hover {
  border-color: #1d1d1f;
  background: #ffffff;
}

.form-section-title {
  border-left-color: #d2d2d7;
  background: #f5f5f7;
  color: var(--ink);
}

body.is-staff-console .app-header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(0, 0, 0, 0.08);
  color: var(--ink);
  box-shadow: none;
}

body.is-staff-console .app-header .eyebrow,
body.is-staff-console #roleTitle {
  color: var(--ink);
}

body.is-staff-console .staff-console-main,
.staff-console-main {
  background: #f5f5f7;
}

body.is-staff-console .filter-actions button:hover,
body.is-staff-console .assign-panel button:hover,
body.is-staff-console .record-actions-cell button:hover,
body.is-staff-console .mini-table button:hover,
body.is-staff-console .records-table button:hover {
  border-color: #c7c7cc;
  background: #f5f5f7;
  color: var(--ink);
}

.staff-today-outcome-lite .metric-action:hover,
.staff-today-outcome-lite .metric-action.is-active {
  border-color: #c7c7cc;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.055);
}

.staff-today-outcome-lite .metric-action:hover::after,
.staff-today-outcome-lite .metric-action.is-active::after {
  color: var(--focus);
}

@media (min-width: 761px) {
  .records-table-wrap,
  .mini-table-wrap,
  .outbound-progress-table-wrap,
  .appointment-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }

  .records-table-wrap::-webkit-scrollbar,
  .mini-table-wrap::-webkit-scrollbar,
  .outbound-progress-table-wrap::-webkit-scrollbar,
  .appointment-table-wrap::-webkit-scrollbar {
    height: 12px;
  }

  .records-table-wrap::-webkit-scrollbar-thumb,
  .mini-table-wrap::-webkit-scrollbar-thumb,
  .outbound-progress-table-wrap::-webkit-scrollbar-thumb,
  .appointment-table-wrap::-webkit-scrollbar-thumb {
    border: 3px solid #f5f5f7;
    border-radius: 999px;
    background: #c7c7cc;
  }

  .records-table-wrap::-webkit-scrollbar-track,
  .mini-table-wrap::-webkit-scrollbar-track,
  .outbound-progress-table-wrap::-webkit-scrollbar-track,
  .appointment-table-wrap::-webkit-scrollbar-track {
    background: #f5f5f7;
  }

  .records-table {
    min-width: 1080px;
  }

  .mini-table {
    min-width: 860px;
  }

  .records-table td,
  .mini-table td {
    overflow-wrap: anywhere;
  }

  .records-table th:last-child,
  .records-table td:last-child,
  .mini-table th:last-child,
  .mini-table td:last-child {
    min-width: 230px;
    position: sticky;
    right: 0;
    z-index: 2;
    border-left: 1px solid #e5e5ea;
    background: #ffffff;
    box-shadow: -12px 0 18px rgba(245, 245, 247, 0.88);
  }

  .records-table th:last-child,
  .mini-table th:last-child {
    z-index: 4;
    background: #f5f5f7;
  }

  .record-actions-cell {
    display: flex;
    min-width: 230px;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    white-space: normal;
  }

  .record-actions-cell button,
  .mini-table td:last-child button,
  .appointment-table-wrap .mini-table td:last-child button {
    min-height: 32px;
    max-width: 150px;
    margin: 2px 4px 2px 0;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }

  .record-actions-cell button + button {
    margin-left: 0;
  }

  .outbound-progress-actions {
    min-width: 230px;
    white-space: normal;
  }
}

/* Staff console completion pass: compact Apple-like sidebar and lighter groups. */
body.is-staff-console .staff-console-shell,
body.is-staff-console .staff-console-shell.is-collapsed {
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

body.is-staff-console .staff-console-sidebar {
  position: sticky;
  top: 88px;
  min-height: calc(100vh - 112px);
  max-height: calc(100vh - 112px);
  align-content: start;
  gap: 12px;
  overflow: visible;
  padding: 14px;
  border-color: rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.045);
  z-index: 20;
}

body.is-staff-console .staff-sidebar-head {
  position: static;
  display: flex;
  min-height: 56px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 14px;
  border-bottom: 1px solid #e5e5ea;
}

body.is-staff-console .staff-sidebar-head::before,
body.is-staff-console .staff-sidebar-head::after {
  display: none;
}

body.is-staff-console .staff-sidebar-head > div {
  position: static;
  min-width: 0;
}

body.is-staff-console .staff-console-shell.is-collapsed .staff-sidebar-head div {
  display: block;
}

body.is-staff-console .staff-sidebar-head strong {
  color: #1d1d1f;
  font-size: 16px;
  line-height: 1.25;
}

body.is-staff-console .staff-sidebar-head span {
  margin-top: 4px;
  color: #86868b;
  font-size: 12.5px;
}

body.is-staff-console .staff-sidebar-head button {
  position: static;
  flex: 0 0 auto;
  min-width: 42px;
  min-height: 42px;
  border-color: #1d1d1f;
  border-radius: 12px;
  background: #1d1d1f;
  color: #ffffff;
}

body.is-staff-console .staff-sidebar-head button:hover {
  border-color: #000000;
  background: #000000;
}

body.is-staff-console .staff-sidebar-nav {
  display: grid;
  gap: 9px;
  position: relative;
  overflow: visible;
}

body.is-staff-console .staff-sidebar-nav button,
body.is-staff-console .staff-console-shell.is-collapsed .staff-sidebar-nav button {
  display: grid;
  min-height: 72px;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-color: transparent;
  border-radius: 12px;
  background: #ffffff;
  color: #1d1d1f;
  text-align: left;
}

body.is-staff-console .staff-menu-index {
  width: 36px;
  height: 34px;
  border-color: #e5e5ea;
  border-radius: 12px;
  background: #f5f5f7;
  color: #6e6e73;
  font-size: 13px;
}

body.is-staff-console .staff-sidebar-nav button strong {
  color: #1d1d1f;
  font-size: 16px;
  line-height: 1.25;
}

body.is-staff-console .staff-sidebar-nav button span,
body.is-staff-console .staff-console-shell.is-collapsed .staff-sidebar-nav button span {
  display: block;
  color: #86868b;
  font-size: 13px;
  line-height: 1.35;
}

body.is-staff-console .staff-sidebar-nav button:hover,
body.is-staff-console .staff-sidebar-nav button.active {
  border-color: #d2d2d7;
  background: #f5f5f7;
  box-shadow: none;
}

body.is-staff-console .staff-sidebar-nav button.active::before {
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: #007aff;
}

body.is-staff-console .staff-sidebar-nav button.active strong,
body.is-staff-console .staff-sidebar-nav button.active span {
  color: #1d1d1f;
}

body.is-staff-console .staff-sidebar-nav button.active .staff-menu-index {
  border-color: #d2d2d7;
  background: #ffffff;
  color: #1d1d1f;
}

body.is-staff-console .staff-menu-cluster {
  position: relative;
}

body.is-staff-console .staff-menu-cluster-button {
  width: 100%;
  grid-template-columns: 42px minmax(0, 1fr) 22px !important;
}

body.is-staff-console .staff-menu-cluster.has-active > .staff-menu-cluster-button {
  border-color: #d2d2d7;
  background: #f5f5f7;
}

body.is-staff-console .staff-menu-branch {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #f5f5f7;
  color: #6e6e73;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

body.is-staff-console .staff-submenu {
  position: absolute;
  top: 0;
  left: calc(100% + 10px);
  z-index: 60;
  display: none;
  width: min(380px, calc(100vw - 390px));
  max-height: min(560px, calc(100vh - 132px));
  overflow: auto;
  box-sizing: border-box;
  align-content: start;
  padding: 12px;
  border: 1px solid #e5e5ea;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
}

body.is-staff-console .staff-menu-cluster.is-open > .staff-submenu {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

body.is-staff-console .staff-submenu-title {
  grid-column: 1 / -1;
  padding: 4px 4px 8px;
  color: #6e6e73;
  font-size: 12px;
  font-weight: 800;
}

body.is-staff-console .staff-submenu button,
body.is-staff-console .staff-console-shell.is-collapsed .staff-submenu button {
  min-height: 72px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 11px;
  border-color: transparent;
  background: #ffffff;
}

body.is-staff-console .staff-submenu button strong {
  font-size: 15px;
  line-height: 1.25;
}

body.is-staff-console .staff-submenu button .staff-menu-copy > span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
}

body.is-staff-console .staff-submenu::-webkit-scrollbar {
  width: 8px;
}

body.is-staff-console .staff-submenu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #d1d5db;
}

body.is-staff-console .staff-submenu button:hover,
body.is-staff-console .staff-submenu button.active {
  border-color: #d2d2d7;
  background: #f5f5f7;
}

body.is-staff-console .staff-submenu button.active::before {
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: #007aff;
}

body.is-staff-console .staff-submenu-index {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 12px;
}

body.is-staff-console .staff-console-main {
  padding: 20px;
  border-radius: 8px;
  box-shadow: none;
}

body.is-staff-console .staff-console-main .entry-group-collapsed {
  overflow: hidden;
  border-color: rgba(0, 0, 0, 0.08);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.025);
}

body.is-staff-console .staff-console-main .entry-group-collapsed > summary {
  min-height: 44px;
  padding: 9px 12px;
}

body.is-staff-console .staff-console-main .entry-group-collapsed > summary .eyebrow {
  display: none;
}

body.is-staff-console .staff-console-main .entry-group-collapsed > summary strong {
  font-size: 15px;
}

body.is-staff-console .staff-console-main .entry-group-collapsed > summary em {
  font-size: 12px;
}

body.is-staff-console .staff-console-card-group .entry-button {
  min-height: 76px;
}

body.is-staff-console .staff-console-card-group .entry-button strong {
  font-size: 16px;
}

body.is-staff-console .staff-more-workspace {
  gap: 14px;
}

body.is-staff-console .staff-more-workspace .staff-console-card-group {
  border-top: 0;
  padding: 18px 20px;
}

body.is-staff-console .staff-more-workspace .staff-console-card-group h3 {
  margin-bottom: 4px;
  font-size: 18px;
}

body.is-staff-console .staff-more-workspace .entry-buttons.compact {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

body.is-staff-console .staff-more-workspace .entry-button {
  min-height: 88px;
}

body.is-staff-console .staff-more-workspace .staff-operation-manual {
  margin-top: 4px;
}

@media (max-width: 920px) {
  body.is-staff-console .staff-console-shell,
  body.is-staff-console .staff-console-shell.is-collapsed {
    grid-template-columns: 1fr;
  }

  body.is-staff-console .staff-console-sidebar {
    position: static;
    max-height: none;
  }

  body.is-staff-console .staff-sidebar-nav {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}

/* Staff table polish pass: keep numbers readable and make action cells feel native. */
body.is-staff-console .staff-console-shell,
body.is-staff-console .staff-console-shell.is-collapsed {
  grid-template-columns: 330px minmax(0, 1fr);
}

body.is-staff-console .staff-sidebar-nav button,
body.is-staff-console .staff-console-shell.is-collapsed .staff-sidebar-nav button {
  min-height: 72px;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
}

body.is-staff-console .staff-menu-section {
  margin: 10px 8px 2px;
  color: #8e8e93;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

body.is-staff-console .staff-menu-index {
  width: 38px;
  height: 34px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 920px) {
  body.is-staff-console .staff-console-shell,
  body.is-staff-console .staff-console-shell.is-collapsed {
    grid-template-columns: 1fr;
  }

  body.is-staff-console .staff-console-sidebar {
    position: static;
    min-height: auto;
    max-height: none;
  }

  body.is-staff-console .staff-sidebar-nav {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 620px) {
  body.is-staff-console .staff-sidebar-nav {
    grid-template-columns: 1fr;
  }
}

body.is-staff-console .records-table-wrap {
  border-color: #e5e5ea;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.035);
}

body.is-staff-console .records-table {
  min-width: 1320px;
  border-collapse: separate;
  border-spacing: 0;
}

@media (max-width: 920px) {
  html {
    scroll-padding-top: 156px;
  }

  .entry-button,
  .simple-stat-button,
  .staff-console-pane,
  .staff-pane-head,
  .workbench,
  #moduleTitle,
  button[data-action],
  body.is-staff-console .staff-sidebar-nav button {
    scroll-margin-top: 156px;
  }

  .quick-entry > #roleActionGroups {
    order: -1;
  }

  .quick-entry > #roleDashboard {
    order: 0;
  }

  .role-dashboard .entry-button {
    position: relative;
  }
}

/* Mobile first-pass adaptation: keep the same business flow, make the web app usable on phones. */
@media (max-width: 760px) {
  html {
    scroll-padding-top: 156px;
  }

  body {
    min-width: 0;
    background: #f5f5f7;
  }

  .app-shell,
  main,
  .role-workspace,
  .quick-entry,
  .workbench,
  .dashboard {
    width: 100%;
    max-width: 100%;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 0 0 18px 18px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(18px);
  }

  .app-header h1 {
    font-size: 24px;
    line-height: 1.18;
  }

  .app-header .header-tools,
  .user-bar {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
  }

  .date-control,
  .date-control input {
    width: 100%;
  }

  main {
    padding: 12px;
  }

  .outbound-store-appointment-grid,
  .boss-store-overview-grid {
    grid-template-columns: 1fr;
  }

  .role-topbar,
  .role-actions,
  .entry-buttons,
  .entry-buttons.compact,
  .dashboard-grid,
  .simple-stats-grid,
  .customer-asset-filter-grid,
  .manager-flight-log-head,
  .manager-flight-metrics,
  .manager-flight-period-tasks,
  .manager-submission-status-grid,
  .manager-submission-form-grid,
  .account-management-form,
  .record-form,
  .record-fields {
    grid-template-columns: 1fr !important;
  }

  .manager-flight-log-head {
    display: grid;
  }

  .manager-flight-timeline-card {
    grid-template-columns: 34px 1fr;
  }

  .manager-flight-timeline-card dl {
    grid-template-columns: 1fr;
  }

  .entry-button,
  .simple-stat-button {
    min-height: 78px;
    padding: 14px;
    border-radius: 14px;
    scroll-margin-top: 156px;
  }

  button[data-action],
  body.is-staff-console .staff-sidebar-nav button {
    scroll-margin-top: 156px;
  }

  .role-dashboard .entry-button {
    position: relative;
  }

  body.is-staff-console .staff-console-shell,
  body.is-staff-console .staff-console-shell.is-collapsed {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body.is-staff-console .staff-console-sidebar {
    position: static;
    min-height: auto;
    max-height: none;
    padding: 14px;
    border-radius: 16px;
  }

  body.is-staff-console .staff-sidebar-nav {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.is-staff-console .staff-sidebar-nav button,
  body.is-staff-console .staff-console-shell.is-collapsed .staff-sidebar-nav button {
    min-height: 70px;
    border-color: #e5e5ea;
  }

  body.is-staff-console .staff-console-main {
    padding: 12px;
    border-radius: 16px;
  }

  .records-table-wrap,
  body.is-staff-console .records-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .records-table,
  body.is-staff-console .records-table {
    min-width: 980px;
  }

  .record-dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 18px;
  }

  .dialog-head {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #ffffff;
  }

  .form-actions,
  .account-management-actions,
  .filter-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  button,
  input,
  select,
  textarea {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .app-header h1 {
    font-size: 21px;
  }

  body.is-staff-console .staff-sidebar-head {
    align-items: center;
  }

  body.is-staff-console .staff-sidebar-nav button,
  body.is-staff-console .staff-console-shell.is-collapsed .staff-sidebar-nav button {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 12px;
  }

  .entry-button strong,
  body.is-staff-console .staff-sidebar-nav button strong {
    font-size: 15px;
  }
}

body.is-staff-console .records-table th {
  padding: 12px 14px;
  background: #f5f5f7;
  color: #6e6e73;
  font-size: 12.5px;
  font-weight: 800;
}

body.is-staff-console .records-table td {
  padding: 13px 14px;
  background: #ffffff;
  color: #1d1d1f;
  font-size: 13.5px;
  line-height: 1.45;
  overflow-wrap: normal;
  word-break: normal;
}

body.is-staff-console .records-table tbody tr:hover td {
  background: #fbfbfd;
}

body.is-staff-console .records-table td[data-label="手机号"],
body.is-staff-console .records-table td[data-label="主手机号"],
body.is-staff-console .records-table td[data-label="客户手机号"],
body.is-staff-console .records-table td[data-label="本人手机号"] {
  min-width: 116px;
  color: #111827;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: keep-all;
}

body.is-staff-console .records-table td[data-label="分流卡时间 / 接待时间"],
body.is-staff-console .records-table td[data-label="接待时间"],
body.is-staff-console .records-table td[data-label="下次跟进时间"],
body.is-staff-console .records-table td[data-label="下次联系时间"],
body.is-staff-console .records-table td[data-label="预约到店时间"] {
  min-width: 108px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body.is-staff-console .records-table td[data-label="客户姓名"],
body.is-staff-console .records-table td[data-label="客户来源"],
body.is-staff-console .records-table td[data-label="办理结果"],
body.is-staff-console .records-table td[data-label="处理状态"] {
  min-width: 92px;
}

body.is-staff-console .records-table th:last-child,
body.is-staff-console .records-table td:last-child {
  min-width: 210px;
  border-left: 1px solid #e5e5ea;
  background: #ffffff;
  box-shadow: -8px 0 14px rgba(245, 245, 247, 0.76);
}

body.is-staff-console .records-table tbody tr:hover td:last-child {
  background: #ffffff;
}

body.is-staff-console .record-actions-cell {
  display: table-cell;
  min-width: 210px;
  vertical-align: middle;
  white-space: normal;
}

body.is-staff-console .record-actions-cell button,
body.is-staff-console .records-table td:last-child button {
  display: inline-flex;
  min-width: 74px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin: 3px 5px 3px 0;
  padding: 0 13px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

body.is-staff-console .record-actions-cell button + button {
  margin-left: 0;
}

@media (max-width: 760px) {
  body.is-staff-console .staff-console-shell,
  body.is-staff-console .staff-console-shell.is-collapsed {
    grid-template-columns: 1fr;
  }

  body.is-staff-console .staff-console-sidebar {
    position: static;
    min-height: auto;
    max-height: none;
  }

  body.is-staff-console .staff-sidebar-nav {
    grid-template-columns: 1fr;
  }

  body.is-staff-console .records-table,
  .records-table {
    min-width: 980px;
  }

  body.is-staff-console .records-table th:last-child,
  body.is-staff-console .records-table td:last-child,
  body.is-staff-console .record-actions-cell {
    min-width: 170px;
  }
}

/* Store-entry selector for login. */
.login-panel::before {
  content: attr(data-store-name);
}

.login-store-entry {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e5e5ea;
  border-radius: 14px;
  background: #f5f5f7;
}

.login-store-entry__label {
  margin: 0;
  color: #6e6e73;
  font-size: 13px;
  font-weight: 700;
}

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

.login-store-entry__buttons button {
  display: grid;
  min-height: 58px;
  padding: 10px 12px;
  border-color: #d2d2d7;
  border-radius: 12px;
  background: #ffffff;
  text-align: left;
}

.login-store-entry__buttons button strong,
.login-store-entry__buttons button span {
  display: block;
}

.login-store-entry__buttons button strong {
  color: #1d1d1f;
  font-size: 15px;
}

.login-store-entry__buttons button span {
  margin-top: 3px;
  color: #86868b;
  font-size: 12px;
}

.login-store-entry__buttons button.active {
  border-color: #1d1d1f;
  background: #1d1d1f;
}

.login-store-entry__buttons button.active strong,
.login-store-entry__buttons button.active span {
  color: #ffffff;
}

@media (max-width: 620px) {
  .login-store-entry__buttons {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body.is-staff-console .manager-follow-table-wrap {
    overflow-x: hidden;
  }

  body.is-staff-console .manager-follow-table {
    min-width: 0 !important;
    width: 100%;
  }

  body.is-staff-console .manager-follow-table thead {
    display: none;
  }

  body.is-staff-console .manager-follow-table,
  body.is-staff-console .manager-follow-table tbody,
  body.is-staff-console .manager-follow-table tr,
  body.is-staff-console .manager-follow-table td {
    display: block;
    width: 100%;
  }

  body.is-staff-console .manager-follow-table tbody tr:not(.record-detail-row) {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    background: #ffffff;
  }

  body.is-staff-console .manager-follow-table td {
    min-width: 0 !important;
    border: 0 !important;
    padding: 4px 0;
    background: transparent !important;
    box-shadow: none !important;
    white-space: normal;
  }

  body.is-staff-console .manager-follow-table td::before {
    content: attr(data-label) "：";
    color: #6e6e73;
    font-size: 12px;
    font-weight: 800;
  }

  body.is-staff-console .manager-follow-table .record-actions-cell {
    display: flex;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 8px;
  }

  body.is-staff-console .manager-follow-table .record-actions-cell::before {
    flex: 1 0 100%;
  }

  body.is-staff-console .manager-follow-table .record-actions-cell button {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    white-space: normal;
  }

  body.is-staff-console .manager-follow-table .record-detail-row {
    margin-top: -4px;
    margin-bottom: 10px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body.is-staff-console .manager-follow-table .record-detail-row td {
    padding: 0;
  }

  body.is-staff-console .manager-follow-table .record-detail-row td::before {
    content: none;
  }

  body.is-staff-console .appointment-table-wrap {
    overflow-x: hidden;
  }

  body.is-staff-console .appointment-table-wrap .mini-table {
    min-width: 0;
  }

  body.is-staff-console .appointment-table-wrap .mini-table thead {
    display: none;
  }

  body.is-staff-console .appointment-table-wrap .mini-table,
  body.is-staff-console .appointment-table-wrap .mini-table tbody,
  body.is-staff-console .appointment-table-wrap .mini-table tr,
  body.is-staff-console .appointment-table-wrap .mini-table td {
    display: block;
    width: 100%;
  }

  body.is-staff-console .appointment-table-wrap .mini-table tr {
    margin-bottom: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
  }

  body.is-staff-console .appointment-table-wrap .mini-table td {
    min-width: 0 !important;
    border: 0;
    padding: 3px 0;
    font-size: 13px;
    line-height: 1.35;
  }

  body.is-staff-console .appointment-table-wrap .mini-table td:last-child {
    display: flex;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 8px;
  }

  body.is-staff-console .appointment-table-wrap .mini-table td:last-child button {
    flex: 1 1 100%;
    max-width: 100%;
    margin: 0;
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .quick-entry,
  #roleActionGroups,
  #roleDashboard,
  .entry-group,
  .entry-buttons {
    position: relative;
  }

  #roleActionGroups {
    z-index: 2;
  }

  #roleDashboard {
    z-index: 1;
  }

  .entry-group > .entry-title,
  .entry-button > strong,
  .entry-button > span {
    pointer-events: none;
  }

  .entry-button {
    position: relative;
    z-index: 1;
    touch-action: manipulation;
  }
}

/* Mobile role console: keep the same left navigation / right workspace logic on phones. */
@media (max-width: 760px) {
  body.is-staff-console .staff-console-shell,
  body.is-staff-console .staff-console-shell.is-collapsed {
    grid-template-columns: 112px minmax(0, 1fr) !important;
    gap: 8px;
    align-items: start;
  }

  body.is-staff-console .staff-console-sidebar {
    position: sticky;
    top: 8px;
    min-height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
    padding: 8px 6px;
    border-radius: 12px;
    overflow: visible;
  }

  body.is-staff-console .staff-sidebar-head {
    display: block;
    min-height: auto;
    padding: 0 0 8px;
  }

  body.is-staff-console .staff-sidebar-head strong {
    font-size: 13px;
    line-height: 1.25;
  }

  body.is-staff-console .staff-sidebar-head span,
  body.is-staff-console .staff-sidebar-head button {
    display: none;
  }

  body.is-staff-console .staff-sidebar-nav {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body.is-staff-console .staff-sidebar-nav button,
  body.is-staff-console .staff-console-shell.is-collapsed .staff-sidebar-nav button {
    min-height: 58px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
    padding: 7px 4px;
    border: 1px solid transparent;
    text-align: center;
  }

  body.is-staff-console .staff-menu-cluster-button,
  body.is-staff-console .staff-console-shell.is-collapsed .staff-menu-cluster-button {
    grid-template-columns: 1fr !important;
  }

  body.is-staff-console .staff-menu-branch {
    display: none;
  }

  body.is-staff-console .staff-submenu {
    left: calc(100% + 6px);
    width: min(300px, calc(100vw - 120px));
    max-height: calc(100vh - 24px);
    padding: 8px;
  }

  body.is-staff-console .staff-menu-cluster.is-open > .staff-submenu {
    grid-template-columns: 1fr;
  }

  body.is-staff-console .staff-submenu button,
  body.is-staff-console .staff-console-shell.is-collapsed .staff-submenu button {
    min-height: 52px;
    grid-template-columns: 1fr;
    justify-items: start;
    text-align: left;
  }

  body.is-staff-console .staff-submenu button .staff-menu-index {
    display: none;
  }

  body.is-staff-console .staff-menu-index {
    width: 30px;
    height: 26px;
    border-radius: 9px;
    font-size: 11px;
  }

  body.is-staff-console .staff-sidebar-nav button strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
    line-height: 1.18;
    text-align: center;
  }

  body.is-staff-console .staff-menu-copy > span {
    display: none !important;
  }

  body.is-staff-console .staff-sidebar-nav button.active::before {
    top: 6px;
    bottom: 6px;
    width: 3px;
  }

  body.is-staff-console .staff-console-main {
    min-width: 0;
    padding: 8px !important;
    border-radius: 12px;
    overflow: hidden;
  }

  body.is-staff-console .quick-entry,
  body.is-staff-console .workbench,
  body.is-staff-console #roleDashboard,
  body.is-staff-console .dashboard-section,
  body.is-staff-console .summary-panel,
  body.is-staff-console .records-table-wrap,
  body.is-staff-console .mini-table-wrap {
    min-width: 0;
    max-width: 100%;
  }

  body.is-staff-console .filters,
  body.is-staff-console .manager-follow-filters {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  body.is-staff-console .staff-console-main .entry-actions,
  body.is-staff-console .staff-console-main .entry-grid,
  body.is-staff-console .staff-console-main .metric-list,
  body.is-staff-console .staff-console-main .simple-stat-grid,
  body.is-staff-console .staff-console-main .staff-today-outcome-lite,
  body.is-staff-console .staff-console-main .boss-advanced-actions {
    grid-template-columns: 1fr !important;
  }

  body.is-staff-console .staff-console-main button,
  body.is-staff-console .staff-console-main .entry-button,
  body.is-staff-console .staff-console-main .simple-stat-button,
  body.is-staff-console .staff-console-main .metric-action {
    max-width: 100%;
    min-width: 0;
    white-space: normal;
  }
}

@media (min-width: 761px) and (max-width: 920px) {
  body.is-staff-console .staff-console-shell,
  body.is-staff-console .staff-console-shell.is-collapsed {
    grid-template-columns: 260px minmax(0, 1fr) !important;
    gap: 12px;
  }

  body.is-staff-console .staff-console-sidebar {
    position: sticky;
    top: 12px;
    min-height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
    overflow: visible;
  }

  body.is-staff-console .staff-sidebar-nav {
    grid-template-columns: 1fr !important;
  }

  body.is-staff-console .staff-submenu {
    width: min(360px, calc(100vw - 390px));
    max-height: calc(100vh - 36px);
  }
}

@media (max-width: 420px) {
  body.is-staff-console .staff-console-shell,
  body.is-staff-console .staff-console-shell.is-collapsed {
    grid-template-columns: 98px minmax(0, 1fr) !important;
    gap: 6px;
  }

  body.is-staff-console .staff-console-sidebar {
    padding: 7px 5px;
  }

  body.is-staff-console .staff-sidebar-nav button,
  body.is-staff-console .staff-console-shell.is-collapsed .staff-sidebar-nav button {
    min-height: 54px;
  }
}
