:root {
  --page-background: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --sidebar: #111827;
  --sidebar-deep: #0f172a;
  --sidebar-text: #d1d5db;
  --sidebar-muted: #7f8a99;
  --text: #172033;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #ccff00;
  --accent-strong: #a8d200;
  --success: #1f9d62;
  --success-soft: #e2f7ec;
  --warning: #b7791f;
  --warning-soft: #fff4d8;
  --danger: #c24141;
  --danger-soft: #ffe7e7;
  --info: #2563eb;
  --info-soft: #e8f0ff;
  --shadow:
    0 20px 60px rgba(15, 23, 42, 0.08);
  --shadow-soft:
    0 10px 30px rgba(15, 23, 42, 0.05);
  --radius-large: 24px;
  --radius-medium: 18px;
  --radius-small: 12px;
  --sidebar-width: 270px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--page-background);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.dashboard-shell {
  display: flex;
  min-height: 100vh;
}

.dashboard-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  min-height: 100vh;
  color: var(--sidebar-text);
  background:
    linear-gradient(
      180deg,
      var(--sidebar) 0%,
      var(--sidebar-deep) 100%
    );
  box-shadow: 10px 0 40px rgba(15, 23, 42, 0.1);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.dashboard-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dashboard-brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #111827;
  background: var(--accent);
  font-size: 0.9rem;
  font-weight: 950;
  letter-spacing: -0.05em;
  box-shadow: 0 10px 24px rgba(204, 255, 0, 0.18);
}

.dashboard-brand-copy {
  display: grid;
  min-width: 0;
}

.dashboard-brand-copy strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-brand-copy small {
  margin-top: 2px;
  color: var(--sidebar-muted);
  font-size: 0.76rem;
}

.sidebar-close-button {
  display: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.25rem;
}

.dashboard-navigation {
  flex: 1;
  overflow-y: auto;
  padding: 18px 12px;
}

.navigation-label {
  margin: 0 10px 9px;
  color: var(--sidebar-muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.navigation-label-spaced {
  margin-top: 26px;
}

.navigation-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  margin: 3px 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  color: var(--sidebar-text);
  background: transparent;
  text-align: left;
  transition:
    color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.navigation-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(1px);
}

.navigation-item.active {
  color: #111827;
  background: var(--accent);
  box-shadow: 0 12px 28px rgba(204, 255, 0, 0.14);
}

.navigation-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  margin-right: 11px;
  font-size: 1.15rem;
}

.navigation-item > span:nth-child(2) {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 760;
}

.navigation-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #111827;
  background: rgba(255, 255, 255, 0.88);
  font-size: 0.68rem;
  font-weight: 900;
}

.navigation-count.warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.navigation-count.muted {
  color: var(--muted);
  background: #eef1f4;
}

.navigation-item.active .navigation-count {
  color: #ffffff;
  background: #111827;
}

.sidebar-footer {
  display: grid;
  gap: 7px;
  padding: 14px 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 13px;
  border: 0;
  border-radius: 11px;
  color: #111827;
  background: var(--accent);
  font-size: 0.85rem;
  font-weight: 850;
}

.sidebar-footer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  color: var(--sidebar-text);
  background: transparent;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 720;
  transition:
    color 150ms ease,
    background 150ms ease;
}

.sidebar-footer-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-footer-link-muted {
  color: var(--sidebar-muted);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.dashboard-main {
  width: calc(100% - var(--sidebar-width));
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 15px 28px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  background: rgba(244, 246, 248, 0.9);
  backdrop-filter: blur(16px);
}

.dashboard-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dashboard-header-eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.mobile-menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  border-radius: 999px;
  background: var(--text);
}

.dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-add-buyer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  color: #111827;
  background: var(--accent);
  font-size: 0.82rem;
  font-weight: 850;
  box-shadow: var(--shadow-soft);
}

.salesperson-profile-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.salesperson-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: #111827;
  background: var(--accent);
  font-weight: 900;
}

.salesperson-profile-copy {
  display: grid;
  text-align: left;
}

.salesperson-profile-copy strong {
  font-size: 0.84rem;
}

.salesperson-profile-copy small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.7rem;
}

.profile-chevron {
  margin-left: 2px;
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-content {
  padding: 26px 28px 48px;
}

.dashboard-section {
  display: none;
}

.dashboard-section.active {
  display: block;
}

.follow-up-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 220px;
  padding: 34px;
  border-radius: var(--radius-large);
  color: #ffffff;
  background:
    linear-gradient(
      135deg,
      #111827 0%,
      #18243a 62%,
      #1f2937 100%
    );
  box-shadow: var(--shadow);
}

.follow-up-hero::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -155px;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.94;
}

.follow-up-hero-copy,
.hero-summary {
  position: relative;
  z-index: 1;
}

