/* ShowAndDisclose brand — mirrors ShopProp's production design system.
   Reference: ~/web_shell_daisy/src/styles.scss + ~/flat_user_dashboard_template/src/styles.scss
   Signature elements: zero border-radius (square everywhere), Cormorant Garamond display
   headings at font-weight 400 with tight letter-spacing, uppercase tracked buttons,
   no shadows, Poppins body. */
:root {
  /* Brand text hierarchy — slate-tinted scale so the whole UI carries the
     ShopProp slate brand, not just buttons + links. Matches Tailwind slate. */
  --heading: #2D3748;          /* slate-800 — display headings */
  --body: #4A5568;             /* slate-600 — body copy (brand slate) */
  --secondary: #718096;        /* slate-500 — secondary / labels */
  --muted: #A0AEC0;            /* slate-400 — muted hints */
  --divider: #E2E8F0;          /* slate-200 — borders */

  /* CTA accent — same brand slate, slightly darker for buttons */
  --primary: #4A5568;
  --primary-hover: #3D4852;

  /* Backgrounds — cool-tinted off-whites so the slate sits in a slate-y room */
  --bg: #FFFFFF;
  --bg-alt-1: #F7FAFC;         /* slate-50 — subtle slate tint */
  --bg-alt-2: #EDF2F7;         /* slate-100 — card-on-card surface */
  --bg-card: #FFFFFF;

  /* Status colors (matched to ShopProp shell) */
  --accent: #1A5420;
  --accent-text: #2E7D32;
  --accent-bg: #E8F5EA;
  --danger: #C41E3A;
  --danger-bg: #FBE9EC;
  --warn: #D68F00;
  --warn-bg: #FFF1BA;

  /* Editorial gold accent (used sparingly) */
  --gold: #B7935A;
  --gold-soft: #C9A56F;
  --gold-bg: #FBF7EE;
  --white: #FFFFFF;

  /* No rounded corners — ShopProp standard */
  --radius-sm: 0;
  --radius: 0;
  --radius-lg: 0;

  /* No shadows by default — flat design */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;

  --font-display: "Cormorant Garamond", "Poppins", Georgia, serif;
  --font-sans: "Poppins", system-ui, -apple-system, Arial, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Poppins:wght@300;400;500;600&display=swap');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--body);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "calt";
}

/* Tabular figures in numeric contexts */
table, .table, .badge, .pill, .price, .count, .numeric, time, .stat .n {
  font-feature-settings: "tnum", "kern";
  font-variant-numeric: tabular-nums;
}

/* Editorial luxury headings — light weight, tight tracking */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--heading);
  letter-spacing: -0.005em;
  line-height: 1.15;
  margin: 0 0 16px;
}
h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 26px; }
h4 { font-size: 19px; line-height: 1.35; }

p { margin: 0 0 14px; color: var(--body); font-size: 15px; line-height: 1.65; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary-hover); }
a.plain { border: 0; }

small, .small { font-size: 12px; color: var(--secondary); }
.label { font-size: 11px; color: var(--secondary); text-transform: uppercase; letter-spacing: 1.4px; font-weight: 500; }

*:focus { outline: none; }
*:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
::selection { background: var(--primary); color: var(--white); }

/* Layout */
.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.narrow    { max-width: 720px;  margin: 0 auto; padding: 0 24px; }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; border-bottom: 1px solid var(--divider);
  background: var(--white); gap: 18px;
}
.nav .brand {
  display: inline-flex; align-items: center; gap: 14px;
  text-decoration: none;
}
.nav .brand-words {
  font-family: var(--font-display); font-size: 24px; font-weight: 500;
  color: var(--heading); letter-spacing: -0.005em; line-height: 1;
}
.nav .brand-by-text {
  font-family: var(--font-sans); font-size: 10px;
  color: var(--secondary); letter-spacing: 2px; text-transform: uppercase;
  font-weight: 500; margin-left: 2px;
}
.nav .brand-by-mark { height: 26px; width: auto; display: block; }
.nav .brand:hover .brand-words { color: var(--primary); }
.nav-links a {
  margin-left: 28px; color: var(--heading);
  font-size: 13px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--primary); }
