/* Prima Realty demo. DLVX proposal deck family: cream, ink, hairline, chartreuse. */

@font-face {
  font-family: 'Fraunces';
  src: url('../assets/fonts/fraunces-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('../assets/fonts/inter-tight-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --cream: #F4F1EC;
  --ink: #1F1E1C;
  --ink-soft: #4A463F;
  --hairline: #DAD4C6;
  --accent: #E5FF3A;
  --white: #FDFCF9;
  --radius: 14px;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

::selection { background: var(--accent); color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.01em; }

button { font-family: var(--sans); cursor: pointer; }

/* ---------- demo ribbon + topbar ---------- */

.demo-ribbon {
  background: var(--accent);
  color: var(--ink);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--hairline);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}

.brand-name { font-family: var(--serif); font-size: 19px; }
.brand-name em { font-style: italic; font-weight: 400; }

.view-switch {
  display: flex;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--white);
  padding: 3px;
  margin: 0 auto;
}

.view-tab {
  border: 0;
  background: transparent;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.view-tab.is-active { background: var(--ink); color: var(--cream); }

.topbar-meta { margin-left: auto; }

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
}
.pill-accent { background: var(--accent); border-color: var(--accent); }

/* ---------- banner ---------- */

.enquiry-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 20px;
  font-size: 14px;
}
.banner-close {
  background: none; border: 0; color: var(--cream);
  font-size: 18px; line-height: 1; opacity: 0.7;
}
.banner-close:hover { opacity: 1; }

/* ---------- buttons ---------- */

.btn {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn-small { padding: 7px 14px; font-size: 12px; }

/* ---------- hero ---------- */

.hero {
  background: var(--ink);
  color: var(--cream);
  padding: 72px 24px 80px;
}

.hero-inner { max-width: 1080px; margin: 0 auto; }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.eyebrow-light { color: var(--accent); }

.hero-title {
  font-size: clamp(34px, 5.4vw, 62px);
  line-height: 1.06;
  font-weight: 500;
  margin-bottom: 18px;
}

.hero-sub {
  max-width: 560px;
  color: #B9B4A9;
  font-size: 16px;
  margin-bottom: 36px;
}

.search-bar {
  display: flex;
  gap: 10px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px;
  max-width: 860px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.search-field { flex: 1 1 150px; display: flex; flex-direction: column; gap: 4px; }
.search-field span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 4px;
}
.search-field select {
  border: 1px solid var(--hairline);
  border-radius: 9px;
  background: var(--cream);
  color: var(--ink);
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--sans);
  width: 100%;
  appearance: none;
}

/* ---------- sections ---------- */

.section { padding: 64px 24px; max-width: 1200px; margin: 0 auto; }
.section-dark {
  background: var(--ink);
  color: var(--cream);
  max-width: none;
}
.section-dark > * { max-width: 1200px; margin-left: auto; margin-right: auto; }

.section-head { margin-bottom: 28px; }
.section-title { font-size: clamp(24px, 3vw, 36px); }
.section-sub { color: var(--ink-soft); margin-top: 6px; font-size: 14px; }
.section-dark .section-sub { color: #B9B4A9; }

/* ---------- listing grid ---------- */

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.listing-card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.listing-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(31,30,28,0.10); }

.card-photo {
  aspect-ratio: 4 / 3;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.card-photo::after {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 14px),
    linear-gradient(to top, rgba(31,30,28,0.45), transparent 55%);
}
.card-photo-label {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,0.92);
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
}
.card-status {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 1;
  background: var(--cream);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
}
.card-status.s-offer { background: var(--accent); }

.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-district { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.card-title { font-family: var(--serif); font-size: 21px; line-height: 1.2; }
.card-price { font-size: 17px; font-weight: 700; margin-top: 2px; }
.card-specs { font-size: 13px; color: var(--ink-soft); }
.card-cta { margin-top: auto; padding-top: 12px; }
.card-cta span { font-size: 13px; font-weight: 650; border-bottom: 1px solid var(--ink); padding-bottom: 1px; }

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--hairline);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-soft);
}

