/* Realtor Vikkas — shared app styling for the live site, owner & customer panels.
   Palette lifted from the marketing landing page so everything reads as one system. */

:root {
  --bg: #EDEFF0;
  --surface: #FFFFFF;
  --surface-2: #F3F5F6;
  --ink: #1B1E24;
  --muted: #5C6373;
  --rule: #D8DBDE;
  --rule-strong: #C2C6CB;
  --indigo: #1B2A4A;
  --indigo-deep: #101A30;
  --brass: #A6701B;
  --brass-bright: #C98A2B;
  --ok: #1f7a4d;
  --ok-bg: #e3f3ea;
  --warn: #9a6a12;
  --warn-bg: #fbf0da;
  --err: #a12828;
  --err-bg: #f7e3e3;
  --shadow: 0 18px 40px -24px rgba(16, 26, 48, 0.35);
  --font-display: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10131C; --surface: #171B27; --surface-2: #1D2230; --ink: #E7E9EE;
    --muted: #9AA1B2; --rule: #2A2F3F; --rule-strong: #383F53; --indigo: #212C46;
    --indigo-deep: #0A0E17; --brass: #E0A94A; --brass-bright: #F0BE66;
    --ok: #6fd39d; --ok-bg: #163124; --warn: #e6b357; --warn-bg: #31280f;
    --err: #e88; --err-bg: #331b1b;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-weight: 400; font-family: var(--font-display); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 2px; }
.tabular { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 2rem; }
@media (max-width: 640px) { .wrap { padding: 0 1.1rem; } }

/* ---- Top bar ---- */
.topbar {
  background: var(--indigo); color: #EDEFF5; position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 0.7rem 2rem; }
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-mark { font-family: var(--font-display); font-size: 1.35rem; }
.brand-sub { font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: #B7C0D6; margin-top: 0.15rem; }
.topnav { display: flex; align-items: center; gap: 1.2rem; font-size: 0.9rem; color: #D6DCEA; flex-wrap: wrap; }
.topnav a:hover { color: #fff; }
.topnav .who { color: #B7C0D6; font-size: 0.82rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1.15rem; border-radius: 4px; font-size: 0.85rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.12s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-brass { background: var(--brass); color: #FBF3E5; }
.btn-ink { background: var(--indigo); color: #EDEFF5; }
.btn-ghost { border-color: var(--rule-strong); color: var(--ink); background: var(--surface); }
.btn-danger { background: var(--err-bg); color: var(--err); border-color: var(--err); }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.78rem; }

/* ---- Layout blocks ---- */
.page { padding: 2.5rem 0 4rem; }
.eyebrow { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); }
.page h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 0.3rem 0 0.4rem; }
.lead { color: var(--muted); max-width: 60ch; }

.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
  box-shadow: var(--shadow); padding: 1.5rem;
}

/* ---- Flash messages ---- */
.flash { padding: 0.8rem 1rem; border-radius: 6px; margin-bottom: 1.2rem; font-size: 0.9rem; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--err-bg); color: var(--err); }

/* ---- Forms ---- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.2rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 0.35rem; letter-spacing: 0.02em; }
input, select, textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--rule-strong);
  border-radius: 6px; padding: 0.65rem 0.75rem; font-size: 0.92rem;
}
textarea { resize: vertical; min-height: 96px; }
.auth-card { max-width: 420px; margin: 3rem auto; }
.auth-card .btn { width: 100%; margin-top: 0.4rem; }
.muted-link { color: var(--brass); font-weight: 600; }

/* ---- Property grid & cards ---- */
.filters {
  display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: flex-end;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
  padding: 1rem; margin-bottom: 1.6rem;
}
.filters .field { flex: 1 1 150px; }
.filters label { margin-bottom: 0.25rem; }
.prop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 940px) { .prop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .prop-grid { grid-template-columns: 1fr; } }
.prop-card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.prop-vignette {
  background: linear-gradient(160deg, var(--indigo), var(--indigo-deep));
  height: 130px; display: flex; align-items: center; justify-content: center; color: var(--brass-bright);
  position: relative;
}
.prop-vignette .listing-badge {
  position: absolute; top: 0.6rem; left: 0.6rem; font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; background: var(--brass); color: #fff; padding: 0.2rem 0.5rem; border-radius: 3px;
}
.prop-body { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.prop-tag { font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.prop-body h3 { font-size: 1.15rem; }
.prop-loc { font-size: 0.85rem; color: var(--muted); }
.prop-specs {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink);
  border-top: 1px dashed var(--rule-strong); margin-top: auto; padding-top: 0.6rem;
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
}
.price { color: var(--brass); font-weight: 700; }

/* ---- Detail ---- */
.detail-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
@media (max-width: 820px) { .detail-head { grid-template-columns: 1fr; } }
.detail-banner { background: linear-gradient(160deg, var(--indigo), var(--indigo-deep));
  border-radius: 12px; min-height: 260px; display: flex; align-items: center; justify-content: center; color: var(--brass-bright); }
.spec-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem 1.2rem; margin: 1.2rem 0; }
.spec-list div { border-bottom: 1px solid var(--rule); padding-bottom: 0.5rem; }
.spec-list .k { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.spec-list .v { font-family: var(--font-mono); font-size: 0.95rem; }

/* ---- Tables (panels) ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 640px; }
table.data th, table.data td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--rule); }
table.data th { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); background: var(--surface-2); }
table.data tr:last-child td { border-bottom: none; }

/* ---- Badges / pills ---- */
.pill { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 20px; text-transform: capitalize; }
.pill.available, .pill.new { background: var(--ok-bg); color: var(--ok); }
.pill.contacted { background: var(--warn-bg); color: var(--warn); }
.pill.sold, .pill.rented, .pill.closed { background: var(--err-bg); color: var(--err); }

/* ---- Stat tiles ---- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media (max-width: 780px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 1.1rem 1.2rem; }
.stat .n { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 700; color: var(--brass); }
.stat .l { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* ---- Section heading with action ---- */
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 2rem 0 1rem; flex-wrap: wrap; }
.sec-head h2 { font-size: 1.4rem; }
.inline-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.fav-btn { background: none; border: none; cursor: pointer; font-size: 1.1rem; color: var(--brass); }

footer.app-foot { background: var(--indigo-deep); color: #8B96B3; font-size: 0.8rem; padding: 2rem; text-align: center; margin-top: 3rem; }
