/* Quiet Eye new business dashboard. Brand colours from the house conventions:
   Ink #1A1F2E, Cerulean #2D7FF9, Paper #F8F7F4, White #FFFFFF. */

:root {
  --ink: #1A1F2E;
  --cerulean: #2D7FF9;
  --paper: #F8F7F4;
  --white: #FFFFFF;
  --line: #E3E1DC;
  --muted: #6B7280;
  --warn: #9A5B00;
  --warnbg: #FDF4E3;
  --good: #1D6F42;
  --goodbg: #ECF6F0;
  --shadow: 0 1px 2px rgba(26,31,46,.06), 0 4px 12px rgba(26,31,46,.05);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cerulean); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(26,31,46,.05); padding: 1px 4px; border-radius: 3px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 12px 20px; background: var(--ink); color: var(--white);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cerulean); }
.brand .sub { color: #9AA3B2; font-size: 13px; }
.tabs { display: flex; gap: 4px; margin-left: 8px; }
.tabs button {
  background: transparent; border: 0; color: #C6CCD6; padding: 6px 12px;
  border-radius: 6px; font: inherit; cursor: pointer;
}
.tabs button:hover { background: rgba(255,255,255,.08); color: #fff; }
.tabs button.on { background: var(--cerulean); color: #fff; }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #C6CCD6; }
.who input {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  color: #fff; padding: 5px 9px; border-radius: 6px; font: inherit; width: 150px;
}
.who input::placeholder { color: #8B94A3; }
.whoNote { font-size: 12px; color: #F0B429; }
.who .whoName { color: #fff; }
.who .viewSwitch { color: #C6CCD6; border: 1px solid rgba(255,255,255,.18); padding: 4px 9px; border-radius: 6px; }
.who .viewSwitch:hover { color: #fff; text-decoration: none; border-color: rgba(255,255,255,.4); }
button.ghost.dark { background: transparent; color: #C6CCD6; border: 1px solid rgba(255,255,255,.18); }
button.ghost.dark:hover { color: #fff; }

/* ---------- sign in (the sales-view stop) ---------- */
body.loginPage { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.loginBox { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 28px 30px; width: 340px; box-shadow: var(--shadow); }
.loginBox .brand.dark { margin-bottom: 18px; }
.loginBox label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.loginBox input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.loginBox button[type=submit] { margin-top: 16px; width: 100%; padding: 9px; background: var(--cerulean); color: #fff; border: 0; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; }
.loginNote { color: #B42318; font-size: 13px; min-height: 18px; margin: 10px 0 0; }
.loginFoot { color: var(--muted); font-size: 12px; margin: 14px 0 0; }

/* ---------- admin page (the hosting stop) ---------- */
.adminForm { max-width: 360px; }
.adminForm label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 4px; }
.adminForm select, .adminForm input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: var(--white); }
.adminForm button[type=submit] { margin-top: 16px; padding: 9px 16px; background: var(--cerulean); color: #fff; border: 0; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; }
.adminNote { color: #B42318; font-size: 13px; min-height: 18px; margin: 12px 0 0; }
.adminNote.ok { color: #16794C; }

/* ---------- province tabs ---------- */
.provinceBar { display: flex; gap: 2px; padding: 0 20px; background: var(--white); border-bottom: 1px solid var(--line); }
.provinceBar button {
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 10px 14px; font: inherit; color: var(--muted); cursor: pointer;
}
.provinceBar button.on { color: var(--ink); border-bottom-color: var(--cerulean); font-weight: 600; }
.provinceBar button .n { color: var(--muted); font-weight: 400; margin-left: 5px; font-size: 12px; }
.provinceBar button.dim { color: #9AA0AB; }

main { padding: 18px 20px 60px; max-width: 1500px; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filters input[type=search], .filters select {
  font: inherit; padding: 6px 9px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--white); color: var(--ink);
}
.filters input[type=search] { width: 220px; }
.chk { display: flex; align-items: center; gap: 5px; background: var(--white); border: 1px solid var(--line); padding: 6px 10px; border-radius: 6px; cursor: pointer; }
button.ghost { font: inherit; background: var(--white); border: 1px solid var(--line); padding: 6px 12px; border-radius: 6px; cursor: pointer; color: var(--muted); }
button.ghost:hover { color: var(--ink); }
.count { color: var(--muted); margin-left: auto; }
/* Pagination, the dashboard stop of 2026-09-08. One pager per record list. */
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.pager button { font: inherit; background: var(--white); border: 1px solid var(--line); padding: 4px 9px; border-radius: 6px; cursor: pointer; color: var(--muted); min-width: 32px; }
.pager button:hover:not(:disabled) { color: var(--ink); }
.pager button.on { background: var(--cerulean); border-color: var(--cerulean); color: #fff; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager .gap { padding: 0 2px; }
.pager select { font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
.pager .sizeLabel { margin-left: auto; }

/* ---------- tables ---------- */
.tableWrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
table.grid { border-collapse: collapse; width: 100%; font-size: 13px; }
table.grid th {
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line);
  color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .02em;
  background: var(--white); white-space: nowrap;
}
table.grid td { padding: 9px 12px; border-bottom: 1px solid #F0EEE9; vertical-align: top; }
table.grid tbody tr:hover { background: #FBFAF8; }
table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; width: 62px; }
.scoreCell { font-weight: 700; font-size: 15px; }
.noScore { color: var(--muted); font-weight: 400; }
.outOf { color: var(--muted); font-weight: 400; font-size: .8em; }
.sev-critical { background: #F6DEDE; color: #8A2D2D; }
.sev-high { background: #F8E6CF; color: #8A5A1A; }
.sev-medium { background: #EEF2F8; color: #3A4657; }
.sev-low { background: #EEF2F8; color: #6A7482; }
.nameCell a { font-weight: 600; }
.small { font-size: 12px; color: var(--muted); }

/* ---------- pills ---------- */
.pill { display: inline-block; padding: 2px 7px; border-radius: 20px; font-size: 11.5px; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
.pill.band-absent { background: #FDEDEA; color: #9B2C15; }
.pill.band-organic-only { background: #FDF4E3; color: var(--warn); }
.pill.band-in-pack { background: var(--goodbg); color: var(--good); }
.pill.tier { background: #EEF2F8; color: #3A4657; }
.pill.tier-yellow-pages { background: #FFF4CC; color: #7A5B00; border-color: #F0D98A; font-weight: 600; }
.pill.converted { background: #E8F0FE; color: #14459C; border-color: #BBD1F8; font-weight: 600; }
.pill.status { background: #EEF2F8; color: #3A4657; }
.pill.status-won { background: var(--goodbg); color: var(--good); font-weight: 600; }
.pill.status-lost, .pill.status-not-a-fit { background: #F2F1EE; color: #7A7A7A; }
.pill.status-contacted, .pill.status-meeting-booked, .pill.status-proposal-sent { background: #E8F0FE; color: #14459C; }
.pill.caveat { background: var(--warnbg); color: var(--warn); border-color: #EBD9B0; cursor: help; }
.pill.caveat { margin: 0 4px 3px 0; }
table.grid td:last-child { max-width: 220px; }

/* ---------- notes and empties ---------- */
.note { background: var(--warnbg); border: 1px solid #EBD9B0; color: #6B4400; padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; }
.note.plain { background: var(--white); border-color: var(--line); color: var(--ink); }
.empty { background: var(--white); border: 1px dashed var(--line); border-radius: 8px; padding: 40px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }

/* ---------- prospect page ---------- */
.back { display: inline-block; margin-bottom: 12px; color: var(--muted); }
.pHead { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.pHead h1 { margin: 0 0 4px; font-size: 24px; }
.pHead .meta { color: var(--muted); font-size: 13px; }
.pHead .meta a { color: var(--cerulean); }
.bigScore { float: right; text-align: right; margin-left: 20px; }
.bigScore .n { font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.bigScore .n.none { font-size: 22px; color: var(--muted); font-weight: 600; }
.bigScore .sub { color: var(--muted); font-size: 12px; margin-top: 6px; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card > h2 { margin: 0 0 4px; font-size: 15px; letter-spacing: .01em; }
.card > .lede { color: var(--muted); font-size: 12.5px; margin: 0 0 14px; }
.card h3 { font-size: 13px; margin: 18px 0 8px; color: var(--ink); }

.scoreLine { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid #F2F0EC; }
.scoreLine:last-child { border-bottom: 0; }
.scoreLine .pts { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 56px; color: var(--ink); }
.scoreLine .pts.none { color: var(--muted); }
.scoreLine .why { flex: 1; }

.caveat-block { border-left: 3px solid #E0B94F; background: #FDFAF2; padding: 12px 14px; border-radius: 0 6px 6px 0; margin-bottom: 12px; }
.caveat-block.strong { border-left-color: #D0362B; background: #FDF3F1; }
.caveat-block .h { font-weight: 700; margin-bottom: 5px; }
.caveat-block ul { margin: 8px 0 0; padding-left: 18px; }
.caveat-block li { margin-bottom: 6px; }

.gap { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; }
.gap .owner { font-size: 14.5px; margin-bottom: 6px; }
.gap .how { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.gap .how.seeIt { color: #9B2C15; }
.gap .how.testIt { color: var(--warn); }
.gap .test { font-size: 12.5px; color: var(--muted); font-style: italic; margin-bottom: 8px; }
.gap details summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.gap details p { font-size: 12.5px; color: #4A5261; margin: 6px 0 0; }
.gap.untranslated { border-style: dashed; background: #FAFAF8; }

.pitch { background: #F4F8FF; border: 1px solid #C9DDFC; border-radius: 8px; padding: 18px 20px; }
.pitch .spoken { font-size: 17px; line-height: 1.5; color: var(--ink); border-left: 3px solid var(--cerulean); padding-left: 14px; margin: 10px 0 16px; }
.pitch .backing { font-size: 13px; color: #3A4657; }

.editRow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.editRow label { font-size: 12px; color: var(--muted); min-width: 52px; }
.editRow select, .editRow input[type=text] { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
textarea#notes, textarea.entryNotes { width: 100%; min-height: 90px; font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 6px; resize: vertical; background: var(--white); }
.editRow input[type=email], .editRow input[type=url], .editRow input[type=date] { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
button.primary { font: inherit; background: var(--cerulean); color: #fff; border: 0; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 600; }
button.primary:hover { background: #1F6FE0; }
button.primary:disabled { background: #B7C6DA; cursor: not-allowed; }
.saveNote { font-size: 12.5px; margin-left: 10px; }
.saveNote.ok { color: var(--good); }
.saveNote.bad { color: #9B2C15; }

.history { list-style: none; padding: 0; margin: 12px 0 0; font-size: 12.5px; }
.history li { padding: 6px 0; border-bottom: 1px solid #F2F0EC; color: #3A4657; }
.history li:last-child { border: 0; }
.history .when { color: var(--muted); }

/* ---------- pitch material ---------- */
.md h2 { font-size: 19px; margin: 26px 0 8px; }
.md h3 { font-size: 15px; margin: 20px 0 6px; }
.md h4 { font-size: 13.5px; margin: 16px 0 6px; color: #3A4657; }
.md p { margin: 8px 0; }
.md table { border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.md th { background: #F6F5F2; }
.md ul { margin: 8px 0; padding-left: 20px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.md pre { background: #F6F5F2; padding: 12px; border-radius: 6px; overflow-x: auto; }

footer { padding: 20px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); background: var(--white); }

/* Possible pairs (Section F, 2026-09-11). Both halves of one question, side by
   side, so a ruling does not need two browser tabs. */
.pairCard { border:1px solid var(--line); border-radius:8px; margin:14px 0; background:var(--white); }
.pairResolved { opacity:.72; }
.pairHead { padding:10px 14px; border-bottom:1px solid var(--line); display:flex; gap:10px; align-items:baseline; flex-wrap:wrap; }
.pairBody { display:grid; grid-template-columns:1fr 1fr; gap:0; }
.pairSide { padding:12px 14px; }
.pairSide + .pairSide { border-left:1px solid var(--line); }
.pairWhich { font-size:11px; text-transform:uppercase; letter-spacing:.06em; opacity:.6; margin-bottom:4px; }
.pairWhy { padding:10px 14px; border-top:1px solid var(--line); display:grid; gap:4px; }
@media (max-width: 860px) {
  .pairBody { grid-template-columns:1fr; }
  .pairSide + .pairSide { border-left:0; border-top:1px solid var(--line); }
}

/* The CRM stop, 2026-09-13: the contact block, the dates block, the log. */
.contactGrid { display: grid; grid-template-columns: 1fr auto; gap: 16px 28px; align-items: start; }
.contactCard h2 { margin: 0 0 8px; font-size: 15px; }
.profile.contact, .profile.dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 18px; }
.profile.contact b, .profile.dates b, .assignedBlock b { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.assignedBlock { min-width: 160px; padding-left: 18px; border-left: 1px solid var(--line); }
/* Stop S, 2026-09-14: an empty field is a plain labelled blank, no dashed underline. */
.blank { display: inline-block; min-width: 120px; }
.spans { margin: 10px 0 0; padding-left: 18px; font-size: 12.5px; }
.editRow.addEntry { margin-top: 4px; }
.history.activity li strong { text-transform: capitalize; }
@media (max-width: 720px) { .contactGrid { grid-template-columns: 1fr; } .assignedBlock { border-left: 0; padding-left: 0; } }
/* Stop S, 2026-09-14: the editable contact fields sit inside the contact block, under the facts. */
.contactBlock .editRow.crmEdit { margin: 12px 0 0; }
.contactBlock .editRow.crmEdit input[type=text], .contactBlock .editRow.crmEdit input[type=email] { min-width: 200px; }
