:root {
  --navy: #0b1f33;
  --navy-2: #16324f;
  --navy-3: #1e4568;
  --gold: #c9a36a;
  --gold-2: #e0c48a;
  --sand: #f4efe6;
  --paper: #fffdf9;
  --ink: #17202a;
  --muted: #5c6b7a;
  --line: #e6dccb;
  --sea: #1a6b75;
  --danger: #b42318;
  --ok: #0f7b4c;
  --urgent: #c2410c;
  --shadow: 0 12px 40px rgba(11, 31, 51, .12);
  --radius: 18px;
  --header-h: 72px;
  --font: "Manrope", "Segoe UI", system-ui, sans-serif;
  --serif: "Fraunces", "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-2); text-decoration: none; }
a:hover { color: var(--sea); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(1.8rem, 4vw, 3.2rem); line-height: 1.15; }
h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11,31,51,.92);
  backdrop-filter: blur(12px);
  color: #fff;
}
.head-row { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; }
.logo strong { display: block; font-family: var(--serif); font-size: 1.05rem; letter-spacing: .04em; }
.logo em { display: block; font-style: normal; font-size: .68rem; color: var(--gold-2); letter-spacing: .02em; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(160deg, var(--gold-2), var(--gold));
  position: relative; flex: none;
}
.logo-mark:after {
  content: ""; position: absolute; inset: 7px 8px 6px;
  border: 2px solid var(--navy); border-bottom-width: 3px; border-radius: 1px 1px 2px 2px;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; flex: 1; }
