/* ============================================================
   СуточноРент — дизайн-система посуточной аренды
   ============================================================ */

:root {
  --bg: #f6f6f8;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --ink: #1b1b22;
  --muted: #71717f;
  --faint: #9a9aa6;
  --line: #ececf0;
  --line-strong: #dedee4;

  --brand: #ff4d67;
  --brand-600: #e83c56;
  --brand-050: #fff1f3;
  --brand-100: #ffe1e6;

  --accent: #2f6df6;
  --success: #12805c;
  --success-bg: #e7f7f0;
  --danger: #d4183d;
  --danger-bg: #fdeaee;
  --warn-bg: #fff6e6;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(20, 20, 40, 0.06);
  --shadow: 0 6px 24px rgba(20, 20, 45, 0.08);
  --shadow-lg: 0 18px 50px rgba(20, 20, 45, 0.14);

  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.03em; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #ff7a4d);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 4px 12px rgba(255, 77, 103, 0.4);
}
.brand b { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-user { color: var(--muted); font-size: 13px; margin-right: 4px; display: none; }
@media (min-width: 720px) { .nav-user { display: inline; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all 0.15s ease;
  background: transparent; color: var(--ink); white-space: nowrap; font-family: inherit;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(255, 77, 103, 0.32); }
.btn-primary:hover { background: var(--brand-600); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--surface-2); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-icon { width: 34px; height: 34px; padding: 0; }
.btn-sm.btn-icon { width: 30px; height: 30px; }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Inline SVG icons ---------- */
.icon { flex: none; display: inline-block; vertical-align: -3px; }
.h-icon { display: flex; align-items: center; gap: 8px; }
.h-icon .icon { color: var(--brand); }
.hint-flex { display: flex; align-items: center; gap: 6px; }
.hint-flex .icon { color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 400px at 15% -20%, rgba(255, 122, 77, 0.14), transparent),
    radial-gradient(900px 400px at 90% 0%, rgba(47, 109, 246, 0.10), transparent),
    linear-gradient(180deg, #fff, var(--bg));
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; padding: 56px 20px 40px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--brand-600);
  background: var(--brand-050); border: 1px solid var(--brand-100);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero-title { font-size: clamp(30px, 5vw, 46px); max-width: 15ch; }
.hero-sub { color: var(--muted); font-size: 17px; margin-top: 14px; max-width: 52ch; }

/* ---------- Search bar ---------- */
.searchbar {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 10px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.9fr 0.9fr auto;
  gap: 6px;
  align-items: end;
}
@media (max-width: 860px) { .searchbar { grid-template-columns: 1fr 1fr; } }
.search-field { display: flex; flex-direction: column; gap: 5px; padding: 8px 12px; border-radius: 12px; }
.search-field + .search-field { border-left: 1px solid var(--line); }
@media (max-width: 860px) { .search-field + .search-field { border-left: none; } }
.search-field label { font-size: 12px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.search-field input {
  border: none; outline: none; background: transparent; font-size: 14px;
  color: var(--ink); font-family: inherit; padding: 2px 0; width: 100%;
}
.search-field input::placeholder { color: var(--faint); }
.search-submit { display: flex; align-items: center; padding: 4px; }

/* ---------- Sections & grid ---------- */
.section { padding: 40px 0 64px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: 24px; }
.section-head .count { color: var(--muted); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }

/* ---------- SEO text block (homepage) ---------- */
.seo-text { padding-top: 8px; max-width: 74ch; }
.seo-text h2 { font-size: 19px; margin-bottom: 10px; }
.seo-text p { color: var(--muted); font-size: 14.5px; line-height: 1.7; margin: 0 0 12px; }

/* ---------- Apartment card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.placeholder-media {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: #fff; font-size: 34px; font-weight: 800;
  background: linear-gradient(135deg, #ff9a76, var(--brand));
}
.badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(6px);
  color: var(--ink); font-size: 12px; font-weight: 700;
  padding: 5px 10px; border-radius: 999px; box-shadow: var(--shadow-sm);
  display: inline-flex; align-items: center; gap: 5px;
}
.badge .icon { color: var(--brand); }
.card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 17px; }
.card-loc { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 5px; }
.card-meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-meta .icon { color: var(--faint); }
.card-price { margin-top: auto; padding-top: 10px; display: flex; align-items: baseline; gap: 6px; border-top: 1px solid var(--line); }
.price-amount { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.price-unit { color: var(--muted); font-size: 13px; }

/* ---------- Empty state ---------- */
.empty {
  text-align: center; padding: 64px 20px; color: var(--muted);
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface);
}
.empty .emoji { font-size: 42px; margin-bottom: 10px; }
.empty > .icon { color: var(--faint); margin-bottom: 12px; }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* ---------- Detail page ---------- */
.breadcrumb { color: var(--muted); font-size: 14px; padding: 22px 0 0; }
.breadcrumb a:hover { color: var(--brand-600); }
.detail-head { padding: 14px 0 20px; }
.detail-head h1 { font-size: clamp(24px, 4vw, 34px); }
.detail-loc { color: var(--muted); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.detail-media {
  width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
}
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-media .placeholder-media { font-size: 64px; }

/* ---------- Swipeable gallery + lightbox ---------- */
.gallery-main {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--surface-2); border: 1px solid var(--line);
  touch-action: pan-y;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: rgba(20, 20, 30, 0.45); color: #fff; font-size: 20px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(2px);
}
.gallery-arrow:hover { background: rgba(20, 20, 30, 0.65); }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-counter {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  background: rgba(20, 20, 30, 0.55); color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(10, 10, 14, 0.94);
  display: flex; align-items: center; justify-content: center; touch-action: none;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(92vw, 1100px); max-height: 88vh; object-fit: contain; user-select: none;
}
.lightbox-close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 24px; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 24px; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
}
.lightbox-arrow:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 2;
  color: #fff; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, 0.12);
  padding: 5px 12px; border-radius: 999px;
}
@media (max-width: 640px) {
  .lightbox-arrow { width: 38px; height: 38px; font-size: 20px; }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
}

