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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f6fa;
    color: #2d3436;
    line-height: 1.6;
}

.container { max-width: 800px; margin: 0 auto; padding: 2rem 1rem; }

header { text-align: center; margin-bottom: 2rem; }
header h1 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.75rem; }

.overall-badge {
    display: inline-block; padding: 0.5rem 1.5rem;
    border-radius: 6px; font-weight: 600; font-size: 0.95rem;
}
.overall-badge.operational { background: #00b894; color: #fff; }
.overall-badge.degraded { background: #fdcb6e; color: #2d3436; }
.overall-badge.major_outage { background: #d63031; color: #fff; }
.overall-badge.unknown { background: #b2bec3; color: #fff; }

.last-updated { margin-top: 0.5rem; font-size: 0.8rem; color: #636e72; }

.group {
    background: #fff; border-radius: 8px; margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); overflow: hidden;
}

.group-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.25rem; cursor: pointer; user-select: none;
}
.group-header:hover { background: #f8f9fa; }
.group-header h3 { font-size: 1rem; font-weight: 600; }

.status-dot {
    display: inline-block; width: 10px; height: 10px;
    border-radius: 50%; margin-right: 0.5rem;
}
.status-dot.operational { background: #00b894; }
.status-dot.degraded { background: #fdcb6e; }
.status-dot.major_outage { background: #d63031; }
.status-dot.unknown { background: #b2bec3; }

.status-label { font-size: 0.85rem; font-weight: 500; display: flex; align-items: center; }

.group-services { border-top: 1px solid #eee; }

.service-card { border-bottom: 1px solid #f1f1f1; }
.service-card:last-child { border-bottom: none; }

.service-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 1.25rem; cursor: pointer;
}
.service-row:hover { background: #f8f9fa; }

.service-name { font-size: 0.9rem; }
.service-meta { display: flex; align-items: center; gap: 1rem; font-size: 0.8rem; color: #636e72; }

.uptime-strip {
    padding: 0 1.25rem 0.85rem 1.25rem;
}

.uptime-bar {
    display: flex; gap: 1px; height: 30px; align-items: stretch;
    width: 100%;
}
.uptime-day {
    flex: 1 1 0;
    min-width: 0;
    max-width: 8px;
    border-radius: 1px;
    background: #dfe6e9;
    transition: transform 0.12s ease, filter 0.12s ease;
    transform-origin: center;
    cursor: default;
}
.uptime-day:hover {
    transform: scaleY(1.08);
    filter: brightness(1.05);
}
.uptime-day.up { background: #00b894; }
.uptime-day.degraded { background: #fdcb6e; }
.uptime-day.down { background: #d63031; }
.uptime-day.no-data { background: #dfe6e9; }

.uptime-bar-loading .uptime-day { opacity: 0.6; }

.uptime-labels {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 0.4rem;
    font-size: 0.72rem; color: #95a0a6; letter-spacing: 0.01em;
}
.uptime-label-center { font-variant-numeric: tabular-nums; color: #636e72; }

.uptime-pct { font-size: 0.85rem; font-weight: 600; min-width: 55px; text-align: right; }

.recent-incidents { margin-top: 2rem; }
.recent-incidents h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }

.incident {
    background: #fff; border-radius: 8px; padding: 1rem 1.25rem;
    margin-bottom: 0.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex; justify-content: space-between; align-items: center;
}
.incident-info { font-size: 0.9rem; }
.incident-time { font-size: 0.8rem; color: #636e72; }
.incident-duration { font-size: 0.8rem; color: #636e72; }

.no-incidents { color: #636e72; font-size: 0.9rem; text-align: center; padding: 1rem; }

.service-detail { border-top: 1px solid #eee; padding: 1rem 1.25rem; background: #fafbfc; }
.hidden { display: none; }
.collapse-icon {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 0.8rem;
    color: #636e72;
    margin-right: 0.25rem;
}
.collapse-icon.collapsed { transform: rotate(-90deg); }

.uptime-tooltip {
    position: absolute;
    z-index: 1000;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 1rem;
    min-width: 200px;
    max-width: 280px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}
.uptime-tooltip.visible { opacity: 1; transform: translateY(0); }
.uptime-tooltip-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 0.25rem;
}
.uptime-tooltip-body {
    font-size: 0.85rem;
    color: #636e72;
}
.tagline { margin-top: 0.25rem; margin-bottom: 1rem; font-size: 0.9rem; color: #636e72; }

.page-footer { margin-top: 2.5rem; text-align: center; }
.page-footer p { font-size: 0.78rem; color: #95a0a6; }

.uptime-tooltip-arrow {
    position: absolute;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: translateX(-50%) rotate(45deg);
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.06);
}
