:root{--bg: #0f1115;--surface: #171a21;--surface-2: #1e222b;--border: #2a2f3a;--text: #e6e9ef;--muted: #8b93a5;--accent: #4f9cf9;--good: #3ecf8e;--warn: #f0a24b;--bad: #f26d6d;--radius: 10px;--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif}@media (prefers-color-scheme: light){:root{--bg: #f6f7f9;--surface: #ffffff;--surface-2: #f0f2f5;--border: #dfe3ea;--text: #16191f;--muted: #666f80}}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);font-size:14px;line-height:1.5}button{font:inherit;color:inherit;cursor:pointer;border:1px solid var(--border);background:var(--surface-2);border-radius:8px;padding:7px 12px;transition:background .12s ease,border-color .12s ease}button:hover:not(:disabled){border-color:var(--accent)}button:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}.btn-primary:hover:not(:disabled){filter:brightness(1.08)}input,select,textarea{font:inherit;color:inherit;background:var(--bg);border:1px solid var(--border);border-radius:7px;padding:6px 9px}input:focus,select:focus,textarea:focus{outline:2px solid color-mix(in srgb,var(--accent) 45%,transparent);outline-offset:-1px}.app{max-width:1400px;margin:0 auto;padding:20px 24px 60px}.sortbar{display:none}header.top{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:18px}header.top h1{font-size:19px;margin:0;letter-spacing:-.01em}header.top .spacer{flex:1}.runline{display:flex;gap:14px;align-items:center;flex-wrap:wrap;font-size:12.5px;color:var(--muted);margin-bottom:16px;min-height:20px}.pill{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:99px;border:1px solid var(--border);background:var(--surface);font-size:12px}.dot{width:7px;height:7px;border-radius:50%;flex:none}.dot.ok{background:var(--good)}.dot.bad{background:var(--bad)}.dot.run{background:var(--warn);animation:pulse 1s ease-in-out infinite}@keyframes pulse{50%{opacity:.25}}.filters{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:16px}.filters-row{padding:14px 16px;display:flex;gap:18px;flex-wrap:wrap;align-items:flex-end}.filters-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:11px 16px;border-top:1px solid var(--border);background:var(--surface-2);border-radius:0 0 var(--radius) var(--radius)}.filters-actions .spacer{flex:1}.hint{font-size:12px}.hint.ok{color:var(--good)}.hint.warn{color:var(--warn)}.field{display:flex;flex-direction:column;gap:5px}.field>label{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}.field input[type=number]{width:110px}.checks{display:flex;gap:12px;align-items:center;padding-bottom:6px}.checks label{display:inline-flex;gap:6px;align-items:center;cursor:pointer;white-space:nowrap}header.top .checks .sub{margin-left:2px}.tablewrap{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow-x:auto}table{border-collapse:collapse;width:100%;min-width:900px}th,td{text-align:left;padding:9px 12px;border-bottom:1px solid var(--border);vertical-align:middle}th{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:600;cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;position:sticky;top:0;background:var(--surface);z-index:1}th:hover{color:var(--text)}tbody tr{cursor:pointer}tbody tr:hover{background:var(--surface-2)}tbody tr:last-child td{border-bottom:none}tbody tr.inactive{opacity:.45}.thumb{width:76px;height:54px;object-fit:cover;border-radius:6px;background:var(--surface-2);display:block}.thumb.empty{display:grid;place-items:center;color:var(--muted);font-size:10px}.price{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}.num{font-variant-numeric:tabular-nums;white-space:nowrap}.sub{color:var(--muted);font-size:12px}.tag{display:inline-block;padding:1px 7px;border-radius:5px;font-size:11px;font-weight:600;border:1px solid var(--border);white-space:nowrap}.tag.new{color:var(--good);border-color:color-mix(in srgb,var(--good) 40%,transparent)}.tag.drop{color:var(--warn);border-color:color-mix(in srgb,var(--warn) 40%,transparent)}.tag.sold{color:var(--bad);border-color:color-mix(in srgb,var(--bad) 45%,transparent)}.tag.muted{color:var(--muted)}select.status{padding:4px 7px;font-size:12px}select.status[data-s=interested]{border-color:var(--accent);color:var(--accent)}select.status[data-s=contacted],select.status[data-s=replied]{border-color:var(--warn);color:var(--warn)}select.status[data-s=visit],select.status[data-s=negotiating]{border-color:var(--good);color:var(--good)}select.status[data-s=unavailable],select.status[data-s=discarded]{color:var(--muted)}.empty-state{padding:48px 20px;text-align:center;color:var(--muted)}.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;z-index:10}.drawer{position:fixed;top:0;right:0;bottom:0;width:min(560px,100vw);background:var(--surface);border-left:1px solid var(--border);z-index:11;overflow-y:auto;padding:20px 22px 40px}.drawer h2{margin:0 0 2px;font-size:17px}.drawer .close{position:absolute;top:14px;right:16px}.gallery{display:flex;gap:8px;overflow-x:auto;margin:14px 0;padding-bottom:4px}.gallery img{height:180px;border-radius:8px;object-fit:cover;flex:none;background:var(--surface-2)}.kv{display:grid;grid-template-columns:120px 1fr;gap:6px 14px;margin:14px 0}.kv dt{color:var(--muted);font-size:12.5px}.kv dd{margin:0;font-size:13px}.drawer textarea{width:100%;min-height:80px;resize:vertical}.drawer .actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}a{color:var(--accent)}.toasts{position:fixed;right:20px;bottom:20px;z-index:20;display:flex;flex-direction:column;gap:8px;align-items:flex-end;pointer-events:none}.toast{display:flex;align-items:center;gap:8px;padding:9px 14px;border-radius:8px;font-size:13px;font-weight:500;color:var(--text);background:var(--surface);border:1px solid var(--border);box-shadow:0 6px 20px #00000047;animation:toast-in .16s ease-out}.toast.ok{border-color:color-mix(in srgb,var(--good) 50%,var(--border))}.toast.ok span{color:var(--good)}.toast.error{border-color:color-mix(in srgb,var(--bad) 55%,var(--border))}.toast.error span{color:var(--bad)}@keyframes toast-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}@media (prefers-reduced-motion: reduce){.toast{animation:none}}.segmented{display:inline-flex;padding:2px;gap:2px;background:var(--surface-2);border:1px solid var(--border);border-radius:9px}.segmented .seg{border:none;background:transparent;color:var(--muted);border-radius:7px;padding:5px 12px;font-size:13px;font-weight:500;display:inline-flex;align-items:center;gap:7px}.segmented .seg:hover{color:var(--text)}.segmented .seg.active{background:var(--surface);color:var(--text);box-shadow:0 1px 2px #0003}.seg-count{font-variant-numeric:tabular-nums;font-size:11.5px;padding:1px 6px;border-radius:99px;background:var(--bg);color:var(--muted)}.segmented .seg.active .seg-count{color:var(--text)}.gate{min-height:100vh;display:grid;place-items:center;padding:24px}.gate-card{width:100%;max-width:340px;display:flex;flex-direction:column;gap:12px;padding:28px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius)}.gate-card h1{margin:0;font-size:19px}.gate-sub{margin:-8px 0 4px;color:var(--muted);font-size:13px}.gate-card input{width:100%}.gate-error{margin:0;color:var(--bad);font-size:13px}@media (max-width: 1000px){.app{padding:16px 16px 48px}.filters-row{gap:14px}.field input[type=number]{width:100%;min-width:96px}}@media (max-width: 860px){.app{padding:12px 12px 40px}header.top{gap:10px}header.top h1{font-size:17px}header.top .spacer{display:none}.segmented{width:100%}.segmented .seg{flex:1;justify-content:center}.filters-row{flex-direction:column;align-items:stretch;gap:12px}.field input,.field select{width:100%}.checks{flex-wrap:wrap;gap:10px 14px;padding-bottom:0}.filters-actions{flex-wrap:wrap}.filters-actions .spacer{display:none}.filters-actions button{flex:1}.hint{width:100%}.sortbar{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--border)}.sortbar label{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}.sortbar select{flex:1}.tablewrap{overflow-x:visible;background:transparent;border:none;border-radius:0}table{min-width:0}thead{display:none}table,tbody,tr,td{display:block}.sortbar{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:12px}tbody tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-areas:"photo photo photo" "price price price" "m2    eurm2 rooms" "town  town  town" "addr  addr  addr" "src   src   status";gap:8px 10px;padding:12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:12px}tbody tr:last-child{margin-bottom:0}tbody tr:hover{background:var(--surface)}.empty-state{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius)}tbody td{border:none;padding:0;min-width:0}td[data-col=photo]{grid-area:photo}td[data-col=price]{grid-area:price}td[data-col=m2]{grid-area:m2}td[data-col=eurm2]{grid-area:eurm2}td[data-col=rooms]{grid-area:rooms}td[data-col=town]{grid-area:town}td[data-col=addr]{grid-area:addr}td[data-col=src]{grid-area:src}td[data-col=status]{grid-area:status}td[data-label]:before{content:attr(data-label);display:block;font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin-bottom:1px}.thumb,.thumb.empty{width:100%;height:180px;border-radius:8px}td[data-col=price] .price{font-size:19px}td[data-col=status] select.status{width:100%}td[data-col=src]{align-self:end}}@media (max-width: 380px){tbody tr{grid-template-areas:"photo photo photo" "price price price" "m2    eurm2 rooms" "town  town  town" "addr  addr  addr" "src   src   src" "status status status"}}@media (max-width: 640px){.drawer{width:100vw;padding:16px 14px 32px}.drawer h2{font-size:16px;padding-right:36px}.gallery img{height:140px}.kv{grid-template-columns:104px 1fr}.drawer .actions button{width:100%}.drawer .actions a{flex:1}}
