/* ------------------------------------------------------------------ */
/* dash.thelangers.com — Status Dashboard                              */
/* Dark, minimal. No frameworks.                                       */
/* ------------------------------------------------------------------ */

:root {
  --bg:         #0d0d0d;
  --surface:    #161616;
  --border:     #2a2a2a;
  --text:        #e8e8e8;
  --text-dim:    #888;
  --text-faint:  #555;
  --green:       #3ecf74;
  --red:         #e5484d;
  --yellow:      #f5a623;
  --blue:        #4a9eff;
  --dot-size:    10px;
  --radius:      4px;
  --font-mono:   'SF Mono', 'Fira Mono', 'Consolas', monospace;
  --font-ui:     -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------ */
/* Layout                                                              */
/* ------------------------------------------------------------------ */

.layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

.header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.header__wordmark {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.header__subtitle {
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ------------------------------------------------------------------ */
/* Summary bar                                                         */
/* ------------------------------------------------------------------ */

.summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.summary__dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
  transition: background 0.2s;
}

.summary__dot--all-up   { background: var(--green); }
.summary__dot--has-down { background: var(--red); }
.summary__dot--has-degraded { background: var(--yellow); }

.summary__text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.meta {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 32px;
  font-family: var(--font-mono);
}

/* ------------------------------------------------------------------ */
/* Table                                                               */
/* ------------------------------------------------------------------ */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table thead tr {
  border-bottom: 1px solid var(--border);
}

.table th {
  text-align: left;
  padding: 0 12px 10px 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.table th:last-child,
.table td:last-child {
  padding-right: 0;
}

.table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.table tbody tr:hover {
  background: var(--surface);
}

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

.table td {
  padding: 14px 12px 14px 0;
  vertical-align: middle;
}

/* Column widths */
.col-status  { width: 80px; }
.col-name    { width: auto; }
.col-latency { width: 90px; }
.col-checked { width: 130px; }
.col-note    { width: 240px; }

/* ------------------------------------------------------------------ */
/* Status dot + badge                                                  */
/* ------------------------------------------------------------------ */

.status-cell {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dot {
  display: inline-block;
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 50%;
  flex-shrink: 0;
}

.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--degraded { background: var(--yellow); }
.dot--skipped  { background: var(--text-faint); }

.badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--up       { color: var(--green); }
.badge--down     { color: var(--red); }
.badge--degraded { color: var(--yellow); }
.badge--skipped  { color: var(--text-faint); }

/* ------------------------------------------------------------------ */
/* Table cell text                                                     */
/* ------------------------------------------------------------------ */

.name-cell {
  font-weight: 500;
  color: var(--text);
}

.latency-cell {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}

.latency-cell--slow { color: var(--yellow); }

.checked-cell {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
}

.note-cell {
  font-size: 12px;
  color: var(--text-faint);
  max-width: 240px;
}

/* ------------------------------------------------------------------ */
/* Loading / error states                                              */
/* ------------------------------------------------------------------ */

.row-loading td,
.row-error td {
  padding: 24px 0;
  color: var(--text-dim);
  font-style: italic;
}

.error-banner {
  display: none;
  padding: 12px 16px;
  background: #1a0a0a;
  border: 1px solid var(--red);
  border-radius: var(--radius);
  color: var(--red);
  font-size: 13px;
  margin-bottom: 20px;
}

.error-banner.visible {
  display: block;
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 640px) {
  .layout {
    padding: 32px 16px 60px;
  }

  .col-note {
    display: none;
  }

  .col-checked {
    width: 100px;
  }

  .table th,
  .table td {
    padding-left: 0;
  }
}
