*,
*::before,
*::after{
box-sizing:border-box;
margin:0;
padding:0;
}

html,
body{
overflow-x:hidden;
font-family:Inter,Arial,sans-serif;
}

/* BOTÓN FLOTANTE */
#leoia-pro-launcher{
position:fixed;
right:24px;
bottom:24px;
width:76px;
height:76px;
border:none;
border-radius:50%;
background:linear-gradient(135deg,#2563eb,#7c3aed);
display:flex;
align-items:center;
justify-content:center;
cursor:pointer;
z-index:99999999;
box-shadow:0 20px 60px rgba(15,23,42,.45);
color:#fff;
font-size:34px;
}

/* DASHBOARD */
#leoia-pro-dashboard{
display:none;
position:fixed;
inset:0;
width:100vw;
height:100vh;
background:#06111f;
z-index:99999999;
overflow:hidden;
color:#0f172a;
}

/* SIDEBAR IZQUIERDA */
#leoia-pro-sidebar{
position:absolute;
left:0;
top:0;
bottom:0;
width:330px;
background:linear-gradient(180deg,#071a2e,#0b2037);
border-right:1px solid rgba(255,255,255,.08);
padding:24px 22px;
overflow-y:auto;
color:#fff;
}

.leoia-pro-brand{
display:flex;
align-items:center;
gap:14px;
margin-bottom:34px;
}

.leoia-pro-brand-icon{
width:58px;
height:58px;
border-radius:18px;
background:rgba(255,255,255,.08);
display:flex;
align-items:center;
justify-content:center;
font-size:34px;
}

.leoia-pro-brand h2{
font-size:24px;
font-weight:900;
letter-spacing:.5px;
}

.leoia-pro-brand p{
font-size:11px;
letter-spacing:2px;
color:#cbd5e1;
margin-top:4px;
}

.leoia-pro-assistant-box{
display:flex;
align-items:center;
gap:14px;
margin-bottom:24px;
}

.leoia-pro-lion{
width:64px;
height:64px;
border-radius:50%;
background:#10253d;
display:flex;
align-items:center;
justify-content:center;
font-size:34px;
}

.leoia-pro-assistant-box h3{
font-size:24px;
font-weight:900;
}

.leoia-pro-assistant-box p{
font-size:13px;
color:#cbd5e1;
margin-top:4px;
}

#leoia-pro-new-chat{
width:100%;
height:58px;
border:none;
border-radius:12px;
background:linear-gradient(135deg,#2563eb,#7c3aed);
color:#fff;
font-size:16px;
font-weight:800;
cursor:pointer;
margin-bottom:28px;
}

.leoia-pro-history-title{
font-size:14px;
font-weight:900;
margin-bottom:14px;
}

#leoia-pro-search-chat{
width:100%;
height:48px;
border-radius:12px;
border:1px solid rgba(148,163,184,.25);
background:#10253d;
padding:0 16px;
color:#fff;
outline:none;
margin-bottom:18px;
}

#leoia-pro-history{
display:flex;
flex-direction:column;
gap:10px;
}

.leoia-pro-chat-item{
display:grid;
grid-template-columns:22px 1fr auto;
gap:8px;
align-items:center;
padding:10px 0;
font-size:13px;
color:#e5e7eb;
}

.leoia-pro-chat-item strong{
font-weight:500;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}

.leoia-pro-chat-item em{
font-style:normal;
font-size:12px;
color:#cbd5e1;
}

.leoia-pro-stats-card{
margin-top:30px;
background:rgba(255,255,255,.06);
border:1px solid rgba(255,255,255,.08);
border-radius:18px;
padding:20px;
}

.leoia-pro-stats-card h3{
font-size:15px;
margin-bottom:18px;
}

.leoia-pro-stat-row{
display:flex;
align-items:center;
justify-content:space-between;
margin-bottom:18px;
font-size:13px;
color:#cbd5e1;
}

.leoia-pro-stat-row strong{
font-size:21px;
color:#fff;
}

