/* Widget "Tanya Lumiska" */
.as-fab { position: fixed; right: 16px; bottom: 16px; z-index: 140; display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 22px 0 18px; border-radius: 999px; background: var(--green-d); color: var(--cream); font-weight: 700; font-size: 14px; box-shadow: 0 14px 40px rgba(23, 39, 26, .35); border: 1px solid rgba(239, 227, 205, .28); transition: transform .5s var(--ease), opacity .3s, background .3s; }
.as-fab:hover { background: var(--terra); transform: translateY(-3px); }
.as-fab.hide { transform: translateY(30px) scale(.9); opacity: 0; pointer-events: none; }
.as-pulse { position: absolute; top: 10px; left: 30px; width: 9px; height: 9px; border-radius: 50%; background: #7fe08a; box-shadow: 0 0 0 0 rgba(127, 224, 138, .7); animation: asPulse 2s infinite; }
@keyframes asPulse { 70% { box-shadow: 0 0 0 10px rgba(127, 224, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 224, 138, 0); } }
@media (max-width: 600px) { .as-fab { height: 50px; padding: 0 16px; bottom: 56px; right: 12px; } .as-fab b { font-size: 13px; } }

.as-panel { position: fixed; right: 16px; bottom: 16px; z-index: 145; width: min(404px, calc(100vw - 24px)); height: min(680px, calc(100dvh - 32px)); background: var(--paper); border-radius: 26px; box-shadow: 0 30px 90px rgba(10, 18, 12, .38); display: flex; flex-direction: column; overflow: hidden; transform: translateY(24px) scale(.96); transform-origin: bottom right; opacity: 0; pointer-events: none; transition: transform .6s var(--ease), opacity .3s; }
.as-panel.on { transform: none; opacity: 1; pointer-events: auto; }
@media (max-width: 600px) { .as-panel { inset: 0; width: 100%; height: 100dvh; border-radius: 0; transform: translateY(40px); } }
.as-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 14px; background: var(--green-d); color: var(--cream); }
.as-title b { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1; display: block; }
.as-title small { font-size: 11.5px; letter-spacing: .08em; opacity: .75; text-transform: uppercase; font-weight: 700; }
.as-x { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid rgba(239, 227, 205, .35); color: var(--cream); font-size: 22px; line-height: 1; transition: .4s var(--ease); }
.as-x:hover { background: var(--terra); border-color: var(--terra); transform: rotate(90deg); }
.as-tabs { display: flex; gap: 4px; padding: 8px 12px 0; background: var(--green-d); }
.as-tabs button { flex: 1; padding: 11px 8px; border-radius: 14px 14px 0 0; font-size: 13px; font-weight: 700; color: rgba(239, 227, 205, .7); transition: .3s; }
.as-tabs button.on { background: var(--paper); color: var(--green-d); }
.as-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.as-pane[hidden] { display: none; }
.as-scroll { flex: 1; overflow-y: auto; padding: 14px 16px 6px; overscroll-behavior: contain; scroll-behavior: smooth; }
.as-notice { background: #f6dcc2; color: #6c3414; border-radius: 14px; padding: 10px 14px; font-size: 12px; line-height: 1.45; margin-bottom: 12px; }
.as-log { display: flex; flex-direction: column; gap: 10px; }
.as-msg { max-width: 92%; font-size: 14px; line-height: 1.5; border-radius: 18px; padding: 11px 14px; animation: asIn .5s var(--ease); }
@keyframes asIn { from { opacity: 0; transform: translateY(10px); } }
.as-msg p { margin: 0 0 6px; } .as-msg p:last-child { margin-bottom: 0; }
.as-msg ul, .as-msg ol { margin: 4px 0 6px 18px; } .as-msg li { margin: 2px 0; }
.as-msg.bot { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 6px; width: 100%; max-width: 100%; }
.as-msg.user { align-self: flex-end; background: var(--green-d); color: #fff; border-bottom-right-radius: 6px; }
.as-msg.sys { align-self: center; background: transparent; color: var(--muted); font-size: 12px; text-align: center; padding: 2px 8px; }
.as-msg.admin { background: #e8eedf; border-color: #cfdcbf; max-width: 92%; width: auto; }
.as-msg .who { display: block; font-weight: 800; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--green); margin-bottom: 2px; }
.dots { display: inline-flex; gap: 4px; padding: 4px 2px; } .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dotb 1.2s infinite; } .dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotb { 40% { transform: translateY(-5px); opacity: .5; } }
.as-chips { display: flex; gap: 6px; padding: 4px 16px 8px; overflow-x: auto; scrollbar-width: none; }
.as-chips:empty { display: none; }
.as-chip { flex: none; padding: 8px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); font-size: 12.5px; font-weight: 700; transition: .3s var(--ease); white-space: nowrap; }
.as-chip:hover { background: var(--green-d); color: #fff; border-color: var(--green-d); }
.as-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 14px 14px; border-top: 1px solid var(--line); background: var(--paper); }
.as-form[hidden] { display: none; }
.as-form textarea { flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 18px; padding: 11px 14px; font: inherit; font-size: 14px; background: var(--white); color: var(--ink); max-height: 110px; line-height: 1.4; overflow: hidden; }
.as-form textarea:focus { outline: none; border-color: var(--green-d); }
.as-form button { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--green-d); color: #fff; font-size: 20px; transition: .3s var(--ease); }
.as-form button:hover { background: var(--terra); transform: translateY(-2px); }

