.sales-home,.sales-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:stretch; }
.sales-home { margin:14px 0; }
.sales-view { display:grid; gap:15px; }
.sales-view > .sales-home { margin:0; }
.sales-summary { padding:21px; }
.sales-kicker { color:#41745c; font-size:.72rem; font-weight:800; letter-spacing:.085em; margin-bottom:5px; }
.sales-balance { display:block; margin:8px 0 13px; font:650 clamp(2.15rem,5vw,3.25rem)/1 var(--font-heading); color:#12352a; letter-spacing:-.04em; }
.sales-quick,.sales-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(123px,1fr)); gap:8px; }
.sales-quick { grid-template-columns:repeat(3,minmax(0,1fr)); }
.sales-metric { min-width:0; padding:9px 10px; border-radius:10px; background:#f0f6f2; }
.sales-metric > span { display:block; color:var(--muted); font-size:.76rem; line-height:1.2; }
.sales-metric > strong { display:block; margin-top:4px; font:650 clamp(.92rem,2vw,1.18rem)/1.1 var(--font-heading); overflow-wrap:anywhere; color:#193b2d; }
.sales-milestone { display:flex; flex-direction:column; align-items:stretch; justify-content:center; border:1px solid #c5e1d0; border-radius:17px; padding:20px; background:#e4f3e9; color:#163f2c; }
.sales-milestone-top { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.sales-milestone-top span { display:inline-flex; align-items:center; gap:5px; font-size:.74rem; font-weight:800; letter-spacing:.055em; }
.sales-milestone-top > strong { color:#89541b; background:#fff4df; border-radius:999px; padding:5px 9px; font:650 1rem var(--font-heading); }
.sales-milestone h2 { font-size:clamp(1.6rem,3vw,2.35rem); margin-bottom:4px; }
.sales-milestone p { font-size:.92rem; margin-bottom:6px; }
.sales-milestone progress { height:10px; margin:8px 0; }
.sales-meter-label { display:flex; justify-content:space-between; gap:10px; color:#426852; font-size:.78rem; }
.sales-toolbar { display:flex; justify-content:space-between; align-items:flex-end; flex-wrap:wrap; gap:10px; margin-bottom:16px; }
.sales-toolbar nav { display:flex; align-items:stretch; gap:5px; flex-wrap:wrap; max-width:100%; }
.sales-toolbar nav button { padding:7px 10px; min-height:38px; color:#426053; font-size:.83rem; font-weight:700; border-radius:9px; background:#fff; border:1px solid #e1ebe5; }
.sales-toolbar nav button.selected { color:#fff; background:var(--brand-green); border-color:var(--brand-green); }
.sales-toolbar .field { margin:0; }
.sales-toolbar .field input { height:38px; min-height:38px; font-size:.86rem; }
.sales-card,.sales-form { min-width:0; }
.sales-card > h2,.sales-form > h2 { margin:0 0 10px; }
.sales-card > h3 { margin-top:12px; }
.sales-card .sales-grid { margin-bottom:8px; }
.sales-form .primary,.sales-review-form .primary { margin-top:10px; }
.sales-form .field { margin-top:8px; }
.sales-form { align-self:start; }
.sales-breakdown { margin:6px 0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 16px; }
.sales-breakdown div { display:flex; align-items:baseline; justify-content:space-between; gap:8px; border-bottom:1px solid #eaf0ec; padding:7px 0; }
.sales-breakdown dt { color:var(--muted); font-size:.85rem; }
.sales-breakdown dd { margin:0; font-weight:750; white-space:nowrap; }
.sales-journey { display:grid; gap:6px; list-style:none; padding:0; margin:0; }
.sales-journey li { display:grid; grid-template-columns:32px minmax(0,1fr) auto auto; align-items:center; gap:8px; padding:8px; border:1px solid #e6ede8; border-radius:10px; }
.sales-journey li > span:first-child { display:grid; place-items:center; border-radius:50%; width:30px; height:30px; color:#47755d; background:#edf5ef; }
.sales-journey small { display:block; color:var(--muted); font-size:.73rem; margin-top:3px; }
.sales-journey li.reward-earned { background:#eff9f2; }
.sales-badge { color:#59655e; background:#eef1ef; border-radius:999px; padding:3px 7px; font-size:.72rem; font-weight:750; white-space:nowrap; }
.sales-badge.unlocked,.sales-badge.paid,.sales-badge.confirmed { color:#18603c; background:#e3f2e8; }
.sales-badge.in-progress,.sales-badge.pending { color:#78521d; background:#fff3dd; }
.sales-badge.cancelled,.sales-badge.rejected,.sales-badge.refunded,.sales-badge.reversed,.sales-badge.adjustment { color:#87443a; background:#fbece9; }
.sales-view td,.sales-view th { font-size:.82rem; }
.sales-view th { white-space:nowrap; }
.sales-person { display:inline-flex; gap:7px; align-items:center; min-width:125px; }
.sales-person img { border-radius:50%; object-fit:cover; }
.sales-trend { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 16px; }
.sales-trend > div { display:grid; align-items:center; grid-template-columns:48px minmax(0,1fr) 26px; gap:5px; font-size:.76rem; }
.sales-trend progress { margin:4px 0; height:7px; }
.sales-badges,.sales-missions { display:grid; grid-template-columns:repeat(auto-fit,minmax(133px,1fr)); gap:8px; margin-top:10px; }
.sales-badges > div,.sales-missions > div { min-width:0; display:grid; gap:4px; padding:11px; border:1px solid #e2ece6; border-radius:12px; color:#1c4432; background:#f8fbf9; }
.sales-badges span,.sales-missions span { color:var(--muted); font-size:.78rem; }
.sales-badges .achievement-earned { background:#eaf6ed; color:#127045; }
.sales-review summary { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.sales-review-tools { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:7px; margin-top:7px; }
.sales-review-form { padding:7px; align-self:start; border:1px solid var(--line); border-radius:10px; }
.sales-review-form .primary { min-height:38px; font-size:.79rem; }
.sales-special-row { display:grid; align-items:end; grid-template-columns:repeat(2,minmax(0,1fr)) auto; gap:7px; }
.sales-check { display:flex; align-items:center; gap:6px; margin:8px 0; font-size:.87rem; }
.sales-check input { accent-color:var(--brand-green); width:16px; height:16px; }
@media(max-width:700px) {
  .sales-home,.sales-pair { grid-template-columns:minmax(0,1fr); gap:9px; }
  .sales-summary,.sales-milestone { padding:15px; }
  .sales-breakdown { grid-template-columns:minmax(0,1fr); }
}

.sales-home-reward { min-width:0; display:grid; grid-template-rows:1fr auto; gap:7px; }

/* Earnings hierarchy and events driven by verified ledger data. */
.sales-home,.sales-pair { gap: var(--space-section); }
.sales-home { margin: 0 0 var(--space-section); }
.sales-home-overview { grid-template-columns: minmax(0,1.23fr) minmax(0,1fr); margin: 0; }
.sales-view { gap: var(--space-section); }
.sales-summary { padding: clamp(17px,2.3vw,27px); }
.sales-summary-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sales-home-overview .sales-summary { background: linear-gradient(#f6faf7,#fff 145px); }
.sales-home-overview .sales-summary-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.sales-home-overview .sales-summary-heading h2 { font-size: 1.02rem; }
.sales-home-overview .sales-kicker { margin: 3px 0 0; font-size: .75rem; font-weight: 650; letter-spacing: normal; }
.sales-home-overview .sales-balance { margin: 0; font-size: clamp(1.9rem,4vw,3.3rem); overflow-wrap: anywhere; }
.sales-home-overview .sales-summary-actions { align-items: center; justify-content: space-between; gap: 5px 12px; }
.sales-earnings-link { white-space: nowrap; }
.sales-home-overview .sales-milestone { min-height: 142px; }
.sales-home-overview .sales-milestone-top span { letter-spacing: normal; }
.sales-home-overview .sales-milestone h2 { font-size: clamp(1.45rem,3vw,2.05rem); }
.sales-kicker { letter-spacing: .075em; color: #4e6d5c; }
.sales-balance { font-family: var(--font-display); font-size: clamp(2.45rem,5vw,3.7rem); font-variant-numeric: tabular-nums; }
.sales-cycle-schedule { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); margin: 10px 0 12px; border: 1px solid var(--line); border-radius: 13px; background: #f5f8f5; }
.sales-cycle-schedule > div { min-width: 0; padding: 8px 10px; }
.sales-cycle-schedule > div + div { border-inline-start: 1px solid var(--line); }
.sales-cycle-schedule dt { color: var(--muted); font-size: .76rem; }
.sales-cycle-schedule dd { margin: 2px 0 0; font-size: .87rem; font-weight: 700; }
.sales-cycle-schedule .sales-cycle-note { color: var(--muted); font-size: .72rem; font-weight: 500; }
.sales-cycle-schedule time { white-space: nowrap; }
.sales-quick { gap: 7px; }
.sales-metric { background: #f0f4f1; padding: 10px; border-radius: 12px; }
.sales-metric > strong { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.sales-balances .sales-metric + .sales-metric { background: #f7f8f7; }
.sales-pace .sales-metric { background: #fff; border: 1px solid var(--line); }
.sales-home-reward { gap: 8px; }
.sales-milestone {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 190px;
  padding: clamp(17px,2.2vw,25px);
  border: 1px solid #204937;
  border-radius: var(--radius);
  color: #f2f9f5;
  background: #123a2c;
  box-shadow: var(--surface-shadow);
}
.sales-milestone::before {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 47%;
  content: '';
  opacity: .3;
  background: url('/terrain.webp') center 53% / cover;
  mask-image: linear-gradient(90deg,transparent 0%,#000 70%);
}
.sales-milestone-top > strong { color: #35230e; background: #f6d9a5; padding: 5px 10px; }
.sales-milestone h2 { font-family: var(--font-display); font-weight: 650; letter-spacing: -.033em; }
.sales-milestone-top span,.sales-meter-label { color: #d2e9dc; }
.milestone-meter { position: relative; height: 9px; border-radius: 999px; overflow: hidden; background: #e4f5e733; margin: 8px 0; }
.milestone-meter progress { opacity: 0; width: 100%; height: 100%; margin: 0; }
.milestone-meter .meter-fill { background: #9be2b6; width: 100%; position: absolute; inset: 0; transform: scaleX(0); transform-origin: left; border-radius: inherit; }
.sales-toolbar {
  align-items: center;
  padding: 8px 10px;
  background: #ffffffde;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--surface-shadow);
}
.sales-toolbar nav { gap: 3px; }
.sales-toolbar nav button {
  border: 1px solid transparent;
  min-height: 44px;
  background: transparent;
  border-radius: 11px;
  padding: 7px 10px;
  line-height: 1.12;
}
.sales-toolbar nav button:hover { background: #f1f5f2; }
.sales-toolbar nav button.selected { background: #e1efe6; color: #0a5734; border-color: #dbeade; }
.sales-toolbar .field { display: flex; align-items: center; gap: 7px; }
.sales-toolbar .field input { height: 42px; }
.sales-review-form { padding: 11px; background: #f9fbfa; border-radius: 13px; }
.sales-journey li { border-radius: 13px; }
.sales-journey li.just-earned,.achievement-earned.just-earned { animation: new-reward var(--motion-view) var(--ease-out); }
@keyframes new-reward { from { transform: translateY(4px) scale(.99); opacity: .65; } }
@media (max-width: 720px) {
  .sales-home,.sales-pair { gap: 10px; }
  .sales-toolbar { gap: 6px; padding: 6px; }
  .sales-toolbar nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); width: 100%; }
  .sales-toolbar nav button { padding-inline: 2px; font-size: .76rem; white-space: nowrap; }
  .sales-toolbar .field { padding-left: 5px; }
  .sales-toolbar .field > span { white-space: nowrap; font-size: .82rem; }
  .sales-toolbar .field input { min-height: 44px; font-size: .89rem; }
  .sales-milestone { min-height: 166px; }
}
@media (max-width: 1020px) {
  .sales-home-overview { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 365px) {
  .sales-toolbar nav { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