.follow-up-hero-copy {
  max-width: 690px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(204, 255, 0, 0.1);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.follow-up-hero h2 {
  margin: 18px 0 10px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.follow-up-hero p {
  max-width: 620px;
  margin: 0;
  color: #c7ced8;
  line-height: 1.65;
}

.hero-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 10px;
  min-width: 340px;
}

.hero-summary-item {
  display: grid;
  place-items: center;
  min-height: 108px;
  padding: 16px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.hero-summary-item strong {
  font-size: 2rem;
  line-height: 1;
}

.hero-summary-item span {
  margin-top: 8px;
  color: #c7ced8;
  font-size: 0.72rem;
  font-weight: 750;
  text-align: center;
}

.dashboard-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.dashboard-metric-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.dashboard-metric-card .metric-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: var(--info);
  background: var(--info-soft);
  font-size: 1.2rem;
}

.dashboard-metric-card.warning .metric-icon {
  color: var(--warning);
  background: var(--warning-soft);
}

.dashboard-metric-card.danger .metric-icon {
  color: var(--danger);
  background: var(--danger-soft);
}

.dashboard-metric-card > div {
  display: grid;
}

.dashboard-metric-card strong {
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.dashboard-metric-card span:last-child {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 730;
}

.follow-up-groups {
  display: grid;
  gap: 20px;
  margin-top: 22px;
}

.follow-up-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.follow-up-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 20px;
  border-bottom: 1px solid var(--border);
}

.follow-up-group-header > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.follow-up-group-header h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.025em;
}

.follow-up-group-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.group-status-dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.group-status-dot.danger {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(194, 65, 65, 0.1);
}

.group-status-dot.warning {
  background: var(--warning);
  box-shadow: 0 0 0 5px rgba(183, 121, 31, 0.1);
}

.group-status-dot.normal {
  background: var(--info);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.1);
}

.group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 31px;
  min-height: 31px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 0.76rem;
  font-weight: 900;
}

.follow-up-list {
  display: grid;
  gap: 0;
}

.buyer-follow-up-card {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.buyer-follow-up-card:last-child {
  border-bottom: 0;
}

.buyer-card-top,
.buyer-directory-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.buyer-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.buyer-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #111827;
  background: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.buyer-identity h3,
.buyer-identity h4 {
  margin: 0;
  font-size: 0.94rem;
  letter-spacing: -0.025em;
}

.buyer-identity p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.urgency-badge,
.buyer-status,
.promise-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--info);
  background: var(--info-soft);
  font-size: 0.68rem;
  font-weight: 820;
  white-space: nowrap;
}

.urgency-badge.warning,
.buyer-status.waiting,
.promise-date.warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.urgency-badge.danger,
.promise-date.danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.buyer-status.active {
  color: var(--success);
  background: var(--success-soft);
}

.buyer-card-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.buyer-detail {
  display: grid;
  min-width: 0;
  padding: 13px;
  border-radius: 13px;
  background: var(--surface-soft);
}

.buyer-detail span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.buyer-detail strong {
  margin-top: 7px;
  font-size: 0.78rem;
  line-height: 1.45;
}

.buyer-card-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
}

.primary-card-action,
.secondary-card-action,
.more-card-action,
.open-buyer-button,
.promise-action-button,
.primary-section-action,
.modal-primary-button,
.modal-secondary-button,
.detail-primary-action,
.detail-secondary-action,
.detail-danger-action,
.copy-message-button,
.profile-save-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 11px;
  font-size: 0.76rem;
  font-weight: 820;
  transition:
    transform 150ms ease,
    opacity 150ms ease,
    background 150ms ease;
}

.primary-card-action,
.primary-section-action,
.modal-primary-button,
.detail-primary-action,
.profile-save-button {
  border: 0;
  color: #111827;
  background: var(--accent);
}

