/* Office manager dashboard */

.main.manager-dashboard-main {
  max-width: min(1600px, 100%);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.manager-dashboard-intro {
  max-width: none;
  margin-bottom: 1.5rem;
  color: var(--ev-gray);
  line-height: 1.55;
}

.manager-dashboard-main .top-nav {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.manager-dashboard-main .dashboard-section.card {
  width: 100%;
}

.manager-dashboard-main .customer-table-wrap {
  overflow-x: auto;
  margin: 0;
  -webkit-overflow-scrolling: touch;
}

.manager-dashboard-main .agent-score-table,
.manager-dashboard-main #workloadTable {
  min-width: 640px;
}

.manager-dashboard-main .assign-table {
  min-width: 520px;
}

.manager-dashboard-main .assign-table .customer-name {
  min-width: 10rem;
  word-break: break-word;
}

.manager-dashboard-main .dashboard-toolbar input[type='search'] {
  min-width: min(280px, 100%);
  flex: 1 1 200px;
  max-width: none;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  width: 100%;
}

.kpi-grid-hint {
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ev-gray);
}

.kpi-card {
  display: block;
  padding: 0.95rem 1rem;
  border-radius: 8px;
  background: var(--ev-light);
  border: 1px solid var(--ev-border-subtle);
  text-decoration: none;
  color: inherit;
  min-height: 4.5rem;
}

.dashboard-section--kpi-focus {
  outline: 2px solid rgba(139, 41, 66, 0.35);
  outline-offset: 4px;
}

.kpi-card--clickable {
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.kpi-card--clickable:hover {
  background: var(--ev-white);
  border-color: var(--ev-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.kpi-card--clickable:focus-visible {
  outline: 2px solid var(--ev-red);
  outline-offset: 2px;
}

.kpi-card--active {
  border-color: var(--ev-red);
  background: var(--ev-white);
  box-shadow: 0 0 0 2px rgba(178, 34, 34, 0.15);
}

.dashboard-queue-banner {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  background: #f8f6f3;
  border: 1px solid var(--ev-border-subtle);
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ev-charcoal);
}

.dashboard-recent-empty {
  color: var(--ev-gray);
  font-style: italic;
}

.kpi-card.kpi-alert {
  border-color: #fecaca;
  background: #fef2f2;
}

.kpi-card.kpi-warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.kpi-headline {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ev-charcoal);
}

.kpi-detail {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ev-gray);
  text-transform: none;
  letter-spacing: 0;
}

.dashboard-unassigned-alert {
  margin: -0.5rem 0 1.25rem;
  padding: 0.85rem 1rem;
  background: #fff9f0;
  border: 1px solid #e8dcc8;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ev-charcoal);
}

.badge-unassigned {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #92400e;
  background: #fef3c7;
  border-radius: 4px;
  vertical-align: middle;
}

.assign-table tr.row-needs-agent {
  background: #fffbeb;
}

.dashboard-agent-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
}

.dashboard-agent-filter-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  min-width: 0;
}

.dashboard-agent-filter-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ev-gray);
}

.dashboard-agent-filter select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--ev-border);
  border-radius: 6px;
  font-size: 1rem;
  min-width: 0;
}

.dashboard-agent-filter-hint,
.dashboard-agent-filter #clearDashboardFiltersBtn {
  grid-column: 1 / -1;
}

.dashboard-agent-filter-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ev-gray);
  line-height: 1.4;
}

@media (max-width: 720px) {
  .dashboard-agent-filter {
    grid-template-columns: 1fr;
  }
}

.agent-score-table tbody tr.agent-score-row {
  cursor: pointer;
}

.agent-score-table tbody tr.agent-score-row:hover {
  background: rgba(0, 0, 0, 0.03);
}

.agent-score-table tbody tr.agent-score-row.is-filtered {
  background: rgba(178, 34, 34, 0.06);
  outline: 2px solid rgba(178, 34, 34, 0.25);
  outline-offset: -2px;
}

.dashboard-section {
  margin-bottom: 2rem;
  scroll-margin-top: 5.5rem;
}

.dashboard-section h2 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
}

.dashboard-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.dashboard-toolbar select,
.dashboard-toolbar input[type="search"] {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--ev-border);
  border-radius: 6px;
  font-size: 0.95rem;
}

.agent-score-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.agent-score-table th,
.agent-score-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--ev-border-subtle);
}

.agent-score-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ev-gray);
  font-weight: 600;
}

.compliance-bar {
  height: 6px;
  background: var(--ev-border-subtle);
  border-radius: 3px;
  overflow: hidden;
  min-width: 80px;
}