.nav-links .by { color: var(--secondary); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--divider); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--bg);
  padding: 90px 0 100px;
  text-align: center;
  border-bottom: 1px solid var(--divider);
}
.hero .eyebrow {
  display: inline-block;
  font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 22px; font-weight: 500;
}
.hero h1 { font-size: 56px; max-width: 800px; margin: 0 auto 18px; }
.hero p.lede {
  font-size: 18px; color: var(--secondary);
  max-width: 620px; margin: 0 auto 32px; line-height: 1.65;
}

.eyebrow {
  font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--gold); font-weight: 500;
}

/* ── Sections ────────────────────────────────────────────────────────────── */
.section { padding: 70px 0; }
.section.alt { background: var(--bg-alt-1); }

/* ── Cards (square) ──────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--divider);
  padding: 28px;
}
.card.elevated { background: var(--white); }
.card.elevated:hover { border-color: var(--primary); }
.card h2, .card h3 { margin-top: 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Stat cards (used in seller summary + admin) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.stat {
  background: var(--white);
  border: 1px solid var(--divider);
  padding: 18px 20px;
}
.stat .n {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 500; color: var(--heading);
  line-height: 1; letter-spacing: -0.005em;
}
.stat .l {
  font-size: 11px; color: var(--secondary);
  text-transform: uppercase; letter-spacing: 1.4px;
  margin-top: 6px; font-weight: 500;
}
.stat.accent { border-color: var(--gold-soft); background: var(--gold-bg); }
.stat.accent .n { color: var(--primary); }

/* ── Buttons — flat, square, uppercase, tracked ──────────────────────────── */
.btn {
  display: inline-block; cursor: pointer;
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 500;
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: 13px 28px;
  background: var(--primary); color: var(--white);
  border: 1px solid var(--primary);
  text-decoration: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
  border-radius: 0;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--white); }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: transparent; color: var(--secondary);
  border: 1px solid var(--secondary);
  letter-spacing: 1px;
}
.btn.ghost:hover { background: var(--secondary); color: var(--white); border-color: var(--secondary); }
.btn.gold {
  background: var(--gold); border-color: var(--gold); color: var(--white);
}
.btn.gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: #A8172E; border-color: #A8172E; }
.btn.sm { padding: 9px 18px; font-size: 11px; letter-spacing: 1px; }
.btn.block { display: block; width: 100%; text-align: center; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 11px; color: var(--secondary);
  text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 8px;
  font-weight: 500;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--divider);
  background: var(--white); color: var(--body);
  font-family: inherit; font-size: 14px;
  border-radius: 0;
  transition: border-color 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .field-row { grid-template-columns: 1fr; } }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── Pills / status ──────────────────────────────────────────────────────── */