.leoia-pro-stat-row.positive span{
color:#22c55e;
}

/* MAIN */
#leoia-pro-main{
position:absolute;
left:330px;
right:0;
top:0;
bottom:0;
background:#f8fbff;
display:flex;
flex-direction:column;
border-radius:26px 0 0 26px;
overflow:hidden;
}

/* TOPBAR */
#leoia-pro-topbar{
height:88px;
display:flex;
align-items:center;
justify-content:space-between;
padding:0 34px;
background:#ffffff;
border-bottom:1px solid #e5e7eb;
}

.leoia-pro-top-title h1{
font-size:22px;
font-weight:900;
color:#0f172a;
}

.leoia-pro-online{
margin-top:5px;
font-size:13px;
color:#16a34a;
font-weight:700;
}

.leoia-pro-online i{
display:inline-block;
width:9px;
height:9px;
border-radius:50%;
background:#10b981;
margin-right:6px;
box-shadow:0 0 10px #10b981;
}

.leoia-pro-top-actions{
display:flex;
align-items:center;
gap:10px;
}

.leoia-pro-guide,
.leoia-pro-theme,
#leoia-pro-close{
border:none;
background:#f1f5f9;
height:42px;
border-radius:13px;
padding:0 18px;
font-weight:800;
cursor:pointer;
color:#0f172a;
}

.leoia-pro-theme,
#leoia-pro-close{
width:42px;
padding:0;
font-size:18px;
}

/* TOOLS */
#leoia-pro-tools{
height:86px;
display:flex;
align-items:center;
gap:12px;
padding:0 34px;
background:#fff;
border-bottom:1px solid #eef2f7;
overflow-x:auto;
}

.leoia-pro-tool,
#leoia-pro-mic-top{
height:54px;
border:1px solid #e2e8f0;
background:#ffffff;
border-radius:15px;
padding:0 20px;
font-weight:800;
cursor:pointer;
color:#0f172a;
box-shadow:0 4px 12px rgba(15,23,42,.03);
white-space:nowrap;
}

#leoia-pro-mic-top{
color:#4f46e5;
}

/* LAYOUT CHAT */
#leoia-pro-chat-layout {
    display: grid;
    grid-template-columns:
minmax(0, 1.15fr)
minmax(560px, .95fr);
    gap: 16px;
    height: calc(100vh - 230px);
    min-height: 0;
    overflow: hidden;
}

#leoia-pro-chat-panel {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* WELCOME */
#leoia-pro-welcome{
padding:46px;
text-align:center;
overflow-y:auto;
}

.leoia-pro-welcome-logo{
width:86px;
height:86px;
border-radius:24px;
background:linear-gradient(135deg,#2563eb,#7c3aed);
display:flex;
align-items:center;
justify-content:center;
font-size:42px;
color:#fff;
margin:0 auto 16px;
}

#leoia-pro-welcome h2{
font-size:34px;
font-weight:900;
}

#leoia-pro-welcome p{
max-width:680px;
margin:14px auto 28px;
font-size:16px;
line-height:1.7;
color:#475569;
}

.leoia-pro-welcome-grid{
display:grid;
grid-template-columns:repeat(4,1fr);
gap:14px;
margin-top:28px;
}

.leoia-pro-welcome-grid div{
background:#f8fafc;
border:1px solid #e5e7eb;
border-radius:18px;
padding:18px;
text-align:left;
}

.leoia-pro-welcome-grid strong{
display:block;
font-size:15px;
margin-bottom:8px;
}

.leoia-pro-welcome-grid span{
font-size:13px;
color:#64748b;
}

/* MENSAJES */
#leoia-pro-messages{
display:none;
flex:1;
overflow-y:auto;
padding:28px 36px;
flex-direction:column;
gap:18px;
}

#leoia-pro-messages.active{
display:flex;
}

.leoia-pro-user{
align-self:flex-end;
max-width:72%;
background:#eef2ff;
color:#0f172a;
padding:18px 22px;
border-radius:18px 18px 4px 18px;
font-size:15px;
line-height:1.7;
}

