.alefteo{
    --alefteo-red:#e90018;
    --alefteo-dark:#111318;
    --alefteo-blue:#159bd3;
    --alefteo-border:#e5e7eb;
    position:fixed;
    right:18px;
    bottom:calc(18px + env(safe-area-inset-bottom,0px));
    z-index:99990;
    font-family:inherit;
    color:#20242a;
}

.alefteo *{box-sizing:border-box}
.alefteo [hidden]{display:none!important}
.alefteo-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
html.alefteo-fullscreen-active{overflow:hidden}

.alefteo-launcher{
    position:relative;
    display:flex;
    align-items:center;
    gap:10px;
    min-height:74px;
    padding:5px 14px 5px 5px;
    border:0;
    border-radius:20px;
    background:var(--alefteo-dark);
    color:#fff;
    cursor:pointer;
    box-shadow:0 16px 38px rgba(0,0,0,.25);
    isolation:isolate;
}

.alefteo-launcher::before{
    content:"";
    position:absolute;
    inset:-5px;
    z-index:-1;
    border:2px solid rgba(233,0,24,.6);
    border-radius:24px;
    opacity:0;
}

.alefteo-launcher-photo{
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 64px;
    width:64px;
    height:66px;
    overflow:hidden;
    border:2px solid #fff;
    border-radius:16px;
    background:#f7f7f7;
    color:var(--alefteo-red);
    font-size:1rem;
    font-weight:950;
    transform-origin:50% 80%;
}

.alefteo-launcher-photo img,
.alefteo-avatar img{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
    background:#f7f7f7;
}

