:root {
  --page: #f4f6f9;
  --surface: #ffffff;
  --ink: #1c2230;
  --ink-soft: #5d6575;
  --ink-faint: #9aa1ae;
  --line: #e9ecf1;
  --fill: #f1f3f7;
  --navy: #1c2230;
  --gold: #b48a52;
  --gold-soft: #f7efe3;
  --ok: #3f8a5f;
  --warn: #b5763a;
  --crit: #b4433b;
  --shadow: 0 1px 2px rgba(28, 34, 48, .04), 0 12px 32px -12px rgba(60, 80, 120, .18);
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--page); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
button, textarea { font: inherit; color: inherit; }

/* Kerangka: layar penuh di HP, kartu melayang di desktop */
.app { position: relative; width: 100%; max-width: 480px; height: 100dvh; margin: 0 auto; overflow: hidden; background: var(--surface); isolation: isolate; }
@media (min-width: 640px) {
  .app { height: min(860px, calc(100dvh - 48px)); margin-top: max(24px, calc((100dvh - 860px) / 2)); border-radius: 32px; box-shadow: 0 30px 80px -30px rgba(60, 80, 120, .28), 0 0 0 1px rgba(28, 34, 48, .04); }
}

/* Cahaya lembut di latar, statis (tanpa animasi) agar ringan */
.glow { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(420px 320px at 85% -5%, rgba(255, 196, 150, .30), transparent 70%),
    radial-gradient(380px 300px at -10% 40%, rgba(255, 170, 190, .16), transparent 70%),
    radial-gradient(420px 300px at 110% 90%, rgba(150, 190, 255, .16), transparent 70%); }

/* Frosted glass: hanya di header dan dock */
.glass { background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: rgba(255, 255, 255, .95); } }

/* Orb Ola: gradien murni, hanya transform yang dianimasikan */
.orb { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #ffb27a 0%, #ff8a5c 38%, rgba(255, 140, 120, .55) 58%, rgba(255, 200, 190, .12) 72%, transparent 74%); }
.orb i { position: absolute; inset: 0; border-radius: 50%; will-change: transform; animation: spin 14s linear infinite; }
.orb i:nth-child(1) { background: radial-gradient(circle at 34% 40%, rgba(255, 70, 90, .75), transparent 32%); }
.orb i:nth-child(2) { background: radial-gradient(circle at 62% 34%, rgba(255, 214, 120, .95), transparent 30%); animation-duration: 9s; animation-direction: reverse; }
.orb i:nth-child(3) { background: radial-gradient(circle at 55% 66%, rgba(255, 255, 255, .55), transparent 26%); animation-duration: 18s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.06); } }
.thinking .avatar, .thinking .mini-orb { animation: breathe 1.4s ease-in-out infinite; }
.thinking .orb i { animation-duration: 3s; }
@media (prefers-reduced-motion: reduce) { .orb i, .thinking .avatar, .thinking .mini-orb { animation: none; } }

