/* ============================================================
   LOV-ULTRA — popup.css
   Design exato dos screenshots: tela de licença + topbar flat
   com hero banner, aba Chat e compose bar.
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* GLOBAL: garante que [hidden] sempre oculte mesmo com display via CSS */
[hidden] { display: none !important; }

:root {
  --bg:        #0a0a0a;
  --bg2:       #111111;
  --bg3:       #1c1c1e;
  --bg4:       #242428;
  --purple:    #8B5CF6;
  --purple-dk: #7C3AED;
  --green:     #22C55E;
  --green-dk:  #16A34A;
  --red:       #EF4444;
  --blue:      #3B82F6;
  --text:      #F0F0F0;
  --text2:     #9A9A9A;
  --text3:     #555;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);
  --radius:    12px;
  --font:      'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, textarea { font-family: var(--font); }
a { color: var(--purple); }

/* ── View system ─────────────────────────────────────────── */
.view {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.view[hidden] { display: none !important; }

/* ─────────────────────────────────────────────────────────
   LOV LOGO (reutilizado em vários contextos)
   ───────────────────────────────────────────────────────── */
.lov-logo-text {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  font-size: inherit;
}
.lov-logo-o {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  border-radius: 50%;
  width: 1.05em;
  height: 1.05em;
  vertical-align: middle;
  margin: 0 0.02em;
  font-weight: 700;
  color: #fff;
  font-size: 0.92em;
  line-height: 1;
}
.lov-logo-ver {
  font-weight: 400;
  color: var(--text);
  margin-left: 1px;
}

/* ── Logo como imagem (PNG da marca) ─────────────────────── */
.lov-logo-img {
  width: 180px;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(139,92,246,0.25));
}

.topbar-logo-img {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(139,92,246,0.2));
}

/* ═══════════════════════════════════════════════════════════
   1. TELA DE LICENÇA
   ═══════════════════════════════════════════════════════════ */
#view-license {
  justify-content: center;
  align-items: center;
  background: var(--bg);
  padding: 40px 28px 28px;
}

.license-screen {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Logo grande na tela de licença */
.license-logo {
  margin-bottom: 20px;
  font-size: 32px;
}

/* Variante pequena na topbar */
.lov-logo-text.sm { font-size: 17px; }

/* Headline */
.lic-headline {
  font-size: 15px;
  font-weight: 500;
  color: var(--text2);
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}

/* Mensagem de info (oculta por padrão) */
.lic-msg-info {
  font-size: 12px;
  color: var(--text2);
  text-align: center;
  margin-bottom: 12px;
}

/* Badge de segurança */
.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--green);
  font-size: 11.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.security-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Grupo input de licença */
.license-input-group {
  width: 100%;
  margin-bottom: 8px;
}
.lic-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.lic-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lic-input::placeholder { color: var(--text3); font-weight: 400; letter-spacing: 0.04em; }
.lic-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}

/* Linha de "ativada com sucesso" abaixo do input */
.lic-activated-row {
  margin-top: 8px;
  color: var(--green);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
}
.lic-activated-row[hidden] { display: none; }

/* Erro */
.lic-error {
  width: 100%;
  font-size: 12px;
  color: var(--red);
  text-align: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.15);
  margin-bottom: 8px;
}
.lic-error[hidden] { display: none; }

/* Botão Ativar Licença */
.btn-activate {
  width: 100%;
  background: var(--purple);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 14px;
  border-radius: var(--radius);
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(139,92,246,0.35);
  margin-top: 4px;
  margin-bottom: 28px;
}
.btn-activate:hover {
  background: var(--purple-dk);
  box-shadow: 0 6px 32px rgba(139,92,246,0.5);
  transform: translateY(-1px);
}
.btn-activate:active { transform: translateY(0); }
.btn-activate:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* Footer */
.license-footer {
  font-size: 11px;
  color: var(--text3);
  text-align: center;
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════════════════
   2. TELA PRINCIPAL (view-main)
   ═══════════════════════════════════════════════════════════ */
#view-main { background: var(--bg); }

.app-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* ─ TOPBAR ─────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  padding: 0 12px;
  height: 48px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  gap: 8px;
}

