:root {
  --bg: #f7f4ef;
  --ink: #17201b;
  --muted: #69736d;
  --line: #ddd7ce;
  --panel: #fffdf8;
  --brand: #1d6b5d;
  --accent: #c87941;
  --danger: #b42318;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Tahoma, sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.topbar {
  align-items: center;
  background: rgba(255, 253, 248, 0.95);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px clamp(14px, 4vw, 44px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ink);
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
}
.mark {
  align-items: center;
  background: var(--brand);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}
nav { display: flex; flex-wrap: wrap; gap: 8px; }
nav button, .button {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  min-height: 40px;
  padding: 9px 12px;
}
.button.primary, nav button.active { background: var(--brand); border-color: var(--brand); color: white; }
.button.danger { color: var(--danger); }
.main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 24px clamp(14px, 4vw, 44px) 48px;
}
.toolbar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, 190px)) auto;
  margin-bottom: 22px;
}
.field { display: grid; gap: 6px; }
.field label { color: var(--muted); font-size: 13px; font-weight: 700; }
.field input, .field select {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 12px;
}
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card, .panel, .stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(42, 35, 26, 0.08);
}
.card { overflow: hidden; }
.property-image {
  aspect-ratio: 16 / 11;
  object-fit: cover;
  width: 100%;
}
.card-body { display: grid; gap: 12px; padding: 14px; }
.title-row {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
h1, h2, h3, p { margin-top: 0; }
.muted { color: var(--muted); }
.badge-row, .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  background: #e9f2ee;
  border-radius: 999px;
  color: #114a41;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
}
.warn { background: #fff1d9; color: #8a4b13; }
.panel { padding: 18px; }
.detail { display: grid; gap: 22px; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr); }
.gallery { display: grid; gap: 10px; grid-template-columns: 2fr 1fr; }
.gallery img { aspect-ratio: 16 / 10; border-radius: 8px; object-fit: cover; width: 100%; }
.gallery img:first-child { grid-row: span 2; }
.map {
  background: linear-gradient(135deg, #d9ebe4, #f6e0c6);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 170px;
  padding: 18px;
}
.stats, .admin-layout { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.admin-layout { grid-template-columns: 1fr 1fr; }
.stat { padding: 14px; }
.stat strong { display: block; font-size: 28px; }
.row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  margin-top: 10px;
  padding: 12px;
}
.empty {
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 28px;
  text-align: center;
}
[dir="rtl"] .topbar, [dir="rtl"] .title-row { direction: rtl; }
@media (max-width: 860px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .toolbar, .grid, .detail, .stats, .admin-layout { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
}
