/* =====================================================================
   SEJOIN.ID — Stylesheet aplikasi
   Mobile first · WebView friendly · dominan hijau #00AA5B
   ===================================================================== */

:root {
  --green:        #00AA5B;   /* warna aksi: tombol, tautan, progress */
  --green-dark:   #008F4C;
  --green-soft:   #E6F7EF;
  --green-tint:   #F2FBF7;

  /* Hijau tua untuk header & hero — lebih pekat daripada warna tombol */
  --green-deep:   #00552A;
  --green-deep-2: #008140;

  /* Warna teks. Angka di komentar = rasio kontras terhadap latar putih
     (WCAG: 4.5:1 minimum AA, 7:1 AAA). Jangan diterangkan lagi. */
  --ink:          #0E1113;   /* 18.9:1  teks utama          */
  --ink-2:        #2B3137;   /* 13.2:1  teks sekunder       */
  --muted:        #575F67;   /*  6.5:1  keterangan & label  */
  --green-text:   #00703C;   /*  6.2:1  tautan & teks hijau */
  --line:         #E8EBEE;
  --bg:           #F5F7F8;
  --white:        #FFFFFF;

  --warn:         #E8A400;
  --warn-soft:    #FFF6E0;
  --danger:       #E03131;
  --danger-soft:  #FFECEC;
  --info:         #1C7ED6;

  /* Warna identitas tiap produk (dipakai lewat kelas .p-sport dst.) */
  --c-sport:        #00A055;  --c-sport-dark:   #00703B;  --c-sport-soft:   #E6F5EE;
  --c-digital:      #D92D20;  --c-digital-dark: #A81D13;  --c-digital-soft: #FDECEA;
  --c-ride:         #E09600;  --c-ride-dark:    #8F6200;  --c-ride-soft:    #FFF4DC;
  --c-class:        #1C6FD6;  --c-class-dark:   #14509C;  --c-class-soft:   #E8F1FD;

  --radius:       16px;
  --radius-sm:    10px;
  --radius-lg:    22px;

  --shadow:       0 1px 2px rgba(26, 29, 31, .05), 0 6px 18px rgba(26, 29, 31, .06);
  --shadow-nav:   0 -2px 14px rgba(26, 29, 31, .08);

  --nav-h:        62px;
  --safe-bottom:  env(safe-area-inset-bottom, 0px);
  --safe-top:     env(safe-area-inset-top, 0px);
}

* , *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Ubuntu", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body.has-nav { padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------------------------------------------------------------------
   Layout dasar
   --------------------------------------------------------------------- */
.app      { max-width: 520px; margin: 0 auto; min-height: 100svh; background: var(--bg); position: relative; }
.section  { padding: 16px; }
.section + .section { padding-top: 0; }

.stack    { display: flex; flex-direction: column; gap: 12px; }
.row      { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.grow     { flex: 1; min-width: 0; }
.center   { text-align: center; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2  { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------------------------------------------------------------
   Header
   --------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: calc(10px + var(--safe-top)) 14px 10px;
  display: flex; align-items: center; gap: 12px;
}

.topbar--green {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-deep-2) 100%);
  border-bottom: none;
  color: var(--white);
}

.topbar__title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.topbar__back {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; border: none; background: transparent; cursor: pointer;
}
.topbar--green .topbar__back { color: var(--white); }

.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; letter-spacing: -.03em; }
.brand__mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: var(--white); color: var(--green);
  display: grid; place-items: center; font-size: 17px; font-weight: 900;
}

.iconbtn {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; border: none; background: rgba(255,255,255,.18);
  color: inherit; cursor: pointer; position: relative;
}
.iconbtn--plain { background: var(--bg); color: var(--ink-2); }
.iconbtn__dot {
  position: absolute; top: 7px; right: 8px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; display: grid; place-items: center;
}

/* ---------------------------------------------------------------------
   Home hero
   --------------------------------------------------------------------- */
.hero {
  background: linear-gradient(160deg, var(--green-deep) 0%, var(--green-deep-2) 100%);
  color: var(--white);
  padding: calc(12px + var(--safe-top)) 16px 58px;
  position: relative;
}
.hero__greet { font-size: 13px; opacity: .9; }
.hero__ask   { font-size: 19px; font-weight: 700; margin-top: 10px; letter-spacing: -.02em; }

