/* AIKA Status Page — Dark Theme */

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

:root {
    --bg-primary: #0f0a1a;
    --bg-secondary: #1a1035;
    --bg-card: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.08);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #6366f1;
    --green: #22c55e;
    --yellow: #eab308;
    --red: #ef4444;
    --max-width: 720px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: #a5b4fc; text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Header --- */
.header {
    border-bottom: 1px solid var(--border);
    background: rgba(15, 10, 26, 0.85);
    backdrop-filter: blur(12px);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.logo-img { width: 32px; height: 32px; border-radius: 8px; }

.nav { display: flex; gap: 1rem; }
.nav a { color: var(--text-secondary); font-size: 0.9rem; }
.nav a:hover { color: #fff; text-decoration: none; }

/* --- Fo tartalom --- */
.main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

/* --- Osszegesitett allapot banner --- */
.overall-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.overall-status.operational {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.3);
    color: var(--green);
}

.overall-status.degraded {
    background: rgba(234, 179, 8, 0.08);
    border-color: rgba(234, 179, 8, 0.3);
    color: var(--yellow);
}

.overall-status.major_outage {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--red);
}

/* --- Allapot pont --- */
.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.operational { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-dot.degraded, .status-dot.down-partial { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.status-dot.down { background: var(--red); box-shadow: 0 0 8px var(--red); }
.status-dot.unknown, .status-dot.loading-dot { background: var(--text-muted); }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.status-dot.loading-dot { animation: pulse 1.5s infinite; }

/* --- Uptime bar --- */
.uptime-bar {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.uptime-item {
    text-align: center;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 120px;
}

.uptime-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--green);
}

.uptime-value.warning { color: var(--yellow); }
.uptime-value.critical { color: var(--red); }

.uptime-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* --- Service kartya --- */
.services {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.2s;
}

.service-row:hover { border-color: rgba(255, 255, 255, 0.15); }

.service-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-icon { font-size: 1.3rem; }

.service-name { font-weight: 600; font-size: 0.95rem; }

.service-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.service-status.operational { color: var(--green); }
.service-status.down { color: var(--red); }
.service-status.unknown { color: var(--text-muted); }

.latency {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

/* --- Incidensek --- */
.incidents-section { margin-bottom: 2rem; }
.incidents-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.incident-card {
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.incident-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.incident-title { font-weight: 600; font-size: 0.95rem; }

.incident-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.incident-badge.resolved { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.incident-badge.investigating { background: rgba(234, 179, 8, 0.15); color: var(--yellow); }
.incident-badge.identified { background: rgba(234, 179, 8, 0.15); color: var(--yellow); }
.incident-badge.monitoring { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }

.incident-badge.minor { border: 1px solid rgba(234, 179, 8, 0.3); }
.incident-badge.major { border: 1px solid rgba(239, 68, 68, 0.3); }
.incident-badge.critical { border: 1px solid rgba(239, 68, 68, 0.6); }

.incident-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.incident-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.no-incidents {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Utolso ellenorzes --- */
.last-check {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* --- Betoltes --- */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* --- Lablec --- */
.footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Reszponziv --- */
@media (max-width: 640px) {
    .service-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .uptime-bar { flex-direction: column; align-items: center; }
}
