@import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap);
/* ═══════════════════════════════════════════════════════════════
   Wid AI — Professional Office Agent Design System (High Contrast Dark)
   Compact Top-Left 3D Orb Avatar · Floating (+) Quick Action Menu
   ═══════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ─── Global Reset & Guaranteed Dark Canvas ─────────────────── */
html {
  background-color: #0d1117 !important;
  color: #e6edf3 !important;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  background-color: #0d1117 !important;
  background: #0d1117 !important;
  color: #e6edf3 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 12.5px;
  line-height: 1.5;
  height: 100%;
  width: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  overflow: hidden;
  background-color: #0d1117 !important;
  position: relative;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #30363d;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #484f58;
}

/* ═════════════════════════════════════════════════════════════
   HEADER: Compact Orb in Top-Left Corner + Title + Status
   ═════════════════════════════════════════════════════════════ */
.agent-header {
  height: 48px;
  min-height: 48px;
  background-color: #161b22 !important;
  border-bottom: 1px solid #30363d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  flex-shrink: 0;
  z-index: 10;
}

.agent-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Top-Left Animated Mascot Avatar */
.header-orb-container {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.header-orb-container:hover {
  transform: scale(1.08);
}

.header-orb-container:active {
  transform: scale(0.96);
}

.orb-luminous-glow {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 134, 246, 0.45) 0%, transparent 70%);
  filter: blur(6px);
  pointer-events: none;
  animation: glowBreathe 3s ease-in-out infinite alternate;
  transition: background 0.4s ease;
}

body[data-host="word"] .orb-luminous-glow {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, transparent 70%);
}

body[data-host="powerpoint"] .orb-luminous-glow {
  background: radial-gradient(circle, rgba(234, 88, 12, 0.45) 0%, transparent 70%);
}

@keyframes glowBreathe {
  0% { transform: scale(0.85); opacity: 0.5; }
  100% { transform: scale(1.2); opacity: 1; }
}

.wid-avatar-svg {
  width: 34px;
  height: 34px;
  position: relative;
  z-index: 2;
  overflow: visible;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
  transition: filter 0.3s ease;
}

/* Mascot SVG Animation Elements */
.wid-body {
  transform-box: view-box;
  transform-origin: 250px 400px;
  animation: widBob 2.4s ease-in-out infinite;
}

.wid-arm-l {
  transform-box: view-box;
  transform-origin: 150px 372px;
  animation: widWaveL 1.4s ease-in-out infinite;
}

.wid-arm-r {
  transform-box: view-box;
  transform-origin: 355px 362px;
  animation: widWaveR 1.4s ease-in-out infinite;
}

.wid-eye-l,
.wid-eye-r {
  transform-box: fill-box;
  transform-origin: center;
  animation: widBlink 3.6s infinite;
}

@keyframes widWaveL {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-26deg); }
}

@keyframes widWaveR {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(26deg); }
}

@keyframes widBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-28px); }
}

@keyframes widBlink {
  0%, 88%, 94%, 100% { transform: scaleY(1); }
  91%, 97% { transform: scaleY(0.08); }
}

/* Avatar States in Top-Left */
.header-orb-container[data-state="thinking"] .wid-avatar-svg {
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.85));
  animation: thinkThrob 0.7s ease-in-out infinite alternate;
}

.header-orb-container[data-state="thinking"] .wid-body {
  animation: widBob 1.2s ease-in-out infinite;
}

.header-orb-container[data-state="thinking"] .wid-arm-l {
  animation: widWaveL 0.8s ease-in-out infinite;
}

.header-orb-container[data-state="thinking"] .wid-arm-r {
  animation: widWaveR 0.8s ease-in-out infinite;
}

.header-orb-container[data-state="thinking"] .orb-luminous-glow {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.6) 0%, transparent 70%);
}

@keyframes thinkThrob {
  0% { transform: scale(0.96); }
  100% { transform: scale(1.06); }
}

.header-orb-container[data-state="listening"] .wid-avatar-svg {
  filter: drop-shadow(0 0 10px rgba(52, 211, 153, 0.85));
}

.header-orb-container[data-state="listening"] .orb-luminous-glow {
  background: radial-gradient(circle, rgba(52, 211, 153, 0.6) 0%, transparent 70%);
}

.header-orb-container[data-state="success"] .wid-avatar-svg {
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.9));
}

.header-orb-container[data-state="success"] .orb-luminous-glow {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.6) 0%, transparent 70%);
}

.header-orb-container[data-state="error"] .wid-avatar-svg {
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.9));
  animation: shakeAvatar 0.35s ease-in-out;
}

.header-orb-container[data-state="error"] .orb-luminous-glow {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.6) 0%, transparent 70%);
}

@keyframes shakeAvatar {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* Title & Micro-Status in Header */
.agent-title-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}