/* ---------- Amenities ---------- */
.amenity-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 8px; }
.amenity {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
}
.amenity .ic { font-size: 15px; }
.amenity .icon { color: var(--muted); }

.amenity-check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 14px; margin-top: 6px; }
.amenity-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.amenity-check input { width: 16px; height: 16px; accent-color: var(--brand); }

.detail-grid { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; padding-bottom: 72px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-main { min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line-strong);
  padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600;
}
.chip .ic { color: var(--brand); }
.chip .icon { color: var(--brand); }

.block-title { font-size: 18px; margin: 28px 0 12px; }
.prose { color: #35353f; font-size: 15.5px; line-height: 1.7; white-space: pre-line; }

.owner-card {
  margin-top: 26px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; display: flex; align-items: center; gap: 14px;
}
.owner-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--accent), #7aa2ff);
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px;
}
.owner-card .who { font-weight: 700; }
.owner-card .contact { color: var(--muted); font-size: 14px; margin-top: 2px; display: flex; align-items: center; gap: 6px; }

.availability { margin-top: 26px; }
.date-range {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px;
  font-size: 14px; background: var(--surface);
}
.date-range .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* ---------- Booking box (sticky) ---------- */
.booking-box {
  position: sticky; top: 90px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px;
}
.booking-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 16px; }
.booking-price .amount { font-size: 26px; font-weight: 800; }
.booking-price .unit { color: var(--muted); }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
/* honeypot-ловушка от ботов: реальные посетители её не видят и не могут сфокусировать */
.hp-trap { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.field .hint { font-size: 12px; color: var(--faint); font-weight: 400; }
.input, .field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong);
  border-radius: 11px; font-size: 14px; font-family: inherit; color: var(--ink);
  background: var(--surface); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-050);
}

