Initial portal commit: landing + 9 AI-powered apps
Apps: - dwg-rooms: extract room numbers from DWG/DXF - dwg-counting: count symbols in PDF drawings (OpenCV template matching) - contract-check: review PDF contracts against a checklist (Claude vision + Tesseract OCR fallback) - email-drafter: bullet notes → polished Czech/English business emails - invoice-extractor: PDF/image invoice → structured data → Excel - translator: Czech-first translator across 19 languages with tone control - vv-check: find inconsistent unit prices across VV sheets in one workbook - vv-compare: diff original vs new VV files (changes / added / removed) - feature-request: portal users submit ideas + sample files Infrastructure: - LiteLLM gateway with per-app virtual keys + budgets - Langfuse observability - Geist font, shared theme, cross-subdomain back link + theme sync via cookie/URL - Caddy reverse proxy on *.klas.chat
This commit is contained in:
130
vv-compare/static/app.js
Normal file
130
vv-compare/static/app.js
Normal file
@@ -0,0 +1,130 @@
|
||||
// VV compare frontend
|
||||
(() => {
|
||||
const $ = (id) => document.getElementById(id);
|
||||
const sections = {
|
||||
upload: $("s-upload"),
|
||||
processing: $("s-processing"),
|
||||
result: $("s-result"),
|
||||
};
|
||||
const show = (n) => {
|
||||
for (const [k, el] of Object.entries(sections)) el.classList.toggle("hidden", k !== n);
|
||||
};
|
||||
|
||||
let state = { jobId: null, result: null, origFile: null, newFile: null };
|
||||
|
||||
function attachDrop(zoneId, inputId, textId, which) {
|
||||
const zone = $(zoneId);
|
||||
const input = $(inputId);
|
||||
const text = $(textId);
|
||||
zone.addEventListener("click", () => input.click());
|
||||
input.addEventListener("change", (e) => {
|
||||
if (e.target.files[0]) setFile(which, e.target.files[0], zone, text);
|
||||
});
|
||||
["dragenter", "dragover"].forEach((ev) =>
|
||||
zone.addEventListener(ev, (e) => { e.preventDefault(); zone.classList.add("drag-over"); }));
|
||||
["dragleave", "drop"].forEach((ev) =>
|
||||
zone.addEventListener(ev, (e) => { e.preventDefault(); zone.classList.remove("drag-over"); }));
|
||||
zone.addEventListener("drop", (e) => {
|
||||
if (e.dataTransfer.files[0]) setFile(which, e.dataTransfer.files[0], zone, text);
|
||||
});
|
||||
}
|
||||
|
||||
function setFile(which, file, zone, textEl) {
|
||||
if (which === "orig") state.origFile = file;
|
||||
else state.newFile = file;
|
||||
zone.classList.add("has-file");
|
||||
const size = file.size > 1024 * 1024
|
||||
? `${(file.size / 1024 / 1024).toFixed(1)} MB`
|
||||
: `${(file.size / 1024).toFixed(0)} kB`;
|
||||
textEl.innerHTML = `<strong>${escapeHtml(file.name)}</strong><br><span style="color:var(--text-tertiary);font-size:12px">${size}</span>`;
|
||||
updateRunBtn();
|
||||
}
|
||||
|
||||
attachDrop("drop-original", "orig-input", "orig-text", "orig");
|
||||
attachDrop("drop-new", "new-input", "new-text", "new");
|
||||
|
||||
function updateRunBtn() {
|
||||
const btn = $("compare-btn");
|
||||
const hint = $("compare-hint");
|
||||
if (!state.origFile && !state.newFile) {
|
||||
btn.disabled = true; hint.textContent = "Nahrajte oba soubory.";
|
||||
} else if (!state.origFile) {
|
||||
btn.disabled = true; hint.textContent = "Chybí původní VV.";
|
||||
} else if (!state.newFile) {
|
||||
btn.disabled = true; hint.textContent = "Chybí nový VV.";
|
||||
} else {
|
||||
btn.disabled = false; hint.textContent = "Připraveno k porovnání.";
|
||||
}
|
||||
}
|
||||
|
||||
$("compare-btn").addEventListener("click", async () => {
|
||||
if (!state.origFile || !state.newFile) return;
|
||||
show("processing");
|
||||
try {
|
||||
const fd = new FormData();
|
||||
fd.append("original", state.origFile);
|
||||
fd.append("new", state.newFile);
|
||||
const r = await fetch("/api/compare", { method: "POST", body: fd });
|
||||
if (!r.ok) throw new Error((await r.json()).detail || r.statusText);
|
||||
const json = await r.json();
|
||||
state.jobId = json.job_id;
|
||||
state.result = json.result;
|
||||
renderResult();
|
||||
show("result");
|
||||
} catch (err) {
|
||||
alert("Chyba: " + err.message);
|
||||
show("upload");
|
||||
}
|
||||
});
|
||||
|
||||
function renderResult() {
|
||||
const r = state.result;
|
||||
const c = r.changes.length, a = r.added.length, d = r.removed.length;
|
||||
$("cnt-changed").textContent = c;
|
||||
$("cnt-added").textContent = a;
|
||||
$("cnt-removed").textContent = d;
|
||||
$("results-meta").textContent =
|
||||
`Porovnání ${r.per_sheet.length} listů — ${c + a + d} celkových rozdílů.`;
|
||||
|
||||
const psHtml = r.per_sheet.map((ps) => `
|
||||
<tr>
|
||||
<td>${escapeHtml(ps.sheet)}</td>
|
||||
<td>${escapeHtml(ps.hala || "")}</td>
|
||||
<td class="num">${ps.orig_count}</td>
|
||||
<td class="num">${ps.new_count}</td>
|
||||
<td class="num"><span class="pill ${ps.changes ? "changed" : "zero"}">${ps.changes}</span></td>
|
||||
<td class="num"><span class="pill ${ps.added ? "added" : "zero"}">${ps.added}</span></td>
|
||||
<td class="num"><span class="pill ${ps.removed ? "removed" : "zero"}">${ps.removed}</span></td>
|
||||
</tr>`).join("");
|
||||
$("per-sheet").innerHTML = r.per_sheet.length ? `
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>List</th><th>Hala</th>
|
||||
<th>Pol. původní</th><th>Pol. nový</th>
|
||||
<th>Změněné</th><th>Přidané</th><th>Odebrané</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>${psHtml}</tbody>
|
||||
</table>` : `<p style="color:var(--text-tertiary)">Nepodařilo se najít listy VV v žádném ze souborů.</p>`;
|
||||
}
|
||||
|
||||
$("download-btn").addEventListener("click", () => {
|
||||
if (state.jobId) window.location.href = `/api/report/${state.jobId}`;
|
||||
});
|
||||
$("restart-btn").addEventListener("click", () => {
|
||||
state = { jobId: null, result: null, origFile: null, newFile: null };
|
||||
$("orig-input").value = ""; $("new-input").value = "";
|
||||
$("drop-original").classList.remove("has-file");
|
||||
$("drop-new").classList.remove("has-file");
|
||||
$("orig-text").textContent = "Přetáhněte soubor sem nebo klikněte";
|
||||
$("new-text").textContent = "Přetáhněte soubor sem nebo klikněte";
|
||||
updateRunBtn();
|
||||
show("upload");
|
||||
});
|
||||
|
||||
function escapeHtml(s) {
|
||||
return String(s ?? "").replace(/[&<>"']/g, (c) =>
|
||||
({"&":"&","<":"<",">":">",'"':""","'":"'"}[c]));
|
||||
}
|
||||
})();
|
||||
149
vv-compare/static/extra.css
Normal file
149
vv-compare/static/extra.css
Normal file
@@ -0,0 +1,149 @@
|
||||
/* VV compare specific */
|
||||
|
||||
.processing-sub {
|
||||
font-size: 13px;
|
||||
color: var(--text-tertiary);
|
||||
margin: 8px auto 0;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.dual-drop {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
gap: 14px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.drop-half { flex: 1; display: flex; flex-direction: column; gap: 6px; }
|
||||
.drop-label {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
color: var(--text-tertiary);
|
||||
padding-left: 4px;
|
||||
}
|
||||
.drop-zone-mini {
|
||||
flex: 1;
|
||||
border: 1.5px dashed var(--border-strong);
|
||||
border-radius: var(--radius-lg);
|
||||
background: var(--bg-secondary);
|
||||
padding: 32px 18px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: border-color .15s, background .15s;
|
||||
min-height: 140px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.drop-zone-mini:hover { border-color: var(--primary); }
|
||||
.drop-zone-mini.drag-over { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, var(--bg-secondary)); }
|
||||
.drop-zone-mini.has-file {
|
||||
border-style: solid;
|
||||
border-color: var(--primary);
|
||||
background: color-mix(in srgb, var(--primary) 4%, var(--bg-secondary));
|
||||
}
|
||||
.drop-arrow {
|
||||
align-self: center;
|
||||
font-size: 22px;
|
||||
color: var(--text-quaternary);
|
||||
font-weight: 200;
|
||||
padding: 0 4px;
|
||||
}
|
||||
@media (max-width: 640px) {
|
||||
.dual-drop { flex-direction: column; }
|
||||
.drop-arrow { transform: rotate(90deg); padding: 4px 0; }
|
||||
}
|
||||
|
||||
.run-row {
|
||||
display: flex; align-items: center; gap: 14px;
|
||||
padding-top: 16px; border-top: 1px solid var(--border-default);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.btn-lg { padding: 12px 26px; font-size: 14px; font-weight: 600; }
|
||||
.run-hint { font-size: 13px; color: var(--text-tertiary); }
|
||||
|
||||
.recap-cards {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 14px;
|
||||
margin: 16px 0 22px;
|
||||
}
|
||||
.recap-card {
|
||||
background: var(--card);
|
||||
border: 1px solid var(--border-default);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 18px 22px;
|
||||
border-left: 4px solid #94a3b8;
|
||||
}
|
||||
.recap-card.recap-changed { border-left-color: #f59e0b; }
|
||||
.recap-card.recap-added { border-left-color: #22c55e; }
|
||||
.recap-card.recap-removed { border-left-color: #ef4444; }
|
||||
.recap-label {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
color: var(--text-tertiary);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.recap-value {
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
font-variant-numeric: tabular-nums;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.per-sheet {
|
||||
background: var(--card);
|
||||
border: 1px solid var(--border-default);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 16px 18px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.per-sheet table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
||||
.per-sheet th, .per-sheet td {
|
||||
padding: 8px 10px;
|
||||
border-bottom: 1px solid var(--border-default);
|
||||
text-align: left;
|
||||
}
|
||||
.per-sheet th {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--text-tertiary);
|
||||
background: var(--bg-secondary);
|
||||
}
|
||||
.per-sheet td.num { text-align: right; font-variant-numeric: tabular-nums; }
|
||||
.per-sheet .pill {
|
||||
display: inline-block;
|
||||
padding: 1px 7px;
|
||||
border-radius: 999px;
|
||||
font-weight: 600;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.per-sheet .pill.changed { background: rgba(245,158,11,0.15); color: #b45309; }
|
||||
.per-sheet .pill.added { background: rgba(34,197,94,0.15); color: #15803d; }
|
||||
.per-sheet .pill.removed { background: rgba(239,68,68,0.15); color: #b91c1c; }
|
||||
.per-sheet .pill.zero { background: var(--bg-tertiary); color: var(--text-quaternary); }
|
||||
|
||||
/* Back link */
|
||||
.back-link {
|
||||
display: inline-flex; align-items: center; gap: 6px;
|
||||
padding: 6px 12px 6px 10px; border-radius: 8px;
|
||||
font-size: 13px; font-weight: 500; color: var(--text-tertiary);
|
||||
text-decoration: none; border: 0.5px solid var(--border-default);
|
||||
background: var(--bg-primary); flex-shrink: 0;
|
||||
transition: color .15s, border-color .15s, background .15s;
|
||||
}
|
||||
.back-link:hover {
|
||||
color: var(--primary); border-color: var(--primary);
|
||||
background: color-mix(in srgb, var(--primary) 6%, var(--bg-primary));
|
||||
}
|
||||
.back-link svg { opacity: 0.8; }
|
||||
@media (max-width: 640px) {
|
||||
.back-link span { display: none; }
|
||||
.back-link { padding: 6px; }
|
||||
}
|
||||
131
vv-compare/static/index.html
Normal file
131
vv-compare/static/index.html
Normal file
@@ -0,0 +1,131 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="cs">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Porovnání VV | Colsys AI</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/static/styles.css">
|
||||
<link rel="stylesheet" href="/static/extra.css">
|
||||
<script>
|
||||
(function () {
|
||||
var t = null;
|
||||
try { var p = new URL(window.location.href).searchParams.get("theme");
|
||||
if (p === "dark" || p === "light") t = p; } catch (e) {}
|
||||
if (!t) { try { t = localStorage.getItem("app_theme"); } catch (e) {} }
|
||||
if (!t) { var m = document.cookie.match(/(?:^|;\s*)portal_theme=([^;]+)/);
|
||||
if (m) t = decodeURIComponent(m[1]); }
|
||||
if (t === "dark" || t === "light") {
|
||||
document.documentElement.classList.add(t);
|
||||
try { localStorage.setItem("app_theme", t); } catch (e) {}
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header class="header">
|
||||
<div class="header-inner">
|
||||
<a href="https://ai.klas.chat" class="brand">
|
||||
<span class="brand-icon">C</span>
|
||||
<span class="brand-name">Colsys <span class="brand-ai">AI</span></span>
|
||||
</a>
|
||||
<span class="header-crumb">Porovnání VV</span>
|
||||
<a href="https://ai.klas.chat" class="back-link" title="Zpět na portál">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="m15 18-6-6 6-6"/>
|
||||
</svg>
|
||||
<span>Zpět na portál</span>
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="main">
|
||||
|
||||
<section id="s-upload">
|
||||
<div class="section-intro">
|
||||
<h1 class="section-title">Porovnání výkazu výměr (původní vs nový)</h1>
|
||||
<p class="section-desc">
|
||||
Nahrajte dva soubory MaR VV — původní a nový. Aplikace najde
|
||||
změny ve výměrách, MJ, přidané a odebrané položky a vytvoří
|
||||
souhrnný Excel report.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="dual-drop">
|
||||
<div class="drop-half">
|
||||
<div class="drop-label">PŮVODNÍ VV</div>
|
||||
<div class="drop-zone-mini" id="drop-original">
|
||||
<p class="drop-text" id="orig-text">Přetáhněte soubor sem nebo klikněte</p>
|
||||
<input type="file" id="orig-input" accept=".xlsx,.xlsm" style="display:none">
|
||||
</div>
|
||||
</div>
|
||||
<div class="drop-arrow">→</div>
|
||||
<div class="drop-half">
|
||||
<div class="drop-label">NOVÝ VV</div>
|
||||
<div class="drop-zone-mini" id="drop-new">
|
||||
<p class="drop-text" id="new-text">Přetáhněte soubor sem nebo klikněte</p>
|
||||
<input type="file" id="new-input" accept=".xlsx,.xlsm" style="display:none">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="run-row">
|
||||
<button class="btn btn-primary btn-lg" id="compare-btn" type="button" disabled>
|
||||
Porovnat
|
||||
</button>
|
||||
<span class="run-hint" id="compare-hint">Nahrajte oba soubory.</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="s-processing" class="hidden">
|
||||
<div class="processing-card">
|
||||
<div class="spinner"></div>
|
||||
<h2 class="processing-title">Porovnávám soubory…</h2>
|
||||
<p class="processing-sub">Načítám oba sešity, párkuji listy a hledám změněné, přidané a odebrané položky. Při rozsáhlejších výkazech to může trvat půl minuty i déle — vyčkejte, nezavírejte stránku.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="s-result" class="hidden">
|
||||
<div class="results-header">
|
||||
<div>
|
||||
<h2 class="results-title">Výsledek porovnání</h2>
|
||||
<p class="results-meta" id="results-meta"></p>
|
||||
</div>
|
||||
<div class="results-actions">
|
||||
<button class="btn btn-secondary" id="restart-btn" type="button">Nové porovnání</button>
|
||||
<button class="btn btn-primary" id="download-btn" type="button">
|
||||
<svg class="btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v12m0 0-3.75-3.75M12 16.5l3.75-3.75M4.5 19.5h15"/>
|
||||
</svg>
|
||||
Stáhnout report Excel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="recap-cards">
|
||||
<div class="recap-card recap-changed">
|
||||
<div class="recap-label">Změněné</div>
|
||||
<div class="recap-value" id="cnt-changed">0</div>
|
||||
</div>
|
||||
<div class="recap-card recap-added">
|
||||
<div class="recap-label">Přidané</div>
|
||||
<div class="recap-value" id="cnt-added">0</div>
|
||||
</div>
|
||||
<div class="recap-card recap-removed">
|
||||
<div class="recap-label">Odebrané</div>
|
||||
<div class="recap-value" id="cnt-removed">0</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="per-sheet" id="per-sheet"></div>
|
||||
|
||||
</section>
|
||||
|
||||
</main>
|
||||
|
||||
<script src="/static/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
461
vv-compare/static/styles.css
Normal file
461
vv-compare/static/styles.css
Normal file
@@ -0,0 +1,461 @@
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
:root {
|
||||
--bg-primary: #ffffff;
|
||||
--bg-secondary: #f9fafb;
|
||||
--bg-tertiary: #f2f4f7;
|
||||
--text-primary: #101828;
|
||||
--text-secondary: #354052;
|
||||
--text-tertiary: #676f83;
|
||||
--text-quaternary: #98a2b2;
|
||||
--border-default: rgb(16 24 40 / 0.08);
|
||||
--border-strong: #d0d5dc;
|
||||
--border-subtle: rgb(16 24 40 / 0.04);
|
||||
--card: #ffffff;
|
||||
--primary: #155aef;
|
||||
--primary-hover: #004aeb;
|
||||
--accent-indigo: #444ce7;
|
||||
--shadow-card: 0 1px 2px rgb(16 24 40 / 0.05);
|
||||
--radius-md: 8px;
|
||||
--radius-lg: 12px;
|
||||
}
|
||||
|
||||
/* Dark theme — applies when (a) user OS prefers dark and no .light override,
|
||||
or (b) :root has explicit .dark class (set by portal_theme cookie). */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root:not(.light) {
|
||||
--bg-primary: #14181f;
|
||||
--bg-secondary: #1a1f29;
|
||||
--bg-tertiary: #232936;
|
||||
--text-primary: #f5f7fa;
|
||||
--text-secondary: #c8ccd5;
|
||||
--text-tertiary: #98a2b2;
|
||||
--text-quaternary: #676f83;
|
||||
--border-default: rgb(255 255 255 / 0.08);
|
||||
--border-strong: #354052;
|
||||
--border-subtle: rgb(255 255 255 / 0.04);
|
||||
--card: #1a1f29;
|
||||
}
|
||||
}
|
||||
:root.dark {
|
||||
--bg-primary: #14181f;
|
||||
--bg-secondary: #1a1f29;
|
||||
--bg-tertiary: #232936;
|
||||
--text-primary: #f5f7fa;
|
||||
--text-secondary: #c8ccd5;
|
||||
--text-tertiary: #98a2b2;
|
||||
--text-quaternary: #676f83;
|
||||
--border-default: rgb(255 255 255 / 0.08);
|
||||
--border-strong: #354052;
|
||||
--border-subtle: rgb(255 255 255 / 0.04);
|
||||
--card: #1a1f29;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Geist", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
|
||||
background: var(--bg-secondary);
|
||||
color: var(--text-primary);
|
||||
min-height: 100vh;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* ── Header ─────────────────────────────────────── */
|
||||
.header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 30;
|
||||
border-bottom: 0.5px solid var(--border-default);
|
||||
background: color-mix(in srgb, var(--bg-secondary) 82%, transparent);
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
.header-inner {
|
||||
max-width: 1280px; /* match portal max-w-7xl so brand doesn't shift */
|
||||
margin: 0 auto;
|
||||
height: 56px; /* portal uses h-14 */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 16px; /* portal px-4 */
|
||||
gap: 16px;
|
||||
}
|
||||
@media (min-width: 640px) {
|
||||
.header-inner { padding: 0 32px; } /* portal sm:px-8 */
|
||||
}
|
||||
.brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
text-decoration: none;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.brand-icon {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(135deg, var(--primary) 0%, var(--accent-indigo) 100%);
|
||||
box-shadow: 0 1px 2px rgb(16 24 40 / 0.06), inset 0 1px 0 rgb(255 255 255 / 0.18);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 700;
|
||||
font-size: 12px;
|
||||
letter-spacing: -0.04em;
|
||||
color: white;
|
||||
}
|
||||
.brand-name {
|
||||
font-size: 14px; /* tailwind text-sm */
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.025em; /* tailwind tracking-tight */
|
||||
color: var(--text-primary);
|
||||
}
|
||||
.brand-ai { color: var(--primary); }
|
||||
.header-crumb {
|
||||
font-size: 13px;
|
||||
color: var(--text-tertiary);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* ── Main ────────────────────────────────────────── */
|
||||
.main {
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
padding: 40px 24px 80px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 32px;
|
||||
}
|
||||
@media (max-width: 640px) {
|
||||
.header-inner { padding: 0 16px; }
|
||||
.main { padding: 24px 16px 60px; }
|
||||
}
|
||||
|
||||
/* ── Section intro ───────────────────────────────── */
|
||||
.section-intro { margin-bottom: 24px; }
|
||||
.section-title {
|
||||
font-size: 22px;
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.02em;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.section-desc {
|
||||
color: var(--text-tertiary);
|
||||
max-width: 580px;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* ── Examples panel ──────────────────────────────── */
|
||||
.examples-panel {
|
||||
border: 1px solid var(--border-default);
|
||||
border-radius: var(--radius-lg);
|
||||
background: var(--card);
|
||||
box-shadow: var(--shadow-card);
|
||||
padding: 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.examples-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.examples-title {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
.examples-subtitle {
|
||||
font-size: 12px;
|
||||
color: var(--text-tertiary);
|
||||
line-height: 1.5;
|
||||
}
|
||||
.examples-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
min-height: 28px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.examples-list:empty::before {
|
||||
content: "Zatím žádné vzory — přidejte alespoň jeden níže";
|
||||
font-size: 12px;
|
||||
color: var(--text-quaternary);
|
||||
font-style: italic;
|
||||
padding: 6px 0;
|
||||
}
|
||||
.example-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
background: color-mix(in srgb, var(--primary) 10%, var(--bg-primary));
|
||||
border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
|
||||
color: var(--text-primary);
|
||||
padding: 4px 4px 4px 10px;
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
font-family: ui-monospace, monospace;
|
||||
}
|
||||
.example-chip-remove {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 50%;
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: var(--text-tertiary);
|
||||
padding: 0;
|
||||
transition: background 0.1s, color 0.1s;
|
||||
}
|
||||
.example-chip-remove:hover {
|
||||
background: color-mix(in srgb, var(--primary) 18%, transparent);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
.example-chip-remove svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
.examples-input-row {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
.example-input {
|
||||
flex: 1;
|
||||
font-family: ui-monospace, monospace;
|
||||
font-size: 13px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-primary);
|
||||
color: var(--text-primary);
|
||||
min-width: 0;
|
||||
}
|
||||
.example-input:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
|
||||
}
|
||||
.example-add-btn {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ── Drop zone ───────────────────────────────────── */
|
||||
.drop-zone {
|
||||
border: 1.5px dashed var(--border-strong);
|
||||
border-radius: var(--radius-lg);
|
||||
background: var(--card);
|
||||
padding: 56px 32px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.15s, background 0.15s;
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
.drop-zone:hover, .drop-zone.drag-over {
|
||||
border-color: var(--primary);
|
||||
background: color-mix(in srgb, var(--primary) 4%, var(--card));
|
||||
}
|
||||
.drop-icon {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
color: var(--text-quaternary);
|
||||
margin: 0 auto 18px;
|
||||
display: block;
|
||||
transition: color 0.15s;
|
||||
}
|
||||
.drop-zone:hover .drop-icon, .drop-zone.drag-over .drop-icon {
|
||||
color: var(--primary);
|
||||
}
|
||||
.drop-text {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.drop-or {
|
||||
font-size: 13px;
|
||||
color: var(--text-quaternary);
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.drop-formats {
|
||||
font-size: 12px;
|
||||
color: var(--text-quaternary);
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
/* ── Buttons ─────────────────────────────────────── */
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 8px 16px;
|
||||
border-radius: var(--radius-md);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
transition: background 0.15s, box-shadow 0.15s;
|
||||
line-height: 1;
|
||||
}
|
||||
.btn-primary {
|
||||
background: var(--primary);
|
||||
color: #fff;
|
||||
box-shadow: 0 1px 2px rgb(21 90 239 / 0.25);
|
||||
}
|
||||
.btn-primary:hover { background: var(--primary-hover); }
|
||||
.btn-primary:disabled { opacity: 0.5; cursor: default; }
|
||||
.btn-secondary {
|
||||
background: var(--bg-tertiary);
|
||||
color: var(--text-secondary);
|
||||
border: 1px solid var(--border-strong);
|
||||
}
|
||||
.btn-secondary:hover { background: var(--border-strong); }
|
||||
.btn-icon { width: 15px; height: 15px; flex-shrink: 0; }
|
||||
|
||||
/* ── Processing card ─────────────────────────────── */
|
||||
.processing-card {
|
||||
background: var(--card);
|
||||
border: 1px solid var(--border-default);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 56px 32px;
|
||||
text-align: center;
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
.spinner {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border: 3px solid var(--border-strong);
|
||||
border-top-color: var(--primary);
|
||||
border-radius: 50%;
|
||||
animation: spin 0.75s linear infinite;
|
||||
margin: 0 auto 22px;
|
||||
}
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
.processing-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 20px;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
.steps-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
max-width: 320px;
|
||||
margin: 0 auto;
|
||||
text-align: left;
|
||||
}
|
||||
.step-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
font-size: 13px;
|
||||
color: var(--text-tertiary);
|
||||
padding: 8px 12px;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-tertiary);
|
||||
}
|
||||
.step-item.active {
|
||||
color: var(--primary);
|
||||
background: color-mix(in srgb, var(--primary) 8%, var(--bg-primary));
|
||||
}
|
||||
.step-item.done { color: #17b26a; }
|
||||
.step-item.error { color: #d92d20; background: #fef3f2; }
|
||||
.step-dot {
|
||||
width: 8px; height: 8px;
|
||||
border-radius: 50%;
|
||||
background: currentColor;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ── Results ─────────────────────────────────────── */
|
||||
.results-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.results-title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.015em;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.results-meta {
|
||||
font-size: 13px;
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
.results-actions { display: flex; gap: 8px; flex-wrap: wrap; }
|
||||
|
||||
/* ── Table ───────────────────────────────────────── */
|
||||
.table-wrap {
|
||||
border: 1px solid var(--border-default);
|
||||
border-radius: var(--radius-lg);
|
||||
overflow: hidden;
|
||||
box-shadow: var(--shadow-card);
|
||||
background: var(--card);
|
||||
overflow-x: auto;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 13px;
|
||||
min-width: 500px;
|
||||
}
|
||||
thead {
|
||||
background: var(--bg-tertiary);
|
||||
border-bottom: 1px solid var(--border-default);
|
||||
}
|
||||
th {
|
||||
padding: 10px 14px;
|
||||
text-align: left;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--text-tertiary);
|
||||
white-space: nowrap;
|
||||
}
|
||||
td {
|
||||
padding: 8px 14px;
|
||||
border-bottom: 1px solid var(--border-subtle);
|
||||
color: var(--text-primary);
|
||||
vertical-align: middle;
|
||||
}
|
||||
tr:last-child td { border-bottom: none; }
|
||||
tr:nth-child(even) td { background: var(--bg-secondary); }
|
||||
td[contenteditable]:focus {
|
||||
outline: none;
|
||||
background: color-mix(in srgb, var(--primary) 6%, var(--bg-primary));
|
||||
box-shadow: inset 0 0 0 1.5px var(--primary);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 2px 8px;
|
||||
border-radius: 99px;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.badge-rule { background: #d1e0ff; color: #004aeb; }
|
||||
.badge-llm { background: #d1fae5; color: #065f46; }
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.badge-rule { background: #1e3a8a; color: #93c5fd; }
|
||||
.badge-llm { background: #064e3b; color: #6ee7b7; }
|
||||
}
|
||||
|
||||
.table-hint {
|
||||
font-size: 12px;
|
||||
color: var(--text-quaternary);
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.hidden { display: none !important; }
|
||||
Reference in New Issue
Block a user