.topbar-brand {
  flex-shrink: 0;
  font-size: 17px;
}

.topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* Days badge — pill verde */
#days-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
#days-badge[hidden] { display: none !important; }
.days-dot { font-size: 10px; line-height: 1; }

.topbar-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Ícone genérico da topbar */
.tbar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text2);
  transition: background 0.15s, color 0.15s;
}
.tbar-icon-btn:hover { background: var(--bg3); color: var(--text); }
.tbar-icon-btn[hidden] { display: none !important; }

/* Exit (logout) icon — mesma cor do texto */
.tbar-exit { color: var(--text2); }

/* Botão Publish — pill roxo sólido */
.tbar-publish-btn {
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(139,92,246,0.3);
}
.tbar-publish-btn:hover { background: var(--purple-dk); box-shadow: 0 4px 18px rgba(139,92,246,0.45); }
.tbar-publish-btn[hidden] { display: none !important; }

.ver-badge {
  font-size: 9px;
  color: var(--text3);
  letter-spacing: 0.05em;
}

/* ─ HERO BANNER ──────────────────────────────────────────── */
.hero-banner {
  flex-shrink: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  max-height: 130px;
}
.hero-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  object-position: center 54%;
  display: block;
}

/* ─ TAB STRIP ────────────────────────────────────────────── */
.tab-strip {
  display: flex;
  align-items: center;
  padding: 0 14px;
  height: 44px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  gap: 8px;
}

/* Tab visível: "Chat" */
.nav-item.tab-visible {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  padding: 0 2px;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  height: 100%;
  display: flex;
  align-items: center;
  transition: color 0.15s, border-color 0.15s;
}
.nav-item.tab-visible.active {
  color: var(--text);
  border-bottom-color: var(--purple);
}
/* Tabs ocultas (home/project) ficam no DOM mas invisíveis */
.nav-item:not(.tab-visible) { display: none !important; }

/* Espaçador entre aba e watermark */
.tab-strip { justify-content: space-between; }

/* Watermark button: "✕ TIRAR MARCA D'ÁGUA" */
.watermark-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 5px 11px;
  border-radius: 999px;
  transition: background 0.15s, border-color 0.15s;
}
.watermark-btn:hover { background: rgba(34,197,94,0.18); border-color: rgba(34,197,94,0.35); }
.watermark-btn[hidden] { display: none !important; }

/* Status de ação (genérico) */
#hide-badge-status { margin: 4px 14px; }

/* ─ PANELS HOST ──────────────────────────────────────────── */
.panels-host {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.tab-panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.tab-panel[hidden] { display: none !important; }

/* ─ APP FOOTER ───────────────────────────────────────────── */
.app-footer-bar {
  flex-shrink: 0;
  text-align: center;
  font-size: 10.5px;
  color: var(--text3);
  padding: 8px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════
   3. PAINEL HOME (oculto; IDs necessários ao JS)
   ═══════════════════════════════════════════════════════════ */
.particles-bg { display: none; }
.toggle-area  { display: none; }
.toggle-error { display: none; }
.info-grid    { display: none; }
.expiry-bar-wrap { display: none; }
.usage-section { display: none; }
.shortcut-bar  { display: none; }
.active-banner { display: none; }

/* Elementos preservados para JS mas ocultos */
.power-label,
.power-toggle,
.ring-fill,
.ring-track,
.power-svg,
#big-toggle { opacity: 0; pointer-events: none; position: absolute; }

/* ═══════════════════════════════════════════════════════════
   4. PAINEL PROJETO (oculto; IDs necessários ao JS)
   ═══════════════════════════════════════════════════════════ */
.tab-panel[data-panel="project"] .panel-hint,
.tab-panel[data-panel="project"] .action-btn { display: none; }

/* ═══════════════════════════════════════════════════════════
   5. PAINEL CHAT (tela principal)
   ═══════════════════════════════════════════════════════════ */
.chat-main-panel {
  background: var(--bg);
  overflow: hidden !important; /* compose fixo no fundo */
}

/* ─ Hint (nenhum projeto aberto) ─ */
.panel-hint {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 24px;
  text-align: center;
}
.panel-hint[hidden] { display: none !important; }

.hint-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
}
.hint-text h4 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.hint-text p  { font-size: 12px; color: var(--text2); }
.hint-text code {
  background: var(--bg3);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--purple);
}

