/* RentLink Uganda theme: the flag colours. Black, yellow (#FCDC04) and red (#D90000). Light + dark. */
:root {
  --bg: #FAF8F2;
  --surface: #FFFFFF;
  --surface-2: #F3F1EA;
  --text: #141414;
  --muted: #5F5B53;
  --line: #E5E1D6;
  --black: #111111;      /* flag black: header, bands, price tags */
  --black-2: #1F1F1F;
  --accent: #D90000;      /* flag red: buttons and links */
  --accent-dark: #B00000;
  --accent-soft: #FDE4E1;
  --sun: #FCDC04;         /* flag yellow: highlights, always with black text */
  --featured: #FCDC04;
  --success: #1F7A55;
  --success-soft: #DDEFE5;
  --warn-soft: #FBEFD2;
  --warn-text: #7A5200;
  --danger: #B42318;
  --danger-soft: #FBE3DF;
  --shadow: 0 1px 0 rgba(30, 27, 24, .04), 0 10px 24px -12px rgba(30, 27, 24, .18);
  --radius: 18px;
  --radius-sm: 10px;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0C0C; --surface: #171717; --surface-2: #202020; --text: #EDEBE6; --muted: #A8A49C; --line: #2E2E2E;
    --black: #050505; --black-2: #262626; --accent: #FF4D3D; --accent-dark: #FF6B5E; --accent-soft: #3A1614;
    --success-soft: #133326; --warn-soft: #3A2E12; --warn-text: #F5CD7A; --danger-soft: #3B1714;
    --shadow: 0 1px 0 rgba(0,0,0,.3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C0C0C; --surface: #171717; --surface-2: #202020; --text: #EDEBE6; --muted: #A8A49C; --line: #2E2E2E;
  --black: #050505; --black-2: #262626; --accent: #FF4D3D; --accent-dark: #FF6B5E; --accent-soft: #3A1614;
  --success-soft: #133326; --warn-soft: #3A2E12; --warn-text: #F5CD7A; --danger-soft: #3B1714;
  --shadow: 0 1px 0 rgba(0,0,0,.3); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font-body); }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.icon { flex: none; vertical-align: -0.2em; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: var(--text); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); }