.compliance-bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--ev-red);
}

.compliance-bar.compliance-good span {
  background: #16a34a;
}

.compliance-bar.compliance-mid span {
  background: #ca8a04;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-overdue {
  background: #fee2e2;
  color: #991b1b;
}

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

.badge-week {
  background: #e0e7ff;
  color: #3730a3;
}

.team-agent-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
  max-width: 36rem;
}

.team-agent-form .field {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
}

.team-agent-form input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--ev-border);
  border-radius: 6px;
  box-sizing: border-box;
}

.team-agent-list {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.team-agent-list li {
  padding: 0.35rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.assign-table select {
  max-width: none;
  width: 100%;
  min-width: 10rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
}

.manager-dashboard-main .assign-table td:last-child {
  min-width: 11rem;
}


.dashboard-loading {
  color: var(--ev-gray);
  font-style: italic;
  padding: 2rem;
  text-align: center;
}

@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .team-agent-form {
    grid-template-columns: 1fr;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .main.manager-dashboard-main {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.manager-dashboard-main > .page-toolbar .dashboard-toolbar-btn {
  flex: 0 0 10.5rem;
  width: 10.5rem;
  min-width: 10.5rem;
  text-align: center;
  justify-content: center;
  box-sizing: border-box;
}

.dashboard-auto-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--ev-gray);
  margin-left: auto;
}

.trends-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 0.5rem;
}

.trend-metric {
  flex: 1 1 140px;
  min-width: 120px;
}

.trend-metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ev-gray);
}

.trend-metric-value {
  font-size: 1.25rem;
  font-weight: 600;
}

.trend-metric-delta {
  font-size: 0.8rem;
  color: var(--ev-gray);
}

.trend-metric-delta.delta-up {
  color: #b91c1c;
}

.trend-metric-delta.delta-down {
  color: #16a34a;
}

.trend-spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 36px;
  margin-top: 0.35rem;
}

.trend-spark span {
  flex: 1;
  min-width: 4px;
  max-width: 12px;
  background: var(--ev-border);
  border-radius: 2px 2px 0 0;
}

.trend-spark span.is-high {
  background: var(--ev-red);
}

.manager-dashboard-main .buyer-heat-table {
  min-width: 960px;
}

.heat-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.heat-badge.heat-hot {
  background: #fecaca;
  color: #991b1b;
}

.heat-badge.heat-warm {
  background: #ffedd5;
  color: #9a3412;
}

.heat-badge.heat-cool {
  background: #e0e7ff;
  color: #3730a3;
}

.heat-badge.heat-cooling {
  background: #f3f4f6;
  color: #4b5563;
}

.heat-badge.heat-cold {
  background: #f9fafb;
  color: #6b7280;
  border: 1px solid var(--ev-border-subtle);
}

.heat-badge.heat-none {
  background: #f3f4f6;
  color: #9ca3af;
}

.days-late {
  font-size: 0.78rem;
  color: #b91c1c;
  font-weight: 600;
}

.bulk-assign-toolbar {
  margin-bottom: 0.75rem;
}

.bulk-select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.th-bulk {
  width: 2rem;
}

.dashboard-modal {
  border: none;
  border-radius: 10px;
  padding: 0;
  max-width: 28rem;
  width: calc(100% - 2rem);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.dashboard-modal::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.dashboard-modal-form {
  padding: 1.25rem 1.5rem;
}

.dashboard-modal-title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.dashboard-modal-meta {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--ev-gray);
  line-height: 1.4;
}

.dashboard-modal-form .field {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.dashboard-modal-form select,
.dashboard-modal-form input,
.dashboard-modal-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--ev-border);
  border-radius: 6px;
  box-sizing: border-box;
  font: inherit;
}

.dashboard-snooze-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.dashboard-snooze-row .field-label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-right: 0.25rem;
}

.dashboard-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.seller-digest-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0;
}

.seller-digest-status-item {
  border: 1px solid var(--ev-border-subtle);
  background: var(--ev-light);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
}

.seller-digest-status-item span {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ev-gray);
}

.seller-digest-status-item strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1rem;
  color: var(--ev-charcoal);
}

.dashboard-run-btn.is-loading {
  opacity: 0.85;
  pointer-events: none;
}

.dashboard-run-btn.is-loading::after {
  content: '';
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  margin-left: 0.4rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.1rem;
  animation: seller-digest-spin 0.8s linear infinite;
}

.seller-digest-preview {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--ev-border-subtle);
}

.seller-digest-preview h3 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

