/* ==========================================
   STATUS PAGE — Dashboard-matched redesign
   Warm blacks · Gold #EA9C22 · Orange #F05D11
   Green #22C55E · Red #EF4444 · Zero blue
   ========================================== */

/* ── Global Status Banner ──────────────────────────── */
.global-status-banner {
    background: #0e0d0b;
    border: 1px solid rgba(234, 156, 34, 0.16);
    border-radius: 24px;
    padding: 22px 28px;
    margin-bottom: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    position: relative;
    overflow: hidden;
}

.global-status-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(234,156,34,0.35), transparent);
}

.banner-content { flex: 1; }

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 40px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 10px;
}

.global-status-operational {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.28);
    color: #22C55E;
}
.global-status-warning {
    background: rgba(234, 156, 34, 0.1);
    border: 1px solid rgba(234, 156, 34, 0.28);
    color: #EA9C22;
}
.global-status-offline {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #EF4444;
}

.indicator-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: dotBlink 2.2s ease-in-out infinite;
}

.global-status-operational .indicator-dot {
    background: #22C55E;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}
.global-status-warning .indicator-dot {
    background: #EA9C22;
    box-shadow: 0 0 8px rgba(234, 156, 34, 0.7);
}
.global-status-offline .indicator-dot {
    background: #EF4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}

@keyframes dotBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

.banner-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    line-height: 1.55;
}

.auto-refresh-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 40px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    flex-shrink: 0;
}

.auto-refresh-notice i { color: #EA9C22; }

/* ── Status Overview ───────────────────────────────── */
.status-overview { margin-bottom: 40px; }

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.overview-card {
    background: #0e0d0b;
    border: 1px solid rgba(234, 156, 34, 0.14);
    border-radius: 22px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color 0.22s ease, transform 0.25s ease;
    cursor: default;
}

.overview-card:hover {
    border-color: rgba(234, 156, 34, 0.35);
    transform: translateY(-3px);
}

.overview-icon {
    width: 50px;
    height: 50px;
    background: rgba(234, 156, 34, 0.09);
    border: 1px solid rgba(234, 156, 34, 0.2);
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    color: #EA9C22;
    flex-shrink: 0;
}

.overview-content { flex: 1; min-width: 0; }

.overview-count {
    display: block;
    font-size: 38px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 15%, #EA9C22 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 4px 0;
    line-height: 1;
    letter-spacing: -1.5px;
}

.overview-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.38);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-weight: 700;
}

/* ── Section typography ────────────────────────────── */
.section-title {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px 0;
    letter-spacing: -0.4px;
}

.section-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.42);
    margin: 0 0 20px 0;
}

/* ── Product Status Cards ──────────────────────────── */
.products-status { margin-bottom: 48px; }

.status-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
    gap: 18px;
}

.status-card {
    background: #0e0d0b;
    border: 1px solid rgba(234, 156, 34, 0.14);
    border-radius: 24px;
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.28s ease, border-color 0.22s ease, box-shadow 0.28s ease;
}

/* Override JS inline styles on hover with !important */
.status-card:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(234, 156, 34, 0.38) !important;
    box-shadow: 0 16px 44px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(234,156,34,0.1);
}

.status-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 24px 24px 0 0;
}

