:root {
  --bg: #0b0f17;
  --bg-soft: #111827;
  --card: #151d2b;
  --card-2: #1b2436;
  --line: #24304a;
  --text: #e8eefc;
  --muted: #8ea0bf;
  --brand: #4f7cff;
  --brand-2: #7c5cff;
  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(11, 15, 23, 0.82);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 17px;
  color: var(--text);
}
.logo-mark {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800;
}
.nav-links { display: flex; gap: 18px; font-size: 14px; color: var(--muted); }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 44px; text-align: center; }
.hero h1 {
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.1;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 28px;
  font-size: 16px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 20px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover:not(:disabled) { background: #232e45; border-color: #33405e; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border: none;
  color: #fff;
  box-shadow: 0 6px 18px rgba(79, 124, 255, 0.25);
}
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.btn.danger { border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.btn.danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.12); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }

/* ---------- product grid ---------- */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 30px 0 18px;
}
.section-title h2 { font-size: 20px; margin: 0; letter-spacing: -0.02em; }
.section-title span { color: var(--muted); font-size: 13px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  padding-bottom: 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: #33405e; transform: translateY(-2px); }

.product h3 { margin: 0; font-size: 16.5px; letter-spacing: -0.01em; }
.badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b9c8ff;
  background: rgba(79, 124, 255, 0.12);
  border: 1px solid rgba(79, 124, 255, 0.25);
  padding: 3px 9px;
  border-radius: 999px;
}
.price { font-size: 22px; font-weight: 750; letter-spacing: -0.02em; margin-top: auto; }
.stock { font-size: 12.5px; color: var(--muted); }
.muted { color: var(--muted); font-size: 14px; margin: 0; }
.product .btn { margin-top: 6px; }

/* ---------- steps / faq ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding-bottom: 30px;
}
.step { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step b { display: block; margin-bottom: 6px; font-size: 14px; }
.step p { margin: 0; font-size: 13.5px; color: var(--muted); }
.step .num {
  width: 24px; height: 24px; border-radius: 8px;
  background: rgba(79, 124, 255, 0.15); color: #b9c8ff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-bottom: 10px;
}

details.faq {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
details.faq summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
details.faq p { color: var(--muted); font-size: 14px; margin: 10px 0 0; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  color: var(--muted);
  font-size: 13px;
}
footer .container { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 12, 0.72);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 60;
}
.modal[hidden] { display: none; }
.modal-box {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.modal-box h3 { margin: 0 0 4px; font-size: 18px; }
.modal-box .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #c7d3ea; }
input, select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.15);
}
textarea { resize: vertical; min-height: 84px; font-family: ui-monospace, "Cascadia Code", monospace; font-size: 13px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Elemen ber-atribut hidden harus benar-benar hilang walau punya display sendiri. */
[hidden] { display: none !important; }

/* Input file: tombolnya disamakan dengan tombol lain. */
input[type="file"] { padding: 8px 10px; font-size: 13px; }
input[type="file"]::file-selector-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  margin-right: 10px;
  font: inherit;
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: rgba(255, 255, 255, 0.1); }

/* Baris checkbox: input tidak melebar seperti field teks. */
.field label.check-row { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-bottom: 0; }
.field label.check-row input[type="checkbox"] { width: auto; padding: 0; margin: 0; accent-color: var(--brand); }

.alert {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.alert.error { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); color: #fca5a5; }
.alert.ok { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.3); color: #86efac; }
.alert.warn { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.3); color: #fcd34d; }
.alert[hidden] { display: none; }

/* ---------- order page ---------- */
.narrow { max-width: 720px; margin: 0 auto; padding: 40px 20px 70px; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.panel h2 { margin: 0 0 16px; font-size: 16px; letter-spacing: -0.01em; }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; text-align: right; word-break: break-all; }
.kv .v.mono { font-family: ui-monospace, "Cascadia Code", monospace; font-size: 13px; }

.status {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
}
.status.pending { background: rgba(245, 158, 11, 0.14); color: #fcd34d; }
.status.paid { background: rgba(34, 197, 94, 0.14); color: #86efac; }
.status.rejected { background: rgba(239, 68, 68, 0.14); color: #fca5a5; }
.status.expired { background: rgba(148, 163, 184, 0.14); color: #cbd5e1; }

.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { font-family: ui-monospace, monospace; font-size: 13px; }

.key-box {
  background: #0a0e16;
  border: 1px dashed #33405e;
  border-radius: 10px;
  padding: 12px;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.key-box span { flex: 1; }

.qris { max-width: 260px; width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; margin: 12px auto; }

.proof-thumb { display: inline-block; vertical-align: middle; margin: 0 6px 0 0; line-height: 0; }
.proof-thumb img {
  width: 48px; height: 48px; object-fit: cover; display: block;
  border-radius: 6px; border: 1px solid var(--line); background: var(--bg-soft);
}
.proof-thumb:hover img { border-color: var(--accent, #6aa6ff); }

/* ---------- admin ---------- */
.admin-wrap { max-width: 1180px; margin: 0 auto; padding: 26px 20px 60px; }
.login-box { max-width: 380px; margin: 8vh auto; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tab {
  padding: 8px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); background: transparent; border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.tab:hover { color: var(--text); background: var(--bg-soft); }
.tab.active { color: var(--text); background: var(--card-2); border-color: var(--line); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat .value { font-size: 24px; font-weight: 750; letter-spacing: -0.02em; margin-top: 4px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--bg-soft); }
tr:last-child td { border-bottom: none; }
td.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mono { font-family: ui-monospace, "Cascadia Code", monospace; font-size: 12.5px; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .row-2 { grid-template-columns: 1fr; } }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25); border-top-color: #fff;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

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