:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --primary: #ef4444; /* Rojo para alertas */
    --primary-hover: #dc2626;
    --secondary: #3b82f6; /* Azul para consultas */
    --secondary-hover: #2563eb;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #10b981;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

.container { max-width: 1000px; margin: 0 auto; padding: 2rem; }
header { text-align: center; margin-bottom: 2rem; }
h1 { font-size: 2rem; font-weight: 700; }
h1 span { color: var(--primary); }
header p { color: var(--text-muted); }

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.card h2 { font-size: 1.25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }

.test-controls { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }

button {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

button:hover { opacity: 0.9; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background-color: var(--primary); }
.btn-secondary { background-color: var(--secondary); }
.btn-neutral { background-color: #475569; }
.btn-success { background-color: var(--success); padding: 0.5rem 1rem; font-size: 0.9rem;}

.status { padding: 0.75rem; border-radius: 8px; background-color: rgba(255, 255, 255, 0.05); font-family: monospace; }

/* Grid de Alertas */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.column-header h2 { font-size: 1.1rem; border-bottom: 2px solid var(--border); padding-bottom: 0.5rem; margin-bottom: 1rem;}

.alerts-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.alerts-list li {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    border-left: 4px solid transparent;
}

.alert-venta { border-left-color: var(--primary) !important; }
.alert-consulta { border-left-color: var(--secondary) !important; }

.alert-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.85rem; color: var(--text-muted); }
.alert-id { font-weight: 600; color: #fff; }
.alert-body { margin-bottom: 1rem; font-size: 0.95rem; }
.alert-footer { display: flex; justify-content: space-between; align-items: center; }

/* History */
.history-list li { opacity: 0.7; border-left-color: var(--success) !important; }
.acknowledged-badge { font-size: 0.85rem; color: var(--success); display: flex; align-items: center; gap: 0.5rem; }

@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}
