:root {
  --bg: #f6f7f9; --card: #ffffff; --text: #16181d; --muted: #6a7180; --line: #e2e5ea;
  --accent: #1f6feb; --accent-text: #ffffff; --ok: #1a7f37; --warn: #9a6700; --bad: #cf222e;
  --chip: #eef1f5; --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1115; --card: #171a21; --text: #e6e8ec; --muted: #9aa3b2; --line: #2a2f3a;
          --accent: #4c8dff; --chip: #222733; --ok: #3fb950; --warn: #d29922; --bad: #f85149; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: var(--accent); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px;
       padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line);
       flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 18px; text-decoration: none; color: var(--text); }
.brand span { color: var(--accent); }
.brand small { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 6px; }
nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
nav a { text-decoration: none; }
main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 24px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 0 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 18px; margin-bottom: 16px; }
.card.danger { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.auth { max-width: 440px; margin: 40px auto; }
label { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; font-size: 14px; }
label small { color: var(--muted); font-weight: 400; }
label.check { flex-direction: row; align-items: flex-start; gap: 8px; }
label.check input { margin-top: 3px; }
input, select, button, textarea { font: inherit; }
input:not([type=checkbox]):not([type=file]), select { padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg); color: var(--text); min-width: 0; }
button, .button { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--chip); color: var(--text); cursor: pointer; text-decoration: none;
  display: inline-block; }
button.primary, .button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
button.link { background: none; border: none; color: var(--accent); padding: 0; }
button:disabled { opacity: .55; cursor: default; }
.muted { color: var(--muted); }
.links { margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px;
         align-items: end; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.steps { list-style: none; padding: 0; margin: 0; }
.state { margin-top: 10px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
td.sample { color: var(--muted); max-width: 320px; overflow: hidden; text-overflow: ellipsis;
            white-space: nowrap; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: var(--chip); }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--chip);
        font-size: 12.5px; white-space: nowrap; }
.chip.ok { color: var(--ok); } .chip.warn { color: var(--warn); } .chip.bad { color: var(--bad); }
.pill { background: var(--chip); padding: 3px 10px; border-radius: 999px; font-size: 13px; }
.progress { height: 10px; background: var(--chip); border-radius: 999px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.list .job { display: flex; justify-content: space-between; gap: 12px; align-items: center;
             text-decoration: none; color: var(--text); }
.banner { background: color-mix(in srgb, var(--warn) 14%, var(--card)); border: 1px solid var(--line);
          padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; }
.cols { list-style: none; padding: 0; }
.cols li { display: flex; gap: 8px; align-items: center; padding: 5px 0;
           border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cols li input[type=text] { flex: 1; min-width: 160px; }
.cols li .key { color: var(--muted); font-size: 12.5px; min-width: 150px; }
.audit { list-style: none; padding: 0; font-size: 13.5px; }
.audit li { padding: 4px 0; border-bottom: 1px solid var(--line); }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); max-width: 92vw;
         background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px;
         box-shadow: 0 6px 24px rgba(0,0,0,.25); z-index: 10; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
         color: var(--text); width: min(900px, 94vw); max-height: 90vh; padding: 20px; }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog .close { float: right; font-size: 22px; line-height: 1; background: none; border: none;
                color: var(--muted); cursor: pointer; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.photos img { width: 140px; height: 140px; object-fit: contain; background: #fff;
              border: 1px solid var(--line); border-radius: 8px; }
iframe.html { width: 100%; min-height: 260px; border: 1px solid var(--line); border-radius: 8px;
              background: #fff; }
.captcha { margin: 10px 0; min-height: 0; }
@media (max-width: 600px) { .top { padding: 10px 16px; } main { padding: 14px 16px 50px; } }
