#acadexa-assistant-root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }

#acadexa-assistant-toggle {
    position: fixed; right: 20px; bottom: 20px;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    color: #fff; border: none; cursor: pointer;
    box-shadow: 0 8px 24px rgba(79,70,229,.35);
    display: flex; align-items: center; justify-content: center;
    z-index: 99998; transition: transform .15s;
}
#acadexa-assistant-toggle:hover { transform: scale(1.06); }
#acadexa-assistant-toggle .acadexa-assistant-badge {
    position: absolute; top: -4px; right: -4px;
    background: #10b981; color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 2px 6px; border-radius: 10px;
    letter-spacing: .04em;
}

#acadexa-assistant-panel {
    position: fixed; right: 20px; bottom: 90px;
    width: 380px; max-width: calc(100vw - 32px);
    height: 540px; max-height: calc(100vh - 130px);
    background: #fff; border-radius: 16px;
    box-shadow: 0 20px 60px rgba(15,23,42,.25);
    display: none; flex-direction: column;
    z-index: 99999; overflow: hidden;
    border: 1px solid #e2e8f0;
}
#acadexa-assistant-panel.open { display: flex; }

#acadexa-assistant-panel header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    color: #fff;
}
#acadexa-assistant-panel header .ttl strong { display: block; font-size: 14px; }
#acadexa-assistant-panel header .ttl .sub { font-size: 11px; opacity: .85; }
#acadexa-assistant-close {
    background: transparent; color: #fff; border: none;
    font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px;
}

#acadexa-assistant-messages {
    flex: 1; overflow-y: auto; padding: 14px;
    background: #f8fafc;
    display: flex; flex-direction: column; gap: 8px;
}
.acadexa-assistant-msg {
    max-width: 85%; padding: 9px 12px; border-radius: 12px;
    font-size: 13px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word;
}
.acadexa-assistant-msg.user {
    align-self: flex-end; background: #4f46e5; color: #fff;
    border-bottom-right-radius: 4px;
}
.acadexa-assistant-msg.assistant {
    align-self: flex-start; background: #fff; color: #0f172a;
    border: 1px solid #e2e8f0; border-bottom-left-radius: 4px;
}
.acadexa-assistant-msg.typing {
    display: flex; gap: 4px; padding: 12px 14px; align-items: center;
}
.acadexa-assistant-msg.typing span {
    width: 6px; height: 6px; border-radius: 50%;
    background: #94a3b8; animation: acadexa-dot 1.2s infinite;
}
.acadexa-assistant-msg.typing span:nth-child(2) { animation-delay: .15s; }
.acadexa-assistant-msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes acadexa-dot {
    0%, 60%, 100% { opacity: .3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}

#acadexa-assistant-form {
    display: flex; gap: 6px; padding: 10px 12px;
    background: #fff; border-top: 1px solid #e2e8f0;
}
#acadexa-assistant-input {
    flex: 1; border: 1px solid #cbd5e1; border-radius: 8px;
    padding: 9px 11px; font-size: 13px; outline: none;
}
#acadexa-assistant-input:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
#acadexa-assistant-send {
    background: #4f46e5; color: #fff; border: none;
    padding: 9px 16px; border-radius: 8px; font-weight: 600;
    font-size: 13px; cursor: pointer;
}
#acadexa-assistant-send:hover { background: #4338ca; }
#acadexa-assistant-send:disabled { opacity: .5; cursor: not-allowed; }

.acadexa-assistant-foot {
    text-align: center; font-size: 10px; color: #94a3b8;
    padding: 6px 0 8px; background: #fff;
}

@media (max-width: 480px) {
    #acadexa-assistant-panel {
        right: 8px; left: 8px; bottom: 80px; width: auto;
    }
}
