/* --- Componentes de Autenticação --- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
}

.auth-card {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 440px;
    animation: slideUp 0.5s ease;
}

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

.auth-title { font-size: 2.5rem; font-weight: 700; color: #6366F1; text-align: center; margin-bottom: 0.5rem; }
.auth-subtitle {
    text-align: center;
    color: #64748B;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: -0.01em; /* Toque moderno */
}
.auth-form h2 { font-size: 1.5rem; margin-bottom: 1.5rem; color: #1E293B; }
.auth-form input { width: 100%; padding: 0.875rem; margin-bottom: 1rem; border: 2px solid #E2E8F0; border-radius: 8px; font-size: 1rem; transition: all 0.3s ease; }
.auth-form input:focus { outline: none; border-color: #6366F1; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); }
.auth-switch { text-align: center; margin-top: 1.5rem; color: #64748B; }
.auth-switch a { color: #6366F1; text-decoration: none; font-weight: 600; }

/* --- Componentes da Sidebar --- */
.sidebar-header { padding: 2rem 1.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.sidebar-header h1 { font-size: 1.75rem; color: #6366F1; margin-bottom: 0.25rem; }
.sidebar-header p { font-size: 0.875rem; color: #94A3B8; }
.sidebar-nav { flex: 1; padding: 1rem 0; }
.nav-item { display: flex; align-items: center; padding: 0.875rem 1.5rem; color: #94A3B8; text-decoration: none; transition: all 0.3s ease; border-left: 3px solid transparent; }
.nav-item span { font-size: 1.25rem; margin-right: 0.75rem; }
.nav-item:hover { background: rgba(99, 102, 241, 0.1); color: white; }
.nav-item.active { background: rgba(99, 102, 241, 0.15); color: white; border-left-color: #6366F1; }
.sidebar-footer { padding: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.sidebar-footer .user-info { display: flex; flex-direction: column; align-items: center; text-align: center; }
#user-name-link { color: #f1f5f9; text-decoration: none; font-weight: 500; margin-bottom: 12px; padding: 4px 8px; border-radius: 6px; transition: background-color 0.2s ease; }
#user-name-link:hover { background-color: rgba(255, 255, 255, 0.1); }
.user-avatar-sidebar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid #e2e8f0; margin-bottom: 8px; }

/* --- Componentes do Dashboard (Cards) --- */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 1.5rem; }
@media (max-width: 768px) { .dashboard-grid { grid-template-columns: 1fr; } }
.insight-card { background: white; padding: 1.5rem; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transition: all 0.3s ease; animation: fadeIn 0.5s ease; }
.insight-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.insight-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 1rem; }
.employee-info h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.25rem; }
.employee-info p { font-size: 0.875rem; color: #64748B; }
.feedback-date { font-size: 0.75rem; color: #94A3B8; }
.insight-section { margin-bottom: 1.25rem; }
.insight-section h4 { font-size: 0.875rem; font-weight: 600; color: #64748B; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; }
.insight-list { list-style: none; padding: 0; }
.insight-list li { padding: 0.5rem 0; border-bottom: 1px solid #F1F5F9; }
.insight-list li:last-child { border-bottom: none; }
.feedback-summary { background: #F8FAFC; padding: 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.875rem; line-height: 1.6; color: #475569; }
.risk-badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.risk-baixo, .risk-low { background: #D1FAE5; color: #065F46; }
.risk-medio, .risk-medium { background: #FEF3C7; color: #92400E; }
.risk-alto, .risk-high { background: #FEE2E2; color: #991B1B; }
.action-badge { display: inline-block; padding: 0.25rem 0.5rem; background: #E0E7FF; color: #4338CA; border-radius: 4px; font-size: 0.75rem; font-weight: 500; margin-right: 0.5rem; margin-bottom: 0.5rem; }
.card-expanded { margin-top: 1rem; display: none; animation: fadeIn 0.3s ease; }
.card-expanded.show { display: block; }
.expand-btn { display: inline-flex; align-items: center; gap: 0.5rem; color: #6366F1; font-size: 0.875rem; font-weight: 600; cursor: pointer; margin-top: 1rem; transition: color 0.3s ease; }
.expand-btn:hover { color: #4F46E5; }
.expand-btn svg { width: 1rem; height: 1rem; transition: transform 0.3s ease; }
.expand-btn.expanded svg { transform: rotate(180deg); }

/* --- Componentes de Tabela --- */
.meetings-table { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
.meetings-table table { width: 100%; border-collapse: collapse; }
.meetings-table th { background: #F8FAFC; padding: 1rem; text-align: left; font-weight: 600; color: #475569; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; }
.meetings-table td { padding: 1rem; border-top: 1px solid #F1F5F9; }
.meetings-table .summary-preview { max-width: 400px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #64748B; }
.action-buttons { display: flex; gap: 0.5rem; }
.btn-small { padding: 0.375rem 0.75rem; font-size: 0.875rem; border: none; border-radius: 6px; cursor: pointer; transition: all 0.3s ease; }
.btn-view { background: #E0E7FF; color: #4338CA; }
.btn-view:hover { background: #C7D2FE; }
.btn-edit { background: #D1FAE5; color: #047857; }
.btn-edit:hover { background: #A7F3D0; }
.btn-delete { background: #FEE2E2; color: #DC2626; }
.btn-delete:hover { background: #FECACA; }

/* --- Componente de Formulário de Feedback/Conta --- */
.feedback-form-container { background: white; padding: 2rem; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); max-width: 800px; }

/* --- Componentes de Modal --- */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); animation: fadeIn 0.3s ease; align-items: center; justify-content: center; }
.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideUp 0.3s ease;

    /* --- FIX: Limita altura e habilita scroll interno --- */
    max-height: 80vh;       /* Limita a altura a 80% da viewport */
    overflow-y: auto;       /* Habilita scroll se o conteúdo for maior */
    display: flex;
    flex-direction: column;
}
.close { position: absolute; right: 1.5rem; top: 1.5rem; font-size: 2rem; font-weight: 300; color: #94A3B8; cursor: pointer; transition: color 0.3s ease; }
.close:hover { color: #1E293B; }
.modal-details p { margin-bottom: 0.5rem; }
.modal-details strong { color: #475569; }
.modal-details .transcription { background-color: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 1rem; margin-top: 1rem; max-height: 200px; overflow-y: auto; white-space: pre-wrap; font-size: 0.875rem; color: #64748B; }


/* --- Componentes de Notificação (Toast) --- */
.toast-container { position: fixed; top: 2rem; right: 2rem; z-index: 10000; display: flex; flex-direction: column; gap: 1rem; }
.toast { background: white; padding: 1rem 1.5rem; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); display: flex; align-items: center; gap: 1rem; min-width: 300px; max-width: 400px; animation: slideInRight 0.3s ease; border-left: 4px solid #6366F1; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
.toast.success { border-left-color: #10B981; }
.toast.error { border-left-color: #EF4444; }
.toast.warning { border-left-color: #F59E0B; }
.toast-icon { font-size: 1.5rem; flex-shrink: 0; }
.toast.success .toast-icon { color: #10B981; }
.toast.error .toast-icon { color: #EF4444; }
.toast.warning .toast-icon { color: #F59E0B; }
.toast-content { flex: 1; }
.toast-title { font-weight: 600; margin-bottom: 0.25rem; color: #1E293B; }
.toast-message { font-size: 0.875rem; color: #64748B; }
.toast-close { cursor: pointer; color: #94A3B8; font-size: 1.25rem; transition: color 0.3s ease; }
.toast-close:hover { color: #1E293B; }
@media (max-width: 768px) { .toast-container { left: 1rem; right: 1rem; } .toast { min-width: auto; max-width: 100%; } }

/* --- Componentes de Avatar e Foto --- */
.photo-upload-container { display: flex; flex-direction: column; gap: 1rem; }
.photo-preview { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid #6366F1; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2); }
.user-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid #E2E8F0; }
.user-avatar-placeholder { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #6366F1, #4F46E5); display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 1.25rem; }

/* --- Componentes de Loading (Skeleton) --- */
.skeleton-card { background: white; border-radius: 12px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.skeleton-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.skeleton-text { flex: 1; }
.skeleton-line { height: 16px; background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; margin-bottom: 0.5rem; }
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-line.long { width: 100%; }
.skeleton-content { display: flex; flex-direction: column; gap: 0.75rem; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* --- Componentes de Chat --- */
.chat-widget { position: fixed; bottom: 2rem; right: 2rem; z-index: 9999; }
.chat-button { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #6366F1, #4F46E5); border: none; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4); transition: all 0.3s ease; }
.chat-button:hover { transform: scale(1.1); box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5); }
.chat-window { position: absolute; bottom: 80px; right: 0; width: 380px; height: 500px; background: white; border-radius: 12px; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2); display: flex; flex-direction: column; animation: slideUp 0.3s ease; }
@media (max-width: 768px) { .chat-window { width: calc(100vw - 2rem); max-width: 380px; } }
.chat-header { background: linear-gradient(135deg, #6366F1, #4F46E5); color: white; padding: 1rem 1.5rem; border-radius: 12px 12px 0 0; display: flex; justify-content: space-between; align-items: center; }
.chat-header h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.chat-close { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; padding: 0; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: background 0.3s ease; }
.chat-close:hover { background: rgba(255, 255, 255, 0.2); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.chat-message { max-width: 85%; padding: 0.75rem 1rem; border-radius: 12px; line-height: 1.5; font-size: 0.875rem; }
.bot-message { background: #F1F5F9; color: #1E293B; align-self: flex-start; }
.bot-message ul { margin: 0.5rem 0 0 0; padding-left: 1.5rem; }
.bot-message li { margin: 0.25rem 0; }
.user-message { background: #6366F1; color: white; align-self: flex-end; }
.chat-input-container { display: flex; gap: 0.5rem; padding: 1rem; border-top: 1px solid #E2E8F0; }
#chat-input { flex: 1; padding: 0.75rem; border: 1px solid #E2E8F0; border-radius: 8px; font-size: 0.875rem; font-family: 'Inter', sans-serif; }
#chat-input:focus { outline: none; border-color: #6366F1; }
.chat-send-btn { padding: 0.75rem 1.25rem; background: #6366F1; color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: background 0.3s ease; }
.chat-send-btn:hover { background: #4F46E5; }
.chat-typing { display: flex; gap: 0.25rem; padding: 0.75rem 1rem; }
.chat-typing span { width: 8px; height: 8px; background: #94A3B8; border-radius: 50%; animation: typing 1.4s infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-10px); } }

/* --- NOVO: Componente Autocomplete / Token Input --- */
.autocomplete-wrapper {
  position: relative; /* garante que a lista será posicionada dentro deste container */
  width: 100%;
}

.autocomplete-list {
  position: absolute;
  top: 100%; /* aparece logo abaixo do input */
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
  width: 100%; /* limita à largura do campo */
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: #1E293B;
  transition: background 0.2s ease;
}

.autocomplete-item:hover {
  background: #F1F5F9;
}

.autocomplete-item strong {
  color: #6366F1;
}

.autocomplete-list:empty {
  display: none;
}

.autocomplete-container {
    position: relative;
    width: 100%;
    background-color: white;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    padding: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}
.autocomplete-container:focus-within {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.autocomplete-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    min-width: 150px;
}
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1001; /* Acima dos modals */
    margin-top: 0.5rem;
}
.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.suggestion-item:hover, .suggestion-item.highlighted {
    background-color: #F1F5F9;
}
.suggestion-item small {
    color: #64748B;
    margin-left: 0.5rem;
}
.token {
    display: inline-flex;
    align-items: center;
    background-color: #E0E7FF;
    color: #4338CA;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}
.token-remove {
    margin-left: 0.5rem;
    cursor: pointer;
    font-weight: bold;
    color: #4338CA;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.token-remove:hover {
    opacity: 1;
}
.hidden-input {
    display: none;
}

/* --- Componente de Notificações --- */
.notifications-wrapper {
    position: relative;
    margin-left: auto; 
}
.notification-bell {
    font-size: 1.5rem;
    color: #94A3B8;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0.5rem; /* Aumenta a área de clique */
}
.notification-bell:hover {
    color: white;
}
.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #EF4444;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid #1E293B;
    pointer-events: none; /* Para não interferir no clique do sino */
}
.notifications-panel {
    display: none;
    position: fixed;
    width: 380px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    z-index: 1100; /* ✅ CORREÇÃO: Z-index aumentado para ficar acima da sidebar */
    animation: fadeIn 0.3s ease;
    color: #1E293B;
    animation: slideDown 0.2s ease-out;
      transition: opacity 0.2s ease;
}
.notifications-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #F1F5F9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notifications-header h3 {
    font-size: 1.125rem;
    margin: 0;
}
.notifications-body {
    max-height: 400px; /* ✅ A altura máxima garante a barra de rolagem */
    overflow-y: auto;
}
.notification-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #F1F5F9;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.notification-item:hover {
    background-color: #F8FAFC;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item.unread {
    background-color: #F0F5FF;
    border-left: 3px solid #6366F1;
}
.notification-item p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: #475569;
}
.notification-item small {
    font-size: 0.75rem;
    color: #94A3B8;
}
.no-notifications {
    padding: 2rem;
    text-align: center;
    color: #94A3B8;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* --- NOVO: Componente Toggle Switch (Estilo iOS) --- */
.toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;       /* Espaçamento maior do conteúdo */
    padding-top: 1rem;
    border-top: 1px solid #F1F5F9;
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #CBD5E1; /* Cinza inativo */
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: #6366F1; /* Cor primária do Cortex */
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* --- Estilos para Notificações de IA --- */
.ai-notification-icon {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* Badges de Severidade */
.badge-severity {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 0.5rem;
}
.severity-ALTA { background-color: #FEE2E2; color: #DC2626; border: 1px solid #FECACA; }
.severity-MEDIA { background-color: #FEF3C7; color: #D97706; border: 1px solid #FDE68A; }

/* Tags de Tipo */
.badge-type {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    background-color: #E2E8F0;
    color: #475569;
    margin-bottom: 0.5rem;
}

/* Caixa de Solução */
.solution-box {
    background: #F0FDF4; /* Verde bem claro */
    border-left: 4px solid #10B981;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin-top: 1.5rem;
}
.solution-title {
    color: #047857;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* --- Cards da Staff Digital --- */
.agent-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.agent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.15);
    border-color: #6366F1;
}

.agent-avatar-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
}

/* Efeito de "Respiro/Pulso" para indicar vida */
.status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    background: #10B981;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 2s infinite;
}

.agent-inactive .status-indicator {
    background: #94A3B8;
    animation: none;
    box-shadow: none;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Estilos dinâmicos de avatar */
.style-blue { background: #E0E7FF; color: #4338CA; }
.style-purple { background: #F3E8FF; color: #7E22CE; }
.style-green { background: #DCFCE7; color: #15803D; }
.style-orange { background: #FFEDD5; color: #C2410C; }
.style-pink { background: #FCE7F3; color: #BE185D; }

.agent-name { font-size: 1.25rem; font-weight: 700; color: #1E293B; margin-bottom: 0.25rem; }
.agent-role { font-size: 0.875rem; font-weight: 600; color: #6366F1; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.agent-last-seen { font-size: 0.75rem; color: #94A3B8; margin-top: auto; padding-top: 1rem; border-top: 1px solid #F1F5F9; width: 100%; }
.activity-badge {
    background: #F1F5F9; color: #475569; padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; margin-bottom: 1rem;
}

/* --- Agent Drawer (Slide-over) --- */
.agent-drawer {
    position: fixed;
    top: 0;
    right: -600px; /* Escondido à direita */
    width: 500px;
    height: 100vh;
    background: #FFFFFF;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Animação suave "Spring" */
    display: flex;
    flex-direction: column;
}

.agent-drawer.open {
    right: 0;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.drawer-header {
    padding: 2rem;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-agent-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.drawer-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #E0E7FF;
    color: #4338CA;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.drawer-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #94A3B8;
    cursor: pointer;
    line-height: 1;
}

.drawer-close:hover { color: #1E293B; }

/* Filtros */
.drawer-filters {
    padding: 1rem 2rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid #F1F5F9;
    overflow-x: auto;
}

.filter-chip {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #E2E8F0;
    background: white;
    color: #64748B;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-chip:hover { background: #F1F5F9; }
.filter-chip.active {
    background: #4F46E5;
    color: white;
    border-color: #4F46E5;
}

/* Lista de Insights */
.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: #fff;
}

.timeline-insight {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 2rem;
    border-left: 2px solid #E2E8F0;
}

.timeline-insight:last-child { border-left-color: transparent; }

.timeline-dot {
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #CBD5E1;
    border: 2px solid white;
}

.timeline-insight.severity-ALTA .timeline-dot { background: #EF4444; }
.timeline-insight.severity-MEDIA .timeline-dot { background: #F59E0B; }

.insight-detail-card {
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 1.25rem;
    transition: transform 0.2s ease;
}

.insight-detail-card:hover {
    border-color: #6366F1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.insight-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: #94A3B8;
    text-transform: uppercase;
    font-weight: 600;
}

@media (max-width: 768px) {
    .agent-drawer { width: 100%; right: -100%; }
}

.btn-icon-small {
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}
.btn-icon-small:hover {
    background: #FEE2E2;
    color: #DC2626;
}

/* Ajuste no Header da Staff Digital para parecer mais "VIP" */
#digital-staff-view .view-header h2 {
    background: -webkit-linear-gradient(45deg, #1E293B, #6366F1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.5rem;
}

/* --- Header VIP (Staff Digital) --- */
.vip-header-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.vip-title {
    font-size: 2rem;
    font-weight: 800; /* Extra bold para impacto */
    color: #0F172A;   /* Slate 900 - Quase preto, muito nítido */
    letter-spacing: -0.03em; /* Kerning apertado = Modernidade */
    line-height: 1;
}

.vip-badge {
    background: #EEF2FF;
    color: #4F46E5;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 12px;
    border-radius: 100px;
    border: 1px solid #C7D2FE;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.vip-badge::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: #4F46E5;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(79, 70, 229, 0.6);
}

/* --- Botões de Ação de IA (Estilo Enterprise) --- */
/* Substitui a ideia do 'magic'. Mais limpo, profissional e distinto. */
.btn-ai-action {
    background-color: #FFFFFF;
    color: #4338CA; /* Indigo Escuro */
    border: 1px solid #E0E7FF;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-ai-action:hover {
    background-color: #F5F3FF; /* Roxo muito pálido */
    border-color: #8B5CF6;
    color: #7C3AED;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-ai-action svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.btn-ai-action:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: #F1F5F9;
    color: #94A3B8;
    border-color: #E2E8F0;
    transform: none;
    box-shadow: none;
}

/* Botão Google */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: white;
    color: #374151;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 0.75rem;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem; /* Espaço antes do divisor */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-google:hover {
    background-color: #F9FAFB;
    border-color: #D1D5DB;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.google-icon {
    width: 20px;
    height: 20px;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #94A3B8;
    font-size: 0.875rem;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #E2E8F0;
}

.auth-divider span {
    padding: 0 10px;
}