/* ---------- why ---------- */

.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.why-card { border: 1px solid #3A3833; border-radius: var(--radius); padding: 26px; }
.why-card h3 { font-size: 21px; margin-bottom: 10px; }
.why-card p { color: #B9B4A9; font-size: 14px; }

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 40px 24px;
  border-top: 1px solid var(--hairline);
  max-width: 1200px;
  margin: 0 auto;
}
.footer-line { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }

/* ---------- listing detail ---------- */

.detail-view { max-width: 1200px; margin: 0 auto; padding: 28px 24px 72px; }
.back-btn { margin-bottom: 22px; }

.detail-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  align-items: start;
}

.gallery-main {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.gallery-main::after {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 16px),
    linear-gradient(to top, rgba(31,30,28,0.4), transparent 55%);
}
.gallery-caption {
  position: relative; z-index: 1;
  color: rgba(255,255,255,0.92);
  font-family: var(--serif); font-style: italic; font-size: 17px;
}

.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.gallery-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 9px;
  border: 1px solid var(--hairline);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.gallery-thumb.is-active { outline: 2px solid var(--ink); outline-offset: 2px; }

.detail-title { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; margin-bottom: 8px; }
.detail-price { font-size: 22px; font-weight: 700; margin-bottom: 20px; }

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.fact { background: var(--white); padding: 13px 16px; }
.fact b { display: block; font-size: 15px; }
.fact span { font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; }

.detail-desc { color: var(--ink-soft); margin-bottom: 24px; }

.agent-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--hairline);
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 24px;
}
.agent-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 19px;
  color: var(--cream);
  flex-shrink: 0;
}
.agent-card b { display: block; font-size: 15px; }
.agent-card span { font-size: 13px; color: var(--ink-soft); }

/* ---------- enquiry form ---------- */

.enquiry-form {
  border: 1px solid var(--hairline);
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.enquiry-form h3 { font-size: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.enquiry-form input, .enquiry-form textarea {
  border: 1px solid var(--hairline);
  border-radius: 9px;
  background: var(--cream);
  padding: 11px 13px;
  font-size: 14px;
  font-family: var(--sans);
  color: var(--ink);
  width: 100%;
  resize: vertical;
}
.enquiry-form input:focus, .enquiry-form textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }

.enquiry-done {
  border: 1px solid var(--ink);
  background: var(--accent);
  border-radius: var(--radius);
  padding: 24px;
}
.enquiry-done h3 { font-size: 22px; margin-bottom: 6px; }

/* ---------- CRM ---------- */

#view-crm { max-width: 1280px; margin: 0 auto; padding: 32px 24px 72px; }

.crm-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.crm-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 12px 18px;
  min-width: 120px;
}
.stat-card b { font-family: var(--serif); font-size: 24px; display: block; line-height: 1.1; }
.stat-card span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft); }
.stat-card.s-accent { background: var(--accent); border-color: var(--accent); }
.stat-card.s-accent span { color: var(--ink); }

/* ---------- board ---------- */

.board-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px 8px; }
.board {
  display: grid;
  grid-template-columns: repeat(6, minmax(190px, 1fr));
  gap: 12px;
  min-width: 1080px;
}

.board-col {
  background: rgba(218,212,198,0.35);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
}
.board-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.board-col-head .count {
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  font-size: 11px;
  padding: 1px 8px;
}
.board-col.is-won .board-col-head .count { background: var(--accent); color: var(--ink); }

.lead-card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 11px 12px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.lead-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(31,30,28,0.10); }
.lead-card.is-new { border-left: 3px solid var(--accent); }
.lead-card b { display: block; font-size: 13.5px; line-height: 1.3; }
.lead-card .lead-prop { font-size: 12px; color: var(--ink-soft); margin: 2px 0 6px; }
.lead-card .lead-meta { display: flex; justify-content: space-between; align-items: center; gap: 4px 6px; flex-wrap: wrap; }
.lead-card .lead-budget { font-size: 12px; font-weight: 700; white-space: nowrap; }

