:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f0f4f8;
  --surface-tint: #eef7f4;
  --ink: #152033;
  --muted: #667085;
  --line: #d9e2ec;
  --line-strong: #bcc9d6;
  --brand: #126f5a;
  --brand-strong: #0d5c4a;
  --blue: #315cf6;
  --amber: #c98421;
  --coral: #df674c;
  --rose: #b9505c;
  --green: #1f8a62;
  --shadow: 0 18px 48px rgba(21, 32, 51, 0.12);
  --radius-card: 8px;
  --radius-control: 8px;
  --font-display: "Aptos Display", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Aptos", "Avenir", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    linear-gradient(90deg, rgba(18, 111, 90, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(49, 92, 246, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #fbfcfe 0%, var(--bg) 100%);
  background-size: 42px 42px, 42px 42px, auto;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero,
.app-layout,
.home-grid {
  display: grid;
  gap: 16px;
}

.hero {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: stretch;
  margin-bottom: 16px;
}

.hero-copy,
.hero-side,
.surface-card,
.sidebar,
.device-stage {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: 0 1px 2px rgba(21, 32, 51, 0.04);
}

.hero-copy,
.hero-side,
.surface-card,
.sidebar,
.device-stage {
  padding: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
strong {
  font-family: var(--font-display);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  max-width: 14ch;
  font-size: 3.6rem;
  line-height: 1.02;
}

h2 {
  font-size: 2rem;
  line-height: 1.12;
}

h3 {
  font-size: 1.28rem;
  line-height: 1.16;
}

h4 {
  font-size: 1.02rem;
}

.lead,
.muted,
.surface-card p,
.detail-card p,
.dark-card p,
.modal-card p,
.note-box p,
.listing-copy p,
.listing-copy small {
  color: var(--muted);
  line-height: 1.5;
}

.lead {
  max-width: 68ch;
  margin-top: 12px;
  font-size: 1.02rem;
}

.quick-actions,
.hero-pills,
.status-row,
.chip-row,
.action-row,
.pill-grid,
.inner-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-actions {
  margin-top: 22px;
}

.primary-link,
.secondary-link,
.tab-button,
.square-button,
.action-row button,
.option,
.ghost,
.fill,
.broker-footer button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  transition: 160ms ease;
}

.primary-link,
.fill,
.action-row button:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 10px 24px rgba(18, 111, 90, 0.18);
}

.primary-link:hover,
.fill:hover,
.tab-button.is-active:hover,
.action-row button:first-child:hover {
  background: var(--brand-strong);
}

.secondary-link,
.ghost,
.action-row button:not(:first-child) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.hero-pills {
  margin-top: 18px;
}

.hero-pills span,
.status-pill,
.chip,
.badge,
.tag,
.pill-grid span,
.mini-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 0.78rem;
  white-space: nowrap;
}

.hero-side {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(18, 111, 90, 0.94), rgba(49, 92, 246, 0.86)),
    #126f5a;
  border-color: rgba(255, 255, 255, 0.22);
}

.hero-side .eyebrow,
.hero-side p {
  color: rgba(255, 255, 255, 0.78);
}

.install-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.12);
}

.home-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.surface-card {
  gap: 14px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.surface-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.card-head,
.row-between,
.listing-head,
.sheet-head,
.topbar,
.setting,
.broker-footer,
.stage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.topbar.compact {
  align-items: center;
}

.card-head a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--radius-control);
  color: var(--brand);
  background: var(--surface-tint);
}

.feature-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.preview-card {
  grid-column: span 1;
  align-items: center;
}

.mini-phone,
.phone {
  width: min(390px, 100%);
  padding: 10px;
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 26px 70px rgba(17, 24, 39, 0.24);
}

.mini-phone {
  width: 250px;
  margin: auto;
}

.mini-phone-notch,
.phone-top {
  width: 34%;
  height: 22px;
  margin: 0 auto 8px;
  border-radius: 0 0 12px 12px;
  background: #030712;
}

.mini-phone-screen,
.phone-body {
  overflow: hidden;
  border-radius: 20px;
  background: #f8fafc;
}

.mini-phone-screen {
  min-height: 420px;
  padding: 14px;
}