/* ─ Chat Section ─ */
.chat-section {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.chat-section[hidden] { display: none !important; }

/* Header da seção chat (oculto no novo design) */
.chat-section-header {
  display: none;
}

/* ─ Histórico ─ */
.chat-history-wrap { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.chat-history-wrap[hidden] { display: none !important; }

.chat-history-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.chat-history-label { font-size: 11px; font-weight: 600; color: var(--text2); letter-spacing: 0.05em; text-transform: uppercase; }
.chat-history-count { font-size: 11px; color: var(--text3); background: var(--bg3); padding: 2px 8px; border-radius: 999px; }

.chat-history {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

/* ─ Empty State ─ */
.chat-empty-state {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  gap: 8px;
}
.chat-empty-state[hidden] { display: none !important; }

/* ─ Itens do histórico de chat ─ */
.chat-history li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.chat-history li:hover { background: rgba(255,255,255,0.025); }

.chat-history li .msg-text {
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-history li .msg-role {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 2px;
}

.chat-history li time {
  display: block;
  font-size: 10.5px;
  color: var(--text3);
  margin-top: 2px;
}

.chat-empty-logo { font-size: 24px; margin-bottom: 8px; }

.chat-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.chat-empty-msg {
  font-size: 12.5px;
  color: var(--text2);
  margin-bottom: 12px;
}

/* Chips de sugestão */
.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}
.suggestion-chip {
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.suggestion-chip:hover {
  background: var(--bg4);
  border-color: rgba(139,92,246,0.35);
  transform: translateY(-1px);
}

/* ─ Compose ─────────────────────────────────────────────── */
.chat-compose {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 10px 12px 10px;
}

.chat-input-shell {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chat-input-shell:focus-within {
  border-color: rgba(139,92,246,0.4);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}

.chat-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  resize: none;
  padding: 12px 14px 6px;
  max-height: 160px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  line-height: 1.5;
}
.chat-input::placeholder { color: var(--text3); }

/* Pills */
.chat-pill-row {
  display: flex;
  gap: 6px;
  padding: 4px 10px 6px;
  flex-wrap: wrap;
}
.chat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg4);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 999px;
  transition: background 0.15s, border-color 0.15s;
}
.chat-pill:hover:not(:disabled) { background: rgba(139,92,246,0.12); border-color: rgba(139,92,246,0.3); color: var(--text); }
.chat-pill-static { pointer-events: none; }

.chat-pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.chat-pill[data-mode="plan"] .chat-pill-dot { background: var(--purple); }

.chat-pill-caret { opacity: 0.5; }

/* Chat mode dropdown */
.chat-pill-wrap { position: relative; }
.chat-mode-menu {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 100;
}
.chat-mode-menu[hidden] { display: none !important; }
.chat-mode-menu-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}
.chat-mode-menu-item:hover, .chat-mode-menu-item[aria-selected="true"] {
  background: rgba(139,92,246,0.1);
}
.cmm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-top: 4px; flex-shrink: 0; }
.chat-mode-menu-item[data-value="plan"] .cmm-dot { background: var(--purple); }
.cmm-text { display: flex; flex-direction: column; gap: 2px; }
.cmm-title { font-size: 12px; font-weight: 600; color: var(--text); }
.cmm-desc  { font-size: 11px; color: var(--text2); line-height: 1.4; }