.src-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid var(--hairline);
  color: var(--ink-soft);
  white-space: nowrap;
}
.src-website { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.src-line { background: #E4F2E4; border-color: #CBE3CB; color: #2F5D33; }
.src-whatsapp { background: #E9EFE4; border-color: #D4DFC8; color: #47602F; }
.src-portal { background: var(--cream); }

.col-empty { font-size: 12px; color: var(--ink-soft); text-align: center; padding: 18px 6px; border: 1px dashed var(--hairline); border-radius: 9px; }

/* ---------- CRM tabs ---------- */

.crm-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--hairline);
  overflow-x: auto;
  scrollbar-width: none;
}
.crm-tabs::-webkit-scrollbar { display: none; }

.crm-tab {
  border: 0;
  background: none;
  padding: 11px 16px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.crm-tab:hover { color: var(--ink); }
.crm-tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }

.tab-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15.5px;
  color: var(--ink-soft);
  padding: 14px 2px 0;
}

.tab-panel { padding-top: 20px; }

/* ---------- leads tab ---------- */

.leads-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.filter-group { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.filter-chip {
  border: 1px solid var(--hairline);
  background: var(--white);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.filter-chip:hover { border-color: var(--ink); color: var(--ink); }
.filter-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--cream); }

.leads-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
.leads-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  background: var(--cream);
}
.leads-table td { padding: 11px 14px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.leads-table tbody tr { cursor: pointer; transition: background 0.1s ease; }
.leads-table tbody tr:hover { background: rgba(229,255,58,0.22); }
.leads-table tr:last-child td { border-bottom: 0; }
.leads-table .lead-cell b { display: block; font-size: 13.5px; }
.leads-table .lead-cell span { font-size: 12px; color: var(--ink-soft); }

.agent-cell { display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.agent-cell .agent-avatar { width: 26px; height: 26px; font-size: 12px; }

.stage-mini {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 3px 10px;
  border: 1px solid var(--hairline);
  white-space: nowrap;
}
.stage-mini.s-new { background: var(--accent); border-color: var(--accent); }
.stage-mini.s-won { background: var(--ink); border-color: var(--ink); color: var(--cream); }

.age-cell { color: var(--ink-soft); white-space: nowrap; }

/* ---------- portal publish state ---------- */

.pub-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 11px;
  white-space: nowrap;
}
.pub-live { background: var(--ink); color: var(--cream); border: 1px solid var(--ink); }
.pub-btn {
  background: var(--accent);
  color: var(--ink);
  border: 1px solid var(--accent);
  cursor: pointer;
}
.pub-btn:hover { box-shadow: 0 3px 10px rgba(31,30,28,0.18); }

/* ---------- viewings week ---------- */

.week-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px 8px; }
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: 10px;
  min-width: 1000px;
}

.day-col {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
.day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.day-head span { color: var(--ink-soft); font-weight: 600; }
.day-col.is-today { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.day-col.is-today .day-head { background: var(--accent); }
.day-col.is-today .day-head span { color: var(--ink); }

.day-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }

.v-block {
  background: var(--cream);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 9px 11px;
}
.v-block b { display: block; font-size: 13px; line-height: 1.3; }
.v-block .v-time { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.v-block span { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

.day-empty {
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
  padding: 16px 6px;
  border: 1px dashed var(--hairline);
  border-radius: 9px;
}

.assistant-tab { position: static; max-width: 640px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--white); }
.listings-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 980px; }
.listings-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  background: var(--cream);
}
.listings-table td { padding: 11px 14px; border-bottom: 1px solid var(--hairline); }
.listings-table tr:last-child td { border-bottom: 0; }
.listings-table td:first-child { font-weight: 600; }

.status-pill {
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--hairline);
  white-space: nowrap;
}
.status-available { background: var(--white); }
.status-offer { background: var(--accent); border-color: var(--accent); }
.status-sold { background: var(--ink); border-color: var(--ink); color: var(--cream); }

/* ---------- assistant ---------- */

