/* Egel's own look: moody organic modern. Dark wood, olive and sage, Kalahari sand, slate water.
   Used on the public page (egelleads.com) and the admin host (admin.egelleads.com), loaded after style.css
   so it overrides the default tokens. Client dashboards never load this file; they use their own theme_json. */
:root {
  /* palette */
  --wood: #1c1713; --wood-2: #2b241d; --bark: #3f352b; --sand: #e9dcc4; --dune: #c9a66b; --dune-deep: #a9793c;
  --olive: #5d6b3f; --sage: #9aa88a; --moss: #3e4a30; --water: #3f6763; --water-light: #7fa39d; --bone: #f3ece0;
  /* admin: warm sand, light */
  --bg: #efe8dc; --card: #f8f3ea; --ink: #241e18; --muted: #6e6557; --line: #dccfb9;
  --brand: #2b241d; --brand-ink: #f3ece0; --accent: #5d6b3f; --ok: #4f7a3a; --bad: #a8402f; --warn: #a9793c;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif; --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1c1713; --card: #26201a; --ink: #efe6d6; --muted: #a79b87; --line: #3b322a;
          --brand: #c9a66b; --brand-ink: #1c1713; --accent: #9aa88a; --ok: #8fb573; --bad: #e08a78; --warn: #d9a862; }
}
.egel-mark { height: 28px; width: 28px; margin-right: 9px; border-radius: 7px; }
body.egel .brand, .site .brand { font-size: 20px; letter-spacing: -.01em; }
h1, h2 { letter-spacing: -.012em; }

/* ---- admin additions ---- */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--muted); }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
.trend { font-size: 12px; margin-left: 4px; } .trend.ok { color: var(--ok); } .trend.bad { color: var(--bad); } .trend.flat { color: var(--muted); }
.reasons { margin: 3px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.reasons .bad { color: var(--bad); } .reasons .warn { color: var(--warn); }
.links { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; margin-top: 2px; }
.crumbs { font-size: 13px; margin-bottom: 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 12px; }
.checks label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink); }
.checks input, .scope input { width: auto; }
.scope { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 4px; }
.scope label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }

