/* ============================================================
   Ads — Studio Landing Page
   Token desain:
   - Tinta   #1D2733  (teks utama)
   - Kanvas  #EEF0F3  (latar aplikasi, abu sejuk)
   - Kartu   #FFFFFF  (permukaan)
   - Aksen   #E4572E  (aksi utama / "lampu trafik iklan")
   - Sinyal  #12907E  (status terbit, angka positif)
   Tipografi: system-ui tebal untuk judul, ui-monospace untuk
   slug, URL, ID pixel, dan angka statistik (data pelacakan).
   ============================================================ */

:root {
  --tinta: #1D2733;
  --tinta-redup: #5F6B7A;
  --kanvas: #EEF0F3;
  --kartu: #FFFFFF;
  --aksen: #E4572E;
  --aksen-tua: #C74722;
  --aksen-muda: #FCEAE3;
  --sinyal: #12907E;
  --sinyal-muda: #E2F3F0;
  --garis: #E3E6EA;
  --isian: #F2F4F6;
  --bahaya: #C43D3D;
  --radius: 14px;
  --radius-kecil: 10px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --bayang-kartu: 0 1px 2px rgba(29, 39, 51, 0.05), 0 8px 24px rgba(29, 39, 51, 0.06);
  --bayang-naik: 0 2px 4px rgba(29, 39, 51, 0.06), 0 16px 36px rgba(29, 39, 51, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--kanvas);
  color: var(--tinta);
  line-height: 1.55;
  min-height: 100dvh;
}

.muat-awal {
  display: flex; align-items: center; justify-content: center;
  min-height: 60dvh; color: var(--tinta-redup); font-size: 15px;
}

button { font: inherit; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--aksen);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Bilah atas ---------- */

