:root {
  color-scheme: light;
  --bg: #eef3f4;
  --ink: #10181d;
  --ink-2: #1e2c32;
  --muted: #60717a;
  --soft: #dce7e9;
  --line: rgba(16, 24, 29, 0.12);
  --panel: rgba(255, 255, 255, 0.84);
  --panel-solid: #ffffff;
  --panel-dark: #121c22;
  --aqua: #00a7a5;
  --green: #16815f;
  --lime: #a8c83a;
  --blue: #2f70ef;
  --violet: #684ce6;
  --coral: #e65b4f;
  --amber: #bb7a17;
  --radius: 8px;
  --shadow: 0 24px 70px rgba(25, 38, 45, 0.14);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--font);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(16, 24, 29, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(16, 24, 29, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 12% 12%, rgba(0, 167, 165, 0.16), transparent 27%),
    radial-gradient(circle at 90% 6%, rgba(104, 76, 230, 0.12), transparent 27%),
    var(--bg);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

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

img {
  display: block;
  max-width: 100%;
}

.boot-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: grid;
  align-content: start;
  gap: 18px;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: rgba(247, 250, 249, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 950;
  box-shadow: 0 14px 36px rgba(16, 24, 29, 0.18);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.12rem;
  line-height: 1;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.side-nav {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.side-nav a,
.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 900;
}

.side-nav a:hover,
.side-nav a.active,
.mobile-nav a.active {
  border-color: var(--line);
  background: var(--panel-solid);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(25, 38, 45, 0.08);
}

.nav-ico {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
}

.nav-ico::before,
.search-ico::before,
.save-button::before,
.icon-button::before,
.metric-icon::before {
  content: "";
  display: block;
  background: currentColor;
}

.ico-home::before {
  width: 15px;
  height: 13px;
  clip-path: polygon(50% 0, 100% 44%, 100% 100%, 62% 100%, 62% 64%, 38% 64%, 38% 100%, 0 100%, 0 44%);
}

.ico-radar::before {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: transparent;
}

.ico-products::before {
  width: 15px;
  height: 15px;
  border-radius: 4px;
}

.ico-estate::before {
  width: 16px;
  height: 14px;
  clip-path: polygon(0 35%, 50% 0, 100% 35%, 88% 35%, 88% 100%, 12% 100%, 12% 35%);
}

.ico-plus::before {
  width: 16px;
  height: 16px;
  clip-path: polygon(43% 0, 57% 0, 57% 43%, 100% 43%, 100% 57%, 57% 57%, 57% 100%, 43% 100%, 43% 57%, 0 57%, 0 43%, 43% 43%);
}

.ico-heart::before,
.save-button::before {
  width: 17px;
  height: 15px;
  clip-path: path("M8.5 15 C3 10.5 0 7.5 0 4 C0 1.7 1.6 0 3.7 0 C5.1 0 6.5 .8 7.3 2 C8.1 .8 9.5 0 10.9 0 C13 0 14.6 1.7 14.6 4 C14.6 7.5 11.6 10.5 6.1 15 Z");
}

.side-card,
.panel,
.hero,
.stat,
.command-card,
.listing-card,
.search-shell,
.toolbar,
.mini-panel,
.detail-panel,
.form-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 38px rgba(25, 38, 45, 0.08);
}

.side-card {
  padding: 14px;
}

.ai-status {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 12px;
}

.pulse {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--aqua);
  box-shadow: 0 0 0 7px rgba(0, 167, 165, 0.12);
}

.side-card strong,
.side-card small {
  display: block;
}

.side-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.side-title,
.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: uppercase;
}

.radar-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.radar-list a {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 900;
}

.radar-list span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(280px, 720px) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 243, 244, 0.78);
  backdrop-filter: blur(18px);
}

.search-shell {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 6px 8px 6px 16px;
}

.search-ico {
  position: relative;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: var(--muted);
}

.search-ico::before {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: transparent;
}

.search-ico::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  margin: 12px 0 0 12px;
  background: currentColor;
  transform: rotate(45deg);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 130px;
  padding: 14px;
  resize: vertical;
  line-height: 1.45;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(0, 167, 165, 0.72);
  box-shadow: 0 0 0 4px rgba(0, 167, 165, 0.14);
}

.primary-button,
.ghost-button,
.icon-button,
.search-shell button,
.chip,
.save-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.primary-button,
.search-shell button {
  padding: 0 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(16, 24, 29, 0.18);
}

.ghost-button,
.chip {
  padding: 0 14px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-weight: 900;
}

.icon-button,
.save-button {
  display: grid;
  width: 42px;
  place-items: center;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
}

.primary-button:hover,
.ghost-button:hover,
.icon-button:hover,
.search-shell button:hover,
.chip:hover,
.save-button:hover {
  transform: translateY(-1px);
}

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

.save-button.saved {
  border-color: rgba(230, 91, 79, 0.42);
  background: rgba(230, 91, 79, 0.12);
  color: var(--coral);
}

.top-actions {
  display: inline-flex;
  justify-content: end;
  gap: 8px;
}