.agent-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.agent-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff !important;
  letter-spacing: -0.2px;
  line-height: 1.1;
}

.agent-host-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  letter-spacing: 0.3px;
  line-height: 1.1;
}

body[data-host="word"] .agent-host-badge {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.35);
}

body[data-host="powerpoint"] .agent-host-badge {
  background: rgba(234, 88, 12, 0.15);
  color: #fb923c;
  border-color: rgba(234, 88, 12, 0.35);
}

.agent-status-mini {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 5px #10b981;
  flex-shrink: 0;
}

body[data-host="word"] .status-live-dot {
  background: #818cf8;
  box-shadow: 0 0 5px #818cf8;
}

body[data-host="powerpoint"] .status-live-dot {
  background: #f97316;
  box-shadow: 0 0 5px #f97316;
}

#orb-status-text {
  font-size: 10px;
  font-weight: 500;
  color: #8b949e !important;
  letter-spacing: 0.1px;
}

.header-orb-container[data-state="thinking"] ~ .agent-title-group #orb-status-text {
  color: #f59e0b !important;
}

.header-orb-container[data-state="listening"] ~ .agent-title-group #orb-status-text {
  color: #34d399 !important;
}

.header-orb-container[data-state="error"] ~ .agent-title-group #orb-status-text {
  color: #ef4444 !important;
}

.header-orb-container[data-state="success"] ~ .agent-title-group #orb-status-text {
  color: #10b981 !important;
}

.agent-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Botão de Destaque: Ponte Word -> PowerPoint */
.btn-header-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.15) 0%, rgba(194, 65, 12, 0.25) 100%);
  border: 1px solid rgba(234, 88, 12, 0.45);
  color: #fb923c;
  padding: 3px 8px;
  border-radius: 14px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-header-action:hover {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.3) 0%, rgba(194, 65, 12, 0.4) 100%);
  border-color: #f97316;
  color: #ffedd5;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
  transform: translateY(-1px);
}

.btn-header-action .btn-action-icon {
  font-size: 11px;
}

.btn-header-action .btn-action-text {
  letter-spacing: 0.2px;
}

.btn-settings-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: #8b949e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-settings-icon:hover {
  background: #21262d;
  border-color: #30363d;
  color: #ffffff;
}

/* ═════════════════════════════════════════════════════════════
   SETTINGS MODAL
   ═════════════════════════════════════════════════════════════ */
.settings-modal {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  width: 100% !important;
  background-color: #161b22 !important;
  border-bottom: 2px solid #30363d;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85);
  z-index: 90;
  display: flex;
  flex-direction: column !important;
  animation: slideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

/* Classe utilitária para esconder o settings — tem prioridade máxima */
.settings-hidden {
  display: none !important;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #161b22;
  border-bottom: 1px solid #21262d;
  flex-shrink: 0;
  width: 100%;
}

.settings-modal-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-modal-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.settings-modal-subtitle {
  font-size: 10.5px;
  color: #8b949e;
  line-height: 1.2;
}

.btn-close-modal {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: #8b949e;
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.btn-close-modal:hover {
  color: #ffffff;
  background: #21262d;
  border-color: #30363d;
}

.settings-modal-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.settings-form-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.label-with-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.settings-form-row label {
  font-size: 11px;
  font-weight: 600;
  color: #8b949e;
  letter-spacing: 0.1px;
}

.label-with-link a {
  font-size: 11px;
  color: #58a6ff;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.label-with-link a:hover {
  color: #79b8ff;
  text-decoration: underline;
}

.input-action-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.settings-form-row input,
.settings-form-row select {
  width: 100%;
  max-width: 100%;
  height: 34px;
  background: #0d1117 !important;
  color: #f0f6fc !important;
  border: 1px solid #30363d !important;
  border-radius: 6px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.settings-form-row select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%2712%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%238b949e%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpolyline points=%276 9 12 15 18 9%27%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  padding-right: 28px !important;
  cursor: pointer;
}

.settings-form-row input:focus,
.settings-form-row select:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25) !important;
}

body[data-host="word"] .settings-form-row input:focus,
body[data-host="word"] .settings-form-row select:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25) !important;
}

body[data-host="powerpoint"] .settings-form-row input:focus,
body[data-host="powerpoint"] .settings-form-row select:focus {
  border-color: #ea580c !important;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.25) !important;
}

.btn-peek {
  height: 34px;
  width: 36px;
  background: #0d1117;
  border: 1px solid #30363d;
  color: #8b949e;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.btn-peek:hover {
  background: #21262d;
  border-color: #484f58;
  color: #ffffff;
}

.settings-toggle-card {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.toggle-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  width: 100%;
}

.toggle-label input {
  display: none;
}

