* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --border: #2a2d3a;
  --text: #e1e4ed;
  --text-dim: #8b8fa3;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
  --yellow: #eab308;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

header h1 {
  font-size: 22px;
  font-weight: 600;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-danger  { background: var(--red); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* Cards */
.cards { display: flex; flex-direction: column; gap: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--blue); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.card-header h3 { font-size: 15px; font-weight: 600; }

.status-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}
.status-up   { background: rgba(34,197,94,0.15); color: var(--green); }
.status-down { background: rgba(239,68,68,0.15); color: var(--red); }
.status-pending { background: rgba(234,179,8,0.15); color: var(--yellow); }

.card-url {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
  word-break: break-all;
}

.card-stats {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--text-dim);
}
.card-stats span strong {
  color: var(--text);
  font-weight: 600;
}

/* Detail panel */
.detail-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 20px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.detail-actions { display: flex; gap: 8px; }

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
td.healthy { color: var(--green); }
td.unhealthy { color: var(--red); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
  width: 420px;
  max-width: 90vw;
}
.modal h2 { font-size: 18px; margin-bottom: 18px; }
.modal label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 4px;
  margin-top: 12px;
}
.modal input, .modal select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.back-link {
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 14px;
  display: inline-block;
}
.back-link:hover { text-decoration: underline; }
