:root {
  --bg: #f6f7f9; --card: #ffffff; --ink: #1d2330; --muted: #667085; --line: #e4e7ec;
  --accent: #1f4e78; --accent-ink: #ffffff; --ok: #0a7f4f; --warn: #b45309; --bad: #b42318; --chip: #eef2f7;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1115; --card: #181b22; --ink: #e6e8ee; --muted: #9aa3b2; --line: #2a2f3a; --accent: #5b9bd5; --accent-ink: #0b1320; --chip: #232834; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; }
.top h1 { margin: 0 0 4px; font-size: 26px; }
.sub { margin: 0 0 12px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin: 14px 0; }
.card h2 { margin: 0 0 12px; font-size: 18px; }
.card h3 { margin: 18px 0 8px; font-size: 15px; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.banner { padding: 10px 12px; border-radius: 8px; background: #fff4e5; color: #7a3e00; border: 1px solid #f5c78a; margin-top: 8px; }
@media (prefers-color-scheme: dark) { .banner { background: #3a2a10; color: #ffd9a8; border-color: #7a5a20; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
input[type=text], input[type=password], select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); font: inherit; width: 100%; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
button { padding: 9px 16px; border: 0; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; }
button.secondary { background: var(--chip); color: var(--ink); }
button:disabled { opacity: .55; cursor: default; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.drop { display: block; border: 2px dashed var(--line); border-radius: 10px; padding: 26px; text-align: center; cursor: pointer; color: var(--muted); }
.drop.over { border-color: var(--accent); color: var(--ink); }
.drop input { display: none; }
.files { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; }
.files li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line); }
.log { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-height: 260px; overflow: auto; font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; margin: 0; }
.pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--chip); margin-left: 8px; vertical-align: middle; }
.pill.done { background: #d1fadf; color: #05603a; } .pill.failed { background: #fee4e2; color: #912018; } .pill.running { background: #dbeafe; color: #1e3a8a; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--chip); border-radius: 8px; padding: 10px 12px; }
.stat b { display: block; font-size: 20px; }
.stat span { font-size: 12px; color: var(--muted); }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .02em; }
td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cat { margin: 14px 0 6px; font-weight: 700; }
.verify { color: var(--warn); font-weight: 600; }
.deriv { color: var(--muted); font-size: 12.5px; }
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; }
.msg { padding: 10px 12px; border-radius: 10px; white-space: pre-wrap; max-width: 92%; }
.msg.you { background: var(--accent); color: var(--accent-ink); align-self: flex-end; }
.msg.bot { background: var(--chip); align-self: flex-start; }
a.dl { display: inline-block; padding: 8px 12px; border-radius: 6px; background: var(--chip); color: var(--ink); text-decoration: none; font-weight: 600; }
footer { margin-top: 18px; }
ul.plain { margin: 6px 0 0; padding-left: 18px; }

.allow{border:1px solid var(--line);border-radius:8px;padding:10px 12px;margin-top:12px}
.allow legend{font-size:12px;color:var(--muted);padding:0 6px}
.allow label{flex-direction:row;align-items:center;gap:8px;color:var(--ink);font-size:13.5px;margin:3px 0}
.warnbox{border:1px solid var(--line);background:var(--chip);border-radius:8px;padding:10px 12px;margin:10px 0}
.warnbox.bad{border-color:#f0b1aa;background:#fdecea;color:#8d2018;font-weight:600}
@media (prefers-color-scheme:dark){.warnbox.bad{border-color:#7a2f28;background:#3a1a17;color:#ffb4ab}}
.money{font-variant-numeric:tabular-nums}
.total-row td{font-weight:700;border-top:2px solid var(--line);background:var(--chip)}

.small{font-size:12px;font-weight:400;margin-top:2px}
.pictures{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0 4px}
.pictures figure{margin:0;width:180px}
.pictures img{width:180px;height:126px;object-fit:cover;object-position:top left;border:1px solid var(--line);border-radius:6px;background:#fff;cursor:zoom-in}
.pictures figcaption{font-size:12px;color:var(--muted);margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pictures figure.skipped img{opacity:.55}