.total-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 0 4px; margin-top: 4px; border-top: 1px solid var(--line);
  font-size: 15px;
}
.total-row .big { font-size: 20px; font-weight: 800; }
.calc-line { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; padding: 3px 0; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 500; margin: 0; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-info { background: var(--warn-bg); color: #8a5a00; }

/* ---------- Auth card ---------- */
.auth-wrap { min-height: calc(100vh - 200px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 32px;
}
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.auth-note { margin-top: 18px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- Page header (dashboard/admin) ---------- */
.page-head { padding: 34px 0 26px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; }
.page-head .sub { color: var(--muted); margin-top: 6px; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; margin-bottom: 28px;
}
.panel > h2 { font-size: 18px; margin-bottom: 4px; }
.panel > .sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

/* ---------- List / table (div-based) ---------- */
.list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.list-head, .lrow { display: grid; align-items: center; gap: 12px; padding: 13px 16px; }
.list-head { background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--line); }
.lrow { border-bottom: 1px solid var(--line); font-size: 14px; }
.lrow:last-child { border-bottom: none; }
.list-scroll { overflow-x: auto; }
.list-inner { min-width: 640px; }
.list-inner.wide { min-width: 920px; }

.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tag-admin { background: #efe9ff; color: #6b41d8; }
.tag-owner { background: var(--brand-050); color: var(--brand-600); }

/* owner apartment card (dashboard) */
.mini-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mini-media { aspect-ratio: 16/9; background: var(--surface-2); }
.mini-media img { width: 100%; height: 100%; object-fit: cover; }
.mini-body { padding: 14px; }
.mini-body h3 { font-size: 16px; }
.mini-body .meta { color: var(--muted); font-size: 13px; margin: 6px 0 12px; }
.mini-actions { display: flex; gap: 8px; }

.weekday-price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 8px; }
.weekday-price-grid .field label { text-align: center; }
.weekday-price-grid .field input { text-align: center; padding: 8px 4px; font-size: 13px; }

.override-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.override-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 13px;
}
.override-row span:first-child { font-weight: 600; }
.override-row .photo-del { position: static; margin-left: auto; background: var(--danger); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 40px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 30px 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.footer-inner a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.footer-inner a:hover { color: var(--brand-600); }

.hint-icon { color: var(--muted); }
.mt-0 { margin-top: 0; }
.htmx-request .btn-primary { opacity: 0.7; pointer-events: none; }

/* ---------- Visit statistics ---------- */
.stat-tile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 16px; }
@media (max-width: 480px) { .stat-tile-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-tile { background: var(--surface-2); border-radius: 10px; padding: 10px 6px; text-align: center; }
.stat-tile b { display: block; font-size: 19px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.stat-tile span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

.visit-chart { display: flex; align-items: flex-end; gap: 6px; margin: 10px 0 4px; }
.visit-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.visit-bar-count { font-size: 10px; color: var(--muted); font-weight: 700; margin-bottom: 3px; min-height: 12px; }
.visit-bar-track {
  width: 100%; max-width: 28px; height: 54px; background: var(--surface-2);
  border-radius: 4px; display: flex; align-items: flex-end; overflow: hidden;
}
.visit-bar { width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; }
.visit-bar-label { font-size: 10px; color: var(--faint); margin-top: 5px; }

/* ---------- Status tags ---------- */
.tag-pending { background: var(--warn-bg); color: #8a5a00; }
.tag-confirmed { background: var(--success-bg); color: var(--success); }
.tag-owner-block { background: #eceef3; color: #4b5468; }
.tag-channel { background: #e8f3ff; color: #1a68c9; }

/* ---------- Status pills (with dot) ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; opacity: 0.8; }
.pill-green { background: var(--success-bg); color: var(--success); }
.pill-amber { background: var(--warn-bg); color: #8a5a00; }
.pill-blue { background: #e9f1fd; color: #1d63c4; }
.pill-gray { background: #eef0f4; color: #5b6472; }

/* ---------- Bookings table (dashboard) ---------- */
.bk-grid {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) minmax(150px, 1.1fr) 126px minmax(120px, 0.95fr) minmax(96px, 0.7fr) 176px;
  gap: 12px; align-items: center; padding: 12px 16px;
}
.bk-head {
  background: var(--surface-2); font-size: 11.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--line);
  padding-top: 10px; padding-bottom: 10px;
}
.bk-item { border-bottom: 1px solid var(--line); }
.bk-item:last-child { border-bottom: none; }
.bk-item > summary { cursor: pointer; list-style: none; transition: background 0.12s; }
.bk-item > summary::-webkit-details-marker { display: none; }
.bk-item > summary:hover, .bk-item[open] > summary { background: var(--surface-2); }
.bk-apt { font-weight: 650; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-guest { min-width: 0; }
.bk-guest b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-guest small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.bk-dates { font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bk-sum { font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.bk-sum .mini-stars { display: block; font-weight: 400; }
.bk-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.bk-btns { display: flex; align-items: center; gap: 6px; }
.bk-chevron { color: var(--faint); transition: transform 0.15s; }
.bk-item[open] .bk-chevron { transform: rotate(180deg); }
.bk-body { padding: 16px 18px 20px; background: var(--surface-2); border-top: 1px dashed var(--line); }
.bk-body .review-block:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.bk-body-actions { display: flex; justify-content: flex-end; margin-top: 12px; }

/* ---------- Client rating (star widget) ---------- */
.review-block { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.star-rating { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-rating input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-rating label { font-size: 24px; line-height: 1; color: var(--line-strong); cursor: pointer; }
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color: #f5a623; }
.star-clear { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); cursor: pointer; }
.star-clear input { margin: 0; }
.mini-stars { color: #f5a623; font-size: 12px; letter-spacing: 1px; }

/* ---------- Occupancy bars (CRM tab) ---------- */
.occ-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.occ-row:last-child { border-bottom: none; }
.occ-title { flex: 0 0 42%; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.occ-track { flex: 1; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.occ-fill { height: 100%; background: var(--brand); border-radius: 999px; }
.occ-pct { flex: 0 0 44px; text-align: right; font-size: 13px; font-weight: 700; }

/* ---------- Collapsible sections (owner card / profile) ---------- */
.mini-details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.mini-details summary {
  cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ink); list-style: none;
  display: flex; align-items: center; gap: 8px;
}
.mini-details summary::-webkit-details-marker { display: none; }
.mini-details summary .icon { color: var(--muted); }
.mini-details summary .sum-chev { margin-left: auto; color: var(--faint); transition: transform 0.15s; }
.mini-details[open] summary .sum-chev { transform: rotate(180deg); }
.mini-details .form, .mini-details .photo-upload-form { margin-top: 10px; }
.photo-upload-form { display: flex; gap: 8px; align-items: center; }
.photo-upload-form input[type="file"] { flex: 1; font-size: 12px; }

.panel-details { margin-bottom: 20px; }
.panel-summary {
  cursor: pointer; font-weight: 650; font-size: 14.5px; list-style: none;
  padding: 14px 18px; background: var(--surface); border: 1px dashed var(--line-strong);
  border-radius: var(--radius); display: flex; align-items: center; gap: 10px;
  transition: border-color 0.15s, color 0.15s;
}
.panel-summary::-webkit-details-marker { display: none; }
.panel-summary .icon { color: var(--brand); }
.panel-summary:hover { border-color: var(--brand); color: var(--brand-600); }
.panel-summary .sum-chev { margin-left: auto; color: var(--faint); transition: transform 0.15s; }
.panel-details[open] .panel-summary { border-style: solid; }
.panel-details[open] .panel-summary .sum-chev { transform: rotate(180deg); }

/* nested block inside a mini-details section (e.g. block-dates form under calendar) */
.sub-section { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- Dashboard tabs (segmented control) ---------- */
.tabs {
  display: flex; gap: 2px; background: #e9e9ee; padding: 4px; border-radius: 13px;
  margin: 20px 0 24px; width: fit-content; max-width: 100%; overflow-x: auto;
}
.tab-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border: none; background: transparent; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
  white-space: nowrap; font-family: inherit;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active {
  background: var(--surface); color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1), 0 2px 6px rgba(16, 24, 40, 0.06);
}
.tab-btn .icon { color: var(--faint); }
.tab-btn.active .icon { color: var(--brand); }
.tab-badge {
  background: var(--brand-050); color: var(--brand-600); font-size: 11px; font-weight: 800;
  padding: 1px 7px; border-radius: 999px;
}
.tab-btn.active .tab-badge { background: var(--brand); color: #fff; }

/* ---------- Photo gallery (dashboard) ---------- */
.photo-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.photo-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.photo-thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-del {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff; border: none; font-size: 12px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; padding: 0;
}
.photo-cover-badge {
  position: absolute; left: 0; bottom: 0; right: 0; background: rgba(0,0,0,0.55); color: #fff;
  font-size: 9px; font-weight: 700; text-align: center; padding: 2px 0; letter-spacing: 0.02em;
}
.photo-move-row { display: flex; gap: 4px; }
.photo-move-btn {
  width: 24px; height: 18px; border-radius: 5px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 11px; line-height: 1; cursor: pointer; padding: 0; color: var(--ink);
}
.photo-move-btn:hover:not(:disabled) { background: var(--surface-2); }
.photo-move-btn:disabled { opacity: 0.25; cursor: default; }

/* ---------- Detail page thumbnail strip ---------- */
.thumb-strip { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumb-strip .thumb {
  width: 72px; height: 54px; object-fit: cover; border-radius: 10px; cursor: pointer;
  border: 2px solid transparent; opacity: 0.7; flex: none;
}
.thumb-strip .thumb.active { border-color: var(--brand); opacity: 1; }

/* ---------- Availability calendar ---------- */
.cal-container { margin-top: 12px; }
.cal-nav { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 10px; }
.cal-nav-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-size: 17px; line-height: 1;
  display: grid; place-items: center; color: var(--ink);
}
.cal-nav-btn:hover:not(:disabled) { background: var(--surface-2); }
.cal-nav-btn:disabled { opacity: 0.3; cursor: default; }
.cal-months { display: flex; flex-wrap: wrap; gap: 20px; }
.cal-month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; flex: 1; min-width: 230px; }
.cal-head { font-weight: 700; font-size: 14px; margin-bottom: 8px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { font-size: 11px; color: var(--faint); text-align: center; font-weight: 700; padding-bottom: 2px; }
.cal-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 12px; border-radius: 7px; color: var(--ink); }
.cal-cell.cal-empty { visibility: hidden; }
.cal-cell.cal-today { box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 700; }
.cal-cell.cal-blocked { background: var(--danger-bg); color: var(--danger); font-weight: 600; }
.cal-cell.cal-pending { background: var(--warn-bg); color: #8a5a00; font-weight: 600; }
.cal-cell.cal-confirmed { background: var(--danger-bg); color: var(--danger); font-weight: 600; }
.cal-cell.cal-owner { background: #eceef3; color: #4b5468; font-weight: 600; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.cal-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.dot-pending { background: #f2c14e; }
.dot-confirmed, .dot-blocked { background: var(--danger); }
.dot-owner { background: #4b5468; }

/* ---------- Interactive booking calendar (apartment detail) ---------- */
.bc-nav { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.bc-nav-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-size: 17px; color: var(--ink);
}
.bc-nav-btn:hover:not(:disabled) { background: var(--surface-2); }
.bc-nav-btn:disabled { opacity: 0.3; cursor: default; }
.bc-months { display: flex; flex-wrap: wrap; gap: 28px; }
.bc-month { flex: 1; min-width: 260px; }
.bc-month-head { font-weight: 700; font-size: 14.5px; margin-bottom: 10px; text-transform: capitalize; }
.bc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bc-dow { font-size: 11px; color: var(--faint); text-align: center; font-weight: 700; padding-bottom: 4px; }
.bc-cell {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 8px; position: relative; color: var(--ink);
}
.bc-cell.bc-empty { visibility: hidden; }
.bc-daynum { font-size: 13px; font-weight: 600; line-height: 1.2; }
.bc-price { font-size: 8.5px; color: var(--muted); font-weight: 600; margin-top: 1px; }
.bc-cell.bc-clickable { cursor: pointer; }
.bc-cell.bc-clickable:hover { background: var(--surface-2); }
.bc-cell.bc-disabled { color: var(--faint); }
.bc-cell.bc-disabled .bc-daynum { opacity: 0.5; }
.bc-cell.bc-invalid { color: var(--faint); opacity: 0.45; }
.bc-cell.bc-occupied { background: var(--danger-bg); }
.bc-cell.bc-occupied .bc-daynum { color: var(--danger); text-decoration: line-through; opacity: 0.85; }
.bc-cell.bc-today .bc-daynum { box-shadow: inset 0 0 0 1.5px var(--ink); border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.bc-cell.bc-in-range { background: var(--brand-050); }
.bc-cell.bc-checkin, .bc-cell.bc-checkout {
  background: var(--brand); border-radius: 8px;
}
.bc-cell.bc-checkin .bc-daynum, .bc-cell.bc-checkin .bc-price,
.bc-cell.bc-checkout .bc-daynum, .bc-cell.bc-checkout .bc-price { color: #fff; }
.bc-summary {
  text-align: center; font-weight: 700; font-size: 14px; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid var(--line);
}

/* ---------- Host landing page ---------- */
.host-hero {
  position: relative;
  background:
    radial-gradient(1000px 380px at 20% -10%, rgba(255, 122, 77, 0.16), transparent),
    radial-gradient(800px 380px at 90% 0%, rgba(47, 109, 246, 0.12), transparent),
    linear-gradient(180deg, #fff, var(--bg));
  border-bottom: 1px solid var(--line);
  text-align: center;
  overflow: hidden;
}
.host-hero.has-photo {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.97) 55%, var(--bg) 100%),
    var(--hero-bg-image);
  background-size: cover;
  background-position: center 35%;
}
.host-hero-inner { position: relative; max-width: 640px; margin: 0 auto; padding: 64px 20px 52px; display: flex; flex-direction: column; align-items: center; }
.host-avatar {
  width: 92px; height: 92px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #ff9a5c);
  color: #fff; font-size: 36px; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(255, 77, 103, 0.38); margin-bottom: 18px;
  border: 4px solid #fff;
}
.host-hero .host-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--brand-600); background: var(--brand-050); border: 1px solid var(--brand-100);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.host-hero h1 { font-size: clamp(28px, 4.2vw, 40px); letter-spacing: -0.01em; }
.host-bio { color: var(--muted); font-size: 16px; margin-top: 14px; max-width: 52ch; line-height: 1.6; }
.host-cities { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.host-city-chip {
  background: var(--surface); border: 1px solid var(--line); padding: 6px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm);
}
.host-stats { display: flex; gap: 30px; margin-top: 28px; flex-wrap: wrap; justify-content: center; }
.host-stat { display: flex; flex-direction: column; align-items: center; }
.host-stat b { font-size: 21px; font-weight: 800; }
.host-stat span { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.host-cta-row { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; justify-content: center; }

/* mobile sticky call bar */
.host-call-bar { display: none; }
@media (max-width: 720px) {
  .host-call-bar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(20, 20, 30, 0.08);
  }
  .host-cta-row { display: none; }
  .host-content-pad { padding-bottom: 76px; }
}