.secondary-card-action,
.modal-secondary-button,
.detail-secondary-action,
.open-buyer-button,
.promise-action-button,
.copy-message-button {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.detail-danger-action {
  border: 1px solid #f1bdbd;
  color: var(--danger);
  background: var(--danger-soft);
}

.more-card-action {
  width: 40px;
  padding: 0;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  font-size: 0.85rem;
}

.primary-card-action:hover,
.secondary-card-action:hover,
.more-card-action:hover,
.open-buyer-button:hover,
.promise-action-button:hover,
.primary-section-action:hover,
.modal-primary-button:hover,
.modal-secondary-button:hover,
.detail-primary-action:hover,
.detail-secondary-action:hover,
.detail-danger-action:hover,
.copy-message-button:hover,
.sidebar-primary-action:hover,
.header-add-buyer-button:hover,
.salesperson-profile-button:hover {
  transform: translateY(-1px);
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-kicker,
.card-kicker,
.modal-kicker {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-heading-row h2 {
  margin: 6px 0 7px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.section-heading-row p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.buyer-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.buyer-search-field {
  display: flex;
  align-items: center;
  flex: 1;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--muted);
  background: var(--surface);
}

.buyer-search-field svg {
  flex: 0 0 auto;
  margin-right: 9px;
  font-size: 1rem;
}

.buyer-search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.buyer-status-filter {
  min-height: 46px;
  padding: 0 38px 0 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text);
  background: var(--surface);
  outline: 0;
}

.buyer-directory,
.waiting-grid,
.profile-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.buyer-directory-card,
.waiting-card,
.workspace-card,
.summary-card,
.outcome-summary-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.buyer-directory-card,
.waiting-card {
  padding: 19px;
}

.buyer-directory-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.buyer-directory-details span,
.waiting-reason,
.waiting-return {
  display: grid;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.buyer-directory-details small,
.waiting-reason span,
.waiting-return span {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.buyer-directory-details strong,
.waiting-reason strong,
.waiting-return strong {
  margin-top: 6px;
  font-size: 0.76rem;
  line-height: 1.4;
}

.open-buyer-button {
  width: 100%;
}

.promise-summary-grid,
.outcome-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.outcome-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-card,
.outcome-summary-card {
  padding: 20px;
}

.summary-card strong,
.outcome-summary-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.045em;
}

.summary-card span,
.outcome-summary-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 740;
}

.summary-card.warning {
  border-color: #f0d99e;
  background: var(--warning-soft);
}

.summary-card.danger {
  border-color: #efc0c0;
  background: var(--danger-soft);
}

.outcome-summary-card.success {
  border-color: #bce7d0;
  background: var(--success-soft);
}

.workspace-card {
  padding: 22px;
}

.workspace-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.workspace-card-header h3 {
  margin: 4px 0 0;
  font-size: 1.1rem;
  letter-spacing: -0.035em;
}

.promise-list,
.outcome-list,
.history-list,
.preference-list {
  display: grid;
  gap: 0;
}

.promise-row,
.outcome-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.promise-row:first-child,
.outcome-row:first-child {
  padding-top: 0;
}

.promise-row:last-child,
.outcome-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.promise-row > div,
.outcome-row > div {
  min-width: 0;
}

.promise-row strong,
.outcome-row strong {
  font-size: 0.82rem;
}

.promise-row p,
.outcome-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.promise-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.promise-status.danger {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(194, 65, 65, 0.1);
}

.promise-status.warning {
  background: var(--warning);
  box-shadow: 0 0 0 5px rgba(183, 121, 31, 0.1);
}

.waiting-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.waiting-card {
  display: grid;
  gap: 14px;
}

.outcome-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: var(--info);
  background: var(--info-soft);
  font-weight: 900;
}

.outcome-icon.success {
  color: var(--success);
  background: var(--success-soft);
}

.outcome-time {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 740;
}

.history-row {
  display: grid;
  grid-template-columns: 90px auto minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.history-row:first-child {
  padding-top: 0;
}

.history-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.history-date {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.history-marker {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 0 5px rgba(168, 210, 0, 0.12);
}

.history-row strong {
  font-size: 0.82rem;
}

.history-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.profile-card {
  align-self: start;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-large-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  color: #111827;
  background: var(--accent);
  font-size: 1.05rem;
  font-weight: 950;
}

.profile-identity h3 {
  margin: 0;
  font-size: 1.2rem;
}

.profile-identity p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-identity span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.profile-details {
  display: grid;
  gap: 0;
  margin-top: 20px;
}

.profile-details > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.profile-details > div:last-child {
  border-bottom: 0;
}

.profile-details span {
  color: var(--muted);
  font-size: 0.74rem;
}

.profile-details strong {
  font-size: 0.76rem;
  text-align: right;
}

.preference-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
}

.preference-item + .preference-item {
  margin-top: 10px;
}

.preference-item input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent-strong);
}

.preference-item span {
  display: grid;
}

.preference-item strong {
  font-size: 0.8rem;
}

.preference-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.profile-save-button {
  width: 100%;
  margin-top: 16px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(5px);
}

.modal-backdrop.open {
  display: block;
}

