/* Bosla visual polish: one elegant dark neutral theme, minimal chrome, subtle motion. Loaded last. */
html,html[data-theme=dark]{--ink:#ececf0;--muted:#8d8f9a;--paper:#0e0f12;--green:#f2b457;--line:#26272d;--gold:#f2b457;--sidebar:#131418;--surface:#1a1b20;color-scheme:dark}
html body{background:radial-gradient(1200px 600px at 70% -10%,#1d1a14 0,#0e0f12 55%) fixed,#0e0f12;color:var(--ink);font-family:"Segoe UI",system-ui,-apple-system,"Noto Sans Arabic","Noto Naskh Arabic",Tahoma,"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;-webkit-font-smoothing:antialiased}
html body .card,html body .appMain .work{background:transparent;border-color:var(--line);box-shadow:none;color:var(--ink)}
html body .card{background:#15161a}
html body select,html body textarea,html body input:not([type=checkbox]){background:#1a1b20;color:var(--ink);border-color:#2b2c33}
html body textarea:focus-visible,html body input:focus-visible{outline:2px solid #f6d49a;outline-offset:2px}
html body button{background:#23242b;color:var(--ink);border-radius:12px;transition:background .18s,transform .12s,box-shadow .2s,opacity .2s}
html body button:hover{filter:none;background:#2b2c34}
html body button:active{transform:scale(.96)}
html body .subtle{background:#20212a;color:#cfd0d8}
html body .danger{background:#2a1a1a;color:#ff9a8a}
/* sidebar */
html body .appShell #sidebar{background:rgba(19,20,24,.92);backdrop-filter:blur(14px);border-inline-end:1px solid var(--line)}
html body .appShell #sidebar button{background:transparent;color:#c9cad2!important;border-radius:11px;transition:background .18s,transform .15s}
html body .appShell #sidebar button:hover,html body .appShell #sidebar button.active{background:#22232a;color:#fff!important}
html body .appShell #sidebar .newChat{background:linear-gradient(135deg,#f2b457,#e48b4a);color:#1b1206!important;border:0;font-weight:700;box-shadow:none}
html body .appShell #sidebar .newChat:hover{background:linear-gradient(135deg,#f6bf6c,#ea9558);transform:none}
html body .sideBrand{color:#fff}html body .sideBrand span{border-color:#3a3b44;color:var(--gold)}
html body .sideCaption{color:#6f717c}
/* top bar */
html body .appTop{border-bottom:1px solid #1c1d22;background:rgba(14,15,18,.7);backdrop-filter:blur(12px);position:sticky;top:0;z-index:10}
html body .appTop>span{color:#fff;letter-spacing:.3px}html body .appTop small{display:none}
html body .appTop button{background:transparent;color:var(--muted)!important}
/* welcome */
html body #chatWelcome p,html body .agentInfo,html body #easyPrivacy,html body #modelPrivacy,html body .routerControls,html body #quickTools,html body .appMain .hero,html body #attachText{display:none!important}
html body #chatWelcome{margin:auto 0 26px;padding-top:70px;animation:rise .7s cubic-bezier(.2,.7,.2,1) both}
html body #chatWelcome h1{font-size:34px;font-weight:600;letter-spacing:-.5px;color:#f6d49a}
html body .welcomeMark{color:var(--gold);font-size:38px;display:inline-block;animation:float 4.5s ease-in-out infinite;filter:none}
@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes float{0%,100%{transform:translateY(0) rotate(0)}50%{transform:none rotate(12deg)}}
@keyframes sheen{0%,100%{background-position:0 0}50%{background-position:100% 0}}
/* composer */
html body .composer{background:#17181d;border:1px solid #2a2b32;border-radius:24px;padding:10px 12px;box-shadow:0 10px 40px #0007;transition:border-color .25s,box-shadow .25s}
html body .composer:focus-within{border-color:#f2b45788;box-shadow:0 10px 44px #0009,0 0 0 4px #f2b45716}
html body .composerControls{padding:0 2px}
html body .composerControls select{background:transparent;color:var(--muted);font-size:12px;border:0;padding:4px 6px;border-radius:9px;cursor:pointer}
html body .composerControls select:hover{background:#22232a;color:#fff}
html body .appMain .work .composer textarea{background:transparent;border:0;min-height:56px;margin:4px 0;font-size:16px;color:var(--ink)}
html body .composer textarea::placeholder{color:#6d6f7a}
html body .composerBottom{gap:6px}
html body .composerBottom #run{margin-inline-start:auto;width:40px;height:40px;min-width:40px;min-height:40px;padding:0;border-radius:50%;font-size:0;background:linear-gradient(135deg,#f6bf6c,#e48b4a);color:#1b1206;position:relative;box-shadow:none}
html body .composerBottom #run::after{content:"";position:absolute;inset:0;margin:auto;width:10px;height:10px;border-top:2.5px solid #1b1206;border-inline-start:2.5px solid #1b1206;transform:translateY(2px) rotate(45deg)}
html body .composerBottom #run:hover{transform:none;background:linear-gradient(135deg,#ffcb7e,#ee9a5b)}
html body .composerBottom #run:disabled{opacity:.6}
@keyframes pulse{0%,100%{box-shadow:0 0 0 0 #f2b45755}50%{box-shadow:0 0 0 9px #f2b45700}}
html body #cancelChat{border-radius:50%;width:40px;height:40px;min-height:40px;padding:0;font-size:0;background:#2b2c34}
html body #cancelChat::after{content:"";display:block;width:12px;height:12px;margin:auto;background:#ececf0;border-radius:2px}
.upBtn{width:38px;height:38px;min-height:38px!important;padding:0!important;display:grid;place-items:center;background:transparent!important;color:#9a9ca8!important;border-radius:11px}
.upBtn:hover{background:#23242b!important;color:#fff!important;transform:none}
.upBtn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.upToast{position:fixed;inset-inline:16px;bottom:96px;margin:auto;max-width:360px;background:#23242b;border:1px solid #33343c;color:#ececf0;border-radius:14px;padding:11px 16px;font-size:13px;text-align:center;z-index:50;animation:rise .25s both,fade .4s 2.6s forwards}
@keyframes fade{to{opacity:0;transform:translateY(8px)}}
/* messages */
html body .userMessage{background:#24252c;color:#f3f3f6;border-radius:20px 20px 6px 20px;animation:pop .25s cubic-bezier(.2,.8,.3,1)}
html[dir=rtl] body .userMessage{border-radius:20px 20px 20px 6px}
html body .assistantMessage{animation:rise .3s both}
html body .messageLabel{color:var(--gold)}
html body .messageActions button{background:transparent;color:#777988!important}
html body .messageActions button:hover{color:#fff!important;background:#22232a}
@keyframes pop{from{opacity:0;transform:scale(.96) translateY(6px)}to{opacity:1;transform:none}}
html body #status{color:#6f717c;font-size:11px}
html body .agentCard{background:#17181d;border-color:#26272d;transition:transform .2s,border-color .2s,background .2s}
html body .agentCard:hover{transform:none;border-color:#f2b45766;background:#1c1d23}
html body .agentCard i{color:var(--gold)}
html body ::selection{background:#f2b45744}
html body ::-webkit-scrollbar{width:8px}html body ::-webkit-scrollbar-thumb{background:#2c2d34;border-radius:8px}
@media(max-width:800px){html body .appTop{height:54px}html body #chatWelcome{padding-top:40px}html body #chatWelcome h1{font-size:27px}html body .composer{border-radius:22px}}
@media(prefers-reduced-motion:reduce){html body *{animation:none!important;transition:none!important}}
html body .runrow:not(.composerBottom),html body .appMain .runrow{display:none!important}
html body .composer textarea{resize:none}
html body .composerBottom #run::after{border-top:2.5px solid #1b1206;border-left:2.5px solid #1b1206;border-inline-start:0;transform:translateY(2px) rotate(45deg)}
.upBtn.gen.on{background:#f2b45722!important;color:#f2b457!important;box-shadow:0 0 0 1px #f2b45766 inset}
.genImg{display:block;max-width:100%;width:380px;border-radius:18px;border:1px solid #2a2b32;box-shadow:0 10px 36px #0008;animation:pop .35s cubic-bezier(.2,.8,.3,1)}
.imgPrompt{font-size:11px;color:#6f717c;margin-top:8px;direction:ltr;text-align:left;max-width:380px}
.imgSkel{width:380px;max-width:100%;aspect-ratio:1;border-radius:18px;background:linear-gradient(110deg,#1a1b20 30%,#262730 50%,#1a1b20 70%);background-size:200% 100%;animation:skel 1.2s linear infinite}
@keyframes skel{to{background-position:-200% 0}}
.dl{color:#f2b457!important;font-size:12px;text-decoration:none}
.pendImg{position:relative;display:inline-block;margin:8px 12px 0;border-radius:12px;overflow:hidden;border:1px solid #33343c}
.pendImg img{display:block;height:64px;width:auto}
.pendImg button{position:absolute;top:2px;inset-inline-end:2px;width:22px;height:22px;border-radius:50%;border:0;background:#000a;color:#fff;font-size:14px;line-height:1;padding:0;cursor:pointer}
.userMessage img.upImg{display:block;max-width:220px;max-height:220px;border-radius:10px;margin-bottom:6px}
.messageBody .mdP{margin:0 0 8px}
.messageBody .mdH{font-weight:700;color:#e8c46a;margin:10px 0 6px}
.messageBody ul,.messageBody ol{margin:4px 0 10px;padding-inline-start:22px}
.messageBody li{margin:3px 0}
.messageBody strong{font-weight:700;color:#f3ede0}
.messageBody code{background:#1b1c22;border:1px solid #2c2d35;border-radius:6px;padding:1px 5px;font-size:.92em;direction:ltr;unicode-bidi:embed}
.messageBody hr{border:0;border-top:1px solid #2c2d35;margin:10px 0}
html body .appShell,html body .appMain,html body .messageBody,html body .assistantMessage{color:#ececf0}
html body .messageBody .mdH{color:#e8c46a}
html body .messageBody strong{color:#fff}
html body .messageBody code{color:#e8c46a}
.upBtn.rec{background:#f2b457;color:#0e0f12;animation:micpulse 1s infinite}
.upBtn.on{box-shadow:0 0 0 1.5px #f2b457 inset}
@keyframes micpulse{50%{box-shadow:0 0 0 6px #f2b45733}}
html body .composerBottom #run::after{border:0;border-top:2.5px solid #1b1206;border-left:2.5px solid #1b1206;transform:translateY(2px) rotate(45deg)}
#seifPanel{position:fixed;inset:0;background:#000a;z-index:60;display:flex;align-items:center;justify-content:center;padding:16px}
#seifPanel[hidden]{display:none}
.seifCard{background:#1a1b20;border:1px solid #33343c;border-radius:20px;max-width:440px;width:100%;padding:18px;display:flex;flex-direction:column;gap:10px;animation:rise .25s both}
.seifHead{display:flex;justify-content:space-between;align-items:center;font-size:18px;color:#e8c46a}
.seifHead button{background:transparent;border:0;color:#ececf0;font-size:22px;width:36px;height:36px;cursor:pointer}
#seifSub{margin:0 0 4px;color:#8d8f9a;font-size:13px}
.seifLine{display:flex;gap:12px;align-items:center;text-align:start;background:#23242b;border:1px solid #2c2d35;color:#ececf0;border-radius:14px;padding:12px 14px;cursor:pointer;font-size:14px;line-height:1.5}
.seifLine i{font-style:normal;color:#f2b457;font-size:13px}
.seifLine.on{border-color:#f2b457}
html body #sideSeif{display:flex}
.visWait{color:#8d8f9a;font-size:20px;letter-spacing:4px}

.vidSheet{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);z-index:60;width:min(340px,92vw);background:#16171c;border:1px solid #6b5a2a;border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:8px;box-shadow:0 8px 30px #000a}.vidHead{color:#c9a54a;font-size:13px}.vidSheet a{color:#f1e7cf;background:#202228;border-radius:10px;padding:11px 12px;text-decoration:none;font-size:15px}.vidSheet button{background:none;border:0;color:#8d8f9a;padding:6px}

.voiceGrp{color:#c9a54a;font-size:13px;margin:12px 0 4px}

.listenBtn{margin-top:8px;background:transparent;border:1px solid #2e3033;color:#9aa0a6;border-radius:999px;padding:6px 14px;font-size:13px;cursor:pointer;transition:background-color .18s,border-color .18s,color .18s}
.listenBtn:hover,.listenBtn.on{color:#f6d49a;border-color:#5a4a2a;background:#222326}
.listenNote{margin-top:6px;color:#f6d49a;font-size:13px;animation:msgIn .3s cubic-bezier(.2,.7,.2,1) both}
