/* ============ Idle Nests design system ============ */
:root {
  --brand: #0039d8;         /* logo house blue */
  --brand-dark: #002897;
  --brand-soft: #e5eafb;
  --accent: #b7813c;        /* logo nest tan */
  --accent-soft: #f7efe2;
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #22302c;
  --muted: #67746f;
  --border: #e6e2da;
  --danger: #b3402e;
  --danger-soft: #fbeae6;
  --ok: #2c7a4b;
  --shadow-sm: 0 1px 2px rgba(34, 48, 44, .06), 0 1px 6px rgba(34, 48, 44, .05);
  --shadow-md: 0 4px 14px rgba(34, 48, 44, .10);
  --shadow-lg: 0 12px 40px rgba(34, 48, 44, .16);
  --radius: 12px;
  --radius-lg: 18px;
  --font: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --header-h: 60px;
  --bottomnav-h: 58px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
::selection { background: var(--brand-soft); }

/* ---------- header & nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 248, 245, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-size: 1.28rem; font-weight: 700;
  color: var(--brand-dark); letter-spacing: .2px; white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo .logo-img { width: 34px; height: 34px; flex: none; object-fit: contain; }
.main-nav { display: none; align-items: center; gap: 4px; margin-left: 8px; }
.main-nav a {
  padding: 8px 13px; border-radius: 999px; color: var(--text);
  font-weight: 500; font-size: .93rem; position: relative;
}
.main-nav a:hover { background: var(--brand-soft); text-decoration: none; }
.main-nav a.active { background: var(--brand); color: #fff; }
.header-spacer { flex: 1; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  background: var(--brand-soft); border: 1px solid var(--border);
}
.avatar-fallback {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-weight: 700; font-size: .9rem;
}
.avatar-menu-wrap { position: relative; }
.avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; display: block; }
.avatar-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); min-width: 200px; padding: 6px; z-index: 60;
}
.avatar-menu a, .avatar-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 12px;
  border: 0; background: none; border-radius: 8px; color: var(--text);
  font: inherit; font-size: .93rem; cursor: pointer;
}
.avatar-menu a:hover, .avatar-menu button:hover { background: var(--bg); text-decoration: none; }
.avatar-menu .sep { height: 1px; background: var(--border); margin: 6px 4px; }
.nav-badge {
  position: absolute; top: 2px; right: 4px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* bottom nav (mobile) */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: flex; background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--muted); font-size: .66rem; font-weight: 600; position: relative;
}
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav a.active { color: var(--brand); }
.bottom-nav a:hover { text-decoration: none; }
.bottom-nav .nav-badge { top: 4px; right: calc(50% - 20px); }

/* ---------- layout ---------- */
.app { max-width: 1200px; margin: 0 auto; padding: 20px 16px 48px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.section { margin: 26px 0; }
.section > h2 { padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.empty-state {
  text-align: center; color: var(--muted); padding: 48px 16px;
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius-lg);
}
.spinner-wrap { display: flex; justify-content: center; padding: 60px 0; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--brand-soft); border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .93rem; cursor: pointer;
  background: var(--brand); color: #fff; transition: background .15s, transform .05s;
  text-decoration: none;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface); border-color: var(--muted); }
.btn.soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn.soft:hover { background: #d3e7e2; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: #d9853a; }
.btn.sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn svg { width: 17px; height: 17px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .87rem; margin-bottom: 5px; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-size: .95rem; color: var(--text); background: var(--surface);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand);
}
textarea { resize: vertical; min-height: 80px; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--brand); }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; cursor: pointer; }
.form-row { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm);
}
.auth-card { max-width: 420px; margin: 30px auto; }
.auth-card h1 { font-family: var(--font-display); }

/* ---------- chips & badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600;
  background: var(--brand-soft); color: var(--brand-dark);
}
.chip.accent { background: var(--accent-soft); color: #9a5b1d; }
.chip.gray { background: #efece6; color: var(--muted); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.ok { background: #e2f2e8; color: var(--ok); }
.status-pending { background: var(--accent-soft); color: #9a5b1d; }
.status-accepted, .status-published { background: #e2f2e8; color: var(--ok); }
.status-declined, .status-cancelled, .status-archived { background: var(--danger-soft); color: var(--danger); }
.status-completed { background: var(--brand-soft); color: var(--brand-dark); }
.status-draft, .status-paused { background: #efece6; color: var(--muted); }

/* ---------- filter bar ---------- */
.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 10px; box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.filter-bar input, .filter-bar select { width: auto; min-width: 0; }
.filter-bar .city-input { flex: 1 1 150px; }
.filters-extra {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; margin: -8px 0 18px;
  box-shadow: var(--shadow-sm);
}
.amenity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }

