.smart-assistant{position:fixed;right:24px;bottom:24px;z-index:1200;font-family:Inter,"Segoe UI",Arial,sans-serif}
.smart-fab{width:58px;height:58px;border:0;border-radius:19px;display:grid;place-items:center;color:#fff;background:linear-gradient(145deg,#123cbd,#2563eb 58%,#0ea5e9);box-shadow:0 16px 36px rgba(29,78,216,.32);font-size:23px;transition:transform .18s ease,box-shadow .18s ease;position:relative}
.smart-fab:hover{transform:translateY(-2px);box-shadow:0 20px 42px rgba(29,78,216,.38)}
.smart-fab::after{content:"";position:absolute;inset:-5px;border:1px solid rgba(37,99,235,.25);border-radius:23px;animation:smartPulse 2.4s ease-out infinite}
@keyframes smartPulse{0%{transform:scale(.94);opacity:.7}70%,100%{transform:scale(1.16);opacity:0}}
.smart-panel{position:absolute;right:0;bottom:72px;width:min(390px,calc(100vw - 28px));height:min(650px,calc(100vh - 115px));background:#fff;border:1px solid #dce6f3;border-radius:24px;box-shadow:0 28px 80px rgba(15,37,87,.22);overflow:hidden;display:flex;flex-direction:column;opacity:0;visibility:hidden;transform:translateY(14px) scale(.97);transform-origin:bottom right;transition:opacity .18s ease,transform .18s ease,visibility .18s;pointer-events:none}
.smart-assistant.terbuka .smart-panel{opacity:1;visibility:visible;transform:none;pointer-events:auto}
.smart-assistant.terbuka .smart-fab{transform:rotate(3deg) scale(.94)}
.smart-header{padding:17px 18px;color:#fff;background:linear-gradient(135deg,#102b68,#1648c5 58%,#0b91da);display:flex;align-items:center;gap:12px;position:relative;overflow:hidden}
.smart-header::after{content:"";position:absolute;width:160px;height:160px;border-radius:50%;right:-70px;top:-95px;background:rgba(255,255,255,.11)}
.smart-header-icon{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.2);font-size:18px;flex:0 0 auto}
.smart-header-text{min-width:0;flex:1}.smart-header-text strong{display:block;font-size:14px;line-height:1.2}.smart-header-text small{display:block;margin-top:3px;color:rgba(255,255,255,.78);font-size:10.5px}.smart-online{display:inline-flex!important;align-items:center;gap:5px}.smart-online::before{content:"";width:6px;height:6px;border-radius:50%;background:#4ade80;box-shadow:0 0 0 3px rgba(74,222,128,.14)}
.smart-header-actions{display:flex;align-items:center;gap:4px;position:relative;z-index:2}.smart-icon-btn{width:34px;height:34px;border:0;border-radius:10px;display:grid;place-items:center;background:transparent;color:rgba(255,255,255,.84)}.smart-icon-btn:hover,.smart-icon-btn.aktif{background:rgba(255,255,255,.15);color:#fff}.smart-icon-btn:disabled{opacity:.35;cursor:not-allowed}
.smart-messages{flex:1;overflow:auto;padding:18px 14px 12px;background:linear-gradient(180deg,#f8fbff 0,#fff 34%);scroll-behavior:smooth;overscroll-behavior:contain}.smart-messages::-webkit-scrollbar{width:6px}.smart-messages::-webkit-scrollbar-thumb{background:#d9e3f0;border-radius:99px}
.smart-msg{display:flex;gap:8px;align-items:flex-end;margin-bottom:12px}.smart-msg-user{justify-content:flex-end}.smart-msg-avatar{width:27px;height:27px;border-radius:9px;display:grid;place-items:center;flex:0 0 auto;color:#fff;background:linear-gradient(145deg,#1d4ed8,#0ea5e9);font-size:11px;box-shadow:0 5px 12px rgba(37,99,235,.18)}
.smart-msg-bubble{max-width:82%;padding:10px 12px;border-radius:15px;background:#fff;border:1px solid #e1e8f2;box-shadow:0 4px 12px rgba(15,37,87,.045);color:#273449;font-size:12px;line-height:1.55}.smart-msg-bubble p{margin:0;white-space:pre-line}.smart-msg-user .smart-msg-bubble{background:linear-gradient(135deg,#1d4ed8,#2563eb);color:#fff;border-color:transparent;border-bottom-right-radius:5px}.smart-msg-assistant .smart-msg-bubble{border-bottom-left-radius:5px}
.smart-msg-links{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px;padding-top:8px;border-top:1px solid #edf1f6}.smart-msg-link{display:inline-flex;align-items:center;max-width:100%;padding:5px 8px;border-radius:8px;text-decoration:none;background:#eff6ff;color:#1d4ed8;font-size:10px;font-weight:750;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.smart-msg-link:hover{background:#dbeafe}
.smart-suggestions{display:flex;gap:6px;overflow-x:auto;padding:8px 14px 10px;background:#fff;border-top:1px solid #eef2f7;scrollbar-width:none}.smart-suggestions:empty{display:none}.smart-suggestions::-webkit-scrollbar{display:none}.smart-saran{flex:0 0 auto;border:1px solid #cfe0fb;border-radius:999px;background:#f7fbff;color:#2450a4;padding:6px 9px;font-size:10px;font-weight:700;white-space:nowrap}.smart-saran:hover{background:#eaf3ff;border-color:#9fc3fb}
.smart-composer{display:flex;align-items:flex-end;gap:7px;padding:10px 12px 12px;border-top:1px solid #e8edf5;background:#fff}.smart-input-wrap{position:relative;flex:1;min-width:0}.smart-input{display:block;width:100%;height:44px;max-height:100px;resize:none;border:1px solid #d5dfec;border-radius:14px;padding:11px 42px 10px 12px;background:#fbfdff;color:#172033;outline:none;font-size:12px;line-height:1.45}.smart-input:focus{border-color:#60a5fa;background:#fff;box-shadow:0 0 0 3px rgba(59,130,246,.1)}.smart-mic{position:absolute;right:5px;top:5px;width:34px;height:34px;border:0;border-radius:10px;background:transparent;color:#68809e}.smart-mic:hover{background:#edf4ff;color:#2563eb}.smart-mic.mendengar{color:#dc2626;background:#fee2e2;animation:smartMic 1s infinite alternate}@keyframes smartMic{to{transform:scale(1.08)}}
.smart-send{width:44px;height:44px;border:0;border-radius:14px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#1d4ed8,#0ea5e9);box-shadow:0 8px 18px rgba(37,99,235,.22)}.smart-send:hover{filter:brightness(.97)}.smart-send:disabled{opacity:.55;cursor:wait;box-shadow:none}
.smart-footer-note{display:flex;align-items:center;justify-content:center;gap:6px 12px;flex-wrap:wrap;text-align:center;padding:0 12px 9px;background:#fff;color:#94a3b8;font-size:9px}.smart-footer-note i{margin-right:4px;color:#64748b}.smart-voice-hint{color:#64748b;font-weight:700}.smart-mic.siap-kirim{color:#2563eb;background:#dbeafe}.smart-assistant.menunggu-kirim-suara .smart-input{border-color:#93c5fd;background:#f8fbff}
.smart-typing{display:flex;align-items:center;gap:4px;min-width:48px}.smart-typing span{width:5px;height:5px;border-radius:50%;background:#91a4bd;animation:smartDot 1.15s ease-in-out infinite}.smart-typing span:nth-child(2){animation-delay:.15s}.smart-typing span:nth-child(3){animation-delay:.3s}@keyframes smartDot{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}
.memproses .smart-fab::after{animation-duration:.8s}
@media(max-width:620px){.smart-assistant{right:12px;bottom:14px}.smart-fab{width:54px;height:54px;border-radius:17px}.smart-panel{position:fixed;left:10px;right:10px;bottom:76px;width:auto;height:min(72vh,650px);border-radius:22px;transform-origin:bottom center}.smart-msg-bubble{max-width:86%}}
@media(max-width:420px){.smart-panel{left:0;right:0;bottom:0;height:min(84vh,720px);border-radius:22px 22px 0 0}.smart-assistant.terbuka .smart-fab{opacity:0;pointer-events:none}.smart-header{padding:15px}.smart-messages{padding-left:10px;padding-right:10px}}

/* =========================================================
   SMART ASSISTANT — AUTO KIRIM TOGGLE (DEFENSIVE UI)
   Dibuat kompatibel dengan layout lama: kontrol dapat diinjeksi JS.
   ========================================================= */
.smart-footer-note{display:block;text-align:left;padding:0 12px 10px;background:#fff;color:#94a3b8;font-size:9px}
.smart-auto-send-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 -2px 8px;padding:8px 10px;border:1px solid #dce7f5;border-radius:12px;background:linear-gradient(180deg,#f8fbff,#f3f7fd)}
.smart-auto-send-caption{display:inline-flex;align-items:center;gap:6px;min-width:0;color:#40546f;font-size:9.5px;font-weight:800;line-height:1.25}
.smart-auto-send-caption i{margin:0;color:#2563eb;font-size:11px}
.smart-auto-send-toggle{appearance:none;border:1px solid #cbd5e1;border-radius:999px;background:#eef2f7;color:#64748b;min-height:30px;padding:3px 5px 3px 9px;display:inline-flex;align-items:center;gap:7px;font:inherit;font-size:9px;font-weight:900;line-height:1;cursor:pointer;transition:border-color .16s ease,background .16s ease,color .16s ease,box-shadow .16s ease;flex:0 0 auto}
.smart-auto-send-toggle:hover{border-color:#9ebfea;background:#eef6ff;color:#2456a8}
.smart-auto-send-toggle.aktif{border-color:#93c5fd;background:#dbeafe;color:#1d4ed8;box-shadow:0 2px 8px rgba(37,99,235,.10)}
.smart-auto-send-toggle:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
.smart-auto-send-label{display:inline-flex;align-items:center;white-space:nowrap;min-width:20px;justify-content:center}
.smart-switch-track{width:31px;height:18px;padding:2px;border-radius:999px;background:#94a3b8;display:flex;align-items:center;transition:background .16s ease;flex:0 0 auto}
.smart-switch-track>span{width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.28);transform:translateX(0);transition:transform .16s ease}
.smart-auto-send-toggle.aktif .smart-switch-track{background:#2563eb}
.smart-auto-send-toggle.aktif .smart-switch-track>span{transform:translateX(13px)}
.smart-footer-meta{display:flex;align-items:center;justify-content:space-between;gap:6px 12px;flex-wrap:wrap;padding:0 3px;text-align:center}
.smart-readonly-note{flex:1 1 auto}.smart-footer-meta i{margin-right:4px;color:#64748b}.smart-voice-hint{color:#64748b;font-weight:700}
@media(max-width:420px){.smart-footer-note{padding-left:10px;padding-right:10px}.smart-auto-send-row{padding:7px 9px}.smart-auto-send-caption{font-size:9px}.smart-footer-meta{justify-content:center}.smart-readonly-note{flex:1 1 100%;text-align:center}.smart-voice-hint{font-size:8.5px}}
.smart-fab{overflow:hidden}.smart-fab img{width:78%;height:78%;object-fit:contain;display:block;filter:drop-shadow(0 4px 10px rgba(255,255,255,.14))}
.smart-header-icon{padding:5px;overflow:hidden}.smart-header-icon img{width:100%;height:100%;object-fit:contain;display:block}
.smart-msg-avatar{overflow:hidden;padding:2px}.smart-msg-avatar img{width:100%;height:100%;object-fit:contain;display:block}
.smart-online.smart-connection-checking::before{background:#facc15!important;box-shadow:0 0 0 3px rgba(250,204,21,.14)!important}
.smart-online.smart-connection-error{color:#ffe4e6!important}.smart-online.smart-connection-error::before{background:#fb7185!important;box-shadow:0 0 0 3px rgba(251,113,133,.14)!important}.smart-online.smart-connection-ok::before{background:#4ade80!important;box-shadow:0 0 0 3px rgba(74,222,128,.14)!important}
.smart-footer-note{display:block!important;text-align:left!important;padding:0 12px 10px!important}.smart-footer-meta{display:flex;align-items:center;justify-content:space-between;gap:6px 12px;flex-wrap:wrap;padding:0 3px;text-align:center}.smart-readonly-note{flex:1 1 auto}.smart-voice-hint{color:#64748b;font-weight:700}
.smart-wake-toggle{border:0;background:transparent;color:#475569;font:inherit;font-size:9px;font-weight:800;padding:0;cursor:pointer}.smart-wake-toggle.aktif{color:#0f766e}.smart-wake-toggle:disabled{opacity:.55;cursor:not-allowed}.smart-wake-status{color:#64748b;font-size:9px;font-weight:700}.smart-assistant.wake-standby .smart-fab::before{content:"";position:absolute;right:5px;top:5px;width:10px;height:10px;border-radius:999px;background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.17);animation:smartWakeBlink 1.8s ease-in-out infinite}@keyframes smartWakeBlink{0%,100%{opacity:.6;transform:scale(.92)}50%{opacity:1;transform:scale(1.12)}}
.smart-processing{align-items:center}.smart-processing-avatar{animation:smartBrandBreathe 1.35s ease-in-out infinite}.smart-processing-bubble{min-width:176px;background:linear-gradient(180deg,#ffffff,#f8fbff);border-color:#cfe0fb;box-shadow:0 8px 20px rgba(37,99,235,.08)}.smart-processing-title{font-size:10px;font-weight:800;color:#1e40af;margin-bottom:3px}.smart-processing-line{display:flex;align-items:center;gap:7px;color:#64748b;font-size:10.5px}.smart-processing-text{white-space:nowrap}.smart-processing-line .smart-typing{display:inline-flex;align-items:center;gap:3px;padding:0;background:transparent;border:0;box-shadow:none}.smart-processing-line .smart-typing span{width:4px;height:4px;border-radius:99px;background:#2563eb;animation:smartDot 1.15s ease-in-out infinite}.smart-processing-line .smart-typing span:nth-child(2){animation-delay:.15s}.smart-processing-line .smart-typing span:nth-child(3){animation-delay:.3s}@keyframes smartBrandBreathe{0%,100%{transform:scale(1);filter:drop-shadow(0 3px 8px rgba(37,99,235,.10))}50%{transform:scale(1.07);filter:drop-shadow(0 5px 12px rgba(37,99,235,.24))}}
@media(max-width:420px){.smart-wake-toggle,.smart-wake-status{font-size:8.5px}.smart-footer-meta{justify-content:center}.smart-readonly-note{flex:1 1 100%;text-align:center}}
