.home-totals,
.home-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.home-totals .metric {
  padding: 11px 16px;
  border-radius: 9px;
  margin: 0;
}
.home-totals .metric > strong {
  font-size: 22px;
  line-height: 1.25;
  margin: 4px 0 0;
}
.metric.navy {
  background: linear-gradient(115deg, #182a45, #2a4467);
}
.metric.green-solid {
  background: linear-gradient(115deg, #0d6f60, #15947d);
}
.metric.navy > strong,
.metric.green-solid > strong {
  color: white;
}
.metric.navy > small,
.metric.green-solid > small {
  color: #b1e1dd;
}
.home-pair > .panel {
  margin: 0;
}
.lead-panel,
.order-panel {
  padding: 0;
  overflow: hidden;
}
.lead-panel {
  border-left: 4px solid #ec9c00;
}
.order-panel {
  border-left: 4px solid #2781ff;
}
.lead-panel > h2,
.order-panel > h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  border-bottom: 1px solid #e0e8f1;
  margin: 0;
  font-size: 14px;
}
.count {
  font-size: 9px;
  white-space: nowrap;
  border-radius: 20px;
  background: #eaf3ff;
  color: #2074bd;
  padding: 3px 7px;
  font-weight: 500;
}
.lead-panel .home-values,
.order-panel .home-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.home-values > div {
  min-width: 0;
  padding: 9px 13px;
}
.lead-panel .home-values > div + div,
.order-panel .home-values > div + div {
  border-left: 1px solid #e0e8f1;
}
.home-values small,
.payment-mode-values small {
  display: block;
  color: #798a9f;
  font-size: 10px;
  margin-bottom: 3px;
}
.home-values strong {
  font-size: 14px;
}
.payment-mode-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  flex-wrap: wrap;
}
.payment-mode-panel h2 {
  margin: 0;
}
.payment-mode-values {
  display: flex;
  gap: 7px;
}
.payment-mode-values > div {
  background: #f2f8fc;
  padding: 8px 11px;
  border-radius: 7px;
}
.payment-mode-values .delivery-highlight {
  background: #fff7e6;
}
.payment-mode-values strong {
  font-size: 13px;
}
.home-delivery-pair {
  grid-template-columns: 1.55fr 1fr;
}
.shipped-panel {
  background: #e9e0ff;
  padding: 12px 14px;
}
.received-panel {
  background: #f6fffc;
  padding: 12px 14px;
}
.home-order-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}
.home-order-heading h2 {
  margin: 0;
  font-size: 14px;
}
.hero-number {
  font-size: 22px;
  color: #163653;
  line-height: 1;
}
.shipped-panel .home-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.shipped-panel .home-values > div {
  padding: 8px 9px;
  border: 1px solid #d8cbed;
  border-radius: 7px;
  background: #ffffffa3;
}
.shipped-panel .home-values > div:nth-child(2) {
  background: #effaf6;
  border-color: #bfe7db;
}
.shipped-panel .home-values > div:nth-child(3) {
  background: #fff4f5;
  border-color: #f0d4da;
}
.shipped-panel .home-values small {
  font-size: 9px;
  min-height: 24px;
}
.shipped-panel .home-values strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.home-received-profit {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 10px 12px;
  background: #eaf8f2;
  border: 1px solid #ccebdd;
  border-radius: 7px;
}
.home-received-profit strong {
  font-size: 17px;
  color: #008678;
}
.home-received-profit span {
  font-size: 11px;
  color: #628178;
}
.home-milestone-panel {
  padding: 13px 15px;
  color: #171717;
  border-color: #dedee2;
}
.home-milestone-panel > h2 {
  font-size: 15px;
  margin: 0 0 10px;
}
.milestone-scroll {
  overflow: auto;
  scrollbar-width: thin;
}
.milestone-table-wrap {
  border: 1px solid #d5d5da;
  border-radius: 9px;
  overflow: hidden;
  min-width: 900px;
}
.milestone-table {
  width: 100%;
  min-width: 900px;
  table-layout: fixed;
}
.milestone-table th {
  background: #191919;
  color: #fff;
  text-align: center;
  border-right: 1px solid #414141;
  font-size: 10px;
  padding: 9px 10px;
  text-transform: none;
}
.milestone-table th:nth-child(1) {
  width: 40px;
}
.milestone-table th:nth-child(2) {
  width: 17%;
}
.milestone-table th:nth-child(3) {
  width: 27%;
}
.milestone-table th:nth-child(4) {
  width: 29%;
}
.milestone-table td {
  background: #fafafa;
  border-right: 1px solid #dedee2;
  border-bottom: 1px solid #dedee2;
  padding: 10px 12px;
  color: #202020;
}
.milestone-table tr:nth-child(even) td {
  background: #f4f4f5;
}
.milestone-table td:last-child {
  background: #f3f3f4;
  border-right: 0;
}
.milestone-table td:first-child {
  text-align: center;
  font-size: 11px;
  color: #666;
}
.milestone-user {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.milestone-user .avatar-square {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 8px;
  background: #292929;
  color: white;
  font-size: 13px;
}
.milestone-user strong {
  font-size: 12px;
}
.milestone-user small {
  display: block;
  color: #66666d;
  font-size: 9px;
  margin-top: 3px;
}
.milestone-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #dedee2;
  line-height: 1.3;
}
.milestone-line:last-child {
  border: 0;
}
.milestone-line small {
  font-size: 10px;
  color: #66666d;
}
.milestone-line strong {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.milestone-bar {
  appearance: none;
  width: 100%;
  height: 13px;
  background: #e6e6e9;
  border: 1px solid #b8b8be;
  border-radius: 30px;
  box-shadow: inset 0 1px 3px #0000000d;
}
.milestone-bar::-webkit-progress-bar{background:#e6e6e9;border-radius:30px}
.milestone-bar::-webkit-progress-value{background:linear-gradient(90deg,#191919,#73737b);border-radius:30px}
.milestone-bar::-moz-progress-bar{background:linear-gradient(90deg,#191919,#73737b);border-radius:30px}
.milestone-percent {
  display: block;
  text-align: right;
  font-size: 10px;
  margin-top: 6px;
}
.milestone-businesses {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  min-width: 900px;
  border: 1px solid #d5d5da;
  border-radius: 9px;
  overflow: hidden;
  margin-top: 9px;
  background: #fafafa;
}
.milestone-businesses article {
  border-top: 3px solid #303030;
  border-right: 1px solid #dedee2;
  padding: 0 12px 4px;
}
.milestone-businesses h3 {
  font-size: 9px;
  text-align: center;
  padding: 9px 10px;
  margin: 0 -12px;
  background: #f0f0f2;
  border-bottom: 1px solid #dedee2;
}
.top-selling summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.top-selling summary:after {
  content: '⌄';
  margin-left: 8px;
}
.top-selling .mini-badge {
  margin-left: auto;
}
@media (max-width: 760px) {
  .home-totals {
    gap: 8px;
  }
  .home-totals .metric {
    padding: 10px 11px;
  }
  .home-totals .metric > small {
    font-size: 8px;
  }
  .home-totals .metric > strong {
    font-size: 18px;
  }
  .home-pair {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .payment-mode-panel {
    padding: 12px;
  }
  .payment-mode-values {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
  }
  .home-milestone-panel {
    padding: 12px;
  }
}
@media (max-width: 360px) {
  .home-totals .metric > strong {
    font-size: 13px;
    white-space: nowrap;
    overflow-wrap: normal;
  }
  .shipped-panel .home-values strong {
    font-size: 10px;
    white-space: nowrap;
    overflow-wrap: normal;
  }
}
/* Permission-limited views use their available width without a blank profit slot. */
.home-totals > :only-child,
.home-values > :only-child {
  grid-column: 1 / -1;
}
