/* UptimeRobot.org app shell — same dark palette as login / dashboard.uptimerobot.com */
:root {
  --bg: #131b25;
  --bg-2: #1c2434;
  --panel: #1c2434;
  --primary: #3bd671;
  --btn: #3bd671;
  --accent: #3bd671;
  --text: #e6eaeb;
  --muted: #e6eaeb;
  --line: #2d3340;
  --ok: #3bd671;
  --down: #df484a;
  --pending: #fac800;
  --on-brand: #131b25;
  --sidebar-w: 248px;
  --topbar-h: 64px;
  --radius: 0;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); }
button, input, select { font: inherit; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 40px; padding: 0.45rem 0.95rem; border-radius: 0;
  border: 1px solid transparent; font-weight: 600; cursor: pointer;
  color: var(--on-brand); background: var(--btn); font-size: 0.92rem;
}
.btn:hover { filter: brightness(1.06); }
.btn-line {
  background: transparent; border-color: var(--line); color: var(--text);
}
.btn-line:hover { background: var(--bg-2); color: var(--text); }
.btn-danger { background: var(--down); color: #ffffff; }
.btn-ghost {
  background: transparent; border: none; color: var(--muted);
  min-height: 36px; padding: 0.3rem 0.55rem;
}
.btn-ghost:hover { color: var(--text); background: var(--bg); }

/* ===== Dashboard shell ===== */
.dash { min-height: 100dvh; display: flex; background: var(--bg); }
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  z-index: 30;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid var(--line);
  color: var(--text); font-weight: 700;
}
.sidebar-brand img { width: 36px; height: 36px; border-radius: 0; }
.sidebar-brand small {
  display: block; font-weight: 500; color: var(--muted);
  font-size: 0.75rem; margin-top: 0.1rem;
}
.sidebar-nav { padding: 0.85rem 0.65rem; display: grid; gap: 0.2rem; flex: 1; overflow: auto; }
.sidebar-nav a, .sidebar-nav span.nav-item {
  display: flex; align-items: center; gap: 0.65rem;
  min-height: 42px; padding: 0.45rem 0.75rem; border-radius: 0;
  color: var(--muted); font-weight: 600; font-size: 0.92rem;
}
.sidebar-nav a:hover { background: var(--bg); color: var(--text); }
.sidebar-nav a.active { background: var(--bg); color: var(--accent); }
.nav-dot {
  width: 8px; height: 8px; border-radius: 0; background: var(--accent); flex: 0 0 auto;
}
.sidebar-foot {
  border-top: 1px solid var(--line);
  padding: 0.85rem 1rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.dash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.menu-toggle {
  display: none; width: 40px; height: 40px; border-radius: 0;
  border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer;
}
.search {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 0;
  padding: 0 0.75rem; min-height: 40px; width: min(360px, 42vw);
}
.search input {
  border: 0; outline: 0; background: transparent; color: var(--text); width: 100%; min-height: 38px;
}
.topbar-right { display: flex; align-items: center; gap: 0.55rem; }
.user-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 40px; padding: 0 0.75rem; border-radius: 0;
  background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: 0.88rem;
}
.user-avatar {
  width: 24px; height: 24px; border-radius: 0;
  background: var(--btn);
  display: inline-grid; place-items: center; font-size: 0.7rem; font-weight: 700; color: var(--on-brand);
}

.content { padding: 1.25rem 1.25rem 2rem; }
.page-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.85rem; align-items: end;
  margin-bottom: 1rem;
}
.page-head h1 { margin: 0; font-size: 1.55rem; color: var(--text); }
.page-head p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.95rem; }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 0; padding: 0.9rem 1rem;
}
.stat b { display: block; font-size: 1.45rem; color: var(--text); line-height: 1.1; }
.stat span { color: var(--muted); font-size: 0.82rem; }

.filters { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.85rem; }
.chip {
  min-height: 36px; padding: 0.35rem 0.8rem; border-radius: 0;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  cursor: pointer; font-weight: 600; font-size: 0.85rem;
}
.chip:hover { color: var(--text); border-color: var(--text); }
.chip.active { background: var(--btn); border-color: var(--btn); color: var(--on-brand); }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 0; overflow: hidden;
}
.toolbar {
  display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: space-between; align-items: center;
  padding: 0.85rem 1rem; border-bottom: 1px solid var(--line);
}
.toolbar strong { color: var(--text); }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left; padding: 0.9rem 1rem; border-bottom: 1px solid var(--line);
  font-size: 0.92rem; vertical-align: middle;
}
th {
  color: var(--muted); font-weight: 600; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: .05em;
}
tr:last-child td { border-bottom: 0; }
tr:hover td { background: var(--bg); }
.mon-name { color: var(--text); font-weight: 700; }
.mon-target { color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; word-break: break-all; }
.type-pill {
  display: inline-flex; min-height: 24px; align-items: center; padding: 0 0.55rem;
  border-radius: 0; background: var(--bg); border: 1px solid var(--line);
  color: var(--accent); font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
}
.status-cell { display: flex; align-items: center; gap: 0.55rem; }
.status-dot {
  width: 10px; height: 10px; border-radius: 0; flex: 0 0 auto;
}
.status-dot.up { background: var(--ok); }
.status-dot.down { background: var(--down); }
.status-dot.pending { background: var(--pending); }
.status-dot.paused { background: #2d3340; }
.badge {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 0.55rem;
  border-radius: 0; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  border: 1px solid var(--line); background: var(--bg);
}
.badge.up { color: var(--ok); border-color: var(--ok); }
.badge.down { color: var(--down); border-color: var(--down); }
.badge.pending { color: var(--pending); border-color: var(--pending); }
.badge.paused { color: var(--text); border-color: var(--line); }
.row-actions { display: flex; gap: 0.25rem; justify-content: flex-end; }
.muted { color: var(--muted); }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }

.modal-backdrop {
  position: fixed; inset: 0; background: #0d141b; display: none; place-items: center; z-index: 50; padding: 1rem;
}
.modal-backdrop.open { display: grid; }
.modal {
  width: min(560px, 100%); background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 0; padding: 1.2rem;
}
.modal h2 { margin: 0 0 .85rem; color: var(--text); font-size: 1.2rem; }
label { display: block; margin: 0.65rem 0 0.3rem; color: var(--muted); font-size: 0.88rem; }
input, select {
  width: 100%; min-height: 42px; border-radius: 0; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); padding: 0.5rem 0.7rem;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.error { color: #ff6568; font-size: 0.9rem; margin: 0.6rem 0 0; min-height: 1.2em; }
.form-actions { display: flex; gap: 0.55rem; flex-wrap: wrap; margin-top: 1rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }

/* Public status */
.wrap { width: min(1120px, calc(100% - 1.5rem)); margin: 0 auto; }
.site-header {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--text); font-weight: 700; }
.brand img { width: 40px; height: 40px; border-radius: 0; }
.nav { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
main { padding: 1.25rem 0 2.5rem; }
h1 { margin: 0 0 0.35rem; font-size: clamp(1.4rem, 3vw, 1.85rem); color: var(--text); }
.lead { margin: 0 0 1rem; color: var(--muted); }
.status-list { display: grid; gap: 0.65rem; }
.status-item {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 0; padding: 0.85rem 1rem;
}
.footer {
  border-top: 1px solid var(--line); padding: 0.8rem 0; color: var(--muted); font-size: 0.82rem;
  display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
}

@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-105%);
    transition: transform .2s ease;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .search { width: min(240px, 40vw); }
}
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .search { display: none; }
  table { display: block; overflow-x: auto; }
}
