.market-map-host {
  min-width: 0;
}

.market-dashboard {
  background: #fff;
  border: 1px solid var(--line, #dfe8d2);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(23, 33, 26, 0.06);
  overflow: hidden;
}

.market-dashboard__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line, #dfe8d2);
  background: #fbfdf7;
}

.market-dashboard__title {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.market-dashboard__subtitle {
  margin: 5px 0 0;
  color: var(--muted, #65715f);
  font-size: 13px;
  line-height: 1.45;
}

.market-dashboard__refresh {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--green, #1f7a3f);
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.market-dashboard__toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 0.8fr);
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line, #dfe8d2);
}

.market-dashboard__filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.market-dashboard__tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line, #dfe8d2);
  border-radius: 8px;
  background: #f7f8ea;
}

.market-dashboard__tab {
  min-height: 38px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted, #65715f);
  font-weight: 900;
  white-space: normal;
}

.market-dashboard__tab[aria-selected="true"] {
  background: #fff;
  color: var(--green-dark, #14532d);
  box-shadow: 0 1px 5px rgba(23, 33, 26, 0.12);
}

.market-dashboard__dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: 1px;
}

.market-dashboard__dot--supply {
  background: var(--green, #1f7a3f);
}

.market-dashboard__dot--demand {
  background: var(--yellow, #f2c94c);
  border: 1px solid #9d6b12;
}

.market-dashboard__filter label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.market-dashboard__filter select {
  min-height: 48px;
}

.market-dashboard__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line, #dfe8d2);
  border-bottom: 1px solid var(--line, #dfe8d2);
}

.market-dashboard__stat {
  min-width: 0;
  padding: 14px 18px;
  background: #fff;
}

.market-dashboard__stat-value {
  display: block;
  color: var(--ink, #172115);
  font-size: 23px;
  font-weight: 950;
  line-height: 1.1;
}

.market-dashboard__stat-label {
  display: block;
  margin-top: 4px;
  color: var(--muted, #65715f);
  font-size: 12px;
  font-weight: 800;
}

.market-dashboard__body {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(320px, 1.1fr);
  min-height: 520px;
}

.market-dashboard__map-panel {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: #edf7e7;
  border-right: 1px solid var(--line, #dfe8d2);
}

.market-dashboard__map {
  width: min(100%, 390px);
  height: auto;
  max-height: 490px;
  display: block;
  overflow: visible;
}

.market-dashboard__district {
  cursor: pointer;
  stroke: #fff;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  transition: fill 160ms ease, opacity 160ms ease, stroke 160ms ease;
}

.market-dashboard__district:hover,
.market-dashboard__district:focus {
  stroke: var(--green-dark, #14532d);
  stroke-width: 2.2;
  outline: none;
}

.market-dashboard__district.is-selected {
  stroke: #172115;
  stroke-width: 3;
}

.market-dashboard__marker {
  cursor: pointer;
  pointer-events: all;
  outline: none;
}

.market-dashboard__marker:hover circle,
.market-dashboard__marker:focus circle {
  stroke: #172115;
  stroke-width: 3;
}

.market-dashboard__marker circle {
  stroke: #fff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.market-dashboard__marker text {
  fill: #172115;
  font-size: 10px;
  font-weight: 950;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.market-dashboard__marker--supply circle {
  fill: var(--green, #1f7a3f);
}

.market-dashboard__marker--supply text {
  fill: #fff;
}

.market-dashboard__marker--demand circle {
  fill: var(--yellow, #f2c94c);
}

.market-dashboard__detail {
  min-width: 0;
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 16px;
  outline: none;
}

.market-dashboard__detail.is-updated {
  animation: market-detail-update 700ms ease-out;
}

@keyframes market-detail-update {
  0% { background: var(--yellow-soft, #fff4bf); }
  100% { background: transparent; }
}

.market-dashboard__district-name {
  margin: 0;
  font-size: 21px;
}

.market-dashboard__district-summary {
  margin: 4px 0 0;
  color: var(--muted, #65715f);
  font-size: 13px;
}

.market-dashboard__market-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.market-dashboard__group {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line, #dfe8d2);
  border-radius: 8px;
  background: #fff;
}

.market-dashboard__group--supply {
  border-top: 4px solid var(--green, #1f7a3f);
}

.market-dashboard__group--demand {
  border-top: 4px solid var(--yellow, #f2c94c);
}

.market-dashboard__group h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.market-dashboard__group-hint {
  margin: -4px 0 10px;
  color: var(--muted, #65715f);
  font-size: 11px;
  line-height: 1.4;
}

.market-dashboard__items {
  display: grid;
  gap: 8px;
}

.market-dashboard__item {
  min-width: 0;
  padding: 9px;
  border-radius: 7px;
  background: #f7f8ea;
}

.market-dashboard__item-name {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 900;
}

.market-dashboard__item-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted, #65715f);
  font-size: 11px;
  line-height: 1.35;
}

.market-dashboard__item-summary,
.market-dashboard__item-numbers {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.market-dashboard__item-summary {
  gap: 7px;
}

.market-dashboard__item-summary .surus-item-photo {
  width: 44px;
  min-width: 44px;
  height: 44px;
}

.market-dashboard__item--interactive {
  padding: 0;
  overflow: hidden;
}

.market-dashboard__item-toggle {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "summary chevron"
    "label chevron";
  align-items: center;
  gap: 5px 10px;
  padding: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.market-dashboard__item-toggle:hover {
  background: var(--yellow-soft, #fff4bf);
}

.market-dashboard__item-toggle:focus-visible {
  outline: 3px solid rgba(36, 91, 131, 0.35);
  outline-offset: -3px;
}

.market-dashboard__item-toggle > span:first-child {
  min-width: 0;
  grid-area: summary;
}

.market-dashboard__toggle-label {
  grid-area: label;
  color: var(--green, #1f7a3f);
  font-size: 11px;
  font-weight: 800;
}

.market-dashboard__item-chevron {
  grid-area: chevron;
  font-size: 22px;
  line-height: 1;
  transition: transform 160ms ease;
}

.market-dashboard__item-toggle[aria-expanded="true"] .market-dashboard__item-chevron {
  transform: rotate(180deg);
}

.market-dashboard__request-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line, #dfe8d2);
  background: #fff;
}

.market-dashboard__request-list[hidden] {
  display: none;
}

.market-dashboard__request {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line, #dfe8d2);
  border-radius: 7px;
  background: #fffdf2;
}

.market-dashboard__request-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.market-dashboard__request-heading strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.market-dashboard__request-heading span {
  flex: 0 0 auto;
  color: #7a5a00;
  font-size: 10px;
  font-weight: 800;
}

.market-dashboard__listing-visual {
  margin-top: 10px;
}

.market-dashboard__listing-visual .surus-item-photo {
  width: 100%;
  height: clamp(130px, 22vw, 210px);
  border-radius: 7px;
}

.market-dashboard__listing-visual .surus-item-photo img {
  object-fit: cover;
}

.market-dashboard__request-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 10px 0 0;
}

.market-dashboard__request-facts div {
  min-width: 0;
}

.market-dashboard__request-facts dt {
  color: var(--muted, #65715f);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.market-dashboard__request-facts dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 750;
}

.market-dashboard__contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line, #dfe8d2);
}

.market-dashboard__contact-button {
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--green, #1f7a3f);
  border-radius: 7px;
  background: var(--green, #1f7a3f);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}

.market-dashboard__contact-button:hover,
.market-dashboard__contact-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(31, 122, 63, 0.15);
  outline: 0;
}

.market-dashboard__contact-button--whatsapp {
  border-color: #1f8f4e;
  background: #1f8f4e;
}

.market-dashboard__empty,
.market-dashboard__error {
  padding: 13px;
  border-radius: 8px;
  color: var(--muted, #65715f);
  background: #f7f8ea;
  font-size: 13px;
  line-height: 1.45;
}

.market-dashboard__error {
  color: #7a4311;
  background: var(--yellow-soft, #fff4bf);
}

.market-dashboard__source {
  margin: 0;
  color: var(--muted, #65715f);
  font-size: 10px;
}

.market-dashboard.is-loading .market-dashboard__refresh {
  opacity: 0.65;
  cursor: wait;
}

.market-price-guide {
  padding: 18px 22px 20px;
  border-top: 1px solid var(--line, #dfe8d2);
  background: #fffdf5;
}

.market-price-guide__header h3,
.market-price-guide__header p {
  margin: 0;
}

.market-price-guide__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.market-price-guide__header > div {
  min-width: 0;
}

.market-price-guide__toggle {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid #238b45;
  border-radius: 8px;
  background: #fff;
  color: #166534;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.market-price-guide__toggle:hover,
.market-price-guide__toggle:focus-visible {
  background: #eaf7e2;
  outline: 3px solid rgba(35, 139, 69, 0.18);
  outline-offset: 2px;
}

.market-price-guide__header h3 {
  font-size: 20px;
}

.market-price-guide__header p {
  margin-top: 5px;
  color: var(--muted, #61705f);
  font-size: 14px;
}

.market-price-guide__table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.market-price-guide__table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.market-price-guide__table th,
.market-price-guide__table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line, #dfe8d2);
  text-align: left;
  vertical-align: middle;
}

.market-price-guide__table th {
  color: #53604f;
  background: #f5f8ee;
  font-size: 13px;
}

.market-price-guide__table td span {
  display: block;
  margin-top: 2px;
  color: var(--muted, #61705f);
  font-size: 12px;
}

.market-price-guide__table td strong {
  color: #174d2d;
}

.market-price-guide__source-button {
  width: 100%;
  min-height: 46px;
  display: grid;
  gap: 3px;
  justify-items: start;
  padding: 8px 10px;
  border: 1px solid #9bc48b;
  border-radius: 7px;
  background: #edf8e8;
  color: #174d2d;
  text-align: left;
  cursor: pointer;
}

.market-price-guide__source-button:hover,
.market-price-guide__source-button:focus-visible {
  border-color: var(--green, #1f7a3f);
  box-shadow: 0 0 0 3px rgba(242, 201, 76, 0.3);
  outline: 0;
}

.market-price-guide__source-button span {
  margin: 0;
  color: inherit;
  font-size: 13px;
  font-weight: 900;
}

.market-price-guide__source-button small {
  color: #52684e;
  font-size: 11px;
  font-weight: 800;
}

.market-price-guide__detail-row[hidden] {
  display: none !important;
}

.market-price-guide__detail-row td {
  padding: 14px;
  background: #f4faef;
}

.market-price-guide__detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.market-price-guide__post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.market-price-guide__post {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid #d7e5cd;
  border-radius: 7px;
  background: #fff;
  color: #263725;
  font-size: 12px;
}

.market-price-guide__post > span {
  margin: 0;
  color: #465846;
  font-size: 12px;
}

.market-price-guide__post-photo .surus-item-photo {
  width: 100%;
  height: 150px;
  border-radius: 7px;
}

.market-price-guide__post-photo .surus-item-photo img {
  object-fit: cover;
}

.market-price-guide__contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 5px;
}

.market-price-guide__contact-actions a {
  min-height: 36px;
  padding: 8px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green, #1f7a3f);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.market-price-guide__post-type {
  width: fit-content;
  padding: 3px 6px;
  border-radius: 999px;
  background: #fff1b8;
  color: #70500c !important;
  font-weight: 900;
}

@media (max-width: 760px) {
  .market-price-guide__header {
    align-items: stretch;
    flex-direction: column;
  }

  .market-price-guide__toggle {
    width: 100%;
    text-align: left;
  }

  .market-dashboard__header,
  .market-dashboard__toolbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .market-dashboard__toolbar,
  .market-dashboard__body,
  .market-dashboard__market-groups {
    grid-template-columns: 1fr;
  }

  .market-dashboard__stats {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .market-dashboard__stat {
    padding: 12px 10px;
  }

  .market-dashboard__stat-value {
    font-size: 20px;
  }

  .market-dashboard__body {
    min-height: 0;
  }

  .market-dashboard__map-panel {
    min-height: 440px;
    border-right: 0;
    border-bottom: 1px solid var(--line, #dfe8d2);
  }

  .market-dashboard__map {
    max-height: 410px;
  }

  .market-dashboard__detail {
    padding: 16px;
  }

  .market-price-guide {
    padding: 16px 14px;
  }

  .market-price-guide__table thead {
    display: none;
  }

  .market-price-guide__table,
  .market-price-guide__table tbody,
  .market-price-guide__table tr,
  .market-price-guide__table td {
    display: block;
    width: 100%;
  }

  .market-price-guide__table tr {
    margin-bottom: 10px;
    border: 1px solid var(--line, #dfe8d2);
    border-radius: 8px;
    padding: 8px 12px;
  }

  .market-price-guide__detail-row {
    padding: 0 !important;
    border-color: #cfe0c4 !important;
  }

  .market-price-guide__detail-row td {
    display: block;
    padding: 12px;
  }

  .market-price-guide__detail-row td::before {
    display: none;
  }

  .market-price-guide__detail-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .market-price-guide__post-list {
    grid-template-columns: 1fr;
  }

  .market-price-guide__table td {
    display: grid;
    grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.2fr);
    gap: 10px;
    padding: 7px 0;
    border: 0;
  }

  .market-price-guide__table td::before {
    content: attr(data-label);
    color: #61705f;
    font-size: 12px;
    font-weight: 700;
  }
}

@media (max-width: 440px) {
  .market-dashboard__filter {
    grid-template-columns: 1fr;
  }
  .market-dashboard__tabs {
    grid-template-columns: 1fr;
  }

  .market-dashboard__stat-label {
    font-size: 10px;
  }

  .market-dashboard__map-panel {
    min-height: 390px;
    padding: 12px;
  }

  .market-dashboard__request-heading {
    display: grid;
  }

  .market-dashboard__request-heading span {
    flex: initial;
  }

  .market-dashboard__request-facts {
    grid-template-columns: 1fr;
  }

  .market-dashboard__contact-actions {
    grid-template-columns: 1fr;
  }
}

/* Marketplace home layout */
.market-dashboard__header-actions,
.market-dashboard__listing-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.market-dashboard__primary-action,
.market-dashboard__upcoming-button,
.market-dashboard__bid-button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid #176b36;
  border-radius: 7px;
  background: var(--green, #1f7a3f);
  color: #fff;
  font-weight: 900;
}

.market-dashboard__upcoming-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-color: #d8aa1b;
  background: #fff1b8;
  color: #5f4300;
  cursor: pointer;
}

.market-dashboard__upcoming-button strong {
  min-width: 25px;
  min-height: 25px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #f2c94c;
  color: #3f2c00;
  font-size: 12px;
}

.market-dashboard__primary-action span {
  margin-right: 5px;
  font-size: 20px;
  line-height: 0;
}

.market-dashboard__search-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.32fr);
  gap: 10px;
  padding: 14px 18px 5px;
  background: #fbfdf7;
}

.market-dashboard__search-control,
.market-dashboard__district-control {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line, #dfe8d2);
  border-radius: 7px;
  background: #fff;
  color: var(--green-dark, #14532d);
}

.market-dashboard__search-control input,
.market-dashboard__district-control select {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink, #172115);
  font: inherit;
  outline: 0;
}

.market-dashboard__toolbar {
  grid-template-columns: minmax(300px, 1fr) auto;
  padding-top: 9px;
  border-bottom: 0;
  background: #fbfdf7;
}

.market-dashboard__view-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(95px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line, #dfe8d2);
  border-radius: 8px;
  background: #f7f8ea;
}

.market-dashboard__view-switch button {
  min-height: 38px;
  padding: 7px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted, #65715f);
  font-weight: 900;
}

.market-dashboard__view-switch button[aria-selected="true"] {
  background: #fff;
  color: var(--green-dark, #14532d);
  box-shadow: 0 1px 5px rgba(23, 33, 26, 0.12);
}

.market-dashboard__categories {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(168px, 1fr);
  gap: 9px;
  padding: 10px 18px 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line, #dfe8d2);
  background: #fbfdf7;
  scrollbar-width: thin;
}

.market-dashboard__category {
  min-height: 67px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line, #dfe8d2);
  border-radius: 7px;
  background: #fff;
  color: var(--ink, #172115);
  text-align: left;
  cursor: pointer;
}

.market-dashboard__category:hover,
.market-dashboard__category[aria-pressed="true"] {
  border-color: var(--green, #1f7a3f);
  background: #eaf6df;
  box-shadow: inset 0 0 0 1px rgba(31, 122, 63, 0.12);
}

.market-dashboard__category-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #fff3be;
  font-size: 23px;
}

.market-dashboard__category-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.market-dashboard__category-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: normal;
  word-break: keep-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.market-dashboard__category-copy small {
  color: var(--muted, #65715f);
  font-weight: 800;
}

.market-dashboard__list-view {
  padding: 18px;
  background: #f7faef;
}

.market-dashboard__list-view[hidden],
.market-dashboard__map-view[hidden] {
  display: none !important;
}

.market-dashboard__results-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.market-dashboard__results-header h3,
.market-dashboard__results-header p {
  margin: 0;
}

.market-dashboard__results-header p {
  margin-top: 3px;
  color: var(--muted, #65715f);
  font-size: 13px;
}

.market-dashboard__results-header > strong {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff1b8;
  color: #745111;
  font-size: 12px;
}

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

.market-dashboard__result-card {
  min-width: 0;
  display: grid;
  grid-template-rows: 150px auto;
  overflow: hidden;
  border: 1px solid var(--line, #dfe8d2);
  border-top: 4px solid var(--green, #1f7a3f);
  border-radius: 8px;
  background: #fff;
}

.market-dashboard__result-card--demand {
  border-top-color: var(--yellow, #f2c94c);
}

.market-dashboard__result-visual {
  min-width: 0;
  overflow: hidden;
  background: #eef5e6;
}

.market-dashboard__result-visual .surus-item-cell,
.market-dashboard__result-visual .surus-item-photo,
.market-dashboard__result-visual .surus-item-photo img {
  width: 100%;
  height: 100%;
  max-width: none;
}

.market-dashboard__result-visual .surus-item-cell {
  display: block;
  position: relative;
}

.market-dashboard__result-visual .surus-item-photo {
  border: 0;
  border-radius: 0;
}

.market-dashboard__result-visual .surus-item-photo img {
  object-fit: cover;
}

.market-dashboard__result-visual .surus-item-cell__text {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  width: auto;
  padding: 5px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 11px;
}

.market-dashboard__result-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 52px;
}

.market-dashboard__result-content {
  min-width: 0;
  display: grid;
  gap: 13px;
  padding: 14px;
}

.market-dashboard__result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.market-dashboard__result-heading h3,
.market-dashboard__result-heading p {
  margin: 0;
}

.market-dashboard__result-heading h3 {
  margin-top: 6px;
  font-size: 18px;
}

.market-dashboard__result-heading p {
  margin-top: 2px;
  color: var(--muted, #65715f);
  font-size: 12px;
}

.market-dashboard__side-label,
.market-dashboard__rating {
  display: inline-grid;
  gap: 2px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.market-dashboard__side-label--supply {
  background: #e2f3d8;
  color: #176b36;
}

.market-dashboard__side-label--demand,
.market-dashboard__rating {
  background: #fff1b8;
  color: #745111;
}

.market-dashboard__rating strong,
.market-dashboard__rating small {
  line-height: 1.2;
  white-space: nowrap;
}

.market-dashboard__rating small {
  font-size: 10px;
}

.market-upcoming-dialog {
  width: min(920px, calc(100vw - 28px));
  max-width: 920px;
  max-height: min(86vh, 820px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line, #dfe8d2);
  border-radius: 8px;
  background: #fff;
  color: var(--ink, #172115);
  box-shadow: 0 24px 70px rgba(15, 38, 22, 0.28);
}

.market-upcoming-dialog::backdrop {
  background: rgba(12, 28, 17, 0.62);
}

.market-upcoming-dialog__panel {
  max-height: min(86vh, 820px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.market-upcoming-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line, #dfe8d2);
  background: #f7faef;
}

.market-upcoming-dialog__header h2,
.market-upcoming-dialog__header p {
  margin: 0;
}

.market-upcoming-dialog__header h2 {
  font-size: 24px;
}

.market-upcoming-dialog__header p {
  margin-top: 5px;
  color: var(--muted, #52604d);
}

.market-upcoming-dialog__header button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: 1px solid #d6dfcb;
  border-radius: 7px;
  background: #fff;
  color: #24422e;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.market-upcoming-dialog__content {
  min-height: 160px;
  padding: 18px 22px;
  overflow-y: auto;
  background: #fff;
}

.market-upcoming-dialog__note {
  margin: 0;
  padding: 12px 22px;
  border-top: 1px solid var(--line, #dfe8d2);
  background: #fff7d7;
  color: #5f4a13;
  font-size: 13px;
  font-weight: 700;
}

.market-upcoming-dialog__empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  color: var(--muted, #52604d);
  text-align: center;
}

.market-upcoming-group + .market-upcoming-group {
  margin-top: 22px;
}

.market-upcoming-group__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.market-upcoming-group__heading h3 {
  margin: 0;
  font-size: 19px;
}

.market-upcoming-group__heading span {
  min-width: 28px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #e5f4da;
  color: #176b36;
  font-weight: 900;
}

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

.market-upcoming-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line, #dfe8d2);
  border-left: 4px solid #f2c94c;
  border-radius: 7px;
  background: #fbfcf8;
}

.market-upcoming-card__heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.market-upcoming-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #fff1b8;
  font-size: 23px;
}

.market-upcoming-card__heading div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.market-upcoming-card__heading strong {
  font-size: 17px;
}

.market-upcoming-card__heading span,
.market-upcoming-card__heading time {
  color: var(--muted, #52604d);
  font-size: 13px;
}

.market-upcoming-card__heading div span {
  overflow-wrap: anywhere;
}

.market-upcoming-card__heading time {
  color: #174d2d;
  font-weight: 900;
  white-space: nowrap;
}

.market-upcoming-card__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 13px 0 0;
}

.market-upcoming-card__facts div {
  min-width: 0;
  padding: 9px;
  border-radius: 6px;
  background: #f1f5e8;
}

.market-upcoming-card__facts .is-needed {
  background: #fff1b8;
}

.market-upcoming-card__facts .is-covered {
  background: #e5f4da;
}

.market-upcoming-card__facts dt {
  color: var(--muted, #52604d);
  font-size: 11px;
  font-weight: 800;
}

.market-upcoming-card__facts dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: #172115;
  font-size: 15px;
  font-weight: 900;
}

.market-upcoming-card__district-stock,
.market-upcoming-card__requests {
  margin: 10px 0 0;
  color: var(--muted, #52604d);
  font-size: 12px;
}

.market-upcoming-card__requests {
  font-weight: 800;
}

.market-dashboard__result-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.market-dashboard__result-facts div {
  min-width: 0;
}

.market-dashboard__result-facts dt {
  color: var(--muted, #65715f);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.market-dashboard__result-facts dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink, #172115);
  font-size: 13px;
  font-weight: 900;
}

.market-dashboard__details-button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  border: 1px solid var(--green, #1f7a3f);
  border-radius: 7px;
  background: #fff;
  color: var(--green-dark, #14532d);
  font-weight: 900;
}

.market-dashboard__result-details {
  grid-column: 1;
  padding: 0 14px 14px;
}

.market-dashboard__result-details .market-dashboard__request-list {
  margin: 0;
}

.market-dashboard__listing-actions {
  align-items: stretch;
  flex-wrap: wrap;
}

.market-dashboard__listing-actions .market-dashboard__contact-actions {
  flex: 1 1 220px;
}

.market-dashboard__bid-button {
  flex: 1 1 140px;
}

.market-dashboard__listing-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line, #dfe8d2);
}

.market-dashboard__listing-actions .market-dashboard__contact-actions {
  display: contents;
  margin: 0;
  padding: 0;
  border: 0;
}

.market-dashboard__listing-actions .market-dashboard__contact-button,
.market-dashboard__listing-actions .market-dashboard__bid-button {
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
}

.market-offer-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.market-offer-dialog::backdrop {
  background: rgba(12, 32, 21, 0.46);
}

.market-offer-dialog__panel {
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  display: grid;
  gap: 16px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px 20px calc(72px + env(safe-area-inset-bottom, 0px));
  border: 2px solid var(--green, #1f7a3f);
  border-radius: 8px;
  background: #fffef8;
  box-shadow: 0 24px 64px rgba(12, 32, 21, 0.28);
}

.market-offer-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.market-offer-dialog__header h2,
.market-offer-dialog__header p {
  margin: 0;
}

.market-offer-dialog__header h2 {
  font-size: 22px;
}

.market-offer-dialog__header p {
  margin-top: 4px;
  color: var(--muted, #65715f);
  font-size: 13px;
  line-height: 1.45;
}

.market-offer-dialog__header button,
.market-offer-dialog__secondary {
  min-height: 42px;
  border: 1px solid #d8aa1b;
  border-radius: 7px;
  background: #fff1b8;
  color: #7a5200;
  font-weight: 900;
}

.market-offer-dialog__header button {
  width: 42px;
  flex: 0 0 42px;
  padding: 0;
  font-size: 24px;
}

.market-offer-dialog__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.market-offer-dialog__fields label {
  display: grid;
  gap: 6px;
  color: var(--ink, #172115);
  font-weight: 900;
}

.market-offer-dialog__fields label:last-child {
  grid-column: 1 / -1;
}

.market-offer-dialog__fields input {
  width: 100%;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid var(--line, #dfe8d2);
  border-radius: 7px;
  background: #fff;
  color: var(--ink, #172115);
  font: inherit;
}

.market-offer-dialog__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.market-offer-dialog__actions button[type="submit"] {
  min-height: 48px;
  border: 1px solid var(--green, #1f7a3f);
  border-radius: 7px;
  background: var(--green, #1f7a3f);
  color: #fff;
  font-weight: 900;
}

.market-offer-dialog__status {
  min-height: 22px;
  margin: 0;
  color: var(--green-dark, #14532d);
  font-weight: 900;
}

.market-offer-dialog__status.is-error {
  color: #9a3412;
}

.market-dashboard__results-header--count-only {
  justify-content: flex-end;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 10px;
}

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

@media (max-width: 760px) {
  .market-dashboard__header,
  .market-dashboard__header-actions,
  .market-dashboard__results-header {
    align-items: stretch;
  }

  .market-dashboard__header,
  .market-dashboard__results-header {
    display: grid;
  }

  .market-dashboard__header-actions {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .market-dashboard__primary-action {
    grid-column: 1 / -1;
  }

  .market-dashboard__search-row,
  .market-dashboard__toolbar {
    grid-template-columns: 1fr;
  }

  .market-dashboard__toolbar,
  .market-dashboard__search-row {
    padding-right: 12px;
    padding-left: 12px;
  }

  .market-dashboard__categories {
    grid-auto-columns: minmax(132px, 44vw);
    padding-right: 12px;
    padding-left: 12px;
  }

  .market-dashboard__list-view {
    padding: 12px;
  }

  .market-dashboard__results {
    grid-template-columns: 1fr;
  }

  .market-upcoming-group__list {
    grid-template-columns: 1fr;
  }

  .market-dashboard__result-card {
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-rows: auto;
  }

  .market-dashboard__result-visual {
    min-height: 100%;
  }

  .market-dashboard__result-details {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .market-dashboard__listing-actions {
    grid-template-columns: 1fr;
  }

  .market-offer-dialog__fields,
  .market-offer-dialog__actions {
    grid-template-columns: 1fr;
  }
}

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

  .market-dashboard__tab,
  .market-dashboard__view-switch button {
    padding-right: 5px;
    padding-left: 5px;
    font-size: 11px;
  }

  .market-dashboard__result-card {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .market-upcoming-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
  }

  .market-upcoming-dialog__panel {
    max-height: calc(100vh - 12px);
  }

  .market-upcoming-dialog__header,
  .market-upcoming-dialog__content,
  .market-upcoming-dialog__note {
    padding-right: 14px;
    padding-left: 14px;
  }

  .market-upcoming-card__heading {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .market-upcoming-card__heading time {
    grid-column: 2;
  }

  .market-upcoming-card__facts {
    grid-template-columns: 1fr;
  }

  .market-dashboard__result-content {
    gap: 10px;
    padding: 11px;
  }

  .market-dashboard__result-heading {
    display: grid;
  }

  .market-dashboard__result-facts {
    grid-template-columns: 1fr;
  }
}
/* Marketplace UI polish: compact cards, readable category names, clearer empty/date states. */
.market-dashboard {
  color: #101712;
}

.market-dashboard__toolbar {
  align-items: stretch;
}

.market-dashboard__categories {
  gap: 10px;
}

.market-dashboard__category {
  min-height: 92px;
  border-radius: 8px;
  align-items: center;
}

.market-dashboard__category-copy,
.market-dashboard__category-copy strong,
.market-dashboard__category-copy small {
  min-width: 0;
}

.market-dashboard__category-copy strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(0.98rem, 1.15vw, 1.15rem);
  line-height: 1.15;
  font-weight: 900;
}

.market-dashboard__category-copy small {
  display: block;
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #445449;
}

.market-dashboard__body {
  min-height: min(520px, 62vh);
}

.market-dashboard__empty,
.market-dashboard__detail-empty,
.market-dashboard__list-empty {
  background: #f8fbf4;
  border: 1px solid #d7e5cc;
  border-radius: 8px;
  color: #233228;
  font-weight: 800;
  padding: 18px;
}

.market-price-guide {
  overflow: hidden;
}

.market-price-guide[aria-expanded="false"],
.market-price-guide.is-collapsed {
  padding-bottom: 0;
}

.market-price-guide__toggle,
.market-price-guide button {
  min-height: 48px;
  border-radius: 8px;
  font-weight: 900;
}

/* v90 dashboard density: reduce empty map/detail space and make listing cards clearer. */
.market-dashboard__body {
  min-height: 0;
  grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1.18fr);
}

.market-dashboard__map-panel {
  align-items: center;
  padding: 16px;
  background: #e8f5e9;
}

.market-dashboard__map {
  width: min(100%, 330px);
  max-height: 390px;
}

.market-dashboard__detail {
  padding: 18px 18px 14px;
  gap: 12px;
  background: #f7fbf3;
}

.market-dashboard__district-name {
  font-size: 20px;
  line-height: 1.2;
}

.market-dashboard__market-groups {
  grid-template-columns: 1fr;
  gap: 10px;
}

.market-dashboard__group {
  padding: 12px;
  background: #fffef8;
}

.market-dashboard__items {
  gap: 10px;
}

.market-dashboard__item {
  border: 1px solid #d8e7cc;
  background: #fff;
}

.market-dashboard__item-toggle {
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 8px 12px;
  padding: 12px;
}

.market-dashboard__item-name {
  font-size: 16px;
  line-height: 1.25;
}

.market-dashboard__item-meta {
  font-size: 13px;
  color: #314136;
}

.market-dashboard__item-summary .surus-item-photo {
  width: 54px;
  min-width: 54px;
  height: 54px;
}

.market-dashboard__source {
  margin: 4px 0 0;
  font-size: 12px;
  color: #314136;
}

@media (min-width: 1280px) {
  .market-dashboard__toolbar {
    grid-template-columns: minmax(420px, 1fr) minmax(260px, 360px);
  }

  .market-dashboard__body {
    grid-template-columns: minmax(420px, 0.95fr) minmax(420px, 1.05fr);
  }
}

@media (max-width: 900px) {
  .market-dashboard__toolbar,
  .market-dashboard__body {
    grid-template-columns: 1fr;
  }

  .market-dashboard__category {
    min-height: 78px;
  }
}

/* Final marketplace readability/category fixes. */
.market-dashboard {
  background: #cbed98;
  color: #172317;
}

.market-dashboard__category {
  min-width: 172px;
  min-height: 84px;
  align-items: center;
}

.market-dashboard__category-copy {
  min-width: 0;
}

.market-dashboard__category-copy strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: clamp(1rem, 1.1vw, 1.14rem);
  line-height: 1.12;
  font-weight: 800;
  word-break: normal;
  overflow-wrap: anywhere;
}

.market-dashboard__category-copy span {
  color: #263528;
  font-size: 0.98rem;
  font-weight: 800;
}

.market-dashboard__category[title] {
  cursor: pointer;
}

.market-dashboard .market-price-guide[aria-expanded="false"] .market-price-guide__body,
.market-dashboard .market-price-guide.is-collapsed .market-price-guide__body {
  display: none;
}

.market-dashboard .market-price-guide[aria-expanded="false"],
.market-dashboard .market-price-guide:not(.is-open) {
  padding-bottom: 0;
}

.market-dashboard .market-price-guide__toggle {
  min-height: 54px;
  font-size: 1.02rem;
}

.market-dashboard .empty,
.market-dashboard .empty-state {
  color: #203022;
  font-weight: 800;
}

/* v110 dashboard polish: lighter surface, clearer controls, mobile-first spacing. */
.market-dashboard {
  --market-role: var(--role-primary, #38963c);
  --market-role-soft: var(--role-light, #e8f5e9);
  --market-role-ink: var(--role-dark, #14532d);
  background: #fff;
  border-color: color-mix(in srgb, var(--market-role) 20%, #dfe8d2);
  box-shadow: 0 14px 34px rgba(23, 33, 26, 0.08);
}

.role-buyer .market-dashboard {
  --market-role: #1565c0;
  --market-role-soft: #e3f2fd;
  --market-role-ink: #0d47a1;
}

.role-farmer .market-dashboard {
  --market-role: #38963c;
  --market-role-soft: #e8f5e9;
  --market-role-ink: #14532d;
}

.market-dashboard__header {
  align-items: center;
  padding: 20px 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--market-role-soft) 72%, #fff) 0%, #fff 64%),
    #fff;
  border-top: 4px solid var(--market-role);
}

.market-dashboard__title {
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: 0;
}

.market-dashboard__subtitle {
  max-width: 620px;
  font-size: 14px;
  color: #435344;
}

.market-dashboard__header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.market-dashboard__refresh,
.market-dashboard__primary-action {
  background: var(--market-role);
  border-color: var(--market-role);
}

.market-dashboard__upcoming-button {
  border-color: #e0b22a;
  background: #fff3bf;
  box-shadow: 0 1px 0 rgba(95, 67, 0, 0.08);
}

.role-farmer .market-dashboard__upcoming-button {
  display: none;
}

.role-farmer .market-dashboard__primary-action {
  grid-column: auto;
}

.market-mobile-popup {
  width: min(720px, calc(100vw - 28px));
  max-height: min(82vh, 780px);
  max-height: min(82dvh, 780px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.market-mobile-popup::backdrop {
  background: rgba(12, 32, 21, 0.46);
}

.market-mobile-popup__panel {
  max-height: min(82vh, 780px);
  max-height: min(82dvh, 780px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #d7e7cf;
  border-radius: 10px;
  background: #fff;
}

.market-mobile-popup__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid #edf2e8;
  background: #f8fbf5;
}

.market-mobile-popup__header h2,
.market-mobile-popup__header p {
  margin: 0;
}

.market-mobile-popup__header h2 {
  color: var(--market-role-ink);
  font-size: 20px;
  line-height: 1.2;
}

.market-mobile-popup__header p {
  margin-top: 4px;
  color: #65715f;
  font-size: 13px;
  font-weight: 800;
}

.market-mobile-popup__header button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--market-role-ink);
}

.market-mobile-popup__content {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px calc(72px + env(safe-area-inset-bottom, 0px));
  background: #fff;
}

.market-mobile-popup__content .market-dashboard__result-card,
.market-mobile-popup__content .market-dashboard__request {
  margin-bottom: 12px;
}

.market-dashboard__search-row,
.market-dashboard__toolbar,
.market-dashboard__categories {
  background: #fff;
}

.market-dashboard__search-row {
  padding-top: 16px;
}

.market-dashboard__search-control,
.market-dashboard__district-control {
  min-height: 54px;
  border-color: #d5e5ce;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(23, 33, 26, 0.03);
}

.market-dashboard__search-control input,
.market-dashboard__district-control select {
  height: 52px;
  font-weight: 800;
}

.market-dashboard__tabs,
.market-dashboard__view-switch {
  border-color: #d5e5ce;
  background: #f5f8f1;
  border-radius: 10px;
}

.market-dashboard__tab,
.market-dashboard__view-switch button {
  border-radius: 8px;
}

.market-dashboard__tab[aria-selected="true"],
.market-dashboard__view-switch button[aria-selected="true"] {
  color: var(--market-role-ink);
  background: var(--market-role-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--market-role) 45%, #fff);
}

.market-dashboard__categories {
  grid-auto-columns: minmax(210px, 1fr);
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 18px;
}

.market-dashboard__category {
  min-height: 82px;
  padding: 12px 14px;
  border-color: #d7e7cf;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(23, 33, 26, 0.05);
}

.market-dashboard__category:hover,
.market-dashboard__category[aria-pressed="true"] {
  border-color: var(--market-role);
  background: var(--market-role-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--market-role) 40%, #fff), 0 8px 20px rgba(23, 33, 26, 0.07);
}

.market-dashboard__category-icon {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  border-radius: 8px;
}

.market-dashboard__category-copy strong {
  font-size: 16px;
  line-height: 1.2;
}

.market-dashboard__category-copy span,
.market-dashboard__category-copy small {
  font-size: 13px;
}

.market-dashboard__stats {
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border-top: 1px solid #edf2e8;
  border-bottom: 1px solid #edf2e8;
}

.market-dashboard__stat {
  padding: 14px 16px;
  border: 1px solid #d7e7cf;
  border-radius: 8px;
  background: #fbfdf9;
}

.market-dashboard__stat-value {
  color: var(--market-role-ink);
}

.market-dashboard__list-view {
  background: #f8fbf5;
}

@media (max-width: 760px) {
  .market-dashboard {
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(23, 33, 26, 0.07);
  }

  .market-dashboard__header {
    display: grid;
    gap: 14px;
    padding: 18px 16px;
  }

  .market-dashboard__header-actions {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
  }

  .market-dashboard__refresh {
    width: 54px;
    min-width: 54px;
    height: 54px;
  }

  .market-dashboard__upcoming-button {
    min-height: 54px;
    justify-content: center;
  }

  .market-dashboard__primary-action {
    grid-column: 1 / -1;
    min-height: 58px;
    font-size: 17px;
  }

  .role-farmer .market-dashboard__primary-action {
    grid-column: auto;
    min-height: 54px;
  }

  .market-dashboard__search-row,
  .market-dashboard__toolbar {
    gap: 10px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .market-dashboard__tabs,
  .market-dashboard__view-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-dashboard__tab,
  .market-dashboard__view-switch button {
    min-height: 48px;
    font-size: 13px;
  }

  .market-dashboard__categories {
    grid-auto-columns: minmax(172px, 74vw);
    padding: 12px 14px 16px;
    scroll-snap-type: x proximity;
  }

  .market-dashboard__category {
    scroll-snap-align: start;
    min-height: 86px;
  }

  .market-dashboard__stats {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
    padding: 12px 14px;
  }

  .market-dashboard__stat {
    padding: 12px;
  }

  .market-dashboard__stat-value {
    font-size: 24px;
  }

  .market-dashboard__stat-label {
    font-size: 13px;
    line-height: 1.25;
  }

  .market-mobile-popup {
    width: 100vw;
    max-width: 100vw;
    max-height: 88vh;
    margin: auto 0 0;
  }

  .market-mobile-popup__panel {
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
  }
}

@media (max-width: 420px) {
  .market-dashboard__title {
    font-size: 24px;
  }

  .market-dashboard__subtitle {
    font-size: 13px;
  }

  .market-dashboard__search-control,
  .market-dashboard__district-control {
    padding-right: 11px;
    padding-left: 11px;
  }

  .market-dashboard__category-copy strong {
    font-size: 15px;
  }
}
