/* Owner portal styles. No outside fonts or images: system fonts only. */
:root { --ink: #16211f; --muted: #5b6a67; --line: #d7e0de; --bg: #f5f8f7; --card: #fff; --brand: #0b6b57; --brand-ink: #fff; --bad: #a3261d; --badbg: #fdecea; --ok: #0b6b57; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
#app { max-width: 880px; margin: 0 auto; padding: 0 16px 48px; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.brand { font-size: 1.1rem; letter-spacing: .01em; }
h1 { font-size: 1.5rem; margin: 0 0 12px; line-height: 1.25; }
h3 { font-size: 1rem; margin: 16px 0 6px; }
footer { margin-top: 32px; color: var(--muted); font-size: .9rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.narrow { max-width: 440px; margin: 24px auto; }
.field { margin: 0 0 14px; display: flex; flex-direction: column; gap: 4px; }
label { font-weight: 600; font-size: .92rem; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid #aebbb8; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid #1d8f76; outline-offset: 2px; }
button { font: inherit; cursor: pointer; border-radius: 8px; padding: 10px 16px; border: 1px solid transparent; min-height: 44px; }
button.primary { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
button.secondary { background: #fff; border-color: #aebbb8; color: var(--ink); }
button.danger { background: var(--bad); color: #fff; font-weight: 600; }
button.link { background: none; border: 0; color: var(--brand); text-decoration: underline; padding: 8px 4px; min-height: 0; }
button:disabled { opacity: .6; cursor: default; }
.notice { margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; background: #e6f3ef; border: 1px solid #b9dcd2; }
.notice.bad { background: var(--badbg); border-color: #f0b8b2; color: #6f1912; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.chip { background: #fff; border: 1px solid #aebbb8; color: var(--ink); padding: 6px 12px; min-height: 36px; border-radius: 999px; }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.tools { display: grid; gap: 12px; grid-template-columns: 1fr; align-items: end; margin-bottom: 12px; }
@media (min-width: 640px) { .tools { grid-template-columns: 1fr auto; } .grid { grid-template-columns: 1fr 1fr; } }
.tools .field { margin: 0; }
.leads { display: grid; gap: 10px; }
.empty { color: var(--muted); padding: 24px 0; }
.lead { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lead.open { border-color: #7fb5a7; }
.lead-head { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; text-align: left; background: none; border: 0; padding: 14px 16px; color: var(--ink); border-radius: 0; }
.who { display: flex; flex-direction: column; min-width: 0; }
.who b, .who small { overflow-wrap: anywhere; }
.who small { color: var(--muted); }
.meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.est { font-weight: 600; }
.badge { padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; border: 1px solid; }
.s-new { background: #fff4d6; border-color: #e2c564; color: #5b4300; }
.s-contacted { background: #e7f0fb; border-color: #9dbbe3; color: #163a63; }
.s-quoted { background: #efe9fb; border-color: #bba8e6; color: #3b2470; }
.s-sold { background: #e1f4ea; border-color: #86c9a3; color: #0b4d2e; }
.s-lost { background: #eee; border-color: #bbb; color: #444; }
.detail { padding: 4px 16px 18px; border-top: 1px solid var(--line); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 12px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; background: #f5f8f7; padding: 10px 12px; border-radius: 8px; }
.quote ul { margin: 0; padding-left: 20px; overflow-wrap: anywhere; }
.grid { display: grid; gap: 0 14px; grid-template-columns: 1fr; margin-top: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.confirm { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.history { margin-top: 14px; color: var(--muted); }
.history ul { padding-left: 20px; }
.noscript { padding: 24px; }

/* Summary at the top */
h2 { font-size: 1.15rem; margin: 0 0 8px; line-height: 1.3; }
.summary { margin: 0 0 20px; }
.stats { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin: 0 0 8px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.stat-label { color: var(--muted); font-size: .85rem; }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.stat-note { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.fine { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.nudge { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 10px; padding: 10px 14px; border-radius: 8px; background: #fff4d6; border: 1px solid #e2c564; color: #5b4300; }
.nudge button { min-height: 36px; padding: 6px 12px; }

/* Filters */
.filters { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin: 0 0 12px; }
@media (min-width: 720px) { .filters { grid-template-columns: repeat(4, 1fr); } }
.filters .field { margin: 0; min-width: 0; }
.countrow { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.count { color: var(--muted); font-size: .9rem; margin: 0; }

/* Not opened yet marker, and screen-reader-only text */
.new-dot { width: 10px; height: 10px; border-radius: 50%; background: #1d8f76; display: inline-block; flex-shrink: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Reach out */
.reach h3 { margin-top: 12px; }
.btnlink { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border-radius: 8px; border: 1px solid #aebbb8; background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; }
.btnlink:focus-visible { outline: 3px solid #1d8f76; outline-offset: 2px; }
.reachbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 0 0 12px; padding: 12px 14px; border-radius: 8px; background: #e6f3ef; border: 1px solid #b9dcd2; }
