/* ContaClara · floating financial assistant */
.cc-chat{position:fixed;right:20px;bottom:20px;z-index:70;font-size:14px;color:var(--ink)}
.cc-chat svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.cc-chat-launcher{display:flex;align-items:center;gap:8px;min-height:46px;padding:0 18px 0 15px;border:0;border-radius:999px;background:var(--green);color:#fff;font:inherit;font-weight:600;font-size:13px;box-shadow:0 10px 28px #123a2133;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}
html[data-theme="dark"] .cc-chat-launcher{color:#10241b}
.cc-chat-launcher:hover{transform:translateY(-1px);box-shadow:0 14px 32px #123a2140}
.cc-chat-launcher:focus-visible,.cc-chat button:focus-visible,.cc-chat textarea:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.cc-chat.open .cc-chat-launcher{display:none}
.cc-chat-panel{display:flex;flex-direction:column;width:min(400px,calc(100vw - 32px));height:min(600px,calc(100dvh - 40px));background:var(--surface,#fff);border:1px solid var(--line);border-radius:14px;box-shadow:0 24px 60px #0f2a1f2e;overflow:hidden;animation:cc-chat-in .18s ease-out}
.cc-chat-panel[hidden]{display:none}
@keyframes cc-chat-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.cc-chat-head{display:flex;align-items:center;gap:10px;padding:14px 12px 14px 16px;border-bottom:1px solid var(--line)}
.cc-chat-head>div{flex:1;min-width:0}
.cc-chat-head b{display:block;font-size:14px;font-weight:650}
.cc-chat-head small{display:block;font-size:11px;color:var(--muted)}
.cc-chat-badge{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:var(--green);color:#fff}
html[data-theme="dark"] .cc-chat-badge{color:#10241b}
.cc-chat-reset,.cc-chat-close{display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:6px;background:transparent;color:var(--muted);cursor:pointer}
.cc-chat-reset:hover,.cc-chat-close:hover{background:var(--cream);color:var(--ink)}
.cc-chat-log{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:var(--cream)}
.cc-chat-empty p{margin:0 0 12px;color:var(--muted);line-height:1.6;font-size:13px}
.cc-chat-suggestions{display:flex;flex-direction:column;gap:6px}
.cc-chat-suggestions button{text-align:left;padding:9px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface,#fff);color:var(--ink);font:inherit;font-size:13px;cursor:pointer}
.cc-chat-suggestions button:hover{border-color:var(--green);color:var(--green)}
.cc-chat-msg{max-width:88%;padding:9px 12px;border-radius:12px;line-height:1.55;overflow-wrap:anywhere}
.cc-chat-user{align-self:flex-end;background:var(--green);color:#fff;border-bottom-right-radius:4px;white-space:pre-wrap}
html[data-theme="dark"] .cc-chat-user{color:#10241b}
.cc-chat-assistant{align-self:flex-start;background:var(--surface,#fff);border:1px solid var(--line);border-bottom-left-radius:4px}
.cc-chat-assistant p{margin:0 0 8px}.cc-chat-assistant p:last-child{margin-bottom:0}
.cc-chat-assistant ul,.cc-chat-assistant ol{margin:0 0 8px;padding-left:20px}
.cc-chat-assistant li{margin:2px 0}
.cc-chat-assistant code{font-size:12px;padding:1px 4px;border-radius:4px;background:var(--cream)}
.cc-chat-error{margin:6px 0 0!important;color:#ba4c35;font-size:12px}
.cc-chat-typing{display:inline-flex;gap:4px;padding:4px 0}
.cc-chat-typing i{width:6px;height:6px;border-radius:50%;background:var(--muted);animation:cc-chat-dot 1s infinite ease-in-out}
.cc-chat-typing i:nth-child(2){animation-delay:.15s}.cc-chat-typing i:nth-child(3){animation-delay:.3s}
@keyframes cc-chat-dot{0%,80%,100%{opacity:.3;transform:none}40%{opacity:1;transform:translateY(-3px)}}
.cc-chat-form{display:flex;align-items:flex-end;gap:8px;padding:10px 12px;border-top:1px solid var(--line);background:var(--surface,#fff)}
.cc-chat-form textarea{flex:1;resize:none;min-height:40px;max-height:140px;padding:9px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface,#fff);color:var(--ink);font:inherit;font-size:14px;line-height:1.45}
.cc-chat-send{display:grid;place-items:center;width:40px;height:40px;border:0;border-radius:8px;background:var(--green);color:#fff;cursor:pointer}
html[data-theme="dark"] .cc-chat-send{color:#10241b}
.cc-chat-send:disabled{opacity:.5;cursor:default}
.cc-chat-note{margin:0;padding:0 12px 10px;background:var(--surface,#fff);color:var(--muted);font-size:10.5px}
@media(max-width:700px){
 .cc-chat{right:12px;bottom:112px}
 .cc-chat-launcher span{display:none}
 .cc-chat-launcher{width:50px;height:50px;padding:0;justify-content:center}
 .cc-chat.open{left:8px;right:8px;bottom:8px}
 .cc-chat-panel{width:100%;height:calc(100dvh - 16px)}
}
@media(prefers-reduced-motion:reduce){.cc-chat-panel,.cc-chat-typing i{animation:none}.cc-chat-launcher{transition:none}}
@media print{.cc-chat{display:none}}
