/* Ward Automations portal — champagne gold on near-black. Restrained, expensive. */
:root {
  --bg: #0b0b0d;
  --bg2: #121215;
  --card: #151518;
  --line: #232326;
  --gold: #d4af6a;
  --gold-dim: #a8874e;
  --gold-faint: rgba(212, 175, 106, 0.12);
  --text: #f4f1ea;
  --muted: #9a968c;
  --green: #7fb069;
  --red: #d1605f;
  --radius: 14px;
  --font: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--gold); }

/* ---------- landing / login ---------- */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 24px 40px;
}
.eyebrow {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.hero h1 .gold { color: var(--gold); }
.hero p.sub {
  color: var(--muted);
  font-size: 18px;
  max-width: 560px;
  line-height: 1.6;
  margin-bottom: 48px;
}

.login-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 820px) { .login-wrap { grid-template-columns: 1fr; } }

.funnel-line {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.funnel-line .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.funnel-line .bar { flex: 1; height: 1px; background: var(--line); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.card h2 { font-size: 22px; margin-bottom: 6px; }
.card .hint { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 13px 14px;
  font-size: 15px;
  font-family: var(--font);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold-dim);
}
.field textarea { min-height: 90px; resize: vertical; }

.btn {
  display: inline-block;
  background: var(--gold);
  color: #141310;
  border: none;
  border-radius: 10px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  font-family: var(--font);
}
.btn:hover { background: #e2bd7d; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  width: auto;
}
.btn.small { padding: 9px 14px; font-size: 13px; width: auto; }

.error {
  background: rgba(209, 96, 95, 0.12);
  border: 1px solid rgba(209, 96, 95, 0.4);
  color: #e89a99;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.ok {
  background: rgba(127, 176, 105, 0.12);
  border: 1px solid rgba(127, 176, 105, 0.4);
  color: #a9cf99;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

/* ---------- app shell ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 11, 13, 0.9);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 34px; width: auto; display: block; }
.brand .name { font-weight: 800; letter-spacing: 1px; font-size: 15px; }
.brand .name small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; letter-spacing: 2.5px; }
.topbar .who { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; }

.page { max-width: 1080px; margin: 0 auto; padding: 36px 24px 80px; }
.page h1 { font-size: 32px; letter-spacing: -0.5px; margin-bottom: 6px; }
.page .sub { color: var(--muted); margin-bottom: 28px; }

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
@media (max-width: 820px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.stat .k {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.stat .v { font-size: 38px; font-weight: 800; letter-spacing: -1px; }
.stat .v.gold { color: var(--gold); }
.stat .d { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* ---------- leads ---------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 16px;
}
.section-head h2 { font-size: 20px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
}
.chip.active { background: var(--gold-faint); border-color: var(--gold-dim); color: var(--gold); }

.lead {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}
.lead .who-line { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.lead .meta { color: var(--muted); font-size: 14px; line-height: 1.55; }
.lead .meta b { color: var(--text); font-weight: 600; }
.lead .when { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.status {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.status.new { color: var(--gold); border-color: var(--gold-dim); background: var(--gold-faint); }
.status.contacted { color: #9ec7e8; border-color: #3d5a76; background: rgba(158, 199, 232, 0.08); }
.status.booked { color: var(--green); border-color: rgba(127,176,105,.5); background: rgba(127,176,105,.1); }
.status.closed { color: var(--muted); }

.lead-detail {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: none;
}
.lead.open .lead-detail { display: block; }
.lead-detail .row { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.lead-detail select {
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font);
}
.notes { color: var(--muted); font-size: 14px; font-style: italic; margin-top: 8px; }

/* ---------- owner ---------- */
.biz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.biz {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
}
.biz:hover { border-color: var(--gold-dim); }
.biz .t { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.biz .c { color: var(--muted); font-size: 13px; font-family: monospace; }
.biz .n { color: var(--gold); font-size: 14px; margin-top: 10px; }
.biz img.blogo { height: 30px; width: auto; margin-bottom: 10px; display: block; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
table.data td { padding: 12px; border-bottom: 1px solid var(--line); }

.back { color: var(--muted); font-size: 14px; cursor: pointer; margin-bottom: 18px; display: inline-block; }
.back:hover { color: var(--gold); }

.feed .item {
  display: flex; gap: 12px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.feed .t { color: var(--muted); font-size: 12.5px; white-space: nowrap; margin-left: auto; }

.empty { color: var(--muted); text-align: center; padding: 40px 0; }
.loading { color: var(--muted); text-align: center; padding: 40px 0; }
.logo-preview { max-height: 44px; margin-top: 10px; display: none; border-radius: 8px; }