.alefteo-launcher-label{display:flex;flex-direction:column;align-items:flex-start;line-height:1.1;text-align:left}
.alefteo-launcher-label strong{font-size:1rem;font-weight:950;letter-spacing:.01em}
.alefteo-launcher-label small{margin-top:5px;color:#d7dbe0;font-size:.69rem;font-weight:750}

.alefteo-invite{
    position:absolute;
    right:0;
    bottom:calc(100% + 12px);
    display:flex;
    width:258px;
    padding:11px 14px;
    flex-direction:column;
    border:2px solid var(--alefteo-red);
    border-radius:16px 16px 4px 16px;
    background:#fff;
    color:var(--alefteo-dark);
    text-align:left;
    box-shadow:0 12px 30px rgba(0,0,0,.18);
    pointer-events:none;
    opacity:0;
    transform:translateY(8px) scale(.96);
}

.alefteo-invite::after{
    content:"";
    position:absolute;
    right:20px;
    top:100%;
    border:8px solid transparent;
    border-top-color:var(--alefteo-red);
    border-right:0;
}

.alefteo-invite strong{font-size:.9rem;font-weight:950}
.alefteo-invite small{margin-top:3px;color:#5d6670;font-size:.72rem;line-height:1.35}

.alefteo.is-inviting:not(.is-open) .alefteo-invite{animation:alefteoInviteIn .5s ease forwards,alefteoInviteNudge 2.5s ease-in-out .7s 3}
.alefteo.is-inviting:not(.is-open) .alefteo-launcher-photo{animation:alefteoHello 1.8s ease-in-out 2}
.alefteo.is-inviting:not(.is-open) .alefteo-launcher::before{animation:alefteoRing 1.8s ease-out 2}
.alefteo:not(.is-inviting):not(.is-open) .alefteo-launcher-photo{animation:alefteoAlive 5s ease-in-out infinite}
.alefteo.is-open .alefteo-avatar{transform-origin:50% 80%;animation:alefteoAlive 4.6s ease-in-out infinite}

.alefteo-panel{
    position:absolute;
    right:0;
    bottom:calc(100% + 14px);
    display:flex;
    flex-direction:column;
    width:min(410px,calc(100vw - 24px));
    height:min(640px,calc(100dvh - 118px));
    min-height:420px;
    overflow:hidden;
    border:1px solid var(--alefteo-border);
    border-radius:20px;
    background:#fff;
    box-shadow:0 26px 70px rgba(0,0,0,.28);
    animation:alefteoPanelIn .2s ease-out;
}

.alefteo-head{
    display:flex;
    align-items:center;
    gap:9px;
    min-height:70px;
    padding:10px;
    border-bottom:1px solid var(--alefteo-border);
    background:#fff;
}

.alefteo-avatar{
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 50px;
    width:50px;
    height:52px;
    overflow:hidden;
    border:2px solid var(--alefteo-red);
    border-radius:14px;
    background:#f7f7f7;
    color:var(--alefteo-red);
    font-weight:950;
}

.alefteo-head-copy{display:flex;min-width:0;flex:1;flex-direction:column;line-height:1.15}
.alefteo-head-copy strong{font-size:1rem;font-weight:950}
.alefteo-head-copy small{display:flex;align-items:center;gap:5px;margin-top:4px;color:#68717b;font-size:.65rem;white-space:nowrap}
.alefteo-head-copy small span{display:inline-block;width:7px;height:7px;border-radius:50%;background:#18a957;box-shadow:0 0 0 3px rgba(24,169,87,.12)}

.alefteo-reset,
.alefteo-library-button,
.alefteo-expand,
.alefteo-close{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    border:0;
    cursor:pointer;
}

.alefteo-library-button{width:34px;height:36px;border-radius:9px;background:#f1f3f5;color:#4d5660;font:inherit;font-size:1.25rem;font-weight:900;line-height:1}
.alefteo-reset{min-height:36px;padding:7px 9px;border-radius:9px;background:#f1f3f5;color:#4d5660;font:inherit;font-size:.68rem;font-weight:850}
.alefteo-expand{width:34px;height:36px;border-radius:9px;background:#111318;color:#fff;font:inherit;font-size:1.08rem;font-weight:900;line-height:1}
.alefteo-close{width:42px;height:42px;border-radius:50%;background:#f1f3f5;color:#1b1e22;font-size:1.55rem;line-height:1}

.alefteo-library{
    position:absolute;
    inset:70px 0 0;
    z-index:8;
    display:flex;
    min-height:0;
    flex-direction:column;
    background:#f5f6f7;
}
.alefteo-library-head{display:flex;align-items:center;justify-content:space-between;padding:14px 15px 10px;background:#fff}
.alefteo-library-head > div{display:flex;min-width:0;flex-direction:column}
.alefteo-library-head strong{color:#15181c;font-size:.92rem;font-weight:950}
.alefteo-library-head small{margin-top:3px;color:#747d86;font-size:.64rem}
.alefteo-library-head button{display:inline-flex;width:36px;height:36px;align-items:center;justify-content:center;border:0;border-radius:50%;background:#f1f3f5;color:#1b1e22;font:inherit;font-size:1.35rem;cursor:pointer}
.alefteo-library-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:3px;padding:0 10px 10px;background:#fff;border-bottom:1px solid var(--alefteo-border)}
.alefteo-library-tabs button{min-width:0;padding:8px 3px;border:0;border-radius:8px;background:transparent;color:#68717b;font:inherit;font-size:.63rem;font-weight:850;cursor:pointer}
.alefteo-library-tabs button.is-active{background:#111318;color:#fff}
.alefteo-library-content{min-height:0;flex:1;overflow-y:auto;padding:12px;overscroll-behavior:contain}
.alefteo-library-empty{margin:18px 6px;color:#707983;font-size:.78rem;line-height:1.5;text-align:center}
.alefteo-history-card,.alefteo-search-card{display:flex;margin:0 0 9px;padding:11px;flex-direction:column;border:1px solid #e0e3e6;border-radius:13px;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.035)}
.alefteo-history-title,.alefteo-search-card > strong{color:#20242a;font-size:.78rem;line-height:1.35;font-weight:900}
.alefteo-history-meta,.alefteo-search-card > small{margin-top:4px;color:#7a838c;font-size:.59rem}
.alefteo-history-preview{display:-webkit-box;overflow:hidden;margin:7px 0 0;color:#555f68;font-size:.7rem;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.alefteo-history-actions{display:flex;gap:6px;margin-top:9px;align-items:center;flex-wrap:wrap}
.alefteo-history-actions button,.alefteo-history-actions a{display:inline-flex;min-height:30px;padding:6px 9px;align-items:center;border:1px solid #d9dde1;border-radius:8px;background:#fff;color:#505963!important;font:inherit;font-size:.62rem;font-weight:850;text-decoration:none!important;cursor:pointer}
.alefteo-history-actions .is-primary{border-color:#111318;background:#111318;color:#fff!important}
.alefteo-history-actions .is-danger{border-color:#f2c4c9;color:#c20b20!important}
.alefteo-memory-box{display:flex;padding:14px;flex-direction:column;border:1px solid #dfe3e6;border-radius:14px;background:#fff;color:#48515a}
.alefteo-memory-box p{margin:0 0 12px;font-size:.76rem;line-height:1.5}
.alefteo-memory-box > strong{color:#111318;font-size:.76rem;font-weight:950}
.alefteo-memory-box > small{margin-top:5px;color:#7c858e;font-size:.61rem}
.alefteo-memory-actions{display:grid;gap:8px;margin-top:16px}
.alefteo-memory-actions button{min-height:38px;padding:8px;border:1px solid #d9dde1;border-radius:10px;background:#f7f8f9;color:#424a52;font:inherit;font-size:.7rem;font-weight:850;cursor:pointer}
.alefteo-memory-actions button.is-danger{border-color:#f1c4c9;background:#fff6f7;color:#bd0b20}

.alefteo-messages{
    flex:1;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding:15px;
    background:linear-gradient(180deg,#f7f6f3 0%,#f3f5f7 100%);
    scrollbar-width:thin;
}

.alefteo-message{display:flex;position:relative;margin:0 0 12px;flex-wrap:wrap}
.alefteo-message.user{justify-content:flex-end}
.alefteo-message-bubble{max-width:89%;padding:11px 13px;border:1px solid #e7e9ec;border-radius:15px;background:#fff;color:#20242a;font-size:.86rem;line-height:1.5;white-space:pre-wrap;word-break:break-word;box-shadow:0 3px 10px rgba(0,0,0,.04)}
.alefteo-message.user .alefteo-message-bubble{border-color:var(--alefteo-dark);border-bottom-right-radius:4px;background:var(--alefteo-dark);color:#fff}
.alefteo-message.assistant .alefteo-message-bubble{max-width:94%;border-bottom-left-radius:4px}
.alefteo-rich-text{white-space:normal;font-size:.88rem;line-height:1.58}
.alefteo-rich-text > :first-child{margin-top:0}
.alefteo-rich-text > :last-child{margin-bottom:0}
.alefteo-rich-text p{margin:0 0 9px}
.alefteo-rich-text p:last-child{margin-bottom:0}
.alefteo-rich-text strong{color:#111318;font-weight:950}
.alefteo-topic-section{--topic-accent:#1479bd;--topic-dark:#07578d;--topic-bg:#f1f8fd;position:relative;margin:11px 0;padding:12px;border:1px solid #d9e9f5;border-left:4px solid var(--topic-accent);border-radius:12px;background:linear-gradient(135deg,var(--topic-bg) 0%,#fff 72%);box-shadow:0 4px 14px rgba(19,47,73,.055)}
.alefteo-topic-section:first-child{margin-top:0}
.alefteo-topic-section:last-child{margin-bottom:0}
.alefteo-topic-section.topic-2{--topic-accent:#d72c43;--topic-dark:#a31229;--topic-bg:#fff3f5;border-color:#f1d7dc}
.alefteo-topic-section.topic-3{--topic-accent:#17845b;--topic-dark:#0c6241;--topic-bg:#f0faf6;border-color:#d5ebe2}
.alefteo-topic-section.topic-4{--topic-accent:#7655b7;--topic-dark:#563893;--topic-bg:#f6f2fc;border-color:#e3daf2}
.alefteo-topic-section.topic-5{--topic-accent:#b06b00;--topic-dark:#805000;--topic-bg:#fff8e9;border-color:#efdfbd}
.alefteo-rich-heading{margin:12px 0 7px;padding-left:8px;border-left:3px solid var(--topic-accent,var(--alefteo-red));color:var(--topic-dark,#111318);font-size:.94rem;line-height:1.3;font-weight:950}
.alefteo-rich-heading:first-child{margin-top:0}
.alefteo-rich-heading.level-1{font-size:1rem}
.alefteo-rich-heading.level-3{font-size:.88rem}
.alefteo-rich-text ul,.alefteo-rich-text ol{margin:7px 0 10px;padding:8px 9px 8px 28px;border-radius:10px;background:#f6f7f8}
.alefteo-rich-text li{margin:0 0 5px;padding-left:2px}
.alefteo-rich-text li:last-child{margin-bottom:0}
.alefteo-rich-text li::marker{color:var(--topic-accent,var(--alefteo-red));font-weight:950}
.alefteo-rich-text code{padding:1px 5px;border-radius:5px;background:#eef1f3;color:#20242a;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.82em}
.alefteo-rich-text hr{height:1px;margin:10px 0;border:0;background:#dfe3e6}
.alefteo-table-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin:9px 0 2px}
.alefteo-table-card{min-width:0;overflow:hidden;border:1px solid #dde4e9;border-top:3px solid var(--topic-accent,var(--alefteo-blue));border-radius:11px;background:#fff;box-shadow:0 5px 14px rgba(16,30,42,.06)}
.alefteo-table-card-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;padding:10px;align-items:center;border-bottom:1px solid #edf0f2;background:linear-gradient(90deg,var(--topic-bg,#f3f8fb),#fff)}
.alefteo-table-number{display:inline-flex;width:26px;height:26px;align-items:center;justify-content:center;border-radius:8px;background:var(--topic-accent,var(--alefteo-blue));color:#fff;font-size:.63rem;font-weight:950;letter-spacing:.03em}
.alefteo-table-title{min-width:0;color:#111318!important;font-size:.79rem;line-height:1.35;overflow-wrap:anywhere}
.alefteo-table-format{padding:3px 7px;border:1px solid var(--topic-accent,var(--alefteo-blue));border-radius:999px;background:#fff;color:var(--topic-dark,#07578d);font-size:.58rem;font-weight:950;text-transform:uppercase;letter-spacing:.035em}
.alefteo-table-details{display:grid;gap:0;margin:0;padding:2px 10px 8px}
.alefteo-table-field{display:grid;grid-template-columns:minmax(74px,.34fr) minmax(0,1fr);gap:9px;padding:7px 0;border-bottom:1px solid #edf0f2}
.alefteo-table-field:last-child{border-bottom:0}
.alefteo-table-field dt{margin:0;color:var(--topic-dark,#07578d);font-size:.59rem;font-weight:950;line-height:1.4;text-transform:uppercase;letter-spacing:.035em}
.alefteo-table-field dd{min-width:0;margin:0;color:#343a40;font-size:.72rem;line-height:1.45;overflow-wrap:anywhere}
.alefteo-clean-row{display:flex;gap:6px;margin:8px 0;flex-wrap:wrap}
.alefteo-clean-row span{padding:5px 8px;border:1px solid #dde4e9;border-radius:8px;background:#f7f9fa;color:#30363c;font-size:.72rem}
.alefteo-copy{margin:4px 0 0 5px;padding:2px 6px;align-self:flex-end;border:0;background:transparent;color:#77808a;font:inherit;font-size:.62rem;cursor:pointer}
.alefteo-continue-wrap{display:flex;width:100%;margin:7px 0 1px 5px;flex-basis:100%}
.alefteo-continue-button{display:inline-flex;min-height:38px;padding:8px 13px;align-items:center;justify-content:center;border:1px solid var(--alefteo-red);border-radius:10px;background:#fff;color:var(--alefteo-red);font:inherit;font-size:.72rem;font-weight:950;cursor:pointer;box-shadow:0 4px 12px rgba(233,0,24,.1)}
.alefteo-continue-button:hover{background:var(--alefteo-red);color:#fff}
.alefteo-continue-button:disabled{opacity:.62;cursor:wait}
.alefteo-continue-button.is-error{border-color:#a86a00;color:#8a5700}

.alefteo-suggestions{display:flex;gap:7px;margin:2px 0 10px;flex-wrap:wrap}
.alefteo-suggestions button{min-height:34px;padding:7px 10px;border:1px solid #dadddf;border-radius:999px;background:#fff;color:#343a40;font:inherit;font-size:.7rem;font-weight:800;cursor:pointer}

.alefteo-results{display:grid;gap:7px;margin:2px 0 14px;padding:11px;border:1px solid #dce7ef;border-radius:14px;background:#fff}
.alefteo-results-title{color:var(--alefteo-blue);font-size:.74rem;font-weight:950;text-transform:uppercase;letter-spacing:.04em}
.alefteo-result{display:flex;min-width:0;padding:8px 9px;flex-direction:column;border:1px solid #e5e8eb;border-radius:10px;background:#fafbfc;color:#1f2429!important;text-decoration:none!important;transition:border-color .15s ease,transform .15s ease}
.alefteo-result small{overflow:hidden;color:#747d86;font-size:.58rem;text-overflow:ellipsis;white-space:nowrap}
.alefteo-result strong{margin-top:3px;font-size:.76rem;line-height:1.3}
.alefteo-results-all{display:inline-flex;width:max-content;max-width:100%;margin-top:2px;color:var(--alefteo-red)!important;font-size:.69rem;font-weight:900;text-decoration:none!important}

.alefteo-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:10px 10px 7px;border-top:1px solid var(--alefteo-border);background:#fff}
.alefteo-form textarea{width:100%;max-height:128px;min-height:44px;resize:none;padding:10px 11px;border:1px solid #cfd4d9;border-radius:12px;background:#fff;color:#20242a;font:inherit;font-size:.84rem;line-height:1.35;outline:none}
.alefteo-form button{min-width:70px;min-height:44px;padding:8px 12px;border:0;border-radius:12px;background:var(--alefteo-red);color:#fff;font:inherit;font-size:.78rem;font-weight:950;cursor:pointer}
.alefteo-form button:disabled,.alefteo-form textarea:disabled{opacity:.55;cursor:wait}
.alefteo-status{min-height:17px;padding:0 12px;background:#fff;color:#6d7680;font-size:.66rem}
.alefteo-note{margin:0;padding:0 12px 10px;background:#fff;color:#858d95;font-size:.59rem;line-height:1.3}

.alefteo button:focus-visible,
.alefteo textarea:focus-visible,
.alefteo a:focus-visible{outline:3px solid rgba(21,155,211,.42);outline-offset:2px}
.alefteo-result:hover{border-color:var(--alefteo-blue);transform:translateY(-1px)}

@keyframes alefteoInviteIn{to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes alefteoInviteNudge{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes alefteoHello{0%,100%{transform:translateY(0) rotate(0) scale(1)}35%{transform:translateY(-7px) rotate(-2deg) scale(1.035)}70%{transform:translateY(-3px) rotate(2deg) scale(1.02)}}
@keyframes alefteoAlive{0%,55%,100%{transform:translateY(0) rotate(0) scale(1)}65%{transform:translateY(-3px) rotate(-1.5deg) scale(1.025)}76%{transform:translateY(-1px) rotate(1.5deg) scale(1.015)}86%{transform:translateY(-2px) rotate(0) scale(1.02)}}
@keyframes alefteoRing{0%{opacity:.7;transform:scale(.96)}100%{opacity:0;transform:scale(1.12)}}
@keyframes alefteoPanelIn{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}

@media(min-width:651px){
    .alefteo.is-maximized .alefteo-panel{position:fixed;inset:0;z-index:99999;width:100vw;height:100dvh;min-height:0;border:0;border-radius:0}
    .alefteo.is-maximized .alefteo-messages{padding-left:max(24px,calc((100vw - 1100px)/2));padding-right:max(24px,calc((100vw - 1100px)/2))}
    .alefteo.is-maximized .alefteo-form{padding-left:max(18px,calc((100vw - 1100px)/2));padding-right:max(18px,calc((100vw - 1100px)/2))}
    .alefteo.is-maximized .alefteo-status,.alefteo.is-maximized .alefteo-note{padding-left:max(18px,calc((100vw - 1100px)/2));padding-right:max(18px,calc((100vw - 1100px)/2))}
    .alefteo.is-maximized .alefteo-expand{background:var(--alefteo-red)}
    .alefteo.is-maximized .alefteo-message.assistant .alefteo-message-bubble{width:100%;max-width:100%}
    .alefteo.is-maximized .alefteo-table-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
    .alefteo.is-maximized .alefteo-topic-section{padding:16px}
}

@media(max-width:650px){
    .alefteo{right:8px;bottom:calc(8px + env(safe-area-inset-bottom,0px))}
    .alefteo-launcher{min-height:66px;padding:4px 10px 4px 4px;border-radius:17px}
    .alefteo-launcher-photo{width:58px;height:60px;flex-basis:58px;border-radius:13px}
    .alefteo-launcher-label strong{font-size:.9rem}.alefteo-launcher-label small{font-size:.63rem}
    .alefteo-invite{right:0;width:min(250px,calc(100vw - 24px))}
    .alefteo-panel{position:fixed;left:8px;right:8px;bottom:calc(78px + env(safe-area-inset-bottom,0px));width:auto;height:min(650px,calc(100dvh - 94px - env(safe-area-inset-bottom,0px)));min-height:0;border-radius:17px}
    .alefteo-head{padding:8px}.alefteo-avatar{width:46px;height:48px;flex-basis:46px}
    .alefteo-head-copy small{font-size:.6rem}.alefteo-reset{padding:6px 7px}.alefteo-library-button{width:32px}.alefteo-close{width:44px;height:44px}
    .alefteo-expand{display:none}
    .alefteo-messages{padding:12px}.alefteo-message-bubble{font-size:.84rem}
    .alefteo-topic-section{padding:10px}
    .alefteo-table-card-head{grid-template-columns:auto minmax(0,1fr)}
    .alefteo-table-format{grid-column:2;width:max-content;max-width:100%}
    .alefteo-table-field{grid-template-columns:1fr;gap:2px}
    .alefteo-form textarea{font-size:16px}
}

@media(max-width:360px){
    .alefteo-launcher-label{display:none}
    .alefteo-launcher{padding-right:4px;border-radius:16px}
    .alefteo-head-copy small{max-width:120px;overflow:hidden;text-overflow:ellipsis}
    .alefteo-library-button{width:30px;padding:0}
    .alefteo-reset{font-size:0;width:36px;padding:0}
    .alefteo-reset::after{content:"+";font-size:1.2rem}
}

@media(prefers-reduced-motion:reduce){
    .alefteo *,
    .alefteo *::before,
    .alefteo *::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}
