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

body {
    /* background: linear-gradient(to bottom, #1a4d2e, #2a6d4e, #1a4d2e); */
    background: repeating-linear-gradient(45deg,
            #2a6d4e,
            #2a6d4e 20px,
            #1e5a3e 20px,
            #1e5a3e 40px);
    background-size: cover;
    background-color: #1a4d2e;
    color: #d1fae5;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    position: sticky;
    z-index: 1000;
    top: 0;
    background-color: rgba(42, 109, 78, 0.5);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    color: #ffffff;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 2px solid #3d7a5d;
}


#logo {
    height: 72px;
    width: auto;          
    object-fit: contain;
    line-height: 1;
    position: absolute;
    left: 1rem;
    top: 60%;
    transform: translateY(-50%);
}

header>div {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 0;
}

header p {
    margin-top: 0.5rem;
    font-size: 1.125rem;
    font-weight: 500;
    color: #a7f3d0;
    margin: 0;
}


main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    align-items: stretch;
    /* makes all cards the same height */
    justify-content: center;
    width: 100%;
    max-width: 1216px;
}

.card {
    background-color: rgba(13, 40, 24, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: 0.5rem;
    border: 2px solid #3d7a5d;
    max-width: 38rem;
    width: 100%;
    padding: 2rem;
    backdrop-filter: blur(12px);
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .cards-container {
        flex-wrap: nowrap;
    }

    .card {
        max-width: none;
    }

    #logo {
        height: 96px;     
    }
}

/* Align logo with the left edge of the centered .cards-container when viewport
   is wider than the container's max-width (1216px). The calculation finds the
   left gutter ((100% - 1216px)/2) and adds the small 1rem inset we use by default. */
@media (min-width: 1216px) {
    #logo {
        left: calc((100% - 1216px) / 2 + 1rem);
    }
}

h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #34d399;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

h2 svg {
    width: 1.5rem;
    height: 1.5rem;
}

.error-box {
    color: #f87171;
    font-weight: 600;
    margin-bottom: 1rem;
    background-color: rgba(127, 29, 29, 0.2);
    border: 1px solid #991b1b;
    border-radius: 0.5rem;
    padding: 0.75rem;
}

ul {
    list-style: none;
}

.info-list {
    border-top: 1px solid #3d7a5d;
}

.info-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #3d7a5d;
    gap: 1rem;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #a7f3d0;
    min-width: 140px;
    flex-shrink: 0;
}

.info-value {
    font-family: 'Courier New', monospace;
    color: #34d399;
    text-align: left;
}

.cpu-bar-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    flex: 1;
    min-width: 0;
}

.cpu-bar-wrapper {
    flex: 1;
    background-color: #3d7a5d;
    border-radius: 0.25rem;
    height: 1.25rem;
    position: relative;
    overflow: hidden;
}

.cpu-bar {
    height: 100%;
    background: linear-gradient(90deg, #34d399 0%, #10b981 100%);
    border-radius: 0.25rem;
    transition: width 0.3s ease;
    min-width: 2px;
}

.cpu-bar.high {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.cpu-bar.critical {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.cpu-value {
    font-family: 'Courier New', monospace;
    color: #34d399;
    font-size: 0.875rem;
    min-width: 3.5rem;
    text-align: right;
}

.services-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #34d399;
    margin-top: 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.services-title svg {
    width: 1.25rem;
    height: 1.25rem;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(61, 122, 93, 0.5);
    border-radius: 0.5rem;
    padding: 0.75rem;
    color: #d1fae5;
    border: 1px solid #3d7a5d;
}

.service-item a {
    color: #34d399;
    text-decoration: underline;
    transition: color 0.2s;
}

.service-item a:hover {
    color: #6ee7b7;
}

.service-status {
    font-family: 'Courier New', monospace;
}

footer {
    text-align: center;
    padding: 0.5rem;
    color: #a7f3d0;
    font-weight: 500;
    background-color: rgba(42, 109, 78, 0.5);
    backdrop-filter: blur(8px);
    border-top: 2px solid #3d7a5d;
}

footer a {
    color: #34d399;
    text-decoration: underline;
    transition: color 0.2s;
}

footer a:hover {
    color: #6ee7b7;
}

svg.w-10 {
    width: 2.5rem;
    height: 2.5rem;
}

.card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-heading h2 {
    margin-bottom: 0;
}