/* Asistente del panel (Manuel 03/12/2026): a button always at hand and a calm question screen, in Goberna's black, yellow and white. */

/* Floating button: the black of the «Hoy» bar, the brand yellow on the icon and its edge. */
.agent-fab{position:fixed;right:24px;bottom:24px;z-index:50;display:inline-flex;align-items:center;gap:12px;min-height:56px;padding:0 22px 0 16px;border-radius:999px;background:#0b0b0c;color:#fff;font-size:17px;font-weight:700;letter-spacing:-.01em;text-decoration:none;box-shadow:inset 0 0 0 1.5px rgba(255,214,10,.6),0 10px 28px rgba(0,0,0,.22),0 2px 6px rgba(0,0,0,.14)}
.agent-fab svg{flex:none;width:26px;height:26px;color:#ffd60a}
.agent-fab:hover{background:#1e1e1e;box-shadow:inset 0 0 0 1.5px #ffd60a,0 12px 32px rgba(0,0,0,.26),0 2px 6px rgba(0,0,0,.14)}
.agent-fab:active{transform:scale(.98)}
.agent-fab:focus-visible{outline:3px solid #ffd60a;outline-offset:3px}
@media(prefers-reduced-motion:no-preference){.agent-fab{transition:background .14s,box-shadow .14s,transform .14s}}
.company-workspace>main{padding-bottom:104px}
/* Up to 850px the phone tab bar (.app-tabs, about 67px) sits at the bottom: the button goes above it. */
@media(max-width:850px){.agent-fab{bottom:calc(84px + env(safe-area-inset-bottom));right:16px}.company-workspace>main{padding-bottom:176px}}
@media(max-width:560px){.agent-fab{font-size:16px;min-height:52px;padding:0 18px 0 14px}}
@media print{.agent-fab{display:none}}

/* Question screen. */
.company-workspace main .agent-intro{max-width:62ch;font-size:18px;line-height:1.55;margin:0 0 24px}
.company-workspace main .agent-ask{max-width:860px;margin:0 0 40px}
.company-workspace main .agent-form{display:grid;gap:14px;background:#1e1e1e;color:#f5f5f7;border-radius:22px;padding:24px 24px 20px}
.company-workspace main .agent-form label{color:#fff;font-size:21px;font-weight:700;letter-spacing:-.01em;margin:0}
.company-workspace main .agent-form textarea{display:block;width:100%;min-height:7.5rem;margin:0;padding:16px 18px;border:0;border-radius:14px;background:#fff;color:#1d1d1f;font-size:18px;line-height:1.5;resize:vertical}
.company-workspace main .agent-form textarea::placeholder{color:#6e6e73}
.company-workspace main .agent-form textarea:focus-visible{outline:3px solid #ffd60a;outline-offset:2px}
.company-workspace main .agent-row{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.company-workspace main .agent-row p{margin:0;flex:1 1 260px;color:rgba(245,245,247,.78);font-size:16px;line-height:1.45}
.company-workspace main .agent-row button{min-width:170px;font-size:18px}
.company-workspace main .agent-error{margin:0;padding:12px 16px;border-radius:12px;background:#fff4c2;color:#1d1d1f;font-size:16px}
.company-workspace main .agent-examples{margin:20px 0 0}
.company-workspace main .agent-examples>p{margin:0 0 10px;font-size:16px;font-weight:700;color:#1d1d1f}
.company-workspace main .agent-examples>div{display:flex;flex-wrap:wrap;gap:10px}
.company-workspace main .agent-examples button{font-size:16px;font-weight:600;text-align:left}
.company-workspace main .agent-examples button:hover{border-color:#ffd60a;background:#fffbe6}
.company-workspace main .agent-ask[aria-busy=true] button:disabled{opacity:1;cursor:progress}

/* Answer: a white sheet for reading, measured to a comfortable line. */
.company-workspace main .agent-answer{max-width:860px;margin:0 0 32px;padding:28px 32px;background:#fff;border:1px solid #d2d2d7;border-radius:22px;box-shadow:0 8px 24px rgba(0,0,0,.06),0 1px 3px rgba(0,0,0,.05)}
.company-workspace main .agent-answer h2{margin:0 0 4px;font-size:22px;letter-spacing:-.01em}
.company-workspace main .agent-echo{margin:0 0 18px;color:#6e6e73;font-size:16px}
.company-workspace main .agent-text{max-width:70ch;font-size:18px;line-height:1.65;color:#1d1d1f}
.company-workspace main .agent-text strong{font-weight:700}
.company-workspace main .agent-note{margin:22px 0 0;padding-top:16px;border-top:1px solid #e5e5ea;color:#6e6e73;font-size:16px;line-height:1.5}

/* Administrador only: kept out of the way at the bottom. */
.company-workspace main .agent-admin{max-width:860px}
.company-workspace main .agent-admin p{max-width:70ch}
@media(max-width:560px){.company-workspace main .agent-form{padding:18px 16px 16px;border-radius:18px}.company-workspace main .agent-answer{padding:20px 18px}.company-workspace main .agent-row button{width:100%}}

/* Chat window over the current screen: nothing underneath moves or reloads (Manuel 03/12/2026). Its top stays below the panel header (about 100px) so «Seguridad» and «Salir» remain visible. */
.agent-chat{position:fixed;right:24px;bottom:96px;z-index:60;display:flex;flex-direction:column;width:min(420px,calc(100vw - 48px));height:min(640px,calc(100vh - 224px));background:#f5f5f7;color:#1d1d1f;border-radius:22px;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.28),0 4px 14px rgba(0,0,0,.14);font-size:17px}
.agent-chat[hidden]{display:none}
.agent-chat>header{display:flex;flex-wrap:nowrap;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 18px 16px 22px;background:#0b0b0c;color:#fff;box-shadow:inset 0 -1px 0 rgba(255,214,10,.45)}
.agent-chat>header>div{flex:1;min-width:0}
.agent-chat h2{margin:0;font-size:19px;letter-spacing:-.01em;color:#fff}
.agent-chat header p{margin:4px 0 0;font-size:15px;color:rgba(245,245,247,.75)}
.agent-chat .agent-chat-close{flex:none;display:grid;place-items:center;width:44px;height:44px;margin:-6px -6px 0 0;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.08);color:#fff;cursor:pointer}
.agent-chat .agent-chat-close svg{width:22px;height:22px}
.agent-chat .agent-chat-close:hover{background:rgba(255,255,255,.16)}
.agent-chat :focus-visible{outline:3px solid #ffd60a;outline-offset:2px}
.agent-chat-log{flex:1;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:12px;padding:18px 16px}
.agent-msg{max-width:88%;padding:12px 16px;border-radius:18px;line-height:1.55;overflow-wrap:anywhere}
.agent-msg p{margin:0}
.agent-msg-bot{align-self:flex-start;background:#fff;border:1px solid #e5e5ea;border-bottom-left-radius:6px}
.agent-msg-me{align-self:flex-end;background:#ffd60a;color:#000;border-bottom-right-radius:6px;white-space:pre-wrap}
.agent-msg small{display:block;margin-top:10px;padding-top:8px;border-top:1px solid #e5e5ea;font-size:14px;color:#6e6e73}
.agent-msg-wait{color:#6e6e73;font-style:italic}
.agent-msg-error{background:#fff4c2;border-color:#f0d36b}
.agent-chips{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin-top:12px}
.agent-chips button{min-height:44px;padding:8px 16px;border:1.5px solid #1d1d1f;border-radius:999px;background:#fff;color:#000;font:inherit;font-size:16px;font-weight:600;text-align:left;cursor:pointer}
.agent-chips button:hover{border-color:#ffd60a;background:#fffbe6}
.agent-chat-form{padding:12px 14px 14px;background:#fff;border-top:1px solid #e5e5ea}
.agent-chat-form label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.agent-chat-form>div{display:flex;align-items:flex-end;gap:10px}
.agent-chat-form textarea{flex:1;min-height:52px;max-height:140px;margin:0;padding:12px 14px;border:1.5px solid #d2d2d7;border-radius:14px;background:#fff;color:#1d1d1f;font:inherit;font-size:17px;line-height:1.4;resize:none}
.agent-chat-form textarea:focus-visible{border-color:#1d1d1f;outline:3px solid #ffd60a;outline-offset:1px}
.agent-chat-form button{flex:none;min-height:52px;padding:0 20px;border:0;border-radius:999px;background:linear-gradient(180deg,#ffe45c,#ffd60a 55%,#f0c400);color:#000;font:inherit;font-weight:700;cursor:pointer}
.agent-chat-form button:disabled{opacity:.6;cursor:progress}
.agent-chat-form p{margin:8px 2px 0;font-size:14px;color:#6e6e73}
@media(prefers-reduced-motion:no-preference){.agent-chat:not([hidden]){animation:agent-chat-in .2s cubic-bezier(.16,1,.3,1)}@keyframes agent-chat-in{from{opacity:0;transform:translateY(12px) scale(.98)}}}
@media(max-width:850px){.agent-chat{left:10px;right:10px;width:auto;top:10px;bottom:calc(80px + env(safe-area-inset-bottom));height:auto}body.agent-open .agent-fab{display:none}}
@media print{.agent-chat{display:none}}