@keyframes seller-digest-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .seller-digest-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Listing health & advisor leaderboard */
.timeframe-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.timeframe-tab {
  border: 1px solid #d0d0d0;
  background: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.82rem;
  cursor: pointer;
}
.timeframe-tab.is-active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}
.listing-health-summary,
.leaderboard-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.health-pill,
.leaderboard-callout {
  font-size: 0.88rem;
  padding: 0.4rem 0.65rem;
  border-radius: 3px;
}
.listing-prop,
.advisor-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ev-dark, #1a1a1a);
}
.listing-cust,
.advisor-email,
.listing-sub {
  font-size: 0.78rem;
  color: var(--ev-gray);
  margin-top: 0.15rem;
}
.listing-sub-warn,
.showings-warn {
  color: #c62828;
}
.dom-num.dom-ok { color: #2e7d32; font-weight: 600; }
.dom-num.dom-mid { color: #666; font-weight: 600; }
.dom-num.dom-alert { color: #c62828; font-weight: 600; }
.interest-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  border: 1px solid transparent;
}
.health-status-text { font-size: 0.88rem; color: #666; }
.rank-num { font-size: 0.8125rem; color: #666; }
.rank-num.rank-top { font-weight: 700; color: #1a1a1a; }
.ai-count { font-weight: 600; margin-right: 0.35rem; }
.ai-bar {
  display: inline-block;
  width: 3rem;
  height: 0.35rem;
  background: #eee;
  border-radius: 2px;
  vertical-align: middle;
}
.ai-bar-fill {
  display: block;
  height: 100%;
  background: #1a1a1a;
  border-radius: 2px;
}
.last-active-green { color: #2e7d32; }
.last-active-amber,
.last-active-mid { color: #666; }
.last-active-red { color: #c62828; }
.engagement-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.leaderboard-inactive { margin-top: 1rem; }
.listing-health-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
/* Default closed — .modal-overlay { display:flex } in styles.css overrides [hidden] alone */
#listingHealthModal.listing-health-modal-overlay {
  display: none !important;
  pointer-events: none;
  visibility: hidden;
}

#listingHealthModal.listing-health-modal-overlay.is-open {
  display: flex !important;
  pointer-events: auto;
  visibility: visible;
}

#listingHealthModal.listing-health-modal-overlay[hidden]:not(.is-open) {
  display: none !important;
}

.listing-health-modal { max-width: min(640px, 96vw); }
.listing-health-ai-panel pre {
  white-space: pre-wrap;
  font-family: Georgia, serif;
  font-size: 0.9rem;
  line-height: 1.55;
  max-height: 280px;
  overflow: auto;
}
.listing-feedback-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
}

#listingHealthBody td:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

/* Sale probability modal */
#saleProbabilityModal.sale-probability-modal-overlay {
  z-index: 1200;
}
#saleProbabilityModal.sale-probability-modal-overlay.is-open {
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}
#saleProbabilityModal.sale-probability-modal-overlay[hidden]:not(.is-open) {
  display: none !important;
}
.sale-probability-modal {
  max-width: min(920px, 96vw);
  width: 100%;
  padding: 0;
  overflow: hidden;
}
.sale-prob-close {
  color: #fff;
  z-index: 2;
}
.sale-prob-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #1a1a1a;
  color: #fff;
}
.sale-prob-header-address {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
}
.sale-prob-header-score {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}
.sale-prob-score--high { color: #3B6D11; }
.sale-prob-score--mid { color: #B8860B; }
.sale-prob-score--low { color: #E24B4A; }
.sale-prob-header .sale-prob-score--high,
.sale-prob-header .sale-prob-score--mid,
.sale-prob-header .sale-prob-score--low {
  color: #fff;
}
.sale-prob-header .sale-prob-score--high { color: #9fd49f; }
.sale-prob-header .sale-prob-score--mid { color: #f0d080; }
.sale-prob-header .sale-prob-score--low { color: #f5a8a7; }
#saleProbabilityBody {
  padding: 1.25rem;
}
.sale-prob-loading {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ev-gray);
}
.sale-prob-spinner {
  width: 2rem;
  height: 2rem;
  margin: 0 auto 1rem;
  border: 3px solid #eee;
  border-top-color: var(--ev-red, #8B1A2F);
  border-radius: 50%;
  animation: saleProbSpin 0.8s linear infinite;
}
@keyframes saleProbSpin {
  to { transform: rotate(360deg); }
}
.sale-prob-hero {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ev-border-subtle);
}
.sale-prob-hero-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ev-gray);
  margin-bottom: 0.35rem;
}
.sale-prob-hero-score {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}
.sale-prob-bar {
  font-size: 1rem;
  letter-spacing: 0.08em;
  margin-left: 0.5rem;
  font-weight: 400;
  color: var(--ev-charcoal);
}
.sale-prob-hero-conf,
.sale-prob-timeline {
  font-size: 0.92rem;
  color: var(--ev-gray);
  margin-top: 0.35rem;
}
.sale-prob-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.sale-prob-col h4 {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
}
.sale-prob-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.86rem;
  line-height: 1.45;
}
.sale-prob-list li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.45rem;
}
.sale-prob-list li::before {
  content: '●';
  position: absolute;
  left: 0;
  font-size: 0.65rem;
  top: 0.2rem;
}
.sale-prob-bullet-good::before { color: #3B6D11; }
.sale-prob-bullet-bad::before { color: #E24B4A; }
.sale-prob-actions {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.86rem;
  line-height: 1.45;
}
.sale-prob-actions li { margin-bottom: 0.45rem; }
.sale-prob-action-num {
  display: inline-block;
  min-width: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
}
.sale-prob-narrative,
.sale-prob-hidden {
  margin-bottom: 1rem;
}
.sale-prob-narrative h4,
.sale-prob-hidden h4 {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
}
.sale-prob-narrative-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0;
  color: var(--ev-charcoal);
}
.sale-prob-hidden p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ev-gray);
}
.sale-prob-price-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.sale-prob-price--well-priced { background: #EAF5EA; color: #2E7D32; }
.sale-prob-price--slightly-high { background: #FFF8E1; color: #E65100; }
.sale-prob-price--overpriced { background: #FFEBEE; color: #C62828; }
.sale-prob-price--insufficient-data { background: #f5f5f5; color: #666; }
.sale-prob-footer {
  font-size: 0.78rem;
  color: var(--ev-gray);
  border-top: 1px solid var(--ev-border-subtle);
  padding-top: 0.75rem;
}
@media (max-width: 768px) {
  .sale-prob-columns {
    grid-template-columns: 1fr;
  }

  .main.manager-dashboard-main {
    padding: 1rem;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  }

  .manager-dashboard-intro {
    display: none;
  }

  /* Hero greeting card */
  .manager-dashboard-main > .page-title {
    font-size: 22px;
    text-align: left;
    margin: 16px 0 4px;
  }

  .manager-dashboard-main > .page-subtitle {
    text-align: left;
    margin-bottom: 16px;
  }

  .manager-dashboard-main::before {
    content: '';
    display: block;
    height: 0;
  }

  .dashboard-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    margin-bottom: 1rem;
  }

  .dashboard-toolbar input[type='search'] {
    min-height: 52px;
    font-size: 16px;
    width: 100%;
    border-radius: 8px;
    border: 1.5px solid #E8E4DF;
  }

  /* Metric cards — 2-column grid */
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.25rem;
  }

  .kpi-card {
    background: #FFFFFF;
    border: 1px solid #E8E4DF;
    border-radius: 12px;
    padding: 1rem;
    min-height: 88px;
    box-shadow: 0 2px 12px rgba(26, 22, 20, 0.08);
    transition: transform 80ms ease;
  }

  .kpi-card:active {
    transform: scale(0.97);
  }

  .kpi-card .kpi-value,
  .kpi-card strong {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    color: #1A1614;
  }

  .kpi-card .kpi-label,
  .kpi-card span:not(.kpi-value) {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9B9390;
    margin-top: 4px;
  }

  .kpi-grid-hint {
    font-size: 13px;
    margin-bottom: 1rem;
  }

  /* Dashboard sections as cards */
  .manager-dashboard-main .dashboard-section.card {
    border-radius: 12px;
    border: 1px solid #E8E4DF;
    box-shadow: 0 2px 12px rgba(26, 22, 20, 0.08);
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .manager-dashboard-main .dashboard-section > h2 {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6B6460;
    margin: 0 0 8px;
  }

  .manager-dashboard-main .customer-table-wrap {
    margin: 0 -1rem;
    border-top: 1px solid #E8E4DF;
  }

  .manager-dashboard-main .top-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .manager-dashboard-main .top-nav::-webkit-scrollbar {
    display: none;
  }

  .manager-dashboard-main .top-nav a,
  .manager-dashboard-main .top-nav button {
    flex: 0 0 auto;
    min-height: 44px;
    white-space: nowrap;
  }
}

@media print {
  .top-nav,
  .dashboard-toolbar,
  .bulk-assign-toolbar {
    display: none !important;
  }
}
