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

body {
    font-family: Nunito, Arial, sans-serif;
    background: #f2f2f2;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    background: #f2f2f2;
}

.header {
    display: none;
}

.nav {
    background: #1a1844;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 104px;
}

.nav-brand {
    color: white;
    font-size: 24px;
    font-weight: 700;
    line-height: 48px;
}

.status-banner {
    background: #1bb31b;
    color: white;
    padding: 16px 24px;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    margin: 16px 80px;
    border-radius: 8px;
}

.status-banner.degraded {
    background: #ff860d;
}

.status-banner.outage {
    background: #ff0d0d;
}

.main-content {
    padding: 0px 80px;
    display:flex;
    flex-direction: column;
    gap:16px;
}

.uptime-header {
    color: #718096;
    font-size: 0.95rem;
    text-align: right;
}

.uptime-link {
    color: #8b5cf6;
    text-decoration: none;
    margin-left: 10px;
}

.uptime-link:hover {
    text-decoration: underline;
}

.services-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.service-group {
    border: 1px solid #cccccc;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.group-header:hover {
    background-color: #f8f8f8;
}

.group-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.expand-icon {
    font-size: 24px;
    font-weight: 400;
    color: #1a1844;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.group-name {
    font-size: 20px;
    font-weight: 600;
    color: #1a1844;
}

.group-status {
    font-size: 16px;
    font-weight: 600;
    color: #1bb31b;
}

.group-status.degraded {
    color: #ff860d;
}

.group-status.outage {
    color: #ff0d0d;
}

.group-uptime-container {
    padding: 0 24px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.group-uptime-bars {
    height: 36px;
}

.group-services {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.group-services.collapsed {
    max-height: 0;
}

.service-item {
    border-top: 1px solid #e8e8e8;
    background: #ffffff;
    padding: 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-item:first-child {
    border-top: 1px solid #e8e8e8;;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-name {
    font-size: 18px;
    font-weight: 400;
    color: #1a1844;
}

.service-status {
    font-size: 16px;
    font-weight: 600;
    color: #1bb31b;
}

.service-status.degraded {
    color: #ff860d;
}

.service-status.outage {
    color: #ff0d0d;
}

.uptime-bar-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.uptime-bars {
    display: flex;
    gap: 2px;
    height: 36px;
    align-items: center;
}

.uptime-bar {
    flex: 1;
    height: 100%;
    background: #48bb78;
    border-radius: 2px;
    transition: all 0.2s;
    cursor: pointer;
}

.uptime-bar.operational {
    background: #00cc00;
}

.uptime-bar.disruption {
    background: #ff860d;
}

.uptime-bar.outage {
    background: #ff0d0d;
}

.uptime-bar.no-data {
    background: #ebebeb;
}

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

.uptime-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #718096;
    font-size: 0.85rem;
}

.uptime-percentage {
    font-weight: 600;
    color: #2d3748;
}

.loading {
    padding: 60px;
    text-align: center;
    color: #718096;
    font-size: 1.1rem;
}

.footer {
    padding: 40px 80px;
    text-align: center;
    color: #666666;
    font-size: 0.9rem;
    border-top: 1px solid #cccccc;
    margin-top: 40px;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: #1a1844;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s;
}

.tooltip.visible {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1023px) {
    .nav {
        padding: 0 20px;
        margin: 20px;
        margin-top: 20px;
    }

    .status-banner {
        padding: 16px 20px;
        margin: 10px 20px;
    }

    .main-content {
        padding: 20px;
    }

    .group-header {
        padding: 16px 20px;
    }

    .group-name {
        font-size: 18px;
    }

    .group-uptime-container {
        padding: 0 20px 16px 20px;
    }

    .service-item {
        padding: 20px;
    }

    .service-name {
        font-size: 16px;
    }

    .uptime-bars {
        gap: 1px;
    }

    .footer {
        padding: 40px 20px;
    }
}
