:root {
  /* Quasar Data brand palette (sourced from quasardata.com) */
  --bg:          #F5F5F5;   /* page background */
  --panel:       #FFFFFF;   /* zone cards */
  --border:      #E5E5E5;
  --text:        #112337;   /* brand navy — headings + body */
  --muted:       #686e77;
  --accent:      #527EFF;   /* electric blue */
  --accent-dark: #112337;   /* navy */
  --up:          #16a34a;
  --down:        #cf2e2e;   /* matches site's red */
  --unknown:     #ff6900;   /* matches site's orange */
  --shadow:      0 1px 3px rgba(17, 35, 55, .08), 0 1px 2px rgba(17, 35, 55, .04);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  /* Same system-font stack quasardata.com uses */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans,
               Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
}

/* Branded header bar — solid navy with electric-blue underline */
.app-header {
  background: var(--accent-dark);
  color: #fff;
  padding: 1.25rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  border-bottom: 3px solid var(--accent);
}
.app-header h1 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }
.app-header .meta { color: rgba(255, 255, 255, .75); font-size: .8rem; }
.app-header .meta strong { color: #fff; font-weight: 600; }

main {
  padding: 1.5rem 2rem 3rem;
  max-width: 1600px; margin: 0 auto;
}

#zones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem;
  align-items: start;
}
.zone {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.zone-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: .85rem; gap: .5rem;
  padding-bottom: .75rem; border-bottom: 1px solid var(--border);
}
.zone-header h2 { font-size: 1rem; color: var(--text); }
.zone-header .desc { color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.zone-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .25rem .7rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600; white-space: nowrap;
}
.zone-badge.healthy  { background: #dcfce7; color: #15803d; }
.zone-badge.degraded { background: #fee2e2; color: #b91c1c; }
.zone-badge.unknown  { background: #fef3c7; color: #b45309; }

.sites { display: flex; flex-direction: column; gap: .5rem; }
.site {
  background: #fafbfd;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .65rem .8rem;
  display: flex; gap: .75rem; align-items: flex-start;
  transition: background .15s ease;
}
.site:hover { background: #f1f5f9; }

.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: .4rem; flex-shrink: 0; }
.dot.up      { background: var(--up);      box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); }
.dot.down    { background: var(--down);    box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.dot.unknown { background: var(--unknown); box-shadow: 0 0 0 3px rgba(217, 119, 6, .15); }

.site-info { flex: 1; min-width: 0; }
.site-name { font-weight: 600; font-size: .9rem; margin-bottom: .15rem; color: var(--text); }
.site-stats {
  display: flex; gap: .75rem; font-size: .75rem;
  color: var(--muted); flex-wrap: wrap;
}
.site-stats strong { color: var(--text); font-weight: 600; }
.error {
  color: var(--down); font-size: .75rem; margin-top: .3rem;
  font-family: ui-monospace, "SF Mono", Consolas, monospace; word-break: break-word;
}

#countdown { font-variant-numeric: tabular-nums; }

@media (max-width: 600px) {
  .app-header { padding: 1rem; }
  main { padding: 1rem; }
}