.site-nav a { color: #e8e0d2; font-size: .92rem; }
.site-nav a:hover { color: var(--gold-2); }
.head-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lang { display: flex; background: rgba(255,255,255,.08); border-radius: 999px; padding: 2px; }
.lang a { color: #c9c2b4; padding: 4px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.lang a.on { background: var(--gold); color: var(--navy); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  border-radius: 999px; padding: 10px 18px; font-weight: 600; cursor: pointer;
  font-family: inherit; font-size: .92rem; text-decoration: none;
}
.btn:hover { border-color: var(--gold); color: var(--navy); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-2); color: var(--navy); }
.btn-green { background: #128c7e; border-color: #128c7e; color: #fff; }
.btn-green:hover { filter: brightness(1.05); color: #fff; }
.btn-navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.25); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn.block { width: 100%; margin: 0 0 8px; }
.hp { position: absolute; left: -9999px; }

/* hero */
.hero { position: relative; color: #fff; padding: 64px 0 72px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,31,51,.55), rgba(11,31,51,.78)),
    radial-gradient(1200px 600px at 80% 10%, rgba(201,163,106,.35), transparent 50%),
    linear-gradient(135deg, #0b1f33 0%, #1a4a5c 45%, #0b1f33 100%);
}
.hero-bg:after {
  content: ""; position: absolute; inset: auto 0 0; height: 80px;
  background: linear-gradient(180deg, transparent, var(--paper));
}
.hero-inner { position: relative; }
.eyebrow { letter-spacing: .16em; text-transform: uppercase; font-size: .75rem; color: var(--gold-2); margin: 0 0 12px; }
.hero h1 { max-width: 16ch; }
.lead { max-width: 38rem; font-size: 1.08rem; color: #efe7d8; }
.search-box {
  margin-top: 28px; background: #fff; color: var(--ink);
  border-radius: 20px; padding: 16px; display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 10px; box-shadow: var(--shadow); align-items: end;
}
.search-box label { display: flex; flex-direction: column; gap: 4px; font-size: .75rem; color: var(--muted); }
.search-box input, .search-box select, .wizard input, .wizard select, .wizard textarea,
.lead-form input, .lead-form textarea, .inline input, .login-card input, .tight-form input, .tight-form select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font: inherit; background: var(--paper); color: var(--ink);
}
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hero-contacts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.hero-contacts a { color: var(--gold-2); font-weight: 600; }

.collections-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: -28px; position: relative; z-index: 2; }
.col-tile {
  background: #fff; border-radius: var(--radius); padding: 18px 16px;
  box-shadow: var(--shadow); color: var(--navy); border-top: 4px solid var(--gold);
}
.col-tile strong { display: block; font-family: var(--serif); font-size: 1.1rem; }
.col-tile span { color: var(--muted); font-size: .85rem; }
.col-tile.urgent { border-top-color: var(--urgent); }
.col-tile.new_build { border-top-color: var(--sea); }
.col-tile.exclusive { border-top-color: var(--navy); }

.section { padding: 48px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.section-head a { font-weight: 600; color: var(--sea); }
.grid.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 6px 20px rgba(11,31,51,.06); display: flex; flex-direction: column;
  border: 1px solid #f0e9dc;
}
.card-media { position: relative; aspect-ratio: 4/3; background: #d9d1c3; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-ph { width: 100%; height: 100%; background: linear-gradient(135deg, #d9d1c3, #b9c4c8); }
.card-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.badge { font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #fff; color: var(--navy); }
.badge.gold { background: var(--gold); }
.badge.urgent { background: var(--urgent); color: #fff; }
.badge.sale { background: #be185d; color: #fff; }
.badge.new { background: var(--sea); color: #fff; }
.badge.fresh { background: #ecfccb; color: #3f6212; }
.photo-count { position: absolute; right: 10px; bottom: 10px; background: rgba(11,31,51,.7); color: #fff; font-size: .7rem; padding: 2px 7px; border-radius: 999px; }
.card-body { padding: 12px 14px 16px; }
.card-price { font-weight: 700; font-size: 1.15rem; display: flex; gap: 8px; align-items: baseline; }
.card-price s { color: var(--muted); font-weight: 500; font-size: .9rem; }
.card-sqm { color: var(--muted); font-size: .8rem; }
.card-body h3 { font-size: 1rem; margin: 6px 0 4px; font-family: var(--font); }
.card-body h3 a { color: inherit; }
.card-meta { color: var(--muted); font-size: .82rem; margin: 0; }

.agents-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.agent-card, .agent-mini {
  display: flex; gap: 12px; align-items: center; background: #fff;
  border-radius: var(--radius); padding: 14px; border: 1px solid var(--line); color: inherit;
}
.agent-card.big { align-items: flex-start; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #ddd; flex: none; }
.avatar.lg { width: 96px; height: 96px; }
.avatar.ph { display: inline-block; background: linear-gradient(135deg, var(--gold-2), var(--navy-3)); }
.agent-hero { display: flex; gap: 20px; align-items: center; padding-bottom: 12px; }

.cta-band {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start;
  background: var(--navy); color: #fff; border-radius: 28px; padding: 36px; margin-bottom: 56px;
}
.cta-band h2 { color: #fff; }
.lead-form { display: grid; gap: 8px; }
.lead-form.tight { margin-top: 16px; }
.ok { color: #86efac; margin: 0; }
.err { color: #fecaca; margin: 0; }
.login-card .err, .app-main .err { color: var(--danger); }

.site-footer { background: var(--navy); color: #d9d1c3; padding: 40px 0 48px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.site-footer a { color: var(--gold-2); }
.footer-links { display: flex; flex-direction: column; gap: 6px; }

/* catalog / object */
.page-head { background: var(--navy); color: #fff; padding: 28px 0 22px; }
.page-head h1 em { font-style: normal; color: var(--gold-2); font-size: .6em; margin-left: 8px; }
.search-box-page { margin-top: 16px; }
.view-switch { display: flex; gap: 8px; margin-top: 14px; }
.view-switch a { color: #d9d1c3; padding: 4px 12px; border-radius: 999px; border: 1px solid transparent; }
.view-switch a.on { border-color: var(--gold); color: var(--gold-2); }
.districts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .85rem; color: var(--navy); background: #fff; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.pager { display: flex; justify-content: center; gap: 16px; margin-top: 28px; }
.empty { color: var(--muted); grid-column: 1 / -1; }
.full-map, .obj-map { height: 70vh; width: 100%; background: #cfd8dc; }
.obj-map { height: 320px; border-radius: var(--radius); margin-top: 8px; }

.gallery { background: #0b1f33; }
.gallery-main { position: relative; max-height: min(52vh, 560px); background: #111; }
.gallery-main img { width: 100%; height: min(52vh, 560px); object-fit: contain; }
.gallery-main.ph { height: 40vh; background: #2a3a4a; }
.gal-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9);
  font-size: 1.6rem; cursor: pointer;
}
.gal-btn.prev { left: 16px; } .gal-btn.next { right: 16px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; }
.thumb { border: 2px solid transparent; padding: 0; background: none; width: 88px; height: 64px; flex: none; cursor: pointer; border-radius: 8px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.on { border-color: var(--gold); }
.object-grid { display: grid; grid-template-columns: 1fr 320px; gap: 32px; padding: 32px 0 16px; }
.crumbs, .addr, .muted, .quiet { color: var(--muted); font-size: .9rem; }
.price-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; margin: 8px 0 18px; }
.price-row strong { font-size: 2rem; font-family: var(--serif); }
.price-row s { color: var(--muted); }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0; list-style: none; margin: 0 0 24px; }
.specs li { background: var(--sand); border-radius: 12px; padding: 10px 12px; }
.specs span { display: block; font-size: .75rem; color: var(--muted); }
.prose { white-space: normal; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.tags li { background: var(--sand); border-radius: 999px; padding: 4px 10px; font-size: .85rem; }
.contact-card { position: sticky; top: 88px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.badges-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }

/* cabinet / crm app */
.app-body { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: #f3eee6; }
.app-side { background: var(--navy); color: #e8e0d2; padding: 20px 14px; display: flex; flex-direction: column; }
.app-side .logo { margin-bottom: 18px; }
.app-side nav { display: flex; flex-direction: column; gap: 2px; }
.app-side nav a { color: #d9d1c3; padding: 8px 10px; border-radius: 10px; }
.app-side nav a.on, .app-side nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 14px 10px 4px; }
.side-user { margin-top: auto; font-size: .8rem; color: #b7b0a3; padding: 10px; }
.app-main { padding: 20px 24px 48px; overflow: auto; }
.app-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: #fff; border-radius: 16px; padding: 16px; box-shadow: 0 4px 14px rgba(11,31,51,.05); color: inherit; }
.stat strong { display: block; font-size: 1.8rem; font-family: var(--serif); }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.st { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eee; }
.st-active { background: #dcfce7; color: #166534; }
.st-draft { background: #f4f4f5; }
.st-moderation { background: #fef3c7; color: #92400e; }
.st-archived { background: #fee2e2; color: #991b1b; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--navy); }
.tabs a.on { background: var(--navy); color: #fff; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions form { display: inline; }
.wizard { background: #fff; border-radius: 16px; padding: 20px; }
.wizard fieldset { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.wizard legend { font-family: var(--serif); font-size: 1.3rem; margin-bottom: 8px; }
.wizard-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; }
.wizard-steps a { font-size: .8rem; color: var(--muted); }
.wizard-steps .on a { color: var(--navy); font-weight: 700; }
.wizard-nav { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 12px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.photo-grid figure { margin: 0; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.photo-grid img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.photo-grid figcaption { display: flex; gap: 4px; padding: 6px; align-items: center; flex-wrap: wrap; font-size: .75rem; }
.hint { color: var(--muted); font-size: .85rem; }

.login-body {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--navy), #1a4a5c);
}
.login-card { width: min(400px, calc(100% - 32px)); background: #fff; border-radius: 24px; padding: 28px; display: grid; gap: 12px; }
.login-card h1 { margin-top: 8px; }

.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 20px; align-items: flex-start; }
.kanban-col { flex: 0 0 260px; background: #efe8dc; border-radius: 16px; padding: 10px; max-height: calc(100vh - 140px); display: flex; flex-direction: column; }
.kanban-col header { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px 8px; }
.kanban-col h2 { font-size: .95rem; font-family: var(--font); }
.kanban-cards { overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.kcard { background: #fff; border-radius: 12px; padding: 10px; box-shadow: 0 2px 8px rgba(11,31,51,.06); }
.kcard h3 { font-family: var(--font); font-size: .95rem; margin: 0 0 4px; }
.kcard form select { width: 100%; margin-top: 6px; font-size: .8rem; }
.task-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.task-list li { display: flex; justify-content: space-between; gap: 12px; background: #fff; padding: 12px; border-radius: 12px; align-items: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-day { background: #fff; border-radius: 12px; min-height: 180px; padding: 8px; }
.cal-day header { font-weight: 700; font-size: .85rem; margin-bottom: 8px; }
.cal-day.today { outline: 2px solid var(--gold); }
.cal-ev { font-size: .8rem; padding: 6px; border-radius: 8px; margin-bottom: 6px; background: var(--sand); }
.cal-ev.kind-showing { background: #dbeafe; }
.cal-ev.kind-call { background: #dcfce7; }
.app-section { margin-top: 24px; }
.app-section h2 em { font-style: normal; color: var(--muted); font-size: .8em; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.radio { display: flex; gap: 8px; align-items: center; }

@media (max-width: 1024px) {
  .grid.cards { grid-template-columns: repeat(2, 1fr); }
  .search-box { grid-template-columns: 1fr 1fr; }
  .collections-row, .cta-band, .object-grid, .footer-grid, .agents-grid, .cal-grid { grid-template-columns: 1fr 1fr; }
  .app-body { grid-template-columns: 1fr; }
  .app-side { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .app-side nav { flex-direction: row; flex-wrap: wrap; }
  .side-user { margin-top: 0; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav, .head-actions .btn { display: none; }
  .site-header.open .site-nav { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: var(--header-h); background: var(--navy); padding: 12px 16px 20px; }
  .site-header.open .head-actions { display: flex; }
  .grid.cards, .collections-row, .cta-band, .object-grid, .footer-grid, .agents-grid, .specs, .cal-grid, .row2, .search-box { grid-template-columns: 1fr; }
  .hero { padding: 36px 0 48px; }
  .gallery-main img { height: 50vh; }
  .head-row { flex-wrap: wrap; }
}