.assistant {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 96px;
}
.assistant-head { display: flex; align-items: center; gap: 10px; }
.assistant-head h3 { font-size: 19px; }
.assistant-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(229,255,58,0.18);
}

.assistant-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
}
.msg {
  border-radius: 12px;
  padding: 10px 13px;
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 92%;
}
.msg-bot { background: #2C2A26; color: #E8E4DB; align-self: flex-start; border-bottom-left-radius: 3px; }
.msg-user { background: var(--accent); color: var(--ink); align-self: flex-end; border-bottom-right-radius: 3px; font-weight: 550; }
.msg-bot ul { margin: 6px 0 2px 16px; }
.msg-bot li { margin-bottom: 3px; }

.assistant-chips { display: flex; flex-direction: column; gap: 7px; }
.chip {
  background: transparent;
  border: 1px solid #3A3833;
  color: #E8E4DB;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12.5px;
  text-align: left;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.chip:hover { border-color: var(--accent); background: rgba(229,255,58,0.06); }

/* ---------- lead panel ---------- */

.lead-overlay {
  position: fixed; inset: 0;
  background: rgba(31,30,28,0.45);
  z-index: 60;
}

.lead-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(430px, 100%);
  background: var(--cream);
  border-left: 1px solid var(--hairline);
  z-index: 61;
  display: flex;
  flex-direction: column;
  box-shadow: -18px 0 44px rgba(31,30,28,0.18);
}

.lead-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--hairline);
}
.lead-panel-head h3 { font-size: 24px; line-height: 1.15; }
.lp-sub { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
.panel-close {
  background: var(--white);
  border: 1px solid var(--hairline);
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 17px;
  line-height: 1;
  flex-shrink: 0;
}

.lp-body { padding: 18px 22px 28px; overflow-y: auto; }

.lp-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.lp-facts .fact b { font-size: 13.5px; word-break: break-word; }

.lp-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.agent-select { display: flex; gap: 8px; margin-bottom: 20px; }
.agent-opt {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 10px 6px;
  font-size: 13px;
  font-weight: 600;
}
.agent-opt .agent-avatar { width: 36px; height: 36px; font-size: 15px; }
.agent-opt.is-active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--accent); }

.stage-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}
.stage-current {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
}
.stage-controls .btn:disabled { opacity: 0.35; cursor: default; transform: none; }

.activity-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 14px; }
.activity-item {
  position: relative;
  padding: 0 0 14px 20px;
  font-size: 13px;
  border-left: 1px solid var(--hairline);
  margin-left: 5px;
}
.activity-item::before {
  content: '';
  position: absolute;
  left: -5px; top: 4px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--ink);
}
.activity-item b { display: block; font-size: 13px; }
.activity-item span { color: var(--ink-soft); font-size: 12px; }

.note-form { display: flex; gap: 8px; }
.note-form input {
  flex: 1;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--white);
  padding: 9px 14px;
  font-size: 13px;
  font-family: var(--sans);
  color: var(--ink);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .view-switch { order: 3; width: 100%; }
  .view-tab { flex: 1; }
  .topbar-meta { display: none; }
  .hero { padding: 48px 16px 56px; }
  .section { padding: 44px 16px; }
  .search-bar { flex-direction: column; align-items: stretch; }
  .form-row { grid-template-columns: 1fr; }
  .fact-grid { grid-template-columns: 1fr 1fr; }
  #view-crm { padding: 24px 16px 56px; }
  .board-wrap { margin: 0 -16px; padding: 0 16px 8px; }
  .board { grid-template-columns: repeat(6, minmax(230px, 78vw)); min-width: 0; }
  .week-wrap { margin: 0 -16px; padding: 0 16px 8px; }
  .week-grid { grid-template-columns: repeat(7, minmax(220px, 72vw)); min-width: 0; }
  .enquiry-banner { flex-wrap: wrap; text-align: center; gap: 8px; }
  .crm-head { align-items: flex-start; flex-direction: column; }
  .detail-view { padding: 20px 16px 56px; }
}
