.site-nav, .auth-links, .nav-actions, .acts { display: flex; align-items: center; gap: 9px; }
.site-nav a, .auth-links a {
  color: var(--muted, #6b6455);
  font-weight: 600;
  padding: 6px 9px;
  border-radius: 9px;
  text-decoration: none;
}
.site-nav a:hover, .auth-links a:hover { background: var(--bg2, #fff8e1); color: var(--ink, #1c1a14); }
.account-name { font-weight: 700; color: var(--ink, #1c1a14); }
.auth-logout, .logout-button {
  border: 1px solid var(--line, #f1e5bd);
  border-radius: 10px;
  padding: 6px 11px;
  background: transparent;
  color: var(--ink, #1c1a14);
  cursor: pointer;
  font: inherit;
}
.public-content {
  max-width: 1000px;
  margin: 20px auto 64px;
  padding: 28px clamp(16px, 5vw, 40px);
}
.public-content h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.public-item {
  margin: 14px 0;
  padding: 20px;
  border: 1px solid var(--line, #f1e5bd);
  border-radius: 18px;
  background: var(--bg2, #fff8e1);
}
.public-item h3 { margin: 0 0 8px; }
.public-item p { margin: 0; white-space: pre-wrap; }
.auth-page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.auth-header {
  position: sticky;
  top: 0;
  z-index: 4;
  border-bottom: 1px solid var(--line, #f1e5bd);
  background: var(--bg, #fff);
}
.auth-nav {
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.auth-brand { font-size: 1.15rem; font-weight: 800; text-decoration: none; }
.auth-card {
  width: min(460px, calc(100% - 32px));
  align-self: start;
  margin: 58px auto;
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid var(--line, #f1e5bd);
  border-radius: 24px;
  background: var(--surface, #fff);
  box-shadow: var(--shadow, 0 16px 38px rgba(44, 35, 12, .08));
}
.auth-card h1 { margin: 0 0 8px; font-size: 2rem; }
.auth-description { margin: 0 0 22px; color: var(--muted, #6b6455); }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 6px; font-weight: 600; }
.auth-form input, .auth-form textarea, .auth-form select, .admin-search {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line, #f1e5bd);
  border-radius: 10px;
  background: var(--bg, #fff);
  color: var(--ink, #1c1a14);
  font: inherit;
}
.auth-form textarea { min-height: 110px; resize: vertical; }
.auth-button {
  min-height: 46px;
  border: 0;
  border-radius: 11px;
  padding: 9px 16px;
  background: var(--y, #ffc107);
  color: #1c1a14;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.auth-button:disabled { opacity: .6; cursor: wait; }
.auth-message { min-height: 1.6em; margin: 0; font-weight: 600; }
.auth-message[data-kind="error"] { color: #b42318; }
.auth-message[data-kind="success"] { color: #18794e; }
.auth-note { font-size: .9rem; color: var(--muted, #6b6455); }
.admin-page { padding: 30px 0 60px; }
.admin-layout { display: grid; gap: 24px; }
.admin-panel {
  padding: 22px;
  border: 1px solid var(--line, #f1e5bd);
  border-radius: 18px;
  background: var(--surface, #fff);
  box-shadow: var(--shadow, 0 16px 38px rgba(44, 35, 12, .08));
}
.admin-panel h1, .admin-panel h2 { margin-top: 0; }
.admin-users { display: grid; gap: 10px; padding: 0; list-style: none; }
.admin-user, .admin-content-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line, #f1e5bd);
  border-radius: 12px;
}
.admin-user small { display: block; color: var(--muted, #6b6455); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-actions button, .admin-content-row button {
  border: 1px solid var(--line, #f1e5bd);
  border-radius: 9px;
  padding: 6px 10px;
  background: var(--bg, #fff);
  color: var(--ink, #1c1a14);
  cursor: pointer;
  font: inherit;
}
.admin-actions button.primary { background: var(--y, #ffc107); color: #1c1a14; border-color: var(--y, #ffc107); }
.content-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.content-editor .full { grid-column: 1 / -1; }
.admin-content-list { display: grid; gap: 10px; margin-top: 20px; }
.account-page { padding: 34px 0 70px; }
.account-summary {
  margin-bottom: 28px;
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid var(--line, #f1e5bd);
  border-radius: 22px;
  background: var(--soft, #fff4d1);
}
.account-summary h1 { margin: 8px 0 18px; font-size: clamp(1.8rem, 5vw, 2.8rem); }
.account-stats { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.account-stats p { margin: 0; }
.history-section { margin: 24px 0; }
.history-section h2 { font-size: 1.5rem; }
.history-list { display: grid; gap: 12px; }
.history-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line, #f1e5bd);
  border-radius: 15px;
  background: var(--surface, #fff);
}
.history-card img { width: 120px; height: 90px; flex: 0 0 120px; object-fit: contain; border-radius: 10px; background: var(--soft, #fff4d1); }
.history-card h3, .history-card p { margin: 0 0 5px; }
.history-card small { color: var(--muted, #6b6455); }
.admin-toggle { display: flex !important; align-items: center; gap: 8px !important; font-weight: 700; }
.admin-toggle input { width: 20px; height: 20px; accent-color: var(--y, #ffc107); }
.user-admin-actions { align-items: center; }
.admin-history { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line, #f1e5bd); }
.property-admin-section { margin-top: 24px; scroll-margin-top: 88px; }
.property-form { max-width: 760px; }
.property-form label textarea { min-height: 82px; }
.property-form .inline-check { display: flex; align-items: center; gap: 9px; }
.property-form .inline-check input { width: 18px; height: 18px; accent-color: var(--y, #ffc107); }
.admin-properties { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; margin-top: 20px; }
.admin-property-card, .public-property-card {
  overflow: hidden;
  border: 1px solid var(--line, #f1e5bd);
  border-radius: 15px;
  background: var(--surface, #fff);
}
.property-image-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  background: var(--soft, #fff4d1);
}
.property-gallery-frame {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line, #f1e5bd);
  border-radius: 9px;
  background: var(--surface, #fff);
  text-align: center;
}
.property-gallery-frame img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: contain;
  background: var(--soft, #fff4d1);
}
.property-gallery-frame figcaption { padding: 2px 6px; color: var(--muted, #6b6455); font-size: .82rem; }
.property-photo-remove {
  margin: 0 0 6px;
  border: 1px solid var(--line, #f1e5bd);
  border-radius: 7px;
  padding: 3px 8px;
  background: var(--bg, #fff);
  color: var(--ink, #1c1a14);
  cursor: pointer;
  font: inherit;
}
.property-photo-remove:disabled { opacity: .6; cursor: wait; }
.property-photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 14px 14px;
}
.property-photo-actions span { color: var(--muted, #6b6455); font-size: .9rem; }
.property-photo-actions button:disabled { opacity: .6; cursor: wait; }
.admin-property-detail, .property-card-body { padding: 14px; }
.admin-property-detail h3, .property-card-body h3 { margin: 0 0 6px; }
.admin-property-detail p, .property-card-body p { margin: 4px 0; white-space: pre-wrap; }
.history-assignment { display: grid; gap: 8px; padding: 0 14px 14px; }
.history-assignment select, .history-assignment input {
  min-height: 40px;
  border: 1px solid var(--line, #f1e5bd);
  border-radius: 9px;
  padding: 7px 10px;
  background: var(--bg, #fff);
  color: var(--ink, #1c1a14);
  font: inherit;
}
.history-assignment button {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: var(--y, #ffc107);
  color: #1c1a14;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.public-properties, .published-properties { padding: 30px clamp(16px, 5vw, 56px); }
.public-properties { max-width: 1180px; margin: 0 auto; }
.public-properties h2, .published-properties h2 { margin-top: 0; }
.public-property-items, .property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}
.public-property-card {
  display: block;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow, 0 16px 38px rgba(44, 35, 12, .08));
  transition: transform .18s ease, box-shadow .18s ease;
}
.public-property-card:hover, .public-property-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(44, 35, 12, .16);
}
.property-contact-link {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 9px;
  background: var(--y, #ffc107);
  color: #1c1a14;
  font-weight: 700;
}
.property-empty-state { color: var(--muted, #6b6455); }
.property-contact-notice { margin: 18px 0 0 !important; font-weight: 800; }
.property-empty-photo { min-height: 150px; display: grid; place-items: center; color: var(--muted, #6b6455); background: var(--soft, #fff4d1); }
.property-image-gallery.compact { display: flex; max-width: 100%; overflow-x: auto; }
.property-image-gallery.compact .property-gallery-frame { flex: 0 0 124px; }
.property-image-gallery.compact .property-gallery-frame img { height: 90px; }
[hidden] { display: none !important; }
@media (max-width: 780px) {
  .site-nav, .auth-links { gap: 3px; flex-wrap: wrap; justify-content: center; }
  .site-nav a, .auth-links a { padding-inline: 5px; font-size: .86rem; }
  header:has(.site-nav) { flex-wrap: wrap; }
  .site-nav { order: 3; width: 100%; }
  .content-editor { grid-template-columns: 1fr; }
  .content-editor .full { grid-column: auto; }
}
