/* ECP Shared UI Components */

:root {
    --ecp-primary: #0066cc;
    --ecp-success: #28a745;
    --ecp-danger: #dc3545;
    --ecp-warning: #ffc107;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 4px;
    background: var(--accent-light);
    color: var(--text-color);
}

.badge.active {
    background: var(--ecp-success);
    color: white;
}

.badge.inactive {
    background: var(--ecp-danger);
    color: white;
}

.badge.user {
    background: #007bff;
    color: white;
}

.badge.actor {
    background: #6f42c1;
    color: white;
}

.badge.device {
    background: #fd7e14;
    color: white;
}

.badge.organization {
    background: #20c997;
    color: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

table th {
    background: var(--accent-light);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

table tr:hover {
    background: var(--accent-light);
}

[data-theme="dark"] table th {
    background: #2a2a2a;
}

[data-theme="dark"] table tr:hover {
    background: #2a2a2a;
}

/* Filter Controls */
.filter-controls {
    background: var(--accent-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

[data-theme="dark"] .filter-controls {
    background: #2a2a2a;
    border-color: #444;
}

.filter-controls h3 {
    margin: 0;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.filter-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: var(--ecp-primary);
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

.filter-badge.active {
    background: var(--ecp-success);
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

[data-theme="dark"] .filter-btn {
    background: #333;
    border-color: #555;
    color: #ddd;
}

.filter-btn:hover {
    background: var(--ecp-primary);
    color: white;
    border-color: var(--ecp-primary);
}

.filter-btn.active {
    background: var(--ecp-success);
    color: white;
    border-color: var(--ecp-success);
}

.filter-stats {
    margin-left: auto;
    font-size: 0.9rem;
    color: var(--text-light);
}

[data-theme="dark"] .filter-stats {
    color: #999;
}
