/* Krunch Field: app stylesheet. Light, crisp operations UI (Stripe / Linear grade). */

@font-face {
	font-family: "Onest";
	src: url("../fonts/onest-variable.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--ground: #f6f7f9;
	--surface: #ffffff;
	--surface-2: #f3f4f6;
	--surface-3: #e9ebef;
	--line: #e5e7eb;
	--line-2: #d3d7de;
	--t1: #111318;
	--t2: #474e5c;
	--t3: #677080;
	--ink: #15171c;
	--ink-hover: #2b2e36;
	--krunch: #e11d26;
	--krunch-600: #c3141c;
	--krunch-tint: #fdeced;
	--gold: #e2a10f;
	--blue: #2a78d6;
	--blue-600: #1f5fb8;
	--blue-tint: #eaf2fc;
	--green: #0f7b4f;
	--green-dot: #16a36a;
	--green-tint: #e8f5ee;
	--amber: #9a5800;
	--amber-dot: #e59a00;
	--amber-tint: #fff4df;
	--red: #c4281c;
	--red-dot: #e0392c;
	--red-tint: #fdecea;
	--grey-dot: #a2a9b4;
	--series: var(--krunch);
	--bar: var(--ink);
	--track: #eceef2;
	--focus: 0 0 0 2px var(--surface), 0 0 0 4px rgba(42, 120, 214, .6);
	--shadow-pop: 0 1px 2px rgba(17, 19, 24, .06), 0 12px 32px -8px rgba(17, 19, 24, .2);
	--r-card: 12px;
	--r-ctl: 8px;
	--r-sm: 6px;
	--side-w: 244px;
	--top-h: 56px;
	--tab-h: 64px;
	--ease: cubic-bezier(.2, .8, .2, 1);
	--font: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color-scheme: light;
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.kf {
	margin: 0;
	background: var(--ground);
	color: var(--t1);
	font-family: var(--font);
	font-size: 14px;
	line-height: 1.5;
	font-feature-settings: normal;
	font-variant-numeric: normal;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
	-webkit-tap-highlight-color: transparent;
}
:where(.kf) h1, :where(.kf) h2, :where(.kf) h3, :where(.kf) p { margin: 0; }
:where(.kf) a { color: inherit; text-decoration: none; }
:where(.kf) img { max-width: 100%; height: auto; display: block; }
:where(.kf) button { font: inherit; color: inherit; }
:where(.kf) ul, :where(.kf) ol { margin: 0; padding: 0; list-style: none; }
.kf ::selection { background: rgba(42, 120, 214, .2); }
.kf [hidden] { display: none !important; }
.kf :focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.kf input, .kf select, .kf textarea { caret-color: var(--blue); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.kf-skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--r-ctl); }
.kf-skip:focus { top: 12px; }
.kf-i { flex: none; display: block; }
.kf-muted { color: var(--t3); }
/* Onest's tabular "1" is too wide, so figures stay proportional; the timer sits in a fixed-width box instead. */
.kf-table th.is-num { text-align: right; }
.kf-nowrap { white-space: nowrap; }
.kf-money { font-weight: 550; }

/* scrollbars */
.kf * { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.kf *::-webkit-scrollbar { width: 10px; height: 10px; }
.kf *::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* ---------------------------------------------------------------- logo */

.kf-logo { display: inline-flex; align-items: center; gap: 10px; }
.kf-logo__mark { width: 28px; height: 28px; border-radius: 7px; background: var(--krunch); color: #f6c33d; display: grid; place-items: center; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12); }
.kf-logo__word { font-weight: 650; font-size: 15px; letter-spacing: -.01em; color: var(--t1); }
.kf-logo__product { font-weight: 450; color: var(--t3); }

/* ---------------------------------------------------------------- buttons & controls */

.kf-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	height: 36px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid transparent;
	font-size: 14px; font-weight: 520; line-height: 1; white-space: nowrap; cursor: pointer;
	transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
	user-select: none; -webkit-user-select: none;
}
.kf-btn--primary { background: var(--ink); color: #fff; box-shadow: 0 1px 1px rgba(17, 19, 24, .16), inset 0 1px 0 rgba(255, 255, 255, .08); }
.kf-btn--primary:hover { background: var(--ink-hover); }
.kf-btn--brand { background: var(--krunch); color: #fff; box-shadow: 0 1px 1px rgba(150, 10, 16, .25), inset 0 1px 0 rgba(255, 255, 255, .12); }
.kf-btn--brand:hover { background: var(--krunch-600); }
.kf-btn--light { background: #fff; color: var(--ink); }
.kf-btn--light:hover { background: #eceef2; }
.kf-btn--secondary { background: var(--surface); color: var(--t1); border-color: var(--line-2); box-shadow: 0 1px 1px rgba(17, 19, 24, .04); }
.kf-btn--secondary:hover { background: var(--surface-2); }
.kf-btn--ghost { background: transparent; color: var(--t2); }
.kf-btn--ghost:hover { background: var(--surface-2); color: var(--t1); }
.kf-btn--danger { background: var(--surface); color: var(--red); border-color: var(--line-2); }
.kf-btn--danger:hover { background: var(--red-tint); border-color: #f2b8b2; }
.kf-btn--sm { height: 30px; padding: 0 10px; font-size: 13px; }
.kf-btn--lg { height: 44px; padding: 0 18px; font-size: 15px; }
.kf-btn--xl { height: 52px; padding: 0 20px; font-size: 16px; border-radius: 10px; }
.kf-btn--block { width: 100%; }
.kf-btn.is-disabled, .kf-btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.kf-btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.kf-btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: kf-spin .7s linear infinite; }
.kf-btn--secondary.is-busy::after, .kf-btn--ghost.is-busy::after { border-color: var(--line-2); border-top-color: var(--t1); }
@keyframes kf-spin { to { transform: rotate(360deg); } }

.kf-iconbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-ctl); border: 0; background: transparent; color: var(--t2); cursor: pointer; transition: background-color .15s var(--ease), color .15s var(--ease); }
.kf-iconbtn:hover { background: var(--surface-2); color: var(--t1); }

.kf-form { display: grid; gap: 16px; }
.kf-field { display: grid; gap: 6px; align-content: start; }
.kf input[type="file"] { font: inherit; font-size: 13.5px; color: var(--t2); max-width: 100%; }
.kf input[type="file"]::file-selector-button { height: 36px; margin-right: 10px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); color: var(--t1); font: inherit; font-weight: 520; cursor: pointer; }
.kf input[type="file"]::file-selector-button:hover { background: var(--surface-2); }
.kf-field > label, .kf-label { font-size: 13px; font-weight: 520; color: var(--t1); }
.kf-field__hint { font-size: 12.5px; color: var(--t3); }
.kf input:not([type]), .kf input[type="text"], .kf input[type="email"], .kf input[type="password"], .kf input[type="number"], .kf input[type="search"], .kf input[type="tel"], .kf input[type="url"], .kf input[type="date"], .kf textarea, .kf select {
	width: 100%; min-height: 36px; padding: 7px 11px; border: 1px solid var(--line-2); border-radius: var(--r-ctl);
	background: var(--surface); color: var(--t1); font: inherit; font-size: 14px; line-height: 1.4;
	box-shadow: 0 1px 1px rgba(17, 19, 24, .03);
	transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.kf textarea { min-height: 76px; resize: vertical; }
.kf input::placeholder, .kf textarea::placeholder { color: #8a919e; }
.kf input:focus, .kf textarea:focus, .kf select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(42, 120, 214, .16); }
.kf select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer; }
.kf-select { position: relative; display: inline-flex; align-items: center; min-width: 0; }
.kf-select select { height: 34px; min-height: 34px; padding-top: 0; padding-bottom: 0; font-size: 13.5px; }
.kf-select__chev { position: absolute; right: 10px; pointer-events: none; color: var(--t3); }
.kf-search { position: relative; display: flex; align-items: center; min-width: 0; flex: 1; }
.kf-search .kf-i { position: absolute; left: 11px; color: var(--t3); pointer-events: none; }
.kf-search input[type="search"] { padding-left: 34px; height: 34px; min-height: 34px; }
.kf-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.kf-check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--t2); cursor: pointer; }
.kf-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.kf-pass { position: relative; display: block; }
.kf-pass input { padding-right: 42px; }
.kf-pass__toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: none; color: var(--t3); cursor: pointer; border-radius: var(--r-sm); }
.kf-pass__toggle:hover { color: var(--t1); }
.kf-pass__toggle > span { display: grid; place-items: center; }
.kf-pass__hide, .kf-pass__toggle[aria-pressed="true"] .kf-pass__show { display: none !important; }
.kf-pass__toggle[aria-pressed="true"] .kf-pass__hide { display: grid !important; }