.pill {
  display: inline-block; padding: 3px 10px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px;
  background: var(--bg-alt-2); color: var(--secondary);
  font-weight: 500;
  border-radius: 0;
}
.pill.requested { background: var(--warn-bg); color: var(--warn); }
.pill.confirmed { background: var(--accent-bg); color: var(--accent-text); }
.pill.completed { background: var(--bg-alt-2); color: var(--primary); }
.pill.cancelled, .pill.denied { background: var(--danger-bg); color: var(--danger); }
.pill.rescheduled { background: #F1ECFE; color: #5E48A8; }
.pill.no_show { background: var(--bg-alt-2); color: var(--muted); }
.pill.gold { background: var(--gold-bg); color: var(--gold); }

/* ── Timeline ────────────────────────────────────────────────────────────── */
.timeline { border-left: 1px solid var(--divider); padding-left: 22px; margin: 0; }
.timeline .ev {
  position: relative; padding: 14px 0; border-bottom: 1px solid var(--divider);
}
.timeline .ev:last-child { border-bottom: 0; }
.timeline .ev::before {
  content: ''; position: absolute; left: -28px; top: 22px;
  width: 8px; height: 8px;
  background: var(--primary);
}
.timeline .ev.gold::before { background: var(--gold); }
.timeline .ev .when { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 500; }
.timeline .ev .body { color: var(--body); margin-top: 4px; }

/* ── Property header ─────────────────────────────────────────────────────── */
.property-hero {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px;
  align-items: stretch;
  padding: 36px 0 18px;
}
@media (max-width: 880px) { .property-hero { grid-template-columns: 1fr; } }
.property-hero .photo {
  background: var(--bg-alt-2);
  overflow: hidden; min-height: 260px;
}
.property-hero .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.property-hero .meta .address { font-size: 36px; margin-bottom: 8px; }
.property-hero .meta .sub { color: var(--secondary); margin-bottom: 18px; }
.property-hero .meta .facts { display: flex; flex-wrap: wrap; gap: 18px; margin: 12px 0 22px; }
.property-hero .meta .facts .f { font-size: 13px; color: var(--secondary); }
.property-hero .meta .facts .f strong { color: var(--heading); font-weight: 500; }

/* ── Action grid (buyer-agent actions) ───────────────────────────────────── */
.action-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
  margin: 18px 0 32px;
}
.action-grid .action {
  background: var(--white);
  border: 1px solid var(--divider);
  padding: 22px; cursor: pointer;
  transition: border-color 120ms ease;
  text-align: left;
  font-family: inherit;
}
.action-grid .action:hover {
  border-color: var(--primary);
}
.action-grid .action h4 { margin: 0 0 6px; }
.action-grid .action p { font-size: 13px; color: var(--secondary); margin: 0; }
.action-grid .action .icon { color: var(--gold); font-size: 14px; margin-bottom: 10px; display: block; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(17,17,17,0.55);
  display: none; align-items: center; justify-content: center; z-index: 50;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--white); padding: 36px;
  max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto;
  border: 1px solid var(--divider);
}
.modal h2 { margin-top: 0; }
.modal .close-x {
  float: right; cursor: pointer; border: 0; background: none;
  font-size: 22px; color: var(--muted); line-height: 1;
}
.modal .close-x:hover { color: var(--heading); }

