:root {
  --bg: #0a0e1a;
  --bg2: #0f1526;
  --card: #141b2f;
  --card2: #1a2340;
  --line: #243050;
  --text: #e8edf7;
  --muted: #8d9abb;
  --lime: #a3e635;
  --cyan: #22d3ee;
  --gold: #facc15;
  --red: #f87171;
  --violet: #a78bfa;
  --green: #4ade80;
  --radius: 18px;
  --grad: linear-gradient(135deg, #a3e635 0%, #22d3ee 100%);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body {
  background-image: radial-gradient(1200px 600px at 85% -10%, rgba(34, 211, 238, 0.09), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(163, 230, 53, 0.07), transparent 60%);
  min-height: 100vh;
}
a {
  color: inherit;
  text-decoration: none;
}
.hidden {
  display: none !important;
}
.muted {
  color: var(--muted);
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}
h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 19px;
  font-weight: 700;
}
h3 {
  font-size: 15px;
  font-weight: 700;
}

/* ---------- layout ---------- */
.app {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(10, 14, 26, 0.7);
  backdrop-filter: blur(12px);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 4px 8px;
}
.brand b {
  display: block;
  font-size: 16px;
}
.brand small {
  color: var(--muted);
  font-size: 12px;
}
.logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #0a0e1a;
  font-weight: 900;
  flex: none;
  box-shadow: 0 8px 24px rgba(163, 230, 53, 0.25);
}
.logo.big {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 24px;
  margin: 0 auto 8px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  transition: 0.15s;
}
.nav a:hover {
  background: var(--card);
  color: var(--text);
}
.nav a.active {
  background: var(--card2);
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--lime);
}
.nav .ico {
  width: 22px;
  text-align: center;
}
.nav .count {
  margin-left: auto;
  background: var(--gold);
  color: #1a1400;
  font-size: 11px;
  border-radius: 99px;
  padding: 1px 8px;
}
.nav .count:empty {
  display: none;
}
.nav .dot {
  margin-left: auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.nav .dot.bad {
  background: var(--red);
}
.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.worker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}
.worker.busy .pulse {
  background: var(--lime);
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.6);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(163, 230, 53, 0);
  }
}
.main {
  padding: 34px 40px 80px;
  max-width: 1240px;
  width: 100%;
  min-width: 0;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-head p {
  margin: 6px 0 0;
}

/* ---------- komponen ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card2);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  transition: 0.15s;
  white-space: nowrap;
}
.btn:hover {
  border-color: #3a4a75;
  transform: translateY(-1px);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn.primary {
  background: var(--grad);
  color: #07101a;
  border: none;
  box-shadow: 0 10px 28px rgba(34, 211, 238, 0.2);
}
.btn.danger {
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}
.btn.ghost {
  background: transparent;
}
.btn.small {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 10px;
}
.btn.wide {
  width: 100%;
}
.btn.big {
  padding: 15px 26px;
  font-size: 16px;
  border-radius: 14px;
}
label.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
}
input,
select,
textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  width: 100%;
  transition: 0.15s;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.55;
}
textarea.code {
  font-family: ui-monospace, 'JetBrains Mono', Consolas, monospace;
  font-size: 13.5px;
  min-height: 420px;
}
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg2);
  border: 1px solid var(--line);
  cursor: pointer;
}
.check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--lime);
  flex: none;
}
.check b {
  display: block;
}
.check small {
  color: var(--muted);
}
.fields3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--card2);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.queued {
  color: #c7d2fe;
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(167, 139, 250, 0.1);
}
.badge.running {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.1);
}
.badge.review {
  color: var(--gold);
  border-color: rgba(250, 204, 21, 0.45);
  background: rgba(250, 204, 21, 0.1);
}
.badge.done {
  color: var(--green);
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.1);
}
.badge.failed,
.badge.cancelled {
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.1);
}
.badge.running::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1s infinite alternate;
}
@keyframes blink {
  to {
    opacity: 0.25;
  }
}

/* ---------- hero buat video ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 30px;
  background: linear-gradient(160deg, #18213d 0%, #121a30 100%);
}
.hero::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(163, 230, 53, 0.18), transparent 70%);
  pointer-events: none;
}
.hero h1 span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tabs {
  display: inline-flex;
  padding: 4px;
  background: var(--bg2);
  border-radius: 12px;
  border: 1px solid var(--line);
  gap: 2px;
}
.tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
}
.tabs button.on {
  background: var(--card2);
  color: var(--text);
}
.topic-input {
  font-size: 19px;
  font-weight: 600;
  padding: 16px 18px;
  border-radius: 14px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 99px;
  cursor: pointer;
}
.chip:hover {
  color: var(--lime);
  border-color: var(--lime);
}
details.adv summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  list-style: none;
}
details.adv summary::before {
  content: '▸ ';
}
details.adv[open] summary::before {
  content: '▾ ';
}
.flow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.flow div {
  text-align: center;
  padding: 12px 6px;
  border-radius: 14px;
  background: var(--bg2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.flow div span {
  display: block;
  font-size: 22px;
  margin-bottom: 4px;
}

/* ---------- daftar job ---------- */
.jobs {
  display: grid;
  gap: 12px;
}
.job {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: 0.15s;
}
.job:hover {
  border-color: #33426b;
  background: #172040;
}
.job .thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: var(--bg2);
}
.job .title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.job .sub {
  font-size: 12.5px;
  color: var(--muted);
}
.minibar {
  height: 6px;
  border-radius: 99px;
  background: var(--bg2);
  overflow: hidden;
  margin-top: 8px;
}
.minibar i {
  display: block;
  height: 100%;
  background: var(--grad);
  border-radius: 99px;
  transition: width 0.4s;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.empty {
  text-align: center;
  padding: 44px 20px;
  color: var(--muted);
}
.empty .big {
  font-size: 42px;
}

/* ---------- detail job ---------- */
.stepper {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.step {
  position: relative;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.step .ball {
  width: 42px;
  height: 42px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: var(--bg2);
  border: 2px solid var(--line);
  position: relative;
  z-index: 1;
}
.step::before {
  content: '';
  position: absolute;
  top: 21px;
  left: -50%;
  right: 50%;
  height: 2px;
  background: var(--line);
}
.step:first-child::before {
  display: none;
}
.step.done {
  color: var(--text);
}
.step.done .ball {
  background: rgba(74, 222, 128, 0.15);
  border-color: var(--green);
}
.step.done::before,
.step.active::before {
  background: var(--green);
}
.step.active {
  color: var(--cyan);
}
.step.active .ball {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.1);
  animation: glow 1.6s infinite alternate;
}
.step.wait .ball {
  border-color: var(--gold);
  background: rgba(250, 204, 21, 0.12);
}
.step.wait {
  color: var(--gold);
}
@keyframes glow {
  to {
    box-shadow: 0 0 0 10px rgba(34, 211, 238, 0.04);
  }
}
.banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid;
}
.banner .bi {
  font-size: 22px;
}
.banner.gold {
  border-color: rgba(250, 204, 21, 0.4);
  background: rgba(250, 204, 21, 0.07);
}
.banner.red {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.07);
}
.banner.green {
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.06);
}
.banner.cyan {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.06);
}
.banner pre {
  white-space: pre-wrap;
  margin: 8px 0 0;
  font-size: 12.5px;
  color: #fecaca;
  max-height: 220px;
  overflow: auto;
}
.feed {
  height: 460px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  font-size: 13.5px;
  scroll-behavior: smooth;
}
.feed .ln {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 10px;
}
.feed .ln:hover {
  background: var(--bg2);
}
.feed time {
  color: #5d6a8c;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
}
.feed .say {
  color: #dbe4ff;
  background: rgba(167, 139, 250, 0.07);
  border-left: 3px solid var(--violet);
  white-space: pre-wrap;
}
.feed .tool {
  color: var(--muted);
}
.feed .warn {
  color: #fcd34d;
}
.feed .error {
  color: var(--red);
}
.feed .ok {
  color: var(--green);
  font-weight: 700;
}
.feed .raw {
  color: #66708f;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
}
.player {
  display: grid;
  grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
video.vid {
  width: 100%;
  aspect-ratio: 9/16;
  background: #000;
  border-radius: 18px;
  border: 1px solid var(--line);
  display: block;
}
.stills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.stills button {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  cursor: zoom-in;
  aspect-ratio: 9/16;
  position: relative;
}
.stills img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stills span {
  position: absolute;
  left: 6px;
  top: 6px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.65);
  padding: 1px 6px;
  border-radius: 6px;
}
.caps .cap {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg2);
  overflow: hidden;
}
.caps .cap + .cap {
  margin-top: 10px;
}
.caps .cap header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}
.caps .cap pre {
  margin: 0;
  padding: 14px;
  white-space: pre-wrap;
  font: inherit;
  font-size: 13.5px;
  max-height: 260px;
  overflow: auto;
  color: #cfd8ee;
}
.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 13.5px;
}
.kv dt {
  color: var(--muted);
}
.kv dd {
  margin: 0;
  font-weight: 600;
  word-break: break-word;
}

