:root {
  --primary: #4f46e5;
  --primary-light: #6366f1;
  --primary-dark: #3730a3;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  margin: 0;
}

/* Navbar */
.navbar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
  box-shadow: 0 2px 12px rgba(79, 70, 229, 0.3);
  padding: 0.6rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.navbar-brand i {
  font-size: 1.4rem;
  margin-right: 0.3rem;
}

.nav-link {
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: background 0.2s;
}

.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.15);
}

/* Cards */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  margin-bottom: 1.25rem;
  transition: box-shadow 0.2s;
  background: var(--card-bg);
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
  border-radius: 12px 12px 0 0 !important;
  font-weight: 600;
}

.card-body {
  padding: 1.25rem;
}

/* Summary Cards */
.summary-card {
  border-radius: 16px !important;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.summary-card .card-body {
  padding: 1.5rem;
}

.summary-card h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0.5rem 0 0;
  letter-spacing: -0.03em;
}

.summary-card h6 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.summary-card.card-total {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}
.summary-card.card-total h6 { color: rgba(255,255,255,0.8); }

.summary-card.card-up {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}
.summary-card.card-up h6 { color: rgba(255,255,255,0.8); }

.summary-card.card-down {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
}
.summary-card.card-down h6 { color: rgba(255,255,255,0.8); }

.summary-card.card-uptime {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
}
.summary-card.card-uptime h6 { color: rgba(255,255,255,0.8); }

/* Status Dot */
.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}

.status-dot.up {
  background-color: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status-dot.down {
  background-color: var(--danger);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  animation: pulse 1.5s infinite;
}

.status-dot.unknown {
  background-color: var(--text-muted);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Tables */
.table {
  margin: 0;
}

.table th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  background: #fafbfc;
}

.table td {
  vertical-align: middle;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.table tbody tr {
  transition: background 0.15s;
}

.table tbody tr:hover {
  background: #f8fafc;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* Badges */
.badge {
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.badge-type {
  background: #ede9fe;
  color: #6d28d9;
}

/* Buttons */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  border-radius: 8px;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  border-radius: 8px;
  font-weight: 600;
}

.btn-outline-primary:hover, .btn-outline-primary.active {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-outline-danger {
  border-radius: 8px;
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.82rem;
  border-radius: 6px;
}

/* Form controls */
.form-control, .form-select {
  border-radius: 8px;
  border: 1.5px solid var(--border);
  padding: 0.6rem 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 0.4rem;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Incidents list */
.list-group-item {
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.25rem;
  transition: background 0.15s;
}

.list-group-item:last-child {
  border-bottom: none;
}

.list-group-item:hover {
  background: #f8fafc;
}

.incident-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Uptime colors */
.uptime-good { color: var(--success); font-weight: 700; }
.uptime-warn { color: var(--warning); font-weight: 700; }
.uptime-bad { color: var(--danger); font-weight: 700; }

/* Responsive */
@media (max-width: 768px) {
  .summary-card h2 { font-size: 1.6rem; }
  .container { padding: 0 12px; }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}
