/* Radar panel. Own light theme: warm paper background, teal accent, amber highlights. */
:root {
	color-scheme: light;
	--bg: #f5f4f0;
	--bg-2: #fbfaf8;
	--surface: #ffffff;
	--surface-2: #faf9f6;
	--tint: #f1efea;
	--tint-2: #e7e4dd;
	--ink: #1c1b18;
	--ink-2: #45423b;
	--ink-3: #77736a;
	--ink-4: #a39f95;
	--line: #e7e4dd;
	--line-2: #d5d1c7;
	--accent: #0f766e;
	--accent-2: #0d9488;
	--accent-soft: #e6f5f2;
	--accent-ink: #0b5c56;
	--amber: #d97706;
	--ok: #15803d;
	--warn: #b45309;
	--bad: #b91c1c;
	--r-s: 8px;
	--r: 10px;
	--r-l: 14px;
	--shadow: 0 8px 28px rgba(28, 27, 24, .12), 0 0 0 1px rgba(28, 27, 24, .06);
	--shadow-s: 0 1px 2px rgba(28, 27, 24, .06), 0 0 0 1px var(--line);
	--rail: 76px;
	--top: 56px;
	--font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, "SF Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 .6em; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
::selection { background: rgba(13, 148, 136, .22); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--tint-2); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- boot, login ---------- */
.boot { display: grid; place-items: center; height: 100vh; color: var(--ink-3); gap: 10px; grid-auto-flow: column; }
.boot__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(13, 148, 136, .5); animation: pulse 1.4s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 14px rgba(13, 148, 136, 0); } }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(50% 45% at 75% 20%, rgba(13, 148, 136, .10), transparent 70%), radial-gradient(40% 40% at 15% 85%, rgba(217, 119, 6, .08), transparent 70%), var(--bg); }
.login__card { width: min(380px, 100%); padding: 28px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow); }
.login__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login__brand img { width: 40px; height: 40px; }
.login__brand b { display: block; font-size: 19px; }
.login form { display: grid; gap: 14px; }
.login .err { color: var(--bad); min-height: 1.2em; margin: 0; }