/* ---------- galeri ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.vcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: 0.15s;
}
.vcard:hover {
  transform: translateY(-3px);
  border-color: #33426b;
}
.vcard .poster {
  position: relative;
  aspect-ratio: 9/14;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}
.vcard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  pointer-events: none;
}
.vcard .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.6));
  opacity: 0;
  transition: 0.15s;
  font-size: 40px;
}
.vcard .poster:hover .play {
  opacity: 1;
}
.vcard .meta {
  padding: 12px 14px;
}
.vcard .meta b {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vcard .meta small {
  color: var(--muted);
  font-size: 12px;
}
.vcard .acts {
  display: flex;
  gap: 6px;
  padding: 0 14px 14px;
}

/* ---------- sistem ---------- */
.checks {
  display: grid;
  gap: 10px;
}
.chk {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background: var(--bg2);
  border: 1px solid var(--line);
}
.chk .st {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.chk.ok .st {
  background: rgba(74, 222, 128, 0.15);
  color: var(--green);
}
.chk.bad .st {
  background: rgba(248, 113, 113, 0.15);
  color: var(--red);
}
.chk.warn .st {
  background: rgba(250, 204, 21, 0.15);
  color: var(--gold);
}
.chk p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
code {
  font-family: ui-monospace, Consolas, monospace;
  background: var(--card2);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12.5px;
}

/* ---------- login, toast, modal ---------- */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login-card {
  width: min(380px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}
.login-card h1 {
  font-size: 24px;
}
.login-card p {
  margin: 0;
}
.error {
  color: var(--red);
  min-height: 1em;
  font-size: 13px;
}
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 50;
}
.toast {
  background: var(--card2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--lime);
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  max-width: 340px;
  font-weight: 600;
  font-size: 14px;
  animation: slidein 0.25s;
}
.toast.err {
  border-left-color: var(--red);
}
@keyframes slidein {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 14, 0.85);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 20px;
}
.modal-box {
  position: relative;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.modal-box video,
.modal-box img {
  max-height: 82vh;
  max-width: 92vw;
  border-radius: 18px;
  background: #000;
}
.modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card2);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  z-index: 2;
}