/* ── Notes ───────────────────────────────────────────────────────────────── */
.note { padding: 14px 18px; font-size: 13px; border: 1px solid transparent; }
.note.ok { background: var(--accent-bg); color: var(--accent-text); border-color: var(--accent); }
.note.bad { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.note.info { background: var(--bg-alt-1); color: var(--secondary); border-color: var(--divider); }
.note.gold { background: var(--gold-bg); color: var(--gold); border: 1px solid var(--gold-soft); }

/* ── Tables ──────────────────────────────────────────────────────────────── */
table.list { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
table.list th, table.list td {
  padding: 12px 14px; border-bottom: 1px solid var(--divider);
  text-align: left; vertical-align: top;
}
table.list th {
  font-family: var(--font-display); font-weight: 500;
  color: var(--heading); font-size: 13px; background: var(--bg-alt-1);
  text-transform: uppercase; letter-spacing: 1.2px;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.foot {
  padding: 28px 0 24px; border-top: 1px solid var(--divider);
  background: var(--white); margin-top: 40px;
}
.foot a { color: var(--secondary); }
.foot a:hover { color: var(--heading); }

/* ── Wire-fraud disclaimer (auto-appears on every page) ──────────────────── */
/* Required by ShopProp policy: every customer-facing surface displays the
   "never ask for wire instructions" notice. Implementation uses body::after
   so a single edit covers the whole product without per-page footer edits. */
body::after {
  content: "Wire-fraud notice — ShopProp · Show & Disclose will never ask for or send wire-transfer instructions by email or text. Any message that does is fraudulent. When in doubt, call your ShopProp contact at a number you already trust.";
  display: block;
  background: #2D3748;       /* slate-800 — matches --heading */
  color: #E2E8F0;            /* slate-200 */
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.55;
  text-align: center;
  letter-spacing: 0.2px;
  border-top: 2px solid var(--gold);
}
@media (max-width: 640px) {
  body::after { padding: 12px 14px; font-size: 11.5px; }
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 18px; }
.mt-3 { margin-top: 26px; }
.mb-0 { margin-bottom: 0; }
.hidden { display: none; }

/* ── Tablet (≤880px) ─────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  h1 { font-size: 38px; }
  h2 { font-size: 28px; }
  h3 { font-size: 22px; }
  .hero { padding: 60px 0 70px; }
  .hero h1 { font-size: 42px; }
  .hero p.lede { font-size: 16px; }
  .section { padding: 48px 0; }
  .nav { padding: 14px 20px; gap: 12px; }
  .nav-links a { margin-left: 16px; font-size: 12px; letter-spacing: 1px; }
  .container { padding: 0 20px; }
}

/* ── Mobile (≤640px) ─────────────────────────────────────────────────────── */
/* Sellers do most of their managing on phones. Tabs scroll horizontally
   instead of wrapping; tables collapse to stacked cards so action buttons
   become full-width 44px tap targets. */
@media (max-width: 640px) {
  /* Type ladder — keep displays readable without dominating the viewport */
  h1 { font-size: 30px; line-height: 1.15; }
  h2 { font-size: 24px; }
  h3 { font-size: 19px; }

  /* Layout */
  .container { padding: 0 14px; }
  .narrow { padding: 0 14px; }
  .section { padding: 32px 0; }

  /* Hero — compact for one-thumb reading */
  .hero { padding: 36px 0 44px; text-align: left; }
  .hero h1 { font-size: 32px; max-width: 100%; line-height: 1.18; }
  .hero p.lede { font-size: 15px; max-width: 100%; margin-bottom: 22px; }
  .hero .eyebrow { margin-bottom: 14px; }

  /* Nav — brand stays, right-side links stack tight + wrap */
  .nav {
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .nav .brand-words { font-size: 19px; }
  .nav .brand-by-text { display: none; }
  .nav .brand-by-mark { height: 22px; }
  .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    width: 100%;
    justify-content: flex-end;
  }
  .nav-links a { margin-left: 0; font-size: 11px; padding: 6px 0; min-height: 32px; display: inline-flex; align-items: center; }
  .nav-links .by { margin-left: 0; padding-left: 0; border-left: 0; }

  /* Buttons — full-width-friendly tap targets */
  .btn { padding: 14px 22px; font-size: 12.5px; min-height: 44px; }
  .btn.sm { padding: 10px 16px; min-height: 40px; }

  /* Forms — bigger inputs, less margin */
  .field { margin-bottom: 14px; }
  .field input, .field select, .field textarea {
    padding: 14px 14px; font-size: 16px;   /* 16px prevents iOS zoom-on-focus */
  }

  /* Tabs scroll horizontally instead of wrapping into 3 lines */
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button {
    flex-shrink: 0;
    padding: 12px 14px;
    min-height: 44px;
  }

  /* Collapse table.list rows into stacked cards */
  table.list { font-size: 14px; margin-top: 8px; }
  table.list thead { display: none; }
  table.list, table.list tbody { display: block; }
  table.list tr {
    display: block;
    background: var(--white);
    border: 1px solid var(--divider);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
  }
  table.list td { display: block; padding: 4px 0; border: 0; }
  table.list td:first-child {
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--divider);
  }
  table.list td .btn,
  table.list td .btn.sm {
    display: block;
    width: 100%;
    margin: 6px 0 0;
    min-height: 44px;
    padding: 12px 16px;
    font-size: 14px;
  }

  /* Stat grid — 2-up on phones */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat { padding: 14px 16px; }
  .stat .n { font-size: 24px; }

  /* Card grid stacks fully */
  .card-grid { grid-template-columns: 1fr; gap: 12px; }
  .card { padding: 18px; }

  /* Modal goes near-fullscreen */
  .modal-backdrop { padding: 8px; align-items: flex-start; }
  .modal { padding: 20px; max-height: 96vh; }

  /* Rows of buttons — stack vertically with breathing room */
  .row { gap: 10px; }
  .row.between { flex-direction: column; align-items: stretch; }

  /* Footer */
  .foot { padding: 22px 0 18px; }
  .foot .container { flex-direction: column !important; align-items: flex-start !important; }
}
