* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; background: #f3f4f7; color: #1d2330; }
.hidden { display: none !important; }
.muted { color: #6b7385; font-size: 13px; }
.error { color: #c0322b; white-space: pre-wrap; }
.ok { color: #227a3d; }
.warn { color: #a86400; }
h1 { font-size: 20px; margin: 0 0 16px; }
h2 { font-size: 18px; margin: 0; }
h3 { font-size: 15px; margin: 18px 0 6px; }
button { font: inherit; border: 0; border-radius: 6px; padding: 7px 14px; background: #2f5bea; color: #fff; cursor: pointer; }
button:hover { background: #2349c4; }
button.ghost { background: transparent; color: #2f5bea; }
button.small { padding: 3px 9px; font-size: 13px; }
button.danger { background: #c0322b; }
button.grey { background: #e3e6ee; color: #1d2330; }
button:disabled { opacity: .5; cursor: default; }
a.button { display: inline-block; text-decoration: none; border-radius: 6px; padding: 3px 9px; font-size: 13px; background: #e3e6ee; color: #1d2330; }
a.button:hover { background: #d3d8e4; }
input, select, textarea { font: inherit; width: 100%; padding: 7px 9px; border: 1px solid #cdd2dd; border-radius: 6px; background: #fff; }
textarea { font-family: ui-monospace, Consolas, monospace; font-size: 13px; resize: vertical; }
label { display: block; margin: 10px 0 4px; font-weight: 600; }
label input, label select, label textarea { margin-top: 4px; font-weight: 400; }
.file-line { font-weight: 400; }
.file-line input { width: auto; border: 0; padding: 0; }
header { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: #fff; border-bottom: 1px solid #dde1ea; position: sticky; top: 0; z-index: 5; }
header nav { display: flex; gap: 6px; flex: 1; }
header nav button { background: transparent; color: #1d2330; }
header nav button.active { background: #e8edfd; color: #2f5bea; }
main { max-width: 1180px; margin: 0 auto; padding: 20px 24px 60px; }
.card { background: #fff; border: 1px solid #dde1ea; border-radius: 10px; padding: 18px 20px; margin: 12px 0; }
.form { max-width: 900px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.toolbar h2 { flex: 1; }
.login { display: flex; justify-content: center; padding-top: 12vh; }
.login .card { width: 340px; }
.login button { margin-top: 16px; width: 100%; }

.job { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; }
.job .title { font-weight: 600; font-size: 15px; }
.job .meta { color: #6b7385; font-size: 13px; }
.job .actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; justify-content: flex-end; max-width: 430px; }
.job .step { font-size: 13px; }
.bar { height: 6px; background: #e6e9f0; border-radius: 3px; overflow: hidden; margin: 6px 0 2px; }
.bar div { height: 100%; background: #2f5bea; }
.status { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: #e6e9f0; }
.status.completed { background: #dcf3e2; color: #227a3d; }
.status.failed { background: #fbe1df; color: #c0322b; }
.status.running { background: #e8edfd; color: #2f5bea; }
.status.needs_review { background: #fff1d6; color: #a86400; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.thumbs figure { margin: 0; width: 128px; }
.thumbs figcaption { font-size: 11px; line-height: 1.3; margin-top: 3px; word-break: break-word; }
.thumbs figcaption .ru { display: block; color: #6b7280; }
.thumbs img { width: 128px; height: 72px; object-fit: cover; border-radius: 4px; border: 1px solid #dde1ea; }
pre.logs { max-height: 320px; overflow: auto; background: #f6f7fa; border-radius: 6px; padding: 10px; font-size: 12px; white-space: pre-wrap; grid-column: 1 / -1; }

.bundle { display: flex; gap: 16px; align-items: flex-start; }
.bundle .info { flex: 1; }
.bundle .actions { display: flex; gap: 6px; }
.examples { display: flex; flex-wrap: wrap; gap: 10px; }
.examples figure { margin: 0; width: 176px; }
.examples img { width: 176px; height: 99px; object-fit: cover; border-radius: 4px; border: 1px solid #dde1ea; display: block; }
.examples figcaption { font-size: 12px; display: flex; justify-content: space-between; gap: 4px; word-break: break-all; }
.files li { margin: 4px 0; }
.hint { font-weight: 400; color: #6b7385; font-size: 12px; margin-left: 6px; }
.editor-actions { display: flex; gap: 10px; margin-top: 16px; align-items: center; position: sticky; bottom: 0; background: #fff; padding: 10px 0; }
dialog { border: 0; border-radius: 10px; padding: 20px; max-width: 820px; width: 92vw; }
dialog pre { white-space: pre-wrap; background: #f6f7fa; padding: 10px; border-radius: 6px; max-height: 50vh; overflow: auto; }

/* «Режим только для альфачей»: тёмная тема; фото только декоративные (pointer-events: none). */
.alpha-toggle { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; font-size: 13px; cursor: pointer; white-space: nowrap; user-select: none; }
.alpha-toggle input { display: none; }
.alpha-toggle .switch { position: relative; width: 34px; height: 18px; border-radius: 9px; background: #cdd2dd; transition: background .2s; flex: none; }
.alpha-toggle .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .2s; }
.alpha-toggle input:checked + .switch { background: #2f5bea; }
.alpha-toggle input:checked + .switch::after { left: 18px; }
.brand { display: flex; align-items: center; gap: 8px; }
.alpha-only { display: none; }

body.alpha { background: #0e1117; color: #e2e6ee; }
body.alpha .alpha-only { display: block; }
body.alpha .muted, body.alpha .job .meta, body.alpha .hint { color: #8d95a8; }
body.alpha .error { color: #ff7b72; }
body.alpha .ok { color: #5fd38a; }
body.alpha .warn { color: #f0b450; }
body.alpha header { background: #151922; border-bottom-color: #262c39; }
body.alpha header nav button { color: #c9cfdb; }
body.alpha header nav button.active { background: #22305a; color: #9db4ff; }
body.alpha button.ghost { color: #9db4ff; }
body.alpha button.grey, body.alpha a.button { background: #2a3040; color: #e2e6ee; }
body.alpha a.button:hover { background: #343b4e; }
body.alpha .card, body.alpha dialog, body.alpha .editor-actions { background: #171b24; border-color: #262c39; color: #e2e6ee; }
body.alpha input, body.alpha select, body.alpha textarea { background: #0f131a; border-color: #2c3344; color: #e2e6ee; }
body.alpha pre.logs, body.alpha dialog pre { background: #0f131a; color: #cfd5e1; }
body.alpha .bar { background: #262c39; }
body.alpha .status { background: #262c39; color: #c9cfdb; }
body.alpha .status.completed { background: #173a24; color: #6fe09a; }
body.alpha .status.failed { background: #44201e; color: #ff8a80; }
body.alpha .status.running { background: #22305a; color: #9db4ff; }
body.alpha .status.needs_review { background: #45330f; color: #f0b450; }
body.alpha .thumbs img, body.alpha .examples img { border-color: #2c3344; }
body.alpha .alpha-toggle .switch { background: #3a4152; }
body.alpha .alpha-toggle input:checked + .switch { background: #3d6af0; }
body.alpha dialog::backdrop { background: rgba(0, 0, 0, .6); }

.alpha-watermark { position: fixed; right: -40px; bottom: -20px; width: 420px; height: 520px; z-index: 0;
  background: url("alpha.png") center / cover no-repeat; opacity: .07; pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 60%, transparent); mask-image: radial-gradient(closest-side, #000 60%, transparent); }
body.alpha #app, body.alpha #login { position: relative; z-index: 1; }
.alpha-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: center 30%; border: 2px solid #3d6af0; pointer-events: none; }
.alpha-login { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: center 30%; margin: 0 auto 12px; border: 3px solid #3d6af0; pointer-events: none; }
body.alpha .card { position: relative; }
body.alpha .card::before { content: ""; position: absolute; top: -9px; left: -9px; width: 24px; height: 24px; border-radius: 50%;
  background: url("alpha.png") center 30% / cover; border: 2px solid #171b24; opacity: .9; pointer-events: none; }
body.alpha .toolbar h2::after { content: ""; display: inline-block; width: 22px; height: 22px; margin-left: 8px; vertical-align: -4px; border-radius: 50%;
  background: url("alpha.png") center 30% / cover; pointer-events: none; }
body.alpha .status.completed::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; border-radius: 50%;
  background: url("alpha.png") center 30% / cover; }
body.alpha button[type="submit"]::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; border-radius: 50%;
  background: url("alpha.png") center 30% / cover; pointer-events: none; }
body.alpha dialog::after { content: ""; position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%;
  background: url("alpha.png") center 30% / cover; opacity: .25; pointer-events: none; }
label.check input { width: auto; margin: 0 8px 0 0; vertical-align: middle; }
a.button.nav-link { padding: 6px 12px; font-size: 14px; }
.thumbs .pick { display: block; width: 100%; margin-top: 4px; font-size: 11px; padding: 3px 4px; }
.thumbs .pick.chosen { text-align: center; color: #1f7a3a; font-weight: 600; }
.thumbs figure.chosen img { border: 2px solid #2fa84f; }
body.alpha .thumbs .pick.chosen { color: #6fd38d; }