.mini-map,
.map-area {
  position: relative;
  overflow: hidden;
  border: 1px solid #c9d6e4;
  border-radius: var(--radius-card);
  background:
    linear-gradient(90deg, rgba(21, 32, 51, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(21, 32, 51, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, #dcefe8 0%, #edf2ff 48%, #fff4e6 100%);
  background-size: 38px 38px, 38px 38px, auto;
}

.mini-map {
  min-height: 250px;
}

.mini-chip {
  position: absolute;
  top: 12px;
  left: 12px;
}

.mini-chip.active,
.chip-active,
.badge,
.mini-tab.is-active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.mini-pin,
.map-pin {
  position: absolute;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 22px rgba(49, 92, 246, 0.18);
}

.mini-pin {
  min-height: 26px;
  padding: 0 9px;
  font-size: 0.75rem;
}

.price-one {
  top: 74px;
  left: 30px;
}

.price-two {
  top: 112px;
  right: 18px;
}

.price-three {
  bottom: 54px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
}

.mini-sheet {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
}

.app-layout {
  grid-template-columns: 300px minmax(0, 1fr);
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 36px;
}

.sidebar,
.device-stage {
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-control);
  color: #fff;
  background: var(--brand);
}

.sidebar-block + .sidebar-block {
  margin-top: 18px;
}

.tab-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.tab-button {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border-color: var(--line);
}

.tab-button:hover {
  border-color: var(--line-strong);
  background: #f8fafc;
}

.tab-button.is-active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.note-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.device-stage {
  display: flex;
  flex-direction: column;
}

.stage-header {
  margin-bottom: 16px;
}

.phone {
  margin: 0 auto;
}

.phone-body {
  position: relative;
  min-height: 780px;
}

.panel {
  display: none;
  min-height: 780px;
  padding: 16px 14px 18px;
}

.panel.is-visible {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.square-button {
  width: 42px;
  min-height: 42px;
  color: #fff;
  background: var(--blue);
}

.map-module,
.chart-card,
.detail-card,
.notice,
.kpi,
.meter-card,
.modal-card,
.chat-box,
.compact-card,
.listing,
.broker-footer {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
}

.map-module {
  padding: 12px;
}

.chip-row {
  margin-bottom: 12px;
}

.map-area {
  min-height: 296px;
}

.mini-result-map {
  min-height: 210px;
}

.range-circle {
  position: absolute;
  inset: 52px 58px 64px 48px;
  border-radius: 50%;
  border: 2px dashed rgba(18, 111, 90, 0.76);
  background: rgba(18, 111, 90, 0.08);
}

.map-pin {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.pin-one {
  top: 56px;
  left: 42px;
}

.pin-two {
  top: 92px;
  right: 28px;
}

.pin-three {
  bottom: 96px;
  left: 66px;
}

.pin-four {
  bottom: 70px;
  right: 78px;
}

.map-pin.personal {
  background: var(--green);
}

.floating-card {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  width: calc(100% - 24px);
  padding: 10px;
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: var(--radius-card);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
}

.thumb,
.avatar,
.gallery {
  background-size: cover;
  background-position: center;
}

.thumb {
  min-height: 78px;
  border-radius: 6px;
}

.gradient-one {
  background:
    linear-gradient(135deg, rgba(18, 111, 90, 0.38), transparent),
    linear-gradient(160deg, #d6f0e8, #dfe7ff 52%, #fff0df);
}

.gradient-two {
  background:
    linear-gradient(135deg, rgba(49, 92, 246, 0.26), transparent),
    linear-gradient(160deg, #e1e9ff, #d7f1e9 55%, #ffe7dc);
}

.gradient-three {
  background:
    linear-gradient(135deg, rgba(223, 103, 76, 0.26), transparent),
    linear-gradient(160deg, #fff1e8, #e6f5ef 55%, #e4ebff);
}

.sheet {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: #cbd5e1;
}

.listing {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  padding: 10px;
}

.listing + .listing,
.notice + .notice,
.setting + .setting {
  margin-top: 10px;
}

.tag.gold {
  color: #7a4b10;
  border-color: #f0d5a9;
  background: #fff7e8;
}

.tag.green {
  color: var(--brand-strong);
  border-color: #bfe3d8;
  background: #ecfdf5;
}

.tag.rose {
  color: var(--rose);
  border-color: #f4c6cc;
  background: #fff1f2;
}

.bottom-nav {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
  color: var(--muted);
  font-size: 0.8rem;
}

.bottom-nav a {
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-control);
}

.bottom-nav .is-current {
  color: #fff;
  background: var(--brand);
}

.section-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-card,
.notice,
.chart-card,
.modal-card,
.chat-box,
.compact-card {
  padding: 14px;
}

.search-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 6px 8px 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  color: var(--muted);
  background: #fff;
}

.search-bar button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-control);
  color: #fff;
  background: var(--brand);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.filter-chip {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--muted);
  background: #fff;
  font-size: 0.78rem;
}

.filter-chip.active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.result-preview {
  display: grid;
  gap: 10px;
}

.client-line,
.profile-strip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
}

.panel-menu {
  display: grid;
  gap: 8px;
}

.menu-item {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
}

.menu-item span {
  color: var(--brand);
  font-weight: 800;
}

.pill-grid span {
  background: var(--surface-soft);
}

.meter-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.meter {
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, white 52%, transparent 53%),
    conic-gradient(var(--green) 0 72%, #e5e7eb 72% 100%);
}

.meter span {
  font-size: 1.75rem;
  font-weight: 800;
}

.meter small {
  margin-top: -22px;
  color: var(--muted);
}

.notice.highlight {
  border-color: #bfe3d8;
  background: #effaf6;
}

.notice.dark,
.dark-card {
  color: #fff;
  border-color: #26364f;
  background: #152033;
}

.notice.dark p,
.notice.dark small,
.dark-card p {
  color: rgba(255, 255, 255, 0.76);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.kpi {
  padding: 14px;
}

.kpi span,
.property-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.kpi strong,
.property-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 1.45rem;
}

.kpi.accent {
  border-color: #bfe3d8;
  background: #effaf6;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 142px;
  margin-top: 14px;
}

.bars i {
  flex: 1;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #72d2b0, var(--brand));
}

.switch {
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  position: relative;
  border-radius: 999px;
  background: #cbd5e1;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: 160ms ease;
}

.switch.is-on {
  background: var(--green);
}

.switch.is-on::after {
  left: 23px;
}

.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.avatar {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(18, 111, 90, 0.34), transparent),
    linear-gradient(160deg, #d7f1e9, #e3e9ff 55%, #fff0df);
}

.avatar.small {
  width: 46px;
  height: 46px;
  border-radius: 12px;
}

.center {
  text-align: center;
}

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

.compact-card strong,
.compact-card small {
  display: block;
  margin-top: 8px;
}

.compact-card small {
  color: var(--muted);
}

.gallery {
  min-height: 260px;
  margin: -16px -14px 0;
}

.price {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.property-grid > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.broker-footer {
  align-items: center;
  margin-top: auto;
  padding: 10px;
}

.broker-footer button {
  margin-left: auto;
  padding: 0 12px;
  color: #fff;
  background: var(--brand);
}

.modal-card h4 {
  margin: 8px 0 12px;
}

.option-list,
.settings-group {
  display: grid;
  gap: 10px;
}

.option {
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border-color: var(--line);
}

.option.selected {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.field span {
  color: var(--muted);
  font-size: 0.9rem;
}

textarea {
  width: 100%;
  min-height: 112px;
  padding: 12px;
  resize: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fff;
}

.footer-actions {
  justify-content: space-between;
  margin-top: 14px;
}

.chat-box {
  display: grid;
  gap: 10px;
}

.bubble {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  line-height: 1.45;
}

.bubble.user {
  margin-left: auto;
  background: #edf2ff;
}

.bubble.assistant {
  background: #effaf6;
}

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

@media (max-width: 1040px) {
  .hero,
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .device-stage {
    order: 1;
  }

  .tab-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tab-button {
    text-align: center;
  }
}

@media (max-width: 720px) {
  .shell,
  .app-layout {
    width: min(100% - 20px, 100%);
    padding-top: 12px;
  }

  h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .hero-copy,
  .hero-side,
  .surface-card,
  .sidebar,
  .device-stage {
    padding: 16px;
  }

  .home-grid,
  .kpi-grid,
  .property-grid,
  .carousel-grid {
    grid-template-columns: 1fr;
  }

  .tab-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage-header {
    flex-direction: column;
  }

  .phone,
  .mini-phone {
    width: 100%;
    padding: 8px;
    border-radius: 24px;
  }

  .phone-body,
  .panel {
    min-height: 730px;
  }

  .meter-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .listing,
  .floating-card {
    grid-template-columns: 68px 1fr;
  }
}
