/* Robshaw colours: forest green #2D4635 and cream #f1eee9, with sage and brass to go with them. */
:root {
  --bg: #f1eee9; --surface: #ffffff; --surface-2: #f8f6f2; --border: #e2ddd4; --text: #1f2a23; --muted: #6b7169;
  --brand: #2D4635; --brand-2: #3f6450; --cream: #f1eee9; --accent: #b08d57; --accent-soft: #f3e9d8;
  --green: #2f7a4e; --green-soft: #e2f0e6; --red: #a8433a; --red-soft: #f7e4e1; --amber: #94661c; --amber-soft: #f6ead3;
  --blue: #3d6670; --blue-soft: #e3eeee; --grey-soft: #ece8e1;
  --bar: #aebfb3; --bar-hi: #2D4635; --grid: #e8e3da;
  --radius: 12px; --shadow: 0 1px 2px rgba(45, 70, 53, .05), 0 2px 8px rgba(45, 70, 53, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121814; --surface: #1a221d; --surface-2: #1f2822; --border: #2d3830; --text: #ebe8e2; --muted: #9ca59d;
    --brand: #9ec3aa; --brand-2: #b4d3bd; --accent: #d4b07a; --accent-soft: #3a3020;
    --green: #7fcf9c; --green-soft: #19301f; --red: #ec8f84; --red-soft: #3a1f1c; --amber: #e6c27a; --amber-soft: #382d18;
    --blue: #8fbfc7; --blue-soft: #1b2d30; --grey-soft: #252e28;
    --bar: #3e5546; --bar-hi: #9ec3aa; --grid: #26302a; --shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 2px; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 10px; }
h3:first-of-type { margin-top: 4px; }
small, .small { font-size: 12.5px; }
.muted-text { color: var(--muted); margin: 0; }

/* layout */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 236px; background: #2D4635; color: #fff; display: flex; flex-direction: column; padding: 18px 14px; z-index: 20; }
@media (prefers-color-scheme: dark) { .sidebar { background: #18241c; border-right: 1px solid var(--border); } }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; font-weight: 700; font-size: 16px; }
.brand:hover { text-decoration: none; }
.brand em { font-style: normal; font-weight: 400; opacity: .7; }
.logo { width: 30px; height: 28px; flex: none; color: var(--brand); }
.sidebar .logo, .topbar .logo { color: var(--cream); }
.sidebar .brand { padding: 2px 8px 18px; color: var(--cream); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; margin-right: -6px; padding-right: 6px; }
.sidebar nav a { flex-shrink: 0; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: rgba(255,255,255,.78); font-weight: 500; }
.sidebar nav a svg { width: 19px; height: 19px; fill: currentColor; opacity: .85; }
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: rgba(255,255,255,.14); color: #fff; }
.who { display: flex; gap: 10px; align-items: center; padding: 12px 8px 2px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; }
.who strong { display: block; color: #fff; }
.who a, .who .linkish { color: rgba(255,255,255,.7); }
.who .linkish { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.who .linkish:hover { text-decoration: underline; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.16); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.topbar { display: none; }
.main { margin-left: 236px; padding: 28px 32px 60px; max-width: 1280px; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 30px 28px; box-shadow: var(--shadow); }
.auth-card .brand.big { margin-bottom: 26px; color: var(--text); }
.auth-card h1 { font-size: 22px; margin-bottom: 14px; }
.auth-card .muted-text { margin-bottom: 16px; }
.auth-card .small { margin-top: 18px; }
/* two-step sign-in (pages/twostep.php) */
.auth-card .code-input { font-size: 24px; letter-spacing: 6px; text-align: center; font-weight: 600; }
.auth-card label.check { align-self: start; padding-bottom: 0; }
.auth-card .form-actions { margin-top: 14px; font-size: 13px; color: var(--muted); gap: 6px; }
.auth-card .linkish, #two-step .linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--green); cursor: pointer; text-decoration: underline; }
#two-step ul.plain-list { list-style: none; padding: 0; margin: 0 0 12px; }
#two-step ul.plain-list li { padding: 7px 0; border-bottom: 1px solid var(--border); }

@media (max-width: 900px) {
  .topbar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 30; background: #2D4635; color: #fff; padding: 10px 16px; }
  @media (prefers-color-scheme: dark) { .topbar { background: #18241c; border-bottom: 1px solid var(--border); } }
  .topbar .brand { color: #fff; }
  .menu-btn { background: none; border: 0; padding: 6px; color: #fff; cursor: pointer; }
  .menu-btn svg { width: 24px; height: 24px; fill: currentColor; display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; top: 52px; }
  .sidebar > .brand { display: none; }
  .nav-open .sidebar { transform: none; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
  .main { margin-left: 0; padding: 20px 16px 48px; }
  h1 { font-size: 22px; }
}

/* page header */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.month-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.month-nav form { margin: 0; }
.month-nav input[type=month] { width: auto; padding: 6px 10px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0f151d; } }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 13.5px; }
.btn.danger { color: var(--red); border-color: var(--red-soft); background: transparent; }
.btn.danger:hover { background: var(--red-soft); }
.btn.disabled { opacity: .35; pointer-events: none; }
button.link { background: none; border: 0; padding: 0; color: var(--brand-2); font: inherit; cursor: pointer; margin-right: 10px; }
button.link:hover, summary.link:hover { text-decoration: underline; }
summary.link { color: var(--brand-2); cursor: pointer; list-style: none; display: inline; }
summary.link::-webkit-details-marker { display: none; }

/* cards & grid */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span-2 { grid-column: span 2; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } .grid-2 .span-2 { grid-column: auto; } }

.kpis { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.kpi-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi-value { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 500px) { .kpi-value { font-size: 24px; } .kpi { padding: 13px 14px; } }

/* chart */
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--bar); transition: fill .15s; }
.chart .bar.hi { fill: var(--bar-hi); }
.chart g:hover .bar { fill: var(--accent); }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
@media (max-width: 600px) { .chart .axis { font-size: 19px; } .chart .axis:not([text-anchor=end]) { font-size: 17px; } }
.chart .axis.hi { fill: var(--text); font-weight: 700; }

/* leaderboard */
.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.board li { display: flex; gap: 12px; align-items: flex-start; }
.board li.me .who-cell strong::after { content: "you"; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; margin-left: 6px; vertical-align: 1px; }
.rank { width: 24px; height: 24px; border-radius: 50%; background: var(--grey-soft); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; margin-top: 1px; }
.board li:first-child .rank { background: var(--accent); color: #1a1408; }
.who-cell { flex: 1; min-width: 0; }
.who-cell .row { display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
.meter { height: 6px; background: var(--grey-soft); border-radius: 3px; margin: 5px 0 3px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--brand-2); border-radius: 3px; }
.sub { font-size: 12.5px; color: var(--muted); }

.mini-stats { display: grid; gap: 10px; }
.mini-stats a { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: baseline; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.mini-stats a:hover { text-decoration: none; border-color: var(--muted); }
.mini-stats strong { font-size: 26px; grid-row: span 2; }
.mini-stats em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.quick { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.facts { margin: 0; display: grid; gap: 0; }
.facts div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); }
.facts div:last-child { border: 0; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
.card:not(.flush) table th { background: transparent; }
.card:not(.flush) .table-wrap { margin: 0 -20px -18px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
tr.muted td { opacity: .55; }
.actions { text-align: right; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 320px; }
.empty { color: var(--muted); padding: 18px 0; margin: 0; }
.card.flush .empty { padding: 28px 20px; }
.empty-state { text-align: center; padding: 50px 20px; }

.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.grey { background: var(--grey-soft); color: var(--muted); }

/* filters & forms */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters input[type=search] { flex: 1 1 220px; }
.filters select, .filters input { width: auto; }
.chip { font-size: 13px; padding: 6px 12px; border-radius: 20px; background: var(--accent-soft); color: var(--text); font-weight: 600; }
.chip.ghost { background: transparent; border: 1px dashed var(--border); color: var(--muted); font-weight: 500; }
.chip:hover { text-decoration: none; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: -1px; border-color: transparent; }
input:disabled { background: var(--surface-2); color: var(--muted); }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; font-weight: 600; }
label small { font-weight: 400; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; align-self: end; padding-bottom: 10px; }
label.check input { width: auto; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.form-card { max-width: 820px; padding: 22px 24px; }
.form-card.narrow { max-width: 440px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; } .form-card { padding: 18px 16px; } }
.form-actions { display: flex; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.danger-zone { max-width: 820px; margin-top: 14px; text-align: right; }
form.inline, details.inline { display: inline; margin: 0; }
form.reset { display: flex; gap: 6px; margin-top: 8px; justify-content: flex-end; }
form.reset input { width: 200px; padding: 6px 9px; }

.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 18px; font-weight: 500; background: var(--green-soft); color: var(--green); border: 1px solid transparent; }
.flash.error { background: var(--red-soft); color: var(--red); }
.flash.warn { background: var(--amber-soft); color: var(--amber); }
.auth .flash { margin-bottom: 14px; }

/* ===================== Robshaw Portal additions ===================== */
.hidden { display: none !important; }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 400; margin: 6px 0 0; }
.label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.warn-text { color: var(--amber); font-size: 13px; }
.good { color: var(--green); font-weight: 600; } .okay { color: var(--amber); font-weight: 600; } .bad { color: var(--red); font-weight: 600; }
td.bad strong { color: var(--red); }
.w-sm { width: 90px !important; }

/* kpis */
.kpis.five { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1250px) { .kpis.five { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .kpis.five { grid-template-columns: repeat(2, 1fr); } }
.kpi .meter { margin: 8px 0 6px; }
.kpi-value small { font-size: 16px; color: var(--muted); font-weight: 600; }
.kpi .kpi-sub { white-space: normal; }
.kpi-sub .kpi-track { color: var(--text); }
/* Our Team: "Amanda’s Listings ↗" — their page on robshaw.co.za (pages/team.php) */
.team-card .team-site { display: inline-block; margin-top: auto; padding-top: 4px; align-self: flex-start;   /* always the bottom-left corner, however long the card (Sean, Oct 25) */ font-weight: 600; font-size: 13.5px; color: var(--brand-2); text-decoration: none; }
.team-card .team-site:hover { text-decoration: underline; }
/* Lead Gen Schedule, read-only (Lead Gen Portal + My Stats; pages/prospecting.php) */
.sched-view td, .sched-view th { white-space: nowrap; }
.sched-view td.off { color: var(--muted); }
.sched-view tr.me th, .sched-view td.mine { background: var(--accent-soft); font-weight: 700; }
.sched-mine h3 { margin: 0 0 6px; } .sched-mine ul { margin: 0; }
/* Prospecting Areas (pages/prospectareas.php) */
.prospect-areas td { vertical-align: top; }
.prospect-areas td.pa-areas { min-width: 260px; } .prospect-areas td.pa-notes { min-width: 200px; color: var(--muted); }
.prospect-areas tr.me td { background: var(--accent-soft); }
.prospect-areas tr[hidden] { display: none; }
/* Authenticator app (pages/totp.php) */
.totp-status { margin: 4px 0 14px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.totp-steps { padding-left: 20px; } .totp-steps li { margin-bottom: 12px; }
.totp-qr { margin: 10px 0 6px; } .totp-qr svg { display: block; border: 1px solid var(--border); border-radius: 8px; }
code.totp-key { font-size: 15px; letter-spacing: 1px; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.meter.behind span { background: var(--accent); }
.year-pill { font-weight: 700; padding: 6px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); }

/* layout bits */
.card + .card, .card + .grid-2, .grid-2 + .card, .kpis + .card, .card + .kpis, section.card.flush + .grid-2 { margin-top: 16px; }
.grid-2 > .card + .card { margin-top: 0; }   /* the grid gap already spaces cards side by side */
.card-head.pad { padding: 16px 20px 0; margin-bottom: 12px; }
.inline-filters { display: flex; gap: 8px; margin: 0; }
.inline-filters select { width: auto; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { font-size: 12.5px; padding: 4px 10px; border-radius: 20px; color: var(--muted); border: 1px solid var(--border); }
.tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (prefers-color-scheme: dark) { .tabs a.on { color: #0f151d; } }
.tabs a:hover { text-decoration: none; }
.legend { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
@media (max-width: 1000px) { .chart.progress .axis { font-size: 16px; } }
@media (max-width: 600px) { .chart.progress .axis, .chart.progress .axis:not([text-anchor=end]) { font-size: 30px; } }
.legend span { display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-left: 10px; }
.legend .l-actual { background: var(--bar-hi); } .legend .l-target { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px); }
.chart .line-actual { fill: none; stroke: var(--bar-hi); stroke-width: 3; stroke-linejoin: round; }
.chart .line-target { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .dot { fill: var(--surface); stroke: var(--bar-hi); stroke-width: 2.5; }
.chart .dot:hover { fill: var(--accent); }

/* stats tables */
.stats-table th, .stats-table td { padding: 9px 10px; white-space: nowrap; }
.stats-table tbody th { text-align: left; text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--text); background: var(--surface); position: sticky; left: 0; z-index: 1; border-bottom: 1px solid var(--border); }
.stats-table td.prior, .stats-table th.prior { color: var(--muted); }
.stats-table.hide-prior .prior { display: none; }
.stats-table th.toggle-cell { text-align: right; padding-right: 4px; }
.prior-toggle { font: inherit; font-size: 13px; line-height: 1; letter-spacing: 1px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--muted); cursor: pointer; }
.prior-toggle:hover { color: var(--text); border-color: var(--muted); }
.stats-table td[data-tip] { cursor: help; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.tip { position: fixed; z-index: 100; max-width: 380px; padding: 8px 10px; border-radius: 8px; background: var(--text); color: var(--surface); font-size: 12.5px; line-height: 1.45; white-space: pre-line; box-shadow: 0 4px 16px rgba(0,0,0,.18); pointer-events: none; }
.mini-stats.two { grid-template-columns: 1fr 1fr; }
ul.reports .row-static > span:first-child { display: flex; flex-direction: column; gap: 2px; }
ul.reports .right form { margin-top: 2px; }
/* Sales lists on phones: one small card per sale instead of a wide table */
@media (max-width: 640px) {
  table.sales-list thead { display: none; }
  table.sales-list, table.sales-list tbody, table.sales-list tr, table.sales-list td { display: block; width: 100%; }
  table.sales-list tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  table.sales-list td { padding: 2px 0; border: 0; text-align: left; white-space: normal; font-size: 13.5px; }
  table.sales-list td::before { content: attr(data-label); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
  table.sales-list td.prop { grid-column: 1 / -1; order: -2; font-size: 15px; }
  table.sales-list td.prop::before, table.sales-list td.sold::before { display: none; }
  table.sales-list td.sold { grid-column: 1 / -1; order: -1; color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
  table.sales-list td:empty { display: none; }
  table.sales-list.sales-admin td, table.sales-list.sales-admin th { font-size: 13.5px; }
}
/* buyer suburb picker */
.suburb-picker select[multiple] { min-height: 160px; }
.sp { border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-top: 6px; background: var(--surface); }
.sp.off .sp-chips, .sp.off .sp-find { display: none; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sp-chips .chip button { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 0 0 2px; color: var(--muted); }
.sp-find { position: relative; }
.sp-results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.1); max-height: 280px; overflow: auto; }
.sp-results li { padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.sp-results li.on, .sp-results li:hover { background: var(--accent-soft); }
.sp-results li.none { color: var(--muted); cursor: default; background: none; }
table.buyer-facts th { width: 150px; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--muted); background: var(--surface-2); vertical-align: top; }
table.buyer-facts td { vertical-align: top; }
.card.contact { padding: 14px 20px; }
.card.contact + .card, .card.contact + .flash { margin-top: 16px; }
.region-row th { background: var(--surface-2); font-size: 12px; }
.transfer-when { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.transfer-when input[type=date] { width: auto; flex: 0 1 170px; }
table.firms td { vertical-align: top; }
table.firms input, table.firms textarea { min-width: 220px; }
table.firms textarea { resize: vertical; font-size: 13px; }
.pad-actions { padding: 0 20px 18px; margin-top: 0; border-top: 0; }
.firm-group { padding: 10px 0; border-bottom: 1px solid var(--border); }
.firm-group:last-child { border-bottom: 0; }
.firm-group .copy-row { margin-top: 6px; max-width: 520px; }
.firm-group .copy-row input { font-family: inherit; font-size: 14px; }
select.suggested { background: var(--accent-soft); }
.template-link { margin: -8px 0 14px; font-size: 13.5px; }
table.sales-admin td, table.sales-admin th { padding: 9px 10px; font-size: 13px; }
table.sales-admin td:nth-child(3), table.sales-admin td:nth-child(4) { max-width: 180px; }
img.avatar { object-fit: cover; display: block; }
.avatar.sm, .avatar.lg, .avatar.xl { background: var(--grey-soft); color: var(--muted); }
.avatar.xl { width: 64px; height: 64px; font-size: 20px; }
.page-head .person { gap: 14px; }
table.top10 .person { gap: 10px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 76px; height: 76px; font-size: 22px; }
.person { display: flex; align-items: center; gap: 10px; }
.photo-row { display: flex; align-items: center; gap: 16px; }
.photo-row .btn { cursor: pointer; }
.photo-row label.check { padding: 8px 0 0; }
.cropper { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.cropper canvas { width: 280px; max-width: 100%; height: auto; border-radius: 12px; background: var(--grey-soft); cursor: grab; touch-action: none; }
.cropper canvas:active { cursor: grabbing; }
.cropper .zoom { flex: 1 1 160px; max-width: 240px; }
.pill-btn { font: inherit; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 20px; border: 1px solid transparent; cursor: pointer; }
.pill-btn.on { background: var(--green-soft); color: var(--green); }
.pill-btn.off { background: var(--grey-soft); color: var(--muted); }
.pill-btn:hover { border-color: currentColor; }
@media (max-width: 640px) { .mini-stats.two { grid-template-columns: 1fr; } }
.stats-table .total { font-weight: 700; background: var(--surface-2); }
.stats-table th.now { color: var(--brand-2); }
.stats-table .muted-row td, .stats-table .muted-row th { color: var(--muted); font-size: 12.5px; }
.stats-table.agents tbody th { font-weight: 600; }
/* Agents Table: the headings stay at the top while scrolling down the agents (Sean, Oct 22) — the table scrolls inside its card,
   like the Transfer Tracker; the Agent column stays on the left when scrolling sideways on a phone */
.agents-wrap { max-height: calc(100vh - 160px); overflow: auto; }
.stats-table.agents thead th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--border); }
.stats-table.agents thead th:first-child { left: 0; z-index: 3; }
tr.me td, tr.me th, tr.mine td { background: var(--accent-soft) !important; }
tr.total-row th, tr.total-row td { font-weight: 700; border-top: 2px solid var(--border); }
table.top10 td { padding: 8px 6px; border-bottom: 1px solid var(--border); }
table.top10 tr:last-child td { border: 0; }
.rank-cell { width: 34px; }
.rank.r1 { background: var(--accent); color: #1a1408; } .rank.r2 { background: #c9d1db; color: #1a2433; } .rank.r3 { background: #d9b38c; color: #2a1a08; }
.board li .rank { flex: none; }

/* compact lists */
ul.compact { list-style: none; margin: 0; padding: 0; }
ul.compact li a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); color: var(--text); }
ul.compact li .row-static { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
ul.compact li:last-child a, ul.compact li:last-child .row-static { border: 0; }
ul.compact li a:hover { text-decoration: none; background: var(--surface-2); }
ul.compact .sub { display: block; }
ul.compact .right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr[data-href] { cursor: pointer; }
tr.cont td { border-top: 0; padding-top: 2px; }

/* forms */
.form-card.wide { max-width: 1040px; }
.form-grid.g4 { grid-template-columns: repeat(4, 1fr); }
.form-grid .span-3 { grid-column: span 3; } .form-grid .span-4 { grid-column: span 4; }
.form-grid.g4 .shared-fields { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .form-grid.g4, .form-grid.g4 .shared-fields { grid-template-columns: 1fr 1fr; } .form-grid .span-3, .form-grid .span-4 { grid-column: span 2; } }
@media (max-width: 640px) { .form-grid.g4, .form-grid.g4 .shared-fields { grid-template-columns: 1fr; } .form-grid .span-2, .form-grid .span-3, .form-grid .span-4 { grid-column: auto; } }
.agent-rows { display: flex; flex-direction: column; gap: 8px; }
.agent-row { display: flex; gap: 8px; }
.agent-row select { flex: 1; } .agent-row .share { width: 100px; }
.agent-rows .link { align-self: flex-start; margin: 0; }
.agent-rows:not(.multi) .share, .agent-rows:not(.multi) .split-hint { display: none; }   /* one agent: no split */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
label.chip-check { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; padding: 5px 10px; border: 1px solid var(--border); border-radius: 20px; cursor: pointer; font-size: 13px; }
label.chip-check input { width: auto; margin: 0; }
label.chip-check:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
fieldset.search-block { border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px 16px; margin: 0 0 14px; }
fieldset.search-block legend { font-weight: 700; font-size: 13px; padding: 0 6px; color: var(--muted); }
label.check.remove { margin-top: 10px; padding: 0; color: var(--red); }
.copy-row { display: flex; gap: 8px; } .copy-row input { flex: 1; font-family: ui-monospace, monospace; font-size: 13px; }
table.inputs th, table.inputs td { padding: 6px 8px; } table.inputs input { min-width: 140px; }

/* sale detail */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: -50%; height: 100%; width: 2px; background: var(--border); }
.timeline li:first-child::before { display: none; }
.timeline .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); position: relative; z-index: 1; }
.timeline li.done .dot { background: var(--green); border-color: var(--green); }
.timeline li.done::before { background: var(--green); }
.timeline li span:last-child { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.timeline li:not(.done) strong { color: var(--muted); font-weight: 500; }
.facts dd { text-align: right; max-width: 65%; }
.facts dd .sub { font-weight: 400; }
ul.log { list-style: none; margin: 0; padding: 0; font-size: 14px; }
ul.log li { padding: 7px 0; border-bottom: 1px solid var(--border); }
ul.log li:last-child { border: 0; }

/* admin */
.admin-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
a.admin-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); }
a.admin-tile:hover { text-decoration: none; border-color: var(--brand-2); }
a.admin-tile span { color: var(--muted); font-size: 13.5px; }
a.admin-tile em { font-style: normal; font-size: 12.5px; color: var(--brand-2); margin-top: 4px; }
main h3 + .admin-tiles { margin-bottom: 8px; }
.main > h3 { margin-top: 26px; }

/* earnings */
.card.private { border-color: var(--accent); }
.earn-total { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.earn-total strong { font-size: 30px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.card.private .table-wrap { margin: 0 -20px -18px; }
@media (max-width: 640px) { .card.private .table-wrap { margin: 0; max-width: 100%; } }   /* phones: scroll inside the card, not cut off */

ul.compact .sub .sub { display: inline; }
.stats-table th, .stats-table td { padding: 8px 7px; font-size: 13px; }
.stats-table thead th { font-size: 11px; }

/* Lead gen schedule (pages/prospecting.php) */
.sched-week { padding: 0; margin-bottom: 18px; }
.sched-week .card-head h2 a { color: inherit; text-decoration: none; }
.sched-roster { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 0 18px 10px; }
.sched-roster label.check { margin: 0; }
table.sched { width: 100%; min-width: 620px; table-layout: fixed; }
table.sched col.lg, table.sched thead th:first-child { width: 96px; }
table.sched th, table.sched td { padding: 4px 6px; vertical-align: middle; }
table.sched thead th { white-space: nowrap; font-size: 12.5px; }
table.sched thead th.closed { color: var(--red); }
table.sched tbody th { text-align: left; white-space: nowrap; font-weight: 600; padding-left: 18px; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
table.sched select { width: 100%; min-width: 0; padding: 5px 6px; font: inherit; font-size: 13.5px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
table.sched td.closed { background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 6px, var(--grey-soft) 6px, var(--grey-soft) 12px); }
table.sched td.sug select { background: var(--accent-soft); border-color: #e3cfa9; }
table.sched td.status select, table.sched td.away select { color: var(--muted); font-style: italic; }
table.sched td.warn select { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-soft); }
table.sched select.overdue, table.sched option.overdue, .overdue-name { color: var(--red); font-weight: 700; }
table.sched select.overdue option:not(.overdue) { color: var(--text); font-weight: 400; }
.sched-month-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.sched-month-actions .hint { margin: 0; }
.sched-inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--border); }
.sched-inline-form input, .sched-inline-form select { padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.sched-inline-form label { display: flex; gap: 6px; align-items: center; }
iframe.email-frame { display: block; width: 100%; height: 900px; border: 1px solid var(--border); border-radius: 10px; margin-top: 10px; background: #f1eee9; }
.email-preview {border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-top: 10px; background: #fff; overflow-x: auto; }.card.flush .sched-inline-form { padding: 12px 18px; }
#closed .sched-inline-form { padding-top: 12px; }
.pad-hint { padding: 0 18px; }
.sched-week .form-actions { margin: 0; padding: 12px 18px 16px; position: static; flex-wrap: wrap; }
.card.sched-week .table-wrap { margin: 0; }
.kpi-sub .pros-rank { display: inline-block; margin-top: 4px; font-weight: 600; color: var(--brand-2); }
.kpi-sub .pros-rank.top { color: var(--accent); }
/* Needs checking (pages/checks.php) */
.nav-badge { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; text-align: center; }
.checks-banner { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 11px 14px; margin-bottom: 18px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-weight: 600; text-decoration: none; }
.checks-banner:hover { text-decoration: none; filter: brightness(.97); }
.checks-banner span { white-space: nowrap; }
.flash.warn ul { margin: 6px 0 0; padding-left: 18px; font-weight: 400; }
.flash.warn button.link { color: var(--brand-2); text-decoration: underline; margin-left: 6px; font-weight: 600; }
ul.checks .right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
details.card > summary { cursor: pointer; font-weight: 600; }
/* Transfer tracker (pages/transfers.php) */
details.more-details { margin-top: 22px; border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; }
details.more-details > summary { cursor: pointer; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
details.more-details > summary .sub { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 6px; }
details.more-details[open] > summary { margin-bottom: 12px; }
textarea.code { width: 100%; font: 12px/1.45 ui-monospace, Consolas, monospace; margin: 6px 0 8px; }
ol.steps li { margin: 0 0 8px; }
table.tracker-list td { vertical-align: top; }
/* First 90 days checklist (My stats) */
.card.onboard { border-color: var(--accent); }
.onboard .ob-cheer { margin: 10px 0 0; font-weight: 600; color: var(--brand-2); }
.onboard h2.ob-person { display: flex; align-items: center; gap: 10px; }
.ob-list { list-style: none; margin: 14px 0 0; padding: 0; }
.ob-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); }
.ob-list li:first-child { border-top: 0; }
.ob-tick { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; margin-top: 1px; }
.ob-list li.done .ob-tick { background: var(--brand-2); border-color: var(--brand-2); }
.ob-list li.done strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border); }
.ob-list li > div { flex: 1; min-width: 0; }
.ob-month { display: grid; grid-template-columns: 190px 1fr 80px 160px; gap: 10px; align-items: center; margin-top: 8px; color: var(--text); }
.ob-month .meter { margin: 0; }
.ob-month.met .sub { color: var(--brand-2); font-weight: 600; }
@media (max-width: 640px) { .ob-month { grid-template-columns: 1fr auto; } .ob-month .meter { grid-column: 1 / -1; order: 3; } .ob-month .sub { grid-column: 1 / -1; order: 4; } }
/* Activities (pages/pipedrive.php) */
.stats-table.activities tr.me th, .stats-table.activities tr.me td { background: var(--accent-soft); }
.stats-table.activities tbody th .person { gap: 8px; white-space: nowrap; }
.stats-table.activities tr.total th, .stats-table.activities tr.total td { font-weight: 700; border-top: 2px solid var(--border); }
.stats-table.activities td { vertical-align: middle; }
.stats-table.activities td[data-tip] { text-decoration: none; }
.stats-table.activities td[data-tip]:hover { background: var(--accent-soft); }
a.admin-tile em.alert { color: var(--red); font-weight: 600; }
/* Our Team (pages/team.php) + list search boxes */
.team-search { padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; min-width: 240px; background: var(--surface); }
.team-group { margin-bottom: 22px; }
.team-group h3 .sub { font-weight: 400; margin-left: 4px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.team-card { display: flex; flex-direction: column; gap: 12px; }
.team-card[hidden], .team-group[hidden], #staff-list tr[hidden] { display: none; }
.team-top { display: flex; gap: 14px; align-items: center; }
.team-top h2 { margin: 0 0 2px; font-size: 17px; }
.team-contact { margin: 0; display: grid; gap: 6px; font-size: 14px; }
.team-contact div { display: grid; grid-template-columns: 56px 1fr; gap: 8px; }
.team-contact dt { color: var(--muted); font-size: 12.5px; padding-top: 1px; }
.team-contact dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .team-search { min-width: 0; width: 100%; } }.team-grid > .card + .card { margin-top: 0; }
.head-actions .team-search { width: 260px; }
@media (max-width: 640px) { .head-actions .team-search { width: 100%; } }
/* My stats month range */
.me-range label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.me-range select { padding: 6px 8px; }
.page-head .head-actions:has(.me-range) { flex-direction: column; align-items: flex-end; }
@media (max-width: 640px) { .page-head .head-actions:has(.me-range) { align-items: flex-start; } }
a.kpi.kpi-link { color: inherit; text-decoration: none; cursor: pointer; }
a.kpi.kpi-link:hover { border-color: var(--brand-2); }
.me-range { align-items: flex-end; }
.conveyancer-field { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.conveyancer-field .hidden { display: none; }
@media (max-width: 640px) { .conveyancer-field { grid-template-columns: 1fr; } }
.firm-new-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.firm-new-actions select { width: auto; max-width: 260px; }
.form-actions .push-right { margin-left: auto; }
.comm-confirm { margin: 4px 0 6px; padding: 12px 14px; border-radius: 10px; background: var(--red-soft); color: var(--red); }
.comm-confirm p { margin: 4px 0 8px; color: var(--text); }
.comm-confirm input[name=comm_ok_reason] { width: 100%; margin-top: 8px; }
.comm-confirm label.check { color: var(--text); font-weight: 600; }
.comm-ok { color: var(--green); }
label.bond-due { margin-top: 10px; max-width: 260px; }
.bond-answers { display: grid; gap: 14px; }
.bond-answers form { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.bond-answers form h3 { margin: 0 0 8px; }
.bond-answers .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.bond-answers .row label { flex: 1; min-width: 180px; }

/* Admin month-end checklist (admin.php month_end_checklist) */
.month-steps { list-style: none; margin: 0 0 8px; padding: 6px 0; }
.month-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 9px 18px; border-top: 1px solid var(--border); }
.month-steps li:first-child { border-top: 0; }
.month-steps li > .sub { grid-column: 2; font-size: 13px; }
.month-steps .step-mark { grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; border: 2px solid var(--border); color: var(--muted); }
.month-steps li.done .step-mark { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.month-steps li.done strong { color: var(--muted); font-weight: 600; }
.main > h3 .sub { font-weight: 400; font-size: 13px; margin-left: 6px; }

/* Drag-and-drop upload boxes (app.js) */
.dropzone { position: relative; display: flex; align-items: center; justify-content: center; min-height: 92px; margin-top: 6px; padding: 16px; border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface); text-align: center; transition: border-color .15s, background .15s; }
.dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-text { color: var(--muted); font-size: 14px; pointer-events: none; overflow-wrap: anywhere; }
.dropzone:hover, .dropzone.over { border-color: var(--brand-2); background: rgba(45, 70, 53, .06); }
.dropzone.has-file { border-style: solid; border-color: var(--brand-2); }
.dropzone.has-file .dropzone-text { color: var(--text); font-weight: 600; }
.dropzone.bad { border-color: var(--red); }
.dropzone.bad .dropzone-text { color: var(--red); }
.dropzone input[type=file]:focus-visible + .dropzone-text { outline: 2px solid var(--brand-2); outline-offset: 4px; }


/* Transfer tracker: every column, property fixed on the left (transfers.php) */
.tracker-wide { font-size: 13px; }
.tracker-wide th, .tracker-wide td { white-space: nowrap; vertical-align: top; }
.tracker-wide .sticky-col { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 var(--border); min-width: 190px; max-width: 260px; white-space: normal; }
.tracker-wide thead .sticky-col { z-index: 3; }
.tracker-wide td.tt-notes { white-space: normal; min-width: 260px; max-width: 360px; }
.tracker-wide-wrap { max-height: 75vh; overflow: auto; }
.tracker-wide thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
/* Sale documents (pages/docs.php) */
.doc-chips { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 4px 0 12px; }
.doc-chip { display: inline-flex; align-items: center; gap: 6px; }
.doc-review { margin: 10px 0; padding: 10px 0; border-top: 1px solid var(--border); }
.doc-review strong { display: block; margin-bottom: 6px; }
.docs-panel .docs-list td { vertical-align: top; }
.doc-upload { margin-top: 14px; padding-top: 6px; border-top: 1px solid var(--border); }
.doc-kept { margin: 4px 0; color: var(--green); font-weight: 600; font-size: 13.5px; }
.report-docs .cond-upload[hidden] { display: none; }
.report-docs .cond-upload + label.check { align-self: start; padding: 8px 0 0; }
.report-docs .radio-row { display: flex; gap: 18px; margin: 6px 0; }
.report-docs .fica-q .label { display: block; font-weight: 600; }
.docs-todo { border-left: 4px solid var(--accent); }
/* Upload progress + messages (app.js form[data-doc-upload]) */
.upload-status { margin-top: 10px; }
.upload-bar { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; max-width: 420px; }
.upload-bar span { display: block; height: 100%; width: 0; background: var(--brand-2); transition: width .2s; }
.upload-msg { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.upload-status.bad .upload-msg { color: var(--red); font-weight: 600; }
/* Chosen files under an upload box, each with ✕ (app.js) */
.drop-list { list-style: none; margin: 6px 0 0; padding: 0; }
.drop-list li { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.drop-list li span:first-child { flex: 1; overflow-wrap: anywhere; }
.drop-remove { border: 0; background: none; color: var(--red); font-size: 15px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.drop-remove:hover { background: var(--red-soft); }
.danger-link { color: var(--red) !important; }
/* Admin: month end all done — one line, steps behind it (admin.php month_end_checklist) */
.month-done { padding: 14px 18px; }
.month-done summary { cursor: pointer; list-style: none; }
.month-done summary::-webkit-details-marker { display: none; }
.month-done summary .sub { margin-left: 6px; }
.month-done[open] .month-steps { margin-top: 12px; box-shadow: none; border: 0; }
/* Bar charts: hovering a month column shows its figure (charts.php bar_chart, app.js [data-tip]) */
.chart .bar-col { cursor: default; }
.chart .bar-col:hover .bar { opacity: .8; }
.doc-approved strong { display: inline; color: var(--green); margin: 0; }
.doc-approved .link { margin-left: 10px; font-size: 13px; }
/* Transfer tracker: "FICA outstanding" under the stage (docs.php docs_fica_tag) */
.fica-tag { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: var(--red); white-space: nowrap; }
.fica-tag:hover { text-decoration: underline; }
.docs-done { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: var(--green); white-space: nowrap; }
/* Report a Sale follow-ups (Oct 16): warnings to tick, Dismiss / Withdraw with a reason */
.sf-warn { background: var(--amber-soft); color: var(--amber); margin-bottom: 14px; }
.sf-warn ul { margin: 6px 0 10px 18px; }
.report-close { margin: 4px 0 2px; }
.report-close summary { cursor: pointer; display: inline-block; }
.report-close form { margin-top: 6px; }
/* Transfer tracker: "Not registered yet" forecast columns (link tiles) */
.fc-kpis { --cols: 5; margin: 6px 0 10px; }
a.kpi-link { color: inherit; text-decoration: none; display: block; }
a.kpi-link:hover { border-color: var(--brand-2); }
a.kpi-link.active { outline: 2px solid var(--brand-2); }
.kpi.fc-stuck .kpi-value { color: var(--muted); }
.fc-kpis .kpi-value { font-size: 22px; }
@media (max-width: 900px) { .fc-kpis { --cols: 2; } }

/* The hidden game link: the "to" in "Year to date" on Top of the Pops (pages/game.php). Looks exactly like the text around it. */
a.egg, a.egg:hover, a.egg:focus { color: inherit; text-decoration: none; cursor: text; outline: none; }

/* Lead gen calls: heading between today's live card and the month table */
.section-title { font-size: 17px; margin: 22px 0 10px; }
.section-title .sub { font-weight: 400; }

/* Lead Gen Portal: small headings inside the live card and between the month's tables */
.live-sub { font-size: 15px; margin: 14px 0 6px; padding: 0 16px; }
.live-sub .sub { font-weight: 400; font-size: 12.5px; }
section.card > .live-sub:first-of-type { margin-top: 4px; }
h3.live-sub:not(section h3) { padding: 0; }
.hint.pad { padding: 0 16px; }

/* My Stats: "Add your photo" reminder */
.photo-nag { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.photo-nag .person { gap: 14px; }
.photo-nag-actions { display: flex; gap: 8px; align-items: center; }

/* "Supporting Docs" link under the property on the Transfer Tracker and All Sales (admins + transfer team) */
.docs-link { font-size: 12.5px; font-weight: 600; white-space: nowrap; }

/* Resources (pages/resources.php) */
.res-tabs { margin: -4px 0 16px; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.res-tile { color: var(--text); display: block; }
.res-tile:hover { text-decoration: none; border-color: var(--brand); }
.res-tile h3 { margin: 0 0 6px; color: var(--brand); }
.res-tile p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.crumbs { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.res-body { max-width: 860px; line-height: 1.6; }
.res-body h3 { margin: 26px 0 8px; color: var(--brand); }
.res-body h3:first-child, .res-body h4:first-child { margin-top: 0; }
.res-body h4 { margin: 18px 0 6px; }
.res-body ul, .res-body ol { padding-left: 22px; margin: 8px 0 12px; }
.res-body li { margin: 3px 0; }
/* checklist lines ("- [ ] …") and the draft review box (training rebuild, Oct 17) */
.res-body li.md-check { list-style: none; margin-left: -22px; padding-left: 26px; position: relative; }
.res-body li.md-check::before { content: ''; position: absolute; left: 2px; top: 3px; width: 14px; height: 14px; border: 1.5px solid var(--muted); border-radius: 3px; }
.res-body li.md-check.done::before { content: '✓'; color: var(--green); font-size: 12px; line-height: 14px; text-align: center; }
.res-draft form { margin-bottom: 0; }
.res-body blockquote { margin: 10px 0; padding: 10px 16px; border-left: 4px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; font-style: italic; }
.res-body .table-wrap { margin: 10px 0 14px; overflow-x: auto; }
table.md-table { border: 1px solid var(--border); }
table.md-table th, table.md-table td { padding: 8px 10px; vertical-align: top; border: 1px solid var(--border); text-align: left; text-transform: none; letter-spacing: 0; }
table.md-table th { background: var(--surface-2); font-size: 13px; }
textarea.mono { font-family: Consolas, Menlo, monospace; font-size: 13px; line-height: 1.5; }
.res-grid > .card { margin-top: 0; }
.card.res-tile h3, .card.res-body h3 { text-transform: none; letter-spacing: 0; font-size: 17px; color: var(--brand); }
.card.res-body h4 { text-transform: none; letter-spacing: 0; font-size: 15px; }h3.res-group { margin: 22px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
h3.res-group:first-of-type { margin-top: 4px; }
.res-body mark, .hint mark { background: #fff3a3; color: inherit; padding: 0 2px; border-radius: 2px; }
.res-body ul ul { margin: 4px 0; }
.res-copy-hint { margin: -6px 0 12px; }ul.res-topics { list-style: none; margin: 0; padding: 0; }
.res-topic { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.res-topic:last-child { border-bottom: 0; }
.res-topic[hidden] { display: none; }
.res-topic a { flex: 1; min-width: 0; color: var(--text); }
.res-topic a:hover { text-decoration: none; }
.res-topic a:hover strong { color: var(--brand); text-decoration: underline; }
.res-topic strong { display: block; font-size: 15.5px; }
.res-topic .hint { display: block; margin-top: 2px; }
.card.res-body .table-wrap { margin: 10px 0 14px; overflow-x: auto; }

/* A lead gen's "Today" card on My Stats (lg_today_card, leadgen.php): three small cells side by side */
.lg-today .card-head { margin-bottom: 10px; }
.lg-today-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }   /* same gap as the tiles under it */
.lg-day-cell { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.lg-day-cell .meter { margin: 6px 0 4px; }
.lg-day-value { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.lg-day-value small { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lg-day-sub { font-size: 12.5px; color: var(--muted); }
.lg-day-cell.met { border-color: #2D4635; background: rgba(45, 70, 53, .06); }
.lg-day-cell.met .lg-day-sub { color: #2D4635; font-weight: 800; font-size: 13px; }
.lg-day-cell.muted { opacity: .6; }
.lg-day-warn { margin-top: 16px; padding: 10px 14px; border: 1px solid #e0b252; background: #fff6e0; border-radius: var(--radius); font-size: 13.5px; color: #6b4a00; }
.lg-day-quick {display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--muted); }   /* quick hang-ups not counted */
.lg-today .hint { margin: 10px 0 0; }
@media (max-width: 760px) { .lg-today-grid { grid-template-columns: 1fr; } }
/* Email template subject line (resources.php resource_subject) */
/* "← Back" above the heading of inner pages (page_back_link, helpers.php) */
.back-link { display: inline-block; margin: 0 0 6px; font-size: 13px; color: var(--muted, #6b7169); text-decoration: none; }
.back-link:hover { color: var(--brand, #2D4635); text-decoration: underline; }
.res-files { max-width: 860px; }
.res-files h3 { margin-top: 0; }
.res-file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.res-file-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.res-file-add { margin-top: 12px; }
.res-files-empty { margin: -4px 0 12px; }
.res-files-empty .res-file-add { margin-top: 0; }
.res-files-empty form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.res-file-add summary { cursor: pointer; font-size: 13px; color: var(--muted, #6b7169); width: max-content; }
.res-file-add summary:hover { color: var(--brand, #2D4635); }
.res-file-add[open] summary { margin-bottom: 10px; }
.res-file-add form { padding-top: 10px; border-top: 1px solid var(--border); }
.res-file-add .hint { margin: 6px 0 10px; }
.res-topic .pill { background: var(--bg, #f1eee9); color: var(--muted, #6b7169); font-weight: 500; margin-left: 6px; }
.res-subject { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 860px; margin: 0 0 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: var(--radius); box-shadow: var(--shadow); }
.res-subject-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.res-subject-text { flex: 1; min-width: 200px; font-size: 16px; font-weight: 600; color: var(--text); }
.res-subject-text mark { background: #fff3a3; color: inherit; padding: 0 2px; border-radius: 2px; }
[data-filter-group][hidden] { display: none; }
[data-filter-group] + [data-filter-group] h3.res-group { margin-top: 22px; }

/* Rental Intake Form: the rentals team's Google Form (pages/rentalform.php) */
.card.gform { padding: 0; overflow: hidden; }
.card.gform iframe { display: block; width: 100%; height: 2400px; border: 0; }   /* taller than the form's pages (~2 050 px), so only the page scrolls */
@media (max-width: 700px) { .card.gform iframe { height: 2500px; } }

/* New agents' 90-day journey (pages/journey.php) */
.jn-weeks { list-style: none; margin: 12px 0 0; padding: 0; }
.jn-week { margin-top: 14px; }
.jn-week-head { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.jn-week.now .jn-week-head { color: var(--brand-2); }
.jn .ob-list { margin-top: 4px; }
.jn .ob-list li.overdue .ob-tick { border-color: var(--red); }
.jn .ob-list li.due .ob-tick { border-color: var(--amber); }
.jn-form { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; margin-top: 8px; }
.jn-form.inline { display: inline-flex; margin: 0 0 0 8px; }
.jn-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); margin: 0; }
.jn-form label.grow { flex: 1 1 180px; }
.jn-form label.wide { flex: 1 1 100%; }
.jn-form input, .jn-form select { font-size: 14px; }
.jn-note { margin-top: 4px; padding: 6px 10px; background: var(--grey-soft); border-radius: 6px; color: var(--text); }
.jn-goal { margin-top: 4px; color: var(--text); font-weight: 600; }
.jn-strip { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 14px; }
.card.goal-card { display: flex; gap: 14px; align-items: center; border-color: var(--accent); }
.goal-card .goal-icon { font-size: 28px; line-height: 1; }
.goal-card strong { font-size: 17px; }
.jn-wks { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; margin-top: 10px; }
.jn-wk { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.jn-wk .meter { margin: 0; }
.jn-wk b { font-size: 16px; color: var(--text); }
.jn-wk.now span { color: var(--brand-2); font-weight: 700; }

.card.jn { margin-bottom: 18px; }
.jn-more { margin-top: 4px; }
.jn-more > summary { display: inline-block; cursor: pointer; color: var(--brand-2); font-weight: 600; list-style: none; }
.jn-more > summary::-webkit-details-marker { display: none; }
.jn-more[open] > summary { color: var(--muted); }

/* View as (pages/viewas.php) */
.viewas-bar { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin: -8px 0 16px; padding: 10px 14px; border-radius: 10px; background: #8a5a00; color: #fff; font-size: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.viewas-bar strong { color: #fff; }

/* New agents: one closed row per agent, opens to the checklist + journey */
.na-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.na-agent { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.na-agent > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; cursor: pointer; list-style: none; }
.na-agent > summary::-webkit-details-marker { display: none; }
.na-agent > summary::before { content: '\25B8'; color: var(--muted); transition: transform .15s; }
.na-agent[open] > summary::before { transform: rotate(90deg); }
.na-agent > summary .person { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.na-agent .na-flags { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.na-agent > .card { margin: 0 12px 12px; }

.jn-through { margin-top: 14px; }

/* "Your first 90 days" one week at a time (pages/journey.php + app.js [data-jn-weeks]) */
.jn-intro { margin: 14px 0 4px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.jn-intro p { margin: 12px 0 6px; }
.jn-intro-folded { margin-top: 10px; }
.jn-intro-folded > summary { cursor: pointer; list-style: none; font-weight: 600; color: var(--brand-2); }
.jn-intro-folded > summary::-webkit-details-marker { display: none; }
.jn-phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.jn-phase { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); }
.jn-phase.now { border-color: var(--brand-2); box-shadow: inset 3px 0 0 var(--brand-2); }
.jn-principles { margin: 4px 0 12px; padding-left: 20px; }
.jn-principles li { margin: 2px 0; }
.jn-weekbox { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.jn-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.jn-chips { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }
.jn-chip, .jn-step { min-width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.jn-chip.past { color: var(--muted); }
.jn-chip.clear { background: var(--green-soft); color: var(--green); border-color: transparent; }
.jn-chip.on { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.jn-step { font-size: 18px; line-height: 1; }
.jn-focus { margin: 4px 0 10px; font-weight: 600; }
.jn-pros { margin: 0 0 6px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); }
.jn-pros .meter { margin: 6px 0 4px; }
.jn-pros.sub, div.jn-pros.sub { color: var(--muted); }
.jn-late { margin-top: 14px; color: var(--amber); }
@media (max-width: 640px) { .jn-phases { grid-template-columns: 1fr; } }

/* Onboarding-week feedback prompt (pages/journey.php) */
.jn-feedback { margin: 14px 0 4px; padding: 14px 16px; border-radius: 10px; background: var(--green-soft); border: 1px solid var(--border); }
.jn-feedback textarea { width: 100%; margin-top: 10px; font: inherit; }
.jn-feedback .form-actions { margin-top: 8px; }

/* My Stats: open leads from lead gens (pages/followup.php) */
.card.lg-alert { border: 2px solid var(--red); background: var(--red-soft); margin-bottom: 16px; }
.lg-alert h2 { font-size: 17px; font-weight: 800; color: var(--red); margin: 0 0 6px; text-transform: none; letter-spacing: 0; }
.lg-alert .lg-rule { font-size: 13px; font-weight: 800; color: var(--text); margin: 0; }

/* Buyers list: Mark inactive under your own buyers (pages/buyers.php) */
.buyer-off { display: block; margin-top: 6px; }

/* Report a Sale: escalate the buyer's FICA (pages/fica.php) */

/* Report a Sale as numbered steps (pages/sales.php sale_form) */
.sale-form { padding-top: 6px; }
.sf-step { padding: 22px 0 18px; border-top: 1px solid var(--border); }
.sf-step:first-of-type { border-top: 0; padding-top: 8px; }
.sf-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.sf-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.sf-head h3 { margin: 4px 0 2px; font-size: 17px; text-transform: none; letter-spacing: 0; color: var(--text); }
.sf-head .hint { margin: 0; }
.sf-sub { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 6px 0 8px; }
.sf-sub ~ .sf-sub { margin-top: 16px; }
.sf-shared { margin-top: 2px; }
.sf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin-top: 16px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); }
.sf-q .label { display: block; font-weight: 600; margin-bottom: 6px; }
.sf-q .bond-due { margin-top: 10px; }
.sale-form label.chip-check { font-size: 14px; padding: 7px 14px; }
.sale-form .report-docs .fica-q { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.sale-form .report-docs .fica-q .hint { display: block; margin: 2px 0 4px; }
.sf-actions { position: sticky; bottom: 0; background: var(--surface); margin-bottom: -4px; padding-bottom: 14px; z-index: 5; }
@media (max-width: 700px) { .sf-row { grid-template-columns: 1fr; } }
.sale-form .conveyancer-field select { width: 100%; }

/* Sellers / buyers, one row each (pages/parties.php) */
.parties { display: flex; flex-direction: column; gap: 10px; }
.parties > .label { font-weight: 600; }
.party-row { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.party-row .form-grid { margin: 0; }
.party-fica { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.party-fica .label { display: block; font-weight: 600; }
.party-fica .hint { display: block; margin: 2px 0 4px; }
.party-remove { margin-top: 6px; font-size: 13px; color: var(--muted); }
.parties .add-row { align-self: flex-start; }
.doc-review .fica-line { align-items: center; margin: 4px 0; }
.doc-review .fica-line .fica-who { min-width: 220px; font-weight: 600; }
.lg-today .lg-rate { color: var(--muted); font-weight: 400; }   /* answer rate after 'answered' (Sean, Oct 20) */
