:root {
  --bg: #0f1420;
  --card: #171e2e;
  --border: #262f45;
  --text: #e6e9f2;
  --muted: #8b94ab;
  --accent: #4f8cff;
  --accent-dark: #3a6fd8;
  --ok: #35c07f;
  --bad: #e5484d;
  --warn: #e0a03c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; gap: 14px; align-items: center; }
.logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 18px;
}
.topbar h1 { margin: 0; font-size: 20px; }
.subtitle { margin: 2px 0 0; color: var(--muted); font-size: 13px; }


main { max-width: 900px; margin: 24px auto; padding: 0 20px; display: grid; gap: 18px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}
.card h2 { margin-top: 0; }

.muted { color: var(--muted); font-size: 13.5px; }
.warn { color: var(--warn); font-size: 13.5px; }
.error { color: var(--bad); font-size: 13.5px; }

label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 14px; }

input[type="text"] {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
input[type="range"] { width: 100%; }

.btn {
  border: none; border-radius: 8px; cursor: pointer;
  padding: 10px 18px; font-size: 14px; font-weight: 600;
  color: #fff; background: var(--accent); text-decoration: none;
  display: inline-flex; align-items: center;
}
.btn.primary { width: 100%; margin-top: 18px; padding: 12px; font-size: 15px; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.submission-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.submission {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.submission .row1 { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.submission .title { font-weight: 600; }
.submission .meta { color: var(--muted); font-size: 12.5px; word-break: break-all; }

.status-badge {
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}
.status-queued { background: #2c3a57; color: #9db8e8; }
.status-running { background: #14432f; color: #58d39b; }
.status-completed { background: #123c29; color: var(--ok); }
.status-failed { background: #47181c; color: #ff8f92; }

.progress { height: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); transition: width .4s ease; }
.progress.failed > div { background: var(--bad); }
.progress.completed > div { background: var(--ok); }

.result-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.result-head div { display: flex; gap: 8px; }

.table-wrap { max-height: 420px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; margin-top: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 7px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { position: sticky; top: 0; background: var(--card); }

footer { text-align: center; padding: 22px; }

.hidden { display: none !important; }
