/* ============ riooto.id — mobile PWA styles ============ */

/* ---- fonts (self-hosted, offline-ready) ---- */
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('../assets/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('../assets/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Jakarta'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('../assets/fonts/jakarta-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Jakarta'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('../assets/fonts/jakarta-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ---- tokens ---- */
:root {
  --red: #e11b22;
  --red-dark: #c4141a;
  --red-soft: #fff1f1;
  --ink: #14161a;
  --ink-2: #3b414b;
  --muted: #8a919c;
  --muted-2: #6b7280;
  --bg: #f1f3f6;
  --surface: #ffffff;
  --line: #e7eaef;
  --line-2: #dfe3ea;
  --green: #12a150;
  --radius: 16px;
  --tabbar-h: 62px;
  --appbar-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --shadow-1: 0 2px 10px -4px rgba(20,22,26,.18);
  --shadow-2: 0 12px 28px -14px rgba(20,22,26,.35);
  --shadow-3: 0 -6px 24px -12px rgba(20,22,26,.28);
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Jakarta', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100dvh;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
input, select, textarea { -webkit-appearance: none; appearance: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: 'Archivo', system-ui, sans-serif; letter-spacing: -.4px; line-height: 1.15; }
::-webkit-scrollbar { width: 0; height: 0; }

/* ---- app shell ---- */
.app { max-width: 520px; margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; }
@media (min-width: 560px) {
  body { background: #d8dde4; }
  .app { box-shadow: 0 0 0 1px rgba(20,22,26,.08), 0 24px 60px -20px rgba(20,22,26,.4); }
}

/* ---- app bar ---- */
.appbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--ink);
  border-bottom: 3px solid var(--red);
  padding-top: var(--safe-t);
}
.appbar-in { height: var(--appbar-h); display: flex; align-items: center; gap: 10px; padding: 0 14px; }
.appbar.detail { background: var(--ink); }
.brand { display: flex; align-items: center; gap: 7px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--red); color: #fff;
  display: grid; place-items: center; font-family: 'Archivo'; font-weight: 900; font-size: 15px; flex: none;
}
.brand-text { font-family: 'Archivo'; font-weight: 900; font-size: 19px; color: #fff; letter-spacing: -.6px; }
.brand-text i { color: var(--red); font-style: normal; }
.appbar-title { font-family: 'Archivo'; font-weight: 800; font-size: 16.5px; color: #fff; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  color: #cfd3da; flex: none; transition: background .15s;
}
.icon-btn:active { background: #22252d; }
.icon-btn.solid { background: #22252d; color: #fff; }
.icon-btn.on { color: var(--red); }
.spacer { margin-left: auto; }
.avatar {
  width: 34px; height: 34px; border-radius: 9px; background: var(--red); color: #fff;
  display: grid; place-items: center; font-family: 'Archivo'; font-weight: 800; font-size: 13px; flex: none;
}

/* ---- screens ---- */
.screen { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); animation: fade .25s ease; }
/* Saat halaman tidak benar-benar berpindah (favorit ditekan, bot mengetik,
   toast muncul), animasi masuk tidak diulang — inilah yang dulu membuat
   layar terasa berkedip tiap kali ada pembaruan kecil. */
#root.tanpa-animasi .screen,
#root.tanpa-animasi .sheet,
#root.tanpa-animasi .sheet-overlay,
#root.tanpa-animasi .bot-panel,
#root.tanpa-animasi .bot-overlay { animation: none; }
/* detail pakai CTA bar sebagai pengganti tab bar */
.screen.has-cta { padding-bottom: calc(var(--safe-b) + 92px); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pad { padding: 0 14px; }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 14px; margin-bottom: 12px; }
.section-head h2 { font-size: 19px; font-weight: 800; color: var(--ink); }
.section-head .link { color: var(--red); font-weight: 700; font-size: 13px; flex: none; }
.section-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* ---- hero + search ---- */
.hero {
  background: radial-gradient(120% 130% at 80% 0%, #2a2f3a 0%, var(--ink) 58%);
  padding: 22px 14px 58px; color: #fff;
}
.hero-tag {
  display: inline-block; background: rgba(225,27,34,.18); color: #ff7176;
  font-weight: 700; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase;
  padding: 5px 10px; border-radius: 20px; margin-bottom: 12px;
}
.hero h1 { font-size: 29px; font-weight: 900; letter-spacing: -1px; text-wrap: balance; }
.hero p { color: #a9afba; font-size: 13.5px; margin-top: 8px; }
.hero p b { color: #fff; }

.search-card {
  margin: -44px 14px 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow-2); padding: 12px; position: relative; z-index: 5;
}
.seg { display: flex; gap: 4px; background: var(--bg); border-radius: 12px; padding: 4px; }
.seg button {
  flex: 1; font-weight: 800; font-size: 13.5px; padding: 9px 8px; border-radius: 9px;
  color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; transition: .15s;
}
.seg button.on { background: var(--ink); color: #fff; }
.searchbar {
  display: flex; align-items: center; gap: 9px; margin-top: 10px;
  height: 48px; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 0 12px;
}
.searchbar:focus-within { border-color: var(--red); }
.searchbar input { flex: 1; border: none; outline: none; font-size: 14.5px; font-weight: 600; background: none; min-width: 0; }
.searchbar input::placeholder { color: #b3b9c2; font-weight: 500; }
.btn-search {
  width: 100%; height: 48px; margin-top: 10px; background: var(--red); color: #fff;
  font-weight: 800; font-size: 15px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-search:active { background: var(--red-dark); }
.stats { display: flex; justify-content: space-around; padding: 16px 14px 0; }
.stats > div { text-align: center; }
.stats .n { font-family: 'Archivo'; font-weight: 800; font-size: 17px; color: var(--ink); }
.stats .l { font-size: 11px; color: var(--muted); font-weight: 600; }
.stats .sep { width: 1px; background: var(--line-2); }

/* ---- kartu lokasi, jam buka & cuaca ---- */
.info-kartu {
  margin: 14px 14px 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden;
}
.info-baris {
  display: flex; align-items: center; gap: 11px; padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}
.info-baris:active { background: var(--bg); }
.info-ik {
  width: 34px; height: 34px; border-radius: 11px; background: var(--red-soft);
  display: grid; place-items: center; flex: none;
}
.info-tx { min-width: 0; flex: 1; }
.info-tx b { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-tx span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.info-chev { flex: none; }

.info-bawah { display: flex; }
.info-jam, .info-cuaca { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-width: 0; flex: 1; }
.info-cuaca { border-left: 1px solid var(--line); }
.info-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none;
}
.info-dot.on { background: var(--green); animation: infoDenyut 2.2s ease-in-out infinite; }
@keyframes infoDenyut {
  0%, 100% { box-shadow: 0 0 0 0 rgba(18,161,80,.55); }
  70%      { box-shadow: 0 0 0 7px rgba(18,161,80,0); }
}

/* --- ikon cuaca --- */
.cu-wrap { width: 32px; height: 32px; flex: none; display: block; }
.cu-svg { width: 100%; height: 100%; }
.cu-cerah   { color: #f0a92b; }
.cu-berawan { color: #8fa4bd; }
.cu-mendung { color: #93a2b4; }
.cu-hujan   { color: #5b87c4; }
.cu-badai   { color: #6a6fbd; }
.cu-kabut   { color: #9aa3ad; }

.cu-berawan .cu-mentari { color: #f0a92b; }
.cu-svg .cu-sinar { transform-box: fill-box; transform-origin: center; animation: cuPutar 14s linear infinite; }
.cu-svg .cu-awan  { animation: cuGeser 5s ease-in-out infinite; }
.cu-svg .cu-tetes { animation: cuTetes 1.2s linear infinite; }
.cu-svg .cu-t2 { animation-delay: .25s; }
.cu-svg .cu-t3 { animation-delay: .5s; }
.cu-svg .cu-petir { animation: cuPetir 2.4s ease-in-out infinite; }
.cu-svg .cu-garis { animation: cuGeser 4s ease-in-out infinite; }
.cu-svg .cu-g2 { animation-delay: .5s; }

@keyframes cuPutar { to { transform: rotate(360deg); } }
@keyframes cuGeser { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(2.5px); } }
@keyframes cuTetes { 0% { opacity: 0; transform: translateY(-4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(5px); } }
@keyframes cuPetir { 0%, 55%, 100% { opacity: 1; } 62% { opacity: .25; } 70% { opacity: 1; } 78% { opacity: .35; } }

/* ---- horizontal scrollers ---- */
.hscroll {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 14px 4px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  /* Tanpa ini, scroll-snap menarik kartu pertama menempel ke tepi layar
     sehingga padding kiri termakan dan kartu tidak sejajar dengan judul. */
  scroll-padding-left: 14px;
  scroll-padding-right: 14px;
}
.hscroll > * { scroll-snap-align: start; flex: none; }

/* ---- brand chips ---- */
.brand-chip {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 10px; width: 84px; text-align: center; transition: .15s;
}
.brand-chip:active { border-color: var(--ink); transform: scale(.97); }
.brand-chip .logo {
  width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 11px; color: #fff;
  display: grid; place-items: center; font-family: 'Archivo'; font-weight: 900; font-size: 18px;
}
.brand-chip .nm { font-weight: 700; font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-chip .ct { font-size: 10.5px; color: var(--muted); font-weight: 600; }

/* ---- body type cards ---- */
.body-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 14px; }
.body-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; text-align: left; transition: .15s;
}
.body-card:active { border-color: var(--red); transform: scale(.98); }
.body-card .ic { width: 62px; height: 32px; color: var(--red-dark); }
.body-card .nm { font-family: 'Archivo'; font-weight: 800; font-size: 15px; margin-top: 10px; }
.body-card .ct { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* ---- listing card (grid / vertical) ---- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-align: left; width: 100%; transition: .15s; position: relative;
}
.card:active { transform: scale(.985); box-shadow: var(--shadow-1); }
.card-img { position: relative; aspect-ratio: 16/10; background: #e9edf1 center/cover no-repeat; }
.card-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 5px; flex-wrap: wrap; }
.badge {
  font-size: 10px; font-weight: 800; letter-spacing: .3px; padding: 4px 7px; border-radius: 6px;
  background: rgba(20,22,26,.78); color: #fff; backdrop-filter: blur(4px);
}
.badge.ad { background: #ffb703; color: #3d2c00; }
.badge.verified { background: rgba(18,161,80,.92); }
.fav-btn {
  position: absolute; top: 7px; right: 7px; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--muted);
  box-shadow: 0 2px 8px -2px rgba(0,0,0,.25);
}
.fav-btn.on { color: var(--red); }
.card-body { padding: 11px 12px 13px; }
.card-title { font-weight: 700; font-size: 14px; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card-price { font-family: 'Archivo'; font-weight: 900; font-size: 17px; color: var(--red); margin-top: 6px; letter-spacing: -.4px; }
.card-credit { font-size: 11px; color: var(--muted); font-weight: 600; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 9px; }
.pill { font-size: 10.5px; font-weight: 700; color: var(--ink-2); background: var(--bg); padding: 4px 7px; border-radius: 6px; }
.card-loc { display: flex; align-items: center; gap: 4px; margin-top: 9px; padding-top: 9px; border-top: 1px solid #eef0f3; font-size: 11.5px; color: var(--muted); font-weight: 600; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 14px; }
.hscroll .card { width: 216px; }

/* ---- list row (results) ---- */
.row-card {
  display: flex; gap: 11px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px; text-align: left; width: 100%; position: relative; transition: .15s;
}
.row-card:active { transform: scale(.99); }
.row-img { width: 122px; flex: none; aspect-ratio: 16/10; border-radius: 11px; align-self: flex-start; background: #e9edf1 center/cover no-repeat; position: relative; overflow: hidden; }
.row-img .badge { position: absolute; top: 6px; left: 6px; }
.row-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.row-main .card-title { font-size: 13.5px; min-height: 0; }
.row-main .card-price { font-size: 16px; margin-top: 4px; }

/* ---- promo banner ---- */
.promo {
  margin: 0 14px; border-radius: 18px; padding: 20px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(100deg, var(--red) 0%, #b3141a 60%, #7d0d12 100%);
}
.promo::after { content: ''; position: absolute; right: -40px; top: -40px; width: 170px; height: 170px; background: rgba(255,255,255,.09); border-radius: 50%; }
.promo .k { color: #ffd0d2; font-weight: 800; font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; }
.promo h3 { font-size: 21px; font-weight: 900; margin-top: 6px; position: relative; z-index: 1; }
.promo p { font-size: 13px; color: #ffdcde; margin-top: 6px; position: relative; z-index: 1; }
.promo .btn {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; background: #fff; color: var(--red);
  font-weight: 800; font-size: 13.5px; padding: 11px 18px; border-radius: 11px; position: relative; z-index: 1;
}

/* ---- news ---- */
.news-card { display: flex; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: left; width: 100%; }
.news-thumb { width: 92px; flex: none; aspect-ratio: 4/3; border-radius: 10px; align-self: flex-start; }
.news-cat { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--red); background: var(--red-soft); padding: 3px 7px; border-radius: 5px; }
.news-title { font-weight: 700; font-size: 13.5px; line-height: 1.35; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 6px; }

/* ---- filter bar (results) ---- */
.filterbar {
  position: sticky; top: calc(var(--appbar-h) + var(--safe-t) + 3px); z-index: 30;
  background: var(--bg); padding: 10px 0 8px; border-bottom: 1px solid var(--line);
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 14px; }
.chip {
  flex: none; display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700;
  min-height: 40px; padding: 9px 13px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2);
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.result-count { padding: 10px 14px 0; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.result-count b { color: var(--ink); }

/* ---- bottom sheet ---- */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(20,22,26,.55);
  display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { transform: translateY(100%) } to { transform: none } }
.sheet {
  width: 100%; max-width: 520px; background: var(--surface);
  border-radius: 22px 22px 0 0; padding: 8px 16px calc(16px + var(--safe-b));
  max-height: 88dvh; overflow-y: auto; animation: slideUp .26s cubic-bezier(.2,.8,.3,1);
}
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 4px auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sheet-head h3 { font-size: 18px; font-weight: 800; }
.sheet-close { font-size: 26px; line-height: 1; color: var(--muted); font-weight: 300; padding: 0 4px; }
.sheet-group { margin-top: 18px; }
.sheet-group > .lbl { font-size: 12px; font-weight: 800; color: var(--muted-2); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 9px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 22px; position: sticky; bottom: 0; background: var(--surface); padding: 10px 0 2px; }

/* ---- forms ---- */
.field { display: block; margin-bottom: 13px; }
.field > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line-2); border-radius: 11px; padding: 0 13px;
  font-size: 14.5px; font-weight: 600; background: var(--surface); height: 48px; outline: none;
}
.field textarea { height: auto; min-height: 96px; padding: 12px 13px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); }
.field select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a919c' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  font-size: 12.5px; font-weight: 700; min-height: 40px; display: flex; align-items: center; justify-content: center;
  padding: 9px 13px; border-radius: 10px;
  background: var(--bg); color: var(--ink-2); border: 1px solid transparent;
}
.opt.on { background: var(--ink); color: #fff; }
.opt-row { display: flex; gap: 8px; }
.opt-row .opt { flex: 1; text-align: center; }

.btn {
  height: 50px; border-radius: 13px; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:active { background: var(--red-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: var(--bg); color: var(--ink-2); }
.btn-wa { background: var(--green); color: #fff; }
.btn-wa:active { background: #0e8442; }
.btn-outline { background: var(--surface); border: 1.5px solid var(--line-2); color: var(--ink); }

/* ---- range slider ---- */
input[type=range] { width: 100%; height: 30px; background: none; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--line-2); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--red);
  border: 4px solid #fff; box-shadow: 0 2px 6px -1px rgba(20,22,26,.4); margin-top: -9px;
}
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line-2); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--red); border: 4px solid #fff; }

/* ---- detail ---- */
.gallery { position: relative; background: #e9edf1; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.gallery-track > div { flex: none; width: 100%; aspect-ratio: 16/10; background: #e9edf1 center/cover no-repeat; scroll-snap-align: center; }
.gallery-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.gallery-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); transition: .2s; }
.gallery-dots i.on { background: #fff; width: 18px; border-radius: 3px; }
.detail-head { background: var(--surface); padding: 16px 14px; border-bottom: 1px solid var(--line); }
.detail-head h1 { font-size: 20px; font-weight: 800; line-height: 1.25; }
.detail-price { font-family: 'Archivo'; font-weight: 900; font-size: 26px; color: var(--red); letter-spacing: -.8px; margin-top: 8px; }
.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.spec-key { background: var(--bg); border-radius: 11px; padding: 10px 6px; text-align: center; }
.spec-key .v { font-family: 'Archivo'; font-weight: 800; font-size: 13px; color: var(--ink); }
.spec-key .l { font-size: 10px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.panel { background: var(--surface); border-top: 8px solid var(--bg); padding: 16px 14px; }
.panel h3 { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.spec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.spec-list > div { background: var(--surface); padding: 10px 12px; }
.spec-list .l { font-size: 11px; color: var(--muted); font-weight: 600; }
.spec-list .v { font-size: 13px; font-weight: 700; color: var(--ink); margin-top: 1px; }
.desc { font-size: 14px; color: var(--ink-2); line-height: 1.65; }
.desc p + p { margin-top: 10px; }
.seller {
  display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 14px; padding: 13px;
}
.seller .ini { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: 'Archivo'; font-weight: 900; font-size: 19px; flex: none; overflow: hidden; }
.seller .ini .brand-mark { border-radius: 12px; }
.seller .nm i { color: var(--red); font-style: normal; }
.seller .nm { font-weight: 800; font-size: 14.5px; display: flex; align-items: center; gap: 5px; }
.seller .ty { font-size: 11.5px; color: var(--muted); font-weight: 600; }

.cta-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 55;
  max-width: 520px; margin: 0 auto;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + var(--safe-b));
  display: flex; gap: 10px; box-shadow: var(--shadow-3);
}
.cta-bar .btn { flex: 1; }
.cta-bar .btn-icon { flex: 0 0 52px; }

/* ---- kredit ---- */
.calc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin: 0 14px; }
.calc-out { background: var(--ink); border-radius: 18px; padding: 20px; margin: 14px 14px 0; color: #fff; text-align: center; }
.calc-out .l { font-size: 12px; color: #9aa0aa; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.calc-out .v { font-family: 'Archivo'; font-weight: 900; font-size: 32px; letter-spacing: -1.2px; margin-top: 4px; }
.calc-out .s { font-size: 12.5px; color: #a9afba; margin-top: 4px; }
.calc-rows { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #262a32; }
.calc-rows > div { text-align: center; flex: 1; }
.calc-rows .n { font-family: 'Archivo'; font-weight: 800; font-size: 14px; }
.calc-rows .k { font-size: 10.5px; color: #9aa0aa; font-weight: 600; margin-top: 2px; }
.slider-head { display: flex; align-items: baseline; justify-content: space-between; }
.slider-head .k { font-size: 12.5px; font-weight: 700; color: var(--muted-2); }
.slider-head .v { font-family: 'Archivo'; font-weight: 800; font-size: 15px; color: var(--ink); }

/* ---- akun ---- */
.acc-head { background: var(--ink); padding: 20px 14px 26px; color: #fff; }
.acc-head .row { display: flex; align-items: center; gap: 13px; }
.acc-head .av { width: 54px; height: 54px; border-radius: 16px; background: var(--red); display: grid; place-items: center; font-family: 'Archivo'; font-weight: 900; font-size: 23px; flex: none; }
.acc-head .nm { font-family: 'Archivo'; font-weight: 800; font-size: 18px; }
.acc-head .em { font-size: 12.5px; color: #9aa0aa; }
.menu { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin: -14px 14px 0; overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14px; width: 100%; text-align: left; border-bottom: 1px solid var(--line); }
.menu-item:last-child { border-bottom: none; }
.menu-item .ic { width: 36px; height: 36px; border-radius: 11px; background: var(--bg); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.menu-item .tx { flex: 1; min-width: 0; }
.menu-item .tx b { font-size: 14px; font-weight: 700; display: block; }
.menu-item .tx span { font-size: 11.5px; color: var(--muted); }
.menu-item .ar { color: #c4c9d1; flex: none; }

/* ---- empty / misc ---- */
.empty { text-align: center; padding: 50px 30px; }
.empty .ic { width: 66px; height: 66px; margin: 0 auto 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.empty h3 { font-size: 17px; font-weight: 800; }
.empty p { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.note { display: flex; gap: 9px; background: var(--red-soft); border-radius: 12px; padding: 12px; font-size: 12.5px; color: #9c1218; font-weight: 600; line-height: 1.5; }
.perk { display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.perk:last-child { border-bottom: none; }
.perk .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; flex: none; }
.perk b { font-size: 13.5px; display: block; }
.perk span { font-size: 12px; color: var(--muted); }
.article-hero { aspect-ratio: 16/9; }
.article-body p { font-size: 14.5px; line-height: 1.75; color: var(--ink-2); margin-bottom: 14px; }
.divider { height: 8px; background: var(--bg); }

/* ---- area pengelola (owner / super admin) ---- */
.role-tag {
  display: inline-block; vertical-align: middle; font-family: 'Jakarta', system-ui, sans-serif;
  font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  background: var(--red); color: #fff; padding: 3px 7px; border-radius: 6px; margin-left: 6px;
}
.btn-danger { background: var(--red-soft); color: var(--red); border: 1.5px solid #ffd7d8; }
.btn-danger:active { background: #ffe2e3; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: -16px 14px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 12px 6px; text-align: center; }
.stat .n { font-family: 'Archivo'; font-weight: 800; font-size: 19px; color: var(--ink); }
.stat .k { font-size: 10.5px; color: var(--muted); font-weight: 600; margin-top: 1px; }

.admin-row {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px;
}
.admin-top { display: flex; gap: 11px; align-items: flex-start; }
.admin-thumb { width: 96px; flex: none; aspect-ratio: 16/10; border-radius: 10px; background: #e9edf1 center/cover no-repeat; }
.admin-main { min-width: 0; flex: 1; }
.admin-main .card-meta { margin-top: 7px; }
.admin-acts { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #eef0f3; }
.act {
  flex: 1; height: 40px; border-radius: 10px; background: var(--bg); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden;
}
.act.on { background: var(--ink); color: #fff; }
.act.danger { background: var(--red-soft); color: var(--red); }
.act:active { transform: scale(.96); }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.form-card > .lbl { font-size: 12px; font-weight: 800; color: var(--muted-2); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 9px; }
.photo-pick { display: flex; gap: 12px; align-items: flex-start; }
.photo-prev { width: 124px; flex: none; aspect-ratio: 16/10; border-radius: 12px; background: #e9edf1 center/cover no-repeat; border: 1px solid var(--line); }
.photo-pick label.btn { cursor: pointer; }

.switch-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--bg); border-radius: 13px; padding: 13px; margin-top: 6px;
}
.switch-row .tx { flex: 1; min-width: 0; }
.switch-row .tx b { display: block; font-size: 13.5px; font-weight: 700; }
.switch-row .tx span { font-size: 11.5px; color: var(--muted); }
.switch { width: 46px; height: 27px; border-radius: 14px; background: #cfd5dd; flex: none; position: relative; transition: background .18s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s; }
.switch.on { background: var(--green); }
.switch.on i { transform: translateX(19px); }

/* ---- halaman legal ---- */
.legal-meta { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 18px; }
.legal-h { font-size: 15.5px; font-weight: 800; margin: 22px 0 8px; }
.legal-h:first-of-type { margin-top: 0; }
.legal-p { font-size: 14px; line-height: 1.7; color: var(--ink-2); margin-bottom: 10px; }
.legal-p b { color: var(--ink); font-weight: 700; }
.tautan { color: var(--red); font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ---- statistik pengunjung ---- */
.banding {
  font-size: 12.5px; font-weight: 700; padding: 10px 13px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line);
}
.banding.naik  { color: #0d7a3c; }
.banding.turun { color: #b5391f; }
.banding span { color: var(--muted); font-weight: 600; display: block; margin-top: 2px; font-size: 11.5px; }

.grafik {
  display: flex; align-items: flex-end; gap: 3px; height: 150px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 10px 4px;
}
.grafik-kolom { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; }
.grafik-nilai { font-size: 9px; font-weight: 800; color: var(--muted); height: 11px; }
.grafik-bar {
  width: 100%; background: linear-gradient(180deg, var(--red), #ff6b70);
  border-radius: 4px 4px 2px 2px; min-height: 3px; transition: height .3s ease;
}
.grafik-kolom:last-child .grafik-bar { background: linear-gradient(180deg, #12a150, #4fd58a); }
.grafik-label { font-size: 8.5px; color: var(--muted); font-weight: 700; white-space: nowrap; }

/* ---- halaman tentang ---- */
.tentang-hero {
  background: radial-gradient(120% 130% at 50% 0%, #2a2f3a 0%, var(--ink) 62%);
  padding: 26px 14px 40px; text-align: center; color: #fff;
}
.tentang-logo { display: flex; justify-content: center; margin-bottom: 12px; }
.tentang-nama { font-family: 'Archivo'; font-weight: 900; font-size: 27px; letter-spacing: -1px; }
.tentang-nama i { color: var(--red); font-style: normal; }
.tentang-nama em { color: #6e757f; font-style: normal; font-size: 20px; }
.tentang-tag { font-size: 12.5px; color: #9aa0aa; font-weight: 600; margin-top: 6px; }

.sosmed { display: flex; gap: 8px; margin-top: 14px; }
.sos-btn {
  flex: 1; text-align: center; font-size: 12.5px; font-weight: 700; padding: 11px 8px;
  border-radius: 11px; background: var(--bg); color: var(--ink-2);
}
.sos-btn:active { background: var(--ink); color: #fff; }

/* ---- Sampah & riwayat aktivitas ---- */
.sisa-hari { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-top: 7px; }
.sisa-hari.segera { color: #b8770a; }
.act.on { background: var(--green); color: #fff; }

.log-row {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-2);
  border-radius: 12px; padding: 11px 13px;
}
.log-row.merah  { border-left-color: var(--red); }
.log-row.hijau  { border-left-color: var(--green); }
.log-row.kuning { border-left-color: #e0a018; }
.log-atas { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.log-atas b { font-size: 13.5px; font-weight: 700; }
.log-atas span { font-size: 11px; color: var(--muted); font-weight: 600; flex: none; }
.log-note { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; overflow-wrap: anywhere; }
.log-bawah { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 5px; }

/* ---- CMS: pengaturan, master, pengguna, sistem ---- */
.brand-mark.img { background: #fff center/contain no-repeat; border-radius: 8px; }
.mode-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700;
  background: rgba(255,255,255,.1); color: #cfd3da; padding: 6px 11px; border-radius: 20px;
}
.mode-badge.on { background: rgba(18,161,80,.16); color: #4fd58a; }

.note.ok { background: #e8f7ee; color: #0d6b38; }
.hint { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 5px; line-height: 1.5; }
.field .hint { margin-top: 6px; }

.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type=color] {
  width: 56px; height: 44px; padding: 0; border: 1.5px solid var(--line-2); border-radius: 11px; background: none; cursor: pointer;
}
.color-row input[type=color]::-webkit-color-swatch-wrapper { padding: 4px; }
.color-row input[type=color]::-webkit-color-swatch { border: none; border-radius: 7px; }
.color-hex { font-family: 'Archivo'; font-weight: 700; font-size: 13.5px; color: var(--ink-2); text-transform: uppercase; }

/* --- grid foto produk (multi-foto) --- */
.foto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.foto-item {
  position: relative; aspect-ratio: 4/3; border-radius: 11px;
  background: #e9edf1 center/cover no-repeat; border: 1px solid var(--line);
}
.foto-item.utama { border-color: var(--red); box-shadow: 0 0 0 2px rgba(225,27,34,.18); }
.foto-tag {
  position: absolute; left: 5px; bottom: 5px; font-size: 9.5px; font-weight: 800;
  background: var(--red); color: #fff; padding: 3px 6px; border-radius: 5px; letter-spacing: .2px;
}
.foto-x, .foto-naik {
  position: absolute; width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center; background: rgba(20,22,26,.72); backdrop-filter: blur(3px);
}
.foto-x { top: 5px; right: 5px; }
.foto-naik { top: 5px; left: 5px; background: rgba(225,27,34,.85); }
.foto-tambah {
  aspect-ratio: 4/3; border-radius: 11px; border: 1.5px dashed var(--line-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; background: var(--bg);
}
.foto-tambah:active { border-color: var(--red); }

.badge.sold { background: #3b414b; }

.photo-prev.logo { display: grid; place-items: center; background-size: contain; background-color: #fff; }
.photo-prev.logo span { font-family: 'Archivo'; font-weight: 900; font-size: 34px; color: #fff; }

.ad-row {
  display: flex; align-items: center; gap: 11px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px;
}
.ad-row .admin-thumb { width: 74px; }
.ad-row .act { height: 34px; }

.mini-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.mini-logo {
  width: 32px; height: 32px; border-radius: 9px; color: #fff; flex: none;
  display: grid; place-items: center; font-family: 'Archivo'; font-weight: 900; font-size: 14px;
}
.mini-ic { width: 32px; flex: none; color: var(--red-dark); display: grid; place-items: center; }
.mini-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-sub { font-size: 11.5px; color: var(--muted); font-weight: 600; flex: none; }
.mini-x { width: 38px; height: 38px; border-radius: 9px; background: var(--red-soft); display: grid; place-items: center; flex: none; }

.add-row { display: flex; gap: 8px; margin-top: 4px; }
.add-row input {
  flex: 1; min-width: 0; height: 44px; border: 1.5px dashed var(--line-2); border-radius: 11px;
  padding: 0 13px; font-size: 14px; font-weight: 600; background: var(--surface); outline: none;
}
.add-row input:focus { border-color: var(--red); border-style: solid; }

.sys-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.sys-row:last-of-type { border-bottom: none; }
.sys-row span { color: var(--muted); font-weight: 600; }
.sys-row b { font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* =====================================================================
   Doodle — ilustrasi garis beranimasi.
   Dipakai terbatas: layar muat, keadaan kosong, dan latar hero.
   Semua gerakan mati bila pengguna memilih "kurangi gerakan".
   ===================================================================== */
.doodle { width: 100%; height: 100%; display: block; overflow: visible; }
.doodle path, .doodle circle, .doodle rect {
  fill: none; stroke: currentColor; stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
}
.doodle-wrap {
  width: 132px; height: 92px; margin: 0 auto 16px;
  color: var(--muted); opacity: .85;
}
.doodle-wrap.sq { width: 104px; height: 104px; }

/* --- mobil melaju --- */
.doodle-car .d-body { animation: dBob 1.15s ease-in-out infinite; }
.doodle-car .d-wheel {
  transform-box: fill-box; transform-origin: center;
  animation: dSpin .85s linear infinite;
}
.doodle-car .d-road { stroke-width: 3; opacity: .5; animation: dRoad .55s linear infinite; }
.doodle-car .d-puff { stroke-width: 2.4; opacity: 0; }
.doodle-car .d-puff1 { animation: dPuff 1.5s ease-out infinite; }
.doodle-car .d-puff2 { animation: dPuff 1.5s ease-out .45s infinite; }

@keyframes dBob   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes dSpin  { to { transform: rotate(360deg); } }
@keyframes dRoad  { to { transform: translateX(-30px); } }
@keyframes dPuff  { 0% { opacity: .5; transform: translate(0, 0) scale(.6); }
                    100% { opacity: 0; transform: translate(-16px, -12px) scale(1.4); } }

/* --- kaca pembesar menyapu --- */
.doodle-search .d-glass {
  transform-box: fill-box; transform-origin: 68% 78%;
  animation: dSweep 3s ease-in-out infinite;
}
.doodle-search .d-shine { stroke-width: 2.4; opacity: .6; }
.doodle-search .d-spark { stroke-width: 2.2; opacity: 0; }
.doodle-search .d-spark1 { animation: dTwinkle 3s ease-in-out infinite; }
.doodle-search .d-spark2 { animation: dTwinkle 3s ease-in-out 1.4s infinite; }

@keyframes dSweep   { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@keyframes dTwinkle { 0%, 70%, 100% { opacity: 0; transform: scale(.6); } 20%, 40% { opacity: .9; transform: scale(1); } }

/* --- hati berdenyut --- */
.doodle-heart .d-heart {
  transform-box: fill-box; transform-origin: center;
  stroke-dasharray: 260; stroke-dashoffset: 260;
  animation: dDraw 1.1s ease-out forwards, dBeat 2.2s ease-in-out 1.1s infinite;
}
.doodle-heart .d-pulse {
  stroke-width: 2.6; opacity: .55;
  stroke-dasharray: 130; stroke-dashoffset: 130;
  animation: dDraw 1.4s ease-out .5s forwards;
}
@keyframes dDraw { to { stroke-dashoffset: 0; } }
@keyframes dBeat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.07); } 24% { transform: scale(1); } 36% { transform: scale(1.045); } 50% { transform: scale(1); } }

/* --- gembok bergoyang --- */
.doodle-lock .d-shackle {
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: dWiggle 3.4s ease-in-out infinite;
}
.doodle-lock .d-hole { stroke-width: 2.6; }
@keyframes dWiggle { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-7deg); } 86% { transform: rotate(6deg); } 93% { transform: rotate(-3deg); } }

/* --- garasi kosong --- */
.doodle-garage .d-door { opacity: .55; animation: dRoad 1.4s linear infinite; }
.doodle-garage .d-dot { stroke-width: 2.6; opacity: .3; }
.doodle-garage .d-dot1 { animation: dHop 1.4s ease-in-out infinite; }
.doodle-garage .d-dot2 { animation: dHop 1.4s ease-in-out .18s infinite; }
.doodle-garage .d-dot3 { animation: dHop 1.4s ease-in-out .36s infinite; }
@keyframes dHop { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: .85; transform: translateY(-4px); } }

/* --- latar hero: coretan halus yang bergerak sangat lambat --- */
.hero { position: relative; overflow: hidden; }
.hero > * { position: relative; z-index: 1; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10%;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='190' height='150' viewBox='0 0 190 150' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='34' cy='30' r='13'/%3E%3Cpath d='M34 17v26M21 30h26'/%3E%3Cpath d='M96 26h34M104 34h34'/%3E%3Cpath d='M150 96c6-7 14-7 20 0'/%3E%3Cpath d='M20 104h16l6-8h22l6 8h14'/%3E%3Ccircle cx='42' cy='104' r='5'/%3E%3Ccircle cx='74' cy='104' r='5'/%3E%3Cpath d='M126 118l3 7 7 3-7 3-3 7-3-7-7-3 7-3z'/%3E%3Cpath d='M166 40l3 6 6 3-6 3-3 6-3-6-6-3 6-3z'/%3E%3C/svg%3E");
  background-size: 190px 150px;
  opacity: .045;
  animation: dDrift 46s linear infinite;
  pointer-events: none;
}
@keyframes dDrift { to { background-position: 190px -150px; } }

/* --- centang tergambar pada pesan "tersimpan" --- */
.note.ok svg path {
  stroke-dasharray: 26; stroke-dashoffset: 26;
  animation: dDraw .45s ease-out forwards;
}

/* --- layar muat (splash) --- */
.boot {
  min-height: 100dvh; display: grid; place-items: center;
  background: radial-gradient(120% 120% at 50% 8%, #262b35 0%, var(--ink) 62%);
  padding: 24px; text-align: center; position: relative; overflow: hidden;
}
/* coretan samar yang hanyut, sama seperti latar hero */
.boot::before {
  content: ''; position: absolute; inset: -20% -10%;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='190' height='150' viewBox='0 0 190 150' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='34' cy='30' r='13'/%3E%3Cpath d='M34 17v26M21 30h26'/%3E%3Cpath d='M96 26h34M104 34h34'/%3E%3Cpath d='M150 96c6-7 14-7 20 0'/%3E%3Cpath d='M20 104h16l6-8h22l6 8h14'/%3E%3Ccircle cx='42' cy='104' r='5'/%3E%3Ccircle cx='74' cy='104' r='5'/%3E%3Cpath d='M126 118l3 7 7 3-7 3-3 7-3-7-7-3 7-3z'/%3E%3Cpath d='M166 40l3 6 6 3-6 3-3 6-3-6-6-3 6-3z'/%3E%3C/svg%3E");
  background-size: 190px 150px; opacity: .036;
  animation: dDrift 46s linear infinite; pointer-events: none;
}
.boot-inner { position: relative; z-index: 1; width: 100%; max-width: 340px; }

/* logo */
.boot-logo {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  animation: bootPop .55s cubic-bezier(.2,1.3,.4,1) both;
}
.boot-mark {
  width: 46px; height: 46px; border-radius: 14px; background: var(--red); color: #fff; flex: none;
  display: grid; place-items: center; font-family: 'Archivo'; font-weight: 900; font-size: 25px;
  box-shadow: 0 10px 24px -8px rgba(225,27,34,.75);
}
.boot-mark.img { background: #fff center/contain no-repeat; }
.boot-word { font-family: 'Archivo'; font-weight: 900; font-size: 30px; color: #fff; letter-spacing: -1.1px; }
.boot-word i { color: var(--red); font-style: normal; }
.boot-word em { color: #6e757f; font-style: normal; font-size: 22px; }

.boot-tagline {
  font-size: 12px; color: #8a919c; font-weight: 600; margin-top: 10px; letter-spacing: .2px;
  animation: bootUp .5s ease-out .22s both;
}

/* adegan doodle */
.boot-scene {
  width: 100%; margin: 22px auto 4px; color: #fff;
  animation: bootUp .55s ease-out .34s both;
}
.boot-svg { width: 100%; height: auto; opacity: .92; }

.boot-svg .d-road { opacity: .45; animation: dRoad .55s linear infinite; }
.boot-svg .d-wheel { transform-box: fill-box; transform-origin: center; animation: dSpin .85s linear infinite; }
.boot-car .d-body { animation: dBob 1.15s ease-in-out infinite; }
.boot-moto { opacity: .55; }
.boot-moto .d-body { animation: dBob 1.15s ease-in-out .3s infinite; }
.boot-moto .d-wheel { animation-duration: .78s; }
.boot-svg .d-puff { stroke-width: 2.4; opacity: 0; }
.boot-svg .d-puff1 { animation: dPuff 1.5s ease-out infinite; }
.boot-svg .d-puff2 { animation: dPuff 1.5s ease-out .45s infinite; }

/* coretan mengambang di dalam adegan */
.boot-svg .bd { stroke-width: 2.4; opacity: 0; transform-box: fill-box; transform-origin: center; }
.boot-svg .bd1 { animation: bootFloat 4.2s ease-in-out .55s infinite; }
.boot-svg .bd2 { animation: bootFloat 3.6s ease-in-out .9s infinite; }
.boot-svg .bd3 { animation: bootFloat 4.6s ease-in-out .7s infinite; }
.boot-svg .bd4 { animation: bootFloat 3.9s ease-in-out 1.2s infinite; }
.boot-svg .bd5 { animation: bootFloat 4.4s ease-in-out 1s infinite; }
.boot-svg .bd6 { animation: bootFloat 4s ease-in-out 1.35s infinite; }

/* bilah proses */
.boot-bar {
  width: 132px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.12);
  margin: 20px auto 0; overflow: hidden;
  animation: bootUp .5s ease-out .5s both;
}
.boot-bar i { display: block; width: 42%; height: 100%; border-radius: 3px; background: var(--red); animation: bootBar 1.25s ease-in-out infinite; }

.boot .b-sub { font-size: 12px; color: #6e757f; font-weight: 600; margin-top: 12px; animation: bootUp .5s ease-out .58s both; }

@keyframes bootPop {
  0%   { opacity: 0; transform: scale(.72) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes bootUp   { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes bootBar  { 0% { transform: translateX(-115%); } 100% { transform: translateX(285%); } }
@keyframes bootFloat {
  0%, 100% { opacity: 0; transform: translateY(4px); }
  25%, 70% { opacity: .34; transform: translateY(-4px); }
}

/* keluar halus saat aplikasi siap */
.boot.boot-out { animation: bootOut .28s ease-in forwards; }
@keyframes bootOut { to { opacity: 0; transform: scale(1.03); } }

/* Hormati pilihan pengguna yang tidak nyaman dengan gerakan. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .doodle-heart .d-heart, .doodle-heart .d-pulse, .note.ok svg path { stroke-dashoffset: 0 !important; }
  .doodle-car .d-puff { opacity: 0 !important; }
}

/* ---- tab bar ---- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  max-width: 520px; margin: 0 auto;
  background: rgba(255,255,255,.94); backdrop-filter: saturate(160%) blur(12px);
  border-top: 1px solid var(--line); box-shadow: var(--shadow-3);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: var(--safe-b);
}
.tab {
  height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 10.5px; font-weight: 700; position: relative;
}
.tab.on { color: var(--red); }
.tab .fab {
  width: 44px; height: 44px; border-radius: 14px; background: var(--red); color: #fff;
  display: grid; place-items: center; margin-top: -18px; box-shadow: 0 8px 18px -6px rgba(225,27,34,.7);
  border: 3px solid #fff;
}
.tab.sell { color: var(--ink); }
.tab .badge-dot { position: absolute; top: 8px; right: calc(50% - 18px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--red); color: #fff; font-size: 9.5px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }

/* =====================================================================
   Asisten mengambang (Rio-bot)
   ===================================================================== */
.bot-fab {
  position: fixed; z-index: 48; right: max(14px, calc(50vw - 246px));
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px);
  width: 56px; height: 56px; border-radius: 18px;
  background: linear-gradient(150deg, #2a2f3a, var(--ink));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 26px -8px rgba(20,22,26,.75), 0 0 0 3px rgba(255,255,255,.9);
  animation: botMasuk .5s cubic-bezier(.2,1.3,.4,1) both, botLayang 3.4s ease-in-out 1s infinite;
}
#root.tanpa-animasi .bot-fab {
  animation: botLayang 3.4s ease-in-out infinite;
}
.bot-fab.atas { bottom: calc(var(--safe-b) + 88px); }
.bot-fab:active { transform: scale(.93); }
.bot-fab .bot-svg { width: 38px; height: 38px; }
.bot-titik {
  position: absolute; top: 6px; right: 6px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--red); border: 2px solid #fff; animation: botDenyut 1.8s ease-in-out infinite;
}

/* --- kepala robot --- */
.bot-svg .bot-kepala { color: inherit; }
.bot-svg .bot-antena { transform-box: fill-box; transform-origin: 50% 100%; animation: botAntena 3s ease-in-out infinite; }
.bot-svg .bot-lampu { animation: botLampu 1.6s ease-in-out infinite; }
.bot-svg .bot-mata { transform-box: fill-box; transform-origin: center; animation: botKedip 4.2s ease-in-out infinite; }
.bot-svg .bot-mata-ka { animation-delay: .06s; }
.bot-svg .bot-wajah { transform-box: fill-box; transform-origin: center; animation: botTengok 5.5s ease-in-out infinite; }
.bot-svg .bot-pipi { animation: botPipi 3.2s ease-in-out infinite; }

@keyframes botMasuk  { from { opacity: 0; transform: scale(.4) translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes botLayang { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes botDenyut { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.25); opacity: .75; } }
@keyframes botAntena { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-11deg); } 60% { transform: rotate(9deg); } }
@keyframes botLampu  { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes botKedip  { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes botTengok { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-2px); } 65% { transform: translateX(2px); } }
@keyframes botPipi   { 0%, 100% { opacity: .18; } 50% { opacity: .34; } }

/* --- panel percakapan --- */
.bot-overlay {
  position: fixed; inset: 0; z-index: 92; background: rgba(20,22,26,.5);
  display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .18s ease;
}
.bot-panel {
  width: 100%; max-width: 520px; background: var(--bg);
  border-radius: 22px 22px 0 0; display: flex; flex-direction: column;
  height: min(86dvh, 660px); overflow: hidden;
  animation: slideUp .28s cubic-bezier(.2,.8,.3,1);
}
.bot-head {
  display: flex; align-items: center; gap: 11px; padding: 12px 12px 12px 16px;
  background: var(--ink); color: #fff; flex: none;
}
.bot-avatar {
  width: 40px; height: 40px; border-radius: 13px; background: #22262e; color: #fff;
  display: grid; place-items: center; flex: none;
}
.bot-avatar .bot-svg { width: 28px; height: 28px; }
.bot-nama { flex: 1; min-width: 0; }
.bot-nama b { display: block; font-family: 'Archivo'; font-weight: 800; font-size: 15.5px; }
.bot-nama span { font-size: 11.5px; color: #9aa0aa; }

.bot-isi { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 9px; }
.bot-bubble {
  max-width: 84%; font-size: 14px; line-height: 1.55; padding: 11px 14px; border-radius: 16px;
  animation: botBubble .22s ease-out both;
}
.bot-isi > *:not(:last-child) { animation: none; }
.bot-bubble.bot  { background: var(--surface); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 5px; }
.bot-bubble.saya { background: var(--ink); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
@keyframes botBubble { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.bot-bubble.ketik { display: flex; gap: 4px; padding: 14px; }
.bot-bubble.ketik i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: botKetik 1.1s ease-in-out infinite; }
.bot-bubble.ketik i:nth-child(2) { animation-delay: .16s; }
.bot-bubble.ketik i:nth-child(3) { animation-delay: .32s; }
@keyframes botKetik { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

.bot-aksi {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
  margin-top: 10px; height: 40px; border-radius: 11px; background: var(--bg);
  font-size: 13px; font-weight: 700; color: var(--ink); border: 1px solid var(--line-2);
}
.bot-bubble.saya .bot-aksi { background: #22262e; color: #fff; border-color: #33383f; }

.bot-unit {
  display: flex; gap: 10px; align-self: flex-start; max-width: 92%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 9px;
  animation: botBubble .22s ease-out both;
}
.bot-unit-img { width: 78px; flex: none; aspect-ratio: 16/10; border-radius: 10px; background: #e9edf1 center/cover no-repeat; }
.bot-unit-tx { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.bot-unit-tx b { font-size: 13px; font-weight: 700; line-height: 1.3; }
.bot-unit-tx i { font-family: 'Archivo'; font-style: normal; font-weight: 900; font-size: 14.5px; color: var(--red); margin-top: 2px; }
.bot-unit-tx span { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }

.bot-pilihan { display: flex; gap: 7px; overflow-x: auto; padding: 10px 14px; flex: none; background: var(--bg); }
.bot-chip {
  flex: none; font-size: 12.5px; font-weight: 700; padding: 9px 13px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.bot-chip:active { background: var(--ink); color: #fff; }

.bot-form {
  display: flex; gap: 9px; padding: 10px 14px calc(12px + var(--safe-b));
  background: var(--surface); border-top: 1px solid var(--line); flex: none;
}
.bot-form input {
  flex: 1; min-width: 0; height: 46px; border: 1.5px solid var(--line-2); border-radius: 13px;
  padding: 0 14px; font-size: 14.5px; font-weight: 600; outline: none; background: var(--bg);
}
.bot-form input:focus { border-color: var(--red); background: var(--surface); }
.bot-form input:disabled { color: var(--muted); }
.bot-kirim:disabled { background: var(--line-2); }
.bot-chip:disabled { opacity: .45; }
.bot-kirim {
  width: 46px; height: 46px; border-radius: 13px; background: var(--red); color: #fff;
  display: grid; place-items: center; flex: none;
}
.bot-kirim:active { background: var(--red-dark); transform: scale(.94); }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); z-index: 95;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 600;
  padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow-2);
  animation: toastIn .25s ease; max-width: 90vw;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px) } to { opacity: 1; transform: translate(-50%, 0) } }

/* ---- install prompt ---- */
.install-bar {
  margin: 14px 14px 0; background: var(--ink); color: #fff; border-radius: 16px;
  padding: 13px 14px; display: flex; align-items: center; gap: 11px;
}
.install-bar .tx { flex: 1; min-width: 0; }
.install-bar b { font-size: 13.5px; display: block; }
.install-bar span { font-size: 11.5px; color: #9aa0aa; }
.install-bar .go { background: var(--red); color: #fff; font-weight: 800; font-size: 12.5px; padding: 9px 14px; border-radius: 10px; flex: none; }
.install-bar .x { color: #6e747e; font-size: 20px; padding: 0 2px; flex: none; }

.offline-flag {
  position: fixed; top: calc(var(--safe-t) + 4px); left: 50%; transform: translateX(-50%); z-index: 99;
  background: #3b414b; color: #fff; font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 20px;
}
