/* Urbe IA v60 — camada consolidada para PWA, voz e ações modernas. */
.chat-composer,[data-chat-form-v2]{position:relative}
.urbe-app-quick-actions{display:grid;gap:8px;margin:10px 0 4px}.urbe-app-action{display:flex;align-items:center;gap:10px;width:100%;border:1px solid #26344d;background:#111c30;color:#dbeafe;border-radius:14px;padding:10px 12px;font:700 12px/1.2 Inter,system-ui,sans-serif;cursor:pointer}.urbe-app-action:hover{background:#17243a;border-color:#3b82f6}.urbe-app-action[hidden]{display:none!important}.urbe-app-action .status-dot{width:8px;height:8px;border-radius:999px;background:#64748b}.urbe-app-action.is-on .status-dot{background:#22c55e;box-shadow:0 0 0 4px #22c55e22}
.composer-mic.is-listening,.composer-mic.is-recording{background:#dc2626!important;color:#fff!important;box-shadow:0 0 0 6px rgba(220,38,38,.15)}.composer-mic.is-processing{opacity:.65;cursor:wait}.voice-status{position:absolute;left:18px;bottom:88px;z-index:140;display:flex;align-items:center;gap:8px;border:1px solid #334155;background:rgba(15,23,42,.96);color:#dbeafe;border-radius:999px;padding:8px 12px;font-size:12px;font-weight:700;box-shadow:0 12px 35px #0007}.voice-status[hidden]{display:none}.voice-pulse{width:8px;height:8px;border-radius:999px;background:#ef4444;animation:urbePulse 1s infinite}@keyframes urbePulse{50%{transform:scale(1.6);opacity:.45}}
.message-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.urbe-speak-btn{border:0;background:transparent;color:#94a3b8;cursor:pointer;border-radius:8px;padding:3px 6px;font-size:12px}.urbe-speak-btn:hover{background:#1e293b;color:#fff}.urbe-speak-btn.is-speaking{color:#60a5fa;background:#172554}
.urbe-toast-stack{position:fixed;right:18px;bottom:18px;z-index:9999;display:grid;gap:10px;width:min(360px,calc(100vw - 36px))}.urbe-toast{border:1px solid #334155;background:#111827;color:#e5e7eb;border-radius:16px;padding:13px 14px;box-shadow:0 20px 60px #0008;animation:urbeToastIn .18s ease-out}.urbe-toast b{display:block;color:#fff;margin-bottom:3px}.urbe-toast small{color:#9ca3af}@keyframes urbeToastIn{from{transform:translateY(8px);opacity:0}}
@media(max-width:900px){.voice-status{left:12px;right:12px;bottom:104px;width:max-content;max-width:calc(100% - 24px)}.urbe-tw-mobile-drawer .urbe-app-quick-actions{grid-template-columns:1fr 1fr}}

/* ============================================================
   Urbe IA v62 — client workspace & chat interaction layer
   Replaces the competing v46/v47/v48/v49 inline chat rules.
   ============================================================ */
:root{--urbe-scroll-thumb:#475569;--urbe-scroll-thumb-hover:#64748b;--urbe-scroll-track:#0b1220}
.urbe-client-body{min-height:100dvh;overflow:hidden;background:#020617}
.urbe-tw-shell{height:100dvh!important;min-height:100dvh!important;max-height:100dvh!important;overflow:hidden!important}
.urbe-tw-content{min-width:0!important;min-height:0!important;overflow:hidden!important}
.urbe-tw-main{min-width:0!important;min-height:0!important;scrollbar-gutter:stable;overscroll-behavior-y:contain}
.urbe-tw-main:not(.urbe-tw-main-chat){overflow-y:auto!important;overflow-x:hidden!important}
.urbe-tw-main-chat{height:auto!important;min-height:0!important;overflow:hidden!important;padding:0!important}
.urbe-tw-sidebar-scroll,.urbe-tw-main:not(.urbe-tw-main-chat),[data-chat-messages],.chat-history-list{scrollbar-width:thin;scrollbar-color:var(--urbe-scroll-thumb) transparent}
.urbe-tw-sidebar-scroll::-webkit-scrollbar,.urbe-tw-main:not(.urbe-tw-main-chat)::-webkit-scrollbar,[data-chat-messages]::-webkit-scrollbar,.chat-history-list::-webkit-scrollbar{width:10px;height:10px}
.urbe-tw-sidebar-scroll::-webkit-scrollbar-track,.urbe-tw-main:not(.urbe-tw-main-chat)::-webkit-scrollbar-track,[data-chat-messages]::-webkit-scrollbar-track,.chat-history-list::-webkit-scrollbar-track{background:transparent}
.urbe-tw-sidebar-scroll::-webkit-scrollbar-thumb,.urbe-tw-main:not(.urbe-tw-main-chat)::-webkit-scrollbar-thumb,[data-chat-messages]::-webkit-scrollbar-thumb,.chat-history-list::-webkit-scrollbar-thumb{background:var(--urbe-scroll-thumb);border:3px solid transparent;background-clip:padding-box;border-radius:999px;min-height:42px}
.urbe-tw-sidebar-scroll::-webkit-scrollbar-thumb:hover,.urbe-tw-main:not(.urbe-tw-main-chat)::-webkit-scrollbar-thumb:hover,[data-chat-messages]::-webkit-scrollbar-thumb:hover,.chat-history-list::-webkit-scrollbar-thumb:hover{background:var(--urbe-scroll-thumb-hover);border:3px solid transparent;background-clip:padding-box}
.urbe-tw-nav-item,.urbe-app-action,.client-page a,.client-page button{transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease}
.urbe-tw-nav-item:active,.urbe-app-action:active{transform:scale(.985)}

/* Chat: one height model, one scrolling surface. */
.urbe-chat-body{overflow:hidden!important}
.urbe-tw-shell [data-chat-product]{height:100%!important;min-height:0!important;max-height:none!important;display:grid!important;grid-template-columns:300px minmax(0,1fr)!important;background:#020617!important;color:#f8fafc!important;overflow:hidden!important;contain:layout paint}
.urbe-tw-shell [data-chat-product] .chat-history-panel{position:relative!important;inset:auto!important;width:auto!important;height:100%!important;min-height:0!important;display:flex!important;flex-direction:column!important;transform:none!important;background:#0b1220!important;color:#f8fafc!important;border-right:1px solid #1e293b!important;overflow:hidden!important;box-shadow:none!important}
.urbe-tw-shell [data-chat-product] .chat-history-list{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;padding-bottom:20px!important}
.urbe-tw-shell [data-chat-product] .chat-thread-panel{position:relative!important;height:100%!important;min-height:0!important;display:flex!important;flex-direction:column!important;background:#020617!important;color:#f8fafc!important;overflow:hidden!important}
.urbe-tw-shell [data-chat-product] .chat-thread-top{position:relative!important;flex:0 0 64px!important;height:64px!important;min-height:64px!important;background:rgba(2,6,23,.92)!important;border-bottom:1px solid #1e293b!important;backdrop-filter:blur(14px);z-index:12}
.urbe-tw-shell [data-chat-product] .share-box{flex:0 0 auto!important;background:#0b1220!important;color:#cbd5e1!important;border-bottom:1px solid #1e293b!important}
.urbe-tw-shell [data-chat-product] .share-box.hidden{display:none!important}
.urbe-tw-shell [data-chat-product] [data-chat-messages]{position:relative!important;flex:1 1 auto!important;height:auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain!important;-webkit-overflow-scrolling:touch!important;scrollbar-gutter:stable!important;scroll-behavior:auto!important;scroll-padding-bottom:28px!important;padding:28px clamp(18px,4.6vw,72px) 28px!important;background:#020617!important;color:#f8fafc!important}
.urbe-tw-shell [data-chat-product] [data-chat-messages]::after{content:none!important}
.urbe-tw-shell [data-chat-product] .chat-welcome{margin:clamp(54px,13vh,130px) auto 0!important;max-width:680px!important;color:#e2e8f0!important}
.urbe-tw-shell [data-chat-product] .chat-welcome h1{font-size:clamp(34px,4vw,50px)!important;letter-spacing:-.045em!important;color:#fff!important}
.urbe-tw-shell [data-chat-product] .chat-welcome p{color:#94a3b8!important;font-size:15px!important;line-height:1.7!important}
.urbe-tw-shell [data-chat-product] .message-row{width:min(900px,100%)!important;max-width:900px!important;margin:20px auto!important;gap:12px!important;align-items:flex-start!important}
.urbe-tw-shell [data-chat-product] .message-bubble{max-width:min(760px,calc(100% - 54px))!important;min-width:0!important;color:#e5e7eb!important;font-size:15px!important;line-height:1.68!important}
.urbe-tw-shell [data-chat-product] .message-row.user .message-bubble{background:#172033!important;color:#f8fafc!important;border:1px solid #26344b!important;border-radius:20px 20px 6px 20px!important;padding:12px 16px!important}
.urbe-tw-shell [data-chat-product] .message-row.assistant .message-bubble{background:transparent!important;padding:2px 0!important}
.urbe-tw-shell [data-chat-product] .message-meta{font-size:12px!important;color:#94a3b8!important;margin-bottom:7px!important}
.urbe-tw-shell [data-chat-product] .message-meta small{color:#64748b!important}
.urbe-tw-shell [data-chat-product] .message-content p{margin:.25em 0 .9em!important}
.urbe-tw-shell [data-chat-product] .message-content pre{max-width:100%!important;overflow:auto!important}

/* Composer lives in the flex flow; it never overlaps the scroll container. */
.urbe-tw-shell [data-chat-product] [data-chat-form-v2]{position:relative!important;inset:auto!important;flex:0 0 auto!important;width:100%!important;max-height:none!important;overflow:visible!important;z-index:20!important;background:linear-gradient(180deg,rgba(2,6,23,.12),#0b1220 16%,#0b1220 100%)!important;border-top:1px solid #1e293b!important;padding:12px 18px calc(14px + env(safe-area-inset-bottom,0px))!important;box-shadow:0 -16px 42px rgba(0,0,0,.18)!important}
.urbe-tw-shell [data-chat-product] [data-chat-form-v2] .composer-shell{display:flex!important;flex-direction:column!important;gap:9px!important;width:min(900px,100%)!important;margin:0 auto!important;background:#111827!important;border:1px solid #334155!important;border-radius:22px!important;padding:12px 13px!important;box-shadow:0 16px 44px rgba(0,0,0,.26)!important;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease!important}
.urbe-tw-shell [data-chat-product] [data-chat-form-v2] .composer-shell:focus-within{background:#131d2d!important;border-color:#4f6b95!important;box-shadow:0 18px 54px rgba(0,0,0,.3),0 0 0 3px rgba(59,130,246,.08)!important}
.urbe-tw-shell [data-chat-product] [data-chat-form-v2] textarea{display:block!important;width:100%!important;height:auto;min-height:48px!important;max-height:168px!important;overflow-y:hidden;background:transparent!important;border:0!important;box-shadow:none!important;color:#f8fafc!important;-webkit-text-fill-color:#f8fafc!important;font-size:16px!important;line-height:1.5!important;margin:0!important;padding:5px 4px 3px!important;resize:none!important;outline:0!important}
.urbe-tw-shell [data-chat-product] [data-chat-form-v2] textarea::placeholder{color:#7c8ba1!important;-webkit-text-fill-color:#7c8ba1!important;opacity:1!important}
.urbe-tw-shell [data-chat-product] [data-chat-form-v2] .prompt-actions{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:nowrap!important;justify-content:flex-start!important;margin:0!important;min-width:0!important}
.urbe-tw-shell [data-chat-product] .composer-model-orb,.urbe-tw-shell [data-chat-product] .composer-tool-btn,.urbe-tw-shell [data-chat-product] .composer-send-btn{width:42px!important;height:42px!important;min-width:42px!important;flex:0 0 42px!important;border-radius:13px!important;border:1px solid #334155!important;background:#1c2638!important;color:#e2e8f0!important;transition:transform .14s ease,background .14s ease,border-color .14s ease!important}
.urbe-tw-shell [data-chat-product] .composer-model-orb:hover,.urbe-tw-shell [data-chat-product] .composer-tool-btn:hover{background:#26344b!important;border-color:#475569!important;transform:translateY(-1px)}
.urbe-tw-shell [data-chat-product] .composer-add-btn{height:42px!important;min-width:126px!important;flex:0 1 auto!important;padding:0 14px!important;border-radius:13px!important;border:1px solid #334155!important;background:#1c2638!important;color:#e2e8f0!important;font-size:13px!important;gap:7px!important;white-space:nowrap!important}
.urbe-tw-shell [data-chat-product] .composer-add-btn span{font-size:23px!important}
.urbe-tw-shell [data-chat-product] .composer-send-btn{margin-left:auto!important;background:#2563eb!important;border-color:#3b82f6!important;color:#fff!important;box-shadow:0 7px 22px rgba(37,99,235,.24)!important}
.urbe-tw-shell [data-chat-product] .composer-send-btn:hover{background:#1d4ed8!important;transform:translateY(-1px)}
.urbe-tw-shell [data-chat-product] .composer-send-btn.is-sending{cursor:wait!important;opacity:.75!important;animation:urbeSendPulse 1s ease-in-out infinite}
@keyframes urbeSendPulse{50%{transform:scale(.94);opacity:.55}}
.urbe-tw-shell [data-chat-product] .chat-attachment-box{max-width:100%!important;margin:0!important;padding:8px 10px!important;background:#0b1220!important;border:1px dashed #334155!important;border-radius:12px!important;color:#cbd5e1!important}
.urbe-tw-shell [data-chat-product] .chat-attachment-box.hidden{display:none!important}
.urbe-tw-shell [data-chat-product] .chat-attachment-box input[type=file]{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}

/* Loading is informative, not a full-screen visual blocker. */
.urbe-tw-shell [data-chat-product] .chat-loading-overlay{position:absolute!important;inset:76px 18px auto auto!important;z-index:34!important;width:auto!important;height:auto!important;display:block!important;background:transparent!important;backdrop-filter:none!important;pointer-events:none!important}
.urbe-tw-shell [data-chat-product] .chat-loading-overlay.hidden{display:none!important}
.urbe-tw-shell [data-chat-product] .chat-loading-card{display:flex!important;align-items:center!important;justify-items:initial!important;gap:9px!important;background:rgba(15,23,42,.94)!important;border:1px solid #334155!important;border-radius:999px!important;padding:9px 13px!important;color:#e2e8f0!important;box-shadow:0 14px 42px rgba(0,0,0,.32)!important;backdrop-filter:blur(12px)!important}
.urbe-tw-shell [data-chat-product] .chat-loading-card b{font-size:12px!important;white-space:nowrap!important}
.urbe-tw-shell [data-chat-product] .chat-loading-card small{display:none!important}
.urbe-tw-shell [data-chat-product] .chat-loading-spinner{width:15px!important;height:15px!important;border-width:2px!important;border-color:#334155!important;border-top-color:#60a5fa!important}

.chat-jump-latest{position:absolute;right:22px;bottom:112px;z-index:31;display:inline-flex;align-items:center;gap:7px;border:1px solid #334155;background:rgba(15,23,42,.94);color:#e2e8f0;border-radius:999px;padding:9px 12px;font:800 12px/1 Inter,system-ui,sans-serif;box-shadow:0 14px 40px rgba(0,0,0,.34);cursor:pointer;backdrop-filter:blur(10px);transition:opacity .15s ease,transform .15s ease,background .15s ease}
.chat-jump-latest:hover{background:#1e293b;transform:translateY(-1px)}
.chat-jump-latest.hidden{display:none!important}
.chat-jump-latest span{font-size:16px;line-height:1}

/* Side history gets consistent touch/mouse behavior. */
.urbe-tw-shell [data-chat-product] .history-row{position:relative!important}
.urbe-tw-shell [data-chat-product] .history-item{color:#cbd5e1!important}
.urbe-tw-shell [data-chat-product] .history-row.active .history-item,.urbe-tw-shell [data-chat-product] .history-item:hover{background:#172033!important;color:#fff!important}
.urbe-tw-shell [data-chat-product] .chat-history-search input{background:#111827!important;color:#f8fafc!important;border-color:#26344b!important}

@media(max-width:1024px){
  .urbe-tw-shell [data-chat-product]{grid-template-columns:270px minmax(0,1fr)!important}
}
@media(max-width:900px){
  .urbe-client-body{overflow:hidden!important}
  .urbe-tw-shell [data-chat-product]{display:block!important;height:100%!important;min-height:0!important}
  .urbe-tw-shell [data-chat-product] .chat-history-panel{position:fixed!important;left:0!important;top:64px!important;bottom:0!important;width:min(88vw,340px)!important;height:auto!important;z-index:90!important;transform:translateX(-103%)!important;transition:transform .2s cubic-bezier(.2,.8,.2,1)!important;box-shadow:26px 0 70px rgba(0,0,0,.45)!important}
  body.chat-history-open .urbe-tw-shell [data-chat-product] .chat-history-panel{transform:translateX(0)!important}
  .urbe-tw-shell [data-chat-product] .chat-thread-panel{height:100%!important;min-height:0!important}
  .urbe-tw-shell [data-chat-product] .chat-thread-top{flex-basis:58px!important;height:58px!important;min-height:58px!important;padding-left:58px!important}
  .urbe-tw-shell [data-chat-product] .chat-history-open{display:grid!important;place-items:center!important;position:absolute!important;left:10px!important;top:50%!important;transform:translateY(-50%)!important;width:38px!important;height:38px!important;border-radius:12px!important;background:#111827!important;color:#fff!important;border:1px solid #334155!important}
  .urbe-tw-shell [data-chat-product] [data-chat-messages]{padding:18px 14px 20px!important;scrollbar-gutter:auto!important}
  .urbe-tw-shell [data-chat-product] [data-chat-form-v2]{padding:10px 10px calc(10px + env(safe-area-inset-bottom,0px))!important}
  .urbe-tw-shell [data-chat-product] [data-chat-form-v2] .composer-shell{border-radius:18px!important;padding:10px!important}
  .urbe-tw-shell [data-chat-product] [data-chat-form-v2] .prompt-actions{gap:6px!important}
  .urbe-tw-shell [data-chat-product] .composer-add-btn{min-width:44px!important;width:44px!important;padding:0!important;justify-content:center!important}
  .urbe-tw-shell [data-chat-product] .composer-add-btn b{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
  .chat-jump-latest{right:14px;bottom:102px;padding:8px 10px}
  .urbe-tw-shell [data-chat-product] .chat-loading-overlay{top:68px!important;right:10px!important}
}
@media(max-width:640px){
  .urbe-tw-shell [data-chat-product] .chat-current-model b{max-width:48vw!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .urbe-tw-shell [data-chat-product] .chat-current-model small{display:none!important}
  .urbe-tw-shell [data-chat-product] .message-avatar{width:30px!important;height:30px!important;flex-basis:30px!important;font-size:12px!important}
  .urbe-tw-shell [data-chat-product] .message-bubble{max-width:calc(100% - 40px)!important;font-size:14.5px!important}
  .urbe-tw-shell [data-chat-product] [data-chat-form-v2] textarea{font-size:16px!important;max-height:120px!important}
  .urbe-tw-shell [data-chat-product] .composer-model-orb,.urbe-tw-shell [data-chat-product] .composer-tool-btn,.urbe-tw-shell [data-chat-product] .composer-send-btn,.urbe-tw-shell [data-chat-product] .composer-add-btn{width:40px!important;height:40px!important;min-width:40px!important;flex-basis:40px!important;border-radius:12px!important}
  .urbe-tw-shell [data-chat-product] .composer-toolbar>.composer-tool-btn:not(.composer-mic){display:none!important}
  .chat-jump-latest b{display:none}
  .chat-jump-latest{bottom:96px;width:38px;height:38px;padding:0;justify-content:center}
}