.toggle-switch-slider {
  margin-top: 1px;
  width: 32px;
  height: 18px;
  border-radius: 20px;
  background: #30363d;
  position: relative;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle-switch-slider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  top: 2px;
  left: 2px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-label input:checked + .toggle-switch-slider {
  background: #10b981;
}

body[data-host="word"] .toggle-label input:checked + .toggle-switch-slider {
  background: #6366f1;
}

body[data-host="powerpoint"] .toggle-label input:checked + .toggle-switch-slider {
  background: #ea580c;
}

.toggle-label input:checked + .toggle-switch-slider::before {
  transform: translateX(14px);
}

.toggle-text {
  font-size: 11.5px;
  font-weight: 500;
  color: #c9d1d9;
  line-height: 1.35;
  flex: 1;
}

.autofill-mode-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  margin-top: 2px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  width: 100%;
}

.autofill-mode-tag {
  font-size: 11px;
  color: #8b949e;
  white-space: nowrap;
  font-weight: 500;
}

.autofill-mode-wrapper select {
  flex: 1;
  max-width: 200px;
  height: 28px;
  font-size: 11px;
  padding: 0 8px;
  padding-right: 22px !important;
  background: #161b22 !important;
  border: 1px solid #30363d !important;
  border-radius: 5px;
  color: #f0f6fc !important;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%2710%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%238b949e%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpolyline points=%276 9 12 15 18 9%27%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  cursor: pointer;
}

.settings-button-group {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  width: 100%;
}

.btn-save,
.btn-test {
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-save {
  flex: 1.3;
  background: #10b981;
  color: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.btn-save:hover {
  background: #059669;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}
body[data-host="word"] .btn-save {
  background: #6366f1;
  border-color: rgba(99, 102, 241, 0.4);
}
body[data-host="word"] .btn-save:hover {
  background: #4f46e5;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}
body[data-host="powerpoint"] .btn-save {
  background: #ea580c;
  border-color: rgba(234, 88, 12, 0.4);
}
body[data-host="powerpoint"] .btn-save:hover {
  background: #c2410c;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
}

.btn-test {
  flex: 0.9;
  background: #21262d;
  border: 1px solid #30363d;
  color: #f0f6fc;
}
.btn-test:hover {
  background: #30363d;
  border-color: #484f58;
}

.status-msg-banner {
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 6px;
  display: none;
  line-height: 1.35;
}
.status-msg-banner.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.status-msg-banner.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.api-alert-bar {
  background: rgba(245, 158, 11, 0.12);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  padding: 7px 14px;
  font-size: 11px;
  color: #fde68a;
  flex-shrink: 0;
}

/* ═════════════════════════════════════════════════════════════
   CHAT CONTAINER & MESSAGES FLOW
   ═════════════════════════════════════════════════════════════ */
.chat-main-container {
  flex: 1;
  display: flex !important;
  flex-direction: column;
  overflow: hidden !important;
  background-color: #0d1117 !important;
  min-height: 0;
  min-height: auto;
  position: relative;
  visibility: visible !important;
  opacity: 1 !important;
}

.chat-scroll-area {
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 10px 14px 14px 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  background-color: #0d1117 !important;
  scroll-behavior: smooth !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 100px;
}

/* Chat Message Item */
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 90%;
  flex-shrink: 0 !important; /* Prevents bubbles from collapsing/overlapping */
  animation: msgFadeIn 0.2s ease-out;
}

@keyframes msgFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg.user {
  align-self: flex-end;
}

.chat-msg.assistant {
  align-self: flex-start;
  max-width: 98%;
  width: 100%;
}

/* Bubbles */
.chat-bubble {
  padding: 10px 13px;
  font-size: 12.5px;
  line-height: 1.55;
  word-break: normal;
  overflow-wrap: break-word;
  position: relative;
  z-index: 1;
}

.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  color: #ffffff !important;
  border-radius: 14px 14px 3px 14px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-weight: 500;
}

body[data-host="word"] .chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
  border-color: rgba(129, 140, 248, 0.4);
}

body[data-host="powerpoint"] .chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%) !important;
  border-color: rgba(251, 146, 60, 0.4);
}

.chat-msg.assistant .chat-bubble {
  background-color: #161b22 !important;
  border: 1px solid #30363d !important;
  color: #e6edf3 !important;
  border-radius: 14px 14px 14px 3px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

.chat-bubble p {
  margin-bottom: 6px;
}
.chat-bubble p:last-child {
  margin-bottom: 0;
}

.chat-bubble strong {
  color: #ffffff !important;
  font-weight: 700;
}

.chat-bubble ul {
  margin: 6px 0 6px 18px;
  padding: 0;
}

.chat-bubble li {
  margin-bottom: 4px;
  color: #c9d1d9;
}

.chat-bubble code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  background: #0d1117;
  border: 1px solid #30363d;
  color: #58a6ff;
  padding: 2px 5px;
  border-radius: 4px;
}

