:root { --bg:#16202d; --panel:#1b2838; --text:#c7d5e0; --muted:#8f98a0; --accent:#66c0f4; --good:#a4d007; --bad:#ff6b6b; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--text); font:15px/1.4 system-ui, sans-serif; }
header { display:flex; align-items:baseline; gap:16px; padding:12px 16px; background:#0e1722; flex-wrap:wrap; }
h1 { margin:0; font-size:20px; }
h2 { font-size:13px; text-transform:uppercase; color:var(--muted); margin:0 0 8px; }
#status { color:var(--muted); font-size:13px; }
main { display:grid; grid-template-columns:300px 1fr; gap:16px; padding:16px; max-width:1400px; margin:0 auto; }
#filters section { background:var(--panel); padding:12px; border-radius:6px; margin-bottom:12px; }
select, input, button { background:#2a475e; color:var(--text); border:1px solid #3d6a8a; border-radius:4px; padding:6px 8px; font:inherit; }
button { cursor:pointer; } button:hover { background:#3d6a8a; } button:disabled { opacity:.4; cursor:default; }
input { width:100%; margin-bottom:8px; }
.row { display:flex; gap:8px; margin-bottom:8px; }
.lang-row { display:flex; gap:6px; margin-bottom:6px; }
.lang-row select:first-child { flex:1; min-width:0; }
.chip { display:inline-flex; align-items:center; gap:6px; padding:2px 8px; margin:2px; border-radius:12px; font-size:13px; background:#2a475e; }
.chip.inc { border:1px solid var(--good); } .chip.exc { border:1px solid var(--bad); }
.chip button { padding:0 4px; border:none; background:none; }
#grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:12px; }
.card { background:var(--panel); border-radius:6px; overflow:hidden; color:inherit; text-decoration:none; display:block; }
.card:hover { outline:1px solid var(--accent); }
.card img { width:100%; display:block; aspect-ratio:460/215; object-fit:cover; background:#0e1722; }
.card .body { padding:8px 10px; }
.card .name { font-weight:600; margin-bottom:4px; }
.card .meta { color:var(--muted); font-size:13px; display:flex; justify-content:space-between; gap:8px; }
#summary { margin-bottom:12px; color:var(--muted); }
#pager { display:flex; gap:12px; align-items:center; justify-content:center; margin:16px 0; }
@media (max-width: 800px) { main { grid-template-columns:1fr; padding:12px; } }

/* --- прогресс, вкладки, таблицы, вход --- */
.right { margin-left:auto; }
.muted { color:var(--muted); }
.error { color:var(--bad); }
#progress { max-width:1400px; margin:12px auto 0; padding:0 16px; }
#progress-text { margin-bottom:6px; }
#bar { height:10px; background:#0e1722; border-radius:5px; overflow:hidden; }
#bar-fill { height:100%; width:0; background:var(--accent); transition:width .4s; }
#chips { margin-top:6px; }
#halt { margin-top:8px; padding:8px 10px; border:1px solid var(--bad); border-radius:6px; background:#2a1d1d; }
.chip.ok { border:1px solid var(--good); } .chip.warn { border:1px solid #e0a82e; }
#tabs { max-width:1400px; margin:12px auto 0; padding:0 16px; display:flex; gap:8px; }
#tabs button.active, .toggle button.active { background:var(--accent); color:#0e1722; }
.toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.toolbar input { width:260px; margin:0; }
.toggle { display:flex; gap:4px; }
#columns { background:var(--panel); border-radius:6px; padding:8px 12px; margin-bottom:12px; }
#columns .row input { flex:1; margin:0; }
#col-list { max-height:260px; overflow:auto; margin-top:8px; display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:2px 12px; font-size:13px; }
.col-item { display:flex; gap:6px; align-items:center; }
#table-wrap, #queue-table-wrap { overflow-x:auto; }
table.data { border-collapse:collapse; width:100%; font-size:13px; }
table.data th, table.data td { text-align:left; padding:6px 10px; border-bottom:1px solid #2a475e; max-width:360px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
table.data th { color:var(--muted); position:sticky; top:0; background:var(--panel); }
table.data a { color:var(--accent); }
#queue-view { grid-template-columns:1fr; display:grid; }
#queue-view[hidden], #loaded-view[hidden], #grid[hidden], #table-wrap[hidden], #columns[hidden], #halt[hidden] { display:none; }
.login-page { display:flex; min-height:100vh; align-items:center; justify-content:center; }
.login-box { background:var(--panel); padding:28px; border-radius:8px; width:min(360px, 92vw); display:flex; flex-direction:column; gap:12px; }
.login-box h1 { margin:0; }
.login-box input { margin:0; }