/* ---- public page: always dark and moody, whatever the OS setting ---- */
/* home.html loads only this file, so the base resets live here too */
body.site, body.site * { box-sizing: border-box; }
body.site { margin: 0; font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
body.site a { color: var(--accent); text-decoration: none; } body.site a:hover { text-decoration: none; }
body.site .brand { font-weight: 700; display: inline-flex; align-items: center; padding: 12px 0; }
body.site .btn { border: 0; border-radius: calc(var(--radius) * .7); padding: 8px 14px; font: inherit; font-weight: 600; display: inline-block; cursor: pointer; }
body.site .card { border: 1px solid var(--line); border-radius: var(--radius); display: block; }
body.site { color-scheme: dark; --bg: var(--wood); --card: var(--wood-2); --ink: var(--bone); --muted: #b4a68f; --line: #3b322a;
            --brand: var(--dune); --brand-ink: var(--wood); --accent: var(--sage);
            background: var(--bg); color: var(--ink); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.site-top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--wood) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-top .brand { color: var(--bone); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 8px 12px; border: 0; font-size: 14px; color: var(--muted); }
.site-nav a:hover { color: var(--bone); text-decoration: none; }
.site-nav a.btn { margin-left: 8px; padding: 8px 16px; color: var(--brand-ink); }
.hero { position: relative; overflow: hidden; padding: 104px 0 112px; color: var(--bone);
        background: radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--water) 55%, transparent), transparent 60%),
                    radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--dune-deep) 40%, transparent), transparent 60%),
                    linear-gradient(160deg, var(--wood-2), var(--wood) 60%, #15110e); }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: linear-gradient(90deg, transparent, var(--dune), transparent); opacity: .5; }
.hero h1 { font-size: clamp(38px, 7vw, 68px); line-height: 1.02; margin: 10px 0 20px; font-weight: 600; max-width: 15ch; }
.hero .lead { font-size: clamp(17px, 2.3vw, 20px); max-width: 40em; color: color-mix(in srgb, var(--bone) 78%, transparent); margin: 0 0 30px; }
.eyebrow { color: var(--dune); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600; margin: 0; }
.btn.big { padding: 13px 26px; font-size: 16px; }
.site .btn { background: var(--dune); color: var(--wood); }
.site .btn:hover { background: var(--sand); opacity: 1; }
.block { padding: 80px 0; } .block.alt { background: #211b16; border-block: 1px solid var(--line); }
.block h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 30px; font-weight: 600; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.cards.two-up { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.site .card { background: color-mix(in srgb, var(--wood-2) 80%, var(--bark)); border-color: var(--line); padding: 24px; }
.cards h3 { margin: 0 0 8px; font-size: 19px; font-weight: 600; } .cards p { margin: 0; color: var(--muted); }
body.site .market { border-top: 3px solid var(--olive); } body.site .market + .market { border-top-color: var(--water); }
.kicker { color: var(--dune); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 600; margin: 0 0 10px !important; }
.cards.brands { grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); }
.brand-card { color: var(--ink); } .brand-card:hover { text-decoration: none; border-color: var(--dune); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps h3 { margin: 0 0 4px; font-size: 18px; font-weight: 600; } .steps p { margin: 0; color: var(--muted); }
.n { flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--olive); color: var(--bone); display: grid; place-items: center; font-weight: 700; }
.cta { text-align: center; background: linear-gradient(180deg, var(--wood), #221c17); } .cta h2 { margin-bottom: 18px; }
.site-foot { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 13px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .hero { padding: 64px 0 72px; } .block { padding: 56px 0; } .site-nav a:not(.btn) { display: none; } }

/* ---- admin host: always the dark Egel look, same as the landing ---- */
body.admin { color-scheme: dark; --bg: #1c1713; --card: #251f19; --ink: #efe6d6; --muted: #a79b87; --line: #3b322a;
             --brand: #c9a66b; --brand-ink: #1c1713; --accent: #9aa88a; --ok: #8fb573; --bad: #e08a78; --warn: #d9a862;
             background: var(--bg); color: var(--ink); }
body.admin h1 { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 30px; letter-spacing: -.012em; }
body.admin header.top { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 5; }
body.admin .kpi .value { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 34px; color: var(--brand); }
body.admin .kpi .value .trend { font-family: "DM Sans", sans-serif; font-size: 12px; }
body.admin input, body.admin select, body.admin textarea { background: #1a1511; }
body.admin .btn, body.admin button { font-weight: 600; }
body.admin .notice { background: color-mix(in srgb, var(--warn) 14%, transparent); }
body.admin .count { color: var(--bg); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 6px 0 18px; flex-wrap: wrap; }
.tabs a { padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--brand); } .tabs a:hover { text-decoration: none; color: var(--ink); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
@media (max-width: 900px) { .overview-grid { grid-template-columns: 1fr; } }
.minimap { position: relative; padding: 10px 14px 4px; }
.minimap .samap { width: 100%; max-height: 420px; height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 20px 30px rgba(0,0,0,.45)); }
.minimap .region { stroke: var(--bg); stroke-width: 1.4; opacity: .55; transition: opacity .3s; }
.minimap .region.has-client { opacity: .95; }
.minimap .region[data-region=kalahari] { fill: #9f7f4e; } .minimap .region[data-region=karoo] { fill: #8a6433; }
.minimap .region[data-region=cape] { fill: #4e5a35; } .minimap .region[data-region=highveld] { fill: #7f8b70; }
.minimap .region[data-region=bushveld] { fill: #35402a; } .minimap .region[data-region=zululand] { fill: #37585a; }
.minimap .region[data-region=thicket] { fill: #45603a; }
.minimap .za-shadow { fill: #000; opacity: .3; transform: translate(8px, 12px); filter: blur(5px); } .minimap .za-outline { fill: none; stroke: #e9dcc4; stroke-width: 1.6; opacity: .8; }
.minimap .rlabel { display: none; }
.minimap .pin { fill: var(--brand); stroke: var(--bg); stroke-width: 3; } .minimap .pin.bad { fill: var(--bad); } .minimap .pin.warn { fill: var(--warn); } .minimap .pin.ok { fill: var(--ok); }
.minimap .pin-ring { fill: none; stroke: var(--brand); stroke-width: 2; opacity: .5; animation: ring 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ring { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(2.2); opacity: 0; } }
.minimap .pin-label { fill: var(--ink); font: 600 15px/1 "DM Sans", sans-serif; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
.minimap .unplaced { color: var(--muted); font-size: 12px; margin: 6px 0 8px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); align-items: baseline; }
.feed li:last-child { border-bottom: 0; } .feed .when { color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.feed .who strong { font-weight: 600; } .feed .who .sub { display: block; color: var(--muted); font-size: 12.5px; }
.feed li.fresh { animation: flash 2.5s ease-out; } @keyframes flash { from { background: color-mix(in srgb, var(--brand) 22%, transparent); } to { background: transparent; } }
.livedot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: live 1.8s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; } .swatch { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); position: relative; }
.swatch span { position: absolute; left: 0; right: 0; top: 100%; font-size: 10px; color: var(--muted); text-align: center; margin-top: 3px; font-family: ui-monospace, monospace; }
.swatches { margin-bottom: 22px; }
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.files li { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #1a1511; }
.files .thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; background: #15110e; color: var(--muted); font-size: 12px; overflow: hidden; }
.files .thumb img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 8px; box-sizing: border-box; }
.files .meta { padding: 8px 10px; font-size: 12.5px; } .files .meta strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.files .meta .row { margin: 4px 0 0; justify-content: flex-start; gap: 10px; }
.stars { color: var(--brand); letter-spacing: 1px; }
.logo-preview { max-height: 54px; max-width: 200px; display: block; margin-bottom: 8px; }
.profile-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 16px; align-items: start; }
.kv dd a { word-break: break-all; }
.field-help { color: var(--muted); font-size: 12px; margin: 3px 0 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 6px; margin: 0 0 16px; } legend { padding: 0 6px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