/* Attachments */
.chat-attachments {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 12px 0;
}
.chat-attachments[hidden] { display: none !important; }
.chat-attachments li { display: flex; align-items: center; gap: 7px; max-width: 100%; background: var(--bg3); border: 1px solid var(--border2); border-radius: 10px; padding: 4px 7px 4px 4px; overflow: hidden; }
.att-thumb { width: 30px; height: 30px; min-width: 30px; border-radius: 6px; object-fit: cover; display: block; flex: 0 0 auto; }
.att-thumb-icon { width: 30px; height: 30px; min-width: 30px; border-radius: 6px; background: var(--bg4); display: flex; align-items: center; justify-content: center; color: var(--purple); flex: 0 0 auto; }
.att-name { font-size: 12px; color: var(--text); max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-size { font-size: 11px; color: var(--text3); flex: 0 0 auto; white-space: nowrap; }
.att-remove { width: 18px; height: 18px; min-width: 18px; border-radius: 50%; background: rgba(255,255,255,0.08); color: var(--text2); font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; cursor: pointer; padding: 0; }
.att-remove:hover { background: rgba(239,68,68,0.18); color: #ef4444; }

/* Bottom bar: clip | [improve] [send] */
.chat-compose-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 8px;
}
.chat-compose-left  { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; row-gap: 6px; }
.chat-compose-right { display: flex; align-items: center; gap: 8px; }

/* Clip button */
.chat-clip-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  color: var(--text2);
  transition: background 0.15s, color 0.15s;
}
.chat-clip-btn:hover { background: var(--bg4); color: var(--text); }

/* Ícone genérico de ação (mic etc.) */
.chat-icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  color: var(--text2);
  transition: background 0.15s;
}
.chat-icon-circle:hover { background: var(--bg4); color: var(--text); }
.chat-icon-circle[hidden] { display: none !important; }

/* Rec indicator */
.chat-rec-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--red);
  font-weight: 600;
}
.chat-rec-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  animation: blink-rec 0.8s ease-in-out infinite alternate;
}
@keyframes blink-rec { to { opacity: 0.2; } }

/* "✨ Otimizar com IA" pill */
.chat-improve-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.25);
  color: var(--purple);
  font-size: 11.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  transition: background 0.15s, border-color 0.15s;
}
.chat-improve-pill:hover {
  background: rgba(139,92,246,0.2);
  border-color: rgba(139,92,246,0.4);
}
.chat-improve-icon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chat-improve-spinner, .chat-send-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Send button — circle roxo */
.chat-send-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: 0 2px 10px rgba(139,92,246,0.35);
  flex-shrink: 0;
}
.chat-send-circle:hover {
  background: var(--purple-dk);
  box-shadow: 0 4px 18px rgba(139,92,246,0.5);
  transform: translateY(-1px);
}
.chat-send-circle:active { transform: translateY(0); }

/* Botão aprovar plano */
.approve-plan-btn {
  margin: 8px 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, #7c3aed, #8B5CF6);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  width: calc(100% - 24px);
  transition: opacity 0.15s;
}
.approve-plan-btn:hover { opacity: 0.9; }

/* Status geral */
.action-status {
  font-size: 11.5px;
  padding: 7px 14px;
  border-radius: 8px;
  margin: 4px 12px;
}
.action-status[hidden] { display: none !important; }
.action-status[data-kind="ok"]    { color: var(--green); background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2); }
.action-status[data-kind="error"] { color: var(--red);   background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); }

/* Icon button genérico */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 7px;
  color: var(--text2);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--bg3); color: var(--red); }
.icon-btn[hidden] { display: none !important; }

/* ═══════════════════════════════════════════════════════════
   6. ACTION BUTTONS (painel projeto — mantidos para JS)
   ═══════════════════════════════════════════════════════════ */
.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 28px);
  margin: 0 14px 8px;
  padding: 12px 16px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.action-btn:hover { background: var(--bg4); border-color: rgba(139,92,246,0.3); }