.leoia-pro-ai{
align-self:flex-start;
max-width:88%;
background:#fff;
border:1px solid #e2e8f0;
box-shadow:0 10px 35px rgba(15,23,42,.06);
padding:24px 26px;
border-radius:18px;
font-size:15px;
line-height:1.8;
color:#111827;
}

.leoia-pro-ai h1,
.leoia-pro-ai h2,
.leoia-pro-ai h3{
color:#4f46e5;
font-weight:900;
margin:18px 0 10px;
line-height:1.3;
}

.leoia-pro-ai h3{
font-size:18px;
}

.leoia-pro-ai p{
margin:0 0 14px;
color:#111827;
line-height:1.8;
}

.leoia-pro-ai ul{
margin:8px 0 16px 22px;
}

.leoia-pro-ai li{
margin-bottom:7px;
}

.leoia-pro-ai strong{
font-weight:900;
color:#111827;
}

.leoia-pro-ai a{
color:#4f46e5;
text-decoration:none;
}

.leoia-source-badge{
display:inline-block;
background:#eef2ff;
color:#4f46e5;
border:1px solid #c7d2fe;
padding:7px 12px;
border-radius:999px;
font-size:12px;
font-weight:800;
margin-bottom:12px;
}

.leoia-pro-loading,
.leoia-pro-error{
align-self:flex-start;
max-width:75%;
padding:18px 20px;
border-radius:18px;
background:#fff;
border:1px solid #e5e7eb;
box-shadow:0 10px 30px rgba(15,23,42,.06);
color:#475569;
}

.leoia-pro-error{
background:#fef2f2;
border-color:#fecaca;
color:#991b1b;
}

/* PANEL DERECHO */
#leoia-pro-rightbar {

    display: flex;

    flex-direction: column;

    gap: 16px;

    overflow: hidden;

    min-width: 420px;

    height: 100%;
}

.leoia-pro-side-card{
background:#fff;
border:1px solid #e5e7eb;
border-radius:18px;
padding:18px;
box-shadow:0 8px 25px rgba(15,23,42,.04);
}

.leoia-pro-side-card h3{
font-size:15px;
font-weight:900;
margin-bottom:14px;
}

.leoia-pro-side-head{
display:flex;
align-items:center;
justify-content:space-between;
margin-bottom:12px;
}

.leoia-pro-side-head button,
.leoia-pro-line-btn{
border:none;
background:#eef2ff;
color:#4f46e5;
border-radius:10px;
padding:8px 12px;
font-size:12px;
font-weight:900;
cursor:pointer;
}

.leoia-pro-doc-item{
display:flex;
gap:12px;
padding:12px 0;
border-bottom:1px solid #f1f5f9;
}

.leoia-pro-doc-item:last-child{
border-bottom:none;
}

.leoia-pro-doc-item span{
width:34px;
height:34px;
border-radius:10px;
display:flex;
align-items:center;
justify-content:center;
}

.leoia-pro-doc-item.pink span{
background:#fce7f3;
color:#db2777;
}

.leoia-pro-doc-item.orange span{
background:#ffedd5;
color:#ea580c;
}

.leoia-pro-doc-item.green span{
background:#dcfce7;
color:#16a34a;
}

.leoia-pro-doc-item strong{
display:block;
font-size:13px;
color:#4f46e5;
}

.leoia-pro-doc-item small{
font-size:12px;
color:#475569;
}

.leoia-pro-timeline{
display:flex;
flex-direction:column;
gap:18px;
margin:12px 0 18px;
}

.leoia-pro-timeline div{
position:relative;
padding-left:26px;
}

.leoia-pro-timeline i{
position:absolute;
left:0;
top:4px;
width:12px;
height:12px;
border-radius:50%;
border:3px solid #4f46e5;
background:#fff;
}

.leoia-pro-timeline strong{
display:block;
font-size:14px;
color:#1e293b;
}

.leoia-pro-timeline span{
display:block;
font-size:13px;
color:#1e293b;
}