.status-undetected::before { background: linear-gradient(90deg, #22C55E, #4ade80); }
.status-beta::before        { background: linear-gradient(90deg, #EA9C22, #FBB131); }
.status-detected::before    { background: linear-gradient(90deg, #EF4444, #f87171); }
.status-warning::before     { background: linear-gradient(90deg, #F97316, #EA9C22); }
.status-offline::before     { background: linear-gradient(90deg, #4B5563, #6B7280); }

.product-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.product-icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-icon img { width: 100%; height: 100%; object-fit: cover; }
.product-icon i   { font-size: 24px; color: #EA9C22; }

.product-info { flex: 1; min-width: 0; }

.product-name {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 9px 0;
    letter-spacing: -0.2px;
    line-height: 1.2;
}

.product-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 40px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.status-indicator-undetected {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22C55E;
}
.status-indicator-beta {
    background: rgba(234, 156, 34, 0.1);
    border: 1px solid rgba(234, 156, 34, 0.3);
    color: #EA9C22;
}
.status-indicator-detected {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
}
.status-indicator-warning {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.3);
    color: #F97316;
}
.status-indicator-offline {
    background: rgba(75, 85, 99, 0.12);
    border: 1px solid rgba(75, 85, 99, 0.3);
    color: #9CA3AF;
}

.status-indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: dotBlink 2.2s ease-in-out infinite;
}

.status-indicator-undetected .status-indicator-dot { background: #22C55E; }
.status-indicator-beta        .status-indicator-dot { background: #EA9C22; }
.status-indicator-detected    .status-indicator-dot { background: #EF4444; }
.status-indicator-warning     .status-indicator-dot { background: #F97316; }
.status-indicator-offline     .status-indicator-dot { background: #9CA3AF; }

/* Metrics 2×2 grid */
.product-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.metric-item {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 12px;
    padding: 11px 13px;
    transition: border-color 0.2s;
}

.metric-item:hover { border-color: rgba(234,156,34,0.18); }

.metric-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.38);
    margin-bottom: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.metric-label i { font-size: 11px; color: #EA9C22; }

.metric-value {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1.2;
}

.metric-value.text-undetected { color: #22C55E; }
.metric-value.text-beta        { color: #EA9C22; }
.metric-value.text-detected    { color: #EF4444; }
.metric-value.text-success     { color: #22C55E; }
.metric-value.text-warning     { color: #EA9C22; }
.metric-value.text-danger      { color: #EF4444; }
.metric-value.text-white       { color: #ffffff; }
.metric-value i { font-size: 13px; }

/* ── Additional Services ───────────────────────────── */
.additional-services { margin-bottom: 48px; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 14px;
}

.service-card {
    background: #0e0d0b;
    border: 1px solid rgba(234, 156, 34, 0.14);
    border-radius: 20px;
    padding: 20px 22px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: border-color 0.22s ease, transform 0.22s ease;
}

.service-card:hover {
    border-color: rgba(234, 156, 34, 0.32);
    transform: translateY(-3px);
}

.service-icon-small {
    width: 44px;
    height: 44px;
    background: rgba(234, 156, 34, 0.09);
    border: 1px solid rgba(234, 156, 34, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: #EA9C22;
    flex-shrink: 0;
}

.service-content { flex: 1; min-width: 0; }

.service-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 7px 0;
}

.service-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 40px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 9px;
}

.service-status-operational {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.28);
    color: #22C55E;
}
.service-status-offline {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #EF4444;
}

.service-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.48);
    margin: 0 0 8px 0;
    line-height: 1.55;
}

.service-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.32);
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.service-meta i { color: #EA9C22; font-size: 11px; }

/* ── Status Legend ─────────────────────────────────── */
.status-legend-section { margin-bottom: 48px; }

.status-legend-title {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    padding: 16px 22px;
    background: #0e0d0b;
    border: 1px solid rgba(234, 156, 34, 0.14);
    border-radius: 18px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.legend-indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-indicator-undetected {
    background: #22C55E;
    box-shadow: 0 0 7px rgba(34, 197, 94, 0.6);
}
.legend-indicator-beta {
    background: #EA9C22;
    box-shadow: 0 0 7px rgba(234, 156, 34, 0.6);
}
.legend-indicator-detected {
    background: #EF4444;
    box-shadow: 0 0 7px rgba(239, 68, 68, 0.6);
}

/* ── Incident History / Timeline ───────────────────── */
.incident-history { margin-bottom: 52px; }

.incident-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timeline-item {
    display: flex;
    gap: 20px;
    padding: 18px 22px;
    background: #0e0d0b;
    border: 1px solid rgba(234, 156, 34, 0.14);
    border-radius: 20px;
    transition: border-color 0.2s ease;
}

.timeline-item:hover { border-color: rgba(234, 156, 34, 0.3); }

.timeline-date {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.32);
    font-weight: 600;
    white-space: nowrap;
    min-width: 84px;
    padding-top: 2px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
}

.timeline-content { flex: 1; min-width: 0; }

.timeline-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 5px 0;
}

.timeline-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.48);
    line-height: 1.55;
    margin: 0 0 10px 0;
}

.timeline-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

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

.status-badge-resolved {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.28);
    color: #22C55E;
}
.status-badge-investigating {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #EF4444;
}
.status-badge-monitoring {
    background: rgba(234, 156, 34, 0.1);
    border: 1px solid rgba(234, 156, 34, 0.28);
    color: #EA9C22;
}

.timeline-duration {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.28);
    font-weight: 500;
}

/* ── Loading / Error states ────────────────────────── */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 56px;
    background: #0e0d0b;
    border: 1px solid rgba(234, 156, 34, 0.14);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.loading-spinner { font-size: 30px; color: #EA9C22; }
.loading-text { font-size: 14px; color: rgba(255,255,255,0.45); margin: 0; }

.error-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 56px;
    background: #0e0d0b;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.error-icon { font-size: 30px; color: #EF4444; }
.error-text  { font-size: 14px; color: rgba(255,255,255,0.45); margin: 0; }

.spin { animation: spinAnim 0.9s linear infinite; }
@keyframes spinAnim { to { transform: rotate(360deg); } }

/* ── Empty state ───────────────────────────────────── */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 40px;
    background: rgba(255,255,255,0.015);
    border: 1px dashed rgba(255,255,255,0.07);
    border-radius: 22px;
}

.empty-state-icon { font-size: 40px; color: rgba(255,255,255,0.1); margin-bottom: 14px; }
.empty-state-text { font-size: 14px; color: rgba(255,255,255,0.3); margin: 0; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 992px) {
    .global-status-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .auto-refresh-notice { align-self: flex-start; }
    .overview-grid { grid-template-columns: repeat(2, 1fr); }
    .status-cards-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .overview-grid { grid-template-columns: 1fr 1fr; }
    .product-metrics { grid-template-columns: 1fr 1fr; }
    .timeline-item { flex-direction: column; gap: 8px; }
    .timeline-date { min-width: auto; }
    .status-legend { flex-direction: column; gap: 10px; }
}

@media (max-width: 480px) {
    .overview-grid { grid-template-columns: 1fr; }
    .product-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .product-metrics { grid-template-columns: 1fr; }
}