.searchbar {
  margin: 14px 0 0;
  background: var(--white);
  border-radius: 999px;
  padding: 11px 16px;
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 14px;
  box-shadow: var(--shadow);
}
.searchbar input { border: none; outline: none; background: transparent; width: 100%; color: var(--ink); }
.searchbar input::placeholder { color: var(--muted); }

/* Kartu 4 produk utama — naik menimpa hero */
.products {
  margin: -44px 14px 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px 8px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  position: relative; z-index: 2;
}
.product {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 6px 2px; border-radius: var(--radius-sm);
  transition: background .15s ease;
}
.product:active { background: var(--pc-soft, var(--green-tint)); }
.product__icon {
  width: 50px; height: 50px; border-radius: 16px;
  display: grid; place-items: center; font-size: 24px;
  background: var(--pc-soft, var(--green-soft));
}
.product__name { font-size: 12.5px; font-weight: 700; letter-spacing: -.01em; }
.product__sub  { font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.25; }

/* ---------------------------------------------------------------------
   Tombol
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 18px; min-height: 46px;
  border: none; border-radius: 12px;
  background: var(--green); color: var(--white);
  font-size: 15px; font-weight: 700; letter-spacing: -.01em;
  cursor: pointer; width: 100%;
  transition: filter .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.985); filter: brightness(.95); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.btn--ghost   { background: var(--white); color: var(--green-text); border: 1.5px solid var(--green); }
.btn--soft    { background: var(--green-soft); color: var(--green-text); }
.btn--muted   { background: var(--white); color: var(--ink-2); border: 1.5px solid var(--line); }
.btn--danger  { background: var(--danger-soft); color: var(--danger); }
.btn--sm      { padding: 9px 14px; min-height: 38px; font-size: 13.5px; border-radius: 10px; width: auto; }
.btn--inline  { width: auto; }

/* Tombol mengambang "+ Buat Sejoin" */
.fab {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 14px);
  z-index: 45;
  width: auto; padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 170, 91, .38);
}

/* ---------------------------------------------------------------------
   Kartu
   --------------------------------------------------------------------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card__body { padding: 14px; }
.card__pad  { padding: 14px; }

.sejoin-card { display: flex; flex-direction: column; }
.sejoin-card__cover {
  height: 132px; background: var(--pc-soft, var(--green-soft));
  display: grid; place-items: center; font-size: 42px; position: relative;
  background-size: cover; background-position: center;
}
.sejoin-card__cover picture { display: block; width: 52px; height: 52px; }
.sejoin-card__type {
  position: absolute; top: 10px; left: 10px;
  background: rgba(255,255,255,.94); color: var(--pc-dark, var(--green-dark));
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
}
.sejoin-card__title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 6px; }
.sejoin-card__meta  { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.sejoin-card__foot {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
}
.price      { font-size: 17px; font-weight: 800; color: var(--pc-dark, var(--green)); letter-spacing: -.02em; }
.price__per { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------------------------
   Warna identitas produk
   Dipasang sebagai kelas pada elemen pembungkus (kartu, thumbnail, cover),
   lalu dibaca komponen di dalamnya lewat var(--pc*).
   --------------------------------------------------------------------- */
.p-sport   { --pc: var(--c-sport);   --pc-dark: var(--c-sport-dark);   --pc-soft: var(--c-sport-soft); }
.p-digital { --pc: var(--c-digital); --pc-dark: var(--c-digital-dark); --pc-soft: var(--c-digital-soft); }
.p-ride    { --pc: var(--c-ride);    --pc-dark: var(--c-ride-dark);    --pc-soft: var(--c-ride-soft); }
.p-class   { --pc: var(--c-class);   --pc-dark: var(--c-class-dark);   --pc-soft: var(--c-class-soft); }

/* ---------------------------------------------------------------------
   Ikon produk (berkas gambar, sudah bersudut membulat + alpha)
   --------------------------------------------------------------------- */
.picon { display: block; width: 100%; height: 100%; object-fit: contain; }

