* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}
.brand { color: #e2e8f0; text-decoration: none; font-weight: 700; font-size: 18px; }
.topbar-right { display: flex; gap: 16px; align-items: center; }
.logout { color: #94a3b8; text-decoration: none; }
.logout:hover { color: #e2e8f0; }

.container { max-width: 860px; margin: 0 auto; padding: 20px 16px 60px; }
.card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
h1 { font-size: 20px; margin: 0 0 12px; }
.hint { color: #94a3b8; font-size: 14px; margin: 0 0 16px; }

label { display: block; margin-bottom: 12px; font-size: 14px; color: #cbd5e1; }
input[type=text], input[type=number], input[type=password], textarea {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #475569;
    background: #0f172a;
    color: #e2e8f0;
    font: inherit;
}
input[type=file] { margin-top: 6px; color: #94a3b8; }
textarea { resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: #38bdf8; }

.row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.row .grow { flex: 1 1 260px; }
.btn {
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    font: inherit;
    cursor: pointer;
    background: #334155;
    color: #e2e8f0;
}
.btn-primary { background: #0284c7; }
.btn-primary:hover { background: #0369a1; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-danger { background: #7f1d1d; }
.form-error { color: #f87171; font-size: 14px; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.flash-error { background: #7f1d1d; color: #fecaca; }

.login-box { max-width: 340px; margin: 60px auto; }

.job {
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.job-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.job-title { font-weight: 600; }
.job-meta { color: #94a3b8; font-size: 13px; margin-top: 4px; }
.job-task { color: #cbd5e1; font-size: 14px; margin-top: 6px; white-space: pre-wrap; }
.status { font-size: 13px; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.status-active { background: #78350f; color: #fcd34d; }
.status-queued { background: #334155; color: #cbd5e1; }
.status-success { background: #14532d; color: #86efac; }
.status-error { background: #7f1d1d; color: #fecaca; }
.job-error { color: #f87171; font-size: 14px; margin-top: 8px; }
.job-actions { margin-top: 10px; display: flex; gap: 10px; align-items: center; }
.job video {
    display: block;
    margin-top: 12px;
    max-width: 240px;
    max-height: 420px;
    border-radius: 8px;
    background: #000;
}
a.dl { color: #38bdf8; }