.canvas {
  display: grid;
  gap: 18px;
  width: min(1510px, calc(100% - 48px));
  margin: 24px auto 46px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.64fr);
  gap: 24px;
  align-items: stretch;
  padding: 26px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0, 167, 165, 0.17), transparent 39%),
    linear-gradient(315deg, rgba(104, 76, 230, 0.12), transparent 35%),
    rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.hero-main {
  display: grid;
  align-content: center;
  gap: 18px;
  min-width: 0;
  min-height: 330px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(2.2rem, 4.8vw, 4.35rem);
  line-height: 0.98;
}

h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.18;
}

h3 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.25;
}

.hero-copy {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

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

.stat {
  display: grid;
  gap: 4px;
  min-height: 76px;
  align-content: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.66);
}

.stat strong {
  font-size: 1.35rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.8rem;
}

.command-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  background: rgba(16, 24, 29, 0.94);
  color: #fff;
  box-shadow: 0 24px 70px rgba(16, 24, 29, 0.22);
}

.command-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.command-orb,
.metric-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,255,255,0.28), transparent), var(--aqua);
}

.command-head strong,
.command-head small {
  display: block;
}

.command-head small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.72);
}

.command-card textarea {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.command-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.command-card .primary-button {
  background: #fff;
  color: var(--ink);
}

.command-card .ghost-button {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

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

.insight {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.insight p,
.listing-card p,
.mini-panel p,
.detail-panel p,
.form-help,
.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 18px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.section-head h2 {
  margin-top: 6px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  margin-bottom: 16px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.card-grid {
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.listing-card {
  display: grid;
  overflow: hidden;
  background: var(--panel-solid);
}

.listing-card.featured {
  grid-column: span 2;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1fr);
}

.media {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  background: #e4ecec;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.listing-card:hover img {
  transform: scale(1.035);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(16, 24, 29, 0.78);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 950;
}

.media .badge {
  position: absolute;
  left: 12px;
  top: 12px;
}

.badge.partner {
  background: rgba(47, 112, 239, 0.9);
}

.badge.user {
  background: rgba(22, 129, 95, 0.92);
}

.badge.estate {
  background: rgba(230, 91, 79, 0.92);
}

.card-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.card-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 10px;
}

.price-row,
.tag-row,
.detail-actions,
.mini-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.price {
  font-size: 1.24rem;
  font-weight: 950;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4f3;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.score {
  color: var(--green);
}

.aside-stack {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
}

.mini-panel {
  padding: 16px;
}

.mini-panel h3 {
  margin-top: 8px;
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eeed;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--green));
}

.split-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1fr);
  gap: 18px;
}

.detail-image {
  min-height: 430px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #e4ecec;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

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

.spec {
  display: grid;
  gap: 4px;
  min-height: 66px;
  align-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
}

.spec span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.spec strong {
  font-size: 0.98rem;
}

.form-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.preview-card {
  min-height: 240px;
  border: 1px dashed rgba(16, 24, 29, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.52);
  padding: 16px;
}

.empty-state {
  display: grid;
  gap: 12px;
  min-height: 260px;
  place-items: center;
  padding: 28px;
  text-align: center;
}

.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mobile-nav {
  display: none;
}

@container (max-width: 620px) {
  .listing-card.featured {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .sidebar {
    padding: 18px 12px;
  }

  .brand {
    justify-content: center;
  }

  .brand span:last-child,
  .side-nav a {
    font-size: 0;
  }

  .side-nav a {
    justify-content: center;
    padding: 0;
  }

  .side-card {
    display: none;
  }

  .work-grid,
  .split-page {
    grid-template-columns: 1fr;
  }

  .aside-stack {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  body {
    padding-bottom: 80px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .top-actions {
    justify-content: start;
    overflow-x: auto;
  }

  .search-shell {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .search-shell input {
    min-width: 0;
    text-overflow: ellipsis;
  }

  .search-shell button {
    grid-column: 1 / -1;
  }

  .canvas {
    width: calc(100% - 24px);
    max-width: 720px;
    margin-top: 14px;
  }

  .hero,
  .detail-hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .hero-main {
    min-height: auto;
  }

  .stat-grid,
  .insights,
  .toolbar,
  .spec-grid,
  .form-grid,
  .account-grid,
  .aside-stack {
    grid-template-columns: 1fr;
  }

  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .command-actions,
  .card-title-row {
    grid-template-columns: 1fr;
  }

  .save-button {
    width: 100%;
  }

  .mobile-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(247, 250, 249, 0.92);
    box-shadow: 0 18px 44px rgba(25, 38, 45, 0.18);
    backdrop-filter: blur(18px);
  }

  .mobile-nav a {
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    padding: 0;
    font-size: 0.66rem;
  }
}

@media (max-width: 520px) {
  .canvas {
    width: calc(100% - 20px);
  }

  .hero,
  .panel,
  .form-card,
  .detail-panel {
    padding: 14px;
  }

  .toolbar {
    padding: 10px;
  }

  .chips {
    margin-inline: -2px;
    padding-bottom: 2px;
  }

  .media {
    min-height: 210px;
  }

  .detail-image {
    min-height: 300px;
  }
}