/* Wadah .product__icon tanpa latar dan tanpa pemotongan: ikonnya sudah
   punya latar dan sudut membulat sendiri, jadi border-radius wadah justru
   akan menggerus sudutnya. */
.product__icon--img {
  background: none; padding: 0;
  border-radius: 0; overflow: visible;
  width: 52px; height: 52px;
}

/* Thumbnail persegi untuk kartu Pesanan / ringkasan */
/* Ikon produk kecil yang sebaris dengan teks (panel admin) */
.ikon-baris { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.ikon-baris picture { display: block; width: 26px; height: 26px; flex: none; }

.thumb-produk {
  width: 56px; height: 56px; flex: none;
  border-radius: 13px; overflow: hidden;
  display: grid; place-items: center;
  background: var(--pc-soft, var(--green-soft));
}

/* ---------------------------------------------------------------------
   Grid 2 kolom — tampilan daftar Sejoin di Home, listing, dan profil
   --------------------------------------------------------------------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

/* Kartu ringkas: muat dua kolom bahkan di layar 360px */
.sejoin-card .card__body { padding: 9px 10px 10px; }

.sejoin-card__cover     { height: 86px; font-size: 30px; }
.sejoin-card__type      { top: 6px; left: 6px; padding: 3px 7px; font-size: 9.5px; }

.sejoin-card__title {
  font-size: 12.5px; line-height: 1.3; margin: 0 0 5px;
  min-height: 2.6em;           /* dua baris, supaya tinggi kartu rata */
}

.sejoin-card .sejoin-card__meta     { font-size: 10.5px; gap: 4px; line-height: 1.35; }
.sejoin-card .sejoin-card__meta svg { width: 11px; height: 11px; flex: none; }

.sejoin-card .slot-line { font-size: 10px; margin-bottom: 4px; }
.sejoin-card .progress  { height: 4px; }
.sejoin-card .badge     { padding: 2px 6px; font-size: 9.5px; }

.sejoin-card .sejoin-card__foot {
  margin-top: 9px; padding-top: 9px;
  display: block;               /* harga di atas, creator di bawah */
}
.sejoin-card .price       { font-size: 15px; }
.sejoin-card .price__per  { font-size: 10px; margin-left: 1px; }

.sejoin-card__by {
  display: flex; align-items: center; gap: 5px;
  margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line);
  min-width: 0;
}
.sejoin-card__by .avatar { width: 20px; height: 20px; font-size: 9px; }
.sejoin-card__by-name    { font-size: 10.5px; font-weight: 700; }
.sejoin-card__by .rating { font-size: 10.5px; gap: 2px; }
.sejoin-card__by .rating svg { width: 10px; height: 10px; }

/* Kartu ringkas untuk daftar horizontal */
.hscroll {
  display: flex; gap: 12px; overflow-x: auto; padding: 2px 16px 6px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { flex: 0 0 calc(50% - 6px); scroll-snap-align: start; }

/* ---------------------------------------------------------------------
   Badge, chip, progress
   --------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .01em;
}
.badge--ok    { background: var(--green-soft);  color: var(--green-dark); }
.badge--warn  { background: var(--warn-soft);   color: #8A5F00; }
.badge--full  { background: #EDF2F7;            color: #343C48; }
.badge--off   { background: var(--danger-soft); color: var(--danger); }
.badge--muted { background: var(--bg);          color: var(--muted); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 14px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.chip--on { background: var(--green); border-color: var(--green); color: var(--white); }

.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress__bar { height: 100%; background: var(--pc, var(--green)); border-radius: 999px; transition: width .3s ease; }

.slot-line { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

/* ---------------------------------------------------------------------
   Avatar
   --------------------------------------------------------------------- */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  color: #fff; font-weight: 700; font-size: 14px;
  background: var(--green); background-size: cover; background-position: center;
}
.avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.avatar--lg { width: 64px; height: 64px; font-size: 22px; }
.avatar--xl { width: 82px; height: 82px; font-size: 28px; }

