/* ============================================================
   NETWORK STATUS PAGE — page-specific styles (ns-*)
   ============================================================ */

.ns-body {
    background: #f8fafc;
}

.ns-accent { color: #4169E1; }
.ns-mono { font-family: 'JetBrains Mono', monospace; }

/* ============================================================
   1. HERO
   ============================================================ */

.ns-hero {
    position: relative;
    padding: 120px 0 70px;
    background: #0f172a;
    overflow: hidden;
    text-align: center;
}

.ns-hero-bg { position: absolute; inset: 0; pointer-events: none; }

.ns-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(65, 105, 225, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(65, 105, 225, 0.12) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 40%, transparent 100%);
}

.ns-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ns-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 28px;
}

.ns-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: ns-live-pulse 2s infinite;
}

@keyframes ns-live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.ns-overall {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 18px;
    color: #f1f5f9;
}

.ns-overall-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ns-overall-up .ns-overall-icon {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.ns-overall-degraded .ns-overall-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    font-size: 24px;
    font-weight: 900;
}

.ns-hero-sub {
    color: #94a3b8;
    font-size: 16px;
    max-width: 560px;
    margin: 0 auto 44px;
    line-height: 1.7;
}

.ns-hero-stats {
    display: flex;
    justify-content: center;
    gap: 56px;
    flex-wrap: wrap;
}

.ns-hero-stat { display: flex; flex-direction: column; gap: 6px; }

.ns-hero-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 26px;
    font-weight: 700;
    color: #f1f5f9;
}

.ns-hero-stat-label {
    font-size: 12.5px;
    color: #64748b;
}

/* ============================================================
   2. SERVICES + PULSE STRIPS (signature element)
   ============================================================ */

.ns-services { padding: 90px 0; }

.ns-legend {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    font-size: 13.5px;
    color: #475569;
}

.ns-legend-item { display: inline-flex; align-items: center; gap: 8px; }

.ns-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ns-dot-up { background: #22c55e; }
.ns-dot-degraded { background: #f59e0b; }
.ns-dot-down { background: #dc2626; }

.ns-service-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ns-service-row {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px 26px 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ns-service-row:hover {
    border-color: rgba(65, 105, 225, 0.35);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.ns-service-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.ns-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ns-status-operational { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.ns-status-degraded { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.ns-status-down { background: rgba(220, 38, 38, 0.1); color: #dc2626; }

.ns-status-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.ns-service-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 15.5px;
    margin-right: auto;
}

.ns-service-uptime {
    font-size: 13px;
    color: #64748b;
}

.ns-strip {
    display: flex;
    gap: 3px;
    width: 100%;
}

.ns-block {
    flex: 1 1 auto;
    height: 30px;
    border-radius: 3px;
    background: #22c55e;
    position: relative;
    cursor: pointer;
}

.ns-block-up { background: #22c55e; }
.ns-block-degraded { background: #f59e0b; }
.ns-block-down { background: #dc2626; }

.ns-block:hover { opacity: 0.8; }

.ns-block-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #f1f5f9;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
}

.ns-block-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #0f172a;
}

.ns-strip-range {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11.5px;
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
}

/* ============================================================
   3. INCIDENT HISTORY
   ============================================================ */

.ns-incidents {
    padding: 90px 0;
    background: #f1f5f9;
}

.ns-timeline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}

.ns-incident-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 26px;
    height: 100%;
}

.ns-incident-date {
    font-size: 12.5px;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 12px;
}

.ns-incident-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.ns-impact-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 3px 10px;
    border-radius: 50px;
}

.ns-impact-degraded { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.ns-impact-down { background: rgba(220, 38, 38, 0.1); color: #dc2626; }

.ns-incident-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #0f172a;
}

.ns-incident-summary {
    font-size: 14.5px;
    color: #475569;
    line-height: 1.65;
    margin-bottom: 12px;
}

.ns-incident-meta {
    font-size: 12.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ns-meta-sep { color: #cbd5e1; }

.ns-resolved {
    color: #16a34a;
    font-weight: 700;
}

/* ============================================================
   4. RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .ns-hero { padding: 100px 0 56px; }
    .ns-overall { font-size: 30px; }
    .ns-hero-stats { gap: 34px; }
    .ns-hero-stat-value { font-size: 21px; }

    .ns-timeline {
        grid-template-columns: 1fr;
    }

    .ns-service-name { margin-right: 0; width: 100%; order: 3; }
}

@media (max-width: 600px) {
    .ns-block { height: 24px; }
    .ns-live-badge { font-size: 11.5px; }
    .ns-overall { font-size: 24px; flex-direction: column; gap: 8px; }
    .ns-hero-sub { font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .ns-live-dot { animation: none; }
}