.action-btn[hidden] { display: none !important; }

.action-btn-primary {
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(124,58,237,0.1));
  border-color: rgba(139,92,246,0.3);
  color: var(--purple);
  font-weight: 600;
}
.action-arrow { margin-left: auto; opacity: 0.5; }
.download-spinner {
  display: inline-block;
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: auto;
}

/* ═══════════════════════════════════════════════════════════
   7. MODAIS
   ═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-overlay[hidden] { display: none !important; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-box {
  position: relative;
  z-index: 1;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 18px;
  width: calc(100% - 40px);
  max-width: 340px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 40px rgba(139,92,246,0.06);
  overflow: hidden;
  animation: modal-in 0.25s cubic-bezier(0.2,0.8,0.2,1);
}
@keyframes modal-in {
  from { transform: translateY(12px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Confirm modal */
.confirm-modal-box {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.modal-icon {
  width: 48px; height: 48px;
  background: rgba(239,68,68,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text); }
.modal-msg   { font-size: 12.5px; color: var(--text2); line-height: 1.5; }

/* Security & Create modals */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-header-left { display: flex; align-items: center; gap: 10px; }
.modal-header-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(139,92,246,0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple);
}
.modal-close {
  font-size: 20px;
  color: var(--text3);
  transition: color 0.15s;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-close:hover { color: var(--text); background: var(--bg3); }
.modal-subtitle { font-size: 11.5px; color: var(--text2); margin-top: 2px; }

.modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.field-label { font-size: 11px; font-weight: 600; color: var(--text2); letter-spacing: 0.05em; text-transform: uppercase; }

.create-prompt {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 12.5px;
  padding: 10px 14px;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.5;
}
.create-prompt:focus { border-color: var(--purple); }
.create-prompt::placeholder { color: var(--text3); }

.create-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.checkbox-box {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--border2);
  background: var(--bg);
  flex-shrink: 0;
  margin-top: 2px;
  transition: border-color 0.15s, background 0.15s;
}
.create-checkbox input:checked + .checkbox-box {
  background: var(--purple);
  border-color: var(--purple);
}
.create-checkbox input { display: none; }
.checkbox-label { display: flex; flex-direction: column; gap: 2px; }
.cc-title { font-size: 12px; font-weight: 600; color: var(--text); }
.cc-desc  { font-size: 11px; color: var(--text2); line-height: 1.4; }

/* Action buttons do modal */
.modal-actions {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}
.modal-footer { justify-content: flex-end; }
.modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 10px;
  transition: background 0.15s, transform 0.1s;
}
.modal-btn-cancel {
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text2);
}
.modal-btn-cancel:hover { background: var(--bg4); color: var(--text); }
.modal-btn-confirm {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 2px 12px rgba(139,92,246,0.3);
}
.modal-btn-confirm:hover { background: var(--purple-dk); transform: translateY(-1px); }

/* Security modal */
.security-summary { padding: 14px 18px; font-size: 12px; color: var(--text2); }
.security-actions {
  display: flex;
  gap: 8px;
  padding: 0 18px 14px;
}
.security-body { padding: 0 18px 16px; font-size: 12px; color: var(--text2); }

/* Create spinner */
.create-btn-spinner {
  display: inline-block;
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ═══════════════════════════════════════════════════════════
   8. SCROLLBAR GLOBAL
   ═══════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* ═══════════════════════════════════════════════════════════
   9. RESPONSIVO — sidepanel vs janela flutuante
   ═══════════════════════════════════════════════════════════ */
.in-window #view-license,
.in-window #view-main { min-width: 375px; }

/* ═══════════════════════════════════════════════════════════
   10. LEGADO — classes referenciadas por popup.js
       (elementos ocultos no novo layout; sem remoção de IDs)
   ═══════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  color: transparent !important;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* Power toggle (no home panel) */
.power-toggle { all: unset; }
.ring-track, .ring-fill { display: none; }