:root {
  --color-bg-primary: #000000;
  --color-bg-secondary: #0B0B0C;
  --color-bg-tertiary: #141616;
  --color-bg-quaternary: #1C1C1C;

  --color-text-primary: #FFFFFF;
  --color-text-secondary: #E7E7E8;
  --color-text-tertiary: #98999B;
  --color-text-muted: #6B6C6E;

  --color-brand-primary: #E8390E;
  --color-brand-hover: #FF4A1C;
  --color-brand-dark: #B82E0B;
  --color-brand-glow: rgba(232, 57, 14, 0.15);

  --color-success: #27AE60;
  --color-success-soft: rgba(39, 174, 96, 0.12);
  --color-warning: #F39C12;
  --color-error: #E74C3C;
  --color-info: #2E86C1;

  --color-border: #232425;
  --color-border-strong: #2E3032;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.02) inset, 0 8px 24px rgba(0,0,0,0.35);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-primary);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-mark { width: 28px; height: 28px; display: block; }
.brand-name {
  color: var(--color-text-primary);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--color-text-primary);
  color: var(--color-bg-primary);
}
.btn-primary:hover { background: #e9e9ea; }
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: var(--color-border-strong);
}
.btn-ghost:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

/* Main */
.main { padding: 40px 24px 64px; }

/* Banner */
.banner {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 20px 22px;
  margin-bottom: 28px;
}
.banner-operational {
  background: var(--color-success-soft);
  border-color: rgba(39, 174, 96, 0.35);
}
.banner-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.banner-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.banner-sub {
  margin: 8px 0 0 26px;
  color: var(--color-text-tertiary);
  font-size: 14px;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: 0 0 14px;
  display: inline-block;
}
.status-dot-ok { background: var(--color-success); box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.18); }
.status-dot-warn { background: var(--color-warning); }
.status-dot-err { background: var(--color-error); }

/* Card */
.card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--color-border);
}
.card-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.period-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-tertiary);
  font-size: 13px;
}
.period-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-tertiary);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.period-btn:hover { color: var(--color-text-primary); border-color: var(--color-border-strong); }

/* Services */
.services {
  display: flex;
  flex-direction: column;
}
.service-group {
  padding: 18px 22px;
  border-bottom: 1px solid var(--color-border);
}
.service-group:last-child { border-bottom: none; }

.service-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.service-group-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.service-component-count {
  color: var(--color-text-tertiary);
  font-size: 13px;
  font-weight: 400;
}
.service-uptime {
  color: var(--color-text-tertiary);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.service-uptime b { color: var(--color-text-secondary); font-weight: 600; }

.uptime-bar {
  display: flex;
  gap: 2px;
  height: 32px;
  align-items: stretch;
}
.uptime-cell {
  flex: 1;
  border-radius: 2px;
  background: var(--color-success);
  opacity: 0.92;
  min-width: 3px;
}
.uptime-cell.warn { background: var(--color-warning); }
.uptime-cell.err { background: var(--color-error); }
.uptime-cell.none { background: var(--color-border-strong); opacity: 0.6; }

.service-children {
  margin-top: 14px;
  padding-left: 24px;
  border-left: 1px dashed var(--color-border-strong);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-child .service-group-head { margin-bottom: 8px; }
.service-child .service-group-title { font-size: 14px; font-weight: 500; }

/* Actions */
.actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 28px 0 40px;
  margin-top: 24px;
}
.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-note, .footer-credit {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 640px) {
  .header-inner { padding-top: 14px; padding-bottom: 14px; }
  .brand-name { font-size: 16px; }
  .btn { padding: 8px 12px; font-size: 13px; }
  .main { padding: 24px 16px 48px; }
  .container { padding: 0 16px; }
  .uptime-bar { height: 26px; }
  .service-group-head { flex-wrap: wrap; }
  .card-head { flex-wrap: wrap; gap: 10px; }
}