/* ---------- property cards ---------- */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.prop-card { display: block; color: inherit; position: relative; }
.prop-card:hover { text-decoration: none; }
.prop-card .cover {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--brand-soft); box-shadow: var(--shadow-sm);
}
.prop-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.prop-card:hover .cover img { transform: scale(1.04); }
.prop-card .cover .chips { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.prop-card .cover .chip { background: rgba(255,255,255,.92); color: var(--text); box-shadow: var(--shadow-sm); }
.fav-btn {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); color: var(--muted);
}
.fav-btn:hover { color: var(--danger); }
.fav-btn.on { color: #e0455a; }
.fav-btn svg { width: 19px; height: 19px; }
.prop-card .body { padding: 10px 4px 0; }
.prop-card .title-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.prop-card .title { font-weight: 600; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prop-card .rating { flex: none; font-size: .88rem; color: var(--text); }
.prop-card .place { color: var(--muted); font-size: .88rem; }
.prop-card .price { margin-top: 3px; font-size: .95rem; }
.prop-card .price b { font-size: 1.05rem; }
.star { color: var(--accent); }

/* ---------- property detail ---------- */
.gallery { border-radius: var(--radius-lg); overflow: hidden; position: relative; background: var(--brand-soft); }
.gallery .main { aspect-ratio: 16 / 10; position: relative; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 16px 12px; color: #fff; font-size: .9rem;
  background: linear-gradient(transparent, rgba(0,0,0,.62));
}
.gallery .g-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.9); box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
}
.gallery .g-nav.prev { left: 10px; } .gallery .g-nav.next { right: 10px; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; }
.thumbs img {
  width: 84px; height: 60px; object-fit: cover; border-radius: 8px; cursor: pointer;
  opacity: .65; border: 2px solid transparent; flex: none;
}
.thumbs img.active { opacity: 1; border-color: var(--brand); }

.detail-layout { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 20px; }
.detail-title h1 { font-family: var(--font-display); font-size: 1.45rem; }
.title-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .92rem; }

.book-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow-md);
}
.book-card .price-line { font-size: 1.05rem; margin-bottom: 12px; }
.book-card .price-line b { font-size: 1.3rem; }
.date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quote-lines { margin: 12px 0; font-size: .93rem; }
.quote-lines .row { display: flex; justify-content: space-between; padding: 3px 0; }
.quote-lines .total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; font-weight: 700; }
.availability-note { font-size: .87rem; margin: 8px 0; }

.rooms-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.room-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px;
}
.room-card .room-name { font-weight: 600; font-size: .93rem; }
.room-card ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: .87rem; }
.amenities-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 14px; }
.amenities-list .item { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.amenities-list svg { width: 16px; height: 16px; color: var(--brand); flex: none; }

.attraction-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border); font-size: .93rem;
}
.attraction-row:last-child { border-bottom: 0; }
.attraction-row .icon {
  width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; color: var(--brand); flex: none;
}
.attraction-row .grow { flex: 1; min-width: 0; }
.attraction-row .dist { color: var(--muted); white-space: nowrap; font-size: .85rem; }

