/* Cloven AI — widget simulasi chat di hero (panel pastel + satu kartu chat). */
.hero-stage { position: relative; padding: 36px 22px 18px; border-radius: 32px; isolation: isolate; min-width: 0;
  background:
    radial-gradient(60% 50% at 12% 10%, #ffe7d4 0%, rgba(255,231,212,0) 70%),
    radial-gradient(55% 55% at 92% 22%, #e3dcff 0%, rgba(227,220,255,0) 70%),
    radial-gradient(60% 55% at 70% 100%, #d3f2e4 0%, rgba(211,242,228,0) 70%),
    linear-gradient(160deg, #fbf8ff, #f5f7ff); }
.hero-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background-image: radial-gradient(rgba(40,44,90,.17) 1.1px, transparent 1.5px); background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(75% 70% at 50% 45%, #000 25%, transparent 90%); mask-image: radial-gradient(75% 70% at 50% 45%, #000 25%, transparent 90%); }
.hero-stage::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; border: 1px solid rgba(124,92,255,.12); pointer-events: none; }

.chatw { position: relative; max-width: 580px; margin: 0 auto; background: #fff; border-radius: 24px; border: 1px solid rgba(15,23,42,.06);
  box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 30px 60px -28px rgba(42,40,110,.35), 0 12px 24px -16px rgba(42,40,110,.18); overflow: hidden; display: flex; flex-direction: column; }

/* baris tab industri */
.cw-top { display: flex; align-items: center; gap: 2px; padding: 10px 6px 10px 8px; border-bottom: 1px solid #eef0f5; }
.cw-tabs { display: flex; gap: 3px; flex: 1; min-width: 0; overflow-x: auto; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 16px), transparent); padding-right: 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
.cw-tabs::-webkit-scrollbar { display: none; }
.cw-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 9px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.cw-tab .ic { display: grid; place-items: center; color: #8a94a9; transition: color .15s; }
.cw-tab:hover { color: var(--ink); background: #f5f6fa; }
.cw-tab.on { color: var(--ink); background: #f3f4f8; border-color: #e3e6ee; }
.cw-tab.on .ic { color: var(--brand); }
.cw-reset { flex: none; height: 36px; padding: 0 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #c9cfdb; cursor: pointer; border-radius: 8px; }
.cw-reset:hover { color: var(--ink); text-decoration-color: currentColor; }

/* kepala percakapan */
.cw-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #f0f2f6; background: linear-gradient(180deg, #fcfcfe, #fff); }
.cw-head .cw-av { width: 34px; height: 34px; }
.cw-head b { display: block; color: var(--ink); font-size: 14px; line-height: 1.25; }
.cw-head small { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.cw-head small i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.cw-sim { margin-left: auto; flex: none; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8a5a00; background: #fff4dc; border: 1px solid #fbe3ad; padding: 3px 9px; border-radius: 999px; }

/* percakapan */
.cw-thread { height: 430px; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px 10px; display: flex; flex-direction: column; gap: 12px; background: #fff; scrollbar-width: thin; scrollbar-color: #dde1ea transparent; }
.cw-thread::-webkit-scrollbar { width: 6px; } .cw-thread::-webkit-scrollbar-thumb { background: #dde1ea; border-radius: 6px; }
.cw-row { display: flex; gap: 8px; align-items: flex-end; animation: cwIn .35s var(--ease) both; }
.cw-row.me { justify-content: flex-end; }
.cw-row.ai { align-items: flex-start; }
.cw-av { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #4f7dff, var(--brand) 50%, var(--violet)); box-shadow: 0 4px 10px -4px rgba(36,87,245,.6); }
.cw-stack { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: calc(100% - 36px); }
.cw-bubble { max-width: 100%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.cw-row.me .cw-bubble { max-width: 82%; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.cw-row.ai .cw-bubble { background: #f3f4f8; color: var(--ink); border-top-left-radius: 6px; align-self: flex-start; }
.cw-dots { display: inline-flex; gap: 4px; padding: 13px 14px; }
.cw-dots i { width: 7px; height: 7px; border-radius: 50%; background: #9aa3b5; animation: cwDot 1.1s infinite ease-in-out; }
.cw-dots i:nth-child(2) { animation-delay: .15s; } .cw-dots i:nth-child(3) { animation-delay: .3s; }
.cw-note { align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #ecfaf3; color: #0b7a52; border: 1px solid #c9eedc; font-size: 12px; font-weight: 650; animation: cwIn .35s var(--ease) both; }
.cw-note .ic { display: grid; place-items: center; }

/* kartu produk & carousel */
.cw-cards { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: thin; scrollbar-color: #e1e4ec transparent; }
.cw-cards::-webkit-scrollbar { height: 5px; } .cw-cards::-webkit-scrollbar-thumb { background: #e1e4ec; border-radius: 5px; }
.cw-cards:focus-visible { outline-offset: 2px; }
.cw-card { flex: 0 0 196px; scroll-snap-align: start; background: #fff; border: 1px solid #e8ebf2; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 18px -14px rgba(15,23,42,.25); display: flex; flex-direction: column; }
.cw-cards.single .cw-card { flex-basis: 236px; }
.cw-img { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(160deg, #f5f6f9, #eceef3); overflow: hidden; }
.cw-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cw-tag { position: absolute; left: 8px; top: 8px; font-size: 10.5px; font-weight: 700; color: var(--ink); background: rgba(255,255,255,.92); padding: 2px 8px; border-radius: 999px; box-shadow: 0 2px 6px -2px rgba(15,23,42,.25); }
.cw-cbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.cw-name { color: var(--ink); font-size: 13.5px; line-height: 1.3; }
.cw-meta { color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.cw-price { margin-top: 6px; color: var(--ink); font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.cw-price span { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-left: 2px; letter-spacing: 0; }

/* kartu pesanan / booking */
.cw-order { width: 316px; max-width: 100%; border: 1px solid #e8ebf2; border-radius: 16px; background: #fff; padding: 12px 14px 14px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 18px -14px rgba(15,23,42,.25); }
.cw-oh { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px dashed #e3e6ee; }
.cw-oic { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.cw-oh b { color: var(--ink); font-size: 13.5px; flex: 1; min-width: 0; }
.cw-status { flex: none; font-size: 10.5px; font-weight: 700; color: #8a5a00; background: #fff4dc; padding: 2px 8px; border-radius: 999px; }
.cw-rows { margin: 8px 0 0; display: grid; gap: 5px; }
.cw-rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.cw-rows dt { color: var(--muted); } .cw-rows dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.cw-total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid #eef0f5; font-size: 13px; color: var(--ink); }
.cw-total b { font-size: 15px; }
.cw-cta { display: flex; align-items: center; justify-content: center; height: 38px; margin-top: 12px; border-radius: 11px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; }

/* input */
.cw-form { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px 12px; border-top: 1px solid #f0f2f6; }
.cw-form input { flex: 1; min-width: 0; height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid #e3e6ee; background: #f7f8fb; font: inherit; font-size: 14.5px; color: var(--ink); transition: border-color .15s, background .15s, box-shadow .15s; }
.cw-form input::placeholder { color: #98a1b3; }
.cw-form input:focus { outline: none; border-color: #b9c8f8; background: #fff; box-shadow: 0 0 0 4px rgba(36,87,245,.1); }
.cw-send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--ink); color: #fff; cursor: pointer; transition: transform .15s var(--ease), background .15s; }
.cw-send:hover { background: #1c2950; transform: translateY(-1px); }
.cw-foot { text-align: center; color: #6b7690; font-size: 12.5px; margin: 14px auto 0; max-width: 460px; line-height: 1.5; }

@keyframes cwIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes cwDot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

@media (max-width: 1100px) { .hero-stage { padding: 32px 24px 18px; } }
@media (max-width: 960px) {
  .hero-stage { padding: 28px 22px 16px; }
  .chatw { max-width: 560px; }
}
@media (max-width: 560px) {
  .hero-stage { padding: 14px 10px 12px; border-radius: 24px; margin: 0 -4px; }
  .chatw { border-radius: 20px; }
  .cw-top { padding: 8px 6px 8px 6px; }
  .cw-tab { height: 40px; padding: 0 11px; font-size: 13px; }
  .cw-reset { height: 40px; padding: 0 8px; }
  .cw-head { padding: 10px 12px; }
  .cw-thread { height: 440px; padding: 14px 10px 8px; }
  .cw-card { flex-basis: 172px; }
  .cw-cards.single .cw-card { flex-basis: 210px; }
  .cw-bubble { font-size: 13.5px; }
  .cw-form { padding: 8px 8px 10px; }
  .cw-form input { font-size: 16px; } /* mencegah zoom otomatis di iOS */
}
@media (prefers-reduced-motion: reduce) {
  .cw-row, .cw-note { animation: none; }
  .cw-tabs, .cw-thread { scroll-behavior: auto; }
}

/* ===== TEMA GELAP: dibuat otomatis oleh tools/gen_dark_css.py — jangan diedit manual ===== */
:root[data-theme="dark"] .hero-stage{background:radial-gradient(60% 50% at 12% 10%, #311801 0%, rgba(49,24,1,0) 70%), radial-gradient(55% 55% at 92% 22%, #21133f 0%, rgba(33,19,63,0) 70%), radial-gradient(60% 55% at 70% 100%, #00261a 0%, rgba(0,38,26,0) 70%), linear-gradient(160deg, #17141a, #111319)}
:root[data-theme="dark"] .hero-stage::before{background-image:radial-gradient(rgba(0,0,0,0.32) 1.1px, transparent 1.5px);background-size:18px 18px;-webkit-mask-image:radial-gradient(75% 70% at 50% 45%, #eaeff7 25%, transparent 90%);mask-image:radial-gradient(75% 70% at 50% 45%, #eaeff7 25%, transparent 90%)}
:root[data-theme="dark"] .hero-stage::after{border:1px solid rgba(124,92,255,0.12)}
:root[data-theme="dark"] .chatw{background:#171b21;border:1px solid rgba(117,128,153,0.06);box-shadow:0 1px 2px rgba(0,0,0,0.17), 0 30px 60px -28px rgba(0,0,0,0.65), 0 12px 24px -16px rgba(0,0,0,0.508)}
:root[data-theme="dark"] .cw-top{border-bottom:1px solid #2b2f37}
:root[data-theme="dark"] .cw-tabs{-webkit-mask-image:linear-gradient(90deg, #eaeff7 calc(100% - 24px), transparent);mask-image:linear-gradient(90deg, #eaeff7 calc(100% - 16px), transparent)}
:root[data-theme="dark"] .cw-tab{border:1px solid transparent;background:transparent;color:var(--muted)}
:root[data-theme="dark"] .cw-tab .ic{color:#8a94a9}
:root[data-theme="dark"] .cw-tab:hover{color:var(--ink);background:#0e1218}
:root[data-theme="dark"] .cw-tab.on{color:var(--ink);background:#0d1016;border-color:#2e3139}
:root[data-theme="dark"] .cw-tab.on .ic{color:var(--brand)}
:root[data-theme="dark"] .cw-reset{border:0;background:none;color:var(--muted);text-decoration:underline;text-decoration-color:#6a6f7a}
:root[data-theme="dark"] .cw-reset:hover{color:var(--ink);text-decoration-color:currentColor}
:root[data-theme="dark"] .cw-head{border-bottom:1px solid #2a2e37;background:linear-gradient(180deg, #14181f, #171b21)}
:root[data-theme="dark"] .cw-head b{color:var(--ink)}
:root[data-theme="dark"] .cw-head small{color:var(--muted)}
:root[data-theme="dark"] .cw-head small i{background:var(--mint)}
:root[data-theme="dark"] .cw-sim{color:#d4a059;background:#2b1e01;border:1px solid #4e3a01}
:root[data-theme="dark"] .cw-thread{background:#171b21;scrollbar-color:#171d2c transparent}
:root[data-theme="dark"] .cw-thread::-webkit-scrollbar-thumb{background:#171d2c}
:root[data-theme="dark"] .cw-av{color:#ffffff;background:linear-gradient(135deg, #4f7dff, var(--brand) 50%, var(--violet));box-shadow:0 4px 10px -4px rgba(62,115,255,0.6)}
:root[data-theme="dark"] .cw-row.me .cw-bubble{background:var(--ink);color:#ffffff}
:root[data-theme="dark"] .cw-row.ai .cw-bubble{background:#0d1016;color:var(--ink)}
:root[data-theme="dark"] .cw-dots i{background:#232a39}
:root[data-theme="dark"] .cw-note{background:#11251d;color:#64c194;border:1px solid #064933}
:root[data-theme="dark"] .cw-cards{scrollbar-color:#24272e transparent}
:root[data-theme="dark"] .cw-cards::-webkit-scrollbar-thumb{background:#24272e}
:root[data-theme="dark"] .cw-cards:focus-visible{outline-offset:2px}
:root[data-theme="dark"] .cw-card{background:#171b21;border:1px solid #2c3038;box-shadow:0 1px 2px rgba(0,0,0,0.144), 0 8px 18px -14px rgba(0,0,0,0.65)}
:root[data-theme="dark"] .cw-img{background:linear-gradient(160deg, #0e1218, #20232a)}
:root[data-theme="dark"] .cw-tag{color:var(--ink);background:rgba(23,27,33,0.92);box-shadow:0 2px 6px -2px rgba(0,0,0,0.65)}
:root[data-theme="dark"] .cw-name{color:var(--ink)}
:root[data-theme="dark"] .cw-meta{color:var(--muted)}
:root[data-theme="dark"] .cw-price{color:var(--ink)}
:root[data-theme="dark"] .cw-price span{color:var(--muted)}
:root[data-theme="dark"] .cw-order{border:1px solid #2c3038;background:#171b21;box-shadow:0 1px 2px rgba(0,0,0,0.144), 0 8px 18px -14px rgba(0,0,0,0.65)}
:root[data-theme="dark"] .cw-oh{border-bottom:1px dashed #2e3139}
:root[data-theme="dark"] .cw-oic{background:var(--brand-50);color:var(--brand)}
:root[data-theme="dark"] .cw-oh b{color:var(--ink)}
:root[data-theme="dark"] .cw-status{color:#d4a059;background:#2b1e01}
:root[data-theme="dark"] .cw-rows dt{color:var(--muted)}
:root[data-theme="dark"] .cw-rows dd{color:var(--ink)}
:root[data-theme="dark"] .cw-total{border-top:1px solid #2b2f37;color:var(--ink)}
:root[data-theme="dark"] .cw-cta{background:var(--ink);color:#ffffff}
:root[data-theme="dark"] .cw-form{border-top:1px solid #2a2e37}
:root[data-theme="dark"] .cw-form input{border:1px solid #2e3139;background:#10141a;color:var(--ink)}
:root[data-theme="dark"] .cw-form input::placeholder{color:#838c9d}
:root[data-theme="dark"] .cw-form input:focus{outline:none;border-color:#2c386c;background:#171b21;box-shadow:0 0 0 4px rgba(62,115,255,0.1)}
:root[data-theme="dark"] .cw-send{border:0;background:var(--ink);color:#ffffff}
:root[data-theme="dark"] .cw-send:hover{background:#1e2b52}
:root[data-theme="dark"] .cw-foot{color:#9fabc6}
