:root {
  --bg: #0b0d10;
  --panel: #12161b;
  --panel-2: #171c23;
  --line: #232b34;
  --text: #e6edf3;
  --muted: #8b98a5;
  --accent: #3fb950;
  --accent-dim: #1c5c2a;
  --warn: #d29922;
  --danger: #f85149;
  --blue: #4493f8;
  --radius: 10px;
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, "Segoe UI", Inter, Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 50% -15%, #16202b 0%, transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.center-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.brand {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

h1 { font-size: 26px; line-height: 1.2; margin: 0 0 10px; letter-spacing: -.02em; }
h2 { font-size: 16px; margin: 28px 0 12px; }
p { color: var(--muted); margin: 0 0 14px; }
.small { font-size: 13px; }

.shout {
  font-size: clamp(30px, 7vw, 46px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  margin: 0 0 14px;
}
.shout span { display: block; color: var(--muted); }

label {
  display: block;
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 16px 0 6px;
}

input[type=text], input[type=password], textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
input:focus, textarea:focus { border-color: var(--blue); }
textarea { resize: vertical; min-height: 76px; }

button {
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 16px;
  transition: border-color .15s, background .15s;
}
button:hover:not(:disabled) { border-color: #3a4653; }
button:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent-dim);
  border-color: #2b7a3b;
  color: #d7ffe0;
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  font-weight: 600;
}
.btn-primary:hover:not(:disabled) { background: #226b32; }
.btn-ghost { background: transparent; padding: 6px 10px; font-size: 13px; }
.btn-danger:hover { border-color: var(--danger); color: var(--danger); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
}
.badge.ok { color: var(--accent); border-color: var(--accent-dim); }
.badge.warn { color: var(--warn); border-color: #5c4711; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.msg {
  border-radius: var(--radius);
  padding: 11px 13px;
  font-size: 14px;
  margin-top: 16px;
  border: 1px solid;
  display: none;
}
.msg.show { display: block; }
.msg.error { color: #ffb4ae; border-color: #6e2b28; background: #2a1615; }
.msg.info { color: #b9d5f5; border-color: #2b4a6e; background: #131e2a; }
.msg.ok { color: #b6f0c2; border-color: var(--accent-dim); background: #102416; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
  vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ---------- aplikasi ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.topbar .title { font-family: var(--mono); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.topbar .right { display: flex; align-items: center; gap: 10px; }

.dropzone {
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 44px 24px;
  text-align: center;
  transition: border-color .15s, background .15s;
  cursor: pointer;
  background: rgba(255, 255, 255, .012);
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: rgba(63, 185, 80, .05); }
.dropzone .big { font-size: 17px; font-weight: 600; margin-bottom: 6px; }

.stats {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
}
.stats b { color: var(--text); font-weight: 600; }

.queue { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }

.item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 15px;
}
.item .row { display: flex; align-items: center; gap: 12px; }
.item .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.item .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }

.bar {
  height: 5px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width .25s ease;
}
.item.done .bar > i { background: var(--accent); }
.item.error .bar > i { background: var(--danger); }
.item .err { color: #ffb4ae; font-size: 13px; margin-top: 8px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
td.num, th.num { text-align: right; font-family: var(--mono); font-size: 13px; white-space: nowrap; }
tr:hover td { background: rgba(255, 255, 255, .02); }
.filename { display: block; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hash { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.toolbar { display: flex; gap: 10px; align-items: center; margin: 24px 0 10px; }
.toolbar input { flex: 1; }

.empty { color: var(--muted); text-align: center; padding: 34px; font-size: 14px; }

.footnote { color: var(--muted); font-size: 12px; margin-top: 28px; font-family: var(--mono); }

@media (max-width: 620px) {
  .card { padding: 24px; }
  th.hide-sm, td.hide-sm { display: none; }
}