/* ---------- calendar ---------- */
.cal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head b { font-size: .98rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { text-align: center; font-size: .7rem; font-weight: 700; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.cal-day {
  aspect-ratio: 1; border-radius: 8px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px; font-size: .82rem;
  background: var(--bg); position: relative;
}
.cal-day .p { font-size: .62rem; color: var(--muted); }
.cal-day.free { background: #eef6f3; }
.cal-day.booked { background: var(--accent-soft); color: #9a5b1d; }
.cal-day.blocked { background: #efece6; color: var(--muted); text-decoration: line-through; }
.cal-day.past { opacity: .38; }
.cal-day.empty { background: transparent; }
.cal-legend { display: flex; gap: 14px; margin-top: 10px; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.cal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }

/* ---------- reviews ---------- */
.review-card { padding: 14px 0; border-bottom: 1px solid var(--border); }
.review-card:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.review-head .avatar, .review-head .avatar-fallback { width: 38px; height: 38px; }
.stars-input { display: flex; gap: 4px; font-size: 1.7rem; cursor: pointer; user-select: none; }
.stars-input span { color: #d8d3c8; transition: color .1s; }
.stars-input span.on { color: var(--accent); }

/* ---------- owner / profile card ---------- */
.owner-card { display: flex; align-items: center; gap: 14px; }
.owner-card .avatar, .owner-card .avatar-fallback { width: 54px; height: 54px; font-size: 1.2rem; }

/* ---------- dashboard rows ---------- */
.item-row {
  display: flex; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 12px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.item-row .thumb {
  width: 92px; height: 68px; border-radius: 10px; object-fit: cover; flex: none; background: var(--brand-soft);
}
.item-row .grow { flex: 1; min-width: 0; }
.item-row .title { font-weight: 600; }
.item-row .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- messages ---------- */
.messages-layout { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (max-width: 899px) {
  .messages-layout.has-thread .threads-col { display: none; }
  .messages-layout:not(.has-thread) .chat-col { display: none; }
}
.thread-list-item {
  display: flex; gap: 12px; padding: 12px; border-radius: var(--radius);
  cursor: pointer; align-items: center; border: 1px solid transparent;
}
.thread-list-item:hover { background: var(--surface); }
.thread-list-item.active { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-sm); }
.thread-list-item .thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: var(--brand-soft); }
.thread-list-item .grow { flex: 1; min-width: 0; }
.thread-list-item .who { font-weight: 600; font-size: .93rem; }
.thread-list-item .preview {
  color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thread-list-item .unread-dot {
  min-width: 20px; height: 20px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none;
}
.chat-pane { display: flex; flex-direction: column; min-height: 55vh; }
.chat-header {
  display: flex; align-items: center; gap: 10px; padding: 10px 0 12px;
  border-bottom: 1px solid var(--border); margin-bottom: 10px;
}
.chat-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px 2px; }
.bubble {
  max-width: 78%; padding: 9px 13px; border-radius: 16px; font-size: .93rem;
  background: var(--surface); border: 1px solid var(--border); align-self: flex-start;
  border-bottom-left-radius: 5px;
}
.bubble.mine {
  background: var(--brand); color: #fff; border-color: var(--brand);
  align-self: flex-end; border-bottom-left-radius: 16px; border-bottom-right-radius: 5px;
}
.bubble .t { display: block; font-size: .68rem; opacity: .65; margin-top: 3px; }
.chat-compose { display: flex; gap: 8px; padding-top: 10px; }
.chat-compose textarea { min-height: 44px; max-height: 130px; }

/* ---------- editor ---------- */
.editor-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 2px; }
.editor-tabs button {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font: inherit; font-size: .88rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; color: var(--text);
}
.editor-tabs button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.photo-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.photo-admin { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.photo-admin img { aspect-ratio: 4/3; width: 100%; object-fit: cover; }
.photo-admin .pad { padding: 10px; }
.inline-edit-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--border); }
.inline-edit-row:last-child { border-bottom: 0; }
.rate-pill { font-variant-numeric: tabular-nums; }

/* ---------- modal & toasts ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80; background: rgba(20, 28, 25, .5);
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.modal {
  background: var(--surface); border-radius: 20px 20px 0 0; width: 100%;
  max-width: 520px; max-height: 88vh; overflow-y: auto; padding: 22px;
  box-shadow: var(--shadow-lg); animation: slide-up .18s ease-out;
}
@keyframes slide-up { from { transform: translateY(30px); opacity: .6; } }
.modal h2 { font-family: var(--font-display); }
.modal .modal-close { position: absolute; } /* replaced by header row */
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h2 { margin: 0; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
}
.icon-btn:hover { background: var(--border); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }

.toasts {
  position: fixed; z-index: 100; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--bottomnav-h) + 14px); display: flex; flex-direction: column; gap: 8px;
  width: min(92vw, 400px);
}
.toast {
  background: #223029; color: #fff; padding: 12px 16px; border-radius: 12px;
  box-shadow: var(--shadow-lg); font-size: .92rem; animation: slide-up .18s ease-out;
}
.toast.error { background: var(--danger); }
.toast.ok { background: var(--brand); }

/* ---------- maps ---------- */
.map-box {
  height: 300px; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); background: var(--brand-soft);
  position: relative; z-index: 0;
}
.map-box.tall { height: min(68vh, 640px); }
.map-pin {
  display: inline-block; transform: translate(-50%, -100%);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 9px; font-weight: 700; font-size: .8rem; color: var(--text);
  box-shadow: var(--shadow-md); white-space: nowrap;
}
.map-pin:hover { background: var(--brand); color: #fff; }
.leaflet-container { font-family: var(--font); }
.map-popup { display: block; color: var(--text); width: 200px; }
.map-popup:hover { text-decoration: none; }
.map-popup img { width: 200px; height: 120px; object-fit: cover; border-radius: 8px; }
.map-popup .t { display: block; font-weight: 600; margin-top: 7px; line-height: 1.3; }
.map-popup .s { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }

/* ---------- admin ---------- */
.admin-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px; margin-bottom: 18px;
}
.stat-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px;
}
.stat-tile .stat-n { font-size: 1.5rem; font-weight: 800; color: var(--brand-dark); }
.stat-tile .stat-label { font-size: .82rem; font-weight: 600; color: var(--muted); }

