/* ============================================================
   ZAPZIA — Global CSS
   Cores base: #7C3AED (roxo) → #2563EB (azul)
   ============================================================ */

/* Scrollbar personalizada */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #111827; }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #4B5563; }

/* Gradiente padrão Zapzia */
.bg-zapzia { background: linear-gradient(135deg, #7C3AED, #2563EB); }
.text-zapzia { background: linear-gradient(135deg, #7C3AED, #2563EB); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.border-zapzia { border-image: linear-gradient(135deg, #7C3AED, #2563EB) 1; }

/* Botão primário */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #7C3AED, #2563EB);
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    text-decoration: none;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

/* Botão outline */
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #a78bfa;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: 0.75rem;
    border: 1px solid #7C3AED;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-outline:hover { background: rgba(124,58,237,0.1); }

/* Cards */
.card {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 1rem;
    padding: 1.5rem;
}
.card-hover { transition: border-color 0.2s, transform 0.2s; }
.card-hover:hover { border-color: #7C3AED; transform: translateY(-2px); }

/* Inputs */
.input {
    width: 100%;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.625rem;
    padding: 0.75rem 1rem;
    color: #f9fafb;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}
.input:focus { border-color: #7C3AED; }
.input::placeholder { color: #6b7280; }

/* Labels */
.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.375rem;
}

/* Badge de status */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
}
.badge-green  { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-yellow { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-red    { background: rgba(239,68,68,0.15);  color: #f87171; }
.badge-purple { background: rgba(124,58,237,0.15); color: #a78bfa; }
.badge-blue   { background: rgba(37,99,235,0.15);  color: #60a5fa; }
.badge-gray   { background: rgba(107,114,128,0.15); color: #9ca3af; }

/* Toggle IA/Humano */
.toggle-wrap { display: flex; align-items: center; gap: 0.75rem; }
.toggle {
    position: relative;
    width: 48px;
    height: 26px;
    background: #374151;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s;
}
.toggle.on { background: linear-gradient(135deg, #7C3AED, #2563EB); }
.toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.toggle.on::after { transform: translateX(22px); }

/* Sidebar do painel */
.sidebar {
    width: 240px;
    min-height: 100vh;
    background: #0d1117;
    border-right: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    gap: 0.25rem;
    flex-shrink: 0;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.625rem;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}
.sidebar-link:hover { background: #1f2937; color: #f9fafb; }
.sidebar-link.active { background: rgba(124,58,237,0.15); color: #a78bfa; }

/* Chat — fila lateral */
.chat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #1f2937;
    transition: background 0.15s;
}
.chat-item:hover { background: #1f2937; }
.chat-item.active { background: rgba(124,58,237,0.1); border-left: 2px solid #7C3AED; }

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7C3AED, #2563EB);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: #fff;
    flex-shrink: 0;
}

/* Bolha de mensagem */
.bubble {
    max-width: 72%;
    padding: 0.625rem 0.875rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    word-break: break-word;
}
.bubble-in  { background: #1f2937; color: #f9fafb; border-bottom-left-radius: 0.25rem; }
.bubble-out { background: linear-gradient(135deg, #7C3AED, #2563EB); color: #fff; border-bottom-right-radius: 0.25rem; }
.bubble-ia  { background: rgba(124,58,237,0.2); color: #e9d5ff; border: 1px solid rgba(124,58,237,0.3); border-bottom-left-radius: 0.25rem; }
.bubble-note { background: rgba(245,158,11,0.1); color: #fcd34d; border: 1px dashed rgba(245,158,11,0.3); font-style: italic; }

/* Kanban */
.kanban-col {
    min-width: 260px;
    max-width: 260px;
    background: #111827;
    border-radius: 0.875rem;
    border: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}
.kanban-card {
    background: #1a2233;
    border: 1px solid #1f2937;
    border-radius: 0.625rem;
    padding: 0.875rem;
    cursor: grab;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.kanban-card:hover { border-color: #7C3AED; box-shadow: 0 4px 12px rgba(124,58,237,0.15); }
.kanban-card.dragging { opacity: 0.5; }

/* Animações */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease forwards; }

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(124,58,237,0); }
}
.pulse-glow { animation: pulse-glow 2s infinite; }

/* Responsivo básico */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .bubble { max-width: 90%; }
}
