/* MODULE: Alerts | FILE: styles.css */
/* Styles for the alerts & anomaly detection module. */

.alerts-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  color: #e2e4ec;
}

.alerts-page__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.alerts-page__subtitle {
  color: #8b8fa3;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.alerts-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.alerts-page__scan-btn {
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 6px;
  background: #635bff;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}

.alerts-page__scan-btn:hover {
  background: #524ae0;
}

.alerts-page__scan-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.alerts-page__tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.alerts-page__tab {
  padding: 0.4rem 1rem;
  border: 1px solid #2a2f4e;
  border-radius: 6px;
  background: transparent;
  color: #8b8fa3;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}

.alerts-page__tab--active {
  background: #635bff;
  color: #fff;
  border-color: #635bff;
}

/* Alert filters */
.alert-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.alert-filters__select {
  padding: 0.4rem 0.75rem;
  border: 1px solid #2a2f4e;
  border-radius: 6px;
  background: #1e2235;
  color: #e2e4ec;
  font-size: 0.85rem;
}

/* Alert feed */
.alert-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.alert-feed__empty {
  text-align: center;
  color: #8b8fa3;
  padding: 3rem 0;
  font-size: 0.95rem;
}

/* Alert card */
.alert-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #1e2235;
  border: 1px solid #2a2f4e;
  border-radius: 8px;
  transition: border-color 0.15s;
}

.alert-card:hover {
  border-color: #3a3f5e;
}

.alert-card--resolved {
  opacity: 0.55;
}

.alert-card__severity {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
}

.alert-card__severity--critical {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.alert-card__severity--warning {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.alert-card__severity--info {
  background: #3b82f6;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
}

.alert-card__body {
  flex: 1;
  min-width: 0;
}

.alert-card__top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.alert-card__badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.alert-card__badge--critical {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.alert-card__badge--warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.alert-card__badge--info {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.alert-card__type {
  font-size: 0.75rem;
  color: #8b8fa3;
}

.alert-card__platform {
  font-size: 0.7rem;
  color: #635bff;
  background: rgba(99, 91, 255, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.alert-card__message {
  font-size: 0.88rem;
  color: #c8cbdb;
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

.alert-card__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: #6b7080;
}

.alert-card__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.alert-card__resolve-btn {
  padding: 0.35rem 0.75rem;
  border: 1px solid #2a2f4e;
  border-radius: 5px;
  background: transparent;
  color: #22c55e;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
}

.alert-card__resolve-btn:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
}

.alert-card__resolved-tag {
  font-size: 0.75rem;
  color: #6b7080;
  font-style: italic;
}

/* Alert rules panel */
.alert-rules-panel {
  margin-top: 1.5rem;
}

.alert-rules-panel__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
}

.alert-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 0.75rem;
}

.alert-rule-card {
  padding: 1rem 1.25rem;
  background: #1e2235;
  border: 1px solid #2a2f4e;
  border-radius: 8px;
}

.alert-rule-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.alert-rule-card__name {
  font-weight: 600;
  color: #e2e4ec;
  font-size: 0.9rem;
}

.alert-rule-card__enabled {
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.alert-rule-card__enabled--on {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.alert-rule-card__enabled--off {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.alert-rule-card__desc {
  font-size: 0.82rem;
  color: #8b8fa3;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.alert-rule-card__meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: #6b7080;
}

/* Loading & error */
.alerts-loading {
  text-align: center;
  color: #8b8fa3;
  padding: 2rem 0;
}

.alerts-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}
