/* ==========================================================================
   MCANALYTICS LIVE STATUS STYLESHEET (AUTHENTIC SNIFFER STUDIO ARCHITECTURE)
   ========================================================================== */

:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --text: #d4d4d8;
  --text-heading: #ffffff;
  --text-muted: #71717a;
  --border: #1a1a1a;
  --border-strong: #27272a;
  --online: #22c55e;
  --offline: #ef4444;
  --unknown: #71717a;
  --bar-bg: #141416;
  --bars: 30;
  --bar-gap: 4px;

  --font-heading: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   1. TOP BANNER (AUTHENTIC SNIFFER STUDIO)
   ========================================================================== */

.top-banner {
  position: relative;
  width: 100%;
  padding: 56px 0;
  background: #000000;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.banner-card {
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  margin-right: 28px;
  filter: brightness(0) invert(1);
}

.banner-divider {
  width: 1px;
  height: 56px;
  margin: 0 30px 0 0;
  background: var(--border-strong);
}

.banner-text {
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 0.95;
  text-transform: uppercase;
}

.banner-text span {
  color: var(--online);
}

/* ==========================================================================
   2. MAIN PAGE & HEADER (NO BOX BACKGROUND)
   ========================================================================== */

.page {
  width: min(840px, calc(100% - 32px));
  margin: 44px auto 64px;
  flex: 1;
}

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

.header h1 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.01em;
}

.last-updated {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font-sans);
}

.header-right {
  display: flex;
  align-items: center;
}

.overall,
.component-status {
  padding: 4px 0;
  color: var(--unknown);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.overall.online,
.component-status.online {
  color: var(--online);
}

.overall.offline,
.component-status.offline {
  color: var(--offline);
}

/* ==========================================================================
   3. COMPONENTS LIST (BORDER-SEPARATED, NO BOX CONTAINERS)
   ========================================================================== */

.components {
  border-top: 1px solid var(--border);
}

.component {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.component-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 14px;
}

.component-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.component-name {
  color: var(--text-heading);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
}

.component-desc {
  color: var(--text-muted);
  font-size: 13px;
}

.bar-line {
  display: grid;
  grid-template-columns: repeat(var(--bars), minmax(2px, 1fr));
  gap: var(--bar-gap);
  height: 34px;
}

.bar {
  min-width: 2px;
  height: 34px;
  padding: 0;
  border: 0;
  background: var(--bar-bg);
  border-radius: 3px;
  cursor: default;
  transition: filter 0.12s ease;
}

.bar.online {
  background: var(--online);
}

.bar.offline {
  background: var(--offline);
}

.bar:hover,
.bar:focus-visible {
  filter: brightness(1.2);
}

.uptime-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-sans);
}

.uptime-row strong {
  color: var(--online);
  font-weight: 600;
}

/* ==========================================================================
   4. INCIDENTS SECTION
   ========================================================================== */

.incidents {
  margin-top: 48px;
}

.incidents h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.incident-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.incident-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.incident-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-heading);
}

.incident-badge {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--online);
}

.incident-updates {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.incident-update-time {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.incident-update-msg {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.no-incidents {
  padding: 20px 0;
  color: var(--text-muted);
  font-size: 13px;
}

/* ==========================================================================
   5. TOOLTIP & FOOTER
   ========================================================================== */

.tooltip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  background: #111114;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 12px;
  font-family: var(--font-sans);
  line-height: 1.4;
  white-space: pre-line;
}

.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: #000000;
  padding: 32px 16px;
}

.footer-inner {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  height: 22px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--text-heading);
}

@media (max-width: 768px) {
  .banner-logo {
    height: 48px;
    margin-right: 18px;
  }

  .banner-divider {
    height: 44px;
    margin: 0 18px 0 0;
  }

  .banner-text {
    font-size: 26px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