.leoia-pro-timeline small{
font-size:12px;
color:#64748b;
}

#leoia-pro-suggestions{
display:flex;
flex-direction:column;
gap:10px;
}

#leoia-pro-suggestions button{
border:1px solid #e5e7eb;
background:#f8fafc;
border-radius:12px;
padding:12px;
font-size:12px;
text-align:left;
cursor:pointer;
color:#1e293b;
}

/* INPUT */
#leoia-pro-input-zone{
height:78px;
display:grid;
grid-template-columns:54px 1fr 46px 58px;
gap:10px;
align-items:center;
padding:10px 22px;
background:#fff;
border-top:1px solid #e5e7eb;
}

#leoia-pro-mic{
width:54px;
height:54px;
border:none;
border-radius:50%;
background:#eef2ff;
color:#4f46e5;
font-size:24px;
cursor:pointer;
}

#leoia-pro-mic.listening{
background:#fee2e2;
color:#dc2626;
animation:pulseMic 1s infinite;
}

@keyframes pulseMic{
0%{box-shadow:0 0 0 0 rgba(220,38,38,.35)}
70%{box-shadow:0 0 0 14px rgba(220,38,38,0)}
100%{box-shadow:0 0 0 0 rgba(220,38,38,0)}
}

#leoia-pro-input{
width:100%;
height:54px;
border:1px solid #c7d2fe;
border-radius:15px;
padding:16px;
resize:none;
outline:none;
font-size:15px;
color:#0f172a;
background:#fff;
}

#leoia-pro-attach{
border:none;
background:#fff;
font-size:22px;
cursor:pointer;
}

#leoia-pro-send{
width:58px;
height:54px;
border:none;
border-radius:16px;
background:linear-gradient(135deg,#2563eb,#7c3aed);
color:#fff;
font-size:26px;
cursor:pointer;
}

.leoia-pro-disclaimer{
text-align:center;
font-size:12px;
color:#64748b;
padding-bottom:8px;
background:#fff;
}

/* VOZ */
.leoia-pro-voice-actions{
display:flex;
gap:8px;
margin-top:14px;
border-top:1px solid #e5e7eb;
padding-top:12px;
}

.leoia-pro-voice-actions button{
border:none;
background:#eef2ff;
color:#4f46e5;
border-radius:10px;
padding:8px 12px;
font-weight:800;
cursor:pointer;
}

/* ADMIN */
.leoia-pro-admin-card{
background:#fff;
border-radius:18px;
padding:25px;
margin-bottom:22px;
box-shadow:0 12px 35px rgba(0,0,0,.08);
max-width:920px;
}

/* RESPONSIVE */
@media(max-width:1200px){
#leoia-pro-chat-layout{
grid-template-columns:1fr;
}

#leoia-pro-rightbar{
display:none;
}
}

@media(max-width:900px){

#leoia-pro-sidebar{
display:none;
}

#leoia-pro-main{
left:0;
border-radius:0;
}

.leoia-pro-welcome-grid{
grid-template-columns:1fr;
}

#leoia-pro-tools{
padding:0 14px;
}

#leoia-pro-chat-layout{
padding:0 12px;
}

#leoia-pro-input-zone{
grid-template-columns:48px 1fr 44px 52px;
padding:10px 12px;
}

.leoia-pro-user,
.leoia-pro-ai{
max-width:100%;
}

.leoia-pro-guide{
display:none;
}
}
/* =====================================================
   LEO IA PRO — BOTONES FUNCIONALES Y VISIBLES
===================================================== */

/* Botones superiores */
#leoia-pro-tools button,
.leoia-pro-tool,
#leoia-pro-mic-top{
    color:#0f172a !important;
    background:#ffffff !important;
    border:1px solid #dbe3ef !important;
    font-weight:800 !important;
    font-size:14px !important;
    opacity:1 !important;
    visibility:visible !important;
    text-shadow:none !important;
}

