:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --line: #dbe3df;
  --line-strong: #bdcbc5;
  --text: #111917;
  --muted: #61706a;
  --teal: #0f766e;
  --teal-dark: #0b5e58;
  --amber: #b7791f;
  --red: #b42318;
  --green: #18794e;
  --shadow: 0 18px 45px rgba(20, 39, 34, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 650;
}

button:hover {
  border-color: var(--teal);
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--text);
}

input[type="file"] {
  min-height: auto;
  padding: 10px;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.brand-row,
.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-row h1 {
  margin: 0;
  font-size: 24px;
}

.brand-row p {
  margin: 2px 0 0;
  color: var(--muted);
}

.brand-row.compact {
  font-size: 17px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.brand-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.brand-row.compact .brand-logo {
  width: 32px;
  height: 32px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), transparent 38%),
    var(--bg);
}

.login-panel {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.login-form button,
.data-form button[type="submit"],
#newPropertyButton,
#generatePostButton {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.form-error {
  margin: 0;
  color: var(--red);
  font-weight: 700;
}

.language-toggle {
  min-height: 34px;
  padding: 6px 10px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

.login-panel > .language-toggle {
  width: auto;
  margin-top: 18px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  background: #101817;
  color: #eef6f3;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  justify-content: flex-start;
  border-color: transparent;
  background: transparent;
  color: #c4d4ce;
  text-align: left;
  padding: 10px 12px;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-foot {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.sidebar-foot a,
.sidebar-foot button {
  color: #dce8e4;
}

.sidebar-foot button:not(.language-toggle) {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #eef6f3;
}

.sidebar-foot .language-toggle {
  color: #101817;
}

.sidebar-foot a {
  text-decoration: none;
  font-size: 14px;
}

.workspace {
  min-width: 0;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.topbar h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
}

.topbar-actions {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto auto auto;
  gap: 10px;
  align-items: center;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.metric-card {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.metric-card:hover,
.metric-card:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}

.metric-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.view-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.view-grid.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.property-list-view {
  display: grid;
  gap: 16px;
}

.main-panel,
.detail-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.main-panel {
  overflow: hidden;
}

.detail-panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-panel .panel-head,
.modal .panel-head {
  padding: 0 0 14px;
}

.panel-head h2,
.detail-panel h2 {
  margin: 0;
  font-size: 16px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-actions select {
  width: min(240px, 42vw);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1160px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

td:first-child strong {
  white-space: nowrap;
}

th:last-child,
td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: -10px 0 18px rgba(20, 39, 34, 0.06);
}

tr:hover,
tr.selected {
  background: var(--surface-2);
}

tr:hover td:last-child,
tr.selected td:last-child {
  background: var(--surface-2);
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.property-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.thumb {
  width: 52px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.muted {
  color: var(--muted);
}

.source-cell {
  display: grid;
  gap: 3px;
  min-width: 170px;
}

.source-cell strong,
.source-cell span {
  overflow-wrap: anywhere;
}

.source-cell span {
  color: var(--muted);
  font-size: 12px;
}

.detail-description {
  white-space: pre-line;
}

.property-description {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.property-description h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
}

.description-lead {
  display: grid;
  gap: 6px;
  padding-left: 14px;
  border-left: 4px solid var(--teal);
  color: #31423c;
  font-size: 16px;
  line-height: 1.45;
}

.description-lead p,
.description-section p {
  margin: 0;
}

.description-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.description-facts div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.description-facts div:nth-child(-n + 2) {
  border-top: 0;
}

.description-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.description-facts dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
}

.description-section {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.description-section h3 {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-size: 16px;
  line-height: 1.25;
}

.description-section p {
  margin: 0 0 8px;
  line-height: 1.45;
}

.description-section ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.description-section li {
  position: relative;
  padding-left: 16px;
  color: #24332f;
  line-height: 1.35;
}

.description-section li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf4f2;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status.pending_review {
  background: #fff5df;
  color: var(--amber);
}

.status.draft,
.status.unlisted {
  background: #eef1f0;
  color: var(--muted);
}

.status.rented,
.status.sold {
  background: #eef8f3;
  color: var(--green);
}

.detail-hero {
  display: grid;
  gap: 12px;
}

.detail-hero img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.media-preview-grid,
.property-video-grid {
  display: grid;
  gap: 10px;
}

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

.media-preview-grid img,
.media-preview-grid video,
.property-video-grid video {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
}

.media-preview-grid img,
.media-preview-grid video {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.detail-title {
  margin: 0;
  font-size: 20px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
}

.detail-meta span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.detail-info-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.detail-info-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-info-grid strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.detail-actions button,
.detail-actions a {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 230px;
}

.compact-actions {
  min-width: 80px;
}

.row-actions button {
  min-height: 32px;
  padding: 5px 10px;
  white-space: nowrap;
}

.row-actions button[data-view-property],
.row-actions button[data-edit-property],
.detail-actions button[data-edit-property] {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.quick-status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 112px;
  font-size: 11px;
}

.quick-status span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.quick-status select {
  width: 112px;
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 750;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination-controls button {
  min-height: 32px;
  padding: 5px 10px;
}

.pagination-controls strong {
  color: var(--text);
  font-size: 13px;
}

.users-table {
  min-width: 820px;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #edf4f2;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.stack-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.list-item {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-2);
}

.list-item strong {
  font-size: 15px;
}

.list-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.list-actions button {
  min-width: 92px;
  min-height: 34px;
  padding: 5px 10px;
  border-color: var(--teal);
  color: var(--teal-dark);
}

.telegram-copy {
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfc;
  color: #26322f;
  font-size: 13px;
}

.data-form {
  display: grid;
  gap: 12px;
}

.form-section-title {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.check-row input {
  width: 16px;
  min-height: 16px;
}

.permission-matrix {
  display: grid;
  gap: 10px;
}

.permission-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-2);
}

.permission-group h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.permission-group > div {
  display: grid;
  gap: 6px;
}

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

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

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 240px;
  color: var(--muted);
  text-align: center;
}

.modal {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.detail-modal {
  width: min(860px, calc(100vw - 32px));
}

.modal::backdrop {
  background: rgba(6, 17, 14, 0.45);
}

.site-body {
  background: var(--bg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(16px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.site-brand,
.site-header a {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-header nav a {
  color: var(--muted);
  font-size: 14px;
}

.site-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
  gap: clamp(22px, 3vw, 42px);
  align-items: center;
  max-width: 1500px;
  margin: 0 auto;
  padding: 42px clamp(18px, 4vw, 54px) 16px;
}

.site-hero > * {
  min-width: 0;
}

.site-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: normal;
}

.site-hero p {
  max-width: 650px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.hero-copy {
  min-width: 0;
  padding-top: 0;
}

.hero-panel {
  display: grid;
  width: min(100%, 500px);
  min-width: 0;
  justify-self: end;
}

.hero-action-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(20, 39, 34, 0.08);
}

.hero-showcase {
  display: none;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  min-height: 260px;
}

.hero-photo-main,
.hero-photo-stack {
  min-width: 0;
}

.hero-photo-main {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eaf1ee;
  box-shadow: var(--shadow);
}

.hero-photo-main img,
.hero-photo-stack img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo-main span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(16, 24, 23, 0.82);
  color: #f5fbf8;
  font-size: 12px;
  font-weight: 850;
}

.hero-photo-stack {
  display: grid;
  gap: 10px;
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.hero-photo-stack img {
  aspect-ratio: 1 / 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eaf1ee;
  box-shadow: 0 10px 24px rgba(20, 39, 34, 0.07);
}

.site-filter {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-action-card .site-filter {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.wechat-quick-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(20, 39, 34, 0.06);
}

.hero-action-card .wechat-quick-card {
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 10px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 0 0;
  background: transparent;
  box-shadow: none;
}

.hero-action-card .wechat-quick-card img {
  width: 76px;
  height: 76px;
}

.contact-quick-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 14px 0 0;
}

.contact-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.contact-copy strong {
  color: var(--teal-dark);
  font-size: 16px;
  line-height: 1.1;
}

.contact-phone {
  color: var(--teal-dark);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.contact-qr {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.contact-qr img {
  display: block;
  width: 82px;
  height: 82px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.contact-qr span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.wechat-quick-card strong,
.wechat-contact-card strong {
  color: var(--teal-dark);
  font-size: 16px;
  line-height: 1.15;
}

.wechat-quick-card > div {
  min-width: 0;
}

.wechat-quick-card span,
.wechat-contact-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.wechat-quick-card img {
  display: block;
  width: 84px;
  height: 84px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.quick-categories,
.market-intro,
.listings-head {
  margin-inline: clamp(16px, 5vw, 64px);
}

.quick-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0 14px;
}

.hero-copy .quick-categories {
  margin: 28px 0 0;
  padding: 0;
}

.hero-copy .market-intro {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 0;
}

.quick-categories button {
  min-height: 38px;
  border-radius: 999px;
  padding: 8px 18px;
  background: var(--surface);
  color: var(--text);
  font-weight: 850;
}

.quick-categories button.active,
.quick-categories button:hover {
  border-color: var(--teal);
  background: #edf7f4;
  color: var(--teal-dark);
}

.market-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
  margin-bottom: 20px;
}

.market-intro article {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--surface);
}

.market-intro strong {
  color: var(--teal-dark);
  font-size: 22px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.market-intro span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.listings-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.listings-head > div {
  min-width: 0;
}

.listings-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.listings-head p {
  max-width: 560px;
  margin: 7px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.listings-head button {
  flex: 0 0 auto;
  min-height: 36px;
  border-color: var(--teal);
  color: var(--teal-dark);
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 14px clamp(16px, 5vw, 64px) 56px;
}

.property-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.property-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  background: #f3f7f5;
  border-bottom: 1px solid var(--line);
}

.property-card-body {
  display: grid;
  gap: 9px;
  padding: 15px;
}

.property-card h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.property-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.property-card .property-updated {
  color: #75857f;
  font-size: 12px;
  font-weight: 750;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.price {
  color: var(--teal-dark);
  font-size: 18px;
  font-weight: 850;
}

.property-page {
  padding: 16px clamp(16px, 5vw, 64px) 56px;
}

.property-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}

.property-main,
.contact-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.property-main img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #f3f7f5;
  border-bottom: 1px solid var(--line);
}

.property-media-grid,
.property-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.property-media-grid:empty,
.property-video-grid:empty {
  display: none;
}

.property-media-grid img,
.property-media-grid video,
.property-video-grid video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f7f5;
}

.media-card {
  display: grid;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f7f5;
}

.media-card img,
.media-card video {
  border: 0;
  border-radius: 0;
}

.property-content {
  padding: 20px;
}

.property-content h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
}

.contact-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.contact-panel a {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.wechat-contact-card {
  display: grid;
  justify-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
  text-align: center;
}

.wechat-contact-card img {
  display: block;
  width: min(210px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.contact-panel .phone-action {
  background: #101817;
  color: #f7c86d;
}

.contact-panel .telegram-action {
  background: var(--teal);
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .view-grid,
  .site-hero,
  .property-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .metric-strip,
  .property-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 9px;
    padding: 11px 18px 12px;
  }

  .site-brand {
    gap: 10px;
    min-width: 0;
    font-size: 20px;
    line-height: 1;
  }

  .site-brand span {
    white-space: nowrap;
  }

  .site-header .brand-logo {
    width: 40px;
    height: 40px;
  }

  .site-header nav {
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .site-header nav::-webkit-scrollbar {
    display: none;
  }

  .site-header nav a,
  .site-header .language-toggle {
    flex: 0 0 auto;
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 11px;
    background: var(--surface);
    color: #54645f;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
  }

  .site-header .language-toggle {
    color: var(--teal-dark);
  }

  .site-hero {
    gap: 16px;
    padding: 28px 18px 16px;
  }

  .site-hero h1 {
    max-width: 560px;
    font-size: 40px;
    line-height: 1.08;
  }

  .hero-copy {
    display: contents;
    padding-top: 0;
  }

  .site-hero h1 {
    order: 1;
  }

  .site-hero p {
    order: 2;
    max-width: 560px;
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.48;
  }

  .hero-panel {
    order: 3;
    width: 100%;
    justify-self: stretch;
  }

  .hero-action-card {
    gap: 10px;
    padding: 12px;
  }

  .contact-quick-card {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 10px;
    padding-top: 12px;
  }

  .contact-phone {
    font-size: 24px;
  }

  .contact-qr img {
    width: 76px;
    height: 76px;
  }

  .wechat-quick-card {
    grid-template-columns: minmax(0, 1fr) 76px;
    padding: 10px;
  }

  .wechat-quick-card img {
    width: 76px;
    height: 76px;
  }

  .hero-copy .quick-categories {
    order: 4;
    margin: 0;
  }

  .hero-copy .market-intro {
    order: 5;
    margin: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-showcase {
    grid-template-columns: minmax(0, 1fr) 76px;
    min-height: 220px;
  }

  .site-filter {
    gap: 8px;
    padding: 12px;
    box-shadow: 0 12px 28px rgba(20, 39, 34, 0.06);
  }

  .hero-action-card .site-filter {
    padding: 0;
    box-shadow: none;
  }

  .site-filter input,
  .site-filter select {
    min-height: 44px;
    padding: 9px 12px;
    font-size: 15px;
  }

  .property-grid {
    gap: 14px;
    padding: 12px 18px 48px;
  }

  .quick-categories,
  .market-intro,
  .listings-head {
    margin-inline: 18px;
  }

  .quick-categories {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 12px;
    scrollbar-width: none;
  }

  .quick-categories::-webkit-scrollbar {
    display: none;
  }

  .quick-categories button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 13px;
    font-size: 13px;
  }

  .listings-head {
    align-items: flex-start;
  }

  .listings-head h2 {
    font-size: 23px;
  }

  .property-card {
    box-shadow: 0 12px 28px rgba(20, 39, 34, 0.06);
  }

  .property-card-body {
    gap: 7px;
    padding: 13px;
  }

  .property-card h2 {
    font-size: 16px;
  }

}

@media (max-width: 720px) {
  .workspace {
    padding: 14px;
  }

  .sidebar {
    gap: 14px;
    padding: 14px;
  }

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

  .nav-item {
    text-align: center;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-actions select {
    width: 100%;
  }

  .sidebar-foot {
    grid-template-columns: 1fr 1fr;
  }

  .sidebar-foot a {
    align-self: center;
  }

  .topbar {
    display: grid;
  }

  .topbar-actions,
  .property-grid,
  .media-preview-grid,
  .property-media-grid,
  .description-facts,
  .detail-info-grid,
  .form-grid,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .description-facts div:nth-child(-n + 2) {
    border-top: 1px solid var(--line);
  }

  .description-facts div:first-child {
    border-top: 0;
  }

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

  .metric-card {
    padding: 12px;
  }

  .metric-strip strong {
    font-size: 24px;
  }

  .row-actions,
  .pagination-bar,
  .pagination-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .table-wrap {
    overflow-x: visible;
  }

  table,
  .users-table {
    min-width: 0;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  tr {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--surface);
  }

  th:last-child,
  td:last-child {
    position: static;
    box-shadow: none;
  }

  td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 0;
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
  }

  td[colspan]::before {
    content: "";
    display: none;
  }

  td:last-child {
    grid-template-columns: 1fr;
  }

  .property-cell {
    align-items: flex-start;
  }

  .thumb {
    width: 64px;
    height: 48px;
  }

  .row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
  }

  .row-actions button {
    min-height: 40px;
  }

  .row-actions .quick-status {
    grid-column: 1 / -1;
  }

  .list-actions {
    justify-content: stretch;
  }

  .list-actions button {
    width: 100%;
    min-height: 40px;
  }

  .quick-status {
    width: 100%;
  }

  .quick-status select {
    width: 100%;
    min-height: 40px;
  }

  .site-header {
    gap: 8px;
    padding: 9px 12px 10px;
  }

  .site-brand {
    gap: 8px;
    font-size: 18px;
  }

  .site-header .brand-logo {
    width: 34px;
    height: 34px;
  }

  .site-header nav {
    gap: 6px;
    flex-wrap: nowrap;
  }

  .site-header nav a,
  .site-header .language-toggle {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
  }

  .site-hero {
    gap: 14px;
    padding: 20px 14px 12px;
  }

  .site-hero h1 {
    max-width: 400px;
    font-size: 31px;
    line-height: 1.08;
  }

  .site-hero p {
    max-width: 400px;
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.45;
  }

  .site-filter {
    gap: 8px;
    padding: 10px;
  }

  .wechat-quick-card strong {
    font-size: 15px;
  }

  .contact-quick-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
  }

  .contact-copy {
    grid-column: 2;
    grid-row: 1;
  }

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

  .contact-phone {
    font-size: 22px;
  }

  .contact-qr {
    grid-column: 1;
    grid-row: 1;
  }

  .contact-qr img {
    width: 64px;
    height: 64px;
  }

  .wechat-quick-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
  }

  .hero-action-card .wechat-quick-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .wechat-quick-card > div {
    grid-column: 2;
    grid-row: 1;
  }

  .wechat-quick-card img {
    grid-column: 1;
    grid-row: 1;
    width: 64px;
    height: 64px;
  }

  .hero-action-card .wechat-quick-card img {
    width: 64px;
    height: 64px;
  }

  .wechat-contact-card img {
    width: min(190px, 100%);
  }

  .site-filter input,
  .site-filter select {
    min-height: 42px;
    padding: 8px 10px;
  }

  .hero-showcase {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-photo-main {
    aspect-ratio: 4 / 3;
  }

  .hero-photo-stack {
    display: none;
  }

  .quick-categories,
  .market-intro,
  .listings-head {
    margin-inline: 14px;
  }

  .market-intro {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
  }

  .market-intro article {
    padding: 10px;
  }

  .market-intro strong {
    font-size: 18px;
  }

  .listings-head {
    display: grid;
    gap: 10px;
  }

  .listings-head button {
    width: 100%;
  }

  .card-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}
