.rules-page {
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.rules-panel, .fires-panel {
  background: var(--rot-900);
  border: 1px solid var(--rot-700);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.rules-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--rot-850);
  border-bottom: 1px solid var(--rot-700);
}
.rules-panel-head h2 { margin: 0; font-size: 16px; }
.fires-filters { display: flex; gap: 0.5rem; }

.rules-table, .fires-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rules-table th, .rules-table td, .fires-table th, .fires-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rot-800);
  text-align: left;
}
.rules-table thead th, .fires-table thead th {
  background: var(--rot-850);
  font-weight: 600;
  color: var(--rot-200);
}
.row-actions { white-space: nowrap; }
.row-actions button { margin-right: 0.25rem; }

.rule-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.rule-modal-content {
  background: var(--rot-900);
  border: 1px solid var(--rot-700);
  border-radius: 8px;
  padding: 1.25rem;
  width: 480px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem;
}
.modal-close {
  background: none; border: none; color: var(--rot-300);
  font-size: 22px; cursor: pointer; line-height: 1;
}
.rule-form label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 13px;
  color: var(--rot-200);
}
.rule-form input[type="text"], .rule-form input[type="number"], .rule-form input[type="url"], .rule-form select {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.4rem 0.6rem;
  background: var(--rot-850);
  border: 1px solid var(--rot-700);
  border-radius: 4px;
  color: var(--rot-50, var(--rot-100));
  font-size: 13px;
  font-family: var(--font);
}
.checkbox-row { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-row input { width: auto; margin-top: 0; }

.form-error {
  background: rgba(237, 66, 69, 0.15);
  border: 1px solid var(--rot-700);
  color: #ED4245;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 0.75rem;
}
.form-actions {
  display: flex; justify-content: flex-end; gap: 0.5rem;
}
.btn-primary {
  background: #5865F2;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font);
}
.btn-primary:hover { background: #4752c4; }
.btn-danger { color: #ED4245; }
.badge-red { border-color: var(--rot-red); color: var(--rot-red); background: rgba(237,66,69,0.07); }
.muted { color: var(--rot-400); font-size: 12px; }

/* fires-filters selects */
.fires-filters select {
  background: var(--rot-850);
  border: 1px solid var(--rot-700);
  border-radius: 4px;
  color: var(--rot-200);
  padding: 0.3rem 0.5rem;
  font-size: 12px;
  font-family: var(--font);
}
