/* web/public/css/app.css — one stylesheet, no framework. Dark, quiet, readable. */
:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e222b;
  --line: #2a2f3a;
  --text: #e6e8ee;
  --muted: #9aa3b2;
  --accent: #4f8cff;
  --accent-2: #7ad3a0;
  --warn: #f0b64a;
  --danger: #ef6a6a;
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: 13px; }

header.site {
  display: flex; align-items: center; gap: 18px; padding: 12px 22px;
  border-bottom: 1px solid var(--line); background: var(--panel);
}
header.site .brand { font-weight: 700; letter-spacing: .3px; color: var(--text); }
header.site .brand:hover { text-decoration: none; }
header.site nav { display: flex; gap: 14px; flex: 1; }
header.site .who { color: var(--muted); font-size: 13px; }
header.site .who a { margin-left: 10px; }

main { max-width: 1080px; margin: 0 auto; padding: 28px 22px 60px; }
h1 { font-size: 22px; margin: 0 0 18px; font-weight: 650; }
h2 { font-size: 16px; margin: 26px 0 10px; font-weight: 600; color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }

button, .btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 14px; font: inherit; cursor: pointer;
}
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--danger); }
button:disabled { opacity: .5; cursor: default; }
button:hover:not(:disabled) { filter: brightness(1.08); }

input[type=text], input[type=email], input[type=password], input[type=number], select {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%;
}
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
.field { margin-bottom: 6px; }

.drop {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 42px 20px;
  text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s;
}
.drop.over, .drop:hover { border-color: var(--accent); background: rgba(79, 140, 255, .06); color: var(--text); }
.drop input { display: none; }

.progress { height: 8px; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--muted); }
.badge.queued, .badge.under-construction, .badge.requeueing { color: var(--muted); }
.badge.active, .badge.cancel-requested, .badge.pause-requested, .badge.paused { color: var(--warn); border-color: var(--warn); }
.badge.completed { color: var(--accent-2); border-color: var(--accent-2); }
.badge.failed { color: var(--danger); border-color: var(--danger); }
.badge.canceled { color: var(--muted); text-decoration: line-through; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
tr:hover td { background: rgba(255, 255, 255, .02); }
td.num { text-align: right; font-family: var(--mono); font-size: 13px; }

.alert { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--danger); background: rgba(239, 106, 106, .08); color: var(--danger); margin: 12px 0; white-space: pre-wrap; }
.notice { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); margin: 12px 0; }
.ok { color: var(--accent-2); }

.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.frame { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; position: relative; }
.frame img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.frame .n { position: absolute; left: 6px; bottom: 4px; font-family: var(--mono); font-size: 11px; color: #fff; text-shadow: 0 1px 2px #000; }
.frame.done { border-color: var(--accent-2); }
.frame.pending img { opacity: .25; }
.frame.failed { border-color: var(--danger); }

.hero { background: #000; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; }
.hero img, .hero video { max-width: 100%; max-height: 100%; display: block; }

pre.log { background: #0a0b0e; border: 1px solid var(--line); border-radius: 8px; padding: 12px; height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-all; color: #cfd6e4; font-size: 12.5px; margin: 0; }

.pill-group { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pill-group button { border: 0; border-radius: 0; background: transparent; }
.pill-group button.on { background: var(--accent); color: #fff; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.auth { max-width: 380px; margin: 60px auto; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
[hidden] { display: none !important; }