.rating { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.rating svg { color: var(--warn); }

/* ---------------------------------------------------------------------
   Judul section
   --------------------------------------------------------------------- */
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 18px 16px 10px;
}
.sec-head h2 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.sec-head a  { font-size: 13px; font-weight: 700; color: var(--green-text); }
.sec-sub { padding: 0 16px; margin: -6px 0 10px; font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------------
   Form
   --------------------------------------------------------------------- */
.field { margin-bottom: 14px; }
.field > label {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

.input, .select, .textarea {
  width: 100%; padding: 12px 14px; min-height: 46px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--white); outline: none;
  font-size: 16px;   /* >=16px mencegah iOS auto-zoom saat input difokuskan */
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 170, 91, .12);
}
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237C858E' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; background-size: 17px; padding-right: 38px; }

.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.alert { padding: 12px 14px; border-radius: 12px; font-size: 13.5px; margin-bottom: 14px; font-weight: 600; }
.alert--err  { background: var(--danger-soft); color: var(--danger); }
.alert--ok   { background: var(--green-soft);  color: var(--green-dark); }
.alert--info { background: #E7F1FF;            color: var(--info); }

/* ---------------------------------------------------------------------
   Bottom navigation — HANYA Home | Pesanan | Chat | Akun
   --------------------------------------------------------------------- */
.bottomnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 50;
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-nav);
  padding-bottom: var(--safe-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.navitem {
  height: var(--nav-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 10.5px; font-weight: 600;
  position: relative;
}
.navitem--on { color: var(--green); font-weight: 800; }
.navitem__badge {
  position: absolute; top: 8px; right: 50%; margin-right: -22px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; display: grid; place-items: center;
}

/* ---------------------------------------------------------------------
   Tab
   --------------------------------------------------------------------- */
.tabs {
  display: flex; background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.tab {
  flex: 1; text-align: center; padding: 13px 6px;
  font-size: 14px; font-weight: 700; color: var(--muted);
  border-bottom: 2.5px solid transparent; cursor: pointer;
}
.tab--on { color: var(--green); border-bottom-color: var(--green); }

/* ---------------------------------------------------------------------
   List item (akun, chat)
   --------------------------------------------------------------------- */
.list { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.list-item:last-child { border-bottom: none; }
.list-item:active { background: var(--green-tint); }
.list-item__title { font-size: 14.5px; font-weight: 600; }
.list-item__sub   { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.list-item__chev  { color: var(--muted); flex: none; }

/* ---------------------------------------------------------------------
   Sheet / modal
   --------------------------------------------------------------------- */
.sheet-back {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(26, 29, 31, .45);
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
.sheet-back.open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed; bottom: 0; left: 50%; transform: translate(-50%, 100%);
  width: 100%; max-width: 520px; z-index: 61;
  background: var(--white);
  border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(20px + var(--safe-bottom));
  transition: transform .28s cubic-bezier(.2, .8, .3, 1);
  max-height: 86svh; overflow-y: auto;
}
.sheet.open { transform: translate(-50%, 0); }
.sheet__grip { width: 40px; height: 4px; border-radius: 999px; background: var(--line); margin: 6px auto 14px; }
.sheet__title { font-size: 16px; font-weight: 800; margin: 0 0 14px; letter-spacing: -.02em; }

/* ---------------------------------------------------------------------
   Chat
   --------------------------------------------------------------------- */
.chat-wrap {
  display: flex; flex-direction: column;
  height: 100svh; max-width: 520px; margin: 0 auto; background: var(--bg);
}
.chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 16px; font-size: 14px; word-wrap: break-word; }
.bubble--in  { background: var(--white); border-bottom-left-radius: 5px; box-shadow: var(--shadow); align-self: flex-start; }
.bubble--out { background: var(--green); color: #fff; border-bottom-right-radius: 5px; align-self: flex-end; }
.bubble--sys {
  align-self: center; background: rgba(26,29,31,.06); color: var(--ink-2);
  font-size: 11.5px; padding: 6px 12px; border-radius: 999px; max-width: 90%; text-align: center; font-weight: 600;
}
.bubble__who  { font-size: 11px; font-weight: 800; color: var(--green-text); margin-bottom: 2px; }
.bubble__time { font-size: 10px; opacity: .78; margin-top: 3px; text-align: right; }

.chat-input {
  display: flex; gap: 8px; align-items: flex-end;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: var(--white); border-top: 1px solid var(--line);
}
.chat-input textarea {
  flex: 1; border: 1.5px solid var(--line); border-radius: 20px;
  padding: 10px 14px; max-height: 110px; min-height: 42px;
  resize: none; outline: none; font-size: 16px;
}
.chat-input textarea:focus { border-color: var(--green); }
.chat-send {
  width: 42px; height: 42px; flex: none; border: none; border-radius: 50%;
  background: var(--green); color: #fff; display: grid; place-items: center; cursor: pointer;
}

/* ---------------------------------------------------------------------
   Empty state & skeleton
   --------------------------------------------------------------------- */
.empty { text-align: center; padding: 54px 28px; color: var(--muted); }
.empty__icon { font-size: 46px; margin-bottom: 12px; opacity: .75; }
.empty__title { font-size: 15px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.empty p { font-size: 13px; margin: 0 0 16px; }

.skeleton { background: linear-gradient(90deg, #EEF1F3 25%, #F7F9FA 50%, #EEF1F3 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------------------------------------------------------------------
   Detail
   --------------------------------------------------------------------- */
.detail-cover { height: 205px; background: var(--pc-soft, var(--green-soft)); display: grid; place-items: center; font-size: 62px; background-size: cover; background-position: center; }
.detail-cover picture { display: block; width: 96px; height: 96px; }
.detail-title { font-size: 19px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.kv { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv__k { color: var(--muted); flex: none; width: 108px; font-size: 13px; }
.kv__v { flex: 1; font-weight: 600; }

.paybar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 48;
  background: var(--white); border-top: 1px solid var(--line);
  box-shadow: var(--shadow-nav);
  padding: 12px 16px calc(12px + var(--safe-bottom));
  display: flex; align-items: center; gap: 14px;
}
body.has-paybar { padding-bottom: 96px; }

/* ---------------------------------------------------------------------
   Toast
   --------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 30px);
  transform: translate(-50%, 20px);
  background: var(--ink); color: #fff;
  padding: 11px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; z-index: 90;
  opacity: 0; pointer-events: none; transition: all .25s ease;
  max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------------
   Auth
   --------------------------------------------------------------------- */
.auth { min-height: 100svh; display: flex; flex-direction: column; background: var(--white); }
.auth__head {
  background: linear-gradient(160deg, var(--green-deep) 0%, var(--green-deep-2) 100%);
  color: #fff; padding: calc(46px + var(--safe-top)) 24px 40px;
  border-radius: 0 0 26px 26px;
}
.auth__logo { font-size: 32px; font-weight: 900; letter-spacing: -.04em; }
.auth__tag  { font-size: 14px; opacity: .92; margin-top: 6px; }
.auth__body { padding: 26px 20px 40px; flex: 1; max-width: 520px; width: 100%; margin: 0 auto; }
.auth__switch { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--muted); }
.auth__switch a { color: var(--green-text); font-weight: 700; }

.demo-box { margin-top: 22px; padding: 13px; background: var(--green-tint); border: 1px dashed var(--green); border-radius: 12px; font-size: 12px; color: var(--ink-2); }
.demo-box b { color: var(--green-text); }
.demo-box code { background: var(--white); padding: 1px 5px; border-radius: 5px; font-size: 11.5px; }

/* ---------------------------------------------------------------------
   PANEL PENGELOLA — menu di samping
   Layar lebar: menu tetap di kiri. Layar sempit: menu jadi laci geser.
   --------------------------------------------------------------------- */
:root { --panel-lebar: 236px; }

body.panel { background: var(--bg); }

.panel__side {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--panel-lebar);
  background: var(--white); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 60;
  padding: 16px 12px 12px;
  overflow-y: auto;
}

.panel__brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.panel__brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--green-deep), var(--green-deep-2));
  color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 900;
}
.panel__brand-nama { display: block; font-size: 17px; font-weight: 900; letter-spacing: -.03em; }
.panel__brand-sub  { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }

/* Penanda cakupan produk untuk admin yang dibatasi */
.panel__scope {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; margin: 0 0 14px;
  border-radius: 12px; background: var(--pc-soft, var(--green-soft));
}
.panel__scope picture { display: block; width: 30px; height: 30px; flex: none; }
.panel__scope-label { display: block; font-size: 10px; font-weight: 700; color: var(--pc-dark, var(--green-dark)); opacity: .85; }
.panel__scope-nama  { display: block; font-size: 13px; font-weight: 800; color: var(--pc-dark, var(--green-dark)); }

.panel__menu { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.panel__menu a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 11px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
}
.panel__menu a svg { flex: none; opacity: .8; }
.panel__menu a:hover { background: var(--bg); }
.panel__menu a.on {
  background: var(--green-soft); color: var(--green-text); font-weight: 800;
}
.panel__menu a.on svg { opacity: 1; }

.panel__akun { border-top: 1px solid var(--line); padding: 14px 8px 4px; margin-top: 10px; }
.panel__akun-nama { font-size: 13.5px; font-weight: 800; margin-bottom: 6px; }

/* --- Isi --- */
.panel__utama { margin-left: var(--panel-lebar); min-height: 100svh; }

.panel__bar {
  position: sticky; top: 0; z-index: 40;
  background: var(--white); border-bottom: 1px solid var(--line);
  padding: 0 20px; height: 58px;
  display: flex; align-items: center; gap: 12px;
}
.panel__judul { font-size: 16px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.panel__bar-scope { margin-left: auto; }

.panel__toggle {
  display: none; width: 38px; height: 38px; margin-left: -8px;
  border: none; background: none; color: var(--ink); cursor: pointer;
  border-radius: 9px; place-items: center;
}
.panel__toggle:active { background: var(--bg); }

.panel__isi { padding: 20px; max-width: 1180px; }

.panel__backdrop {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(14, 17, 19, .45);
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
.panel__backdrop.open { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  .panel__side {
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.2, .8, .3, 1);
    box-shadow: 0 0 40px rgba(14, 17, 19, .18);
  }
  .panel__side.open { transform: none; }
  .panel__utama { margin-left: 0; }
  .panel__toggle { display: grid; }
  .panel__isi { padding: 14px; }
  .panel__bar { padding: 0 14px; }
}

/* --- Komponen isi panel --- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat__label { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat__value { font-size: 23px; font-weight: 800; margin-top: 5px; letter-spacing: -.02em; }

.table-wrap { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { background: var(--bg); font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
table.data tr:last-child td { border-bottom: none; }
table.data td.wrap { white-space: normal; min-width: 200px; }

/* Baris tab/filter di dalam halaman panel */
.filter-baris { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-baris a {
  padding: 7px 13px; border-radius: 999px; background: var(--white);
  font-size: 13px; font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow);
}
.filter-baris a.on { background: var(--green); color: #fff; }

/* ---------------------------------------------------------------------
   Aksesibilitas
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

:focus-visible { outline: 2.5px solid var(--green); outline-offset: 2px; }

/* =====================================================================
   REGISTRASI 3 LANGKAH
   Mobile-first, banyak ruang kosong, latar putih, satu tombol utama
   selebar layar. Tinggi input 54px agar nyaman disentuh.
   ===================================================================== */
.reg {
  min-height: 100svh;
  background: var(--white);
  display: flex; flex-direction: column;
  max-width: 520px; margin: 0 auto;
}

.reg__top {
  padding: calc(10px + var(--safe-top)) 20px 0;
  display: flex; align-items: center; gap: 12px;
  min-height: 52px;
}

.reg__back {
  width: 38px; height: 38px; margin-left: -9px; flex: none;
  display: grid; place-items: center;
  border: none; background: none; color: var(--ink); cursor: pointer;
  border-radius: 50%;
}
.reg__back:active { background: var(--bg); }

.reg__langkah { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-left: auto; }

/* Progress bar tipis */
.reg__bar { height: 3px; background: var(--line); margin: 12px 20px 0; border-radius: 999px; overflow: hidden; }
.reg__bar span {
  display: block; height: 100%; border-radius: 999px;
  background: var(--green); transition: width .35s cubic-bezier(.2,.8,.3,1);
}

.reg__body { flex: 1; padding: 30px 20px 24px; }

.reg__judul {
  font-size: 25px; font-weight: 800; letter-spacing: -.03em;
  margin: 0 0 8px; line-height: 1.2;
}
.reg__sub {
  font-size: 14px; color: var(--muted); line-height: 1.6;
  margin: 0 0 28px;
}

/* --- Input besar --------------------------------------------------- */
.reg .input, .reg .select {
  min-height: 54px; border-radius: 14px;
  border-color: var(--line); font-size: 16px;
}
.reg .input:focus, .reg .select:focus { border-color: var(--green); }
.reg .field { margin-bottom: 18px; }
.reg .field > label { font-size: 13px; margin-bottom: 7px; }

.reg .btn { min-height: 54px; border-radius: 14px; font-size: 16px; }

/* Input nomor dengan awalan +62 menyatu */
.phone-input {
  display: flex; align-items: stretch;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--white); overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.phone-input:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,170,91,.12); }
.phone-input__kode {
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px 0 16px; flex: none;
  font-size: 16px; font-weight: 700; color: var(--ink);
  border-right: 1.5px solid var(--line); background: var(--bg);
}
.phone-input input {
  flex: 1; min-width: 0; min-height: 54px;
  border: none; outline: none; padding: 0 16px;
  font-size: 16px; letter-spacing: .01em; background: none;
}

/* --- Kotak OTP ------------------------------------------------------ */
.otp-kotak { display: flex; gap: 9px; justify-content: space-between; margin-bottom: 22px; }
.otp-kotak input {
  flex: 1; min-width: 0; height: 58px;
  text-align: center; font-size: 22px; font-weight: 800;
  border: 1.5px solid var(--line); border-radius: 13px;
  background: var(--white); outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  -moz-appearance: textfield;
}
.otp-kotak input::-webkit-outer-spin-button,
.otp-kotak input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.otp-kotak input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,170,91,.12); }
.otp-kotak input.terisi { border-color: var(--green); background: var(--green-tint); }

.otp-kirim { text-align: center; font-size: 13.5px; color: var(--muted); margin: 0 0 22px; }
.otp-kirim button {
  border: none; background: none; padding: 0;
  color: var(--green-text); font-weight: 800; font-size: 13.5px; cursor: pointer;
}
.otp-kirim button[disabled] { color: var(--muted); cursor: default; font-weight: 600; }

/* --- Tombol lihat/sembunyikan password ------------------------------ */
.pass-bungkus { position: relative; }
.pass-bungkus .input { padding-right: 52px; }
.pass-lihat {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border: none; background: none;
  color: var(--muted); cursor: pointer; display: grid; place-items: center;
  border-radius: 50%;
}
.pass-lihat:active { background: var(--bg); }

/* --- Checkbox persetujuan ------------------------------------------- */
.setuju { display: flex; align-items: flex-start; gap: 11px; margin: 4px 0 24px; cursor: pointer; }
.setuju input {
  width: 22px; height: 22px; flex: none; margin: 1px 0 0;
  accent-color: var(--green); cursor: pointer;
}
.setuju span { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.setuju a { color: var(--green-text); font-weight: 700; }

/* --- Layar berhasil -------------------------------------------------- */
.reg-sukses { text-align: center; padding: 40px 8px 0; }
.reg-sukses__ikon {
  width: 86px; height: 86px; margin: 0 auto 22px;
  border-radius: 50%; background: var(--green-soft);
  display: grid; place-items: center; color: var(--green);
  animation: munculSukses .45s cubic-bezier(.2,.9,.3,1) both;
}
@keyframes munculSukses { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.reg__footer-note { font-size: 12.5px; color: var(--muted); text-align: center; margin: 20px 0 0; }
.reg__footer-note a { color: var(--green-text); font-weight: 700; }

/* Penanda kode uji selama gateway OTP belum terpasang */
.otp-uji {
  margin: 0 0 20px; padding: 12px 14px;
  border: 1px dashed var(--warn); border-radius: 12px;
  background: var(--warn-soft); color: #8A6100;
  font-size: 12.5px; line-height: 1.6; text-align: center;
}
.otp-uji b { font-size: 19px; letter-spacing: .18em; color: #7A5500; display: block; margin-top: 4px; }