h2 { font-size: 1.4rem; font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.main { padding-top: 28px; padding-bottom: 72px; min-height: 60vh; }
.narrow { max-width: 540px; margin: 0 auto; }
.narrow.wide { max-width: 860px; }
.prose { max-width: 68ch; }
.section { margin-top: 52px; }

/* Header: black bar with the flag's yellow and red stripes underneath */
.topbar { background: var(--black); color: #F4F2EC; position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top, 0px); }
.topbar-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; gap: 10px; align-items: center; color: #fff; text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; }
.brand:hover { color: #fff; }
.brand-mark { color: var(--sun); display: flex; }
.topbar::after { content: ""; display: block; height: 8px; background: linear-gradient(to bottom, var(--sun) 0 50%, #D90000 50% 100%); }
.mainnav { display: flex; gap: 6px; align-items: center; margin: 0 auto; }
.mainnav a { color: rgba(244, 239, 230, .85); text-decoration: none; font-weight: 500; padding: 8px 16px; border-radius: 99px; }
.mainnav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.mainnav a.active { color: #111; background: var(--sun); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #F4EFE6; cursor: pointer; position: relative; text-decoration: none; }
.icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.topbar .btn-outline { background: transparent; color: #F4EFE6; border-color: rgba(255,255,255,.35); }
.topbar .btn-outline:hover { background: rgba(255,255,255,.08); color: #fff; }
.show-dark { display: none; }
:root[data-theme="dark"] .show-dark { display: inline; }
:root[data-theme="dark"] .show-light { display: none; }
.dot-count { position: absolute; top: -4px; right: -4px; background: var(--sun); color: #111; font-size: .7rem; font-weight: 700; border-radius: 99px; padding: 1px 6px; }
.nav-toggle { display: none; }
.nav-mobile-only { display: none; }
@media (max-width: 960px) { .nav-desktop-only { display: none; } }
@media (max-width: 800px) {
  .topbar-inner { flex-wrap: wrap; min-height: 62px; }
  .topbar-actions { margin-left: auto; }
  .nav-toggle { display: inline-grid; }
  .mainnav { display: none; order: 3; width: 100%; flex-direction: column; align-items: stretch; gap: 2px; margin: 0 0 12px; }
  .mainnav.open { display: flex; }
  .mainnav a { border-radius: 10px; }
  .nav-mobile-only { display: block; }
}

/* Page title band: black with faint yellow dots */
.page-head { background: #141414 radial-gradient(rgba(252,220,4,.12) 1px, transparent 1.5px) 0 0 / 18px 18px; color: #F4EFE6; padding: 40px 0 44px; }
.page-head h1 { color: #fff; margin-bottom: 6px; }
.page-head h1::before { content: ""; display: block; width: 48px; height: 5px; background: var(--sun); border-radius: 3px; margin-bottom: 14px; }
.page-head p { color: rgba(244, 239, 230, .85); font-size: 1.15rem; margin: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: #fff; border: 1px solid var(--accent);
  border-radius: 12px; padding: 11px 20px; font: 700 1rem var(--font-body); text-decoration: none; cursor: pointer; line-height: 1.2;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-outline, .btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn-outline:hover, .btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--muted); }
.btn-small { padding: 7px 13px; font-size: .92rem; }
.btn-block { display: flex; width: 100%; }
.link-button { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer; }
.link-button.danger { color: var(--danger); }
.link-quiet { color: var(--muted); font-size: .93rem; }

/* Search: one card, search row on top, filters underneath */
.search-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.searchbar { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); }
.searchbar-icon { color: var(--accent); display: flex; }
.searchbar input { min-height: 0; border: 0; background: transparent; font-size: 1.08rem; padding: 10px 4px; flex: 1; outline: none; min-width: 0; }
.searchbar input:focus { outline: none; box-shadow: none; }
.filter-toggle { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 12px; padding: 10px 14px; font: 500 .95rem var(--font-body); cursor: pointer; }
.filter-toggle[aria-expanded="true"] { background: #111; border-color: #111; color: var(--sun); }
.search-go { padding: 12px 24px; }
.filter-panel { padding: 20px; background: var(--surface); }
.filter-panel[hidden] { display: none; }
.filter-grid { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 16px; align-items: end; }
.filter-grid .field { margin: 0; min-width: 0; }
.filter-submit { height: 54px; padding: 0 28px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.filter-row select { width: auto; min-width: 190px; min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
.filter-row .check { margin: 0; }
@media (max-width: 900px) { .filter-grid { grid-template-columns: 1fr 1fr; } .filter-submit { grid-column: 1 / -1; } }
@media (max-width: 600px) {
  .searchbar { flex-wrap: wrap; }
  .searchbar input { flex-basis: calc(100% - 40px); }
  .filter-toggle, .search-go { flex: 1; justify-content: center; }
  .filter-grid { grid-template-columns: 1fr; } .filter-row select { width: 100%; }
}
.result-count { color: var(--muted); margin: 28px 0 18px; font-size: 1.02rem; }
.result-count::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); margin-right: 8px; vertical-align: 2px; }
.empty-box { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 30px; text-align: center; }

/* Home hero */
.hero { padding: 36px 0 8px; }
.hero h1 { font-size: clamp(2.4rem, 6.5vw, 4.2rem); max-width: 14ch; line-height: 1.02; color: #111; }
.hero h1::after { content: ""; display: block; width: 90px; height: 8px; margin-top: 14px; background: linear-gradient(to right, #111 0 33%, var(--sun) 33% 66%, #D90000 66%); border-radius: 4px; }
:root[data-theme="dark"] .hero h1 { color: var(--text); }
.hero-search { display: grid; grid-template-columns: 2fr 1.3fr 1.3fr auto; gap: 10px; background: var(--surface); padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); max-width: 940px; box-shadow: var(--shadow); }
.hero-search select { border: 0; background-color: var(--surface-2); }
@media (max-width: 720px) { .hero-search { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; max-width: 940px; }
.chip { padding: 7px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); font-weight: 500; font-size: .95rem; }
.chip span { color: var(--accent); margin-left: 4px; font-weight: 700; }
.chip:hover { border-color: #111; background: var(--sun); color: #111; }
.chip:hover span { color: #111; }

/* Forms */
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 600; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; flex: 1; min-width: 140px; }
.field label { font-weight: 600; font-size: .95rem; }
.field small { color: var(--muted); font-size: .85rem; }
input, select, textarea {
  font: inherit; font-size: 1.05rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 18px; width: 100%; min-height: 54px;
}
textarea { min-height: 0; }
select { appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236B7280' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; padding: 0; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.otp { font-size: 1.6rem; letter-spacing: .4em; text-align: center; }
.amen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 12px; }
.form h2 { margin-top: 26px; }
.form h2:first-of-type { margin-top: 0; }
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented legend { width: 100%; }
.segmented label { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 14px; display: flex; gap: 6px; align-items: center; cursor: pointer; }
.segmented label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 12px; }
.inline-form .field { margin-bottom: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; background: var(--surface); padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 18px; }
.filters .field { margin-bottom: 0; flex: 1 1 160px; }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.row-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); }
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.two-col, .how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 820px) { .two-col, .how-grid { grid-template-columns: 1fr; } }
.notice { background: var(--warn-soft); color: var(--warn-text); border-left: 4px solid var(--featured); padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.notice a { color: inherit; font-weight: 600; }
.empty { color: var(--muted); padding: 18px 0; }
.quote { border-left: 3px solid var(--line); padding-left: 10px; color: var(--muted); margin: 8px 0 0; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { display: flex; gap: 10px; margin-bottom: 12px; }
.ticks .icon { color: var(--success); margin-top: 3px; }

.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 14px; font-weight: 500; }
.flash-success { background: var(--success-soft); color: var(--success); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-info { background: var(--accent-soft); color: var(--accent-dark); }

/* Listing cards: price chip on the photo, ribbon for featured */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 26px; }
.pcard { position: relative; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.pcard-img { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--surface-2); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.pcard-noimg { display: grid; place-items: center; height: 100%; color: var(--muted); min-height: 170px; }
.price-chip { position: absolute; left: 12px; bottom: 12px; background: #111; color: var(--sun); font-weight: 700; font-size: 1.02rem; padding: 6px 12px; border-radius: 10px; }
.price-chip small { font-weight: 400; color: #fff; opacity: .8; margin-left: 2px; }
.tag-featured { position: absolute; top: 14px; left: 0; display: inline-flex; align-items: center; gap: 5px; background: var(--sun); color: #111; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; padding: 5px 12px 5px 12px; border-radius: 0 8px 8px 0; }
.save-form { position: absolute; top: 10px; right: 10px; margin: 0; }
.heart { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255,255,255,.95); color: #3A3530; display: grid; place-items: center; cursor: pointer; }
.heart:hover, .heart.is-saved { color: var(--accent); }
.heart.is-saved .icon { fill: currentColor; }
.pcard-body { display: block; padding: 16px 18px 18px; text-decoration: none; color: var(--text); flex: 1; }
.pcard-body:hover { color: var(--text); }
.pcard h3 { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; margin-bottom: 6px; }
.pcard-price small, .price-big small { font-family: var(--font-body); font-weight: 400; font-size: .85rem; color: var(--muted); }
.pcard-meta { margin: 0 0 12px; font-size: .92rem; color: var(--muted); display: flex; gap: 4px; align-items: center; }
.pcard-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding-top: 12px; border-top: 1px dashed var(--line); }
.pcard-tags span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .82rem; padding: 2px 0; margin-right: 8px; }
.pcard-tags .tag-verified { background: var(--success-soft); color: var(--success); font-weight: 700; padding: 2px 9px; border-radius: 6px; margin-right: 0; }

/* Listing detail */
.listing { display: grid; grid-template-columns: 1.35fr 1fr; gap: 30px; }
@media (max-width: 900px) { .listing { grid-template-columns: 1fr; } }
.gallery-main { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; }
.gallery-thumbs button { border: 0; padding: 0; background: none; cursor: pointer; flex: 0 0 86px; }
.gallery-thumbs img { width: 86px; height: 64px; object-fit: cover; border-radius: 8px; }
.price-big { font-family: var(--font-head); font-weight: 700; font-size: 1.9rem; margin: 0; color: var(--accent-dark); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 18px 0; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.facts dt { font-size: .82rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.amenities { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.amenities li { background: var(--accent-soft); color: var(--accent-dark); border-radius: 99px; padding: 4px 12px; font-size: .9rem; }
.desc { margin: 16px 0; max-width: 65ch; }
.book .card { max-width: 660px; }
.agent-option { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; }
.agent-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.verified { background: var(--success-soft); color: var(--success); font-size: .78rem; padding: 2px 9px; border-radius: 99px; font-weight: 600; }
.stars { color: var(--featured); font-weight: 600; }

.rating { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rating legend { width: 100%; }
.rating input { position: absolute; opacity: 0; }
.rating label { font-size: 2.2rem; color: var(--line); cursor: pointer; }
.rating input:checked ~ label, .rating label:hover, .rating label:hover ~ label { color: var(--featured); }
.rating input:focus-visible + label { outline: 3px solid var(--accent); }

/* Badges */
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-active, .badge-approved, .badge-confirmed, .badge-successful, .badge-completed { background: var(--success-soft); color: var(--success); }
.badge-pending, .badge-pending_review, .badge-requested, .badge-awaiting_payment, .badge-wants_to_show, .badge-invited, .badge-waiting { background: var(--warn-soft); color: var(--warn-text); }
.badge-failed, .badge-rejected, .badge-removed, .badge-suspended, .badge-declined, .badge-no_show { background: var(--danger-soft); color: var(--danger); }

/* Dashboards */
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin: 16px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--muted); box-shadow: var(--shadow); }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.9rem; color: var(--text); }
a.stat:hover { border-color: var(--accent); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 500; margin-bottom: -1px; border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.admin-tabs { margin-bottom: 26px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
table input, table select, .inline-form input, .inline-form select { min-height: 40px; padding: 8px 12px; font-size: .95rem; }
.alerts { list-style: none; padding: 0; margin: 0; }
.alerts li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.alerts li.unread { font-weight: 600; }
.alerts time { color: var(--muted); font-size: .85rem; font-weight: 400; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.photo-grid figure { margin: 0; }
.photo-grid img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; width: 100%; }
.id-photos { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.id-photos img { max-height: 220px; border-radius: 8px; border: 1px solid var(--line); }
.review-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.review-row .thumb { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; }
.grow { flex: 1 1 260px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.networks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.networks legend { grid-column: 1 / -1; }
.network { display: flex; gap: 8px; align-items: center; padding: 14px; border-radius: var(--radius-sm); border: 2px solid var(--line); font-weight: 600; cursor: pointer; }
.network-mtn:has(input:checked) { border-color: #E0B000; background: rgba(255, 204, 0, .15); }
.network-airtel:has(input:checked) { border-color: #D0241B; background: rgba(208, 36, 27, .1); }

.steps { padding-left: 1.3em; max-width: 60ch; }
.steps li { margin-bottom: 10px; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 26px; }
.pager a { padding: 7px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; background: var(--surface); color: var(--text); }
.pager a[aria-current="page"] { background: var(--accent); color: #fff; border-color: var(--accent); }

.footer { background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); padding: 30px 0 calc(30px + env(safe-area-inset-bottom, 0px)); }
.footer strong { color: var(--text); }
.footer a { color: var(--text); margin-right: 18px; text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer-inner p { margin: 0 0 8px; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media (max-width: 480px) {
  .brand { font-size: 1.1rem; gap: 6px; }
  .brand-mark .icon { width: 26px; height: 26px; }
  .topbar-actions { gap: 6px; }
  .icon-btn { width: 40px; height: 40px; }
  .topbar-actions .btn { padding: 8px 12px; }
  .page-head { padding: 28px 0 30px; }
  .page-head p { font-size: 1.05rem; }
}

/* Ownership verification */
.badge-needs_info, .badge-not_submitted { background: var(--warn-soft); color: var(--warn-text); }
.badge-denied { background: var(--danger-soft); color: var(--danger); }
.tag-owner { display: inline-flex; align-items: center; gap: 5px; background: var(--success-soft); color: var(--success); font-weight: 600; font-size: .85rem; padding: 4px 11px; border-radius: 99px; cursor: help; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ownership-card { border-left: 4px solid var(--featured); }
.ownership-card.ownership-approved { border-left-color: var(--success); }
.ownership-card.ownership-rejected { border-left-color: var(--danger); }
.ticks li.todo { color: var(--text); }
.ticks li.done { color: var(--muted); }
.todo-dot { width: 14px; height: 14px; border: 2px solid var(--featured); border-radius: 50%; flex: none; margin-top: 5px; }
.upload-row { border-top: 1px solid var(--line); padding-top: 12px; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.doc-grid figure { margin: 0; }
.doc-grid img { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.pdf-tile { display: grid; place-items: center; height: 200px; border-radius: 8px; border: 1px dashed var(--line); background: var(--surface-2); font-weight: 600; text-decoration: none; }
.doc-grid figcaption { margin-top: 6px; font-size: .9rem; }
[hidden] { display: none !important; }

/* Home: feature list + testimonials (left-aligned, numbered, quote marks) */
.panel { background: #111; color: #F4F2EC; border-radius: 26px; padding: 44px; border-top: 8px solid var(--sun); border-bottom: 8px solid #D90000; }
.panel .section-title { color: #fff; }
.panel .section-sub { color: rgba(244, 242, 236, .8); }
.section-title { font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin-bottom: 6px; }
.section-sub { color: var(--muted); font-size: 1.1rem; margin-bottom: 28px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid rgba(255,255,255,.14); }
@media (max-width: 1000px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } .panel { padding: 26px; } }
.feature { padding: 26px 24px 8px 0; text-align: left; border-right: 1px solid rgba(255,255,255,.1); }
.feature + .feature { padding-left: 24px; }
.feature:last-child { border-right: 0; }
@media (max-width: 1000px) { .feature { border-right: 0; padding-left: 0 !important; } }
.feature h3 { font-size: 1.2rem; margin: 16px 0 8px; color: #fff; }
.feature p { color: rgba(244, 239, 230, .78); margin: 0; font-size: .97rem; }
.feature-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--sun); color: #111; }
.feature-icon-red { background: #D90000; color: #fff; }
.how-steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.how-steps li { counter-increment: step; color: var(--muted); padding-top: 14px; border-top: 3px solid var(--line); }
.how-steps li:first-child { border-top-color: var(--accent); }
.how-steps li::before { content: "0" counter(step); display: block; font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: 10px; }
.how-steps strong { display: block; color: var(--text); margin-bottom: 4px; font-size: 1.05rem; }
@media (max-width: 900px) { .how-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .how-steps { grid-template-columns: 1fr; } }
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
@media (max-width: 900px) { .testimonials { grid-template-columns: 1fr; } }
.testimonial { position: relative; margin: 0; background: var(--surface); border-radius: var(--radius); padding: 30px 28px 26px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.testimonial::before { content: "\201C"; position: absolute; top: 4px; right: 20px; font-family: var(--font-head); font-size: 6rem; line-height: 1; color: var(--accent-soft); }
.t-stars { color: #E0B000; letter-spacing: 2px; margin-bottom: 12px; position: relative; }
.t-stars-off { color: var(--line); }
.testimonial blockquote { margin: 0 0 22px; font-family: var(--font-head); font-size: 1.12rem; line-height: 1.55; flex: 1; position: relative; }
.testimonial figcaption { display: flex; gap: 12px; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }
.avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #111; color: var(--sun); font-weight: 700; font-size: 1.15rem; flex: none; }
.testimonial:nth-child(2) .avatar { background: #D90000; color: #fff; }
.testimonial:nth-child(3) .avatar { background: var(--sun); color: #111; }

/* Frosted-glass cards
   Cards are slightly see-through and blur what's behind them. The page gets a faint
   yellow/red glow in the background so the transparency is actually visible. */
:root { --glass: rgba(255, 255, 255, .6); --glass-line: rgba(255, 255, 255, .7); --glass-blur: 14px; }
:root[data-theme="dark"] { --glass: rgba(28, 28, 28, .62); --glass-line: rgba(255, 255, 255, .08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --glass: rgba(28, 28, 28, .62); --glass-line: rgba(255, 255, 255, .08); } }

body {
  background:
    radial-gradient(900px 700px at 5% 20%, rgba(252, 220, 4, .30), transparent 60%),
    radial-gradient(800px 700px at 95% 45%, rgba(217, 0, 0, .16), transparent 60%),
    radial-gradient(900px 600px at 40% 100%, rgba(252, 220, 4, .20), transparent 60%),
    var(--bg);
}

.card, .pcard, .search-block, .filter-panel, .testimonial, .filters, .stat, .table-wrap,
.facts div, .empty-box, .hero-search, .chip, .agent-option, .feature-card {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
}
.filter-panel { border: 0; }                 /* sits inside the search card */
.pcard-body { background: transparent; }
th { background: rgba(0, 0, 0, .03); }

/* Keep form fields solid so text stays easy to read */
input, select, textarea { background-color: var(--surface); }
.hero-search select { background-color: var(--surface-2); }

/* Older browsers without blur: fall back to solid cards */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .pcard, .search-block, .testimonial, .filters, .stat, .table-wrap, .facts div, .empty-box, .hero-search, .chip, .agent-option {
    background: var(--surface);
  }
}
.panel { background: rgba(17, 17, 17, .86); -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur)); }


/* ---------- Motion: hover reactions + slide-in on scroll ---------- */
:root { --hover-shadow: 0 2px 0 rgba(20, 20, 20, .04), 0 22px 40px -18px rgba(20, 20, 20, .35); --ease-out: cubic-bezier(.2, .75, .25, 1); }

/* Everything that reacts shares the same smooth timing */
.pcard, .testimonial, .feature, .how-steps li, .stat, .card, .chip, .price-chip, .heart, .feature-icon, .pcard-img img, .avatar {
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s ease, background-color .3s ease, color .3s ease,
              opacity .7s var(--ease-out), translate .7s var(--ease-out);
}

@media (hover: hover) {
  /* Property cards: lift, flag-yellow edge, photo zooms, price tag turns red */
  .pcard:hover { transform: translateY(-8px); box-shadow: var(--hover-shadow); border-color: var(--sun); }
  .pcard:hover .pcard-img img { transform: scale(1.07); }
  .pcard:hover .price-chip { background: #D90000; color: #fff; transform: translateY(-2px); }
  .pcard:hover .price-chip small { color: #fff; }
  .pcard:hover h3 { color: var(--accent); }
  .pcard-img { overflow: hidden; }
  .heart:hover { transform: scale(1.15); }
  .heart:active { transform: scale(.9); }

  /* Testimonials: lift and tilt slightly, quote mark warms up */
  .testimonial:hover { transform: translateY(-6px) rotate(-.5deg); box-shadow: var(--hover-shadow); border-color: var(--sun); }
  .testimonial:hover:nth-child(even) { transform: translateY(-6px) rotate(.5deg); }
  .testimonial:hover::before { color: rgba(252, 220, 4, .55); }
  .testimonial:hover .avatar { transform: rotate(-8deg) scale(1.08); }

  /* Why-choose features: glow and a little icon bounce */
  .feature:hover { background-color: rgba(255, 255, 255, .05); }
  .feature:hover .feature-icon { transform: translateY(-4px) rotate(-8deg) scale(1.1); }

  /* Steps: underline turns red, number nudges */
  .how-steps li:hover { border-top-color: var(--accent); transform: translateY(-4px); }

  /* Dashboard stats, plans and info cards */
  a.stat:hover, .plan:hover, .how-grid .card:hover { transform: translateY(-5px); box-shadow: var(--hover-shadow); border-color: var(--sun); }
  .chip:hover { transform: translateY(-2px); }
}
.pcard:focus-within { border-color: var(--sun); }

/* Slide-in: the <head> script adds .js-reveal early (no flash); app.js then reveals each card.
   If app.js ever fails to load, the head script removes .js-reveal after 2.5s so nothing stays hidden. */
.js-reveal :is(.pcard, .testimonial, .feature, .how-steps li, .stat, .plan, .how-grid .card, .row-card, .alerts li, .chip, .result-count, .section-title, .section-sub):not(.is-visible) {
  opacity: 0; translate: 0 36px;
}
.js-reveal :is(.row-card, .alerts li):not(.is-visible) { translate: -36px 0; }

@media (prefers-reduced-motion: reduce) {
  .pcard, .testimonial, .feature, .how-steps li, .stat, .card, .chip, .price-chip, .heart, .feature-icon, .pcard-img img, .avatar { transition: none; }
  .pcard:hover, .testimonial:hover, .how-steps li:hover, a.stat:hover, .plan:hover, .how-grid .card:hover { transform: none; }
  .pcard:hover .pcard-img img { transform: none; }
}

/* ---------- Sign up / log in ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 12px 0 20px; }
.auth-card { width: 100%; max-width: 560px; padding: 40px 44px; border-radius: 22px; border-top: 6px solid var(--sun); }
.auth-card h1 { font-size: clamp(1.8rem, 3.5vw, 2.3rem); margin-bottom: 8px; }
.auth-card .lead { font-size: 1.02rem; margin-bottom: 26px; }
@media (max-width: 560px) { .auth-card { padding: 28px 22px; } }

.role-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.role-tiles legend { grid-column: 1 / -1; font-weight: 700; margin-bottom: 10px; }
.role-tiles label { position: relative; cursor: pointer; }
.role-tiles input { position: absolute; opacity: 0; inset: 0; }
.role-tiles span { display: grid; place-items: center; min-height: 58px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 700; transition: border-color .2s, background-color .2s, transform .2s; }
.role-tiles label:hover span { border-color: #111; transform: translateY(-2px); }
.role-tiles input:checked + span { border-color: #111; background: var(--sun); color: #111; box-shadow: 0 4px 0 #111; }
.role-tiles input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.btn-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 52px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text); font-weight: 700; text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.btn-google:hover { color: var(--text); border-color: #111; box-shadow: 0 4px 0 rgba(0,0,0,.08); }
.btn-google svg { flex: none; }
.or-divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .92rem; margin: 22px 0; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Admin area: sidebar menu ---------- */
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.admin-side { position: sticky; top: 96px; }
.admin-menu { background: #111; color: #EDEBE6; border-radius: var(--radius); padding: 16px 12px 12px; border-top: 5px solid var(--sun); border-bottom: 5px solid #D90000; max-height: calc(100vh - 120px); overflow-y: auto; }
.admin-who { display: flex; gap: 10px; align-items: center; padding: 4px 8px 14px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 6px; line-height: 1.3; }
.admin-who .avatar { width: 38px; height: 38px; font-size: 1rem; border-radius: 10px; background: var(--sun); color: #111; }
.admin-who .small { color: rgba(237,235,230,.65); }
.admin-group { margin: 14px 10px 6px; font-size: .78rem; font-weight: 700; color: rgba(237,235,230,.5); letter-spacing: .04em; }
.admin-menu ul { list-style: none; margin: 0; padding: 0; }
.admin-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: rgba(237,235,230,.88); text-decoration: none; font-weight: 500; }
.admin-menu a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-menu a[aria-current="page"] { background: var(--sun); color: #111; font-weight: 700; }
.admin-menu a span { flex: 1; }
.admin-count { background: #D90000; color: #fff; font-size: .75rem; font-weight: 700; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 99px; }
.admin-menu a[aria-current="page"] .admin-count { background: #111; color: var(--sun); }
.admin-side-toggle { display: none; }
.admin-main { min-width: 0; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; gap: 16px; }
  .admin-side { position: static; }
  .admin-side-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; border: 0; border-radius: 12px; background: #111; color: var(--sun); font: 700 1rem var(--font-body); cursor: pointer; }
  .admin-menu { display: none; margin-top: 8px; max-height: none; }
  .admin-side.open .admin-menu { display: block; }
}

/* Staff & roles */
.role-guide { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 18px 0 24px; }
.role-guide div { background: var(--glass, var(--surface)); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; font-size: .92rem; }
.staff-found { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.staff-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.staff-role { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); flex-wrap: wrap; }
.staff-role span { flex: 1; font-weight: 700; }
.staff-role.on { border-color: #111; background: var(--sun); color: #111; }
.staff-role.on .link-button.danger { color: #8B0000; }
.staff-role input[type=password] { min-height: 38px; padding: 6px 10px; font-size: .9rem; flex-basis: 100%; }
.row-warn td { background: var(--danger-soft); }
.notice-card { border-left: 5px solid var(--sun); }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

/* Admin tools */
.account-action { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.account-action:last-child { border-bottom: 0; }
.account-action > div { flex: 1; }
.account-action input { min-height: 40px; padding: 8px 12px; font-size: .95rem; }
.danger-zone strong { color: var(--danger); }
.danger-zone .btn { background: var(--danger); border-color: var(--danger); }
.mt { margin-top: 8px; }
fieldset[disabled] input { opacity: .75; cursor: not-allowed; }
details.edit-box, details.refund { margin-top: 8px; }
details.edit-box summary, details.refund summary { cursor: pointer; list-style: none; display: inline; }
details.edit-box summary::-webkit-details-marker, details.refund summary::-webkit-details-marker { display: none; }
details[open] > summary { font-weight: 700; }
details.edit-box form, details.refund form { margin-top: 10px; }
details.refund input { min-height: 38px; padding: 6px 10px; font-size: .9rem; margin-bottom: 6px; }
.table-wrap td .inline-form { margin-top: 6px; }
.table-wrap td .inline-form input, .table-wrap td .inline-form select { width: auto; min-width: 140px; }

/* ---------- Live chat: visitor bubble ---------- */
.rl-chat { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60; font-family: var(--font-body); }
.rl-chat-bubble { position: relative; width: 60px; height: 60px; border-radius: 50%; border: 3px solid var(--sun); background: #111; color: var(--sun);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 26px -8px rgba(0,0,0,.5); transition: transform .2s var(--ease-out, ease); }
.rl-chat-bubble:hover { transform: translateY(-3px) scale(1.04); }
.rl-chat.is-open .rl-chat-bubble { transform: scale(.92); }
.rl-chat-count { position: absolute; top: -4px; right: -4px; background: #D90000; color: #fff; font-size: .75rem; font-weight: 700; min-width: 22px; padding: 1px 6px; border-radius: 99px; border: 2px solid #fff; }
.rl-chat-panel { position: absolute; right: 0; bottom: 74px; width: 370px; max-width: calc(100vw - 36px); height: 540px; max-height: calc(100vh - 120px);
  display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px -18px rgba(0,0,0,.45); border: 1px solid var(--line); }
.rl-chat-panel[hidden] { display: none; }
.rl-chat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 16px 12px; background: #111; color: #fff;
  border-bottom: 6px solid transparent; border-image: linear-gradient(to bottom, var(--sun) 0 50%, #D90000 50%) 1; }
.rl-chat-head strong { display: block; font-family: var(--font-head); font-size: 1.1rem; }
.rl-chat-head span { font-size: .82rem; color: rgba(255,255,255,.7); }
.rl-chat-close { background: none; border: 0; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.rl-chat-tools { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: .88rem; }
.rl-chat-who { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.rl-chat-who .avatar { width: 28px; height: 28px; font-size: .85rem; border-radius: 8px; background: var(--sun); color: #111; }
.rl-chat-tools button { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font: 600 .8rem var(--font-body); color: var(--text); cursor: pointer; }
.rl-chat-tools button:disabled { opacity: .45; cursor: default; }
#end-chat:not(:disabled) { color: var(--danger); border-color: var(--danger-soft); }
.rl-chat-messages, .console-messages { flex: 1; overflow-y: auto; padding: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.rl-chat-loading { color: var(--muted); text-align: center; margin: auto; }
/* message bubbles from the shared chat scripts (.message-visitor / -agent / -system) */
.rl-chat .message, .console .message { max-width: 85%; padding: 9px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; }
.rl-chat .message strong, .console .message strong { display: block; font-size: .75rem; color: var(--muted); margin-bottom: 2px; }
.rl-chat .message p, .console .message p { margin: 0; white-space: pre-wrap; word-wrap: break-word; }
.rl-chat .message-visitor { align-self: flex-end; background: #111; color: #fff; border-color: #111; border-bottom-right-radius: 4px; }
.rl-chat .message-visitor strong { color: var(--sun); }
.rl-chat .message-agent { border-left: 4px solid var(--sun); border-bottom-left-radius: 4px; }
.message-system { align-self: center !important; background: transparent !important; border: 0 !important; text-align: center; font-size: .85rem; color: var(--muted); max-width: 95% !important; }
.message-system strong { display: none !important; }
.rl-chat-form, .console-form { padding: 10px 12px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.rl-chat-form textarea, .console-form textarea { min-height: 0; resize: none; padding: 10px 12px; font-size: .98rem; }
.rl-chat-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.emoji-button { background: none; border: 0; font-size: 1.15rem; cursor: pointer; padding: 2px 3px; border-radius: 6px; }
.emoji-button:hover { background: var(--surface-2); }
.emoji-button:disabled { opacity: .4; cursor: default; }
.rl-chat-note { margin: 8px 0 0; font-size: .75rem; color: var(--muted); }
.rl-chat-login { padding: 22px 18px; display: flex; flex-direction: column; gap: 10px; }
.rl-chat-login p { margin: 0; }
@media (max-width: 480px) {
  .rl-chat { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .rl-chat-panel { position: fixed; inset: auto 8px calc(84px + env(safe-area-inset-bottom, 0px)) 8px; width: auto; max-width: none; height: calc(100vh - 140px); }
}

/* ---------- Live chat: agent console (admin) ---------- */
.console { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; height: calc(100vh - 230px); min-height: 480px; margin: 12px 0 18px; }
.console-list, .console-chat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.console-tools { display: flex; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line); }
.console-tools select, .console-tools input { min-height: 40px; padding: 6px 10px; font-size: .92rem; }
.console-tools select { padding-right: 34px; }
.icon-btn-light { flex: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.console-sessions { flex: 1; overflow-y: auto; }
.console .session-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; cursor: pointer; font: inherit; color: var(--text); }
.console .session-item:hover { background: var(--surface-2); }
.console .session-item.is-active { background: var(--sun); color: #111; }
.console .session-item strong { font-weight: 700; }
.console .session-item em { grid-column: 2; grid-row: 1; font-style: normal; background: #D90000; color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; align-self: center; }
.console .session-item span { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console .session-item.is-active span, .console .session-item.is-active small { color: #333; }
.console .session-item small { grid-column: 1 / -1; color: var(--muted); font-size: .76rem; }
.console-chat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.console-chat-head h2 { font-size: 1.1rem; margin: 0; }
.console .message-visitor { align-self: flex-start; border-left: 4px solid #111; }
.console .message-agent { align-self: flex-end; background: #111; color: #fff; border-color: #111; }
.console .message-agent strong { color: var(--sun); }
.empty-state { color: var(--muted); text-align: center; margin: auto; padding: 20px; }
.admin-count.big { font-size: .95rem; padding: 4px 12px; }
.console-help summary { cursor: pointer; }
@media (max-width: 900px) { .console { grid-template-columns: 1fr; height: auto; } .console-sessions { max-height: 260px; } .console-messages { min-height: 320px; } }
