:root {
  --bg: #f4f6fa;
  --bg-soft: #eef2f7;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --panel-3: #edf2f7;
  --text: #17212f;
  --muted: #6b7788;
  --muted-2: #8a94a6;
  --accent: #2f80ed;
  --accent-2: #57a0ff;
  --success: #13a46b;
  --warning: #d97706;
  --danger: #dc2626;
  --border: #e3e8ef;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #f3f6fb 100%);
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
img { max-width: 100%; display: block; }

.app-shell {
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--border);
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 8px;
}
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  color: white; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(47,128,237,.24);
}
.brand-mark.large { width: 56px; height: 56px; border-radius: 18px; font-size: 1.05rem; }
.brand-title { font-weight: 800; }
.brand-subtitle { color: var(--muted); font-size: .92rem; }
.side-nav { display: grid; gap: 8px; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; color: #344256;
  border: 1px solid transparent; transition: .18s ease;
}
.side-link:hover { background: var(--panel-2); border-color: var(--border); }
.sidebar-card { padding: 16px; background: #f7fbff; border: 1px solid #dceafe; border-radius: 18px; }
.sidebar-card-title { font-weight: 700; margin-bottom: 8px; }
.sidebar-card-text { color: var(--muted); line-height: 1.5; font-size: .95rem; }
.logout-form { margin-top: auto; }
.content-shell { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 22px 28px 12px; background: rgba(244,246,250,.92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(227,232,239,.8);
}
.topbar-kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; margin-bottom: 6px; }
.topbar-title { font-size: 1.6rem; font-weight: 800; }
.topbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.content-wrap { padding: 20px 28px 36px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card.premium { position: relative; overflow: hidden; }
.card.premium::before { content: ""; position: absolute; inset: 0 auto auto 0; width: 170px; height: 170px; background: radial-gradient(circle, rgba(47,128,237,.12), transparent 70%); pointer-events: none; }
.grid { display: grid; gap: 18px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.two-up { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.flat-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.reminder-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.detail-layout { grid-template-columns: 1.25fr .75fr; align-items: start; }
.badge, .mini-badge {
  display: inline-flex; align-items: center; min-height: 30px; padding: 6px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700;
  color: #1d4f91; background: #edf5ff; border: 1px solid #d5e7ff;
}
.mini-badge.warn { color: #8a4b05; background: #fff5e8; border-color: #ffe3bd; }
.mini-badge.accent { color: white; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.flat-id,.muted { color: var(--muted); }
.price-line { font-size: 1.55rem; font-weight: 800; margin: 10px 0; }
.price-line.small { font-size: 1.32rem; }
.address-line,.tenant-line,.catalog-card-address { color: var(--muted); line-height: 1.55; }
.meta-row,.actions-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
input,textarea { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--border); background: #fff; color: var(--text); outline: none; }
input:focus, textarea:focus { border-color: #b8d7ff; box-shadow: 0 0 0 4px rgba(47,128,237,.1); }
textarea { resize: vertical; min-height: 180px; }
button,.button-link,.ghost-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:12px 16px; border-radius:14px; cursor:pointer; transition:.15s ease; }
button:hover,.button-link:hover,.ghost-btn:hover { transform: translateY(-1px); }
button,.button-link { color:white; background:linear-gradient(135deg,var(--accent),var(--accent-2)); border:0; box-shadow:0 14px 24px rgba(47,128,237,.18); }
.button-link.secondary,.ghost-btn { color: var(--text); background: #fff; border: 1px solid var(--border); box-shadow:none; }
.danger { background: linear-gradient(135deg, #ef4444, #dc2626); }
.full-width,.ghost-btn.full { width:100%; }
.stack { display:grid; gap:14px; }
label { display:grid; gap:8px; color:#455468; }
.checkbox-row { display:flex; align-items:center; gap:10px; }
.checkbox-row input { width:auto; }
.info-banner,.error { display:flex; gap:12px; align-items:center; flex-wrap:wrap; padding:14px 16px; border-radius:18px; margin-bottom:18px; }
.info-banner { background: #eef6ff; border: 1px solid #d9e9ff; color:#1d4f91; }
.error { background: #fff1f1; border: 1px solid #ffd7d7; color:#9f1d1d; }
.empty-state { text-align:center; padding:44px 24px; }
.empty-inline { padding: 18px 0; color: var(--muted); }
.narrow { max-width: 720px; }
.eyebrow { display:inline-flex; padding:8px 12px; border-radius:999px; font-size:.76rem; text-transform:uppercase; letter-spacing:.12em; font-weight:700; color:#1d4f91; background:#edf5ff; border:1px solid #d5e7ff; }
.section-head,.page-head { display:flex; justify-content:space-between; gap:16px; align-items:center; margin-bottom:18px; flex-wrap:wrap; }
.section-head.compact { margin-bottom: 14px; }
.section-head h1,.section-head h2,.page-head h1 { margin:0; font-size:1.35rem; }

.listing-hero { margin-bottom: 18px; background: linear-gradient(135deg, #ffffff, #f7fbff); }
.listing-hero h2 { margin: 8px 0 10px; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.filters { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:18px; }
.filters.glass { padding:10px; border-radius:18px; background:#fff; border:1px solid var(--border); width:fit-content; max-width:100%; }
.chip { display:inline-flex; align-items:center; justify-content:center; padding:10px 14px; border-radius:999px; border:1px solid var(--border); color:#425066; background:#fff; transition:.18s ease; }
.chip:hover { border-color:#bed9ff; color:#0f4ea8; }
.chip.active { color:white; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }

.catalog-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap:18px; }
.catalog-card { background:#fff; border:1px solid var(--border); border-radius:22px; overflow:hidden; box-shadow:var(--shadow); transition:.18s ease; }
.catalog-card:hover { transform: translateY(-3px); box-shadow:0 18px 34px rgba(15,23,42,.12); }
.catalog-card-media { position:relative; }
.property-cover { width:100%; aspect-ratio: 4 / 3; object-fit:cover; background:#edf2f7; }
.property-cover--empty { display:grid; place-items:center; color:var(--muted); min-height: 220px; }
.catalog-card-price { position:absolute; left:14px; bottom:14px; background: rgba(255,255,255,.95); border-radius:12px; padding:10px 14px; font-size:1.1rem; font-weight:800; box-shadow:0 8px 18px rgba(15,23,42,.10); }
.catalog-card-body { padding:16px 16px 18px; }
.catalog-card-title { font-size:1.05rem; font-weight:800; line-height:1.35; margin-bottom:8px; }
.catalog-card-meta, .catalog-card-footer, .catalog-card-topline { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.catalog-card-meta { color:var(--muted); margin-top:12px; }
.catalog-card-footer { margin-top:14px; }
.property-actions { margin-top: 14px; }

.property-page { display:grid; grid-template-columns: minmax(0,1fr) 360px; gap:18px; align-items:start; }
.property-main { display:grid; gap:18px; }
.property-sidebar { position: sticky; top: 108px; }
.property-summary { padding: 22px; }
.summary-badge { display:inline-flex; padding:8px 12px; border-radius:999px; background:#edf5ff; color:#1d4f91; font-weight:700; margin-bottom:14px; }
.summary-price { font-size: 2rem; font-weight: 900; margin-bottom: 8px; }
.summary-sub { color: var(--muted); line-height: 1.5; margin-bottom: 18px; }
.summary-grid { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.summary-item { background:#f8fafc; border:1px solid var(--border); border-radius:16px; padding:14px; }
.summary-label { color:var(--muted); font-size:.86rem; margin-bottom:6px; }
.summary-value { font-weight:800; }
.summary-divider { height:1px; background:var(--border); margin: 18px 0; }
.summary-row { display:flex; justify-content:space-between; gap:10px; padding:10px 0; color:var(--muted); }
.summary-row strong { color:var(--text); }
.content-card { padding: 24px; }
.text-rich { line-height: 1.75; color:#334155; }

.property-gallery { display: grid; gap: 12px; }
.property-gallery-main-wrap { position: relative; border-radius: 18px; overflow: hidden; background:#f1f5f9; }
.property-gallery-main { width:100%; height: 560px; object-fit: cover; cursor: zoom-in; }
.property-gallery-controls { position:absolute; inset:0; display:flex; align-items:center; justify-content:space-between; padding:16px; pointer-events:none; }
.property-gallery-btn { pointer-events:auto; width:42px; height:42px; border-radius:999px; border:0; background: rgba(255,255,255,.88); color:#0f172a; font-size:22px; box-shadow:0 8px 18px rgba(15,23,42,.12); }
.property-gallery-counter { position:absolute; right:12px; bottom:12px; background: rgba(15,23,42,.72); color:#fff; border-radius:999px; padding:6px 10px; font-size:12px; }
.property-gallery-thumbs { display:flex; gap:10px; overflow-x:auto; padding-bottom: 4px; }
.property-gallery-thumb { flex:0 0 auto; width:92px; height:72px; border-radius:14px; overflow:hidden; border:2px solid transparent; background:none; padding:0; }
.property-gallery-thumb img { width:100%; height:100%; object-fit:cover; }
.property-gallery-thumb.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,128,237,.12); }
.property-gallery-empty { display:grid; place-items:center; min-height:300px; border-radius:18px; border:1px dashed var(--border); color:var(--muted); background:#fafcff; }
.gallery-fullscreen { position:fixed; inset:0; z-index:9999; background:rgba(15,23,42,.95); display:none; align-items:center; justify-content:center; padding:24px; }
.gallery-fullscreen.is-open { display:flex; }
.gallery-fullscreen img { max-width:min(1280px,100%); max-height:92vh; object-fit:contain; border-radius:16px; }
.gallery-close { position:absolute; top:18px; right:18px; width:44px; height:44px; border-radius:999px; border:0; background:rgba(255,255,255,.14); color:#fff; font-size:26px; }
.gallery-lock { overflow:hidden; }

.video-shell { position:relative; width:100%; padding-bottom:56.25%; border-radius:18px; overflow:hidden; background:#000; }
.video-shell iframe { position:absolute; inset:0; width:100%; height:100%; }

.form-card .gallery-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap:14px; }
.image-card { border:1px solid var(--border); border-radius:18px; overflow:hidden; padding:10px; background:#fff; }
.image-card .thumb { width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:12px; margin-bottom:10px; }
.image-card-meta { color:var(--muted); font-size:.9rem; margin-bottom:10px; }

.metric-label { color: var(--muted); font-size: .9rem; }
.metric-value { margin-top: 10px; font-size: 2.2rem; font-weight: 900; }
.action-card.premium { display:grid; grid-template-columns:auto 1fr auto; gap:16px; align-items:center; }
.card-icon { width:54px; height:54px; border-radius:18px; display:grid; place-items:center; font-size:1.35rem; background:#edf5ff; border:1px solid #d5e7ff; }
.arrow-link { color:#0f4ea8; font-weight:700; white-space:nowrap; }

.login-wrap { min-height:100vh; display:grid; place-items:center; padding:28px; }
.login-hero { width:min(1120px,100%); display:grid; grid-template-columns:1.08fr .92fr; gap:24px; align-items:stretch; }
.login-copy,.login-card { border-radius:30px; box-shadow:var(--shadow); }
.login-copy { padding:38px; background:linear-gradient(135deg, #ffffff, #f6fbff); border:1px solid #e2eefb; display:flex; flex-direction:column; justify-content:center; }
.login-copy h1 { font-size: clamp(2rem, 4vw, 3.3rem); line-height:1.04; margin:16px 0; }
.login-copy p { color:var(--muted); max-width:58ch; line-height:1.7; }
.feature-list { display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
.feature-pill { padding:10px 14px; border-radius:999px; background:#fff; border:1px solid var(--border); color:#29415f; }
.login-card { padding:28px; background:#fff; border:1px solid var(--border); }
.login-card-head { display:flex; align-items:center; gap:14px; margin-bottom:18px; }
.login-card h2 { margin:0 0 6px; }

@media (max-width: 1100px) { .property-page { grid-template-columns: 1fr; } .property-sidebar { position: static; } }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position:relative; height:auto; border-right:0; border-bottom:1px solid var(--border); }
  .topbar,.content-wrap { padding-left:20px; padding-right:20px; }
  .detail-layout,.login-hero { grid-template-columns:1fr; }
}
@media (max-width: 760px) { .property-gallery-main { height: 280px; } .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 640px) {
  .content-wrap { padding:14px 16px 28px; }
  .topbar { padding:16px; }
  .sidebar { padding:16px; }
  .property-gallery-main { height: 220px; }
  .property-gallery-thumb { width: 76px; height: 58px; }
  .property-gallery-controls { padding: 10px; }
  .property-gallery-btn { width: 38px; height: 38px; }
  .catalog-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .login-wrap { padding:16px; }
  .login-copy,.login-card { padding:24px; }
}

.catalog-card { position: relative; }
.catalog-card-link { display:block; color:inherit; text-decoration:none; }
.share-button { min-height: 42px; width: 42px; padding: 0; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--text); border: 1px solid var(--border); box-shadow: 0 10px 22px rgba(15,23,42,.12); font-weight: 800; }
.share-button:hover { background: #fff; }
.catalog-share-button { position: absolute; top: 12px; right: 12px; z-index: 2; }
.share-button.is-copied { color: #0f7a3b; border-color: #b9e6c8; }
.share-button--wide { width: auto; min-width: 42px; padding: 0 14px; background: #fff; }
.share-button-text { font-size: .95rem; }
