/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep:    #0a0e1a;
  --bg-card:    #111827;
  --bg-hover:   #1e293b;
  --border:     #1e3a5f;
  --text:       #e2e8f0;
  --text-dim:   #94a3b8;
  --accent:     #3b82f6;
  --accent-alt: #818cf8;
  --glow:       rgba(59, 130, 246, 0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Animated background canvas ── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Layout ── */
.container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header / Logo ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-svg {
  width: 72px;
  height: 44px;
  filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.4));
}

.logo-text h1 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.logo-text .subtitle {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* ── Status Button ── */
.status-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.status-btn:hover {
  border-color: #4ade80;
  background: var(--bg-hover);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.15);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-btn.hidden { display: none; }

/* ── Category sections ── */
.category {
  margin-bottom: 2rem;
}

.category-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Services row (horizontal per group) ── */
.services-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ── Main content area ── */
main {
  flex: 1;
}

/* ── Tile ── */
.tile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  min-width: 220px;
  flex: 0 1 auto;
}

.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, var(--glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tile:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--accent);
}

.tile:hover::before { opacity: 1; }

/* ── Tile health dot ── */
.tile-health {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  opacity: 0.4;
  transition: all 0.3s ease;
}

.tile-health.up {
  background: #4ade80;
  opacity: 1;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
}

.tile-health.down {
  background: #f87171;
  opacity: 1;
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.6);
}

.tile-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.tile-icon img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: contain;
}

.tile-info {
  position: relative;
  min-width: 0;
}

.tile-name {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Footer ── */
.footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.footer-text {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-separator {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ── Loading state ── */
.loading {
  text-align: center;
  color: var(--text-dim);
  padding: 3rem;
}

.loading.hidden { display: none; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .container { padding: 1.25rem 1rem; }
  .logo-svg { width: 56px; height: 34px; }
  .logo-text h1 { font-size: 1.4rem; }
  .services-row { flex-direction: column; }
  .tile { min-width: 0; width: 100%; }
}