.bilah {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--garis);
}
.bilah-dalam {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 22px;
}
.merek {
  font-size: 22px; font-weight: 900; letter-spacing: -0.04em;
  text-decoration: none; user-select: none;
}
.merek b { color: var(--aksen); }
.merek small {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--tinta-redup); margin-left: 10px; text-transform: uppercase;
}
.bilah-isi { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.bilah-akun {
  font-family: var(--mono); font-size: 12px; color: var(--tinta-redup);
  background: var(--isian); border-radius: 999px; padding: 6px 12px;
  border: 0; transition: background 0.15s ease;
}
.bilah-akun:hover { background: #E7EAEE; }

/* ---------- Kontainer ---------- */

.wadah { max-width: 1100px; margin: 0 auto; padding: 28px 22px 80px; }

.kepala-halaman {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.kepala-halaman h1 {
  font-size: 30px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.15;
}
.kepala-halaman p { color: var(--tinta-redup); font-size: 14px; margin-top: 4px; }

/* ---------- Tombol ---------- */

.tombol {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--radius-kecil);
  font-weight: 700; font-size: 14px;
  padding: 11px 18px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  text-decoration: none;
}
.tombol-utama {
  background: var(--aksen); color: #fff;
  box-shadow: 0 6px 16px rgba(228, 87, 46, 0.32);
}
.tombol-utama:hover { background: var(--aksen-tua); }
.tombol-utama:active { transform: translateY(1px); box-shadow: 0 3px 8px rgba(228, 87, 46, 0.28); }
.tombol-halus { background: var(--isian); color: var(--tinta); }
.tombol-halus:hover { background: #E7EAEE; }
.tombol-garis {
  background: transparent; color: var(--tinta);
  box-shadow: inset 0 0 0 1.5px var(--garis);
}
.tombol-garis:hover { box-shadow: inset 0 0 0 1.5px var(--tinta-redup); }
.tombol-bahaya { background: transparent; color: var(--bahaya); }
.tombol-bahaya:hover { background: #FBEBEB; }
.tombol-kecil { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.tombol[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Login ---------- */

.panggung-login {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(720px 420px at 12% -8%, rgba(228, 87, 46, 0.14), transparent 62%),
    radial-gradient(600px 380px at 100% 110%, rgba(18, 144, 126, 0.12), transparent 60%),
    var(--kanvas);
}
.kartu-login {
  width: 100%; max-width: 380px;
  background: var(--kartu); border-radius: 20px;
  box-shadow: var(--bayang-naik);
  padding: 34px 30px 30px;
}
.kartu-login .merek { font-size: 34px; display: block; }
.kartu-login .sapaan { color: var(--tinta-redup); font-size: 14px; margin: 6px 0 24px; }
.kartu-login .tombol { width: 100%; margin-top: 6px; padding: 13px; }

/* ---------- Formulir (sengaja tidak bergaya formulir kaku) ---------- */

.medan { margin-bottom: 16px; }
.medan > label {
  display: block; font-size: 11.5px; font-weight: 800;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--tinta-redup); margin-bottom: 7px;
}
.medan .bantuan { font-size: 12.5px; color: var(--tinta-redup); margin-top: 6px; }

.isian-teks,
textarea.isian-teks,
select.isian-teks {
  width: 100%;
  background: var(--isian);
  border: 1.5px solid transparent;
  border-radius: var(--radius-kecil);
  padding: 11px 14px;
  font: inherit; font-size: 14.5px; color: var(--tinta);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.isian-teks::placeholder { color: #9AA4AF; }
.isian-teks:hover { background: #EDEFF2; }
.isian-teks:focus {
  outline: none; background: #fff;
  border-color: var(--aksen);
  box-shadow: 0 0 0 4px rgba(228, 87, 46, 0.12);
}
textarea.isian-teks { resize: vertical; min-height: 140px; line-height: 1.6; }
.isian-mono { font-family: var(--mono); font-size: 13.5px; }

.baris-medan { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .baris-medan { grid-template-columns: 1fr; } }

.awalan-slug {
  display: flex; align-items: stretch;
  background: var(--isian); border-radius: var(--radius-kecil);
  border: 1.5px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.awalan-slug:focus-within {
  background: #fff; border-color: var(--aksen);
  box-shadow: 0 0 0 4px rgba(228, 87, 46, 0.12);
}
.awalan-slug span {
  display: flex; align-items: center;
  font-family: var(--mono); font-size: 12.5px; color: var(--tinta-redup);
  padding: 0 4px 0 14px; white-space: nowrap;
}
.awalan-slug input {
  flex: 1; min-width: 0; background: transparent; border: 0;
  font-family: var(--mono); font-size: 13.5px; color: var(--tinta);
  padding: 11px 14px 11px 0;
}
.awalan-slug input:focus { outline: none; }

/* ---------- Editor dua panel ---------- */

.papan-editor {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px; align-items: start;
}
@media (max-width: 980px) { .papan-editor { grid-template-columns: 1fr; } }

.kartu {
  background: var(--kartu); border-radius: var(--radius);
  box-shadow: var(--bayang-kartu);
  padding: 24px;
}
.kartu + .kartu { margin-top: 18px; }

.seksi-judul {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px;
}
.seksi-judul h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.seksi-judul .keterangan { font-size: 12.5px; color: var(--tinta-redup); }

/* Poin keunggulan dinamis */
.daftar-poin { display: grid; gap: 10px; }
.baris-poin { display: flex; gap: 8px; align-items: center; }
.baris-poin .isian-teks { flex: 1; }
.baris-poin .hapus-poin {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 9px;
  background: var(--isian); border: 0; color: var(--tinta-redup);
  font-size: 16px; line-height: 1;
}
.baris-poin .hapus-poin:hover { background: #FBEBEB; color: var(--bahaya); }
.tambah-poin { margin-top: 10px; }

/* ---------- Unggah gambar ---------- */

.zona-unggah {
  border: 2px dashed #CBD2D9; border-radius: var(--radius);
  background: #FAFBFC;
  padding: 26px 18px; text-align: center;
  color: var(--tinta-redup); font-size: 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.zona-unggah:hover, .zona-unggah.seret { border-color: var(--aksen); background: var(--aksen-muda); color: var(--aksen-tua); }
.zona-unggah b { color: var(--tinta); }
.zona-unggah input { display: none; }

.rak-gambar {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px; margin-top: 14px;
}
.kartu-gambar {
  position: relative; border-radius: 12px; overflow: hidden;
  aspect-ratio: 1 / 1; background: var(--isian);
  box-shadow: inset 0 0 0 1px rgba(29, 39, 51, 0.06);
}
.kartu-gambar img { width: 100%; height: 100%; object-fit: cover; }
.kartu-gambar .label-utama {
  position: absolute; top: 6px; left: 6px;
  background: rgba(29, 39, 51, 0.82); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  padding: 3px 7px; border-radius: 999px;
}
.kartu-gambar .aksi-gambar {
  position: absolute; inset: auto 0 0 0;
  display: flex; justify-content: space-between;
  background: linear-gradient(transparent, rgba(20, 26, 34, 0.72));
  padding: 20px 5px 5px;
}
.kartu-gambar .aksi-gambar button {
  width: 26px; height: 26px; border: 0; border-radius: 7px;
  background: rgba(255, 255, 255, 0.92); color: var(--tinta);
  font-size: 13px; line-height: 1;
}
.kartu-gambar .aksi-gambar button:hover { background: #fff; }
.kartu-gambar .aksi-gambar .hapus-gambar { color: var(--bahaya); }
.kartu-gambar.mengunggah::after {
  content: "Mengunggah…"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.7); font-size: 11px; color: var(--tinta-redup);
}

/* ---------- Pixel ---------- */

.kisi-pixel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .kisi-pixel { grid-template-columns: 1fr; } }
.lencana-pixel {
  display: inline-block; font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 999px; padding: 2px 8px; margin-left: 6px;
}
.lencana-meta { background: #E8EEFB; color: #2455C3; }
.lencana-tiktok { background: #E9E9EB; color: #16181C; }
.lencana-google { background: #E6F2E8; color: #1E7B34; }

/* ---------- Warna tema ---------- */

.pilih-warna { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.contoh-warna {
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  box-shadow: inset 0 0 0 1px rgba(29, 39, 51, 0.12);
  transition: transform 0.12s ease;
}
.contoh-warna:hover { transform: scale(1.1); }
.contoh-warna.terpilih { box-shadow: 0 0 0 3px #fff, 0 0 0 5.5px var(--tinta); }
.pilih-warna input[type="color"] {
  width: 42px; height: 34px; border: 0; padding: 0;
  border-radius: 9px; background: var(--isian); cursor: pointer;
}

/* ---------- Status segmen ---------- */

.segmen {
  display: inline-flex; background: var(--isian);
  border-radius: 999px; padding: 4px; gap: 4px;
}
.segmen button {
  border: 0; background: transparent; border-radius: 999px;
  font-size: 13px; font-weight: 700; padding: 8px 18px;
  color: var(--tinta-redup);
  transition: background 0.15s ease, color 0.15s ease;
}
.segmen button.aktif-draf { background: #fff; color: var(--tinta); box-shadow: 0 1px 4px rgba(29,39,51,0.14); }
.segmen button.aktif-terbit { background: var(--sinyal); color: #fff; box-shadow: 0 2px 8px rgba(18,144,126,0.35); }

/* ---------- Panel pratinjau ponsel (tanda tangan desain) ---------- */

.panel-pratinjau { position: sticky; top: 82px; }
@media (max-width: 980px) { .panel-pratinjau { position: static; } }
.panel-pratinjau .keterangan-pratinjau {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.panel-pratinjau .keterangan-pratinjau h2 {
  font-size: 13px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--tinta-redup);
}
.titik-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: var(--aksen);
}
.titik-live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--aksen);
  animation: denyut 1.6s ease-in-out infinite;
}
@keyframes denyut { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .titik-live::before { animation: none; } }

.ponsel {
  width: 100%; max-width: 340px; margin: 0 auto;
  background: #10151C; border-radius: 34px; padding: 10px;
  box-shadow: var(--bayang-naik);
}
.ponsel-layar {
  background: #fff; border-radius: 26px; overflow: hidden;
  height: 600px; overflow-y: auto; scrollbar-width: thin;
  position: relative;
}

/* Isi layar pratinjau meniru halaman landing */
.pl-galeri { position: relative; background: #F1EFEA; aspect-ratio: 1 / 1; }
.pl-galeri img { width: 100%; height: 100%; object-fit: cover; }
.pl-galeri .pl-kosong {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: #9AA4AF; font-size: 13px;
}
.pl-dots { position: absolute; bottom: 24px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.pl-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.7); border: 1px solid rgba(0,0,0,0.12); }
.pl-isi { position: relative; background: #fff; border-radius: 20px 20px 0 0; margin-top: -16px; padding: 20px 18px 90px; }
.pl-isi h3 { font-size: 19px; font-weight: 800; line-height: 1.3; letter-spacing: -0.01em; }
.pl-harga-baris { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 10px 0 2px; }
.pl-harga { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.pl-harga-coret { font-size: 13px; color: #9AA4AF; text-decoration: line-through; }
.pl-diskon { font-size: 10px; font-weight: 700; color: #fff; border-radius: 999px; padding: 2px 8px; }
.pl-poin { list-style: none; margin-top: 14px; display: grid; gap: 8px; }
.pl-poin li { display: flex; gap: 8px; font-size: 13px; align-items: flex-start; }
.pl-cek {
  flex: 0 0 auto; width: 17px; height: 17px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; margin-top: 2px;
}
.pl-pemisah { border: 0; border-top: 1px solid #ECEAE5; margin: 16px 0; }
.pl-deskripsi p { font-size: 13px; color: #333B46; margin-bottom: 10px; line-height: 1.6; }
.pl-aksi {
  position: sticky; bottom: 0; margin: 0 -18px -90px;
  display: flex; gap: 10px; align-items: center;
  background: rgba(255,255,255,0.95); border-top: 1px solid #ECEAE5;
  padding: 10px 14px;
}
.pl-aksi .pl-aksi-harga { font-size: 14px; font-weight: 800; white-space: nowrap; }
.pl-aksi .pl-aksi-harga small { display: block; font-size: 9px; font-weight: 500; color: #9AA4AF; }
.pl-tombol {
  flex: 1; text-align: center; color: #fff; font-size: 13px; font-weight: 700;
  padding: 12px; border-radius: 12px;
}

/* ---------- Daftar landing page ---------- */

.kisi-landing {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.kartu-landing {
  background: var(--kartu); border-radius: var(--radius);
  box-shadow: var(--bayang-kartu); overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex; flex-direction: column;
}
.kartu-landing:hover { transform: translateY(-3px); box-shadow: var(--bayang-naik); }
@media (prefers-reduced-motion: reduce) { .kartu-landing, .kartu-landing:hover { transform: none; transition: none; } }
.kartu-landing .gambar-mini {
  aspect-ratio: 16 / 10; background: var(--isian); position: relative; cursor: pointer;
}
.kartu-landing .gambar-mini img { width: 100%; height: 100%; object-fit: cover; }
.kartu-landing .gambar-mini .tanpa-gambar {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: #9AA4AF; font-size: 13px;
}
.pil-status {
  position: absolute; top: 10px; left: 10px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 10px;
}
.pil-terbit { background: var(--sinyal); color: #fff; }
.pil-draf { background: rgba(29, 39, 51, 0.78); color: #fff; }
.kartu-landing .badan { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.kartu-landing h3 { font-size: 15.5px; font-weight: 800; line-height: 1.35; letter-spacing: -0.01em; }
.tautan-slug {
  font-family: var(--mono); font-size: 11.5px; color: var(--tinta-redup);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.baris-stat { display: flex; gap: 16px; margin-top: 2px; }
.stat { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.stat small {
  display: block; font-family: inherit; font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--tinta-redup);
}
.stat.stat-klik { color: var(--sinyal); }
.kartu-landing .kaki-kartu {
  display: flex; gap: 6px; margin-top: auto; padding-top: 8px;
  border-top: 1px solid var(--garis);
}
.kartu-landing .kaki-kartu .tombol { flex: 1; }

.kosong-besar {
  background: var(--kartu); border-radius: var(--radius);
  box-shadow: var(--bayang-kartu);
  padding: 60px 30px; text-align: center;
}
.kosong-besar .ikon { font-size: 40px; margin-bottom: 10px; }
.kosong-besar h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.kosong-besar p { color: var(--tinta-redup); font-size: 14px; margin-bottom: 20px; }

/* ---------- Statistik ---------- */

.pilih-rentang { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.keping {
  border: 0; background: var(--isian); color: var(--tinta-redup);
  font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 8px 14px;
  transition: background 0.15s ease, color 0.15s ease;
}
.keping:hover { background: #E7EAEE; }
.keping.terpilih { background: var(--tinta); color: #fff; }

.medan-tanggal {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--isian); border-radius: 999px; padding: 4px 6px 4px 12px;
  font-size: 12.5px; font-weight: 700; color: var(--tinta-redup);
  cursor: pointer;
}
.medan-tanggal input[type="date"] {
  border: 0; background: #fff; border-radius: 999px;
  font-family: var(--mono); font-size: 12px; padding: 5px 10px;
  color: var(--tinta); cursor: pointer;
}
.medan-tanggal input[type="date"]:focus { outline: 2px solid var(--aksen); }

.ringkasan-stat { display: flex; gap: 26px; margin: 16px 0 6px; }
.ringkasan-stat .stat { font-size: 24px; }

.grafik-stat { width: 100%; margin-top: 8px; }
.grafik-stat svg { width: 100%; height: auto; display: block; }
.legenda-stat { display: flex; gap: 18px; margin-top: 8px; font-size: 12px; color: var(--tinta-redup); }
.legenda-stat i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

/* ---------- Toast & dialog ---------- */

#wadah-toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 90; display: grid; gap: 8px; width: min(92vw, 420px);
}
.toast {
  background: var(--tinta); color: #fff;
  border-radius: 12px; padding: 13px 18px; font-size: 14px;
  box-shadow: var(--bayang-naik);
  animation: toast-masuk 0.25s ease;
}
.toast-gagal { background: var(--bahaya); }
.toast-sukses { background: var(--sinyal); }
@keyframes toast-masuk { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

.tirai {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(16, 21, 28, 0.5);
  display: grid; place-items: center; padding: 24px;
}
.dialog {
  background: #fff; border-radius: 18px; padding: 26px;
  width: 100%; max-width: 400px; box-shadow: var(--bayang-naik);
}
.dialog h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.dialog p { font-size: 14px; color: var(--tinta-redup); margin-bottom: 20px; }
.dialog .aksi-dialog { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- Bilah aksi editor ---------- */

.bilah-simpan {
  position: sticky; bottom: 0; z-index: 30;
  margin-top: 22px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px);
  border-radius: var(--radius);
  box-shadow: var(--bayang-naik);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.bilah-simpan .dorong { margin-left: auto; display: flex; gap: 10px; align-items: center; }