/* ---------- shell ---------- */
.app { min-height: 100vh; }
.shell { display: grid; grid-template-columns: var(--rail) 1fr; grid-template-rows: var(--top) 1fr; height: 100vh; }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 0 16px 0 0; background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.brand { width: var(--rail); display: grid; place-items: center; height: 100%; flex: none; }
.brand img { width: 34px; height: 34px; }
.top__niche { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top__niche select { max-width: 340px; font-weight: 600; }
.top__dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.top__search { flex: 1; max-width: 420px; margin-left: auto; position: relative; }
.top__search input[type=search] { width: 100%; padding-left: 36px; }
.top__search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.top__user { display: flex; align-items: center; gap: 8px; }
.live { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 16px; border: 1px solid #bfe3d9; background: var(--accent-soft); color: var(--accent-ink); font-size: 12.5px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 0 rgba(16, 185, 129, .5); animation: pulse 1.8s infinite; }
.live.busy i { background: var(--amber); box-shadow: 0 0 0 0 rgba(217, 119, 6, .5); }
.live.off { background: var(--tint); border-color: var(--line-2); color: var(--ink-3); }
.live.off i { background: var(--ink-4); animation: none; }
.live b { background: var(--amber); color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 11.5px; }
@media (max-width: 860px) { .live span { display: none; } .live { padding: 0 9px; } }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 650; font-size: 13px; border: 0; cursor: pointer; }
.rail { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; border-right: 1px solid var(--line); background: var(--bg-2); overflow-y: auto; }
.rail a { display: grid; justify-items: center; gap: 4px; padding: 9px 4px 8px; border-radius: var(--r); color: var(--ink-3); font-size: 11.5px; font-weight: 600; text-decoration: none; position: relative; }
.rail a svg { width: 22px; height: 22px; }
.rail a:hover { color: var(--ink); background: var(--tint); }
.rail a.on { color: var(--accent-ink); background: var(--accent-soft); }
.rail a .badge-n { position: absolute; top: 4px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--amber); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.main { position: relative; overflow: auto; min-width: 0; }
.page { padding: 22px 24px 40px; max-width: 1500px; }
.page__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page__head h1 { margin-right: auto; }
.page__lead { color: var(--ink-3); margin: -10px 0 18px; max-width: 78ch; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r-s); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--tint); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--tint); color: var(--ink); }
.btn--danger { color: var(--bad); border-color: #f1c4c4; background: #fff; }
.btn--danger:hover { background: #fdf0f0; }
.btn--ok { color: var(--ok); border-color: #bfe3cb; background: #fff; }
.btn--ok:hover { background: #effaf3; }
.btn--sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn--xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.btn--icon { width: 36px; padding: 0; }
.btn--sm.btn--icon { width: 30px; }
input[type=text], input[type=search], input[type=password], input[type=number], input[type=date], input[type=email], input[type=url], input[type=tel], select, textarea {
	height: 36px; padding: 0 11px; border-radius: var(--r-s); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); min-width: 0; }
textarea { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(13, 148, 136, .15); }
input::placeholder, textarea::placeholder { color: var(--ink-4); }
select { padding-right: 30px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2377736a' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
label.field { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
label.field small { color: var(--ink-3); font-weight: 400; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink-2); user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 10px; background: var(--tint-2); position: relative; cursor: pointer; transition: background .15s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--tint); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--ink-3); padding: 5px 10px; border-radius: 7px; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-s); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 12.5px; cursor: pointer; font-weight: 550; }
.chip:hover { border-color: var(--ink-4); color: var(--ink); }
.chip.on { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-2); }
.chip i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chip b { font-weight: 650; color: var(--ink-3); }
.chip.on b { color: var(--accent-ink); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stack { display: grid; gap: 12px; }
.stack-s { display: grid; gap: 6px; }

/* ---------- cards, tables, badges ---------- */
.card { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-s); padding: 18px; min-width: 0; }
.card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card__head h2, .card__head h3 { margin-right: auto; }
.table-wrap { overflow: auto; border-radius: var(--r); box-shadow: var(--shadow-s); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { position: sticky; top: 0; z-index: 1; text-align: left; font-weight: 600; font-size: 12px; color: var(--ink-3); background: var(--surface-2); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tbody tr { cursor: pointer; }
.t tbody tr:hover td { background: #fbfaf6; }
.t tbody tr.sel td { background: var(--accent-soft); }
.t .num { text-align: right; font-family: var(--mono); font-feature-settings: "tnum"; white-space: nowrap; }
.t .title { font-weight: 600; color: var(--ink); max-width: 420px; }
.t .title small { display: block; font-weight: 400; color: var(--ink-3); margin-top: 1px; }
.t .thumb { width: 52px; height: 38px; border-radius: 6px; object-fit: cover; background: var(--tint); display: block; }
.t .thumb--empty { display: grid; place-items: center; color: var(--ink-4); }
.t td.check-cell, .t th.check-cell { width: 34px; padding-right: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; background: var(--tint); color: var(--ink-2); white-space: nowrap; }
.badge i { width: 7px; height: 7px; border-radius: 50%; }
.st-nowy { --c: #64748b; }
.st-do_kontaktu { --c: #2563eb; }
.st-w_kontakcie { --c: #0891b2; }
.st-zainteresowany { --c: #d97706; }
.st-pozyskany { --c: #16a34a; }
.st-odrzucony { --c: #9ca3af; }
.st-nie_kontaktowac { --c: #dc2626; }
.badge[class*="st-"] { background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 78%, #000); }
.badge[class*="st-"] i { background: var(--c); }
.score { display: inline-grid; place-items: center; min-width: 34px; height: 22px; padding: 0 6px; border-radius: 6px; font: 600 12px/1 var(--mono); }
.score.hi { background: #dcfce7; color: #166534; }
.score.mid { background: #fef3c7; color: #92400e; }
.score.lo { background: #fee2e2; color: #991b1b; }
.tel { font-family: var(--mono); white-space: nowrap; color: var(--ink); }
.pill-src { font-size: 11.5px; color: var(--ink-2); background: var(--tint); padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.empty { padding: 48px 20px; text-align: center; color: var(--ink-3); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 12px 2px; color: var(--ink-3); font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar .grow { flex: 1; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* ---------- map view ---------- */
.mapview { position: absolute; inset: 0; }
.mapview .map { position: absolute; inset: 0; background: #f4f1ea; }
.mapview .maplibregl-ctrl-group { box-shadow: var(--shadow); }
.maplibregl-ctrl-attrib { font-size: 10.5px; }
.panel { position: absolute; z-index: 5; background: rgba(255, 255, 255, .97); border-radius: var(--r-l); box-shadow: var(--shadow); }
.filters { top: 14px; left: 14px; bottom: 14px; width: 310px; display: flex; flex-direction: column; overflow: hidden; transition: transform .2s; }
.filters.closed { transform: translateX(calc(-100% - 20px)); }
.filters__head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; border-bottom: 1px solid var(--line); }
.filters__head h2 { margin-right: auto; font-size: 15px; }
.filters__body { overflow-y: auto; padding: 12px 14px 16px; display: grid; gap: 16px; }
.filters__foot { padding: 12px 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.fgroup { display: grid; gap: 8px; }
.fgroup > b { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.count-line { font-size: 13px; color: var(--ink-2); }
.count-line b { color: var(--ink); font-family: var(--mono); }
.filters-toggle { position: absolute; top: 14px; left: 14px; z-index: 4; box-shadow: var(--shadow); }
.layers { top: 14px; right: 58px; width: 260px; padding: 12px 14px; display: grid; gap: 10px; }
.layers b { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.layers-toggle { display: none; position: absolute; z-index: 4; right: 12px; bottom: 30px; box-shadow: var(--shadow); }
.legend { left: 340px; bottom: 26px; padding: 10px 12px; max-width: min(560px, calc(100% - 400px)); display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.filters.closed ~ .legend { left: 14px; }
.map-tip { position: absolute; z-index: 6; pointer-events: none; background: var(--ink); color: #fff; padding: 6px 9px; border-radius: 8px; font-size: 12.5px; box-shadow: var(--shadow); transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; }
.map-tip .muted { color: #cfcbc2; }
.pick-mode .map canvas { cursor: crosshair !important; }
.pick-hint { position: absolute; z-index: 7; top: 14px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 20px; font-weight: 600; box-shadow: var(--shadow); }
.maplibregl-popup-content { border-radius: 10px; box-shadow: var(--shadow); padding: 10px 12px; font: 13px/1.4 var(--font); color: var(--ink); }
.maplibregl-popup-close-button { color: var(--ink-3); font-size: 18px; padding: 0 6px; }

/* ---------- drawer, modal, toast ---------- */
.drawer { position: fixed; top: var(--top); right: 0; bottom: 0; width: min(460px, 100%); z-index: 30; background: var(--surface); box-shadow: -16px 0 40px rgba(28, 27, 24, .12), -1px 0 0 var(--line); display: flex; flex-direction: column; transform: translateX(105%); transition: transform .22s ease; }
.drawer.open { transform: none; }
.drawer__head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.drawer__head .grow { flex: 1; min-width: 0; font-weight: 600; color: var(--ink-3); font-size: 13px; }
.drawer__body { overflow-y: auto; padding: 0 0 30px; }
.drawer__sec { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer__sec h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 10px; font-weight: 700; }
.gallery { position: relative; background: #1c1b18; aspect-ratio: 16 / 10; overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery__nav { position: absolute; inset: auto 10px 10px auto; display: flex; gap: 6px; }
.gallery__n { position: absolute; left: 10px; bottom: 10px; background: rgba(0, 0, 0, .6); color: #fff; padding: 3px 8px; border-radius: 10px; font-size: 12px; }
.dtitle { font-size: 18px; line-height: 1.3; margin-bottom: 8px; }
.price { font: 650 20px/1.2 var(--mono); color: var(--ink); }
.price small { font: 500 13px var(--font); color: var(--ink-3); margin-left: 4px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fact { font-size: 12.5px; background: var(--tint); padding: 3px 9px; border-radius: 6px; color: var(--ink-2); }
.fact--tag { background: var(--accent-soft); color: var(--accent-ink); }
.contact-big { display: grid; gap: 8px; }
.contact-line { display: flex; align-items: center; gap: 8px; }
.contact-line a.call { font: 600 17px var(--mono); color: var(--ink); }
.contact-line .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.desc { white-space: pre-wrap; color: var(--ink-2); font-size: 13.5px; max-height: 220px; overflow: hidden; position: relative; }
.desc.open { max-height: none; }
.desc:not(.open)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(rgba(255, 255, 255, 0), var(--surface)); }
.why { font-size: 12px; color: var(--ink-3); }
.why span { display: inline-block; margin: 2px 6px 0 0; }
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(28, 27, 24, .45); display: grid; place-items: center; padding: 16px; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 22px; }
.modal--wide { width: min(980px, 100%); }
.modal h2 { margin-bottom: 14px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); max-width: 380px; font-size: 13.5px; border-left: 4px solid var(--accent-2); animation: tin .2s ease; }
.toast.err { border-left-color: #f87171; }
.toast.ok { border-left-color: #4ade80; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
.menu { position: absolute; top: calc(var(--top) - 6px); right: 12px; z-index: 40; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px; min-width: 220px; display: grid; }
.menu button, .menu a { text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 8px; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--tint); color: var(--ink); }
.menu .who { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 13px; color: var(--ink-3); }
.menu .who b { display: block; color: var(--ink); font-size: 14px; }

/* ---------- dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-s); padding: 14px 16px; text-decoration: none; color: inherit; display: block; border-top: 3px solid var(--accent-2); }
a.kpi:hover { box-shadow: var(--shadow); text-decoration: none; }
.kpi b { display: block; font: 650 26px/1.15 var(--mono); color: var(--ink); margin: 4px 0 2px; }
.kpi span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.kpi small { color: var(--ink-3); font-size: 12px; }
.dash { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.dash > .card { grid-column: span 6; }
.dash > .card.w4 { grid-column: span 4; }
.dash > .card.w8 { grid-column: span 8; }
.dash > .card.w12 { grid-column: span 12; }
.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: 150px 1fr 54px; gap: 10px; align-items: center; font-size: 13px; }
.bar__l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.bar__t { height: 10px; border-radius: 5px; background: var(--tint); overflow: hidden; }
.bar__t i { display: block; height: 100%; border-radius: 5px; background: var(--accent-2); }
.bar__v { text-align: right; font-family: var(--mono); color: var(--ink); }
.cols { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.cols div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.cols i { width: 100%; max-width: 34px; background: var(--accent-2); border-radius: 5px 5px 2px 2px; min-height: 2px; }
.cols span { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.cols b { font: 600 11.5px var(--mono); color: var(--ink-2); }
.joblist { display: grid; gap: 2px; }
.job { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.job:last-child { border: 0; }
.js { font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 10px; text-align: center; }
.js-queued { background: var(--tint); color: var(--ink-2); }
.js-running { background: var(--accent-soft); color: var(--accent-ink); animation: blink 1.6s infinite; }
.js-done { background: #dcfce7; color: #166534; }
.js-error { background: #fee2e2; color: #991b1b; }
.js-blocked { background: #fef3c7; color: #92400e; }
.js-cancelled { background: var(--tint); color: var(--ink-3); }
@keyframes blink { 50% { opacity: .6; } }

/* ---------- contact page ---------- */
.lead { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.lead__head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.lead__head h1 { font-size: 24px; }
.pipeline { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.pipeline button { border: 1px solid var(--line-2); cursor: pointer; padding: 7px 12px; border-radius: 18px; font-size: 13px; font-weight: 600; background: var(--surface); color: var(--ink-3); }
.pipeline button:hover { color: var(--ink); }
.pipeline button.on { background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 80%, #000); border-color: color-mix(in srgb, var(--c) 55%, #fff); }
.minimap { height: 220px; border-radius: var(--r); overflow: hidden; background: #f4f1ea; }
.notes { display: grid; gap: 10px; }
.note { padding: 10px 12px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.note--system { background: transparent; border: 0; padding: 4px 12px; color: var(--ink-3); font-size: 12.5px; }
.note__meta { display: flex; gap: 8px; font-size: 12px; color: var(--ink-3); margin-bottom: 4px; align-items: center; }
.note__body { white-space: pre-wrap; }
.mini-list { display: grid; gap: 8px; }
.mini-item { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 8px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); cursor: pointer; }
.mini-item:hover { border-color: var(--line-2); }
.mini-item img, .mini-item .ph { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; background: var(--tint); }
.mini-item b { display: block; font-weight: 600; font-size: 13.5px; }
.mini-item span { font-size: 12.5px; color: var(--ink-3); }

/* ---------- collecting ---------- */
.searches td.what { font-weight: 600; }
.searches td.what small { display: block; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.list-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.list-layout > aside { position: sticky; top: 12px; max-height: calc(100vh - var(--top) - 40px); overflow-y: auto; }
.list-filters-toggle { display: none; }
.progress-line { font-size: 12.5px; color: var(--accent-ink); }
.log { background: #1c1b18; border-radius: var(--r); padding: 12px; font: 12px/1.55 var(--mono); color: #e7e4dd; white-space: pre-wrap; max-height: 360px; overflow: auto; }
.niche-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.niche-card { border-left: 4px solid var(--c, var(--accent)); }
.niche-card.off { opacity: .65; }
.editor-types { display: grid; grid-template-columns: 130px 150px 50px 1fr 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.code { font: 12.5px/1.5 var(--mono); width: 100%; min-height: 380px; }
.bookmarklet { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 650; box-shadow: var(--shadow); cursor: grab; text-decoration: none; }
.bookmarklet:hover { text-decoration: none; background: var(--accent-ink); }
.steps { counter-reset: s; display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
	.list-layout { grid-template-columns: 1fr; }
	.list-layout > aside { position: static; max-height: none; display: none; }
	.list-layout.show-filters > aside { display: block; }
	.list-filters-toggle { display: inline-flex; }
}
@media (max-width: 1100px) {
	.lead { grid-template-columns: 1fr; }
	.dash > .card, .dash > .card.w4, .dash > .card.w8 { grid-column: span 12; }
	.legend { display: none; }
}
@media (max-width: 860px) {
	:root { --top: 52px; }
	.shell { grid-template-columns: 1fr; grid-template-rows: var(--top) 1fr 62px; }
	.brand { width: 56px; }
	.rail { grid-row: 3; flex-direction: row; justify-content: space-around; padding: 4px; border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; }
	.rail a { padding: 6px 6px; font-size: 10.5px; min-width: 56px; }
	.rail a svg { width: 20px; height: 20px; }
	.rail .hide-m { display: none; }
	.top { gap: 8px; padding-right: 10px; }
	.top__search { display: none; }
	.top__niche select { max-width: 52vw; }
	.page { padding: 16px; }
	.filters { top: 8px; left: 8px; right: 8px; bottom: 8px; width: auto; }
	.layers { top: auto; bottom: 74px; right: 12px; left: auto; width: min(260px, calc(100% - 24px)); }
	.layers.closed { display: none; }
	.layers-toggle { display: inline-flex; }
	.filters-toggle { top: 10px; left: 10px; }
	.drawer { top: 0; z-index: 45; }
	.grid2, .grid3 { grid-template-columns: 1fr; }
	.kv { grid-template-columns: 110px 1fr; }
	.bar { grid-template-columns: 110px 1fr 44px; }
	.editor-types { grid-template-columns: 1fr 1fr; }
	.hide-m { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
