/* SoulEstate DataBase — mobile-first UI */
:root {
  --navy: #163A64;
  --navy-2: #0F2A4A;
  --orange: #E8552B;
  --orange-2: #C9441F;
  --bg: #F3F5F9;
  --card: #FFFFFF;
  --ink: #142235;
  --ink-2: #4A5A70;
  --ink-3: #8A97A8;
  --line: #E3E8EF;
  --soft: #EBF0F6;
  --ok: #1E8A5B;
  --warn: #C98A12;
  --danger: #C4352B;
  --shadow: 0 1px 2px rgba(16, 36, 64, .06), 0 6px 20px rgba(16, 36, 64, .07);
  --shadow-lg: 0 20px 50px rgba(10, 25, 45, .22);
  --r: 18px;
  --r-sm: 12px;
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --primary: #163A64;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
html { overflow-x: clip; }
#view, .detail, .detail-cols > * { min-width: 0; }
h1, h2, h3, h4 { overflow-wrap: anywhere; }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.2; }
.hidden { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
svg.i { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 17px; height: 17px; }
svg.i.lg { width: 28px; height: 28px; }

/* ---------- app shell ---------- */
#app { min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
}
.topbar .brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -.02em; }
.topbar .brand svg { width: 38px; height: 22px; }
.topbar .brand .wm { font-size: 17px; }
.topbar .brand b { color: var(--logo-ink, #163A64); font-weight: 800; }
.topbar .brand span { font-weight: 500; color: var(--logo-ink, #163A64); }
.topbar .brand em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .14em; color: #fff; background: var(--orange); padding: 3px 6px 2px; border-radius: 6px; margin-left: 2px; }
.topbar h1 { font-size: 20px; }
.iconbtn {
  position: relative; display: grid; place-items: center; width: 42px; height: 42px;
  border: 0; border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); cursor: pointer;
}
.iconbtn.plain { background: transparent; box-shadow: none; }
.iconbtn .dot { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--card); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; }

main.view { padding: 4px 16px calc(var(--nav-h) + var(--safe-b) + 28px); max-width: 1240px; margin: 0 auto; }
main.view.flush { padding-left: 0; padding-right: 0; padding-top: 0; }

/* bottom nav */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--ink-3); position: relative; }
.bottomnav a.on { color: var(--navy); }
.bottomnav a.on::before { content: ''; position: absolute; top: -9px; width: 26px; height: 3px; border-radius: 3px; background: var(--orange); }
.bottomnav a .dot { position: absolute; top: -4px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 10px; display: grid; place-items: center; }
.fab {
  justify-self: center; width: 58px; height: 58px; margin-top: -26px; border-radius: 20px; border: 0;
  background: linear-gradient(145deg, #F06A3F, var(--orange-2)); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(232, 85, 43, .45); cursor: pointer; transition: transform .15s;
}
.fab:active { transform: scale(.94); }
.fab svg.i { width: 28px; height: 28px; stroke-width: 2.4; }

.sidenav { display: none; }

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  body { padding-left: 250px; }
  .bottomnav { display: none; }
  .sidenav {
    display: flex; flex-direction: column; gap: 4px; position: fixed; top: 0; bottom: 0; left: 0; width: 250px; padding: 22px 16px;
    background: var(--navy-2); color: #C9D6E8; z-index: 40;
  }
  .sidenav .logo { padding: 4px 6px 22px; }
  .sidenav .logo svg { width: 100%; height: auto; }
  .sidenav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 600; }
  .sidenav a:hover { background: rgba(255,255,255,.06); }
  .sidenav a.on { background: rgba(255,255,255,.1); color: #fff; }
  .sidenav a .dot { margin-left: auto; background: var(--orange); color: #fff; border-radius: 9px; font-size: 11px; padding: 1px 7px; font-weight: 800; }
  .sidenav .new { margin: 8px 0 14px; justify-content: center; background: var(--orange); color: #fff; font-weight: 800; }
  .sidenav .new:hover { background: var(--orange-2); }
  .sidenav .me-wrap { margin-top: auto; position: relative; }
  .sidenav .me { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; border-radius: 14px; background: rgba(255,255,255,.05); color: #C9D6E8; cursor: pointer; text-align: left; transition: background .15s; }
  .sidenav .me:hover, .sidenav .me[aria-expanded="true"] { background: rgba(255,255,255,.12); }
  .sidenav .me > svg.i { transform: rotate(-90deg); opacity: .6; transition: transform .15s; }
  .sidenav .me[aria-expanded="true"] > svg.i { transform: rotate(90deg); }
  .sidenav .me-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); padding: 6px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; z-index: 50; animation: tin .15s ease-out; }
  .sidenav .me-menu.hidden { display: none; }
  .sidenav .me-menu a, .sidenav .me-menu button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font-weight: 650; font-size: 14px; text-align: left; cursor: pointer; }
  .sidenav .me-menu a:hover, .sidenav .me-menu button:hover { background: var(--soft); }
  .sidenav .me-menu svg.i { width: 18px; height: 18px; color: var(--ink-2); }
  .sidenav .me-menu .danger, .sidenav .me-menu .danger svg.i { color: var(--danger); }
  .sidenav .me-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
  .topbar .brand { display: none; }
  main.view { padding: 8px 32px 48px; }
  main.view.flush { padding: 0 0 48px; }
}

