/* Boat Valuation by Saelix — neutral, white-labelable product shell. Seller + dealer views.
   Saelix palette: Royal Blue #4169E1 (primary), Forest Green #228B22 (success). The dealer's
   own logo/color override these per-tenant via the brand config (white-label seam). */
:root {
  --navy: #102a43;          /* neutral deep blue header */
  --navy-deep: #0a1e30;
  --navy-soft: #1b3a57;
  --gold: #4169E1;          /* Saelix Royal Blue — primary / CTA */
  --gold-light: #5a7de8;
  --gold-deep: #2f50b5;
  --cream: #f7f9fc;
  --ink: #111827;
  --muted: #6B7280;
  --line: #e5e7eb;
  --white: #fff;
  --good: #228B22;          /* Forest Green — success / won */
  --warn: #D27534;          /* Royal Orange — review / in-progress */
  --radius: 8px;
  --shadow: 0 10px 30px rgba(16, 42, 67, 0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--ink); background: var(--cream); line-height: 1.55; }
h1, h2, h3 { font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; font-weight: 700; color: var(--ink); line-height: 1.15; letter-spacing: -.01em; }
.container { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }
.container.wide { max-width: 1100px; }

/* Header */
.site-header { background: rgba(2, 21, 39, .96); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; }
.brand-logo { display: inline-flex; align-items: center; gap: 9px; }
.bw-shield { height: 30px; width: auto; display: block; }
.bw-word { display: flex; align-items: baseline; gap: 7px; line-height: 1; }
.bw-c { font: 700 19px 'Inter', system-ui, sans-serif; letter-spacing: -.01em; color: #fff; }
.bw-rule { display: none; }
.bw-b { font: 500 12px 'Inter', system-ui, sans-serif; letter-spacing: .02em; color: rgba(255,255,255,.7); }
.dealer-link { color: rgba(255,255,255,.82); text-decoration: none; font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.dealer-link:hover { color: #fff; }
.site-footer { margin-top: 44px; padding: 22px 0; color: var(--muted); font-size: .78rem; text-align: center; }

.main { padding-top: 34px; }
.hero { text-align: center; margin-bottom: 24px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); letter-spacing: -.01em; }
.hero .sub { color: var(--muted); max-width: 560px; margin: 8px auto 0; }

/* Cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; margin-bottom: 18px; }

/* Form */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; }
.field-wide { grid-column: 1 / -1; }
label { font-size: .82rem; font-weight: 600; margin-bottom: 5px; color: var(--ink); }
label .opt { color: var(--muted); font-weight: 400; }
input, select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: 2px solid var(--gold-deep); border-color: var(--gold-deep); }

.btn { display: inline-block; font: 600 .8rem 'Inter', sans-serif; letter-spacing: .12em; text-transform: uppercase; padding: 14px 26px; border-radius: 2px; border: 1px solid transparent; cursor: pointer; transition: background .15s ease, color .15s ease; }
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--gold-light); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-block { width: 100%; margin-top: 16px; }

/* Result */
.result-card { text-align: center; }
.result-label { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; color: var(--muted); font-weight: 700; }
.result-range { font: 700 clamp(2rem, 6vw, 3rem) 'Inter', sans-serif; color: var(--navy); margin: 4px 0; letter-spacing: -.01em; }
.result-point { color: var(--ink); font-weight: 500; }
.result-meta { margin: 10px 0; font-size: .9rem; color: var(--muted); }
.conf-badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #eef0f3; color: var(--muted); }
.conf-high { background: #e6f3ec; color: var(--good); }
.conf-medium { background: #f6efe0; color: var(--gold-deep); }
.conf-low { background: #fbeef0; color: var(--warn); }
.disclaimer { font-size: .82rem; color: var(--muted); max-width: 520px; margin: 8px auto 0; }
.lead-card h2 { font-size: 1.6rem; margin-bottom: 4px; }
.lead-card .sub { color: var(--muted); margin-bottom: 14px; }
.form-status { margin-top: 12px; font-size: .9rem; color: var(--good); font-weight: 600; min-height: 1.2em; text-align: center; }

/* Dealer table */
.dealer-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 14px; flex-wrap: wrap; gap: 8px; }
.dealer-head h1 { font-size: 2rem; }
.dealer-head .sub { color: var(--muted); font-size: .9rem; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #eef2f9; color: var(--navy); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
td.num { font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.pill-acquire { background: #e6f3ec; color: var(--good); }
.pill-review { background: #f6efe0; color: var(--gold-deep); }
.pill-pass { background: #f0f2f5; color: var(--muted); }
.demand-high { color: var(--good); font-weight: 600; }
.demand-medium { color: var(--gold-deep); font-weight: 600; }
.demand-low { color: var(--muted); }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }

/* Honeypot (off-screen, never shown to humans) */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Consent */
.consent-row { display: flex; align-items: flex-start; gap: 9px; grid-column: 1 / -1; margin-top: 2px; }
.consent-row input { width: auto; margin-top: 3px; }
.consent-row label { font-weight: 400; font-size: .82rem; color: var(--muted); margin: 0; }

/* Login */
.login-wrap { max-width: 380px; margin: 8vh auto; }
.login-wrap .card { padding: 30px; }
.login-wrap h1 { font-size: 1.5rem; margin-bottom: 4px; }
.login-err { color: var(--warn); font-size: .85rem; margin-top: 10px; min-height: 1.1em; }

/* Dealer worklist */
.dash-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.dash-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.dash-card .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.dash-card .v { font: 700 1.5rem 'Inter', sans-serif; color: var(--navy); margin-top: 2px; font-variant-numeric: tabular-nums; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.filter-bar input, .filter-bar select { width: auto; padding: 8px 10px; }
.chip-row { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: .76rem; font-weight: 600; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.chip.on { background: var(--gold); color: #fff; border-color: var(--gold); }
.status-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #eef2f9; color: var(--navy-soft); text-transform: capitalize; }
.status-won { background: #e6f3ec; color: var(--good); }
.status-lost { background: #f0f2f5; color: var(--muted); }
.status-offer, .status-appraising { background: #fbeede; color: var(--warn); }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: #f7f9fc; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 12px; }

/* Dealer detail */
.detail-back { display: inline-block; margin: 18px 0 8px; color: var(--gold-deep); text-decoration: none; font-weight: 600; font-size: .85rem; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
.detail-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.detail-head h1 { font-size: 1.5rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.panel h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: .9rem; }
.kv .k { color: var(--muted); }
.comps-table { font-size: .82rem; }
.activity-item { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
.activity-item:last-child { border-bottom: 0; }
.activity-item .meta { color: var(--muted); font-size: .76rem; }
.note-composer { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.note-composer textarea { width: 100%; min-height: 64px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; font: inherit; resize: vertical; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions select { width: auto; padding: 8px 10px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 6px; font-size: .85rem; opacity: 0; transition: opacity .2s; z-index: 100; }
.toast.show { opacity: 1; }

@media (max-width: 760px) { .detail-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
