/* ==========================================================================
   HyndSyte Status Page
   ========================================================================== */

.status-shell {
    min-height: 100vh;
    background: var(--bg-app);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-dark);
}

/* ---------- Header ---------- */

.status-header {
    background: var(--navy-900);
    color: var(--text-light);
    padding: 0;
    border-bottom: 1px solid var(--border);
}

.status-header-inner {
    max-width: 880px;
    margin: 0 auto;
    padding: 28px 24px 32px;
}

.status-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.status-brand-logo {
    height: 36px;
    width: auto;
}

.status-brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.status-header-link {
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.15s;
}

.status-header-link:hover {
    color: #fff;
}

/* ---------- Overall banner ---------- */

.status-banner {
    border-radius: var(--radius);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: background 0.3s;
}

.status-banner.operational {
    background: linear-gradient(135deg, #065f46, #064e3b);
}

.status-banner.partial {
    background: linear-gradient(135deg, #92400e, #78350f);
}

.status-banner.major {
    background: linear-gradient(135deg, #991b1b, #7f1d1d);
}

.status-banner.maintenance {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
}

.status-banner-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-banner-icon svg {
    width: 26px;
    height: 26px;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.status-banner-text h2 {
    margin: 0 0 4px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.status-banner-text p {
    margin: 0;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ---------- Legend ---------- */

.status-legend {
    max-width: 880px;
    margin: 0 auto;
    padding: 20px 24px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.status-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-legend-dot.operational { background: var(--green); }
.status-legend-dot.partial { background: #f59e0b; }
.status-legend-dot.major { background: var(--red); }
.status-legend-dot.performance { background: #6366f1; }
.status-legend-dot.maintenance { background: var(--blue); }

/* ---------- Main content ---------- */

.status-main {
    max-width: 880px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

/* ---------- Service group ---------- */

.status-group {
    margin-bottom: 36px;
}

.status-group-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.status-service {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.status-service:hover {
    border-color: #cbd5e1;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

.status-service-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-dark);
}

.status-service-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-service-status .status-legend-dot {
    width: 8px;
    height: 8px;
}

.status-service-status.operational { color: var(--green); }
.status-service-status.partial { color: #f59e0b; }
.status-service-status.major { color: var(--red); }
.status-service-status.performance { color: #6366f1; }
.status-service-status.maintenance { color: var(--blue); }

/* ---------- Uptime bars ---------- */

.status-uptime-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 0 20px 14px;
}

.status-uptime-bars {
    display: flex;
    gap: 2px;
    flex: 1;
}

.status-uptime-bar {
    flex: 1;
    height: 32px;
    border-radius: 3px;
    background: var(--green);
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    position: relative;
}

.status-uptime-bar:hover {
    opacity: 0.8;
    transform: scaleY(1.1);
}

.status-uptime-bar.partial { background: #f59e0b; }
.status-uptime-bar.major { background: var(--red); }
.status-uptime-bar.maintenance { background: var(--blue); }
.status-uptime-bar.no-data { background: #e2e8f0; }

.status-uptime-bar-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--navy-900);
    color: #fff;
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 10;
    margin-bottom: 6px;
}

.status-uptime-bar:hover .status-uptime-bar-tooltip {
    opacity: 1;
}

.status-uptime-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
    margin-left: 12px;
}

/* ---------- Incidents ---------- */

.status-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 20px;
}

.status-incident {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    overflow: hidden;
}

.status-incident-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.status-incident-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

.status-incident-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: 20px;
}

.status-incident-badge.operational { background: #d1fae5; color: #065f46; }
.status-incident-badge.partial { background: #fef3c7; color: #92400e; }
.status-incident-badge.major { background: #fee2e2; color: #991b1b; }
.status-incident-badge.maintenance { background: #dbeafe; color: #1e3a8a; }
.status-incident-badge.resolved { background: #d1fae5; color: #065f46; }
.status-incident-badge.monitoring { background: #e0e7ff; color: #3730a3; }
.status-incident-badge.investigating { background: #fef3c7; color: #92400e; }

.status-incident-body {
    padding: 16px 20px;
}

.status-incident-update {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.status-incident-update:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.status-incident-update:first-child {
    padding-top: 0;
}

.status-incident-update-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.status-incident-update-text {
    font-size: 0.875rem;
    color: var(--text-body);
    line-height: 1.6;
}

.status-incident-affected {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-incident-affected strong {
    color: var(--text-body);
}

.status-no-incidents {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 24px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ---------- Subscribe ---------- */

.status-subscribe {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 40px;
    text-align: center;
}

.status-subscribe h3 {
    margin: 0 0 8px;
    font-size: 1.125rem;
    font-weight: 700;
}

.status-subscribe p {
    margin: 0 0 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.status-subscribe-form {
    display: flex;
    gap: 10px;
    max-width: 420px;
    margin: 0 auto;
}

.status-subscribe-form input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--bg-page);
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.15s;
}

.status-subscribe-form input:focus {
    border-color: var(--blue);
}

.status-subscribe-form button {
    padding: 10px 24px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.status-subscribe-form button:hover {
    background: var(--blue-dark);
}

/* ---------- Footer ---------- */

.status-footer {
    background: var(--navy-900);
    color: var(--text-muted);
    padding: 28px 24px;
    text-align: center;
    font-size: 0.8125rem;
    border-top: 1px solid var(--border);
}

.status-footer a {
    color: var(--text-light);
    transition: color 0.15s;
}

.status-footer a:hover {
    color: #fff;
}

.status-footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
    .status-header-inner {
        padding: 20px 16px 24px;
    }

    .status-main {
        padding: 24px 16px 48px;
    }

    .status-banner {
        padding: 20px;
    }

    .status-banner-text h2 {
        font-size: 1.25rem;
    }

    .status-subscribe-form {
        flex-direction: column;
    }

    .status-uptime-bar {
        height: 28px;
    }

    .status-legend {
        padding: 16px 16px 0;
        gap: 12px;
    }
}
