:root{--primary: #0066cc;--primary-dark: #004a99;--primary-light: #3385d6;--secondary: #00a3e0;--accent: #ff6b35;--success: #28a745;--white: #ffffff;--page-bg: #eef2f7;--light-gray: #f8f9fa;--gray-100: #e9ecef;--gray-200: #dee2e6;--gray-300: #ced4da;--gray-500: #6c757d;--gray-600: #495057;--gray-700: #343a40;--gray-800: #212529}*{box-sizing:border-box}html,body{height:100%;margin:0}body{font-family:Roboto,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:var(--page-bg);color:var(--gray-800)}.app-shell{display:flex;height:100vh;overflow:hidden;position:relative}.auth-loading{height:100vh;display:flex;align-items:center;justify-content:center;color:var(--gray-500);font-size:.9rem}.auth-shell{height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--primary-dark) 0%,var(--primary) 55%,var(--secondary) 100%);padding:1.5rem}.auth-card{background:var(--white);border-radius:22px;width:100%;max-width:380px;padding:1.8rem 1.8rem 1.6rem;box-shadow:0 24px 70px #0000004d}.auth-brand{text-align:center;margin-bottom:1.4rem}.auth-brand-name{font-family:Montserrat,-apple-system,sans-serif;font-weight:700;font-size:1.4rem;color:var(--primary)}.auth-brand-sub{font-size:.76rem;color:var(--gray-500);margin-top:.2rem}.auth-card h2{font-size:1.05rem;margin:0 0 1rem;color:var(--gray-800)}.auth-form{display:flex;flex-direction:column;gap:.7rem}.auth-form input{width:100%;border:1px solid var(--gray-200);border-radius:12px;padding:.65rem .85rem;font-family:inherit;font-size:.88rem;background:var(--light-gray)}.auth-form input:focus{outline:none;border-color:var(--primary-light);background:var(--white)}.auth-password-field{position:relative}.auth-password-field input{width:100%;padding-right:2.5rem}.auth-password-toggle{position:absolute;top:50%;right:.5rem;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;background:none;border:none;padding:.3rem;color:var(--gray-500);cursor:pointer}.auth-password-toggle:hover{color:var(--primary)}.auth-password-toggle svg{width:18px;height:18px}.auth-submit{margin-top:.3rem;background:linear-gradient(135deg,var(--primary-dark),var(--primary));color:var(--white);border:none;border-radius:999px;padding:.7rem;font-family:inherit;font-size:.88rem;font-weight:700;cursor:pointer}.auth-submit:disabled{opacity:.6;cursor:default}.auth-msg{font-size:.8rem;border-radius:10px;padding:.55rem .75rem}.auth-msg.error{background:#fdeceb;color:#b3261e}.auth-msg.info{background:#e6f6ea;color:#1e6b30}.auth-switch{text-align:center;font-size:.82rem;color:var(--gray-600);margin:1.1rem 0 0}.auth-switch a{color:var(--primary);font-weight:600;cursor:pointer}.user-bar{position:absolute;top:.9rem;right:1.2rem;z-index:30;display:flex;align-items:center;gap:.7rem;background:var(--white);border:1px solid var(--gray-200);border-radius:999px;padding:.4rem .5rem .4rem .9rem;box-shadow:0 4px 14px #00000014}.user-bar-name{font-family:inherit;font-size:.82rem;font-weight:600;color:var(--gray-700);background:none;border:none;cursor:pointer;border-radius:999px;padding:.2rem .5rem}.user-bar-name:hover{background:var(--light-gray);color:var(--primary)}.user-bar-logout{display:flex;align-items:center;gap:.35rem;background:var(--light-gray);border:none;color:var(--gray-600);border-radius:999px;padding:.4rem .75rem;font-family:inherit;font-size:.76rem;font-weight:600;cursor:pointer}.user-bar-logout svg{width:.95rem;height:.95rem}.user-bar-logout:hover{background:var(--gray-100);color:var(--accent)}.view-users{display:flex;flex-direction:column;gap:.7rem;flex:1;min-height:0;overflow-y:auto}.user-pending-card{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;background:var(--white);border:1px solid var(--gray-100);border-radius:16px;padding:.9rem 1.1rem}.user-pending-info{display:flex;flex-direction:column;gap:.15rem}.user-pending-cargo{font-size:.78rem;color:var(--primary);font-weight:600}.user-pending-email{font-size:.82rem;color:var(--gray-600)}.user-pending-date{font-size:.72rem;color:var(--gray-500)}.user-pending-actions{display:flex;align-items:center;gap:.5rem}.user-role-select{border:1px solid var(--gray-200);border-radius:10px;padding:.4rem .5rem;font-family:inherit;font-size:.8rem;background:var(--light-gray)}.approve-btn,.reject-btn{border:none;border-radius:999px;padding:.45rem .9rem;font-family:inherit;font-size:.78rem;font-weight:700;cursor:pointer}.approve-btn{background:var(--success);color:var(--white)}.reject-btn{background:var(--light-gray);color:var(--accent)}.status-badge,.role-badge{border-radius:999px;padding:.32rem .75rem;font-size:.72rem;font-weight:700}.status-badge.approved{background:#e6f6ea;color:#1e6b30}.status-badge.rejected{background:#fdeceb;color:#b3261e}.role-badge{background:var(--light-gray);color:var(--gray-600)}.role-badge.admin{background:#eaf3fd;color:var(--primary)}.delete-user-btn{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;background:var(--light-gray);border:none;border-radius:999px;color:var(--gray-500);cursor:pointer;flex-shrink:0}.delete-user-btn svg{width:1rem;height:1rem}.delete-user-btn:hover{background:#fdeceb;color:var(--accent)}.confirm-delete-label{font-size:.8rem;color:var(--gray-700)}.user-temp-password{margin-top:.45rem;display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;background:#eaf3fd;color:var(--primary-dark);border-radius:10px;padding:.45rem .7rem;font-size:.8rem}.user-temp-password code{font-size:.88rem;font-weight:700;background:var(--white);border-radius:6px;padding:.1rem .4rem}.user-temp-copy{border:none;background:var(--primary);color:var(--white);border-radius:999px;padding:.25rem .7rem;font-family:inherit;font-size:.72rem;font-weight:700;cursor:pointer}.user-temp-hint{font-size:.7rem;color:var(--gray-500);flex-basis:100%}.view-kpistats{display:flex;flex-direction:column;gap:1.1rem;flex:1;min-height:0;overflow-y:auto}.kpi-stats-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.8rem}.kpi-stat-card{background:var(--white);border:1px solid var(--gray-100);border-radius:16px;padding:1rem;text-align:center}.kpi-stat-value{font-size:1.5rem;font-weight:700;color:var(--primary)}.kpi-stat-label{font-size:.76rem;color:var(--gray-500);margin-top:.3rem}.kpi-stats-list{display:flex;flex-direction:column;gap:.5rem}.kpi-stat-item{background:var(--white);border:1px solid var(--gray-100);border-radius:14px;padding:.75rem 1rem}.kpi-stat-item-top{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.kpi-stat-item-date{font-size:.74rem;color:var(--gray-500)}.kpi-stat-item-scores{font-size:.8rem;color:var(--gray-700)}.kpi-stat-item-comment{margin-top:.4rem;font-size:.84rem;color:var(--gray-600);font-style:italic}.kpi-stat-item-open-btn{margin-left:auto;background:var(--light-gray);border:1px solid var(--gray-200);color:var(--primary);border-radius:999px;padding:.3rem .75rem;font-family:inherit;font-size:.72rem;font-weight:700;cursor:pointer;flex-shrink:0;transition:background .15s}.kpi-stat-item-open-btn:hover{background:var(--gray-100)}.suggest-stats-header{margin-top:2rem}.suggest-uses{margin-top:.9rem}.suggest-uses>summary{cursor:pointer;font-size:.84rem;font-weight:700;color:var(--primary);padding:.3rem 0}.suggest-use{background:#fff;border:1px solid var(--gray-100);border-radius:12px;padding:.45rem .8rem;margin-top:.4rem}.suggest-use>summary{cursor:pointer;display:flex;align-items:center;gap:.6rem;min-width:0}.suggest-use[open]>summary{margin-bottom:.3rem}.suggest-use-user{font-size:.8rem;color:var(--gray-700);white-space:nowrap}.suggest-use-preview{flex:1;min-width:0;font-size:.8rem;color:var(--gray-500);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.suggest-stat-row{margin-top:.4rem;font-size:.84rem;color:var(--gray-700);white-space:pre-wrap}.suggest-stat-key{display:inline-block;min-width:7.5rem;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--gray-500)}.kpi-stat-item-open-error{font-size:.76rem;color:var(--accent);margin-top:.35rem}.confidence-badge{font-size:.74rem;font-weight:700;border-radius:999px;padding:.22rem .65rem}.confidence-badge.high{background:#e6f6ea;color:#1e6b30}.confidence-badge.mid{background:#fff4e0;color:#92600a}.confidence-badge.low{background:#fdeceb;color:#b3261e}.kpi-stat-value.high{color:#1e6b30}.kpi-stat-value.mid{color:#92600a}.kpi-stat-value.low{color:#b3261e}@media (max-width: 900px){.kpi-stats-cards{grid-template-columns:repeat(2,1fr)}}.view-usage{display:flex;flex-direction:column;gap:1.1rem;flex:1;min-height:0;overflow-y:auto;padding-bottom:1rem}.usage-header-actions{display:flex;align-items:center;gap:.6rem}.usage-period{display:inline-flex;background:var(--light-gray);border-radius:999px;padding:.2rem}.usage-period button{border:none;background:transparent;border-radius:999px;padding:.35rem .8rem;font-family:inherit;font-size:.78rem;font-weight:600;color:var(--gray-600);cursor:pointer}.usage-period button.active{background:var(--white);color:var(--primary);box-shadow:0 1px 4px #00000014}.usage-alert{border-radius:14px;padding:.8rem 1rem;font-size:.86rem;line-height:1.45}.usage-alert.low{background:#fdeceb;color:#b3261e}.usage-alert.mid{background:#fff4e0;color:#92600a}.usage-alert.info{background:#eaf3fd;color:var(--primary-dark)}.usage-balance-card{background:linear-gradient(135deg,var(--primary-dark) 0%,var(--primary) 60%,var(--secondary) 100%);color:var(--white);border-radius:18px;padding:1.2rem 1.4rem;box-shadow:0 10px 30px #004a992e}.usage-balance-top{display:flex;justify-content:space-between;gap:1.5rem;flex-wrap:wrap}.usage-balance-label{font-size:.8rem;opacity:.85}.usage-balance-value{font-family:Montserrat,sans-serif;font-size:2.2rem;font-weight:700;margin-top:.2rem}.usage-balance-value.mid{color:#ffd38a}.usage-balance-value.low{color:#ffb4ab}.usage-balance-side{display:flex;flex-direction:column;gap:.35rem;font-size:.8rem;min-width:240px}.usage-balance-side div{display:flex;justify-content:space-between;gap:1rem}.usage-balance-side span{opacity:.85}.usage-balance-bar{height:8px;background:rgba(255,255,255,.25);border-radius:999px;margin-top:1rem;overflow:hidden}.usage-balance-bar div{height:100%;border-radius:999px;background:#8fe3a4;transition:width .4s}.usage-balance-bar div.mid{background:#ffd38a}.usage-balance-bar div.low{background:#ffb4ab}.usage-balance-card .usage-balance-note{color:var(--white);opacity:.8}.usage-balance-note{font-size:.74rem;color:var(--gray-500);margin-top:.6rem;line-height:1.4}.usage-panel{background:var(--white);border:1px solid var(--gray-100);border-radius:16px;padding:1rem 1.1rem;min-width:0}.usage-panel-title{font-family:Montserrat,sans-serif;font-weight:700;font-size:.92rem;color:var(--gray-800);margin-bottom:.8rem;display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.usage-sub{font-family:Roboto,sans-serif;font-weight:400;font-size:.74rem;color:var(--gray-500)}.usage-legend{margin-left:auto;font-family:Roboto,sans-serif;font-weight:400;font-size:.72rem;color:var(--gray-500);display:inline-flex;align-items:center;gap:.35rem}.usage-legend i{display:inline-block;width:.7rem;height:.7rem;border-radius:3px;background:var(--primary)}.usage-legend i.real{background:var(--secondary);opacity:.55;margin-left:.4rem}.usage-chart{display:flex;align-items:flex-end;gap:3px;height:160px}.usage-chart-col{flex:1;display:flex;flex-direction:column;align-items:center;height:100%;min-width:0}.usage-chart-bars{flex:1;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:1px}.usage-chart-bar{width:100%;max-width:18px;min-height:2px;background:var(--primary);border-radius:4px 4px 0 0;transition:height .3s}.usage-chart-bar.real{background:var(--secondary);opacity:.55}.usage-chart-col:hover .usage-chart-bar{background:var(--primary-light)}.usage-chart-label{font-size:.6rem;color:var(--gray-500);margin-top:.3rem;white-space:nowrap}.usage-chart-col:nth-child(odd) .usage-chart-label{visibility:hidden}.usage-two-cols{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.usage-row{margin-bottom:.75rem}.usage-row-top{display:flex;justify-content:space-between;gap:.6rem;font-size:.84rem}.usage-row-name{color:var(--gray-700);font-weight:600}.usage-row-value{color:var(--primary);font-weight:700;white-space:nowrap}.usage-row-bar{height:6px;background:var(--gray-100);border-radius:999px;margin-top:.3rem;overflow:hidden}.usage-row-bar div{height:100%;background:linear-gradient(90deg,var(--primary),var(--secondary));border-radius:999px}.usage-row-meta{font-size:.7rem;color:var(--gray-500);margin-top:.2rem}.usage-table{width:100%;border-collapse:collapse;font-size:.8rem}.usage-table th{text-align:left;font-weight:600;color:var(--gray-500);font-size:.72rem;padding:.3rem .4rem;border-bottom:1px solid var(--gray-100)}.usage-table td{padding:.45rem .4rem;border-bottom:1px solid var(--gray-100);color:var(--gray-700)}.usage-table td:last-child{color:var(--primary);font-weight:700}.usage-form{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.usage-form-label{font-size:.82rem;color:var(--gray-600)}.usage-input{width:7rem;border:1px solid var(--gray-200);border-radius:10px;padding:.45rem .6rem;font-family:inherit;font-size:.82rem;background:var(--light-gray)}.usage-input.wide{flex:1;min-width:8rem}.usage-input:focus{outline:none;border-color:var(--primary-light);background:var(--white)}.usage-form .approve-btn:disabled{opacity:.5;cursor:default}.usage-events{display:flex;flex-direction:column;gap:.4rem;margin-top:.9rem;border-top:1px solid var(--gray-100);padding-top:.7rem}.usage-event{display:flex;align-items:center;gap:.55rem;font-size:.82rem}.usage-event-meta{font-size:.72rem;color:var(--gray-500);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.usage-event-delete{border:none;background:transparent;color:var(--gray-500);font-size:1.1rem;cursor:pointer;line-height:1}.usage-event-delete:hover{color:var(--accent)}.status-badge.info{background:#eaf3fd;color:var(--primary)}@media (max-width: 900px){.usage-two-cols{grid-template-columns:1fr}.usage-header-actions{flex-wrap:wrap;justify-content:flex-end}}.sidebar{width:268px;flex-shrink:0;background:linear-gradient(180deg,var(--primary-dark) 0%,var(--primary) 100%);color:var(--white);display:flex;flex-direction:column;padding:1.3rem .9rem 1rem}.brand{font-family:Montserrat,-apple-system,sans-serif;font-weight:700;font-size:1.2rem;letter-spacing:.02em;padding:0 .4rem}.brand-sub{font-size:.72rem;opacity:.8;padding:.15rem .4rem 1rem}.new-chat-btn{width:100%;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.28);color:var(--white);border-radius:14px;padding:.65rem .9rem;font-size:.85rem;font-weight:600;font-family:inherit;cursor:pointer;text-align:left;transition:background .15s}.new-chat-btn:hover{background:rgba(255,255,255,.24)}.recent-label{font-size:.66rem;text-transform:uppercase;letter-spacing:.06em;opacity:.65;padding:1.1rem .5rem .4rem}.recent-list{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:.2rem;min-height:0}.recent-item{background:transparent;border:none;color:var(--white);text-align:left;border-radius:12px;padding:.55rem .7rem;cursor:pointer;display:flex;flex-direction:column;gap:.1rem;font-family:inherit;transition:background .15s}.recent-item:hover{background:rgba(255,255,255,.1)}.recent-item.active{background:rgba(255,255,255,.22)}.recent-title{font-size:.83rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.recent-owner{font-size:.68rem;font-weight:700;opacity:.85;display:block}.recent-meta{font-size:.68rem;opacity:.7}.empty-hint.small{font-size:.78rem;padding:.6rem .5rem;opacity:.7;text-align:left}.sidebar-footer{display:flex;flex-direction:column;gap:.2rem;padding-top:.7rem;margin-top:.6rem;border-top:1px solid rgba(255,255,255,.18)}.side-nav-btn{background:transparent;border:none;color:#ffffffe0;text-align:left;border-radius:12px;padding:.55rem .7rem;cursor:pointer;font-size:.85rem;font-family:inherit;display:flex;align-items:center;gap:.5rem;transition:background .15s}.side-nav-btn:hover{background:rgba(255,255,255,.1)}.side-nav-btn.active{background:rgba(255,255,255,.22);font-weight:600}.sidebar-version{font-size:.62rem;opacity:.45;text-align:left;padding:.5rem .7rem 0}.main{flex:1;display:flex;flex-direction:column;min-width:0;padding:4.3rem 2rem 1.5rem;overflow:hidden}.main-header{display:flex;align-items:center;justify-content:space-between;padding-bottom:.9rem}.main-header h2{margin:0;font-family:Montserrat,sans-serif;font-size:1.1rem}.refresh-btn{display:inline-flex;align-items:center;gap:.35rem;background:var(--light-gray);border:none;border-radius:999px;padding:.45rem 1rem;cursor:pointer;font-size:.82rem;font-weight:600;color:var(--gray-600)}.refresh-btn:disabled{opacity:.7;cursor:default}.refresh-icon{display:inline-block}.refresh-icon.spinning{animation:refresh-spin .7s linear infinite}@keyframes refresh-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.view-ask{display:flex;flex-direction:column;flex:1;min-height:0}.view-docs,.view-history{flex:1;min-height:0;overflow-y:auto}.chat{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:1.1rem;padding:.4rem .2rem 1rem}.chat.centered{justify-content:center;align-items:center}.empty-state{text-align:center;max-width:380px;color:var(--gray-600)}.empty-state h2{margin:.4rem 0;font-family:Montserrat,sans-serif;color:var(--gray-800)}.empty-state p{margin:0;font-size:.9rem}.msg{max-width:78%}.msg.user{align-self:flex-end}.msg.assistant{align-self:flex-start}.bubble{padding:.85rem 1.15rem;border-radius:20px;line-height:1.55;white-space:pre-wrap;font-size:.94rem}.msg.user .bubble{background:var(--primary);color:var(--white);border-bottom-right-radius:6px}.msg.assistant .bubble{background:var(--light-gray);border-bottom-left-radius:6px}.msg.assistant .bubble.no-context{background:#f1f3f5;color:var(--gray-600);font-style:italic}.bubble.thinking{display:flex;align-items:center;gap:.5rem;color:var(--gray-500);font-size:.85rem}.thinking-dots{display:inline-flex;gap:3px}.thinking-dots span{width:6px;height:6px;border-radius:50%;background:var(--primary-light);animation:thinking-bounce 1.2s infinite ease-in-out}.thinking-dots span:nth-child(2){animation-delay:.15s}.thinking-dots span:nth-child(3){animation-delay:.3s}@keyframes thinking-bounce{0%,60%,to{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}.warning-banner{margin-top:.5rem;font-size:.8rem;background:#fff4ec;color:#b3501a;padding:.55rem .85rem;border-radius:14px}.verifying-banner{margin-top:.5rem;font-size:.78rem;color:var(--gray-500);display:flex;align-items:center;gap:.5rem}.sources{margin-top:.6rem;font-size:.78rem;color:var(--gray-600)}.sources summary{cursor:pointer;color:var(--primary);font-weight:500}.sources ul{margin:.4rem 0 0;padding-left:1.1rem}.source-link{color:var(--primary);text-decoration:none}.source-link:hover{text-decoration:underline}.inline-citation{color:var(--primary);font-weight:600;text-decoration:underline dotted;text-underline-offset:2px}.inline-citation:hover{text-decoration-style:solid}.src-help{margin:.4rem 0 .6rem;padding:.5rem .7rem;background:var(--light-gray);border-radius:10px;font-size:.74rem;line-height:1.45;color:var(--gray-600)}.src-help br{content:"";display:block;margin-top:.35rem}.source-item{margin-bottom:.3rem}.src-badge{display:inline-block;font-size:.65rem;font-weight:700;text-transform:uppercase;letter-spacing:.02em;padding:.1rem .45rem;border-radius:999px;margin-right:.35rem}.src-badge.used{background:#e6f6ea;color:var(--success)}.src-badge.unused{background:var(--gray-100);color:var(--gray-500)}.src-relevance{color:var(--gray-500);font-size:.76rem}.rate-row{margin-top:.6rem;display:flex;gap:.4rem;align-items:center}.rate-row button{border:none;background:var(--gray-100);border-radius:999px;width:2.1rem;height:2.1rem;display:flex;align-items:center;justify-content:center;color:var(--gray-500);cursor:pointer;transition:background .15s,color .15s}.rate-row button svg{width:1.05rem;height:1.05rem}.rate-row button.ok:hover{background:#e6f6ea;color:var(--success)}.rate-row button.bad:hover{background:#ffe9e0;color:var(--accent)}.rate-row button.ok.active{background:var(--success);color:var(--white)}.rate-row button.bad.active{background:var(--accent);color:var(--white)}.rate-row .rated-label{font-size:.78rem;color:var(--gray-500)}.composer{display:flex;align-items:flex-end;gap:.6rem;background:var(--white);border:1px solid var(--gray-200);border-radius:24px;padding:.4rem .4rem .4rem 1.2rem;box-shadow:0 4px 16px #004a9914;flex-shrink:0}.composer:focus-within{border-color:var(--primary-light)}.composer-input{flex:1;border:none;resize:none;font-family:inherit;font-size:.95rem;line-height:1.4;max-height:160px;padding:.6rem 0;background:transparent}.composer-input:focus{outline:none}.composer-send{background:var(--primary);border:none;color:var(--white);width:2.5rem;height:2.5rem;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background .15s}.composer-send:hover:not(:disabled){background:var(--primary-dark)}.composer-send:disabled{background:var(--gray-300);cursor:default}.composer-send svg{width:1.1rem;height:1.1rem}.composer-context-btn{background:var(--light-gray);border:1px solid var(--gray-200);color:var(--primary);width:2.5rem;height:2.5rem;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background .15s,border-color .15s}.composer-context-btn:hover{background:#eaf3fd;border-color:var(--primary-light)}.composer-context-btn svg{width:1.2rem;height:1.2rem}.composer-suggest-btn{background:#fff1e0;border:1px solid #ffd3a1;color:#d9730d;width:2.5rem;height:2.5rem;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background .15s,border-color .15s,opacity .15s}.composer-suggest-btn:hover:not(:disabled){background:#ffe4c4;border-color:#f5a95c}.composer-suggest-btn:disabled{opacity:.45;cursor:default}.composer-suggest-btn svg{width:1.2rem;height:1.2rem}.suggest-modal .context-label{margin-bottom:.35rem}.suggest-label{margin-top:1rem}.suggest-original,.suggest-text{border-radius:12px;padding:.7rem .85rem;font-size:.9rem;line-height:1.5;white-space:pre-wrap}.suggest-original{background:var(--light-gray);color:var(--gray-600);border:1px solid var(--gray-200)}.suggest-text{background:#fff7ee;color:var(--gray-800);border:1px solid #ffd3a1}.suggest-editor{width:100%;box-sizing:border-box;font-family:inherit;resize:vertical;outline:none}.suggest-editor:focus{border-color:#f5a95c;background:var(--white)}.suggest-note{font-size:.8rem;color:var(--gray-500);margin:.5rem 0 0}.suggest-warn{color:#b85c00;font-weight:600}.kpi-footer .kpi-cancel-btn:disabled{opacity:.5;cursor:default}.suggest-accept-btn{background:linear-gradient(135deg,#e8780f,#f59a3c);border-color:#e8780f}.composer-hint{font-size:.72rem;color:var(--gray-500);text-align:center;padding-top:.5rem;flex-shrink:0}.empty-hint{color:var(--gray-500);font-size:.9rem;text-align:center;padding:2rem 1rem;display:flex;flex-direction:column;align-items:center;gap:.6rem}.empty-hint-icon{width:2.2rem;height:2.2rem;opacity:.35}.hist-filter-card{background:#fff;border:1px solid var(--gray-100);border-radius:20px;padding:1rem 1.1rem;margin-bottom:1.1rem;box-shadow:0 1px 3px #2125290a}.hist-filter-card .docs-search-row{margin-bottom:0}.hist-search-input{background:var(--light-gray);border-color:transparent}.hist-search-input:focus{background:var(--white);border-color:var(--primary-light)}.hist-filter-divider{height:1px;background:var(--gray-100);margin:.9rem 0}.hist-filter-row{display:flex;align-items:flex-end;flex-wrap:wrap;gap:.9rem;row-gap:.9rem}.hist-date-field{display:flex;align-items:center;gap:.5rem}.hist-date-inputs{display:flex;flex-direction:column;gap:.3rem}.hist-date-inputs label{font-size:.66rem;font-weight:700;color:var(--gray-500);text-transform:uppercase;letter-spacing:.03em}.hist-date-combo{display:flex;align-items:center;gap:.4rem}.hist-time-input{border:1px solid var(--gray-200);border-radius:10px;padding:.42rem .5rem;font-family:inherit;font-size:.78rem;background:var(--light-gray);color:var(--gray-700);color-scheme:light;width:5.4rem}.hist-time-input:focus{outline:none;border-color:var(--primary-light);background:var(--white)}.hist-user-select{border:1px solid var(--gray-200);border-radius:10px;padding:.42rem .5rem;font-family:inherit;font-size:.78rem;background:var(--light-gray);color:var(--gray-700);min-width:11rem;cursor:pointer}.hist-user-select:focus{outline:none;border-color:var(--primary-light);background:var(--white)}.hist-filter-sep{width:1px;align-self:stretch;background:var(--gray-100);margin:.2rem 0}.datepicker{position:relative}.datepicker-trigger{display:inline-flex;align-items:center;gap:.45rem;border:1px solid var(--gray-200);border-radius:10px;padding:.42rem .65rem;font-family:inherit;font-size:.78rem;background:var(--light-gray);color:var(--gray-700);cursor:pointer;transition:background .15s,border-color .15s;white-space:nowrap}.datepicker-trigger svg{width:1rem;height:1rem;color:var(--gray-400);flex-shrink:0}.datepicker-trigger:hover{background:var(--gray-100)}.datepicker-trigger .placeholder{color:var(--gray-500)}.datepicker-pop{position:absolute;top:calc(100% + .4rem);left:0;z-index:30;background:var(--white);border-radius:16px;box-shadow:0 12px 32px #21252929;border:1px solid var(--gray-100);padding:.85rem;width:17.5rem}.datepicker-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.6rem}.datepicker-month{font-family:Montserrat,sans-serif;font-weight:700;font-size:.84rem;color:var(--gray-800)}.datepicker-nav{background:var(--light-gray);border:none;color:var(--gray-600);width:1.9rem;height:1.9rem;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s,color .15s}.datepicker-nav svg{width:.9rem;height:.9rem}.datepicker-nav:hover{background:#eaf3fd;color:var(--primary)}.datepicker-weekdays{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-size:.66rem;font-weight:700;color:var(--gray-400);margin-bottom:.3rem}.datepicker-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:.15rem}.datepicker-day{background:none;border:none;border-radius:50%;width:2.1rem;height:2.1rem;font-family:inherit;font-size:.78rem;color:var(--gray-700);cursor:pointer;transition:background .15s,color .15s}.datepicker-day:hover{background:var(--gray-100)}.datepicker-day.other-month{color:var(--gray-300)}.datepicker-day.today{font-weight:700;color:var(--primary);box-shadow:inset 0 0 0 1.5px var(--primary-light)}.datepicker-day.selected{background:var(--primary);color:var(--white);font-weight:700}.datepicker-day.selected:hover{background:var(--primary-dark)}.datepicker-foot{display:flex;justify-content:space-between;margin-top:.6rem;padding-top:.6rem;border-top:1px solid var(--gray-100)}.datepicker-foot button{background:none;border:none;color:var(--primary);font-family:inherit;font-size:.76rem;font-weight:700;cursor:pointer;padding:.2rem .3rem}.datepicker-foot button:last-child{color:var(--gray-500)}.datepicker-foot button:hover{text-decoration:underline}.hist-filter-presets{display:inline-flex;background:var(--light-gray);border-radius:999px;padding:.2rem;gap:.15rem}.hist-filter-presets button{background:transparent;border:none;color:var(--gray-600);border-radius:999px;padding:.4rem .75rem;font-family:inherit;font-size:.74rem;font-weight:700;cursor:pointer;transition:background .15s,color .15s}.hist-filter-presets button:hover{background:var(--white);color:var(--primary)}.hist-filter-clear{display:inline-flex;align-items:center;gap:.3rem;background:none;border:none;color:var(--accent);font-family:inherit;font-size:.76rem;font-weight:700;cursor:pointer;padding:.4rem .5rem;margin-left:auto;border-radius:999px;transition:background .15s}.hist-filter-clear svg{width:.8rem;height:.8rem}.hist-filter-clear:hover{background:#fee2e2}#history-list,#docs-list{display:flex;flex-direction:column;gap:.9rem}.hist-conv{border:1px solid var(--gray-100);border-radius:20px;padding:1rem 1.1rem;background:#fff;box-shadow:0 1px 3px #2125290a;transition:box-shadow .15s,border-color .15s}.hist-conv:hover{box-shadow:0 6px 18px #21252912;border-color:var(--gray-200)}.hist-conv-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.7rem;padding-bottom:.85rem;margin-bottom:.15rem;border-bottom:1px solid var(--gray-100)}.hist-conv-info{display:flex;align-items:center;gap:.7rem;min-width:0}.hist-conv-icon{width:2.3rem;height:2.3rem;border-radius:50%;background:#eaf3fd;color:var(--primary);display:flex;align-items:center;justify-content:center;flex-shrink:0}.hist-conv-icon svg{width:1.1rem;height:1.1rem}.hist-conv-text{display:flex;flex-direction:column;gap:.15rem;min-width:0}.hist-conv-title{font-family:Montserrat,sans-serif;font-weight:700;font-size:.9rem;color:var(--gray-800)}.hist-conv-meta{font-size:.74rem;color:var(--gray-500)}.hist-conv-owner{color:var(--accent);font-weight:600}.hist-conv-cost{color:var(--gray-500)}.hist-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.4rem;flex-shrink:0}.hist-actions button{display:inline-flex;align-items:center;gap:.35rem;border-radius:999px;padding:.35rem .8rem;font-family:inherit;font-size:.72rem;font-weight:700;cursor:pointer;flex-shrink:0;transition:background .15s,border-color .15s}.hist-actions button svg{width:.95rem;height:.95rem;flex-shrink:0}.hist-continue-btn{background:var(--light-gray);border:1px solid var(--gray-200);color:var(--primary)}.hist-continue-btn:hover{background:var(--gray-100)}.hist-explain-btn{background:#eaf3fd;border:1px solid var(--primary-light);color:var(--primary-dark)}.hist-explain-btn:hover{background:#d8ebfc}.hist-delete-btn{background:#fee2e2;border:1px solid #fca5a5;color:#dc2626}.hist-delete-btn:hover{background:#fecaca}.hist-conv-turns{display:flex;flex-direction:column;gap:.55rem;margin-top:.85rem}.hist-toggle-btn{align-self:flex-start;background:transparent;border:none;color:var(--primary);font-family:inherit;font-size:.76rem;font-weight:700;cursor:pointer;padding:.3rem .2rem}.hist-toggle-btn:hover{text-decoration:underline}.hist-item{background:var(--light-gray);border-left:3px solid var(--gray-300);border-radius:4px 16px 16px 4px;padding:.75rem 1.1rem;transition:background .15s,border-color .15s}.hist-item:hover{background:#f1f3f5}.hist-item:has(.badge.ok){border-left-color:var(--success)}.hist-item:has(.badge.bad,.badge.error){border-left-color:var(--accent)}.hist-item summary{cursor:pointer;display:flex;align-items:center;gap:.6rem;list-style:none}.hist-item summary::-webkit-details-marker{display:none}.hist-item[open]{background:#eef6fb}.badge{font-size:.66rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;padding:.2rem .6rem;border-radius:999px;flex-shrink:0}.badge.ok{background:#e6f6ea;color:var(--success)}.badge.bad,.badge.error{background:#ffe9e0;color:var(--accent)}.badge.skipped,.badge.n-a{background:var(--gray-100);color:var(--gray-500)}.hist-q{font-weight:500;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hist-ts{font-size:.75rem;color:var(--gray-500);flex-shrink:0}.hist-cost{font-size:.72rem;color:var(--gray-500);flex-shrink:0;white-space:nowrap}.hist-body{margin-top:.7rem;font-size:.88rem}.hist-body .answer{white-space:pre-wrap;margin-bottom:.6rem}.hist-comment{margin-top:.5rem;font-size:.82rem;color:var(--gray-600);font-style:italic}.docs-summary{font-size:.85rem;color:var(--gray-600);margin-bottom:.9rem}.docs-search-row{position:relative;display:flex;align-items:center;margin-bottom:1rem}.docs-search-icon{position:absolute;left:.85rem;width:1rem;height:1rem;color:var(--gray-500);pointer-events:none}.docs-search-input{width:100%;border:1px solid var(--gray-200);border-radius:999px;padding:.6rem 2.2rem;font-family:inherit;font-size:.86rem;background:var(--white)}.docs-search-input:focus{outline:none;border-color:var(--primary-light)}.docs-search-clear{position:absolute;right:.6rem;background:var(--gray-100);border:none;color:var(--gray-600);width:1.4rem;height:1.4rem;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.docs-search-clear svg{width:.7rem;height:.7rem}.docs-search-clear:hover{background:var(--gray-200)}#docs-list{display:flex;flex-direction:column;gap:.9rem}.doc-group{background:#fff;border:1px solid var(--gray-100);border-radius:20px;padding:1rem 1.1rem;box-shadow:0 1px 3px #2125290a;transition:box-shadow .15s,border-color .15s}.doc-group:hover{box-shadow:0 6px 18px #21252912;border-color:var(--gray-200)}.doc-group summary{cursor:pointer;display:flex;align-items:center;gap:.7rem;list-style:none;font-weight:700;font-family:Montserrat,sans-serif;font-size:.9rem;color:var(--gray-800)}.doc-group summary::-webkit-details-marker{display:none}.doc-group-icon{width:2.1rem;height:2.1rem;border-radius:50%;background:#eaf3fd;color:var(--primary);display:flex;align-items:center;justify-content:center;flex-shrink:0}.doc-group-icon svg{width:1rem;height:1rem}.doc-group-label{flex:1}.doc-group .count{font-weight:700;color:var(--gray-500);font-size:.72rem;background:var(--light-gray);padding:.15rem .55rem;border-radius:999px;flex-shrink:0}.doc-group ul{margin:.85rem 0 .1rem;padding:0;list-style:none;display:flex;flex-direction:column;gap:.4rem}.doc-group li{background:var(--light-gray);border-radius:12px;padding:.55rem .8rem;font-size:.82rem;display:flex;justify-content:space-between;gap:.6rem;align-items:center;transition:background .15s}.doc-group li:hover{background:#f1f3f5}.doc-file-icon{width:1rem;height:1rem;color:var(--gray-500);flex-shrink:0}.doc-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.doc-name.source-link:after{content:" ↗";opacity:.55}.doc-chars{font-size:.7rem;color:var(--gray-500);flex-shrink:0;white-space:nowrap}.doc-tag{font-size:.68rem;background:#eef6fb;color:var(--secondary);padding:.15rem .5rem;border-radius:999px;flex-shrink:0}.doc-view-btn{background:transparent;border:none;color:var(--gray-500);cursor:pointer;width:1.7rem;height:1.7rem;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;vertical-align:middle}.doc-view-btn svg{width:1rem;height:1rem}.doc-view-btn:hover{background:var(--gray-100);color:var(--primary)}.text-viewer-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(33,37,41,.55);display:flex;align-items:center;justify-content:center;z-index:50;padding:2rem}.text-viewer{background:var(--white);border-radius:20px;width:100%;height:100%;max-width:1200px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 60px #0000004d}.text-viewer-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.3rem;border-bottom:1px solid var(--gray-100);flex-shrink:0}.text-viewer-title strong{font-size:.95rem}.text-viewer-sub{margin-left:.6rem;font-size:.78rem;color:var(--gray-500)}.text-viewer-close{background:var(--light-gray);border:none;border-radius:999px;width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--gray-600);flex-shrink:0}.text-viewer-close svg{width:1rem;height:1rem}.text-viewer-body{flex:1;display:flex;min-height:0}.text-viewer-pane{flex:1;min-width:0;overflow-y:auto}.text-viewer-original{border-right:1px solid var(--gray-100);background:var(--gray-100)}.text-viewer-frame{width:100%;height:100%;border:none}.text-viewer-text{padding:1rem 1.3rem;font-size:.86rem}.text-viewer-legend{display:flex;gap:1rem;font-size:.74rem;color:var(--gray-500);margin-bottom:.8rem;padding-bottom:.6rem;border-bottom:1px solid var(--gray-100)}.legend-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:.3rem}.legend-dot.native{background:var(--gray-300)}.legend-dot.ocr{background:var(--secondary)}.legend-dot.ai{background:var(--accent)}.legend-dot.highlighted{background:#ffd43b}.text-viewer-page-num{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--primary);margin:1rem 0 .4rem}.text-viewer-page:first-child .text-viewer-page-num{margin-top:0}.text-viewer-page-target{background:#fffbea;border-radius:12px;padding:.3rem .6rem;margin:0 -.6rem}.text-chunk{white-space:pre-wrap;line-height:1.5;margin-bottom:.6rem}.text-chunk.ocr,.text-chunk.ai{padding:.6rem .8rem;border-radius:10px;font-size:.82rem}.text-chunk.ocr{background:#eef6fb;border-left:3px solid var(--secondary)}.text-chunk.ai{background:#fff4ec;border-left:3px solid var(--accent)}.text-chunk.highlighted{background:#fff3bf;border-left:3px solid #f0b400;padding:.6rem .8rem;border-radius:10px;box-shadow:0 0 0 1px #f0b400}.finish-row{display:flex;justify-content:center;padding-top:.6rem;flex-shrink:0}.finish-btn{background:transparent;border:1px solid var(--gray-300);color:var(--gray-600);border-radius:999px;padding:.4rem 1rem;font-size:.78rem;font-weight:600;font-family:inherit;cursor:pointer;transition:background .15s,border-color .15s}.finish-btn:hover{background:var(--light-gray);border-color:var(--primary-light);color:var(--primary)}.kpi-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(33,37,41,.55);display:flex;align-items:center;justify-content:center;z-index:60;padding:1.5rem}.kpi-modal{background:var(--white);border-radius:22px;width:100%;max-width:460px;max-height:90vh;overflow-y:auto;box-shadow:0 24px 70px #00000059}.kpi-header{display:flex;align-items:center;justify-content:space-between;padding:1.5rem 1.4rem;background:linear-gradient(135deg,var(--primary-dark) 0%,var(--primary) 55%,var(--secondary) 100%);color:var(--white);border-radius:22px 22px 0 0}.kpi-header-text{display:flex;align-items:center;flex:1;min-width:0}.kpi-header strong{font-size:1.05rem}.kpi-header p{margin:.15rem 0 0;font-size:.78rem;opacity:.85}.kpi-close{background:rgba(255,255,255,.18);color:var(--white);flex-shrink:0;margin-left:.8rem}.kpi-close:hover{background:rgba(255,255,255,.32)}.kpi-body{padding:1.3rem 1.4rem 1.4rem;display:flex;flex-direction:column;gap:1.3rem}.kpi-field label{display:block;font-size:.84rem;font-weight:700;color:var(--gray-700);margin-bottom:.55rem}.kpi-field textarea{width:100%;border:1px solid var(--gray-200);border-radius:12px;padding:.6rem .75rem;font-family:inherit;font-size:.86rem;resize:vertical;background:var(--light-gray)}.kpi-field textarea:focus{outline:none;border-color:var(--primary-light);background:var(--white)}.kpi-toggle{display:flex;gap:.7rem}.kpi-toggle button{flex:1;display:flex;align-items:center;justify-content:center;gap:.4rem;border:1.5px solid var(--gray-200);background:var(--light-gray);border-radius:14px;padding:.7rem;font-family:inherit;font-size:.86rem;font-weight:700;color:var(--gray-600);cursor:pointer;transition:transform .1s,background .15s,border-color .15s}.kpi-toggle button svg{width:1.1rem;height:1.1rem}.kpi-toggle button:hover{transform:translateY(-1px)}.kpi-toggle button.active.yes{background:var(--success);border-color:var(--success);color:var(--white)}.kpi-toggle button.active.no{background:var(--accent);border-color:var(--accent);color:var(--white)}.kpi-stars{display:flex;gap:.3rem}.kpi-stars button{flex:1;border:none;background:var(--light-gray);border-radius:12px;padding:.55rem 0;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform .1s,background .15s}.kpi-stars button svg{width:1.35rem;height:1.35rem;stroke:var(--gray-300);fill:none;transition:stroke .15s,fill .15s}.kpi-stars button:hover{transform:translateY(-1px)}.kpi-stars button.filled{background:#eaf3fd}.kpi-stars button.filled svg{stroke:var(--primary);fill:var(--primary)}.kpi-scale-labels{display:flex;justify-content:space-between;font-size:.68rem;color:var(--gray-500);margin-top:.4rem}.kpi-footer{display:flex;justify-content:flex-end;gap:.6rem;padding:0 1.4rem 1.4rem}.kpi-cancel-btn,.kpi-submit-btn{border-radius:999px;padding:.6rem 1.3rem;font-family:inherit;font-size:.84rem;font-weight:700;cursor:pointer;border:1.5px solid var(--gray-300)}.kpi-cancel-btn{background:var(--white);color:var(--gray-600)}.kpi-submit-btn{background:linear-gradient(135deg,var(--primary-dark),var(--primary));border-color:var(--primary);color:var(--white)}.kpi-submit-btn:disabled{background:var(--gray-300);border-color:var(--gray-300);cursor:default}.explain-modal{max-width:620px}.explain-body{padding:1.3rem 1.4rem 1.5rem;max-height:65vh;overflow-y:auto}.explain-body .answer{font-size:.9rem;line-height:1.55;white-space:pre-wrap}.explain-meta{display:flex;align-items:center;flex-wrap:wrap;gap:.3rem;margin-top:1rem;padding-top:.8rem;border-top:1px solid var(--gray-200);font-size:.72rem;color:var(--gray-500)}.explain-regen-btn{margin-left:auto;background:var(--light-gray);border:1px solid var(--gray-200);color:var(--primary);border-radius:999px;padding:.3rem .75rem;font-family:inherit;font-size:.72rem;font-weight:700;cursor:pointer;transition:background .15s}.explain-regen-btn:hover{background:var(--gray-100)}.explain-regen-btn:disabled{opacity:.6;cursor:default}.context-modal .explain-body{display:flex;flex-direction:column;gap:1.1rem}.context-section{display:flex;flex-direction:column;gap:.35rem}.context-label{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--gray-500)}.context-machine{font-size:.92rem;color:var(--gray-700)}.context-machine-detail{font-size:.82rem;color:var(--gray-500);margin-top:.15rem}.context-text{font-size:.9rem;line-height:1.5;color:var(--gray-700)}.context-empty{font-size:.86rem;color:var(--gray-500);font-style:italic}.context-chips{display:flex;flex-wrap:wrap;gap:.4rem}.context-chip{display:inline-block;background:#eaf3fd;color:var(--primary-dark);border-radius:999px;padding:.2rem .65rem;font-size:.78rem;font-weight:700}.context-chip-pending{background:#fff4e0;color:#a15c00;margin-bottom:.35rem}.context-chip-warn{background:#fdecec;color:#a12a2a}.context-tag.tag-estado{background:#eef0f3;color:#3d4654}.context-tag.tag-maquina{background:#eaf3fd;color:#0b4f9c}.context-tag.tag-caso{background:#e6f6ec;color:#1d6b3a}.context-tag.tag-diagnostico{background:#f1ebfb;color:#5b2a9e}.context-tag.tag-fallo-electrico{background:#fff6d6;color:#8a6100}.context-tag.tag-fallo-hidraulico{background:#ddf4f4;color:#0f6b6b}.context-tag.tag-fallo-mecanico{background:#f3e9df;color:#7a4a1e}.context-tag.tag-sospecha{background:#fff1e6;color:#a34a00}.context-tag.tag-confirmado{background:#dcf5e3;color:#11602f;box-shadow:inset 0 0 0 1px #8fd3a5}.context-tag.tag-descartado{background:#f1f2f4;color:#6b7280}.context-tag.tag-descartado,.context-tag.tag-quitado{text-decoration:line-through;text-decoration-color:#6b728099}.context-tag.tag-descartado .context-tag-key,.context-tag.tag-quitado .context-tag-key{text-decoration:none;display:inline-block}.context-tag.tag-quitado{background:transparent;color:#8a8f98;box-shadow:inset 0 0 0 1px var(--gray-200)}.context-tag{font-weight:600;display:inline-flex;align-items:baseline;gap:.35rem;max-width:100%}.context-tag-key{font-weight:400;opacity:.75;font-size:.72rem}.context-timeline{list-style:none;margin:0;padding:0 0 0 .8rem;border-left:2px solid var(--gray-200);display:flex;flex-direction:column;gap:.6rem}.context-timeline-q{font-size:.78rem;color:var(--gray-500);margin-bottom:.25rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.context-pending{font-size:.88rem;color:var(--gray-700)}.context-pending-msg{display:block;margin-top:.35rem;font-size:.85rem;color:var(--gray-600);white-space:pre-wrap}.context-ok{font-size:.88rem;color:var(--success);font-weight:600}.context-summary{background:#eaf3fd;border:1px solid var(--primary-light);border-radius:14px;padding:.9rem 1rem;font-size:.92rem;line-height:1.55;color:var(--gray-700)}.context-cost{font-size:.72rem;color:var(--gray-500);padding-top:.6rem;border-top:1px solid var(--gray-200)}.kpi-sent{padding:2.2rem 1.4rem;text-align:center}.kpi-sent-icon{width:3.2rem;height:3.2rem;border-radius:999px;background:#e6f6ea;color:var(--success);display:flex;align-items:center;justify-content:center;margin:0 auto .9rem}.kpi-sent-icon svg{width:1.7rem;height:1.7rem}.kpi-sent strong{display:block;font-size:.98rem;color:var(--gray-800)}.kpi-sent span{display:block;margin-top:.3rem;font-size:.82rem;color:var(--gray-500)}.profile-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(33,37,41,.55);display:flex;align-items:center;justify-content:center;z-index:60;padding:1.5rem}.profile-modal{background:var(--white);border-radius:22px;width:100%;max-width:440px;max-height:90vh;overflow-y:auto;box-shadow:0 24px 70px #00000059}.profile-header{display:flex;align-items:center;justify-content:space-between;padding:1.5rem 1.4rem;background:linear-gradient(135deg,var(--primary-dark) 0%,var(--primary) 55%,var(--secondary) 100%);color:var(--white);border-radius:22px 22px 0 0}.profile-header strong{font-size:1.05rem}.profile-header p{margin:.15rem 0 0;font-size:.78rem;opacity:.85}.profile-close{background:rgba(255,255,255,.18);color:var(--white);flex-shrink:0;margin-left:.8rem}.profile-close:hover{background:rgba(255,255,255,.32)}.profile-body{padding:1.3rem 1.4rem 1.4rem;display:flex;flex-direction:column;gap:1.4rem}.profile-section-title{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--gray-500);margin-bottom:.7rem}.profile-field{margin-bottom:.6rem}.profile-field label{display:block;font-size:.8rem;font-weight:600;color:var(--gray-700);margin-bottom:.35rem}.profile-field input{width:100%;border:1px solid var(--gray-200);border-radius:12px;padding:.6rem .75rem;font-family:inherit;font-size:.86rem;background:var(--light-gray)}.profile-field input:focus{outline:none;border-color:var(--primary-light);background:var(--white)}.profile-save-btn{width:100%;background:linear-gradient(135deg,var(--primary-dark),var(--primary));color:var(--white);border:none;border-radius:999px;padding:.65rem;font-family:inherit;font-size:.86rem;font-weight:700;cursor:pointer;margin-top:.2rem}.profile-save-btn:disabled{opacity:.6;cursor:default}.profile-msg{font-size:.8rem;border-radius:10px;padding:.55rem .75rem;margin-top:.6rem}.profile-msg.error{background:#fdeceb;color:#b3261e}.profile-msg.info{background:#e6f6ea;color:#1e6b30}.profile-divider{border:none;border-top:1px solid var(--gray-100);margin:0}.tickets-panel{margin-top:.65rem;background:#e8f4fd;border:1px solid #b3d7f0;border-radius:12px;padding:.75rem 1rem;font-size:.84rem}.tickets-header{display:flex;align-items:center;gap:.45rem;font-weight:600;color:#1565c0;margin-bottom:.55rem}.tickets-header svg{width:15px;height:15px;flex-shrink:0;stroke:#1565c0}.tickets-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.35rem}.ticket-item{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.35rem .6rem;background:rgba(255,255,255,.65);border-radius:8px;border:1px solid #c9e4f5}.ticket-link{color:#0d47a1;text-decoration:none;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.ticket-link:hover{text-decoration:underline}.ticket-relevance{font-size:.78rem;color:#1976d2;white-space:nowrap;flex-shrink:0}.tickets-empty{margin:0;color:#5b8db8;font-style:italic}abbr.gloss{text-decoration:underline dotted rgba(0,102,204,.55);text-underline-offset:3px;cursor:pointer}abbr.gloss:hover,abbr.gloss:focus{background:rgba(0,102,204,.08);border-radius:3px;outline:none}.gloss-popover{position:fixed;z-index:1200;max-width:calc(100vw - 24px);padding:.65rem .8rem;background:var(--white);border:1px solid rgba(0,102,204,.2);border-radius:12px;box-shadow:0 12px 30px #0036782e;font-size:.82rem;color:var(--gray-700)}.gloss-popover-head{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem;margin-bottom:.3rem}.gloss-popover-head strong{color:var(--primary-dark);font-size:.9rem}.gloss-popover-src{font-size:.68rem;color:var(--gray-500);white-space:nowrap}.gloss-popover p{margin:0;line-height:1.4}.src-applies{margin:.15rem 0 0 .2rem;font-size:.74rem;color:#1e7b35}.sources.discarded summary{color:var(--gray-500)}.discarded-item{display:flex;flex-direction:column;gap:.1rem;margin-bottom:.35rem;font-size:.8rem}.discarded-doc{color:var(--gray-700)}.discarded-why{color:var(--gray-500);font-size:.75rem}.clarify-card{margin:0 0 .6rem;padding:.65rem .75rem .7rem;background:var(--white);border:1px solid rgba(0,102,204,.18);border-radius:14px;box-shadow:0 8px 24px #0036781a}.clarify-header{display:flex;align-items:flex-start;gap:.5rem;margin-bottom:.55rem}.clarify-icon{flex-shrink:0;width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--white);background:linear-gradient(135deg,var(--primary),var(--secondary))}.clarify-icon svg{width:14px;height:14px}.clarify-question{flex:1;font-size:.88rem;font-weight:600;color:var(--gray-800);line-height:1.35;padding-top:2px}.clarify-close{background:none;border:none;padding:3px;border-radius:8px;cursor:pointer;color:var(--gray-500);display:flex}.clarify-close svg{width:14px;height:14px}.clarify-close:hover{color:var(--gray-800);background:rgba(0,0,0,.05)}.clarify-options{display:flex;flex-wrap:wrap;gap:.4rem}.clarify-option{position:relative;padding:.45rem .8rem;border:1px solid var(--gray-200);border-radius:999px;background:var(--light-gray);color:var(--gray-800);font-size:.84rem;cursor:pointer;transition:background .15s ease,border-color .15s ease,transform .1s ease}.clarify-option:hover{background:rgba(0,102,204,.08);border-color:#0066cc59}.clarify-option:active{transform:scale(.98)}.clarify-option.probable{border-color:var(--primary);background:rgba(0,102,204,.07);color:var(--primary-dark);font-weight:600;padding-top:.7rem}.clarify-badge{position:absolute;top:-.55rem;left:.7rem;padding:.05rem .45rem;border-radius:999px;background:var(--primary);color:var(--white);font-size:.62rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase}.clarify-option.write{background:none;border-style:dashed;color:var(--gray-600)}.clarify-reason{margin:.55rem 0 0;font-size:.76rem;color:var(--gray-600)}.clarify-reason strong{color:var(--primary-dark);font-weight:600}.clarify-enter-active{transition:opacity .25s ease,transform .25s ease}.clarify-leave-active{transition:opacity .15s ease}.clarify-enter-from{opacity:0;transform:translateY(8px)}.clarify-leave-to{opacity:0}.clarify-stat-option{display:inline-block;margin:0 .3rem .3rem 0;padding:.1rem .5rem;border:1px solid var(--gray-200);border-radius:999px;font-size:.78rem}.clarify-stat-option.probable{border-color:var(--primary);color:var(--primary-dark)}.clarify-stat-option.chosen{background:rgba(40,167,69,.12);border-color:var(--success);font-weight:600}.disambig-modal{width:min(560px,calc(100vw - 2rem));background:var(--white);border-radius:16px;box-shadow:0 24px 60px #00000040;padding:1rem 1.1rem .9rem}.disambig-header{display:flex;align-items:flex-start;gap:.6rem}.disambig-header strong{font-size:1rem;color:var(--gray-800)}.disambig-header p{margin:.2rem 0 0;font-size:.8rem;color:var(--gray-500)}.disambig-step{margin-left:auto;font-size:.75rem;color:var(--gray-500);white-space:nowrap}.disambig-text{margin:.8rem 0;padding:.55rem .75rem;border-radius:10px;background:var(--light-gray);color:var(--gray-700);font-size:.85rem}.disambig-options{display:flex;flex-direction:column;gap:.45rem}.disambig-option{display:flex;flex-direction:column;gap:.15rem;text-align:left;padding:.6rem .8rem;border:1px solid var(--gray-200);border-radius:12px;background:var(--white);cursor:pointer;transition:border-color .15s ease,background .15s ease}.disambig-option:hover{border-color:var(--primary);background:rgba(0,102,204,.05)}.disambig-option-title{font-weight:600;color:var(--primary-dark);font-size:.88rem}.disambig-option-desc{font-size:.78rem;color:var(--gray-600)}.disambig-footer{display:flex;justify-content:flex-end;gap:.4rem;margin-top:.7rem}.disambig-answer{display:flex;gap:.45rem}.disambig-input{flex:1;padding:.55rem .75rem;border:1px solid var(--gray-300);border-radius:10px;font:inherit;font-size:.88rem}.disambig-input:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px #0066cc1f}.disambig-add{padding:.55rem .9rem;border:none;border-radius:10px;background:var(--primary);color:var(--white);font-weight:600;cursor:pointer}.disambig-add:disabled{opacity:.5;cursor:default}.tag-toast{position:fixed;right:1.4rem;bottom:9rem;z-index:900;width:min(280px,calc(100vw - 2rem));background:rgba(255,255,255,.97);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);border:1px solid rgba(0,102,204,.14);border-radius:14px;box-shadow:0 18px 44px #0036782e,0 2px 6px #0000000f;overflow:hidden;font-size:.78rem}.tag-toast-header{display:flex;align-items:center;gap:.5rem;padding:.5rem .55rem .45rem .6rem;background:linear-gradient(135deg,rgba(0,102,204,.08),rgba(0,163,224,.05));border-bottom:1px solid rgba(0,102,204,.08)}.tag-toast-icon{flex-shrink:0;width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--white);background:linear-gradient(135deg,var(--primary),var(--secondary));box-shadow:0 4px 10px #0066cc4d}.tag-toast-icon svg{width:13px;height:13px}.tag-toast-title{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.25}.tag-toast-title strong{font-size:.8rem;color:var(--gray-800)}.tag-toast-title span{font-size:.68rem;color:var(--gray-500)}.tag-toast-close{align-self:flex-start;background:none;border:none;padding:4px;border-radius:8px;cursor:pointer;color:var(--gray-500);display:flex}.tag-toast-close svg{width:13px;height:13px}.tag-toast-close:hover{color:var(--gray-800);background:rgba(0,0,0,.05)}.tag-toast-list{list-style:none;margin:0;padding:.25rem .5rem .35rem}.tag-toast-row{display:grid;grid-template-columns:16px auto 1fr;align-items:center;gap:.4rem;padding:.22rem .15rem;border-radius:8px;animation:tag-toast-row-in .35s ease both}.tag-toast-row:nth-child(2){animation-delay:.05s}.tag-toast-row:nth-child(3){animation-delay:.1s}.tag-toast-row:nth-child(4){animation-delay:.15s}.tag-toast-row:nth-child(5){animation-delay:.2s}.tag-toast-row:nth-child(6){animation-delay:.25s}.tag-toast-row+.tag-toast-row{border-top:1px dashed var(--gray-100);border-radius:0}.tag-toast-mark{width:16px;height:16px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--row-color);background:var(--row-bg)}.tag-toast-mark svg{width:10px;height:10px}.tag-toast-dot{width:6px;height:6px;border-radius:50%;background:currentColor}.tag-toast-key{font-size:.64rem;text-transform:uppercase;letter-spacing:.03em;color:var(--gray-500);white-space:nowrap}.tag-toast-value{font-weight:600;color:var(--row-text, var(--gray-800));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}.tag-toast-row.is-info{--row-color: var(--primary);--row-bg: rgba(0, 102, 204, .1)}.tag-toast-row.is-ok{--row-color: #1e8e3e;--row-bg: rgba(40, 167, 69, .14);--row-text: #1e7b35}.tag-toast-row.is-sospecha{--row-color: #c27c0e;--row-bg: rgba(245, 166, 35, .16);--row-text: #9a6200}.tag-toast-row.is-alerta{--row-color: #d93025;--row-bg: rgba(217, 48, 37, .12);--row-text: #b3261e}.tag-toast-row.is-descartado,.tag-toast-row.is-quitado{--row-color: var(--gray-500);--row-bg: var(--gray-100);--row-text: var(--gray-500)}.tag-toast-row.is-descartado .tag-toast-value{text-decoration:line-through;font-weight:500}.composer-context-btn.pulse{animation:context-btn-pulse .8s ease-out 3}@keyframes context-btn-pulse{0%{box-shadow:0 0 #0066cc8c;transform:scale(1)}30%{transform:scale(1.15)}to{box-shadow:0 0 0 12px #06c0;transform:scale(1)}}.tag-toast-progress{height:3px;background:linear-gradient(90deg,var(--primary),var(--secondary));transform-origin:left;animation:tag-toast-countdown var(--tag-toast-ms) linear forwards}.tag-toast:hover .tag-toast-progress{animation-play-state:paused}@keyframes tag-toast-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@keyframes tag-toast-row-in{0%{opacity:0;transform:translate(8px)}to{opacity:1;transform:none}}.tag-toast-enter-active{transition:opacity .3s ease,transform .35s cubic-bezier(.2,.9,.3,1.2)}.tag-toast-enter-from{opacity:0;transform:translate(24px) scale(.97)}@media (max-width: 900px){.text-viewer-body{flex-direction:column}.text-viewer-original{border-right:none;border-bottom:1px solid var(--gray-100);max-height:40%}}@media (max-width: 760px){.sidebar{width:210px}.main{padding:1rem 1.1rem 1.2rem}}
