svg.ks-i { width: 1em; height: 1em; display: inline-block; vertical-align: -.16em; fill: none; stroke: currentColor; overflow: visible; flex: 0 0 auto; }
/* The bell and inbox (kh-alerts.js) on the customer, driver and supplier pages. */
.kh-bell { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,253,247,.14); color: inherit; cursor: pointer; font-size: 1.5rem; flex: 0 0 auto; }
.kh-bell svg.ks-i { width: 1em; height: 1em; fill: none; stroke: currentColor; }
.kh-bell-n { display: none; position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 999px; background: #c4452f; color: #fff; font-style: normal; font-size: .7rem; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px #fffdf7; }
.kh-bell-n.on { display: block; animation: kh-ring .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes kh-ring { from { transform: scale(0); } }
.kh-inbox { position: fixed; inset: 0; z-index: 90; background: rgba(29,25,21,.45); display: flex; justify-content: flex-end; align-items: flex-end; opacity: 0; pointer-events: none; transition: opacity .2s; }
.kh-inbox.open { opacity: 1; pointer-events: auto; }
.kh-inbox-card { background: #fffdf7; width: 100%; max-width: 460px; max-height: 86dvh; border-radius: 26px 26px 0 0; display: flex; flex-direction: column; transform: translateY(30px); transition: transform .25s cubic-bezier(.2,.8,.2,1); color: #1d1915; }
.kh-inbox.open .kh-inbox-card { transform: none; }
@media (min-width: 768px) { .kh-inbox { align-items: stretch; } .kh-inbox-card { border-radius: 26px 0 0 26px; max-height: none; } }
.kh-inbox-card header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem .4rem; }
.kh-inbox-card h2 { font-family: 'Caveat Brush', cursive; font-weight: 400; font-size: 1.9rem; margin: 0; }
.kh-inbox-x { border: 0; background: #f3eedf; width: 38px; height: 38px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; }
.kh-inbox-push { display: flex; align-items: center; gap: .6rem; margin: .2rem 1.2rem .6rem; background: #e2edd2; border-radius: 14px; padding: .55rem .8rem; color: #1f4d18; }
.kh-inbox-push svg.ks-i { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; flex: 0 0 auto; }
.kh-inbox-push span { flex: 1; } .kh-inbox-push button { border: 0; background: #1f4d18; color: #fff; border-radius: 999px; padding: .35rem .9rem; font: inherit; cursor: pointer; }
.kh-inbox-list { overflow-y: auto; padding: 0 .8rem 1.4rem; }
.kh-note { display: flex; gap: .75rem; padding: .8rem .5rem; border-bottom: 1px solid #e7dfca; text-decoration: none; color: inherit; border-radius: 14px; }
.kh-note.new { background: #f3f9ea; }
.kh-note .ic { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #1f4d18; color: #fff; --ks-acc: #e9b949; font-size: 1.5rem; }
.kh-note .ic svg.ks-i { width: 1em; height: 1em; fill: none; stroke: currentColor; }
.kh-note .k-delivery, .kh-note .k-nearby { background: #8a4b22; } .kh-note .k-wallet { background: #b07a10; } .kh-note .k-supplier { background: #c8794b; } .kh-note .k-reminder { background: #c4452f; }
.kh-note .tx { display: flex; flex-direction: column; gap: .1rem; } .kh-note b { font-weight: 400; font-size: 1.08rem; } .kh-note .tx span { color: var(--kh-text2, #4a433a); line-height: 1.35; } .kh-note small { color: #8a8070; }
.kh-inbox-empty { text-align: center; color: var(--kh-muted, #6b6255); padding: 2rem 1rem; }

.kh-top-bell { background: #e2edd2; color: #1f4d18; }
.kd-live { background: #fbf0d6 !important; color: #6b3a19 !important; font-size: .82rem; max-width: 46%; }
.kd-live::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #8a4b22; margin-right: .35rem; animation: kt-pulse2 1.6s infinite; }
@keyframes kt-pulse2 { 50% { opacity: .3; } }
#kd-progress { white-space: nowrap; }
.kd-live { white-space: nowrap; }

/* Transport badge (kh-transport.js) */
.kt-badge { display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px; padding: .25rem .75rem .25rem .45rem; background: #fbf0d6; color: #6b3a19; font-size: .95rem; margin: .35rem 0; }
.kt-badge svg.ks-i { font-size: 1.5rem; --ks-acc: #e9b949; } .kt-badge b { font-weight: 400; } .kt-badge small { color: #7a5a33; }
.kt-badge.v-bakkie, .kt-badge.v-small_bakkie { background: #fbeee6; color: #9a5532; } .kt-badge.v-truck { background: #f8e2d8; color: #9b2f1d; }
.kt-badge.v-bicycle, .kt-badge.v-motorbike { background: #e2edd2; color: #1f4d18; }
.kh-driver .kh-top { gap: .4rem; } .kh-driver .kh-top img { height: 40px !important; } .kh-driver .kd-live { font-size: .74rem; padding: .25rem .55rem; }

/* ------------------------------------------------------------------ dark mode (kh-theme.js sets html.kh-dark)
   "Night garden": deep forest green, not black; warm cream text; lime and sun accents; cards with soft depth. */
html.kh-dark {
  --kh-page: #0e1913; --kh-surface: #16241b; --kh-soft: #1d3024; --kh-ink: #f3ecdc; --kh-muted: #b6c2a6; --kh-text2: #d6dcc6;
  --kh-border: #284034; --kh-field: #13201a; --kh-glow: rgba(124, 194, 67, .14); color-scheme: dark;
}
html.kh-dark body { background: radial-gradient(1200px 600px at 50% -200px, #18301f, transparent 70%), var(--kh-page); background-attachment: fixed; color: var(--kh-ink); }
html.kh-dark .ks { --ks-ink: #f3ecdc; --ks-cream: #0e1913; --ks-paper: #16241b; --ks-line: #284034; --ks-deep: #9fd36f; --ks-green: #6fbf45; }
/* cards: lifted with a soft edge and a hint of leaf light */
html.kh-dark .ks-p, html.kh-dark .ks-tier, html.kh-dark .ks-card, html.kh-dark .ks-cat, html.kh-dark .ks-row, html.kh-dark .ks-ptiles button, html.kh-dark .ks-tile,
html.kh-dark .kh-card, html.kh-dark .ks-buyer button, html.kh-dark .ks-back {
  background: linear-gradient(180deg, #1a2b20, #15231a); border: 1px solid #284034; color: var(--kh-ink); box-shadow: 0 10px 26px -18px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.03); }
html.kh-dark .ks-p.in, html.kh-dark .ks-tier.on, html.kh-dark .ks-buyer button.on { border-color: #7cc243; box-shadow: 0 0 0 1px #7cc243, 0 12px 28px -16px rgba(124,194,67,.45); background: linear-gradient(180deg, #1f3523, #182a1d); }
html.kh-dark .ks-p-img, html.kh-dark .ks-sheet-img { background: radial-gradient(circle at 50% 55%, rgba(159,211,111,.20), rgba(159,211,111,.02) 70%), #13221a; }
html.kh-dark .ks-p-img svg.ks-i, html.kh-dark .ks-sheet-img svg.ks-i, html.kh-dark .ks-b-line .ic svg.ks-i, html.kh-dark .ks-tier .mdi-large, html.kh-dark .ks-tier svg.ks-i { color: #a9de7a; }
html.kh-dark .ks-photo { background: #f6f1e4; border-radius: 12px; padding: 4px; box-sizing: border-box; }
html.kh-dark .ks-p-price, html.kh-dark .ks-tier .price, html.kh-dark .ks-sheet-price { color: #fff7e4; }
html.kh-dark .ks-p-sub { color: var(--kh-muted); opacity: 1; } html.kh-dark .kh-sub { color: #b9c3aa; }
html.kh-dark .ks-p-farm { color: #c8e6a3; } html.kh-dark .ks-chip { color: #f4d590; border-color: rgba(240,194,84,.45); background: rgba(233,185,73,.10); }
html.kh-dark .ks-chip--box { color: #10200f; background: #9fd36f; border-color: #9fd36f; }
html.kh-dark .ks-add { background: #13201a; border-color: #c8794b; color: #f4d590; }
html.kh-dark .ks-step { background: #1d3024; } html.kh-dark .ks-step button { color: #f4d590; }
/* header and search */
html.kh-dark .ks-head { background: radial-gradient(500px 200px at 85% 0%, rgba(233,185,73,.18), transparent 70%), linear-gradient(170deg, #2a6420 0%, #143a12 75%); box-shadow: 0 14px 30px -20px rgba(0,0,0,.9); }
html.kh-dark .ks-search { background: rgba(255,255,255,.08); color: var(--kh-ink); border: 1px solid rgba(255,255,255,.08); } html.kh-dark .ks-search input { color: var(--kh-ink); } html.kh-dark .ks-search input::placeholder { color: #b9c3aa; }
html.kh-dark .kh-input, html.kh-dark input:not([type=checkbox]):not([type=radio]), html.kh-dark select, html.kh-dark textarea { background: var(--kh-field); color: var(--kh-ink); border-color: var(--kh-border); }
/* banners and soft panels */
html.kh-dark .kh-banner.ok { background: rgba(124,194,67,.14); color: #c8eaa6; } html.kh-dark .kh-banner.warn { background: rgba(233,185,73,.14); color: #f4da95; } html.kh-dark .kh-banner.info { background: rgba(233,185,73,.16); color: #f4da95; }
html.kh-dark .ks-eta { background: rgba(124,194,67,.12); color: var(--kh-ink); border: 1px solid rgba(124,194,67,.22); } html.kh-dark .ks-eta small { color: #c9d4b9; } html.kh-dark .ks-eta .mdi, html.kh-dark .ks-eta svg.ks-i { color: #a9de7a; }
html.kh-dark .ks-eta.today { background: rgba(233,185,73,.14); border-color: rgba(233,185,73,.3); } html.kh-dark .ks-eta.today .mdi, html.kh-dark .ks-eta.today svg.ks-i { color: #f0c254; }
html.kh-dark .kt-code, html.kh-dark .kp-tips, html.kh-dark .kd-guide, html.kh-dark .ks-p-contents, html.kh-dark .kt-badge, html.kh-dark .kh-inbox-push, html.kh-dark .kd-mrow div, html.kh-dark .kd-trip-m span { background: #1d3024; color: var(--kh-ink); }
html.kh-dark .ks-row--sell, html.kh-dark .ks-row--drive, html.kh-dark .kh-note.new, html.kh-dark .kj-sell, html.kh-dark .kd-q.good { background: linear-gradient(120deg, #1f3523, #1a2a1f); }
html.kh-dark .kd-q.bad { background: #3a2019; }
/* nav, sheets, inbox */
html.kh-dark .ks-nav { background: rgba(22,36,27,.88); border-color: #284034; box-shadow: 0 18px 36px -14px rgba(0,0,0,.9); }
html.kh-dark .ks-nav button { color: #d6dcc6; } html.kh-dark .ks-nav button.on { background: rgba(124,194,67,.18); color: #c8eaa6; }
html.kh-dark .ks-sheet-card, html.kh-dark .kh-inbox-card, html.kh-dark .kh-toast { background: #16241b; color: var(--kh-ink); border: 1px solid #284034; }
html.kh-dark .ks-sheet-x, html.kh-dark .kh-inbox-x { background: #1d3024; color: var(--kh-ink); }
html.kh-dark .kt-star { color: #3a4d3f; } html.kh-dark .kt-star.on { color: #f0c254; }
html.kh-dark .kt-tags button, html.kh-dark .kt-tips button, html.kh-dark .kt-prods button, html.kh-dark .kj-chips button, html.kh-dark .kd-chips button { background: #13201a; color: var(--kh-ink); border-color: #284034; }
html.kh-dark .kt-tags button.on, html.kh-dark .kj-chips button.on, html.kh-dark .kd-chips button.on { background: #6fbf45; color: #0e1913; border-color: #6fbf45; }
html.kh-dark .kh-top, html.kh-dark .kh-tabs { background: rgba(22,36,27,.94); border-color: #284034; }
html.kh-dark .kj, html.kh-dark .kj-body { --paper: #16241b; --ink: #f3ecdc; background: #0e1913; color: #f3ecdc; }
html.kh-dark .kj-card { background: rgba(22,36,27,.88); } html.kh-dark .kj-card p, html.kh-dark .kj-lead { color: #d6dcc6; } html.kh-dark .kj-card h2 { color: #f3ecdc; }
html.kh-dark .leaflet-container { filter: brightness(.85) saturate(.9); }
html.kh-dark .ks-size { background: rgba(14,25,19,.85); color: #f3ecdc; border-color: rgba(255,255,255,.12); }
/* the Auto / Light / Dark choice */
.kh-theme-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .6rem; }
.kh-theme-picker button { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .6rem .3rem; border-radius: 14px; border: 2px solid var(--kh-border, #e7dfca); background: var(--kh-surface, #fffdf7); color: var(--kh-ink, #1d1915); font: inherit; cursor: pointer; }
.kh-theme-picker button.on { border-color: #3d8b2f; } .kh-theme-picker b { font-weight: 400; } .kh-theme-picker small { font-size: .78rem; color: var(--kh-muted, #6b6255); }
html.kh-dark .ks-sheet-card .kh-sub, html.kh-dark .ks .kh-sub, html.kh-dark .ks-group { color: #c3cdb3 !important; }

/* Address suggestions (kh-address.js) */
.kh-suggest { position: relative; z-index: 30; margin-top: -.3rem; margin-bottom: .6rem; background: var(--kh-surface, #fffdf7); border: 1px solid var(--kh-border, #e7dfca); border-radius: 14px; overflow: hidden; box-shadow: 0 12px 26px -16px rgba(0,0,0,.45); }
.kh-suggest button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--kh-border, #e7dfca); background: transparent; color: var(--kh-ink, #1d1915); font: inherit; padding: .6rem .8rem; cursor: pointer; }
.kh-suggest button:hover { background: rgba(124,194,67,.12); } .kh-suggest small { display: block; padding: .4rem .8rem; color: var(--kh-muted, #6b6255); }
#locationPickerModal { z-index: 100; } .modal-backdrop { z-index: 99; }
/* The BitAgrix map pin picker (location-picker.js) styled for the phone pages, which do not load the staff theme */
#locationPickerModal.modal { position: fixed; inset: 0; z-index: 100; display: none; overflow-y: auto; background: rgba(29,25,21,.5); }
#locationPickerModal.modal.show { display: block; }
#locationPickerModal .modal-dialog { max-width: 640px; margin: 1rem auto; padding: 0 .75rem; }
#locationPickerModal .modal-content { background: var(--kh-surface, #fffdf7); color: var(--kh-ink, #1d1915); border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
#locationPickerModal .modal-header { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem .4rem; }
#locationPickerModal .modal-title { font-family: 'Caveat Brush', cursive; font-weight: 400; font-size: 1.6rem; margin: 0; }
#locationPickerModal .btn-close { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--kh-soft, #ece5d2); cursor: pointer; position: relative; }
#locationPickerModal .btn-close::before { content: '×'; font-size: 1.5rem; line-height: 38px; color: var(--kh-ink, #1d1915); }
#locationPickerModal .modal-body { padding: .4rem 1.1rem 1rem; }
#locationPickerModal .d-flex { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
#locationPickerModal .input-group { display: flex; flex: 1 1 220px; }
#locationPickerModal .form-control { flex: 1; min-width: 0; border: 1.5px solid var(--kh-border, #e7dfca); border-radius: 12px 0 0 12px; padding: .55rem .8rem; font: inherit; background: var(--kh-field, #fff); color: var(--kh-ink, #1d1915); }
#locationPickerModal .btn { border: 1.5px solid #3d8b2f; background: transparent; color: #2f7124; border-radius: 999px; padding: .5rem 1rem; font: inherit; cursor: pointer; }
#locationPickerModal .input-group .btn { border-radius: 0 12px 12px 0; }
#locationPickerModal .btn-primary { background: #3d8b2f; color: #fff; } #locationPickerModal .btn-light { border-color: var(--kh-border, #e7dfca); color: var(--kh-muted, #6b6255); }
#locationPickerModal #location-picker-map { height: 52vh !important; border-radius: 16px !important; }
#locationPickerModal .text-muted, #locationPickerModal small { color: var(--kh-muted, #6b6255); font-size: .9rem; }
#locationPickerModal .modal-footer { display: flex; justify-content: flex-end; gap: .5rem; padding: .6rem 1.1rem 1.1rem; flex-wrap: wrap; }
.modal-backdrop { display: none; }
body.modal-open { overflow: hidden; }
/* Charts (kh-charts.js) */
.kc-bars { width: 100%; height: auto; display: block; }
.kc-grid { stroke: var(--kh-border, #e7dfca); stroke-dasharray: 3 4; }
.kc-lab { font-size: 10px; fill: var(--kh-muted, #6b6255); text-anchor: middle; } .kc-val { font-size: 11px; fill: var(--kh-ink, #1d1915); text-anchor: middle; font-weight: 600; }
.kc-legend { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .85rem; color: var(--kh-muted, #6b6255); margin-top: .2rem; } .kc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .3rem; }
.kc-rings { display: flex; gap: .6rem; justify-content: space-around; flex-wrap: wrap; }
.kc-ring { position: relative; width: 96px; text-align: center; } .kc-ring svg { width: 84px; height: 84px; } .kc-track { fill: none; stroke: var(--kh-soft, #ece5d2); stroke-width: 9; }
.kc-ring b { position: absolute; top: 28px; left: 0; right: 0; font-size: 1.1rem; font-weight: 600; } .kc-ring small { display: block; font-size: .8rem; color: var(--kh-muted, #6b6255); line-height: 1.2; }
.kc-ring.empty b { position: static; display: block; font-size: 1.6rem; margin: 1.2rem 0 .6rem; }
.kc-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.kc-tiles div { background: var(--kh-soft, #f3eedf); border-radius: 14px; padding: .6rem .7rem; } .kc-tiles small { display: block; color: var(--kh-muted, #6b6255); font-size: .8rem; }
.kc-tiles b { display: block; font-size: 1.3rem; font-weight: 600; color: var(--kh-ink, #1d1915); } .kc-tiles em { font-style: normal; font-size: .78rem; color: var(--kh-muted, #6b6255); }
.kc-ranked div { display: grid; grid-template-columns: 7.5rem 1fr auto; gap: .5rem; align-items: center; padding: .25rem 0; font-size: .92rem; }
.kc-ranked span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .kc-ranked i { height: 10px; background: var(--kh-soft, #ece5d2); border-radius: 9px; overflow: hidden; } .kc-ranked em { display: block; height: 100%; border-radius: 9px; }
.kc-ranked b { font-weight: 600; font-size: .85rem; }
.kc-empty { color: var(--kh-muted, #6b6255); font-size: .95rem; margin: .4rem 0; }
.kc-dl { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; } .kc-dl select, .kc-dl input { padding: .45rem .6rem; border-radius: 12px; border: 1.5px solid var(--kh-border, #e7dfca); font: inherit; background: var(--kh-field, #fff); color: var(--kh-ink, #1d1915); }
