:root {
    --green: #58d68d;
    --yellow: #f4d03f;
    --red: #ff6b6b;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, .72);
    --glass: rgba(16, 22, 18, .62);
    --glass-border: rgba(255, 255, 255, .18);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
}

body {
    min-height: 100vh;
    color: var(--text);
    background:
        linear-gradient(rgba(0, 0, 0, .63), rgba(0, 0, 0, .72)),
        url("../img/fundo.jpg") center/cover fixed no-repeat,
        linear-gradient(135deg, #26372a, #0c1710);
}

.background-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 10%, rgba(90, 170, 90, .18), transparent 32%),
        radial-gradient(circle at 85% 85%, rgba(34, 85, 52, .18), transparent 28%);
    pointer-events: none;
}

.dashboard {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 20px;
}

.glass {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(13px);
    -webkit-backdrop-filter: blur(13px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .32);
}

.hero {
    border-radius: 22px;
    padding: 24px 28px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
}

.crest {
    width: 92px;
    max-height: 112px;
    object-fit: contain;
}

.eyebrow {
    color: var(--green);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .16em;
    margin-bottom: 7px;
}

h1 {
    font-size: clamp(1.65rem, 3vw, 2.55rem);
    letter-spacing: .03em;
}

.subtitle,
#last-update,
.metric small {
    color: var(--muted);
}

.subtitle {
    margin-top: 5px;
}

.overall-status {
    min-width: 165px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    padding: 12px 16px;
    font-weight: 700;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 12px currentColor;
}

.status-dot.online { background: var(--green); color: var(--green); }
.status-dot.offline { background: var(--red); color: var(--red); }
.status-dot.loading { background: var(--yellow); color: var(--yellow); }

.metrics {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.metric {
    border-radius: 17px;
    padding: 18px;
    min-height: 126px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-label {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 700;
}

.metric strong {
    font-size: 1.65rem;
    margin: 7px 0 4px;
}

.bar {
    height: 7px;
    background: rgba(255, 255, 255, .12);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 10px;
}

.bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4caf68, #7ce49c);
    transition: width .5s ease;
}

.services-section {
    margin-top: 18px;
    border-radius: 22px;
    padding: 24px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.section-heading h2 {
    font-size: 1.55rem;
}

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

.service-card {
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, .075);
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 16px;
    padding: 17px;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.service-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, .12);
    border-color: rgba(88, 214, 141, .55);
}

.service-header,
.service-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.service-name {
    font-size: 1rem;
    font-weight: 800;
}

.service-description {
    color: var(--muted);
    min-height: 36px;
    font-size: .86rem;
    margin: 9px 0 16px;
}

.badge {
    border-radius: 999px;
    padding: 5px 9px;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .06em;
}

.badge.online {
    color: #bfffd3;
    background: rgba(35, 150, 75, .25);
}

.badge.offline {
    color: #ffd0d0;
    background: rgba(190, 55, 55, .27);
}

.service-footer {
    color: var(--muted);
    font-size: .77rem;
}

footer {
    text-align: center;
    color: rgba(255,255,255,.62);
    font-size: .72rem;
    padding: 18px 0 0;
}

@media (max-width: 900px) {
    .metrics { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
    .dashboard { width: min(100% - 20px, 1180px); padding-top: 10px; }
    .hero { grid-template-columns: 1fr; text-align: center; }
    .crest { margin: 0 auto; }
    .overall-status { margin: 0 auto; }
    .metrics, .services-grid { grid-template-columns: 1fr; }
    .section-heading { align-items: flex-start; flex-direction: column; }
}
