.config-content {
    max-width: 800px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg, #fff);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.config-card h2,
.rules-card h2 {
    margin-bottom: 16px;
    font-size: 1.25rem;
    color: var(--text-color, #333);
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
}

.hint {
    font-size: 0.85rem;
    color: #666;
    margin-top: 6px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.rules-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rule-item {
    background: var(--bg-color, #f9f9f9);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rule-info h3 {
    margin: 0 0 4px 0;
    font-size: 1rem;
}

.rule-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.rule-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: #e0e0e0;
    color: #333;
    margin-right: 6px;
}

.rule-tag.sender {
    background: #e3f2fd;
    color: #1976d2;
}

.rule-tag.subject {
    background: #e8f5e9;
    color: #2e7d32;
}

.rule-tag.all {
    background: #fff3e0;
    color: #ef6c00;
}

.status-badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-badge.active {
    background: #4caf50;
}

.status-badge.inactive {
    background: #ccc;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}