/* PZIA — chat flotante del dashboard (Frío Andino) */
:root { --pzia-navy: #001F3F; --pzia-orange: #E05414; }

.pzia-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 900;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 7px; border: 0; border-radius: 999px;
  background: #fff; box-shadow: 0 10px 26px rgba(0,31,63,.2);
  cursor: pointer; font-family: inherit; font-weight: 700; color: var(--pzia-navy);
}
.pzia-fab img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--pzia-orange); background: #fff; }

.pzia-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 901;
  width: 400px; max-width: calc(100vw - 24px); height: min(620px, 80vh);
  display: none; flex-direction: column;
  background: #fff; border: 1px solid #E3E8EA; border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,31,63,.28); overflow: hidden;
}
.pzia-panel.open { display: flex; }
.pzia-resize { position: absolute; left: 0; top: 0; bottom: 0; width: 12px; cursor: ew-resize; z-index: 5; touch-action: none; }
.pzia-resize::after { content: ""; position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 3px; height: 44px; border-radius: 2px; background: rgba(0,0,0,.14); }

.pzia-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--pzia-navy); color: #fff; }
.pzia-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--pzia-orange); background: #fff; }
.pzia-head div { flex: 1; display: flex; flex-direction: column; line-height: 1.15; }
.pzia-head strong { font-size: 1rem; }
.pzia-head span { font-size: .76rem; opacity: .85; }
.pzia-head button { background: transparent; border: 0; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }

.pzia-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #F6F8F9; }
.pzia-msg { display: flex; }
.pzia-msg.user { justify-content: flex-end; }
.pzia-bubble { max-width: 86%; padding: 10px 12px; border-radius: 14px; font-size: .9rem; line-height: 1.5; overflow-wrap: break-word; word-break: break-word; }
.pzia-msg.assistant .pzia-bubble { background: #fff; border: 1px solid #E3E8EA; border-top-left-radius: 4px; }
.pzia-msg.user .pzia-bubble { background: var(--pzia-navy); color: #fff; border-top-right-radius: 4px; }
.pzia-bubble p { margin: 0 0 6px; } .pzia-bubble p:last-child { margin: 0; }
.pzia-bubble ul, .pzia-bubble ol { margin: 0 0 8px; padding-left: 1.2em; }
.pzia-bubble table { border-collapse: collapse; width: 100%; font-size: .86em; display: block; overflow-x: auto; margin: 0 0 8px; }
.pzia-bubble th, .pzia-bubble td { border: 1px solid #E3E8EA; padding: 6px 8px; text-align: left; }
.pzia-bubble th { background: #EEF3F8; }
.pzia-bubble code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 5px; font-size: .85em; }
.pzia-bubble pre { background: #0f1b2a; color: #e6edf3; padding: 10px; border-radius: 10px; overflow-x: auto; }

.pzia-dots { display: inline-flex; gap: 4px; }
.pzia-dots i { width: 7px; height: 7px; border-radius: 50%; background: #a7b4c0; animation: pziaBlink 1.2s infinite; }
.pzia-dots i:nth-child(2) { animation-delay: .2s; } .pzia-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes pziaBlink { 0%,60%,100% { opacity:.3; } 30% { opacity:1; } }

.pzia-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; background: #F6F8F9; }
.pzia-chips button { border: 1px solid #3FA9E0; color: var(--pzia-navy); background: #fff; border-radius: 999px; padding: 6px 11px; font-size: .8rem; font-family: inherit; cursor: pointer; }

.pzia-foot { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid #E3E8EA; background: #fff; }
.pzia-foot textarea { flex: 1; resize: none; border: 1px solid #E3E8EA; border-radius: 12px; padding: 10px 12px; font-family: inherit; font-size: .93rem; line-height: 1.4; max-height: 120px; outline: none; }
.pzia-foot textarea:focus { border-color: #3FA9E0; }
.pzia-send { flex: 0 0 auto; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--pzia-orange); color: #fff; font-size: 1rem; cursor: pointer; }
.pzia-send:disabled { opacity: .5; }
.pzia-note { margin: 0; padding: 7px 14px; font-size: .72rem; color: #5A6B73; background: #F6F8F9; text-align: center; }

@media (max-width: 620px) {
  .pzia-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .pzia-fab { right: 12px; bottom: 12px; }
}