/* segmented control & tabs */
.kf-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 9px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.kf-seg::-webkit-scrollbar { display: none; }
.kf-seg__item { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--t2); white-space: nowrap; transition: background-color .15s var(--ease), color .15s var(--ease); }
.kf-seg__item:hover { color: var(--t1); }
.kf-seg__item.is-on { background: var(--surface); color: var(--t1); box-shadow: 0 1px 2px rgba(17, 19, 24, .1), 0 0 0 .5px rgba(17, 19, 24, .06); }
.kf-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.kf-tabs::-webkit-scrollbar { display: none; }
.kf-tabs__item { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 40px; font-size: 14px; font-weight: 500; color: var(--t3); white-space: nowrap; }
.kf-tabs__item:hover { color: var(--t1); }
.kf-tabs__item.is-on { color: var(--t1); }
.kf-tabs__item.is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--t1); border-radius: 2px; }
.kf-tabs__count { font-size: 12px; font-weight: 500; color: var(--t3); background: var(--surface-3); border-radius: 10px; padding: 1px 7px; }

/* status: dot + words */
.kf-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--t2); white-space: nowrap; line-height: 1.3; }
.kf-status__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grey-dot); flex: none; }
.kf-status--green .kf-status__dot { background: var(--green-dot); }
.kf-status--amber .kf-status__dot { background: var(--amber-dot); }
.kf-status--red .kf-status__dot { background: var(--red-dot); }
.kf-status--blue .kf-status__dot { background: var(--grey-dot); }
.kf-status--ink .kf-status__dot { background: var(--t2); }
.kf-status--red { color: var(--red); }
.kf-status--amber { color: var(--amber); }

/* avatars */
.kf-avatar { --h: 214; display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; font-size: 12px; font-weight: 600; letter-spacing: .01em; color: hsl(var(--h) 45% 30%); background: hsl(var(--h) 60% 93%); }
.kf-avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.kf-avatar--xs { width: 22px; height: 22px; font-size: 9.5px; }
.kf-avatar--lg { width: 44px; height: 44px; font-size: 15px; }

/* figures */
.kf-fig { font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.kf-fig__unit { margin-right: .02em; }
.kf-fig__unit--after { margin: 0 0 0 .12em; font-size: .62em; font-weight: 500; color: var(--t3); letter-spacing: 0; }
.kf-delta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 3px; font-size: 12.5px; font-weight: 520; min-width: 0; }
.kf-delta--good { color: var(--green); }
.kf-delta--bad { color: var(--red); }
.kf-delta--flat { color: var(--t3); font-weight: 450; }
.kf-delta__vs { color: var(--t3); font-weight: 400; margin-left: 2px; }

/* ---------------------------------------------------------------- shell */

.kf-app { min-height: 100vh; min-height: 100dvh; }
.kf-side {
	position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 40;
	display: flex; flex-direction: column; background: var(--surface-2); border-right: 1px solid var(--line);
}
.kf-side__head { display: flex; align-items: center; justify-content: space-between; height: var(--top-h); padding: 0 12px 0 16px; flex: none; }
.kf-side__close { display: none; }
.kf-nav { flex: 1; overflow-y: auto; padding: 6px 10px 12px; }
.kf-nav__group + .kf-nav__group { margin-top: 18px; }
.kf-nav__label { font-size: 12px; font-weight: 500; color: var(--t3); padding: 0 10px 6px; }
.kf-nav__item { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 7px; font-size: 14px; font-weight: 480; color: var(--t2); transition: background-color .12s var(--ease), color .12s var(--ease); }
.kf-nav__item .kf-i { color: var(--t3); transition: color .12s var(--ease); }
.kf-nav__item:hover { background: var(--surface-3); color: var(--t1); }
.kf-nav__item.is-on { background: var(--surface); color: var(--t1); font-weight: 560; box-shadow: 0 1px 2px rgba(17, 19, 24, .08), 0 0 0 .5px rgba(17, 19, 24, .06); }
.kf-nav__item.is-on .kf-i { color: var(--krunch); }
.kf-nav__count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--amber-tint); color: var(--amber); font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; }
.kf-side__foot { border-top: 1px solid var(--line); padding: 10px; display: grid; gap: 4px; }
.kf-side__sync { display: block; padding: 6px 8px; border-radius: 7px; }
.kf-side__sync:hover { background: var(--surface-3); }
.kf-side__sync .kf-status { font-size: 12.5px; }
.kf-side__user { display: flex; align-items: center; gap: 10px; padding: 6px 2px 2px 8px; }
.kf-side__who { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.kf-side__name { font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kf-side__role { font-size: 12px; color: var(--t3); }
.kf-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(17, 19, 24, .32); opacity: 0; transition: opacity .2s var(--ease); }
.kf-scrim.is-on { opacity: 1; }

.kf-main { margin-left: var(--side-w); min-width: 0; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.kf-top {
	position: sticky; top: 0; z-index: 30; height: var(--top-h); flex: none;
	display: flex; align-items: center; gap: 12px; padding: 0 24px;
	background: rgba(246, 247, 249, .86); border-bottom: 1px solid var(--line);
	-webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
}
.kf-top__menu, .kf-top__brand { display: none; }
.kf-top__search { flex: 1; max-width: 520px; display: flex; }
.kf-top__search .kf-search input { background: var(--surface); }
.kf-top__end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.kf-content { flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: 24px 24px 56px; outline: none; }

/* shift button */
.kf-shift { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px 0 11px; border-radius: 17px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; font-weight: 550; color: var(--t1); cursor: pointer; transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.kf-shift:hover { background: var(--surface-2); }
.kf-shift__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grey-dot); }
.kf-shift.is-on { border-color: #b9dfcb; background: var(--green-tint); color: var(--green); }
.kf-shift.is-on .kf-shift__dot { background: var(--green-dot); box-shadow: 0 0 0 0 rgba(22, 163, 106, .5); animation: kf-pulse 2.4s var(--ease) infinite; }
.kf-shift.is-blocked { border-color: #f2c48d; background: var(--amber-tint); color: var(--amber); }
.kf-shift.is-blocked .kf-shift__dot { background: var(--amber-dot); animation: none; }
@keyframes kf-pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 106, .45); } 70% { box-shadow: 0 0 0 7px rgba(22, 163, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 106, 0); } }
.kf-outbox { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--t2); }
.kf-outbox.is-offline { color: var(--amber); }

/* rep tab bar (phones) */
.kf-tabbar { display: none; }

/* ---------------------------------------------------------------- page header, cards, grid */

.kf-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.kf-pagehead__title { font-size: 24px; line-height: 1.2; font-weight: 620; letter-spacing: -.022em; }
.kf-pagehead__sub { margin-top: 4px; color: var(--t3); font-size: 14px; }
.kf-pagehead__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kf-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--t3); margin-bottom: 10px; }
.kf-back:hover { color: var(--t1); }

.kf-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; min-width: 0; }
.kf-card--flush { padding: 0; overflow: hidden; }
.kf-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; flex-wrap: wrap; }
.kf-card__head > div { flex: 1 1 0; min-width: 0; }
.kf-card__head > .kf-btn, .kf-card__head > form { flex: none; }
.kf-card__head--pad { padding: 16px 20px 0; margin-bottom: 12px; }
.kf-card__title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.kf-card__sub { font-size: 13px; color: var(--t3); margin-top: 2px; }
.kf-card__section { border-top: 1px solid var(--line); margin: 16px -20px 0; padding: 14px 20px 0; }
.kf-card__minor { font-size: 13px; font-weight: 560; color: var(--t2); margin-bottom: 8px; }
.kf-card + .kf-card, .kf-grid + .kf-card, .kf-card + .kf-grid, .kf-grid + .kf-grid, .kf-kpis + .kf-grid, .kf-kpis + .kf-card { margin-top: 16px; }
.kf-grid > .kf-card, .kf-grid > .kf-grid { margin-top: 0; }
.kf-tile-muted .leaflet-tile-pane { filter: grayscale(.9) contrast(.92) brightness(1.04); }
.kf-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.kf-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kf-grid--2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.kf-grid--1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.kf-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.kf-facts { margin: 0; display: grid; gap: 0; }
.kf-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kf-facts > div:last-child { border-bottom: 0; }
.kf-facts dt { color: var(--t2); }
.kf-facts dd { margin: 0; font-weight: 560; text-align: right; }