/* ---------- notification settings ---------- */
.notif-table { width: 100%; border-collapse: collapse; }
.notif-table th {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 700; padding: 6px 8px; text-align: center;
}
.notif-table th:first-child { text-align: left; }
.notif-table td { padding: 10px 8px; border-top: 1px solid var(--border); vertical-align: top; }
.notif-table td.center { text-align: center; }
.notif-table input[type="checkbox"] { width: 17px; height: 17px; }
.notif-label { font-weight: 600; font-size: .93rem; }

/* ---------- pagination ---------- */
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 26px 0 8px; }
.pager button {
  min-width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); font: inherit; font-weight: 600; cursor: pointer;
}
.pager button.current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button:disabled { opacity: .4; cursor: default; }

/* ---------- hero ---------- */
.hero {
  border-radius: var(--radius-lg); overflow: hidden; position: relative;
  background: linear-gradient(120deg, var(--brand-dark), var(--brand) 55%, #2b8a74);
  color: #fff; padding: 34px 22px; margin-bottom: 20px;
}
.hero h1 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 6px; }
.hero p { opacity: .85; margin: 0; max-width: 520px; }
.hero .nest-art { position: absolute; right: -20px; bottom: -30px; width: 190px; opacity: .16; }

/* ---------- responsive ---------- */
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
  .rooms-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-backdrop { align-items: center; padding: 20px; }
  .modal { border-radius: 20px; }
  .hero { padding: 46px 34px; }
  .hero h1 { font-size: 2rem; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .main-nav { display: flex; }
  .toasts { bottom: 24px; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-layout { grid-template-columns: 1fr 380px; align-items: start; }
  .book-card { position: sticky; top: calc(var(--header-h) + 16px); }
  .messages-layout { grid-template-columns: 340px 1fr; gap: 22px; }
  .chat-pane { min-height: 60vh; max-height: calc(100vh - var(--header-h) - 120px); }
  h1 { font-size: 1.7rem; }
}
@media (min-width: 1200px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Photo editor: multi-upload dropzone + drag reordering */
.dropzone {
  display: block; text-align: center; cursor: pointer;
  border: 2px dashed var(--border, #cfd6dd); border-radius: 12px;
  padding: 26px 18px; transition: border-color .15s, background .15s;
}
.dropzone input[type="file"] { display: none; }
.dropzone.over { border-color: var(--accent, #1f6f5c); background: rgba(31, 111, 92, 0.06); }
.photo-admin img { cursor: grab; }
.photo-admin.dragging { opacity: 0.45; }

/* Admin stat tiles that correspond to a tab are clickable shortcuts */
.stat-tile.clickable { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.stat-tile.clickable:hover { box-shadow: 0 2px 10px rgba(0, 57, 216, 0.18); transform: translateY(-1px); }
