@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --accent: #16A34A;
  --ink: #0A0A0A;
  --muted: #52525B;
  --line: #E4E4E7;
  --soft: #F4F4F5;
  --bg2: #FAFAFA;
  --red: #DC2626;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Manrope, system-ui, sans-serif; color: var(--ink); background: #fff; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Header */
.header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; }
.logo { font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -0.01em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 700; text-decoration: none; border-radius: 12px; padding: 12px 18px; font-size: 15px; }
.btn-dark { background: var(--ink); color: #fff; border-radius: 999px; font-size: 14px; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost { background: #fff; border: 2px solid var(--line); color: #3F3F46; }
.btn-danger { background: #fff; border: 2px solid #FECACA; color: var(--red); }
.btn-lg { padding: 18px 30px; font-size: 17px; font-weight: 800; border-radius: 14px; }
.btn svg { width: 18px; height: 18px; }

/* Hero */
.hero { text-align: center; padding: 56px 0 48px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--soft); font-size: 14px; font-weight: 600; color: #3F3F46; margin: 0 0 20px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { margin: 0 auto 18px; font-size: clamp(36px, 6vw, 64px); line-height: 1.05; font-weight: 800; letter-spacing: -0.035em; max-width: 780px; }
.hero p { margin: 0 auto 32px; font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 560px; }

/* Cards */
.section { padding: 24px 0 64px; }
.section h2 { margin: 0 0 24px; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { text-align: left; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 18px; background: #fff; border: 2px solid var(--line); font: inherit; color: var(--ink); cursor: pointer; position: relative; }
.card.selected { border-color: var(--accent); box-shadow: 0 8px 24px -12px rgba(0,0,0,.25); }
.card:disabled { cursor: not-allowed; opacity: .55; }
.card .img { height: 150px; border-radius: 12px; background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; overflow: hidden; }
.card .img img { width: 100%; height: 100%; object-fit: cover; }
.card .name { font-size: 18px; font-weight: 800; }
.card .meta { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--muted); gap: 8px; }
.card .meta b { color: var(--ink); font-size: 16px; }
.badge { position: absolute; top: 22px; left: 22px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.badge.on { background: #DCFCE7; color: #166534; }
.badge.off { background: #FEE2E2; color: #991B1B; }
.empty { color: var(--muted); padding: 24px; border: 2px dashed var(--line); border-radius: 16px; text-align: center; }

/* Form pesan */
.order { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.order .wrap { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 64px; padding-bottom: 64px; }
.order .intro { flex: 1 1 320px; min-width: 0; }
.order .intro h2 { margin: 0 0 12px; font-size: 36px; font-weight: 800; letter-spacing: -0.02em; }
.order .intro p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--muted); }
.form { flex: 1 1 460px; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.full { grid-column: 1 / -1; }
.chosen { padding: 14px 16px; border-radius: 12px; background: var(--soft); font-size: 15px; }
.chosen span { color: var(--muted); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: #3F3F46; }
input, select { padding: 13px; border: 1px solid #D4D4D8; border-radius: 10px; font: inherit; font-weight: 500; font-size: 15px; background: #fff; color: var(--ink); }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; padding: 12px; border-radius: 10px; border: 2px solid var(--line); background: #fff; color: #3F3F46; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.seg button.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Langkah */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; padding: 64px 0; }
.steps .n { font-size: 14px; font-weight: 800; color: var(--accent); }
.steps h3 { margin: 6px 0; font-size: 19px; font-weight: 800; }
.steps p { margin: 0; color: var(--muted); line-height: 1.6; }
.footer { border-top: 1px solid var(--line); padding: 24px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }

@media (max-width: 560px) {
  .form { grid-template-columns: 1fr; }
}

/* ===== Admin ===== */
.admin { background: var(--bg2); min-height: 100vh; }
.login { max-width: 360px; margin: 12vh auto; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: grid; gap: 14px; }
.login h1 { margin: 0; font-size: 24px; }
.err { color: var(--red); font-size: 14px; margin: 0; min-height: 1em; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
.tabs { display: flex; gap: 6px; }
.tabs button { padding: 10px 14px; border-radius: 10px; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--soft); color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat div { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat b { font-size: 28px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 24px; }
.panel h2 { margin: 0 0 16px; font-size: 20px; }
.rows { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.row .thumb { width: 72px; height: 52px; border-radius: 8px; background: var(--soft); overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); }
.row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.row .info { min-width: 0; }
.row .info b { display: block; }
.row .info small { color: var(--muted); }
.row .actions { display: flex; gap: 8px; align-items: center; }
.row .actions .switch span { min-width: 104px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; font-size: 14px; flex-direction: row; color: var(--ink); }
.switch input { appearance: none; width: 46px; height: 26px; border-radius: 999px; background: #D4D4D8; position: relative; cursor: pointer; padding: 0; border: 0; transition: .15s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { left: 23px; }
.form-admin { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.preview { width: 100%; height: 140px; border-radius: 12px; background: var(--soft); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; }
.hidden { display: none !important; }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .stats { gap: 8px; margin: 16px 0; }
  .stat { padding: 12px; }
  .stat div { font-size: 12px; }
  .stat b { font-size: 24px; }
  .panel { padding: 16px; }
  .row { grid-template-columns: 64px minmax(0, 1fr); gap: 10px 12px; }
  .row .thumb { width: 64px; height: 48px; }
  .row .actions { grid-column: 1 / -1; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--soft); }
  .row .actions .switch { margin-right: auto; }
  .row .actions .switch span { min-width: 0; }
  .row .actions .btn { padding: 10px 14px; font-size: 14px; }
  .topbar .wrap { gap: 10px; }
  .topbar .btn { padding: 10px 14px; font-size: 14px; }
}