/* Hover elegante */
#leoia-pro-tools button:hover,
.leoia-pro-tool:hover,
#leoia-pro-mic-top:hover{
    background:#eef2ff !important;
    color:#4338ca !important;
    border-color:#c7d2fe !important;
    transform:translateY(-1px);
}

/* Botón activo */
.leoia-pro-tool.active,
#leoia-pro-mic-top.listening{
    background:#4338ca !important;
    color:#ffffff !important;
    border-color:#4338ca !important;
}

/* Botones del input */
#leoia-pro-mic,
#leoia-pro-attach,
#leoia-pro-send{
    color:#ffffff !important;
    opacity:1 !important;
    visibility:visible !important;
}

/* Micrófono */
#leoia-pro-mic{
    background:#4f46e5 !important;
    border:none !important;
}

/* Adjuntar */
#leoia-pro-attach{
    background:#0f172a !important;
    border:none !important;
    border-radius:14px !important;
    width:48px !important;
    height:48px !important;
}

/* Enviar */
#leoia-pro-send{
    background:linear-gradient(135deg,#2563eb,#7c3aed) !important;
    border:none !important;
}

/* Botones de respuesta */
.leoia-pro-voice-actions button,
.leoia-pro-copy,
.leoia-pro-speak,
.leoia-pro-stop-speak{
    background:#eef2ff !important;
    color:#4338ca !important;
    border:1px solid #c7d2fe !important;
    font-weight:800 !important;
    font-size:13px !important;
    border-radius:10px !important;
    padding:8px 12px !important;
    cursor:pointer !important;
    opacity:1 !important;
}

/* Hover botones respuesta */
.leoia-pro-voice-actions button:hover{
    background:#4338ca !important;
    color:#ffffff !important;
}

/* Botones sugeridos panel derecho */
#leoia-pro-suggestions button{
    color:#1e293b !important;
    background:#f8fafc !important;
    border:1px solid #dbe3ef !important;
    font-weight:700 !important;
}

#leoia-pro-suggestions button:hover{
    color:#4338ca !important;
    background:#eef2ff !important;
}

/* Botón guía y cerrar */
.leoia-pro-guide,
.leoia-pro-theme,
#leoia-pro-close{
    color:#0f172a !important;
    background:#f1f5f9 !important;
    opacity:1 !important;
}

/* Móvil */
@media(max-width:900px){

    #leoia-pro-tools{
        overflow-x:auto !important;
        gap:10px !important;
    }

    #leoia-pro-tools button{
        min-width:max-content !important;
        white-space:nowrap !important;
    }
}
/*
=====================================================
VISOR DOCUMENTO LATERAL
=====================================================
*/

.leoia-pro-doc-viewer {

    display: none;

    flex-direction: column;

    background: #fff;

    border-radius: 20px;

    overflow: hidden;

    border: 1px solid #e5e7eb;

    box-shadow:
    0 20px 45px rgba(0,0,0,.10);

    height: 100%;

    min-height: 700px;

    flex: 1;
}

.leoia-pro-doc-viewer.active {
    display: flex;
}

.leoia-pro-doc-viewer.active {
    display: flex;
}

.leoia-pro-doc-viewer-head {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 14px 18px;

    border-bottom: 1px solid #eee;

    background:
    linear-gradient(
        135deg,
        #f8f9fc,
        #ffffff
    );
}

.leoia-pro-doc-viewer-head strong {

    display: block;

    font-size: 15px;

    color: #111827;
}

.leoia-pro-doc-viewer-head small {

    color: #6b7280;
}

.leoia-pro-doc-actions {

    display: flex;

    gap: 8px;
}

.leoia-pro-doc-actions button {

    width: 38px;

    height: 38px;

    border: none;

    border-radius: 10px;

    cursor: pointer;

    background: #f3f4f6;

    transition: .2s;
}

.leoia-pro-doc-actions button:hover {

    background: #e5e7eb;
}

#leoia-pro-doc-frame {

    width: 100%;

    height: 100%;

    border: none;

    flex: 1;

    background: #fff;
}
#leoia-pro-input-zone {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 50 !important;
    background: #ffffff !important;
}