/* Lead Follow-up – calling app */
:root {
	--accent: #0f766e;
	--on-accent: #fff;
	--bg: #f3f4f6;
	--card: #fff;
	--ink: #111827;
	--ink2: #374151;
	--muted: #6b7280;
	--line: #e5e7eb;
	--soft: #f9fafb;
	--red: #b91c1c;
	--red-bg: #fef2f2;
	--amber: #b45309;
	--amber-bg: #fffbeb;
	--green: #15803d;
	--wa: #128c4b;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
	--series-1: #2a78d6;
	--series-2: #eb6834;
	--safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
	background: var(--bg);
	color: var(--ink);
	font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Inter, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.boot { padding: 40vh 0 0; text-align: center; color: var(--muted); }
.hidden { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.ic-sm { width: 16px; height: 16px; }

/* ---------- shell ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.top {
	position: sticky; top: 0; z-index: 30;
	display: flex; align-items: center; gap: 12px;
	padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top));
	background: var(--accent); color: var(--on-accent);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.logo {
	width: 36px; height: 36px; border-radius: 10px; flex: none;
	display: grid; place-items: center; font-weight: 800; font-size: 14px;
	background: rgba(255, 255, 255, .18); color: inherit;
}
.brand b { display: block; font-size: 16px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { display: block; opacity: .8; font-size: 12px; }
.top-actions { display: flex; gap: 4px; }
.icon-btn {
	width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent;
	display: grid; place-items: center; color: inherit;
}
.icon-btn:hover { background: rgba(127, 127, 127, .14); }
.topnav { display: none; gap: 4px; }
.topnav a {
	display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px;
	text-decoration: none; font-weight: 600; font-size: 14px; opacity: .85;
}
.topnav a.on, .topnav a:hover { background: rgba(255, 255, 255, .16); opacity: 1; }

.main { flex: 1; display: block; padding-bottom: calc(70px + var(--safe-b)); }
.pane-list, .pane-detail { min-width: 0; }
body.route-detail .pane-list { display: none; }
body.route-list .pane-detail { display: none; }
body.route-detail .top { display: none; }

.bottom {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
	display: grid; grid-template-columns: repeat(4, 1fr);
	background: #fff; border-top: 1px solid var(--line);
	padding-bottom: var(--safe-b);
}
.bottom a {
	display: flex; flex-direction: column; align-items: center; gap: 2px;
	padding: 8px 0 9px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none;
	position: relative;
}
.bottom a.on { color: var(--accent); }
.bottom a .dot {
	position: absolute; top: 4px; left: calc(50% + 6px);
	min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
	background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}
.bottom a.add .ic { width: 26px; height: 26px; }
.bottom a.add span.circle {
	width: 44px; height: 44px; margin-top: -20px; border-radius: 50%;
	background: var(--accent); color: var(--on-accent); display: grid; place-items: center;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .18); border: 3px solid #fff;
}

/* ---------- list pane ---------- */
.list-head { padding: 12px 14px 4px; }
.search {
	display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line);
	border-radius: 12px; padding: 0 10px; margin-bottom: 10px;
}
.search input { flex: 1; border: 0; outline: 0; padding: 11px 0; background: transparent; min-width: 0; }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 8px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
	flex: none; display: flex; align-items: center; gap: 6px;
	padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
	font-weight: 600; font-size: 14px; color: var(--ink2); white-space: nowrap;
}
.tab .n { min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--soft); font-size: 12px; line-height: 20px; text-align: center; border: 1px solid var(--line); }
.tab.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab.on .n { background: rgba(255, 255, 255, .18); border-color: transparent; }
.tab.warn .n { background: var(--red); border-color: var(--red); color: #fff; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 0 10px; }
.filters select, .field select, .field input, .field textarea, .fu textarea, .fu input, .fu select {
	width: 100%; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; padding: 10px 11px; outline: 0;
}
.filters select { padding: 8px 10px; font-size: 14px; }
select:focus, input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.banner {
	display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 10px 12px;
	border-radius: 12px; background: var(--amber-bg); color: var(--amber); border: 1px solid #fde68a; font-size: 14px;
}
.banner button { margin-left: auto; border: 0; background: transparent; font-weight: 700; color: inherit; text-decoration: underline; padding: 0; }
.view-title { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 2px 0 10px; }
.view-title button { border: 0; background: transparent; color: var(--accent); font-weight: 600; padding: 0; }

.list { padding: 0 14px 14px; display: grid; gap: 10px; }
.card {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.lead {
	display: flex; gap: 10px; padding: 12px 12px 12px 14px; cursor: pointer; position: relative; overflow: hidden;
}
.lead::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: transparent; }
.lead.is-late::before { background: var(--red); }
.lead.is-today::before { background: #f59e0b; }
.lead.is-sel { outline: 2px solid var(--accent); outline-offset: -2px; }
.lead:hover { border-color: #cbd5e1; }
.lead .body { flex: 1; min-width: 0; }
.lead .row1 { display: flex; align-items: center; gap: 8px; }
.lead .nm { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead .sub { color: var(--muted); font-size: 13px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead .rem { color: var(--ink2); font-size: 14px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lead .rem b { font-weight: 600; }
.lead .when { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--ink2); display: flex; align-items: center; gap: 5px; }
.lead .when.late { color: var(--red); }
.lead .acts { display: flex; flex-direction: column; gap: 8px; }
.round {
	width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; text-decoration: none;
}
.round.call { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); }
.round.wa { background: #e7f6ee; color: var(--wa); }
.pill {
	flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px;
	font-size: 12px; font-weight: 600; white-space: nowrap;
	background: color-mix(in srgb, var(--c, #6b7280) 12%, #fff); color: color-mix(in srgb, var(--c, #6b7280) 85%, #000);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c, #6b7280); }
.pri { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 1px 6px; border-radius: 6px; }
.pri.hot { background: #fee2e2; color: #991b1b; }
.pri.cold { background: #e0f2fe; color: #075985; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.more { display: block; margin: 4px auto 0; }
.skel { height: 96px; border-radius: var(--radius); background: linear-gradient(90deg, #eceef1 25%, #f6f7f8 50%, #eceef1 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- detail pane ---------- */
.d-head {
	position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px;
	padding: 8px 8px; padding-top: max(8px, env(safe-area-inset-top));
	background: #fff; border-bottom: 1px solid var(--line);
}
.d-head .t { flex: 1; min-width: 0; }
.d-head .t b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-head .t small { color: var(--muted); }
.d-body { padding: 12px 14px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 760px; }
.hero { padding: 14px; }
.hero .chips-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.next-box {
	display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 10px;
	background: var(--soft); border: 1px solid var(--line); font-size: 14px;
}
.next-box.late { background: var(--red-bg); border-color: #fecaca; color: var(--red); }
.next-box .lt { margin-left: auto; font-weight: 700; white-space: nowrap; }
.big-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
	font-weight: 700; text-decoration: none; font-size: 15px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.call { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.danger { color: var(--red); border-color: #fecaca; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.block { width: 100%; }

.fu { padding: 14px; scroll-margin-top: 70px; }
.fu.flash { animation: flash 1.6s ease-out 1; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: var(--shadow); } }
.card h3 { margin: 0 0 10px; font-size: 16px; }
.lbl { font-size: 13px; font-weight: 700; color: var(--ink2); margin: 12px 0 6px; }
.lbl:first-of-type { margin-top: 0; }
.prompt { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--ink); font-weight: 600; margin-bottom: 12px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	padding: 8px 12px; border-radius: 10px; border: 1px solid #d1d5db; background: #fff;
	font-size: 14px; font-weight: 600; color: var(--ink2); display: inline-flex; align-items: center; gap: 6px;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, #9ca3af); display: inline-block; }
.chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.chips.small .chip { padding: 6px 10px; font-size: 13px; }
.fu textarea { min-height: 76px; resize: vertical; margin-top: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.row2 label, .field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink2); margin-bottom: 5px; }
.fu .save { margin-top: 14px; }
.dt-row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.dt-row input { flex: 1; }
.dt-row .hint { font-size: 13px; color: var(--muted); }

.info { padding: 6px 14px; }
.info dl { display: grid; grid-template-columns: 120px 1fr; margin: 0; }
.info dt, .info dd { padding: 9px 0; border-bottom: 1px solid #f0f1f3; margin: 0; font-size: 14px; }
.info dt { color: var(--muted); }
.info dd { word-break: break-word; }
.info dl > :nth-last-child(-n+2) { border-bottom: 0; }
.info-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 2px; }
.info-head h3 { margin: 0; }

.timeline { padding: 14px; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 14px 22px; }
.tl li::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl .dt { position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--c, #9ca3af); box-shadow: 0 0 0 3px #fff; }
.tl .h { font-weight: 700; font-size: 14px; }
.tl .m { color: var(--muted); font-size: 12px; }
.tl .r { margin-top: 4px; font-size: 14px; white-space: pre-wrap; background: var(--soft); border-radius: 8px; padding: 7px 9px; }
.tl .x { margin-top: 4px; font-size: 12px; color: var(--ink2); display: flex; flex-wrap: wrap; gap: 6px; }
.tl li.sys .h { font-weight: 500; color: var(--ink2); }

/* forms */
.form { padding: 14px; display: grid; gap: 14px; }
.field .with-btn { display: flex; gap: 8px; }
.field .with-btn input { flex: 1; }
.req { color: var(--red); }
.dup { padding: 10px 12px; border-radius: 10px; background: var(--amber-bg); border: 1px solid #fde68a; font-size: 14px; color: #78350f; }
.dup a { font-weight: 700; color: inherit; }
.seg { display: inline-grid; grid-auto-flow: column; border: 1px solid #d1d5db; border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 8px 14px; font-weight: 600; font-size: 14px; color: var(--ink2); }
.seg button + button { border-left: 1px solid #d1d5db; }
.seg button.on { background: var(--ink); color: #fff; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* reports */
.rep { padding: 12px 14px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 900px; }
.rep > *, .d-body > *, .menu > * { min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { padding: 12px 14px; }
.kpi .v { font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.red .v { color: var(--red); }
.sec { padding: 14px; }
.sec h3 { display: flex; align-items: center; gap: 8px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 6px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 6px; border-bottom: 1px solid #f0f1f3; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; }
.tbl td.late { color: var(--red); font-weight: 700; }
.scroll-x { overflow-x: auto; }
.hbar { display: grid; grid-template-columns: 130px 1fr 40px; gap: 8px; align-items: center; font-size: 14px; padding: 4px 0; }
.hbar .tr { display: block; height: 12px; border-radius: 4px; background: #f1f2f4; overflow: hidden; }
.hbar .fl { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--c, #6b7280); }
.hbar .nv { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--ink2); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .grid { stroke: #eef0f2; stroke-width: 1; }
.chart .hit { fill: transparent; }
.chart .hit:hover, .chart .hit.on { fill: rgba(17, 24, 39, .05); }
.tip {
	position: absolute; pointer-events: none; z-index: 5; background: #111827; color: #fff; border-radius: 8px;
	padding: 7px 9px; font-size: 12px; line-height: 1.4; white-space: nowrap; transform: translate(-50%, -100%);
}
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

/* menu */
.menu { padding: 12px 14px 20px; display: grid; gap: 12px; max-width: 640px; }
.menu .card { padding: 14px; }
.menu-links a, .menu-links button {
	display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 4px; border: 0; background: none;
	border-bottom: 1px solid #f0f1f3; text-decoration: none; font-weight: 600; text-align: left;
}
.menu-links > :last-child { border-bottom: 0; }
.muted { color: var(--muted); font-size: 13px; }

/* sheet + toast */
.sheet-bg { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + var(--safe-b)); max-height: 85vh; overflow: auto; }
.sheet h3 { margin: 0 0 4px; }
.sheet .tpl { display: block; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; text-decoration: none; }
.sheet .tpl b { display: block; margin-bottom: 2px; }
.sheet .tpl span { color: var(--ink2); font-size: 14px; }
.toast {
	position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%) translateY(20px);
	background: #111827; color: #fff; padding: 11px 16px; border-radius: 12px; z-index: 80; font-size: 14px; font-weight: 600;
	opacity: 0; pointer-events: none; transition: .2s; width: max-content; max-width: calc(100vw - 28px); display: flex; gap: 12px; align-items: center;
}
.toast.show { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.toast.err { background: var(--red); }
.toast button { border: 0; background: rgba(255, 255, 255, .18); color: #fff; border-radius: 8px; padding: 5px 10px; font-weight: 700; }

.placeholder { display: grid; place-items: center; text-align: center; color: var(--muted); min-height: 60vh; padding: 20px; }
.placeholder .ic { width: 44px; height: 44px; color: #cbd5e1; }

/* ---------- desktop ---------- */
@media (min-width: 960px) {
	.topnav { display: flex; }
	.bottom { display: none; }
	.main { display: grid; grid-template-columns: 420px minmax(0, 1fr); padding-bottom: 0; height: calc(100vh - 60px); }
	.pane-list { border-right: 1px solid var(--line); overflow-y: auto; }
	.pane-detail { overflow-y: auto; }
	body.route-detail .pane-list, body.route-list .pane-detail { display: block; }
	body.route-detail .top { display: flex; }
	.d-head { top: 0; }
	.d-head .back { display: none; }
	.toast { bottom: 24px; }
	.kpis { grid-template-columns: repeat(4, 1fr); }
	.sheet-bg { align-items: center; }
	.sheet { border-radius: 18px; }
	.lfu-embed .main { height: calc(100vh - 60px); }
}
@media (min-width: 1300px) {
	.main { grid-template-columns: 460px minmax(0, 1fr); }
}
@media (max-width: 380px) {
	.info dl { grid-template-columns: 100px 1fr; }
	.hbar { grid-template-columns: 105px 1fr 34px; }
}

/* ---------- admin panel ---------- */
.bottom.five { grid-template-columns: repeat(5, 1fr); }
.adm-tabs { display: flex; gap: 6px; padding: 10px 14px 0; overflow-x: auto; scrollbar-width: none; }
.adm-tabs a {
	flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px;
	border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink2);
}
.adm-tabs a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.adm { padding: 12px 14px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 980px; }
.adm > * { min-width: 0; }
.adm-top { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.staff { padding: 14px; }
.staff.off { opacity: .7; }
.st-head { display: flex; gap: 12px; align-items: center; }
.av {
	width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800;
	background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accent);
}
.st-name { min-width: 0; }
.st-name > b { font-size: 16px; }
.role { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; vertical-align: 2px; background: #eef2ff; color: #3730a3; }
.role.r-admin { background: #fef3c7; color: #92400e; }
.role.r-lfu_caller { background: #ecfeff; color: #155e75; }
.role.r-off { background: #fee2e2; color: #991b1b; }
.st-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stt { background: var(--soft); border: 1px solid #eef0f2; border-radius: 10px; padding: 8px 10px; }
.stt b { display: block; font-size: 20px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stt span { font-size: 12px; color: var(--muted); font-weight: 600; }
.stt.red b { color: var(--red); }
.st-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.toggle { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); font-size: 14px; }
.toggle input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.cred { margin: 12px 0; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 4px 12px; }
.cred div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0f1f3; font-size: 14px; }
.cred div:last-child { border-bottom: 0; }
.cred span { color: var(--muted); }
.cred b { word-break: break-all; text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.log-filters { padding-bottom: 0; gap: 10px; }
.log-filters input[type=date] { width: 100%; border: 1px solid #d1d5db; border-radius: 10px; padding: 8px 10px; background: #fff; }
.tbl.sum tr[data-log-user] { cursor: pointer; }
.tbl.sum tr[data-log-user]:hover td, .tbl.sum tr.on td { background: color-mix(in srgb, var(--accent) 8%, #fff); }
.log-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.log-list { display: grid; gap: 8px; }
.log-item { padding: 11px 13px; }
.li-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; }
.li-out { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.li-out i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.li-who { margin-top: 5px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.li-who a { font-weight: 700; color: var(--accent); }
.li-rem { margin-top: 6px; font-size: 14px; background: var(--soft); border-radius: 8px; padding: 7px 9px; white-space: pre-wrap; }
.li-x { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; }
@media (min-width: 700px) { .st-stats { grid-template-columns: repeat(6, 1fr); } }

/* ---------- staff login page ---------- */
.login-page { min-height: 100vh; background: linear-gradient(160deg, var(--accent) 0 34%, var(--bg) 34%); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px 14px; }
.login-card { width: 100%; max-width: 400px; padding: 22px; display: grid; gap: 14px; box-shadow: 0 10px 30px rgba(16, 24, 40, .12); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.login-brand .logo { background: var(--accent); color: var(--on-accent); width: 44px; height: 44px; font-size: 16px; }
.login-brand b { display: block; font-size: 18px; }
.login-brand small { color: var(--muted); }
.login-card .field input { width: 100%; border: 1px solid #d1d5db; border-radius: 10px; padding: 11px 12px; font-size: 16px; background: #fff; outline: 0; }
.login-card .field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink2); margin-bottom: 5px; }
.login-err { background: var(--red-bg); color: var(--red); border: 1px solid #fecaca; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.remember { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink2); }
.remember input { width: 18px; height: 18px; accent-color: var(--accent); }
.sum-head { font-size: 15px; }
.sum-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.sum-card { text-align: left; padding: 12px; width: 100%; font: inherit; color: inherit; cursor: pointer; }
.sum-card.on { outline: 2px solid var(--accent); outline-offset: -2px; }
.sc-name { display: flex; align-items: center; gap: 10px; }
.sc-name .av { width: 34px; height: 34px; font-size: 13px; }
.sc-tot { margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 600; }
.sc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.mn { background: var(--soft); border: 1px solid #eef0f2; border-radius: 8px; padding: 6px 7px; font-size: 11px; color: var(--muted); font-weight: 600; line-height: 1.25; }
.mn b { display: block; font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.mn.red b { color: var(--red); }
.mn.green b { color: var(--green); }
@media (min-width: 1100px) { .sum-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- logo (Settings → Logo) ---------- */
.logo-img { object-fit: contain; background: #fff; padding: 3px; }
.login-logo { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; background: #fff; border: 1px solid var(--line); padding: 4px; flex: none; }