.kf-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0; font-size: 14px; }
.kf-dl dt { color: var(--t3); }
.kf-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* KPI strip: one card, five figures */
.kf-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.kf-kpi { padding: 16px 20px 15px; min-width: 0; }
.kf-kpi + .kf-kpi { border-left: 1px solid var(--line); }
.kf-kpi__label { font-size: 13px; color: var(--t2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kf-kpi__hint { color: var(--t3); font-weight: 400; }
.kf-kpi__value { font-size: 24px; line-height: 1.15; margin: 6px 0 4px; }
.kf-kpi__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.kf-spark { display: block; width: 104px; height: 32px; flex: none; overflow: visible; }
.kf-spark path.l { fill: none; stroke: var(--series); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.kf-spark path.a { fill: var(--series); fill-opacity: .1; }
.kf-kpis--4 .kf-kpi { padding: 16px 20px; }
.kf-summary { font-size: 15px; color: var(--t2); margin: -4px 0 18px; max-width: 80ch; }
.kf-summary strong { color: var(--t1); font-weight: 600; }
.kf-attn-strip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 6px 10px; margin-bottom: 16px; }
.kf-attn-strip .kf-attn { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 8px; }
.kf-attn-strip__ok { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13.5px; color: var(--t2); }
.kf-attn-strip__ok .kf-i { color: var(--green); }
.kf-targetline { display: grid; gap: 6px; margin: -6px 0 16px; }
.kf-targetline__text { font-size: 13.5px; color: var(--t2); }
.kf-targetline__text strong { color: var(--t1); font-weight: 600; }
.kf-targetline .kf-progress__track { height: 4px; }

.kf-summary { padding: 14px 20px; }
.kf-summary__text { font-size: 15px; color: var(--t2); line-height: 1.55; }
.kf-summary__text strong { color: var(--t1); font-weight: 600; }

/* metric cards (Stripe style: label, value, change, sparkline) */
.kf-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); margin-bottom: 16px; }
.kf-metric { padding: 16px 20px 14px; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto; column-gap: 12px; }
.kf-metric + .kf-metric { border-left: 1px solid var(--line); }
.kf-metric__label { font-size: 13px; color: var(--t2); font-weight: 500; grid-column: 1 / -1; }
.kf-metric__value { font-size: 23px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin-top: 4px; }
.kf-metric .kf-delta { margin-top: 2px; }
.kf-metric__spark { grid-column: 2; grid-row: 2 / span 2; align-self: end; width: 96px; height: 34px; }
.kf-metric__spark path.l { fill: none; stroke: var(--series); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.kf-metric__spark path.a { fill: var(--series); fill-opacity: .1; }
.kf-attn-strip { margin-bottom: 16px; }
.kf-attn-strip .kf-attn { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 8px; }
.kf-attn-strip .kf-card__head { margin-bottom: 6px; }

/* attention list */
.kf-attn { margin: -6px -10px 0; }
.kf-attn__row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 13.5px; color: var(--t1); transition: background-color .12s var(--ease); }
.kf-attn__row:hover { background: var(--surface-2); }
.kf-attn__text { flex: 1; min-width: 0; }
.kf-attn__chev { color: var(--t3); }

