:root {
  --bg: #0b0e14;
  --surface: #11151f;
  --surface-raised: #161b27;
  --border: #232938;
  --text: #e6e9ef;
  --text-dim: #8b94a7;
  --accent: #4f8cff;
  --up: #2ecc71;
  --down: #ff5c5c;
  --pending: #f5a623;
  --radius: 8px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  flex-shrink: 0;
}

.sidebar .logo {
  display: block;
  margin-bottom: 32px;
}

.sidebar .logo img {
  height: 32px;
  display: block;
}

.sidebar nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-dim);
  margin-bottom: 4px;
  font-weight: 500;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: var(--surface-raised);
  color: var(--text);
  text-decoration: none;
}

.main {
  flex: 1;
  padding: 32px 40px;
  max-width: 1100px;
}

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

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-danger {
  background: var(--down);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.monitor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 10px;
  flex-shrink: 0;
}

.status-dot.up { background: var(--up); }
.status-dot.down { background: var(--down); }
.status-dot.pending { background: var(--pending); }
.status-dot.paused { background: var(--text-dim); }

.monitor-name {
  font-weight: 600;
}

.monitor-meta {
  color: var(--text-dim);
  font-size: 12px;
}

.uptime-pill {
  font-size: 12px;
  color: var(--text-dim);
  padding: 4px 10px;
  background: var(--surface-raised);
  border-radius: 999px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
  margin-bottom: 4px;
}

.checkbox-row input { width: auto; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 480px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
}

.modal h2 {
  margin-top: 0;
  font-size: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.free { background: var(--surface-raised); color: var(--text-dim); }
.badge.standard { background: var(--accent); color: #fff; }
.badge.pro { background: #F72585; color: #fff; }

.error-text { color: var(--down); font-size: 13px; margin-top: 4px; }

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  flex: 1;
  text-align: center;
}

.stat-card .value {
  font-size: 24px;
  font-weight: 700;
}

.hidden { display: none !important; }

.uptime-pill.pill-active {
  color: #0b0e14;
  background: var(--up);
  font-weight: 600;
}

.skeleton-block {
  height: 56px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-raised) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  margin-bottom: 8px;
}
@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