/* Header */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); border-bottom: 1px solid rgba(233, 236, 241, .7); }
.mini-orb { width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: radial-gradient(circle at 36% 40%, #ff5a6e 0, transparent 34%), radial-gradient(circle at 62% 34%, #ffd27a 0, transparent 32%), radial-gradient(circle, #ff9a62 0, #ff8a5c 50%, rgba(255, 160, 130, .3) 70%, transparent 72%); }
.who { flex: 1; min-width: 0; }
.name { font-weight: 700; font-size: 16px; letter-spacing: -.2px; line-height: 1.2; }
.status { font-size: 12px; color: var(--ink-faint); line-height: 1.3; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--fill); }

/* Percakapan */
.thread { position: absolute; inset: 0; overflow-y: auto; padding: 76px 18px 200px; display: flex; flex-direction: column; scroll-behavior: smooth; overscroll-behavior: contain; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 0 8px; transition: padding .35s ease; }
.avatar { width: 128px; height: 128px; transition: width .35s ease, height .35s ease; }
.hero-title { margin: 14px 0 0; font-size: 34px; font-weight: 700; letter-spacing: -.8px; line-height: 1.1;
  background: linear-gradient(100deg, #e0965a, #d8667a 55%, #8d9fe0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 4px 0 0; color: var(--ink-faint); font-size: 13.5px; }
.chatting .hero { padding: 6px 0 2px; }
.chatting .avatar { width: 72px; height: 72px; }
.chatting .hero-title { font-size: 22px; margin-top: 8px; }

.messages { display: flex; flex-direction: column; gap: 16px; padding-top: 18px; }
.row { display: flex; flex-direction: column; max-width: 92%; }
.row.ola { align-self: flex-start; }
.row.me { align-self: flex-end; align-items: flex-end; max-width: 82%; }
.row.ola.first { align-self: center; align-items: center; text-align: center; max-width: 100%; }
.text { overflow-wrap: anywhere; }
.ola .text { color: var(--ink); }
.ola .text strong { font-weight: 600; }
.me .text { background: var(--fill); padding: 10px 15px; border-radius: 20px 20px 6px 20px; white-space: pre-wrap; }
.text p { margin: 0 0 8px; }
.text p:last-child { margin-bottom: 0; }
.text ul { margin: 4px 0 8px; padding-left: 18px; text-align: left; }
.text li { margin: 3px 0; }
.text em { color: var(--ink-faint); font-style: normal; font-size: 13.5px; }
.text a { color: var(--gold); }
.note { align-self: center; font-size: 12.5px; color: var(--crit); background: #fbeceb; padding: 6px 12px; border-radius: 999px; }
.typing { display: inline-flex; gap: 5px; padding: 6px 2px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint); animation: blink 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* Kartu di bawah pesan Ola */
.card { margin-top: 10px; width: min(360px, 84vw); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); text-align: left; }
.card-pad { padding: 14px 16px; }
.eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--gold); }
.card-title { font-weight: 700; font-size: 16px; letter-spacing: -.2px; margin: 3px 0 2px; line-height: 1.3; }
.meta { font-size: 12.5px; color: var(--ink-soft); }
.menu-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.badge { font-size: 10.5px; font-weight: 600; color: var(--warn); background: #fdf3e8; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.cat { padding: 10px 16px 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--ink-faint); }
.item { display: flex; gap: 12px; justify-content: space-between; padding: 8px 16px; }
.item + .item { border-top: 1px solid #f3f4f7; }
.item-name { font-weight: 600; font-size: 14px; line-height: 1.35; }
.item-desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; margin-top: 1px; }
.item-price { text-align: right; white-space: nowrap; font-weight: 600; font-size: 13.5px; }
.item-dur { display: block; font-weight: 400; font-size: 12px; color: var(--ink-faint); }
.more { width: 100%; border: 0; border-top: 1px solid var(--line); background: #fafbfc; padding: 11px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.choice { width: 100%; text-align: left; border: 0; background: var(--surface); padding: 12px 16px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.choice + .choice { border-top: 1px solid var(--line); }
.choice:hover { background: #fafbfc; }
.choice b { display: block; font-weight: 600; font-size: 14px; }
.choice small { color: var(--ink-soft); font-size: 12px; }
.chev { color: var(--ink-faint); flex: none; }
.cta { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding: 13px 16px; border-radius: 14px; background: var(--navy); color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; }
.cta:hover { background: #2b3346; }
.ticket-no { font: 600 15px/1.3 ui-monospace, 'SFMono-Regular', Consolas, monospace; letter-spacing: .5px; margin: 4px 0 6px; }
.sev { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 3px 9px; text-transform: uppercase; letter-spacing: .5px; }
.sev.normal { background: #e9f4ee; color: var(--ok); }
.sev.serius { background: #fdf3e8; color: var(--warn); }
.sev.kritis { background: #fbeceb; color: var(--crit); }

/* Dock bawah: pill outlet, quick reply, composer */
.dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 0 14px; padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(255, 255, 255, .96) 55%, rgba(255, 255, 255, 0)); }
.outlet-pill { display: flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%; margin: 0 auto 8px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; color: var(--ink-soft); border: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.outlet-pill svg { color: var(--gold); flex: none; }
.ob-brand { font-weight: 700; color: var(--gold); font-size: 11px; letter-spacing: .4px; text-transform: uppercase; }
.ob-name { overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-weight: 500; }
.quick { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; font-weight: 500; cursor: pointer; box-shadow: 0 1px 2px rgba(28, 34, 48, .04); }
.chip:hover { background: var(--fill); }
.chip.loc { color: var(--gold); border-color: #ecdcc4; background: var(--gold-soft); }

.composer { border-radius: 24px; padding: 12px 12px 10px 16px; border: 1px solid rgba(233, 236, 241, .9); box-shadow: 0 10px 34px -10px rgba(70, 110, 170, .22), 0 1px 2px rgba(28, 34, 48, .04); }
.composer textarea { display: block; width: 100%; resize: none; border: 0; outline: none; background: transparent; padding: 4px 0 8px; max-height: 120px; line-height: 1.45; }
.composer textarea::placeholder { color: var(--ink-faint); }
.tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tool { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 10px; border: 0; border-radius: 999px; background: var(--fill); color: var(--ink-soft); font-size: 13px; font-weight: 500; cursor: pointer; }
.tool:hover { background: #e8ebf1; color: var(--ink); }
.tool.busy { opacity: .55; cursor: progress; }
.send { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; background: var(--navy); color: #fff; cursor: pointer; display: grid; place-items: center; transition: transform .15s ease, background .15s ease; }
.send:hover { transform: translateY(-1px); }
.send:disabled { background: #c9ced8; cursor: default; transform: none; }
.fineprint { margin: 8px 0 2px; font-size: 11px; color: var(--ink-faint); text-align: center; }
