:root {
  color-scheme: light;
  --ink: #101814;
  --dark: #050706;
  --panel: #0e1512;
  --panel-2: #151d19;
  --line: #dbe4df;
  --paper: #f6f8f6;
  --surface: #ffffff;
  --muted: #627069;
  --green: #00a650;
  --green-dark: #007a3d;
  --green-soft: #e6f6ed;
  --white: #ffffff;
  --shadow: 0 20px 44px rgba(0, 0, 0, 0.16);
  --soft-shadow: 0 8px 22px rgba(16, 24, 20, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(0, 166, 80, 0.16), transparent 28%),
    linear-gradient(180deg, #040605 0%, #101612 318px, var(--paper) 318px);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--surface);
}

.brand-hero {
  display: grid;
  grid-template-columns: 118px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 18px;
  background:
    linear-gradient(135deg, rgba(0, 166, 80, 0.24), transparent 46%),
    #030504;
  color: var(--white);
  border-bottom: 1px solid rgba(0, 166, 80, 0.72);
}

.logo-frame {
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #000;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  min-width: 0;
}

.owner-button {
  align-self: start;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  font-weight: 850;
}

.eyebrow {
  margin: 0 0 4px;
  color: #76d69f;
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--green-dark);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 7px;
  font-size: 1.68rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.brand-copy p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
}

h2 {
  margin-bottom: 0;
  font-size: 1.18rem;
  letter-spacing: 0;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #0b100d;
  color: var(--white);
}

.summary-band div {
  padding: 14px 8px;
  text-align: center;
}

.summary-band div + div {
  border-left: 1px solid #26362f;
}

.summary-band span {
  display: block;
  font-size: 1.32rem;
  font-weight: 900;
  color: var(--green);
}

.summary-band small {
  color: rgba(255, 255, 255, 0.74);
  font-weight: 800;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  padding: 10px;
  gap: 8px;
  border-bottom: 1px solid #d9e2dc;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 2;
}

.tab {
  min-height: 44px;
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  background: #f7faf8;
  color: #33433a;
  font-weight: 850;
}

.tab.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.view {
  display: none;
  padding: 16px;
}

.view.active {
  display: block;
}

.section-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.fresh-badge {
  flex: 0 0 auto;
  border: 1px solid #bde6cd;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.search-row,
.two-col {
  display: grid;
  grid-template-columns: 1fr 138px;
  gap: 11px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #ccd8d1;
  border-radius: 8px;
  padding: 13px 12px;
  background: white;
  color: #142019;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(0, 166, 80, 0.22);
  border-color: var(--green);
}

textarea {
  resize: vertical;
}

.listings,
.inquiry-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.listing-card,
.inquiry-card,
.form-panel {
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  background: white;
  box-shadow: var(--soft-shadow);
}

.listing-card {
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.listing-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(16, 24, 20, 0.12);
}

.listing-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #d8e2dc;
}

.listing-media {
  background: #101612;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  background: #101612;
}

.photo-thumb {
  min-height: auto;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  background: transparent;
}

.photo-thumb.active {
  border-color: var(--green);
}

.photo-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.listing-body,
.form-panel {
  padding: 16px;
}

.listing-title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.listing-title-row h2 {
  margin: 5px 0 6px;
  line-height: 1.2;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  background: #101612;
  color: #8ae2ad;
  font-size: 0.74rem;
  font-weight: 900;
}

.price {
  color: var(--green-dark);
  font-weight: 950;
  white-space: nowrap;
  font-size: 1.02rem;
}

.meta,
.description,
.selected-listing {
  color: var(--muted);
  line-height: 1.45;
}

.description {
  margin-bottom: 16px;
}

.listing-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.primary-button,
.text-button {
  min-height: 46px;
  border-radius: 8px;
  font-weight: 900;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.primary-button {
  border: 0;
  background: var(--green);
  color: white;
  padding: 0 14px;
  box-shadow: 0 8px 18px rgba(0, 166, 80, 0.22);
}

.primary-button:hover {
  background: #00994a;
}

.primary-button:active,
.text-button:active,
.tab:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  background: #9bac9f;
}

.text-button {
  border: 1px solid #ccd8d1;
  background: white;
  color: #17241d;
  padding: 0 12px;
}

.form-panel {
  display: grid;
  gap: 13px;
}

label {
  display: grid;
  gap: 6px;
  color: #16251d;
  font-weight: 850;
}

.section-head,
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2,
.dialog-head h2 {
  margin-bottom: 0;
}

.inquiry-card {
  padding: 16px;
}

.inquiry-card h3 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.inquiry-card p {
  margin-bottom: 8px;
  color: var(--muted);
}

.empty-state {
  display: none;
  margin: 22px 4px;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.empty-state.visible {
  display: block;
}

.hidden-field {
  display: none;
}

.form-status {
  min-height: 20px;
  margin-bottom: 0;
  color: var(--green-dark);
  font-weight: 850;
}

dialog {
  width: min(92vw, 520px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(4, 7, 5, 0.68);
}

#inquiryForm {
  display: grid;
  gap: 13px;
  padding: 18px;
}

.close-button {
  width: 38px;
  height: 38px;
  border: 1px solid #ccd8d1;
  border-radius: 8px;
  background: white;
  color: #16251d;
  font-weight: 900;
}

@media (min-width: 680px) {
  .app-shell {
    margin-block: 24px;
    min-height: calc(100vh - 48px);
    border: 1px solid #203128;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
  }

  .listing-card {
    display: grid;
    grid-template-columns: 248px 1fr;
  }

  .listing-card img {
    height: 100%;
    aspect-ratio: auto;
  }

  .listing-media > img {
    height: calc(100% - 72px);
  }
}

@media (max-width: 520px) {
  .brand-hero {
    grid-template-columns: 84px 1fr;
    padding: 14px;
    gap: 12px;
  }

  .owner-button {
    grid-column: 2;
    justify-self: start;
  }

  .logo-frame {
    width: 84px;
    height: 84px;
  }

  h1 {
    font-size: 1.28rem;
  }

  .brand-copy p:last-child {
    font-size: 0.88rem;
  }

  .summary-band div {
    padding: 12px 6px;
  }

  .summary-band span {
    font-size: 1.18rem;
  }
}

@media (max-width: 430px) {
  .search-row,
  .two-col,
  .listing-actions {
    grid-template-columns: 1fr;
  }

  .section-intro {
    display: grid;
  }

  .fresh-badge {
    width: fit-content;
  }

  .tabs {
    gap: 6px;
    padding: 8px;
  }

  .tab {
    font-size: 0.92rem;
  }
}