/* legends */
.kf-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--t2); }
.kf-legend li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.kf-legend__key { width: 14px; height: 2px; border-radius: 2px; background: var(--series); }
.kf-legend__key--cmp { background: #b9bfc9; }
.kf-legend__key--own { width: 10px; height: 10px; border-radius: 3px; background: var(--krunch); }
.kf-legend__key--comp { width: 10px; height: 10px; border-radius: 3px; background: #8d96a5; }

/* ---------------------------------------------------------------- charts */

.kf-chart { margin: 0; position: relative; padding-left: 44px; }
.kf-chart__plot { position: relative; height: var(--h, 168px); }
.kf-chart__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.kf-chart__grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line); }
.kf-chart__grid:first-of-type { border-top-color: var(--line-2); }
.kf-chart__ylab { position: absolute; right: calc(100% + 10px); top: -8px; font-size: 11.5px; color: var(--t3); white-space: nowrap; }
.kf-chart__area { fill: var(--series); fill-opacity: .09; }
.kf-chart__line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.kf-chart__cmp { fill: none; stroke: #b9bfc9; stroke-width: 1.5; stroke-linejoin: round; }
.kf-chart__end { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--series); box-shadow: 0 0 0 2px var(--surface); }
.kf-chart__cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); opacity: 0; pointer-events: none; }
.kf-chart__cross::after { content: ""; position: absolute; left: -4.5px; width: 9px; height: 9px; border-radius: 50%; background: var(--series); box-shadow: 0 0 0 2px var(--surface); top: var(--y, 50%); margin-top: -4.5px; }
.kf-chart.is-hover .kf-chart__cross { opacity: 1; }
.kf-chart__tip { position: absolute; top: 0; z-index: 3; pointer-events: none; opacity: 0; transform: translate(-50%, -6px); background: var(--ink); color: #fff; border-radius: 8px; padding: 7px 10px; font-size: 12.5px; line-height: 1.4; white-space: nowrap; box-shadow: var(--shadow-pop); transition: opacity .12s var(--ease); }
.kf-chart__tip strong { font-weight: 600; }
.kf-chart__tip span { color: #b6bcc6; }
.kf-chart.is-hover .kf-chart__tip, .kf-cols.is-hover .kf-chart__tip { opacity: 1; }
.kf-chart__x { position: relative; height: 22px; margin-top: 6px; }
.kf-chart__x span { position: absolute; top: 0; transform: translateX(-50%); font-size: 11.5px; color: var(--t3); white-space: nowrap; }
.kf-chart__x span:first-child { transform: none; }
.kf-chart__x span:last-child { transform: translateX(-100%); }

.kf-cols { margin: 0; position: relative; padding-left: 36px; }
.kf-cols__plot { position: relative; height: var(--h, 120px); display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line-2); }
.kf-cols__grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); pointer-events: none; }
.kf-cols__ylab { position: absolute; right: calc(100% + 8px); top: -8px; font-size: 11.5px; color: var(--t3); }
.kf-cols__col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.kf-cols__bar { width: 100%; max-width: 18px; min-height: 1px; background: var(--series); border-radius: 3px 3px 0 0; transition: opacity .12s var(--ease); }
.kf-cols__col.is-weekend .kf-cols__bar { background: #c3cad4; }
.kf-cols.is-hover .kf-cols__bar { opacity: .45; }
.kf-cols.is-hover .kf-cols__col.is-hot .kf-cols__bar { opacity: 1; }

.kf-hbars { display: grid; gap: 10px; }
.kf-hbars__row { display: grid; grid-template-columns: minmax(96px, 150px) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 13.5px; }
.kf-hbars__label { min-width: 0; font-weight: 520; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kf-hbars__sub { display: block; font-size: 12px; font-weight: 400; color: var(--t3); }
.kf-hbars__track { height: 14px; display: flex; align-items: center; }
.kf-hbars__bar { height: 14px; border-radius: 0 4px 4px 0; background: #8d96a5; }
.kf-hbars__row.is-own .kf-hbars__bar { background: var(--krunch); }
.kf-hbars__row.is-own .kf-hbars__label { color: var(--t1); }
.kf-hbars__val { font-weight: 560; white-space: nowrap; min-width: 64px; text-align: right; }

/* ---------------------------------------------------------------- leaderboard */

.kf-lb { display: grid; }
.kf-lb__row { display: grid; grid-template-columns: 28px 28px minmax(0, 1fr) minmax(150px, 210px) 76px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kf-lb__row:last-child { border-bottom: 0; }
.kf-lb__rank { text-align: center; font-size: 13px; font-weight: 600; color: var(--t3); display: grid; place-items: center; }
.kf-lb__crown { color: var(--gold); }
.kf-lb__who { display: grid; min-width: 0; line-height: 1.35; }
.kf-lb__name { font-size: 14px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kf-lb__you { font-size: 11.5px; font-weight: 600; color: var(--krunch-600); margin-left: 4px; }
.kf-lb__meta { font-size: 12.5px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kf-lb__goal { display: flex; align-items: center; gap: 8px; }
.kf-lb__track { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.kf-lb__bar { display: block; height: 100%; border-radius: 3px; background: var(--bar); }
.kf-lb__row.is-hit .kf-lb__bar { background: var(--green-dot); }
.kf-lb__pct { font-size: 12.5px; color: var(--t2); white-space: nowrap; text-align: right; }
.kf-lb__pct--none { color: var(--t3); min-width: 0; text-align: left; }
.kf-lb__val { text-align: right; font-size: 14px; }
.kf-lb__row.is-me { background: var(--ground); border-radius: 8px; margin: 0 -8px; padding-left: 8px; padding-right: 8px; }

/* ---------------------------------------------------------------- tables */

.kf-table-wrap { position: relative; overflow-x: auto; }
.kf-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.kf-table th { position: sticky; top: 0; z-index: 1; background: #fafbfc; text-align: left; font-weight: 500; font-size: 12.5px; color: var(--t3); padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.kf-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.kf-table tbody tr:last-child td { border-bottom: 0; }
.kf-table th:first-child, .kf-table td:first-child { padding-left: 20px; }
.kf-table th:last-child, .kf-table td:last-child { padding-right: 20px; }
.kf-table .is-num { text-align: right; white-space: nowrap; }
.kf-table tbody tr[data-href] { cursor: pointer; }
.kf-table tbody tr { transition: background-color .1s var(--ease); }
.kf-table tbody tr:hover { background: #fafbfc; }
.kf-cell-main { font-weight: 550; color: var(--t1); }
a.kf-cell-main:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.kf-cell-sub { display: block; font-size: 12.5px; color: var(--t3); margin-top: 1px; }
.kf-table td.is-num .kf-cell-sub, .kf-table td[data-label="Order"] .kf-cell-sub { white-space: nowrap; }
.kf-table td[data-label="Pack"], .kf-table td[data-label="Price"], .kf-table td[data-label="Range"] { white-space: nowrap; }
.kf-visit__clock { display: inline-block; min-width: 4.6ch; text-align: right; font-feature-settings: "tnum" 1; font-variant-numeric: tabular-nums; }
.kf-row-chev { color: var(--t3); }
.kf-only-sm { display: none; }
.kf-only-sm .kf-i { display: inline-block; vertical-align: -2px; }
@media (max-width: 767px) { .kf-only-sm { display: inline; } }
.kf-cell-rep { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.kf-card > .kf-table-wrap { margin: 0 -20px -18px; }
.kf-card--flush > .kf-table-wrap { margin: 0; }

/* filter bar */
.kf-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.kf-filters .kf-search { min-width: 220px; max-width: 360px; }
.kf-filters__end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.kf-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--t3); }
.kf-pager__nav { display: flex; gap: 6px; }

/* proof strip (signature) */
.kf-proof { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.kf-proof__step { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 24px auto auto; row-gap: 10px; padding-right: 14px; }
.kf-proof__step::before { content: ""; position: absolute; left: 32px; right: 8px; top: 11.5px; height: 1px; background: var(--line-2); }
.kf-proof__step:last-child::before { display: none; }
.kf-proof__step.is-done::before { background: var(--t1); }
.kf-proof__node { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; background: var(--surface); border: 1px solid var(--line-2); color: var(--t3); }
.kf-proof__step.is-done .kf-proof__node { background: var(--t1); border-color: var(--t1); color: #fff; }
.kf-proof__step.is-done.tone-red .kf-proof__node { background: var(--red); border-color: var(--red); }
.kf-proof__step.is-done.tone-amber .kf-proof__node { background: var(--amber-dot); border-color: var(--amber-dot); }
.kf-proof__body { display: grid; grid-template-rows: auto auto minmax(17px, auto); min-width: 0; line-height: 1.35; }
.kf-proof__label { font-size: 13px; font-weight: 560; }
.kf-proof__time { font-size: 12.5px; color: var(--t2); }
.kf-proof__meta { font-size: 12.5px; color: var(--t3); overflow-wrap: anywhere; }
.kf-proof__step.tone-red .kf-proof__meta { color: var(--red); }
.kf-proof__step.tone-amber .kf-proof__meta { color: var(--amber); }
.kf-proof__thumb { width: 72px; height: 54px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); display: block; }
.kf-proof__thumb--empty { border-style: dashed; border-color: var(--line); background: transparent; }
.kf-proof__thumb img { width: 72px; height: 54px; object-fit: cover; }
.kf-proof-dots { display: inline-flex; gap: 4px; align-items: center; }
.kf-proof-dots__d { width: 8px; height: 8px; border-radius: 2.5px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.kf-proof-dots__d--done { background: var(--t1); box-shadow: none; }
.kf-proof-dots__d--red { background: var(--red-dot); box-shadow: none; }
.kf-proof-dots__d--amber { background: var(--amber-dot); box-shadow: none; }
.kf-proof-dots__d--green { background: var(--t1); box-shadow: none; }

/* empty states, flash, demo note */
.kf-empty { display: grid; justify-items: center; text-align: center; padding: 28px 16px; gap: 6px; }
.kf-empty__icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--t3); margin-bottom: 4px; }
.kf-empty__title { font-size: 14.5px; font-weight: 600; }
.kf-empty__text { font-size: 13.5px; color: var(--t3); max-width: 42ch; }
.kf-empty__action { margin-top: 8px; }
.kf-flash { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 16px; border-radius: 10px; font-size: 14px; border: 1px solid; flex-wrap: wrap; }
.kf-flash > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.kf-flash--green { background: var(--green-tint); border-color: #bfe3cf; color: #0b5c3b; }
.kf-flash--red { background: var(--red-tint); border-color: #f5c2bd; color: #8f1d14; }
.kf-flash--amber { background: var(--amber-tint); border-color: #f2d29f; color: #6e4000; }
.kf-demo-note { display: flex; gap: 8px; align-items: flex-start; padding: 9px 12px; margin: -6px 0 16px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--t2); }
.kf-demo-note .kf-i { margin-top: 3px; color: var(--blue); }
.kf-demo-note a { color: var(--blue-600); text-decoration: underline; text-underline-offset: 2px; }

/* photos */
.kf-photo { display: block; position: relative; border-radius: 8px; overflow: hidden; background: var(--surface-3); }
.kf-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.kf-photo:hover img { transform: scale(1.03); }
.kf-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.kf-shot { display: grid; gap: 8px; min-width: 0; }
.kf-shot .kf-photo { aspect-ratio: 4 / 3; }
.kf-shot__cap { display: grid; gap: 1px; font-size: 13px; line-height: 1.35; min-width: 0; }
.kf-shot__title { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kf-shot__meta { color: var(--t3); font-size: 12.5px; }
.kf-shot__kind { position: absolute; left: 8px; top: 8px; z-index: 1; font-size: 11.5px; font-weight: 550; color: #fff; background: rgba(17, 19, 24, .62); padding: 2px 7px; border-radius: 5px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

.kf-lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; overflow: visible; }
.kf-lightbox::backdrop { background: rgba(10, 11, 14, .82); }
.kf-lightbox img { max-width: min(1100px, 94vw); max-height: 82vh; width: auto; border-radius: 10px; box-shadow: var(--shadow-pop); }
.kf-lightbox__close { position: absolute; right: -6px; top: -46px; color: #fff; }
.kf-lightbox__close:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.kf-lightbox__cap { color: #d9dde3; font-size: 13.5px; text-align: center; margin-top: 10px; }

/* toasts */
.kf-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.kf-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 420px; padding: 11px 14px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--shadow-pop); animation: kf-toast-in .22s var(--ease); }
.kf-toast--red { background: #8f1d14; }
.kf-toast.is-out { opacity: 0; transform: translateY(6px); transition: opacity .18s var(--ease), transform .18s var(--ease); }
@keyframes kf-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- maps */

.kf-minimap { height: 230px; border-top: 1px solid var(--line); background: #eef0f2; }
.kf-map { height: 100%; min-height: 360px; background: #eef0f2; isolation: isolate; }
.kf .leaflet-container { font-family: var(--font); font-size: 13px; background: #eef0f2; }
.kf .leaflet-control-attribution { font-size: 10.5px; background: rgba(255, 255, 255, .8); }
.kf .leaflet-control-zoom a { color: var(--t1); }
.kf .leaflet-bar { border: 1px solid var(--line-2); box-shadow: none; border-radius: 8px; overflow: hidden; }
.kf .leaflet-popup-content-wrapper { border-radius: 10px; box-shadow: var(--shadow-pop); }
.kf .leaflet-popup-content { margin: 10px 12px; line-height: 1.45; }
.kf-pin { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); color: var(--t1); font-size: 11px; font-weight: 650; box-shadow: 0 1px 3px rgba(17, 19, 24, .3), 0 0 0 2px var(--surface); border: 2px solid var(--grey-dot); }
.kf-pin--visit { border-color: var(--green-dot); }
.kf-pin--moving, .kf-pin--idle { border-color: var(--t2); }
.kf-pin--silent { border-color: var(--amber-dot); }
.kf-pin--off { border-color: var(--line-2); color: var(--t3); opacity: .7; }
.kf-mapdot { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--surface), 0 1px 3px rgba(17, 19, 24, .35); }
.kf-mapdot--out { background: var(--red); }
.kf-maplegend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--t2); }
.kf-maplegend span { display: inline-flex; align-items: center; gap: 6px; }
.kf-maplegend i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); display: inline-block; }
.kf-maplegend i.is-pin { background: var(--krunch); }
.kf-stop { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--t1); color: #fff; font-size: 11px; font-weight: 650; box-shadow: 0 0 0 2px var(--surface), 0 1px 3px rgba(17, 19, 24, .3); }
.kf-stop--out { background: var(--red); }
.kf-stop--order { background: var(--krunch); }
.kf-storepin { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--krunch); box-shadow: 0 0 0 3px var(--surface), 0 1px 4px rgba(17, 19, 24, .35); }
.kf-me-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px var(--surface), 0 0 0 9px rgba(42, 120, 214, .18); }

.kf-replist { display: grid; }
.kf-replist__row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 20px; border-top: 1px solid var(--line); cursor: pointer; transition: background-color .1s var(--ease); text-align: left; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; font: inherit; }
.kf-replist__row:hover, .kf-replist__row.is-on { background: var(--surface-2); }
.kf-replist__who { display: grid; min-width: 0; line-height: 1.35; }
.kf-replist__name { font-size: 13.5px; font-weight: 560; }
.kf-replist__state { font-size: 12.5px; color: var(--t3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kf-replist__nums { font-size: 12.5px; color: var(--t2); text-align: right; white-space: nowrap; }
.kf-replist--compact .kf-replist__row:nth-child(n+5) { display: none; }

/* live map page */
.kf-live { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - var(--top-h) - 140px); min-height: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.kf-live__side { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; }
.kf-live__side .kf-replist { overflow-y: auto; flex: 1; }
.kf-live__side .kf-replist__row:first-child { border-top: 0; }
.kf-live__head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.kf-live__legend { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.kf-live__map { position: relative; min-height: 0; }
.kf-route { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 500; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 12px 14px; display: grid; gap: 10px; max-height: 46%; overflow: auto; }
.kf-route__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kf-route__title { font-weight: 600; font-size: 14px; }
.kf-route__facts { font-size: 12.5px; color: var(--t3); }
.kf-route__ctl { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.kf-route__ctl input[type="date"] { height: 30px; min-height: 30px; padding: 0 8px; font-size: 13px; width: auto; }
.kf-route__scrub { display: flex; align-items: center; gap: 10px; }
.kf-route__scrub input[type="range"] { flex: 1; accent-color: var(--ink); }
.kf-route__time { font-size: 12.5px; font-weight: 560; min-width: 44px; text-align: right; }
.kf-route__stops { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.kf-route__stop { flex: none; display: grid; gap: 1px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; line-height: 1.35; max-width: 190px; background: var(--surface); cursor: pointer; text-align: left; }
.kf-route__stop:hover { border-color: var(--line-2); background: var(--surface-2); }
.kf-route__stop strong { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kf-route__stop span { color: var(--t3); }

/* ---------------------------------------------------------------- detail pages */

.kf-detail-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.kf-detail-head__title { font-size: 22px; font-weight: 620; letter-spacing: -.02em; line-height: 1.25; }
.kf-detail-head__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; font-size: 13.5px; color: var(--t2); align-items: center; }
.kf-photos-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kf-photos-row .kf-photo { aspect-ratio: 4 / 3; }
.kf-map-box { height: 260px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); isolation: isolate; }
.kf-lines { display: grid; }
.kf-lines__row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: baseline; }
.kf-lines__row:last-child { border-bottom: 0; }
.kf-lines__qty { color: var(--t3); white-space: nowrap; }
.kf-lines__total { font-weight: 560; white-space: nowrap; text-align: right; min-width: 84px; }
.kf-lines__foot { display: flex; justify-content: space-between; padding-top: 12px; font-size: 14px; }
.kf-lines__foot strong { font-size: 16px; }

/* ---------------------------------------------------------------- rep: today */

.kf-targets { display: grid; gap: 14px; }
.kf-progress { display: grid; gap: 6px; }
.kf-progress__row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 13.5px; }
.kf-progress__label { color: var(--t2); font-weight: 500; }
.kf-progress__val strong { font-weight: 600; font-size: 15px; }
.kf-progress__of { color: var(--t3); }
.kf-progress__track { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.kf-progress__bar { display: block; height: 100%; border-radius: 3px; background: var(--bar); }
.kf-progress__bar { background: var(--bar); }
.kf-progress.is-done .kf-progress__bar { background: var(--green-dot); }
.kf-progress__hint { font-size: 12.5px; color: var(--t3); display: inline-flex; align-items: center; gap: 4px; }
.kf-progress.is-done .kf-progress__hint { color: var(--green); }

/* store list (rep) */
.kf-stores { display: grid; }
.kf-store { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); transition: background-color .1s var(--ease); }
.kf-store:first-child { border-top: 0; }
.kf-store:hover { background: #fafbfc; }
.kf-store__name { font-weight: 560; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kf-store__meta { grid-column: 1; font-size: 12.5px; color: var(--t3); display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; }
.kf-store__side { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 8px; color: var(--t3); font-size: 12.5px; text-align: right; }
.kf-store__dist { font-weight: 560; color: var(--t2); }

/* ---------------------------------------------------------------- visit flow */

.kf-visit { max-width: 760px; margin: 0 auto; }
.kf-visit__store { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.kf-visit__name { font-size: 20px; font-weight: 620; letter-spacing: -.02em; line-height: 1.25; }
.kf-visit__meta { font-size: 13px; color: var(--t3); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; }
.kf-visit__timer { text-align: right; flex: none; }
.kf-visit__clock { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.kf-visit__clock-label { font-size: 12px; color: var(--t3); }
.kf-visit__bar { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.kf-visit__bar .kf-steps { flex: 1; margin-bottom: 0; }
.kf-visit__cancel { flex: none; color: var(--red); margin-top: -6px; }
.kf-visit__steplabel { display: none; margin: 0; }
.kf-visit__cancel:hover { background: var(--red-tint); color: var(--red); }
.kf-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin-bottom: 16px; }
.kf-request { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; }
.kf-request__photo { aspect-ratio: 4 / 3; }
.kf-request__photo .kf-photo { height: 100%; }
.kf-request__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.kf-request__decide { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 767px) { .kf-request { grid-template-columns: minmax(0, 1fr); } .kf-request__photo { max-width: 320px; } }
.kf-evidence { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.kf-evidence__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.kf-evidence__title { font-weight: 600; font-size: 14.5px; }
.kf-evidence__text { font-size: 13px; color: var(--t3); }
.kf-gps strong { font-weight: 600; }
.kf-gps .kf-i { flex: none; }
.kf-steps__item { display: grid; gap: 6px; font-size: 11.5px; font-weight: 520; color: var(--t3); text-align: left; background: none; border: 0; padding: 0; cursor: default; }
.kf-steps__bar { height: 4px; border-radius: 2px; background: var(--surface-3); }
.kf-steps__item.is-done { color: var(--t2); }
.kf-steps__item.is-done .kf-steps__bar { background: var(--t1); }
.kf-steps__item.is-current { color: var(--t1); }
.kf-steps__item.is-current .kf-steps__bar { background: var(--krunch); }
.kf-steps__item.is-done { cursor: pointer; }
.kf-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; }
.kf-panel + .kf-panel { margin-top: 12px; }
.kf-panel__title { font-size: 17px; font-weight: 620; letter-spacing: -.015em; }
.kf-panel__text { color: var(--t2); margin-top: 4px; font-size: 14px; }
.kf-panel__body { margin-top: 16px; display: grid; gap: 16px; }
.kf-panel__foot { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.kf-panel__foot .kf-btn--xl { flex: 1; }
.kf-snap { position: relative; display: grid; place-items: center; gap: 8px; width: 100%; min-height: 168px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--surface-2); color: var(--t2); cursor: pointer; text-align: center; padding: 20px; transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.kf-snap:hover { background: var(--surface-3); }
.kf-snap { font: inherit; -webkit-appearance: none; appearance: none; }
.kf-snap__icon { width: 52px; height: 52px; border-radius: 14px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.kf-snap__title { font-weight: 600; color: var(--t1); font-size: 15px; }
.kf-snap__text { font-size: 13px; color: var(--t3); }
.kf-snap--sm { min-height: 0; grid-auto-flow: column; justify-content: center; padding: 12px; }
.kf-snap--sm .kf-snap__icon { width: 34px; height: 34px; border-radius: 9px; }
.kf-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.kf-thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--surface-3); }
.kf-thumb img { width: 100%; height: 100%; object-fit: cover; }
.kf-thumb__state { position: absolute; right: 5px; bottom: 5px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(17, 19, 24, .7); color: #fff; }
.kf-thumb__state.is-sent { background: var(--green-dot); }
.kf-gps { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--t2); padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.kf-gps.is-good { background: var(--green-tint); color: #0b5c3b; }
.kf-gps.is-bad { background: var(--amber-tint); color: #6e4000; }
.kf-choice { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 6px; }
.kf-choice label { position: relative; }
.kf-choice input { position: absolute; opacity: 0; pointer-events: none; }
.kf-choice span { display: grid; place-items: center; height: 44px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 550; font-size: 14px; cursor: pointer; transition: background-color .12s var(--ease), border-color .12s var(--ease), color .12s var(--ease); }
.kf-choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.kf-choice input:focus-visible + span { box-shadow: var(--focus); }
.kf-stepper { justify-self: start; width: max-content; display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; background: var(--surface); }
.kf-stepper button { width: 44px; height: 42px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; color: var(--t1); }
.kf-stepper button:hover { background: var(--surface-2); }
.kf-stepper input[type="number"] { width: 64px; min-height: 42px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; text-align: center; font-weight: 600; box-shadow: none; -moz-appearance: textfield; padding: 0; }
.kf-stepper input::-webkit-outer-spin-button, .kf-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.kf-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kf-chip { height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; font-weight: 520; cursor: pointer; }
.kf-chip.is-on, .kf-chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.kf-entries { display: grid; gap: 8px; }
.kf-entry { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.kf-entry__img { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--t3); }
.kf-entry__img img { width: 100%; height: 100%; object-fit: cover; }
.kf-entry__name { font-weight: 560; font-size: 14px; }
.kf-entry__meta { font-size: 12.5px; color: var(--t3); }
.kf-entry__price { font-weight: 600; font-size: 15px; text-align: right; }
.kf-sheet { position: fixed; inset: auto 0 0 0; z-index: 70; max-height: 92dvh; overflow-y: auto; background: var(--surface); border-radius: 16px 16px 0 0; box-shadow: var(--shadow-pop); padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .28s var(--ease); }
.kf-sheet.is-open { transform: none; }
.kf-sheet__grab { width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 4px auto 12px; }
.kf-sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kf-sheet__title { font-size: 17px; font-weight: 620; }
.kf-sheet-scrim { position: fixed; inset: 0; z-index: 69; background: rgba(17, 19, 24, .35); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
.kf-sheet-scrim.is-on { opacity: 1; pointer-events: auto; }

/* order builder */
.kf-order__tools { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.kf-range { margin-top: 14px; }
.kf-range:first-child { margin-top: 0; }
.kf-range__title { font-size: 12.5px; font-weight: 560; color: var(--t3); padding: 0 2px 6px; }
.kf-prod { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.kf-prod__img { width: 48px; height: 48px; border-radius: 8px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.kf-prod__img img { width: 100%; height: 100%; object-fit: contain; }
.kf-prod__name { font-size: 14px; font-weight: 540; line-height: 1.3; }
.kf-prod__meta { font-size: 12.5px; color: var(--t3); display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; margin-top: 2px; }
.kf-prod__price { color: var(--t1); font-weight: 560; }
.kf-prod__was { text-decoration: line-through; }
.kf-prod__promo { color: var(--krunch-600); font-weight: 560; }
.kf-prod.is-out { opacity: .55; }
.kf-prod .kf-stepper button { width: 38px; height: 38px; }
.kf-prod .kf-stepper input[type="number"] { width: 52px; min-height: 38px; }
.kf-prod__ctl { width: 132px; display: flex; justify-content: flex-end; }
.kf-prod__add { height: 44px; width: 100%; }
.kf-prod .kf-stepper { width: 132px; }
.kf-prod .kf-stepper button { width: 40px; height: 44px; }
.kf-prod .kf-stepper input[type="number"] { width: 50px; min-height: 44px; }
.kf-stock { white-space: nowrap; }
.kf-stock--low { color: var(--amber); }
.kf-stock--out { color: var(--red); }
.kf-cartbar { position: sticky; bottom: calc(var(--tab-h) + 8px); z-index: 20; margin-top: 14px; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; background: var(--ink); color: #fff; border-radius: 12px; box-shadow: var(--shadow-pop); }
.kf-cartbar__sum { flex: 1; min-width: 0; line-height: 1.3; }
.kf-cartbar__total { font-weight: 600; font-size: 16px; }
.kf-cartbar__meta { font-size: 12.5px; color: #b9bec8; }
.kf-cartbar .kf-btn--light { height: 44px; }
.kf-notice { display: flex; gap: 10px; padding: 11px 13px; border-radius: 10px; font-size: 13.5px; align-items: flex-start; }
.kf-notice .kf-i { margin-top: 2px; }
.kf-notice--amber { background: var(--amber-tint); color: #6e4000; }
.kf-notice--blue { background: var(--surface); border: 1px solid var(--line); color: var(--t2); }
.kf-notice--blue .kf-i { color: var(--t3); }
.kf-notice--line { padding: 8px 12px; font-size: 13px; }
.kf-notice--red { background: var(--red-tint); color: #8f1d14; }
.kf-done { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 12px 0 4px; }
.kf-done__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--green-tint); color: var(--green); display: grid; place-items: center; }

/* settings */
.kf-settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.kf-settings__nav { position: sticky; top: calc(var(--top-h) + 16px); display: grid; gap: 2px; }
.kf-settings__nav a { padding: 7px 10px; border-radius: 7px; font-size: 14px; color: var(--t2); }
.kf-settings__nav a:hover { background: var(--surface-3); color: var(--t1); }
.kf-settings__nav a.is-on { background: var(--surface); color: var(--t1); font-weight: 560; box-shadow: 0 1px 2px rgba(17, 19, 24, .08), 0 0 0 .5px rgba(17, 19, 24, .06); }
.kf-setrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.kf-setrow:first-of-type { border-top: 0; padding-top: 4px; }
.kf-setrow__title { font-weight: 560; font-size: 14px; }
.kf-setrow__text { color: var(--t3); font-size: 13px; margin-top: 3px; }
.kf-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.kf-pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 0; }
.kf-log { display: grid; font-size: 13px; }
.kf-log li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.kf-log li:last-child { border-bottom: 0; }
.kf-log time { color: var(--t3); white-space: nowrap; }

/* team */
.kf-inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kf-tinput { width: 104px !important; height: 32px; min-height: 32px !important; padding: 4px 8px !important; font-size: 13px !important; text-align: right; }
.kf-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 75; width: min(440px, 100vw); background: var(--surface); box-shadow: var(--shadow-pop); padding: 20px; overflow-y: auto; transform: translateX(100%); transition: transform .26s var(--ease); }
.kf-drawer.is-open { transform: none; }
.kf-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.kf-drawer__title { font-size: 17px; font-weight: 620; }

/* auth */
.kf-auth { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 20px; padding: 40px 16px; background: radial-gradient(1200px 500px at 50% -10%, #ffffff 0%, var(--ground) 60%); }
.kf-auth__panel { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.kf-auth__brand { margin-bottom: 22px; }
.kf-auth__title { font-size: 21px; font-weight: 620; letter-spacing: -.02em; }
.kf-auth__text { color: var(--t3); margin: 6px 0 20px; }
.kf-auth__form input[type="text"], .kf-auth__form input[type="password"] { min-height: 42px; font-size: 15px; }
.kf-auth__help { font-size: 13px; color: var(--t3); margin-top: 16px; text-align: center; }
.kf-auth__foot { font-size: 12.5px; color: var(--t3); }
.kf-auth__foot a { color: var(--t2); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-2); }

/* footer credit inside the app */
.kf-credit { margin-top: 40px; font-size: 12px; color: var(--t3); text-align: center; }
.kf-credit a { color: var(--t2); }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1240px) {
	.kf-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.kf-kpi:nth-child(4) { border-left: 0; }
	.kf-kpi:nth-child(n+4) { border-top: 1px solid var(--line); }
}

.kf-kpis.kf-kpis--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1240px) {
	.kf-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kf-metric:nth-child(3) { border-left: 0; }
	.kf-metric:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
	.kf-metrics { grid-template-columns: minmax(0, 1fr); }
	.kf-metric { padding: 12px 16px; }
	.kf-metric + .kf-metric { border-left: 0; border-top: 1px solid var(--line); }
	.kf-metric__value { font-size: 20px; }
}
@media (min-width: 768px) and (max-width: 1240px) {
	.kf-kpis--4 .kf-kpi:nth-child(4) { border-left: 1px solid var(--line); }
	.kf-kpis--4 .kf-kpi:nth-child(n+4) { border-top: 0; }
}

@media (max-width: 1099px) {
	.kf-side { transform: translateX(-100%); transition: transform .26s var(--ease); box-shadow: none; width: min(300px, 86vw); background: var(--surface); }
	.kf-side.is-open { transform: none; box-shadow: var(--shadow-pop); }
	.kf-side__close { display: inline-grid; }
	.kf-main { margin-left: 0; }
	.kf-top { padding: 0 16px; }
	.kf-top__menu { display: inline-grid; margin-left: -6px; }
	.kf-top__brand { display: inline-flex; }
	.kf-grid--2-1, .kf-grid--1-2 { grid-template-columns: minmax(0, 1fr); }
	.kf-grid--attn-first .kf-attn-card { order: -1; }
	.kf-live { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(420px, 1fr); height: auto; }
	.kf-live__side { border-right: 0; border-top: 1px solid var(--line); order: 2; }
	.kf-live__side .kf-replist { overflow: visible; }
	.kf-live__map { order: 1; }
	.kf-settings { grid-template-columns: minmax(0, 1fr); }
	.kf-settings__nav { position: static; display: flex; overflow-x: auto; gap: 4px; }
	.kf-settings__nav a { white-space: nowrap; }
}

@media (max-width: 860px) {
	.kf-grid--2, .kf-grid--3 { grid-template-columns: minmax(0, 1fr); }
	.kf-top__search { display: none; }
	.kf-setrow { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.kf-proof { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.kf-proof__step { padding: 0 0 16px; grid-template-columns: 24px minmax(0, 1fr); grid-template-rows: auto; column-gap: 12px; row-gap: 6px; }
	.kf-proof__node { grid-row: 1 / span 2; }
	.kf-proof__body, .kf-proof__thumb { grid-column: 2; }
	.kf-proof__body { grid-template-rows: auto; }
	.kf-proof__thumb--empty { display: none; }
	.kf-proof__step::before { left: 11.5px; right: auto; top: 24px; bottom: 0; width: 1px; height: auto; }
	.kf-proof__thumb { margin-top: 6px; }
}

@media (max-width: 767px) {
	body.kf { font-size: 15px; }
	.kf-content { padding: 16px 16px calc(var(--tab-h) + 32px + env(safe-area-inset-bottom)); }
	.kf-role-manager .kf-content { padding-bottom: 40px; }
	.kf-pagehead { align-items: flex-start; margin-bottom: 16px; }
	.kf-pagehead__title { font-size: 21px; }
	.kf-pagehead__actions { width: 100%; }
	.kf-kpis, .kf-kpis.kf-kpis--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kf-kpi { padding: 14px 16px; }
	.kf-kpi + .kf-kpi { border-left: 0; }
	.kf-kpi:nth-child(even) { border-left: 1px solid var(--line); }
	.kf-kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
	.kf-kpi:nth-child(4) { border-left: 1px solid var(--line); }
	.kf-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
	.kf-kpi__value { font-size: 23px; }
	.kf-card:not(.kf-card--flush) { padding: 16px; }
	.kf-btn--sm { height: 36px; }
	.kf-actions-cell .kf-btn { height: 44px; padding: 0 16px; }
	.kf-card__head--pad { padding: 14px 16px 0; }
	.kf-card__section { margin: 14px -16px 0; padding: 12px 16px 0; }
	.kf-card:not(.kf-card--flush) > .kf-table-wrap { margin: 0 -16px -16px; }
	.kf-prod { grid-template-columns: 48px minmax(0, 1fr); row-gap: 8px; }
	.kf-prod__ctl { grid-column: 2; justify-content: flex-start; }
	.kf input[type="text"], .kf input[type="email"], .kf input[type="password"], .kf input[type="number"], .kf input[type="search"], .kf input[type="tel"], .kf input[type="date"], .kf textarea, .kf select { font-size: 16px; }
	.kf-select select { font-size: 16px; }
	.kf-filters { padding: 12px; }
	.kf-filters .kf-search { min-width: 0; max-width: none; flex-basis: 100%; }
	.kf-filters .kf-select { flex: 1 1 140px; }
	.kf-filters .kf-select select { width: 100%; }
	.kf-filters__end { margin-left: 0; }
	.kf-lb__row { grid-template-columns: 24px 28px minmax(0, 1fr) 70px; }
	.kf-lb__goal { grid-column: 3 / -1; grid-row: 2; }
	.kf-hbars__row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
	.kf-hbars__label { grid-column: 1; }
	.kf-hbars__val { grid-column: 2; grid-row: 1; }
	.kf-hbars__track { grid-column: 1 / -1; }

	/* tables become stacked rows */
	.kf-table--rows, .kf-table--rows thead, .kf-table--rows tbody, .kf-table--rows tr, .kf-table--rows td { display: block; }
	.kf-table--rows thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.kf-table--rows tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
	.kf-table--rows tbody tr:last-child { border-bottom: 0; }
	.kf-table--rows td { padding: 0 !important; border: 0; font-size: 13.5px; }
	.kf-table--rows td:first-child { grid-column: 1; }
	.kf-table--rows td:not(:first-child) { grid-column: 1 / -1; color: var(--t2); text-align: left; }
	.kf-table--rows td.is-key { grid-column: 2; grid-row: 1; text-align: right; color: var(--t1); }
	.kf-table--rows td.is-num:not(.is-key):not(:empty)::before { content: attr(data-label) " "; color: var(--t3); }
	.kf-table--rows td.kf-actions-cell { text-align: left; padding-top: 6px !important; }
	.kf-table--rows td.kf-actions-cell::before { content: none !important; }
	.kf-table--rows td[data-hide-sm] { display: none; }
	.kf-table--rows td[data-label="Proof"] { display: none; }
	/* Visits: store + amount, then one wrapped line of rep · time · duration · location · proof. */
	.kf-table--visits tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
	.kf-table--visits td:first-child { flex: 1 1 60%; min-width: 0; }
	.kf-table--visits td.is-key { order: 0; flex: none; margin-left: auto; }
	.kf-table--visits td:not(:first-child):not(.is-key) { order: 1; flex: none; font-size: 12.5px; }
	.kf-table--visits td[data-label="Proof"] { display: block; }
	.kf-table--visits .kf-status { font-size: 12.5px; }
	.kf-table--visits td.is-key .kf-cell-sub { display: none; }
	.kf-table--rows .kf-cell-sub { white-space: nowrap; }
	.kf-table--stock td:not(:first-child):not(.is-key) { padding-left: 52px !important; }

	/* rep tab bar */
	.kf-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255, 255, 255, .94); border-top: 1px solid var(--line); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
	.kf-tabbar__item { display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 11.5px; font-weight: 520; color: var(--t3); -webkit-user-select: none; user-select: none; background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; }
	.kf-tabbar__item.is-live { color: var(--green); }
	.kf-tabbar__item.is-live .kf-i { color: var(--green); }
	.kf-tabbar__item.is-on { color: var(--t1); }
	.kf-tabbar__item.is-on .kf-i { color: var(--krunch); }
	.kf-role-rep .kf-top__menu { display: none; }
	.kf-role-rep .kf-toasts { bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom)); }
	.kf-toasts { left: 16px; right: 16px; justify-items: stretch; }
	.kf-toast { max-width: none; }
	.kf-shift { height: 32px; padding: 0 11px 0 10px; font-size: 13px; }
	.kf-outbox [data-outbox-text] { display: none; }
	.kf-row2 { grid-template-columns: minmax(0, 1fr); }
	.kf-today__lists { order: -1; }
	.kf-progress__hint { display: none; }
	.kf-progress.is-done .kf-progress__hint { display: inline-flex; }
	.kf-steps__item { font-size: 0; }
	.kf-steps__item.is-current { font-size: 12px; white-space: nowrap; overflow: visible; }
	.kf-steps { margin-bottom: 22px; }
	.kf-visit__bar { flex-wrap: wrap; gap: 0; align-items: center; }
	.kf-visit__bar .kf-steps { flex-basis: 100%; margin-bottom: 8px; }
	.kf-visit__bar .kf-steps__item, .kf-visit__bar .kf-steps__item.is-current { font-size: 0; }
	.kf-visit__steplabel { display: block; flex: 1; font-size: 13px; font-weight: 560; color: var(--t1); }
	.kf-visit__cancel { margin: 0 -8px 0 auto; }
	.kf-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.kf-live { grid-template-rows: auto 460px; }
	.kf-route { left: 8px; right: 8px; bottom: 8px; }
	.kf-detail-head__title { font-size: 19px; }
	.kf-auth__panel { padding: 22px; }
}

@media (max-width: 380px) {
	.kf-logo__word { font-size: 14px; }
	.kf-choice span { font-size: 13px; }
}

@media (hover: none) {
	.kf-btn--secondary:hover, .kf-btn--ghost:hover, .kf-iconbtn:hover, .kf-nav__item:hover, .kf-store:hover, .kf-table tbody tr:hover { background: inherit; }
	.kf-photo:hover img { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.kf *, .kf *::before, .kf *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
	.kf-side, .kf-top, .kf-tabbar, .kf-toasts { display: none !important; }
	.kf-main { margin: 0; }
}

/* ---------------------------------------------------------------- v1.3: Krunch colour
   Colour comes from the Krunch packet: a red field, a white wordmark, a gold crown.
   - Phones and tablets: the app bar is Krunch red (--band #C3141C; white text 5.9:1) and the top of Today,
     the store picker and the visit continue it as a header band. White work cards lift over its edge.
   - Desktop: a white sidebar under a red brand block; the open page is a red tint. The work area stays quiet.
   - Bright Krunch red (#E11D26) is the visit action: Start / Continue visit, the Visit disc in the tab bar. */

:root {
	--band: #c3141c;
	--band-t2: #ffe2e4;
	--krunch-700: #a8111a;
}

/* buttons */
.kf-btn--brand.kf-btn--xl, .kf-btn--brand.kf-btn--lg { box-shadow: 0 1px 1px rgba(150, 10, 16, .25), 0 6px 16px -8px rgba(225, 29, 38, .55), inset 0 1px 0 rgba(255, 255, 255, .14); }
.kf-btn--go { height: 34px; padding: 0 12px 0 10px; font-size: 13.5px; font-weight: 580; background: var(--krunch-tint); color: var(--krunch-600); border-color: #f7cdd0; }
.kf-btn--go:hover { background: #fbdcde; border-color: #f2b5b9; }
.kf-btn--secondary.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* sidebar: white, with the red brand block on top */
.kf-side { background: var(--surface); }
.kf-side__head { background: var(--band); }
.kf-side__head .kf-logo__mark, .kf-top .kf-logo__mark { width: 20px; background: transparent; box-shadow: none; color: #f6c33d; }
.kf-side__head .kf-logo__word { color: #fff; }
.kf-side__head .kf-logo__product { color: var(--band-t2); }
.kf-side__head .kf-iconbtn { color: #fff; }
.kf-side__head .kf-iconbtn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.kf-nav { padding-top: 14px; }
.kf-nav__item.is-on { background: var(--krunch-tint); color: var(--krunch-700); box-shadow: none; }
.kf-nav__item.is-on .kf-i { color: var(--krunch); }
.kf-side__sync:hover { background: var(--surface-2); }

/* page header; on phones and tablets it becomes the red band under the app bar */
.kf-band { margin-bottom: 16px; }
.kf-band__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kf-band__title { font-size: 24px; font-weight: 620; letter-spacing: -.022em; line-height: 1.2; }
.kf-band__sub { margin-top: 4px; color: var(--t3); }
.kf-band__sub a { color: var(--t2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.kf-band__crown { color: var(--gold); }
.kf-band--visit .kf-visit__store { margin-bottom: 0; }

/* rep store rows: open the store, or Start right there */
.kf-stores > li + li { border-top: 1px solid var(--line); }
.kf-storerow { display: flex; align-items: center; }
.kf-storerow .kf-store { flex: 1; min-width: 0; }
.kf-storerow__go { flex: none; margin-right: 16px; }

/* Today: the day card */
.kf-daycard { display: grid; gap: 16px; margin-bottom: 16px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.kf-daycard__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.kf-daycard__label { font-size: 13px; font-weight: 500; color: var(--t2); }
.kf-daycard__value { margin: 2px 0 8px; font-size: 13.5px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kf-daycard__value strong { font-size: 20px; font-weight: 620; letter-spacing: -.02em; color: var(--t1); }
.kf-daycard .kf-progress__track { display: block; }
.kf-daycard__stat.is-done .kf-progress__bar { background: var(--green-dot); }
.kf-daycard__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.kf-daycard__actions .kf-btn { flex: 1 1 100%; }
.kf-daycard__visit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.kf-daycard__visittext { flex: 1 1 180px; min-width: 0; display: grid; line-height: 1.35; }
.kf-daycard__visittext strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kf-daycard__visittext span { font-size: 13px; color: var(--t3); }
.kf-daycard__visit .kf-btn { flex: 1 1 100%; }
.kf-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green-dot); flex: none; animation: kf-pulse 2.4s var(--ease) infinite; }
.kf-visit__clock-label .kf-live-dot { margin-right: 6px; vertical-align: 1px; }
@media (min-width: 900px) {
	.kf-daycard { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 48px; padding: 20px 24px; }
	.kf-daycard__stats { max-width: 560px; }
	.kf-daycard__actions .kf-btn, .kf-daycard__visit .kf-btn { flex: 0 0 auto; padding: 0 24px; }
	.kf-daycard__visit { padding-top: 0; border-top: 0; }
}

/* visit: store picker and start screen */
.kf-pick { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.kf-pick .kf-search { flex: 1 1 220px; }
.kf-pick .kf-search input[type="search"] { height: 44px; min-height: 44px; }
.kf-panel--start .kf-panel__title { font-size: 20px; }
.kf-panel--start .kf-panel__body:has(> [hidden]:only-child) { display: none; }

@media (max-width: 1099px) {
	/* the red app bar */
	.kf-top { background: var(--band); border-bottom-color: var(--band); -webkit-backdrop-filter: none; backdrop-filter: none; color: #fff; }
	.kf-top .kf-iconbtn { color: #fff; }
	.kf-top .kf-iconbtn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
	.kf-top .kf-logo__word { color: #fff; }
	.kf-top .kf-outbox, .kf-top .kf-outbox.is-offline { color: #fff; }
	.kf-top .kf-shift { border-color: transparent; }

	/* the band continues it */
	.kf-band { margin: -24px -24px 16px; padding: 6px 24px 22px; background: var(--band); color: #fff; }
	.kf-band__sub { color: var(--band-t2); }
	.kf-band__sub a { color: #fff; text-decoration-color: rgba(255, 255, 255, .5); }
	.kf-band__crown { color: #f6c33d; }
	.kf-band .kf-back { color: var(--band-t2); }
	.kf-band .kf-back:hover { color: #fff; }
	.kf-band .kf-visit__meta, .kf-band .kf-status, .kf-band .kf-visit__clock-label { color: var(--band-t2); }
	.kf-band:has(+ .kf-lift) { padding-bottom: 66px; }
	.kf-lift { position: relative; margin-top: -60px !important; border-color: transparent; box-shadow: 0 1px 2px rgba(17, 19, 24, .08), 0 12px 28px -16px rgba(17, 19, 24, .4); }
}
@media (max-width: 767px) {
	.kf-band { margin: -16px -16px 16px; padding: 4px 16px 20px; }
	.kf-band__title { font-size: 22px; }
	.kf-daycard { padding: 16px; }
	.kf-pick .kf-btn { flex: 1 1 100%; }
	.kf-storerow__go { margin-right: 12px; height: 38px; }
	.kf-dock { flex-wrap: nowrap; }
	.kf-dock__main { flex: 1; height: 52px; font-size: 16px; border-radius: 10px; }
	.kf-dock__call { flex: none; width: 52px; height: 52px; padding: 0; border-radius: 10px; }
	.kf-dock__call span { display: none; }

	/* the raised visit button in the middle of the tab bar */
	.kf-tabbar__go { color: var(--t1); }
	.kf-tabbar__disc { position: relative; display: grid; place-items: center; width: 52px; height: 52px; margin-top: -24px; border-radius: 50%; background: var(--krunch); box-shadow: 0 0 0 4px #fff, 0 8px 18px -6px rgba(225, 29, 38, .6); transition: transform .15s var(--ease), background-color .15s var(--ease); }
	.kf-tabbar__go .kf-i, .kf-tabbar__go.is-on .kf-i { color: #fff; }
	.kf-tabbar__go:active .kf-tabbar__disc { transform: scale(.94); background: var(--krunch-600); }
	.kf-tabbar__go.is-live .kf-tabbar__disc::after { content: ""; position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--green-dot); box-shadow: 0 0 0 2px var(--krunch); }
}
@media (prefers-reduced-motion: reduce) {
	.kf-live-dot { animation: none; }
}

/* ---------------------------------------------------------------- camera (live capture only, no gallery) */
.kf-cam { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; }
.kf-cam[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.kf-cam::backdrop { background: #000; }
.kf-cam__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px 18px; }
.kf-cam__title { font-size: 15px; font-weight: 600; }
.kf-cam__close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.kf-cam__close .kf-i { width: 20px; height: 20px; }
.kf-cam__view { position: relative; min-height: 0; overflow: hidden; }
.kf-cam__view video, .kf-cam__view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.kf-cam__msg { position: absolute; left: 24px; right: 24px; top: 50%; transform: translateY(-50%); max-width: 420px; margin: 0 auto; text-align: center; font-size: 15px; line-height: 1.55; color: #e4e6ea; }
.kf-cam__bar { display: grid; place-items: center; min-height: 116px; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); }
.kf-cam__shutter { width: 74px; height: 74px; padding: 5px; border: 4px solid #fff; border-radius: 50%; background: transparent; cursor: pointer; }
.kf-cam__shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform .12s var(--ease); }
.kf-cam__shutter:active span { transform: scale(.86); }
.kf-cam__shutter:disabled { opacity: .35; cursor: default; }
.kf-cam__review { display: flex; gap: 10px; width: 100%; max-width: 480px; }
.kf-cam__review .kf-btn { flex: 1; }
.kf-btn--onphoto { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .22); }
.kf-btn--onphoto:hover { background: rgba(255, 255, 255, .22); }

/* ---------------------------------------------------------------- 1.4: users, targets, assignments, profile */
.kf-drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.kf-drawer__title { margin: 0; font-size: 18px; font-weight: 620; letter-spacing: -.01em; }
.kf-drawer .kf-card__sub { margin: 2px 0 0; }
.kf-form__actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.kf-rowactions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.kf-rowactions form { margin: 0; }
.kf-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--t1); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.kf-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12px; font-weight: 560; color: var(--t2); vertical-align: middle; }

.kf-bulklogin { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; border-color: #f2c4c6; background: #fff8f8; }
.kf-bulklogin__text { flex: 1 1 360px; min-width: 0; }
.kf-bulklogin__text .kf-card__sub { margin: 4px 0 0; }
.kf-bulklogin__form { display: flex; gap: 8px; flex: 0 1 460px; }
.kf-bulklogin__form .kf-pass { flex: 1; }
@media (max-width: 640px) { .kf-bulklogin__form { flex-direction: column; flex-basis: 100%; } }

.kf-minibar { display: grid; gap: 5px; min-width: 120px; }
.kf-minibar__text { font-size: 13.5px; white-space: nowrap; }
.kf-minibar__track { display: block; height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
.kf-minibar__bar { display: block; height: 100%; border-radius: 2px; background: var(--bar); }
.kf-minibar__bar.is-done { background: var(--green-dot); }

.kf-target-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.kf-target-grid > .kf-card { margin: 0; }
.kf-target__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.kf-target__title { margin: 8px 0 2px; font-size: 16px; font-weight: 620; }
.kf-target__pct { font-size: 24px; font-weight: 650; letter-spacing: -.02em; }

.kf-assign { margin-top: 14px; }
.kf-assign__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 12px 14px; align-items: end; }
.kf-assign__go { grid-column: -2 / -1; display: flex; justify-content: flex-end; }
.kf-combo { position: relative; }
.kf-combo__list { 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(--line-2); border-radius: 8px; box-shadow: var(--shadow-pop); max-height: 280px; overflow-y: auto; }
.kf-combo__opt { display: grid; gap: 1px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.kf-combo__opt:hover, .kf-combo__opt.is-on { background: var(--surface-2); }
.kf-combo__name { font-size: 14px; font-weight: 540; }
.kf-combo__sub { font-size: 12.5px; color: var(--t3); }
.kf-combo__empty { padding: 10px; font-size: 13.5px; color: var(--t3); }

.kf-profile { max-width: 640px; }
.kf-profile__head { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.kf-profile__name { margin: 0; font-size: 17px; font-weight: 620; }
.kf-profile__foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

@media (max-width: 1099px) {
	.kf-assign__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kf-assign__store { grid-column: 1 / -1; }
	.kf-assign__go { grid-column: 1 / -1; justify-content: stretch; }
	.kf-assign__go .kf-btn { width: 100%; }
}
@media (max-width: 640px) {
	.kf-assign__grid { grid-template-columns: minmax(0, 1fr); }
	.kf-rowactions { justify-content: flex-start; }
	.kf-drawer .kf-row2 { grid-template-columns: minmax(0, 1fr); }
}