/* ---------- cards / lists ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 16px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 2px 10px; }
.section-h h2 { font-size: 18px; }
.section-h a { color: var(--orange); font-weight: 700; font-size: 14px; }

.hello { margin: 6px 2px 16px; }
.hello h1 { font-size: 26px; }
.hello p { margin: 4px 0 0; color: var(--ink-2); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 14px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.stat b { display: block; font-size: 26px; letter-spacing: -.03em; }
.stat span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.stat.hl { background: linear-gradient(150deg, var(--navy-2), #1D4A7E); color: #fff; }
.stat.hl span { color: #AFC3DD; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 8px; margin: 0 -16px; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card); font-weight: 650; font-size: 13.5px; cursor: pointer; white-space: nowrap; user-select: none;
  transition: background .15s, border-color .15s, color .15s;
}
.chip .sw { width: 9px; height: 9px; border-radius: 50%; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.on .sw { background: #fff !important; }
.chip.or.on { background: var(--orange); border-color: var(--orange); }
.chip.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; white-space: nowrap; flex: none; padding: 0 9px; border-radius: 7px; font-size: 11.5px; font-weight: 700; background: var(--soft); color: var(--ink-2); }
.tag .sw { width: 7px; height: 7px; border-radius: 50%; }

.seg { display: flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--soft); }
.seg button { flex: 1; height: 36px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; font-size: 13.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* status badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .01em; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.draft { background: #EEF1F5; color: #5A6B80; }
.badge.review { background: #FFF2DA; color: #A86D00; }
.badge.published { background: #DFF4E8; color: #15784C; }
.badge.archived { background: #F1E7E6; color: #9A3B32; }

/* listing cards */
.grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lcard { display: block; overflow: hidden; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); transition: transform .15s; }
.lcard:active { transform: scale(.985); }
.lcard .ph { position: relative; aspect-ratio: 16 / 10; background: var(--soft) center / cover no-repeat; }
.lcard .ph .badge { position: absolute; top: 10px; left: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.lcard .ph .code { position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 8px; background: rgba(10, 22, 40, .62); color: #fff; font-size: 11.5px; font-weight: 700; backdrop-filter: blur(6px); }
.lcard .ph .count { position: absolute; bottom: 10px; right: 10px; display: flex; gap: 4px; align-items: center; padding: 3px 8px; border-radius: 8px; background: rgba(10, 22, 40, .62); color: #fff; font-size: 11.5px; font-weight: 700; }
.lcard .ph .deal { position: absolute; bottom: 10px; left: 10px; padding: 4px 9px; border-radius: 8px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.lcard .bd { padding: 12px 14px 14px; }
.lcard .price { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.lcard .price small { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.lcard h3 { font-size: 15px; font-weight: 700; margin-top: 2px; }
.lcard .loc { display: flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.lcard .facts { display: flex; gap: 14px; margin-top: 10px; color: var(--ink-2); font-size: 13px; font-weight: 650; }
.lcard .facts span { display: inline-flex; align-items: center; gap: 5px; }
.lcard .ft { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.lcard .ft .tags { display: flex; gap: 5px; overflow: hidden; flex: 1; }
.lcard.row-card { display: flex; }
.lcard.row-card .ph { width: 112px; aspect-ratio: auto; flex: none; }
.lcard.row-card .bd { padding: 10px 12px; min-width: 0; }
.lcard.row-card .price { font-size: 16px; }

.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty svg.i { width: 46px; height: 46px; stroke-width: 1.4; color: var(--ink-3); margin-bottom: 8px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* search */
.search { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 6px 0 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; min-width: 0; font-size: 15.5px; }
.search .iconbtn { box-shadow: none; background: var(--soft); width: 38px; height: 38px; border-radius: 12px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin: 8px 0 12px; }

/* buttons */
.btn { min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 14px;
  border: 0; font-weight: 750; font-size: 15px; cursor: pointer; background: var(--soft); color: var(--ink); white-space: nowrap;
  transition: transform .1s, filter .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.accent { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(232, 85, 43, .3); }
.btn.ok { background: var(--ok); color: #fff; }
.btn.danger { background: transparent; color: var(--danger); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); }
.btn.block { width: 100%; }
.btn.sm { height: 38px; padding: 0 13px; font-size: 13.5px; border-radius: 11px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* forms */
.form-sec { margin-top: 14px; padding: 16px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.form-sec > h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 14px; }
.form-sec > h3 .n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--orange); color: #fff; font-size: 12px; }
.field { display: block; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > span { display: block; font-size: 12.5px; font-weight: 750; color: var(--ink-2); margin: 0 0 6px 2px; }
.input, .field input:not([type=checkbox]):not([type=file]), .field select, .field textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--bg); outline: 0;
  font-size: 16px; transition: border-color .15s, background .15s;
}
.field textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--navy); background: var(--card); }
.field .suffix { position: relative; }
.field .suffix i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--ink-3); font-weight: 700; pointer-events: none; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.switch { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; }
.switch input { appearance: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; flex: none; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(18px); }
.stepper { display: flex; align-items: center; height: 48px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--bg); }
.stepper button { width: 44px; height: 100%; border: 0; background: transparent; font-size: 22px; font-weight: 600; color: var(--navy); cursor: pointer; }
.stepper input { flex: 1; min-width: 0; text-align: center; border: 0 !important; background: transparent !important; height: 100% !important; padding: 0 !important; font-weight: 800; }

.savebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; gap: 10px;
  padding: 12px 16px calc(12px + var(--safe-b)); background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
@media (min-width: 960px) { .savebar { left: 250px; padding-left: 32px; padding-right: 32px; } }

/* photos editor */
.photos-ed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .photos-ed { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.photos-ed .p { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--soft) center / cover; }
.photos-ed .p .cov { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 6px; background: var(--orange); color: #fff; font-size: 10.5px; font-weight: 800; }
.photos-ed .p .ctl { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; padding: 5px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.photos-ed .p .ctl button { width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgba(255,255,255,.92); color: #142235; display: grid; place-items: center; cursor: pointer; }
.photos-ed .p .ctl button svg.i { width: 15px; height: 15px; }
.photos-ed .p .prog { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10,22,40,.55); color: #fff; font-weight: 800; font-size: 13px; }
.photos-ed .add { aspect-ratio: 1; border-radius: 12px; border: 2px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--navy); font-weight: 750; font-size: 12px; cursor: pointer; background: var(--bg); text-align: center; }
.photos-ed .add input { display: none; }

/* map */
.map { height: 260px; border-radius: var(--r-sm); overflow: hidden; background: var(--soft); z-index: 1; }
.map.tall { height: calc(100dvh - 240px); min-height: 380px; border-radius: var(--r); }
.leaflet-container { font-family: var(--font); }
.pin-price { background: var(--navy); color: #fff; font-weight: 800; font-size: 12px; padding: 4px 8px; border-radius: 9px; white-space: nowrap; box-shadow: 0 3px 10px rgba(0,0,0,.25); border: 2px solid #fff; transform: translate(-50%, -100%); position: absolute; }
.pin-price.demand { background: var(--orange); }
.pin-price::after { content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #fff; border-bottom: 0; }
.se-pin { width: 34px; height: 44px; }
.map-hint { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }
.geo-results { margin-top: 6px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.geo-results button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--card); font-size: 13.5px; cursor: pointer; }
.geo-results button:last-child { border-bottom: 0; }

/* detail */
.gallery { position: relative; background: #0d1a2b; }
.gallery .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; height: min(75vw, 62vh); }
.gallery .track::-webkit-scrollbar { display: none; }
.gallery .track img { flex: 0 0 100%; scroll-snap-stop: always; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; cursor: zoom-in; }
.gallery .noph { aspect-ratio: 16 / 10; display: grid; place-items: center; color: #8DA2BE; }
.gallery .ctr { position: absolute; bottom: 12px; right: 12px; padding: 4px 10px; border-radius: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12.5px; font-weight: 700; }
.gallery .over { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top, 0px)) 14px; }
.gallery .over .iconbtn { background: rgba(255,255,255,.92); color: #142235; }
@media (min-width: 960px) { .gallery .track { height: min(46vw, 70vh); } }
.gallery .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #142235; display: none; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.gallery .nav.prev { left: 14px; } .gallery .nav.next { right: 14px; }
@media (hover: hover) { .gallery .nav { display: grid; } }
.thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px 0; scrollbar-width: none; }
.thumbs img { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; opacity: .7; cursor: pointer; }
.thumbs img.on { opacity: 1; outline: 2px solid var(--orange); }
.detail { padding: 16px; max-width: 1100px; margin: 0 auto; }
.detail .price { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.detail h1 { font-size: 21px; margin-top: 4px; }
.keyfacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
@media (min-width: 640px) { .keyfacts { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.keyfacts div { padding: 12px 8px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); text-align: center; }
.keyfacts svg.i { color: var(--orange); margin: 0 auto 4px; }
.keyfacts b { display: block; font-size: 15px; }
.keyfacts span { font-size: 11.5px; color: var(--ink-3); font-weight: 650; }
.specs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 18px; }
.specs div { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.specs div span { color: var(--ink-3); }
.specs div b { text-align: right; font-weight: 700; }
@media (max-width: 520px) { .specs { grid-template-columns: minmax(0, 1fr); } }
.desc { white-space: pre-line; color: var(--ink-2); }
.agent-card { display: flex; align-items: center; gap: 12px; }
.private { border: 1.5px dashed #E9B9A6; background: color-mix(in srgb, var(--orange) 6%, var(--card)); }
.private h3 { color: var(--orange-2); }
.detail-cols { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .detail-cols { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } .detail-cols .side { position: sticky; top: 16px; } }
.actbar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 35; padding: 10px 16px; display: flex; gap: 10px; background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
@media (min-width: 960px) { .actbar { position: static; padding: 0; background: none; border: 0; backdrop-filter: none; flex-direction: column; } }
.with-actbar { padding-bottom: 80px; }
@media (min-width: 960px) { .with-actbar { padding-bottom: 0; } }

.match { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: var(--bg); margin-top: 8px; }
.match img, .match .ph0 { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--soft); flex: none; }
.match .score { font-weight: 800; color: var(--ok); font-size: 13px; }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.cal-head h2 { font-size: 22px; text-transform: capitalize; }
.days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 16px 10px; margin: 0 -16px; scroll-snap-type: x mandatory; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 52px; padding: 9px 0 8px; border-radius: 16px; text-align: center; background: var(--card); box-shadow: var(--shadow); cursor: pointer; scroll-snap-align: center; border: 0; }
.day small { display: block; font-size: 11px; font-weight: 750; color: var(--ink-3); text-transform: uppercase; }
.day b { display: block; font-size: 19px; margin: 1px 0 3px; }
.day .dots { display: flex; justify-content: center; gap: 3px; height: 6px; }
.day .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.day.today b { color: var(--orange); }
.day.on { background: var(--primary); color: #fff; }
.day.on small { color: #AFC3DD; }
.day.on b { color: #fff; }
.day.on .dots i { background: #fff; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 10px; }
.month .wd { text-align: center; font-size: 11px; font-weight: 800; color: var(--ink-3); padding: 4px 0; }
.month button { aspect-ratio: 1; border: 0; border-radius: 12px; background: transparent; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 14px; }
.month button.out { color: var(--ink-3); opacity: .5; }
.month button.today { color: var(--orange); }
.month button.on { background: var(--primary); color: #fff; }
.month button .dots { display: flex; gap: 2px; height: 5px; }
.month button .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }
.month button.on .dots i { background: #fff; }

.quick { position: relative; }
.quick .search { padding-left: 12px; }
.quick .search svg.spark { color: var(--orange); }
.quick-prev { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-prev .tag { background: var(--card); box-shadow: var(--shadow); height: 28px; font-size: 12.5px; }
.quick-prev .tag b { color: var(--navy); }

.agenda { display: flex; flex-direction: column; gap: 10px; }
.ev { display: flex; gap: 12px; align-items: stretch; padding: 12px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); cursor: pointer; position: relative; }
.ev .tm { width: 50px; flex: none; text-align: center; padding-top: 2px; }
.ev .tm b { display: block; font-size: 15px; }
.ev .tm small { font-size: 11.5px; color: var(--ink-3); font-weight: 650; }
.ev .bar { width: 4px; border-radius: 4px; flex: none; }
.ev .bd { flex: 1; min-width: 0; }
.ev .bd h4 { margin: 0; font-size: 15px; font-weight: 750; }
.ev .bd .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12.5px; color: var(--ink-3); }
.ev .bd .meta span { display: inline-flex; align-items: center; gap: 4px; }
.ev .type { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.ev.done { opacity: .55; }
.ev.done h4 { text-decoration: line-through; }
.ev .chk { width: 30px; height: 30px; border-radius: 10px; border: 2px solid var(--line); background: transparent; display: grid; place-items: center; cursor: pointer; flex: none; align-self: center; color: #fff; }
.ev.done .chk { background: var(--ok); border-color: var(--ok); }
.ev.now { outline: 2px solid var(--orange); }
.next-up { padding: 16px; border-radius: var(--r); background: linear-gradient(140deg, var(--navy-2), #23558E); color: #fff; box-shadow: var(--shadow); cursor: pointer; }
.next-up small { color: #AFC3DD; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.next-up h3 { font-size: 18px; margin: 4px 0; }
.next-up .cd { font-size: 13px; font-weight: 800; color: #FFB79E; }
.next-up .row .btn { background: rgba(255,255,255,.14); color: #fff; }

/* sheet / modal */
.scrim { position: fixed; inset: 0; z-index: 90; background: rgba(8, 18, 32, .45); opacity: 0; transition: opacity .2s; }
.scrim.on { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .9, .3, 1);
}
.sheet.on { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 9px auto 0; flex: none; }
.sheet header { display: flex; align-items: center; gap: 10px; padding: 10px 16px 8px; flex: none; }
.sheet header h2 { font-size: 19px; flex: 1; }
.sheet .body { overflow-y: auto; padding: 4px 16px 16px; overscroll-behavior: contain; }
.sheet footer { display: flex; gap: 10px; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--card); flex: none; }
@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; bottom: 50%; width: 560px; border-radius: 24px; transform: translate(-50%, 60%); opacity: 0; transition: transform .25s, opacity .2s; }
  .sheet.on { transform: translate(-50%, 50%); opacity: 1; }
  .sheet .grab { display: none; }
  .sheet footer { border-radius: 0 0 24px 24px; }
}
.actions-list { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.actions-list button { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; border: 0; background: var(--card); box-shadow: var(--shadow); text-align: left; cursor: pointer; }
.actions-list button .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none; }
.actions-list button b { display: block; font-size: 15px; }
.actions-list button small { color: var(--ink-3); }

/* toast */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 120; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { padding: 13px 16px; border-radius: 14px; background: #142235; color: #fff; font-weight: 650; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; animation: tin .25s ease-out; pointer-events: auto; }
.toast.err { background: var(--danger); }
.toast.ok svg.i { color: #6FE0A8; }
@keyframes tin { from { opacity: 0; transform: translateY(12px); } }

/* notifications */
.nlist { display: flex; flex-direction: column; gap: 8px; }
.nitem { display: flex; gap: 12px; padding: 13px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); cursor: pointer; }
.nitem .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--soft); color: var(--navy); }
.nitem.unread { box-shadow: inset 3px 0 0 var(--orange), var(--shadow); }
.nitem h4 { margin: 0; font-size: 14.5px; }
.nitem p { margin: 2px 0 0; color: var(--ink-2); font-size: 13.5px; }

/* menu */
.menu-list { display: flex; flex-direction: column; overflow: hidden; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; font-weight: 650; width: 100%; }
.menu-list > :last-child { border-bottom: 0; }
.menu-list .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--soft); color: var(--navy); }
.menu-list .chev { margin-left: auto; color: var(--ink-3); }
.profile-card { display: flex; align-items: center; gap: 14px; padding: 18px; background: linear-gradient(140deg, var(--navy-2), #1F5089); color: #fff; border-radius: var(--r); }
.profile-card .avatar { width: 56px; height: 56px; font-size: 20px; border: 3px solid rgba(255,255,255,.25); }

/* login */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 28px 22px calc(28px + var(--safe-b)); max-width: 440px; margin: 0 auto; }
.login .logo { width: min(300px, 82%); margin: 0 auto 26px; }
.login .logo svg { width: 100%; height: auto; display: block; }
.login .logo svg > text { fill: var(--logo-ink, #163A64); }
.login .card { padding: 22px; }
.login h1 { font-size: 22px; margin-bottom: 4px; }
.demo-users { display: grid; gap: 8px; margin-top: 14px; }
.demo-users button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; text-align: left; }
body.login-bg { padding-left: 0; background: radial-gradient(120% 70% at 50% -10%, #DCE6F3, var(--bg) 60%); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 130; background: #000; display: grid; place-items: center; }
.lightbox .lb-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; touch-action: pan-y; }
.lightbox .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lightbox .nav.prev { left: 12px; } .lightbox .nav.next { right: 12px; }
.lightbox .lb-ctr { position: absolute; bottom: calc(16px + var(--safe-b)); left: 50%; transform: translateX(-50%); color: #fff; font-weight: 700; font-size: 13px; background: rgba(255,255,255,.14); padding: 4px 12px; border-radius: 10px; }
.lightbox .iconbtn { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; background: rgba(255,255,255,.15); color: #fff; box-shadow: none; }

/* push banner */
.push-cta { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r); background: color-mix(in srgb, var(--orange) 10%, var(--card)); border: 1.5px solid color-mix(in srgb, var(--orange) 30%, transparent); }
.push-cta .ic { width: 42px; height: 42px; border-radius: 13px; background: var(--orange); color: #fff; display: grid; place-items: center; flex: none; }

.dup { padding: 12px 14px; border-radius: 14px; background: #FFF4DE; color: #7A5200; font-size: 13.5px; margin-top: 12px; }
.dup a { font-weight: 800; text-decoration: underline; }
.table { width: 100%; border-collapse: collapse; }
.table td, .table th { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.table th { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.skeleton { background: linear-gradient(90deg, var(--soft), var(--card), var(--soft)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }
.lcard .ph.nophoto { aspect-ratio: auto; height: 74px; background: linear-gradient(120deg, color-mix(in srgb, var(--orange) 16%, var(--card)), var(--soft)); }
.lcard .ph.nophoto.demand { background: linear-gradient(120deg, color-mix(in srgb, var(--orange) 26%, var(--card)), color-mix(in srgb, var(--orange) 8%, var(--card))); }
.lcard .ph.nophoto .deal { bottom: auto; top: 40px; }
.editing .bottomnav { display: none; }
/* chip rows: wrap on wide screens (mouse can't swipe), drag/wheel scroll in between */
@media (min-width: 960px) { .chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0 0 10px; } }
.chips.dragging, .seg.dragging { cursor: grabbing; scroll-snap-type: none; }
.chips.dragging .chip, .seg.dragging button { pointer-events: none; }
.chip:focus { outline: none; }
.chip:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
/* admin: categories */
.cat-admin { max-width: 720px; margin: 0 auto; }
.cat-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cat-row:last-child { border-bottom: 0; }
.cat-row input[type=color] { width: 38px; height: 38px; flex: none; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.cat-row .input { flex: 1; min-width: 0; height: 44px; font-weight: 650; }
.cat-row .iconbtn { flex: none; color: var(--danger); }

.btn > span { overflow: hidden; text-overflow: ellipsis; }
.wide-only { display: none; }
@media (min-width: 960px) { .wide-only { display: inline; } }
/* bottom action bar on phones: tighter buttons, icons go first when space runs out */
@media (max-width: 959px) {
  .actbar .btn { padding: 0 12px; gap: 6px; font-size: 14.5px; }
  .actbar .btn:not(:has(> span)) { flex: none; width: 48px; padding: 0; }
}
@media (max-width: 400px) { .actbar .btn:has(> span) > svg.i { display: none; } }
.keyfacts b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.keyfacts b.long { font-size: 13px; letter-spacing: -.01em; }
.keyfacts span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* segmented control that scrolls sideways when the options don't fit (phones) */
.seg.scroll { position: relative; overflow-x: auto; scrollbar-width: none; }
.seg.scroll::-webkit-scrollbar { display: none; }
.seg.scroll button { flex: 1 0 auto; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
/* hint that more tabs continue off-screen */
.seg.scroll.more-right { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.seg.scroll.more-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%); mask-image: linear-gradient(90deg, transparent, #000 15%); }
.seg.scroll.more-left.more-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
@media (min-width: 960px) { .seg.scroll { -webkit-mask-image: none !important; mask-image: none !important; } }

/* soulestate.gr taxonomy in the editor */
.seg[data-basic] button { white-space: normal; height: auto; min-height: 38px; line-height: 1.15; padding: 6px 4px; }
@media (max-width: 560px) { .area-cols { grid-template-columns: minmax(0, 1fr); } }
