/* ==========================================================================
   DESIGN SYSTEM 2026: SISTEMA DE MARKETING & CONVERSÃO DE MILHÕES
   Estética Ultra-Premium: Obsidian Dark, Glassmorphism, Gradientes e Micro-Animações
   ========================================================================== */

:root {
  --bg-base: #07090e;
  --bg-surface: #0e131f;
  --bg-card: rgba(18, 25, 40, 0.75);
  --bg-card-hover: rgba(25, 35, 56, 0.85);
  --bg-input: #0b0f19;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: #10b981;
  --border-active: rgba(99, 102, 241, 0.5);

  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-indigo: #6366f1;
  --accent-indigo-glow: rgba(99, 102, 241, 0.25);
  --accent-purple: #8b5cf6;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px -5px var(--accent-emerald-glow);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(16, 185, 129, 0.1) 0%, transparent 45%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ==========================================================================
   TOPBAR & HEADER
   ========================================================================== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(14, 19, 31, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-badge {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-emerald));
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.3rem;
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.project-name-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  width: 220px;
  transition: var(--transition);
}

.project-name-input:focus {
  outline: none;
  border-color: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald-glow);
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 600;
  transition: var(--transition);
}

.status-pill.saving {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.3);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-emerald-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-emerald-glow);
}

.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ai {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-indigo-glow);
}

.btn-ai:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-indigo-glow);
}

/* ==========================================================================
   WIZARD STEPS BAR
   ========================================================================== */
.steps-nav {
  display: flex;
  background: rgba(10, 14, 23, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  padding: 0.5rem 2rem;
  gap: 0.5rem;
  scrollbar-width: none;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  border: 1px solid transparent;
}

.step-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.step-item.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
}

.step-item.completed {
  color: var(--accent-emerald);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
}

.step-item.active .step-number {
  background: var(--accent-indigo);
  color: #fff;
}

.step-item.completed .step-number {
  background: var(--accent-emerald);
  color: #000;
  font-weight: 800;
}

/* ==========================================================================
   MAIN WORKSPACE
   ========================================================================== */
.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  gap: 2rem;
}

.step-panel {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.step-panel.active {
  display: block;
}

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

.panel-header {
  margin-bottom: 2rem;
}

.panel-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.6rem;
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.panel-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 0.3rem;
}

/* ==========================================================================
   CARDS & FORM GRIDS
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-tip {
  font-size: 0.75rem;
  color: var(--accent-emerald);
  cursor: pointer;
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 0.75rem 1rem;
  font-family: var(--font-main);
  font-size: 0.92rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 12px var(--accent-emerald-glow);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

select.form-control {
  cursor: pointer;
}

/* ==========================================================================
   2026 SOCIAL MEDIA & SCRIPT PREVIEWS
   ========================================================================== */
.preview-box {
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-top: 1rem;
  font-family: 'JetBrains Mono', monospace, sans-serif;
  font-size: 0.85rem;
  color: #cbd5e1;
  position: relative;
  white-space: pre-wrap;
  max-height: 380px;
  overflow-y: auto;
}

.preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.badge-2026 {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(16, 185, 129, 0.2));
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ==========================================================================
   MODALS & DRAWER (CONFIG & AI)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 550px;
  width: 90%;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
  transform: scale(0.95);
  transition: var(--transition);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: #fff;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.close-btn:hover {
  color: #fff;
}

/* Header Step Help Buttons */
.panel-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-step-help {
  font-size: 0.84rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: subtleGlow 3s infinite ease-in-out;
}

@keyframes subtleGlow {
  0%, 100% { box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25); }
  50% { box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4); }
}

/* AI Copilot Backdrop Overlay */
.ai-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  z-index: 490;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.ai-drawer-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

/* AI Copilot Drawer */
.ai-drawer {
  position: fixed;
  top: 0;
  right: -480px;
  width: 450px;
  height: 100vh;
  height: 100dvh;
  background: #090d16;
  border-left: 1px solid var(--border-subtle);
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.85);
  z-index: 500;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-drawer.active {
  right: 0;
}

