:root {
    --ai-bg-color: var(--bg-light);
    --ai-surface-color: var(--bg-primary);
    --ai-border-color: var(--glass-stroke);
    --ai-primary-color: var(--primary);
    --ai-secondary-color: var(--secondary);
    --ai-text-color: var(--text-primary);
    --ai-text-muted-color: var(--text-secondary);
}

.ai-demo-body {
    background-color: var(--ai-bg-color);
    color: var(--ai-text-color);
}

.page-header h1 {
    color: var(--text-primary);
}

.page-header .lead {
    color: var(--text-secondary);
}

.widget-card {
    background-color: var(--ai-surface-color);
    border: 1px solid var(--ai-border-color);
    border-radius: var(--radius-lg);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--ai-border-color);
}

.widget-header i {
    color: var(--ai-secondary-color);
    font-size: 1.25rem;
}

.widget-header h5 {
    margin: 0;
    color: var(--ai-text-color);
    font-weight: 600;
}

.widget-body {
    padding: 1.5rem;
    flex-grow: 1;
}

/* Monitor de Listas Negras */
.blacklist-monitor {
    background-color: var(--bg-light);
    height: 300px;
    border-radius: var(--radius);
    padding: 1rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    overflow-y: auto;
    border: 1px solid var(--ai-border-color);
}

.log-line {
    margin-bottom: 0.5rem;
}

.log-line .time {
    color: var(--text-muted);
}
.log-line .level-info {
    color: var(--ai-secondary-color);
}
.log-line .level-alert {
    color: #dc3545;
    font-weight: bold;
}

/* Gestor de Evidencia */
.evidence-list {
    list-style: none;
    padding: 0;
    margin: 0;
    height: 300px;
    overflow-y: auto;
}

.evidence-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.evidence-item:hover {
    background-color: var(--bg-light);
}

.evidence-item .icon {
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* Chatbot */
.chatbot-container {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.chat-window {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: var(--bg-light);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid var(--ai-border-color);
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
}

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

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    max-width: 80%;
}

.chat-message.user .message-bubble {
    background-color: var(--ai-primary-color);
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.chat-message.bot .message-bubble {
    background-color: var(--ai-surface-color);
    border: 1px solid var(--ai-border-color);
    border-bottom-left-radius: 0.25rem;
}

.chat-input {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.chat-input button {
    background-color: var(--ai-surface-color);
    border: 1px solid var(--ai-border-color);
    color: var(--ai-text-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-input button:hover {
    background-color: var(--ai-secondary-color);
    border-color: var(--ai-secondary-color);
    color: #fff;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.modal-content {
    width: 90%;
    max-width: 600px;
    background: var(--ai-surface-color);
    border: 1px solid var(--ai-border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.hash-string {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    word-break: break-all;
    background: var(--bg-light);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--ai-border-color);
}