/* Chat Meta */
.chat-msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 0 4px;
}

.chat-msg.user .chat-msg-meta {
  justify-content: flex-end;
}

.chat-msg-author {
  font-size: 10px;
  font-weight: 700;
  color: #8b949e;
}

.chat-msg-time {
  font-size: 9.5px;
  color: #6e7681;
}

/* Action Badges */
.chat-action-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  margin-top: 6px;
}

.chat-action-badge.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.chat-action-badge.info {
  background: rgba(88, 166, 255, 0.15);
  color: #58a6ff;
  border: 1px solid rgba(88, 166, 255, 0.35);
}

/* Confirmation Box */
.chat-confirm-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 6px;
}

.chat-confirm-prompt {
  font-size: 11.5px;
  color: #fde68a;
  margin-bottom: 6px;
}

.chat-confirm-btns {
  display: flex;
  gap: 6px;
}

.chat-confirm-btns .btn {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}

.btn-confirm-yes {
  background: #10b981;
  color: #ffffff;
  border: none;
}
.btn-confirm-yes:hover {
  background: #059669;
}

.btn-confirm-no {
  background: #21262d;
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.btn-confirm-no:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* Preview Box */
.chat-preview-box {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 7px 9px;
  margin-top: 6px;
  max-height: 100px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #c9d1d9;
  white-space: pre-wrap;
}

/* ═══════════════════════════════════════════════════════════════
   Card de Download Direto PPTX (Word -> PowerPoint)
   ═══════════════════════════════════════════════════════════════ */
.pptx-download-card {
  margin-top: 10px;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.12) 0%, rgba(30, 27, 75, 0.4) 100%);
  border: 1px solid rgba(234, 88, 12, 0.4);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
}

.pptx-dl-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pptx-dl-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.pptx-dl-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pptx-dl-title {
  font-size: 13px;
  font-weight: 700;
  color: #fed7aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pptx-dl-subtitle {
  font-size: 11px;
  color: #94a3b8;
}

.pptx-dl-actions {
  margin-top: 4px;
}

.btn-pptx-download {
  width: 100%;
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
}

.btn-pptx-download:hover:not(:disabled) {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.5);
}

.btn-pptx-download:disabled {
  opacity: 0.7;
  cursor: wait;
}

.btn-pptx-fallback-download {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.btn-pptx-fallback-download:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.pptx-dl-hint {
  font-size: 10.5px;
  color: #a1a1aa;
  line-height: 1.35;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   Visualizador Interativo de Slides (Word -> PowerPoint)
   ═══════════════════════════════════════════════════════════════ */
.pptx-slides-viewer {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.slides-viewer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.viewer-nav-label {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.viewer-nav-tabs {
  display: flex;
  gap: 4px;
}

.slide-tab-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(30, 41, 59, 0.8);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.slide-tab-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
  color: #ffffff;
}

.slide-tab-btn.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}

.slide-preview-display {
  min-height: 80px;
}

.slide-preview-card-inner {
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
}

.slide-preview-card-inner.cover-slide {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 27, 75, 0.8) 100%);
  border-left: 3px solid #6366f1;
}

.slide-preview-card-inner.content-slide {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid #38bdf8;
}

.slide-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.slide-preview-num {
  font-size: 9.5px;
  font-weight: 700;
  color: #818cf8;
  text-transform: uppercase;
}

.slide-features-row {
  display: flex;
  gap: 4px;
}

.slide-feature-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(234, 88, 12, 0.2);
  color: #fb923c;
  border: 1px solid rgba(234, 88, 12, 0.4);
}

.slide-preview-heading {
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
  line-height: 1.3;
}

.slide-preview-bullets {
  margin: 2px 0 0 14px;
  padding: 0;
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.35;
}

.slide-preview-bullets li {
  margin-bottom: 2px;
}

.slide-more-bullets {
  color: #94a3b8;
  font-style: italic;
  font-size: 10px;
}

.slide-preview-subtitle {
  margin: 2px 0 0 0;
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   Ponte Word -> PowerPoint Card
   ═══════════════════════════════════════════════════════════════ */
.word-ppt-bridge-card {
  margin-top: 10px;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.6) 0%, rgba(24, 24, 27, 0.95) 100%);
  border: 1px solid rgba(234, 88, 12, 0.4);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
}

.bridge-card-header {
  display: flex;
  align-items: center;
  gap: 9px;
}

.bridge-card-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.bridge-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.bridge-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #fed7aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bridge-card-meta {
  font-size: 11px;
  color: #94a3b8;
}

.bridge-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.btn-bridge-insert {
  flex: 1;
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-bridge-insert:hover:not(:disabled) {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.5);
}

.btn-bridge-insert:disabled {
  opacity: 0.7;
  cursor: wait;
}