.dashboard-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 100;
  display: none;
  width: min(680px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.dashboard-modal.open {
  display: block;
}

.buyer-detail-modal {
  width: min(760px, calc(100vw - 28px));
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.modal-header h2 {
  margin: 5px 0 0;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.modal-close-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 1.2rem;
}

#addBuyerForm,
#reminderForm,
.buyer-detail-content,
.outcome-option-grid {
  padding: 22px;
}

.modal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.modal-field {
  display: grid;
  gap: 7px;
}

.modal-field-wide {
  grid-column: 1 / -1;
}

.modal-field span {
  font-size: 0.76rem;
  font-weight: 800;
}

.modal-field input,
.modal-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 13px;
  color: var(--text);
  background: var(--surface-soft);
  outline: 0;
}

.modal-field textarea {
  min-height: 92px;
  resize: vertical;
}

.modal-field input:focus,
.modal-field textarea:focus {
  border-color: var(--accent-strong);
  background: #ffffff;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.detail-buyer-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.detail-buyer-identity h3 {
  margin: 0;
  font-size: 1.2rem;
}

.detail-buyer-identity p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.detail-panel {
  display: grid;
  margin-top: 12px;
  padding: 14px;
  border-radius: 13px;
  background: var(--surface-soft);
}

.detail-panel span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 830;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-panel strong {
  margin-top: 7px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.suggested-message-panel {
  margin-top: 14px;
  padding: 15px;
  border: 1px solid #d6e3ff;
  border-radius: 14px;
  background: var(--info-soft);
}

.suggested-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.suggested-message-header > span {
  color: var(--info);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.suggested-message-panel p {
  margin: 12px 0 0;
  color: #244068;
  font-size: 0.82rem;
  line-height: 1.6;
}

.detail-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.outcome-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.outcome-option {
  display: grid;
  min-height: 110px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: var(--surface-soft);
  text-align: left;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.outcome-option:hover {
  transform: translateY(-1px);
  border-color: var(--accent-strong);
  background: #ffffff;
}

.outcome-option strong {
  font-size: 0.83rem;
}

.outcome-option span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.reminder-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.reminder-choice-grid button {
  min-height: 42px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.reminder-choice-grid button.active {
  border-color: var(--accent-strong);
  color: #111827;
  background: var(--accent);
}

#reminderForm .modal-field + .modal-field {
  margin-top: 14px;
}

.dashboard-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: none;
  max-width: 340px;
  padding: 14px 16px;
  border-radius: 13px;
  color: #ffffff;
  background: var(--sidebar);
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  line-height: 1.45;
}

.dashboard-toast.show {
  display: block;
}

@media (max-width: 1180px) {
  .hero-summary {
    min-width: 300px;
  }

  .buyer-card-details {
    grid-template-columns: 1fr;
  }

  .waiting-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .outcome-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  .dashboard-sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .dashboard-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .sidebar-close-button,
  .mobile-menu-button {
    display: block;
  }

  .dashboard-main {
    width: 100%;
    margin-left: 0;
  }

  .dashboard-header {
    padding-inline: 18px;
  }

  .dashboard-content {
    padding-inline: 18px;
  }

  .follow-up-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-summary {
    width: 100%;
    min-width: 0;
  }

  .buyer-directory,
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dashboard-header {
    min-height: 72px;
  }

  .dashboard-header-eyebrow,
  .salesperson-profile-copy,
  .profile-chevron {
    display: none;
  }

  .dashboard-content {
    padding: 18px 13px 40px;
  }

  .follow-up-hero {
    min-height: 0;
    padding: 26px 22px;
  }

  .follow-up-hero::after {
    right: -145px;
    bottom: -185px;
  }

  .hero-summary {
    grid-template-columns: 1fr;
  }

  .hero-summary-item {
    min-height: 72px;
  }

  .dashboard-metric-grid,
  .promise-summary-grid,
  .outcome-summary-grid,
  .waiting-grid {
    grid-template-columns: 1fr;
  }

  .section-heading-row,
  .buyer-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .buyer-status-filter {
    width: 100%;
  }

  .buyer-card-top,
  .buyer-directory-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .buyer-card-actions {
    flex-wrap: wrap;
  }

  .primary-card-action,
  .secondary-card-action {
    flex: 1;
  }

  .promise-row,
  .outcome-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .promise-date,
  .outcome-time {
    grid-column: 2;
  }

  .promise-action-button {
    grid-column: 2;
    width: fit-content;
  }

  .history-row {
    grid-template-columns: 72px auto minmax(0, 1fr);
  }

  .modal-form-grid,
  .outcome-option-grid,
  .detail-action-grid {
    grid-template-columns: 1fr;
  }

  .modal-field-wide {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .dashboard-header {
    padding-inline: 12px;
  }

  .header-add-buyer-button span:last-child {
    display: none;
  }

  .follow-up-hero h2 {
    font-size: 2.25rem;
  }

  .buyer-follow-up-card,
  .workspace-card,
  .buyer-directory-card,
  .waiting-card {
    padding: 17px;
  }

  .buyer-directory-details {
    grid-template-columns: 1fr;
  }

  .history-row {
    grid-template-columns: 1fr;
  }

  .history-marker {
    display: none;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-primary-button,
  .modal-secondary-button {
    width: 100%;
  }

  .reminder-choice-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    width: min(88vw, var(--sidebar-width));
  }
}