/* ---------- responsif ---------- */
@media (max-width: 1000px) {
  .grid2,
  .player {
    grid-template-columns: 1fr;
  }
  .player video.vid {
    max-width: 340px;
    margin: 0 auto;
  }
}
@media (max-width: 760px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    height: auto;
    flex-direction: row;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-right: 0;
    border-top: 1px solid var(--line);
    z-index: 30;
    background: rgba(10, 14, 26, 0.95);
  }
  .brand,
  .side-foot {
    display: none;
  }
  .nav {
    flex-direction: row;
    width: 100%;
    justify-content: space-around;
  }
  .nav a {
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    font-size: 11px;
    position: relative;
  }
  .nav a.active {
    box-shadow: none;
  }
  .nav .count,
  .nav .dot {
    position: absolute;
    top: 2px;
    right: 4px;
    margin: 0;
  }
  .main {
    padding: 20px 16px 110px;
  }
  h1 {
    font-size: 24px;
  }
  .hero {
    padding: 20px;
  }
  .fields3 {
    grid-template-columns: 1fr;
  }
  .flow {
    grid-template-columns: repeat(3, 1fr);
  }
  .stepper .step {
    font-size: 10px;
  }
  .step .ball {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }
  .step::before {
    top: 17px;
  }
  .job {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .job .thumb {
    width: 42px;
    height: 42px;
  }
  .job > :last-child {
    grid-column: 1 / -1;
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .feed {
    height: 380px;
  }
}