.btn-bridge-dismiss {
  background: rgba(255, 255, 255, 0.05);
  color: #a1a1aa;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-bridge-dismiss:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* ═══════════════════════════════════════════════════════════════
   Antigravity IDE Interactive Choice Card (Aparência IDÊNTICA à IDE)
   ═══════════════════════════════════════════════════════════════ */

.antigravity-choice-card {
  margin-top: 10px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 12px;
  padding: 12px 10px 10px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03);
  width: 100%;
  box-sizing: border-box;
}

.ag-choice-header {
  margin-bottom: 10px;
}

.ag-choice-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #818cf8;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.ag-choice-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #818cf8;
  box-shadow: 0 0 6px #818cf8;
}

.ag-choice-title {
  color: #f4f4f5;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  word-break: normal;
  overflow-wrap: break-word;
}

.ag-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.ag-option-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid #27272a;
  border-radius: 10px;
  padding: 10px 8px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  position: relative;
  box-sizing: border-box;
  width: 100%;
}

.ag-option-item:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.055);
  border-color: #6366f1;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.16);
  transform: translateY(-1px);
}

.ag-option-item:hover:not(.disabled) .ag-option-num {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #c7d2fe;
}

.ag-option-item:hover:not(.disabled) .ag-option-title {
  color: #ffffff;
}

.ag-option-item:hover:not(.disabled) .ag-radio {
  border-color: #818cf8;
}

/* Number / Shortcut badge on the left */
.ag-option-num {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #71717a;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.18s ease;
}

/* Option Body */
.ag-option-body {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ag-option-title,
.ag-option-title-row .ag-option-title {
  display: block;
  width: 100%;
  font-size: 12.5px;
  font-weight: 600;
  color: #f4f4f5;
  transition: color 0.18s ease;
  word-break: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
  white-space: normal;
  line-height: 1.35;
  margin: 0;
}

.ag-option-meta-row,
.ag-option-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 1px;
  margin-bottom: 2px;
}

.ag-badge-rec {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 9.5px;
  font-weight: 600;
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}

.ag-badge-tag {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 9.5px;
  font-weight: 500;
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}

.ag-option-desc {
  font-size: 11px;
  color: #a1a1aa;
  line-height: 1.4;
  margin: 0;
  word-break: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Right side: slides badge and radio */
.ag-option-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-shrink: 0;
}

.ag-slides-badge {
  font-size: 9.5px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 1px 6px;
  font-weight: 500;
  white-space: nowrap;
}

.ag-radio {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid #3f3f46;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  background: transparent;
  flex-shrink: 0;
}

/* Selected State */
.ag-option-item.selected {
  background: rgba(16, 185, 129, 0.09) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.35), 0 4px 16px rgba(16, 185, 129, 0.12) !important;
  transform: none !important;
  cursor: default;
}

.ag-option-item.selected .ag-option-num {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
}

.ag-option-item.selected .ag-option-title {
  color: #34d399 !important;
}

.ag-option-item.selected .ag-radio {
  background: #10b981 !important;
  border-color: #10b981 !important;
}

.ag-radio-check {
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
}

.ag-option-item.disabled:not(.selected) {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.5);
  transform: none !important;
}

/* Footer note */
.ag-choice-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 10.5px;
  color: #71717a;
}

.ag-choice-footer svg {
  color: #a1a1aa;
}

/* Typing Indicator */
.typing-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 14px;
  align-self: flex-start;
  flex-shrink: 0;
}

.typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
  animation: dotBounce 1.4s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-3px); opacity: 1; }
}

/* ═════════════════════════════════════════════════════════════
   FLOATING (+) ACTION BUTTON (Marked in Red Zone)
   ═════════════════════════════════════════════════════════════ */
.btn-floating-plus {
  position: absolute;
  bottom: 54px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #161b22;
  border: 1px solid #30363d;
  color: #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 35;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body[data-host="word"] .btn-floating-plus {
  color: #818cf8;
}

body[data-host="powerpoint"] .btn-floating-plus {
  color: #fb923c;
}

.btn-floating-plus:hover {
  background-color: #21262d;
  border-color: #10b981;
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

body[data-host="word"] .btn-floating-plus:hover {
  border-color: #818cf8;
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.4);
}

body[data-host="powerpoint"] .btn-floating-plus:hover {
  border-color: #fb923c;
  box-shadow: 0 0 12px rgba(251, 146, 60, 0.4);
}

.btn-floating-plus.active {
  transform: rotate(45deg);
  background-color: #21262d;
  border-color: #f87171;
  color: #f87171;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.35);
}

/* ═════════════════════════════════════════════════════════════
   DRAG & DROP WORD FILE OVERLAY
   ═════════════════════════════════════════════════════════════ */