/* kartu produk di chat */
.as-prods { display: grid; gap: 8px; margin-top: 10px; }
.as-prod { display: grid; grid-template-columns: 52px 1fr 36px; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.as-prod img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; background: #e2d4ba; }
.as-prod b { display: block; font-size: 13px; line-height: 1.25; } .as-prod small { display: block; color: var(--muted); font-size: 11.5px; } .as-prod span { font-weight: 800; font-size: 12.5px; }
.as-prod button { width: 36px; height: 36px; border-radius: 50%; background: var(--green-d); color: #fff; font-size: 20px; line-height: 1; transition: .3s var(--ease); }
.as-prod button:hover { background: var(--terra); transform: rotate(90deg); }

/* rujukan dokter */
.as-ref { margin-top: 12px; border-radius: 16px; padding: 14px; border: 1.5px solid; background: #fff7ec; border-color: #efc79a; }
.as-ref.emergency { background: #fdeceb; border-color: #e7a39b; }
.as-ref.routine { background: #eef3ea; border-color: #c9d9bb; }
.as-ref > b { display: block; font-size: 14px; margin-bottom: 4px; }
.as-ref.emergency > b { color: #9a2f1f; }
.as-ref p { font-size: 13px; margin-bottom: 8px; }
.as-ref-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.as-btn { display: inline-flex; padding: 10px 16px; border-radius: 999px; background: var(--green-d); color: #fff; font-size: 13px; font-weight: 700; }
.as-btn.danger { background: #c0392b; }
.as-sec { margin-top: 10px; }
.as-sec h5 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.as-plats { display: grid; gap: 6px; }
.as-plat { display: block; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); transition: .3s var(--ease); }
.as-plat:hover { border-color: var(--green-d); transform: translateX(4px); }
.as-plat b { font-size: 13.5px; } .as-plat small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.as-doc { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); margin-bottom: 6px; }
.as-doc b { font-size: 13px; } .as-doc small { display: block; color: var(--muted); font-size: 12px; } .as-doc em { font-style: normal; font-size: 10px; font-weight: 800; background: #f6dcc2; color: #6c3414; padding: 2px 7px; border-radius: 999px; vertical-align: 2px; }
.as-doc a { font-size: 12px; font-weight: 700; color: var(--terra); }
.as-ref details { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; font-size: 12.5px; }
.as-ref summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.as-trust { margin: 6px 0 4px 16px; } .as-trust li { margin: 4px 0; line-height: 1.4; } .as-trust a { color: var(--terra); text-decoration: underline; }
.as-small { font-size: 11.5px; color: var(--muted); }
.as-link { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--green); text-decoration: underline; }

/* chat admin */
.as-start { padding: 6px 4px; }
.as-start h4 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.05; margin-bottom: 8px; }
.as-start p { font-size: 13.5px; color: #3d4a3f; margin-bottom: 12px; }
.as-start label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 5px; }
.as-start input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; font: inherit; background: var(--white); margin-bottom: 12px; }
.as-start input:focus { outline: none; border-color: var(--green-d); }
.as-start a { color: var(--terra); font-weight: 700; text-decoration: underline; }
.as-banner { font-size: 12px; background: #e8eedf; color: #2f4a33; border-radius: 12px; padding: 9px 12px; margin-bottom: 10px; }
.as-banner.demo, #waDown { background: #f6dcc2; color: #6c3414; }
