:root {
  --red: #8E2A20;
  --red-light: #C0392B;
  --bg: #F5F5F5;
  --text: #222;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Tahoma, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; }

.navbar { background: var(--red); color: #fff; position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1000px; margin: auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.logo { font-size: 20px; font-weight: bold; text-decoration: none; color: #fff; }
.logo span { color: #FFD9CC; }
.nav-auth { display: flex; gap: 8px; }
.btn-login, .btn-register { background: rgba(255,255,255,.15); color: #fff; border: none; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn-register { background: #fff; color: var(--red); font-weight: bold; }

.container { max-width: 1000px; margin: auto; padding: 0 16px; }

.filters-bar { background: #fff; border-radius: 12px; padding: 14px; margin: 16px 0; display: flex; gap: 10px; flex-wrap: wrap; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.filters-bar select, .filters-bar input { padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; font-family: inherit; }

.property-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 16px 0; }
.property-card-mini { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); text-decoration: none; color: inherit; display: block; transition: transform .15s; }
.property-card-mini:hover { transform: translateY(-2px); }
.property-card-mini .thumb { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.property-card-mini .thumb-placeholder { width: 100%; aspect-ratio: 4/3; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
.property-card-mini .body { padding: 12px; }
.property-card-mini .price { font-weight: bold; color: var(--red); font-size: 17px; }
.property-card-mini .title { font-size: 14px; margin: 4px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.property-card-mini .meta { font-size: 12px; color: #888; display: flex; gap: 8px; flex-wrap: wrap; }

.type-badge { display: inline-block; color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; }
.price-tag { font-size: 26px; font-weight: bold; color: var(--red); margin: 8px 0; }
.property-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: #555; padding: 10px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; margin: 10px 0; }
.property-card { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.property-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 6px; }
.property-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; }

.fab-add { position: fixed; bottom: 24px; left: 24px; background: var(--red); color: #fff; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: 0 2px 10px rgba(0,0,0,.25); border: none; cursor: pointer; z-index: 90; }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 20px; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; }
.fg { margin-bottom: 12px; }
.fg label { display: block; font-size: 13px; margin-bottom: 4px; color: #555; }
.fg input, .fg select, .fg textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-family: inherit; font-size: 14px; }
.fg textarea { min-height: 90px; resize: vertical; }
.two-col { display: flex; gap: 10px; }
.two-col .fg { flex: 1; }
.btn-full { width: 100%; padding: 12px; background: var(--red); color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: bold; cursor: pointer; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(100px); background: #222; color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 14px; z-index: 2000; transition: transform .3s; }
.toast.show { transform: translateX(-50%) translateY(0); }

.empty { text-align: center; padding: 3rem 1rem; color: #999; }
.empty i { font-size: 40px; display: block; margin-bottom: 10px; }

@media (max-width: 600px) {
  .property-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