.drag-drop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #38bdf8;
  border-radius: 8px;
  box-sizing: border-box;
  pointer-events: none;
}

.drag-drop-card {
  text-align: center;
  padding: 24px 20px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  max-width: 85%;
}

.drag-drop-icon {
  font-size: 38px;
  margin-bottom: 10px;
}

.drag-drop-title {
  font-size: 14px;
  font-weight: 600;
  color: #38bdf8;
  margin-bottom: 6px;
}

.drag-drop-subtitle {
  font-size: 11px;
  color: #8b949e;
  line-height: 1.4;
}

@keyframes pulseSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ═════════════════════════════════════════════════════════════
   FLOATING QUICK ACTIONS POPUP MENU
   ═════════════════════════════════════════════════════════════ */
.quick-actions-popup {
  position: absolute;
  bottom: 96px;
  right: 14px;
  width: 220px;
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.75);
  z-index: 40;
  overflow: hidden;
  animation: popupSlideUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popupSlideUp {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.quick-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #21262d;
}

.quick-menu-title {
  font-size: 11px;
  font-weight: 700;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-close-mini {
  background: none;
  border: none;
  color: #8b949e;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}
.btn-close-mini:hover {
  color: #ffffff;
  background: #21262d;
}

.quick-menu-list {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: #c9d1d9;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.quick-menu-item:hover {
  background-color: #21262d;
  color: #ffffff;
  transform: translateX(2px);
}

.quick-menu-item-icon {
  font-size: 13px;
  flex-shrink: 0;
}

.quick-menu-item-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═════════════════════════════════════════════════════════════
   CHAT INPUT DOCK
   ═════════════════════════════════════════════════════════════ */
.chat-input-dock {
  padding: 6px 14px 10px 14px;
  background-color: #0d1117 !important;
  border-top: 1px solid #21262d;
  flex-shrink: 0;
}

.input-pill-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background-color: #161b22 !important;
  border: 1px solid #30363d !important;
  border-radius: 20px;
  padding: 5px 6px 5px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-pill-container:focus-within {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

body[data-host="word"] .input-pill-container:focus-within {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
}

body[data-host="powerpoint"] .input-pill-container:focus-within {
  border-color: #ea580c !important;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2) !important;
}

.chat-text-field {
  flex: 1;
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.4;
  padding: 4px 0;
  resize: none;
  outline: none;
  min-height: 22px;
  max-height: 70px;
  overflow-y: auto;
  scrollbar-width: none;
}

.chat-text-field::-webkit-scrollbar {
  display: none;
}

.chat-text-field::placeholder {
  color: #6e7681 !important;
}

.btn-send-pill {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background-color: #10b981;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease, filter 0.15s ease;
}

body[data-host="word"] .btn-send-pill {
  background-color: #6366f1;
}

body[data-host="powerpoint"] .btn-send-pill {
  background-color: #ea580c;
}

.btn-send-pill:hover {
  transform: scale(1.08);
  filter: brightness(1.15);
}

.btn-send-pill:active {
  transform: scale(0.95);
}

.btn-send-pill:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ═══════════════════════════════════════════════════════════════
   MONETIZATION & MICROSOFT CERTIFICATION STYLES
   ═══════════════════════════════════════════════════════════════ */

/* Plan Badge in Header */
.plan-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #fbbf24;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.plan-badge-btn:hover {
  background: rgba(234, 179, 8, 0.22);
  border-color: rgba(234, 179, 8, 0.6);
  transform: translateY(-1px);
}

.plan-badge-btn.pro-badge {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #e879f9;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}

.plan-badge-btn.trial-badge {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.plan-badge-btn.expired-badge {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #f87171;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}

/* Settings Plan Card */
.settings-plan-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
}

.plan-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.plan-card-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #8b949e;
  letter-spacing: 0.5px;
}

.settings-plan-card.is-pro .plan-card-tag {
  color: #a855f7;
}

.btn-upgrade-highlight {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-upgrade-highlight:hover {
  transform: scale(1.03);
  filter: brightness(1.1);
}

.plan-card-desc {
  font-size: 11px;
  color: #8b949e;
  line-height: 1.4;
  margin-bottom: 10px;
}

.auth-box-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-input-styled {
  width: 100%;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #e6edf3;
  padding: 7px 10px;
  font-size: 11px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.auth-input-styled:focus {
  border-color: #58a6ff;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.15);
}

.btn-activate-full {
  background: #238636;
  border: none;
  border-radius: 6px;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  text-align: center;
}

.btn-activate-full:hover {
  background: #2ea043;
}

.btn-activate-full:active {
  transform: scale(0.99);
}

/* Auth Connected Box (Authenticated Pro State) */
.auth-connected-box {
  display: flex;
  flex-direction: column;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
  gap: 8px;
}

.auth-connected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}

.auth-safe-notice {
  font-size: 10px;
  color: #8b949e;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
  line-height: 1.35;
  width: 100%;
}

.auth-safe-notice strong {
  color: #c084fc;
}

.auth-connected-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.auth-connected-avatar {
  font-size: 18px;
  background: rgba(168, 85, 247, 0.15);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.auth-connected-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-connected-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #a855f7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-connected-email {
  font-size: 11.5px;
  font-weight: 600;
  color: #e6edf3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-connected-key {
  font-size: 10px;
  color: #8b949e;
  font-family: 'JetBrains Mono', Consolas, monospace;
}

.btn-disconnect-link {
  background: transparent;
  border: 1px solid #30363d;
  color: #f85149;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-disconnect-link:hover {
  background: rgba(248, 81, 73, 0.12);
  border-color: #f85149;
}

.license-input-row {
  display: flex;
  gap: 6px;
}

.license-input-row input {
  flex: 1;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #e6edf3;
  padding: 6px 9px;
  font-size: 11px;
  outline: none;
  transition: border-color 0.15s ease;
}

.license-input-row input:focus {
  border-color: #58a6ff;
}

.btn-activate {
  background: #238636;
  border: none;
  border-radius: 6px;
  color: #ffffff;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.btn-activate:hover {
  background: #2ea043;
}

.license-status-label {
  font-size: 10.5px;
  margin-top: 6px;
  min-height: 14px;
}

.license-status-label.success {
  color: #3fb950;
}

.license-status-label.error {
  color: #f85149;
}

/* Settings Legal Footer (Microsoft AppSource Policy 1100.5) */
.settings-legal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 14px;
  margin-top: 10px;
  border-top: 1px solid #21262d;
}

.legal-link {
  color: #58a6ff;
  font-size: 10.5px;
  text-decoration: none;
}

.legal-link:hover {
  text-decoration: underline;
}

.legal-dot {
  color: #484f58;
  font-size: 10px;
}

/* ─── Overlay Modals (Pro & Onboarding) ─────────────────────── */
.wid-overlay-modal {
  position: absolute;
  inset: 0;
  z-index: 999;
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.wid-overlay-modal.pro-modal-hidden,
.wid-overlay-modal.onboarding-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pro-modal-dialog {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 18px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

.pro-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pro-modal-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  padding: 3px 8px;
  border-radius: 20px;
}

.pro-headline {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: #f0f6fc;
  margin-bottom: 6px;
}

.gradient-text {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pro-subtext {
  font-size: 11.5px;
  color: #8b949e;
  margin-bottom: 14px;
}

.pricing-cards-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.pricing-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 14px;
  position: relative;
}

.pricing-card.featured {
  border-color: #a855f7;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.08) 0%, #0d1117 100%);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.15);
}

.pro-featured-ribbon {
  position: absolute;
  top: -9px;
  right: 14px;
  background: #a855f7;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  border-radius: 10px;
}

.pricing-tier-title {
  font-size: 13px;
  font-weight: 700;
  color: #f0f6fc;
  margin-bottom: 4px;
}

.pricing-price {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.pricing-price span {
  font-size: 11px;
  font-weight: 400;
  color: #8b949e;
}

.pricing-card-note {
  font-size: 10px;
  color: #8b949e;
  margin-bottom: 10px;
}

.pricing-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.pricing-feature-list li {
  font-size: 11px;
  color: #c9d1d9;
}

.btn-pricing-primary {
  display: block;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  color: #ffffff;
  padding: 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-pricing-primary:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.pricing-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.btn-pricing-pix {
  display: block;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(135deg, #00b494 0%, #00876c 100%);
  color: #ffffff;
  padding: 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  transition: transform 0.15s ease, filter 0.15s ease;
  border: none;
  cursor: pointer;
}

.btn-pricing-pix:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.checkout-waiting-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  animation: fadeIn 0.2s ease-in-out;
}

.waiting-spinner-pulse {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(168, 85, 247, 0.3);
  border-top-color: #a855f7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.waiting-text-stack {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.waiting-title {
  font-size: 11px;
  font-weight: 700;
  color: #c084fc;
}

.waiting-subtitle {
  font-size: 9.5px;
  color: #8b949e;
  line-height: 1.25;
}

.btn-cancel-polling {
  background: transparent;
  border: none;
  color: #8b949e;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-cancel-polling:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f85149;
}

.btn-pricing-secondary {
  width: 100%;
  background: #21262d;
  border: 1px solid #30363d;
  color: #8b949e;
  padding: 7px;
  border-radius: 8px;
  font-size: 11px;
  cursor: default;
}

.license-redemption-box {
  background: #0d1117;
  border: 1px dashed #30363d;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

.redemption-title {
  display: block;
  font-size: 10.5px;
  color: #8b949e;
  margin-bottom: 6px;
}

.redemption-fields-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-auth-field {
  width: 100%;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #e6edf3;
  padding: 7px 10px;
  font-size: 11px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-auth-field:focus {
  border-color: #58a6ff;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.15);
}

.redemption-input-group {
  display: flex;
  gap: 6px;
}

.redemption-input-group input {
  flex: 1;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #e6edf3;
  padding: 6px 8px;
  font-size: 10.5px;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
}

.btn-activate-pro {
  background: #238636;
  border: none;
  border-radius: 6px;
  color: #ffffff;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.btn-activate-pro:hover {
  background: #2ea043;
}

.pro-guarantee-note {
  text-align: center;
  font-size: 9.5px;
  color: #6e7681;
  line-height: 1.4;
}

/* ─── Onboarding Dialog (First-Run FTUX) ─────────────────────── */
.onboarding-dialog {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 14px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
}

.onboarding-hero {
  text-align: center;
  margin-bottom: 18px;
}

.onboarding-hero-title {
  font-size: 17px;
  font-weight: 700;
  color: #f0f6fc;
  margin-bottom: 4px;
}

.onboarding-hero-subtitle {
  font-size: 11.5px;
  color: #8b949e;
  line-height: 1.4;
}

.onboarding-features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.onboarding-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 10px;
}

.feature-item-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.feature-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feature-item-content strong {
  font-size: 12px;
  color: #f0f6fc;
}

.feature-item-content span {
  font-size: 10.5px;
  color: #8b949e;
  line-height: 1.4;
}

.onboarding-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.btn-finish-onboarding {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 11px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

body[data-host="word"] .btn-finish-onboarding {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

body[data-host="powerpoint"] .btn-finish-onboarding {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
}

.btn-finish-onboarding:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.onboarding-quick-tip {
  font-size: 10px;
  color: #6e7681;
  text-align: center;
  line-height: 1.4;
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVIDADE DO PAINEL LATERAL (OFFICE SIDEBAR)
   ═══════════════════════════════════════════════════════════════ */

/* Painel compacto / largura padrão de sidebar (<= 360px) */
@media (max-width: 360px) {
  .chat-scroll-area {
    padding: 10px 10px 12px 10px;
    gap: 10px;
  }

  .chat-bubble {
    padding: 9px 11px;
    font-size: 12px;
  }

  .antigravity-choice-card {
    padding: 10px 8px 8px 8px;
    margin-top: 8px;
  }

  .ag-choice-title {
    font-size: 12.5px;
  }

  .ag-option-item {
    padding: 8px 7px;
    gap: 7px;
  }

  .ag-option-num {
    width: 19px;
    height: 19px;
    font-size: 10px;
  }

  .ag-option-title {
    font-size: 12px;
  }

  .ag-badge-rec,
  .ag-badge-tag,
  .ag-slides-badge {
    font-size: 9px;
    padding: 1px 5px;
  }

  .ag-option-desc {
    font-size: 10.5px;
    line-height: 1.35;
  }

  .pptx-download-card,
  .word-ppt-bridge-card {
    padding: 10px;
    gap: 7px;
  }

  .btn-pptx-download {
    padding: 8px 10px;
    font-size: 11.5px;
  }

  .agent-header {
    padding: 0 8px;
  }

  .btn-header-action {
    padding: 3px 6px;
    font-size: 10px;
  }
}

/* Painel ultrafino / redimensionamento estreito (<= 300px) */
@media (max-width: 300px) {
  .chat-scroll-area {
    padding: 8px 6px 10px 6px;
  }

  .chat-bubble {
    padding: 8px 9px;
    font-size: 11.5px;
  }

  .chat-msg.assistant {
    max-width: 100%;
  }

  .antigravity-choice-card {
    padding: 8px 6px 6px 6px;
  }

  .ag-option-item {
    padding: 7px 5px;
    gap: 6px;
  }

  .ag-option-title {
    font-size: 11.5px;
    line-height: 1.3;
  }

  .ag-option-meta-row,
  .ag-option-title-row {
    gap: 3px;
  }

  .ag-badge-rec,
  .ag-badge-tag,
  .ag-slides-badge {
    font-size: 8.5px;
    padding: 1px 4px;
  }

  .ag-option-desc {
    font-size: 10px;
  }

  .ag-choice-footer {
    font-size: 9.5px;
    margin-top: 6px;
    padding-top: 6px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Botão de Inserção Rápida no Documento (Word)
   ═══════════════════════════════════════════════════════════════ */
.msg-insert-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-insert-to-doc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 118, 110, 0.25);
  border: 1px solid rgba(15, 118, 110, 0.6);
  color: #2dd4bf;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-insert-to-doc:hover:not(:disabled) {
  background: rgba(15, 118, 110, 0.45);
  border-color: #2dd4bf;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-insert-to-doc:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

