/* ===== Variables ===== */
:root {
  --bg:         #0f172a;
  --bg-card:    #1e293b;
  --bg-input:   #0f172a;
  --border:     #334155;
  --text:       #e2e8f0;
  --text-muted: #64748b;
  --text-dim:   #94a3b8;
  --accent:     #6366f1;
  --accent-hover: #4f46e5;
  --green:      #22c55e;
  --red:        #ef4444;
  --yellow:     #f59e0b;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, button { font-size: 1rem; }

/* ===== Layout ===== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container--narrow { max-width: 480px; }

/* ===== Nav ===== */
.nav {
  border-bottom: 1px solid var(--border);
  padding: .9rem 0;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .45rem;
}
.nav__logo span { color: var(--accent); }
.nav__links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.nav__links a { color: var(--text-dim); font-size: .95rem; }
.nav__links a:hover { color: var(--text); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.2rem;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 600;
  font-size: .95rem;
  transition: background .15s, opacity .15s;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn--ghost:hover { color: var(--text); border-color: var(--text-dim); }
.btn--danger { background: var(--red); color: #fff; }
.btn--danger:hover { opacity: .85; }
.btn--sm { padding: .35rem .85rem; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== Card ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* ===== Form ===== */
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
.form-label { font-size: .875rem; color: var(--text-dim); font-weight: 500; }
.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .6rem .9rem;
  width: 100%;
  transition: border-color .15s;
}
.form-input:focus { outline: none; border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }

/* ===== Alerts ===== */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  margin-bottom: 1rem;
}
.alert--error { background: rgba(239,68,68,.12); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
.alert--success { background: rgba(34,197,94,.12); color: #86efac; border: 1px solid rgba(34,197,94,.3); }

/* ===== Status dots ===== */
.dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot--up     { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot--down   { background: var(--red);   box-shadow: 0 0 6px var(--red); }
.dot--unknown { background: var(--text-muted); }

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: .8rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

/* ===== Utility ===== */
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.hidden { display: none !important; }