.drawer-header {
  padding: 1rem 1.25rem;
  background: rgba(14, 19, 31, 0.96);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.ai-header-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.ai-avatar-badge {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}

.online-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-emerald);
  border: 2px solid #090d16;
  box-shadow: 0 0 8px var(--accent-emerald);
}

.ai-header-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ai-header-title {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-step-badge {
  font-size: 0.75rem;
  color: var(--accent-emerald);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-memory-badge {
  font-size: 0.7rem;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.ai-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.15rem;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Barra de Sugestões Rápidas */
.chat-suggestions-container {
  background: rgba(11, 15, 25, 0.98);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.65rem 1rem;
}

.chat-suggestions-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.45rem;
  font-weight: 700;
}

.chat-suggestions-bar {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.2rem;
  -webkit-overflow-scrolling: touch;
}

.chat-suggestions-bar::-webkit-scrollbar {
  display: none;
}

.suggestion-chip {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.32);
  color: #c7d2fe;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.suggestion-chip:hover,
.suggestion-chip:active {
  background: var(--accent-indigo);
  color: #fff;
  border-color: var(--accent-indigo);
  transform: translateY(-1px);
}

/* Histórico de Chat */
.chat-history {
  flex: 1;
  padding: 1.25rem 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  background: radial-gradient(circle at 50% 15%, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
}

.chat-bubble {
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.55;
  max-width: 90%;
  word-break: break-word;
  position: relative;
}

.chat-bubble.ai {
  background: rgba(18, 25, 40, 0.92);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #e2e8f0;
  align-self: flex-start;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.chat-bubble.user {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.3));
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #f8fafc;
  align-self: flex-end;
}

.chat-bubble strong {
  color: #fff;
  font-weight: 700;
}

.chat-bubble-actions {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.4rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-bubble-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 0.74rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-bubble-action:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Indicador de Gravação de Voz */
.voice-recording-status {
  background: rgba(239, 68, 68, 0.14);
  border-top: 1px solid rgba(239, 68, 68, 0.35);
  border-bottom: 1px solid rgba(239, 68, 68, 0.35);
  padding: 0.65rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.84rem;
  color: #fca5a5;
  font-weight: 600;
  animation: pulseBanner 2s infinite ease-in-out;
}

@keyframes pulseBanner {
  0%, 100% { background: rgba(239, 68, 68, 0.14); }
  50% { background: rgba(239, 68, 68, 0.25); }
}

.pulse-red {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 12px #ef4444;
  animation: blinkRed 1s infinite;
  flex-shrink: 0;
}

@keyframes blinkRed {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.btn-voice-cancel {
  background: rgba(239, 68, 68, 0.3);
  border: 1px solid #ef4444;
  color: #fff;
  font-size: 0.74rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* Área de Entrada com Microfone */
.chat-input-area {
  padding: 0.85rem 1rem;
  background: rgba(14, 19, 31, 0.98);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-voice {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-voice:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-voice.recording {
  background: #ef4444 !important;
  border-color: #f87171 !important;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.75) !important;
  animation: pulseMic 1.2s infinite;
}

@keyframes pulseMic {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.chat-input {
  flex: 1;
  border-radius: var(--radius-full);
  padding: 0.65rem 1.1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 16px;
}

.chat-input:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 12px var(--accent-indigo-glow);
}

.btn-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

/* ==========================================================================
   BOTTOM CONTROLS / WIZARD FOOTER
   ========================================================================== */
.wizard-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   TOAST NOTIFICATIONS (NON-BLOCKING)
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: rgba(14, 19, 31, 0.95);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0.85rem 1.3rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: all;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.toast.info {
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.toast.warning {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

/* ==========================================================================
   CENTRAL DE PASTAS & PROJETOS
   ========================================================================== */
.projects-modal-card {
  max-width: 850px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.projects-search-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.projects-list-container {
  overflow-y: auto;
  max-height: 55vh;
  padding-right: 0.5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.project-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.project-item-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.project-item-card.current-active {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 15px var(--accent-emerald-glow);
}

.project-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.6rem;
}

.project-item-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.project-item-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.project-item-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.project-item-actions {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.btn-xs {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   MOBILE & RESPONSIVE DESIGN (VERSÃO PARA SMARTPHONES & TABLETS)
   ========================================================================== */

/* Floating Action Button para Mobile (Copilot IA) */
.mobile-fab-ai {
  display: none;
  position: fixed;
  bottom: 5.25rem;
  right: 1.25rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.25);
  font-size: 1.6rem;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
  cursor: pointer;
  z-index: 450;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-fab-ai:active {
  transform: scale(0.92);
}

@media (max-width: 992px) {
  .topbar {
    padding: 0.85rem 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .brand-title {
    font-size: 1.1rem;
  }

  .brand-subtitle {
    display: none;
  }

  .project-controls {
    order: 3;
    width: 100%;
    justify-content: space-between;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .top-actions {
    order: 2;
    margin-left: auto;
    gap: 0.5rem;
  }

  .main-layout {
    padding: 1.5rem 1rem;
    gap: 1.5rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-fab-ai {
    display: flex;
  }

  .topbar {
    padding: 0.75rem 1rem;
  }

  .logo-badge {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    border-radius: var(--radius-sm);
  }

  .top-actions .btn-secondary#btnLoadDemo,
  .top-actions .btn-secondary#btnSettings {
    padding: 0.45rem 0.65rem;
    font-size: 0.78rem;
  }

  .top-actions .btn-ai {
    display: none; /* Substituído pelo Mobile FAB na tela */
  }

  .steps-nav {
    padding: 0.5rem 0.75rem;
    gap: 0.4rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .step-item {
    padding: 0.55rem 0.85rem;
    font-size: 0.8rem;
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  .panel-title {
    font-size: 1.35rem;
    line-height: 1.25;
  }

  .panel-desc {
    font-size: 0.88rem;
  }

  .card {
    padding: 1.15rem;
  }

  /* Previne zoom no iOS ao focar em inputs (min-size 16px) */
  .form-control,
  input[type="text"],
  input[type="url"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }

  .panel-header-content {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .btn-step-help {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
    font-size: 0.86rem;
  }

  /* AI Copilot Drawer no mobile (Full Screen App Experience) */
  .ai-drawer {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    right: -100vw;
    border-left: none;
    border-radius: 0;
    box-shadow: none;
    z-index: 1000;
  }

  .ai-drawer.active {
    right: 0;
  }

  .drawer-header {
    padding: 0.85rem 1rem;
  }

  .chat-input-area {
    padding: 0.65rem 0.85rem;
    padding-bottom: max(0.85rem, env(safe-area-inset-bottom, 12px));
  }

  /* Modais em tela cheia / adaptados para toque */
  .modal-card {
    max-width: 95vw;
    width: 95vw;
    padding: 1.25rem;
    max-height: 92vh;
    border-radius: var(--radius-md);
  }

  .projects-modal-card {
    width: 96vw;
    max-height: 92vh;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  /* Rodapé com botões de avançar e voltar acessíveis para o polegar */
  .wizard-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(7, 9, 14, 0.94);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.85rem 1rem;
    margin: 1.5rem -1rem -1rem -1rem;
    z-index: 90;
    box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.6);
    display: flex;
    gap: 0.5rem;
  }

  .wizard-footer .btn {
    flex: 1;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }

  /* Linhas de input com botão */
  .input-action-row {
    flex-direction: column !important;
  }

  .input-action-row .btn {
    width: 100%;
    justify-content: center;
  }

  /* Abas do Estúdio de Conteúdo */
  .content-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .content-tab-btn {
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
  }

  /* Métricas do Painel Executivo */
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 4.5rem;
  }

  .toast {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .brand-title {
    font-size: 0.95rem;
  }

  #currentProjectBadge {
    max-width: 125px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: bottom;
  }

  .status-pill {
    padding: 0.3rem 0.5rem;
    font-size: 0.72rem;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }
}



