/* Панель завода в стиле BuildersHub Windows 95/98 (палитра rules/visual-style.md) */
@font-face { font-family: VGA; src: url(/static/fonts/ibm-vga-9x16.woff) format('woff'); }

:root {
  --desk: #327779; --desk-dark: #193b3d; --title: #381ca6; --surface: #e7e7e7; --paper: #ffffe3;
  --ink: #281660; --light: #ffffff; --shadow: #808080; --dark: #000000; --ok: #1d7a3a; --bad: #a3122a; --warn: #8a5a00;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--desk); color: var(--ink); font: 16px/16px VGA, monospace; }
a { color: var(--title); }
img { image-rendering: pixelated; }

.desk { padding: 16px; display: grid; gap: 16px; max-width: 1400px; margin: 0 auto; }
.window { background: var(--surface); box-shadow: inset -2px -2px var(--dark), inset 2px 2px var(--light), inset -4px -4px var(--shadow), inset 4px 4px var(--surface); padding: 4px; }
.titlebar { background: var(--title); color: var(--light); padding: 4px 6px; display: flex; align-items: center; gap: 8px; }
.titlebar img { width: 16px; height: 16px; }
.titlebar .grow { flex: 1; }
.body { padding: 10px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

button, .btn { font: inherit; color: var(--ink); background: var(--surface); border: 0; padding: 6px 12px; cursor: pointer;
  box-shadow: inset -2px -2px var(--dark), inset 2px 2px var(--light), inset -4px -4px var(--shadow), inset 4px 4px var(--surface); text-decoration: none; }
button:active { box-shadow: inset 2px 2px var(--dark), inset -2px -2px var(--light), inset 4px 4px var(--shadow); }
button.primary { font-weight: bold; outline: 2px solid var(--dark); outline-offset: -1px; }
button:disabled { color: var(--shadow); cursor: default; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--light); border: 0; padding: 6px;
  box-shadow: inset 2px 2px var(--shadow), inset -2px -2px var(--light), inset 4px 4px var(--dark), inset -4px -4px var(--surface); }
input { min-width: 0; flex: 1; }
textarea { width: 100%; min-height: 80px; resize: vertical; line-height: 18px; }

.field { background: var(--light); padding: 8px; box-shadow: inset 2px 2px var(--shadow), inset -2px -2px var(--light), inset 4px 4px var(--dark), inset -4px -4px var(--surface); }
.paper { background: var(--paper); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 6px 8px; vertical-align: top; }
th { background: var(--surface); box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light); font-weight: normal; }
tr.job { cursor: pointer; }
tr.job:hover td { background: #d9d4f2; }
tr.job.active td { background: var(--title); color: var(--light); }

.tabs { display: flex; gap: 2px; margin-bottom: -2px; }
.tabs button { box-shadow: inset -2px 0 var(--dark), inset 2px 2px var(--light), inset -4px 0 var(--shadow); padding: 6px 14px; }
.tabs button.on { background: var(--surface); position: relative; top: -2px; padding-bottom: 8px; }

.pill { display: inline-block; padding: 2px 6px; background: var(--paper); box-shadow: 2px 2px 0 var(--ink); white-space: nowrap; }
.st-running { color: var(--title); }
.st-review { color: var(--warn); font-weight: bold; }
.st-approved, .st-done { color: var(--ok); }
.st-failed, .st-cancelled { color: var(--bad); }
.dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; background: var(--shadow); }
.dot.on { background: #2bd14d; box-shadow: 0 0 0 2px var(--dark); }

.steps { display: flex; gap: 4px; flex-wrap: wrap; }
.step { padding: 4px 8px; background: var(--light); box-shadow: inset 1px 1px var(--shadow); color: var(--shadow); }
.step.done { color: var(--ok); }
.step.now { background: var(--title); color: var(--light); }

.sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.sheets img { width: 100%; display: block; image-rendering: auto; }
video { width: 100%; max-height: 640px; background: #000; display: block; }

.script { white-space: normal; line-height: 20px; }
.script .line { margin: 4px 0; }
.script .who { color: var(--title); font-weight: bold; }
.script .vis { color: var(--shadow); }
.script.chosen { outline: 3px solid var(--ok); }
.score { font-size: 24px; line-height: 24px; color: var(--title); }
.log { max-height: 320px; overflow: auto; line-height: 18px; }
.log .error { color: var(--bad); }
.log .feedback { color: var(--warn); }
.log .review { color: var(--ok); }
pre { white-space: pre-wrap; word-break: break-word; margin: 0; font: inherit; line-height: 18px; }
.muted { color: var(--shadow); }
.hidden { display: none !important; }
h3 { margin: 12px 0 6px; font-size: 16px; font-weight: bold; }
