:root {
    font-family: Arial, Tahoma, sans-serif;
    color: #0f1f3d;
    background: #f4f7fb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(55, 120, 220, 0.08), transparent 30%),
        #f4f7fb;
}

button,
input {
    font: inherit;
}

.page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
}

.card {
    width: min(100%, 620px);
    background: #ffffff;
    border: 1px solid #dfe6ef;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 18px 50px rgba(15, 31, 61, 0.08);
}

.top-row,
.plan-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.user-block strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
}

.muted,
.eyebrow {
    color: #73809a;
    font-size: 14px;
}

.plan-title {
    margin-top: 28px;
}

.plan-title h1 {
    margin: 5px 0 0;
    font-size: clamp(28px, 6vw, 38px);
    letter-spacing: -0.5px;
}

.secondary {
    border: 0;
    border-radius: 12px;
    background: #eef2f7;
    color: #102143;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 700;
}

.secondary:hover {
    background: #e4eaf2;
}

.status-badge {
    padding: 9px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
}

.status-active {
    color: #166534;
    background: #dcfce7;
}

.status-exhausted,
.status-error {
    color: #991b1b;
    background: #fee2e2;
}

.status-provisioning {
    color: #92400e;
    background: #fef3c7;
}

.status-replaced {
    color: #475569;
    background: #e2e8f0;
}

.gauge-wrap {
    width: min(100%, 350px);
    margin: 28px auto 12px;
}

.gauge {
    --gauge-angle: 0deg;
    --gauge-color: #16a34a;

    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    position: relative;
    display: grid;
    place-items: center;

    background:
        conic-gradient(
            from 225deg,
            var(--gauge-color) 0deg var(--gauge-angle),
            #e8edf3 var(--gauge-angle) 270deg,
            transparent 270deg 360deg
        );

    filter: drop-shadow(0 10px 16px rgba(15, 31, 61, 0.08));
}

.gauge::before {
    content: "";
    position: absolute;
    inset: 34px;
    border-radius: 50%;
    background: white;
    box-shadow: inset 0 0 0 1px #edf1f6;
}

.gauge::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gauge-color);
    bottom: 42px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 0 7px rgba(255,255,255,0.95);
}

.gauge-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    transform: translateY(-6px);
}

.gauge-percent {
    font-size: clamp(42px, 9vw, 62px);
    font-weight: 800;
    line-height: 1;
    color: var(--gauge-color);
}

.gauge-caption {
    margin-top: 8px;
    color: #73809a;
    font-size: 14px;
}

.gauge-scale {
    display: flex;
    justify-content: space-between;
    margin-top: -56px;
    padding: 0 42px;
    color: #8994a8;
    font-size: 12px;
    font-weight: 700;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 40px;
}

.stat {
    border: 1px solid #dfe6ef;
    border-radius: 15px;
    padding: 17px;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat span {
    color: #73809a;
    font-size: 13px;
    margin-bottom: 7px;
}

.stat strong {
    font-size: 20px;
}

.stat.highlight {
    background: #f8fbff;
}

.meter-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 20px;
    color: #66738b;
    font-size: 12px;
}

.meter-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 50%;
}

.dot.green {
    background: #16a34a;
}

.dot.yellow {
    background: #f59e0b;
}

.dot.red {
    background: #dc2626;
}

.footer-info {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #edf1f6;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #748098;
    font-size: 12px;
}

.empty-state {
    padding: 48px 0 22px;
    text-align: center;
}

.empty-state h1 {
    margin-bottom: 10px;
}

.empty-state p {
    color: #73809a;
}

@media (max-width: 560px) {
    .page {
        padding: 0;
        place-items: stretch;
    }

    .card {
        min-height: 100vh;
        border-radius: 0;
        border: 0;
        padding: 24px 18px;
    }

    .plan-title {
        align-items: flex-start;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .gauge-wrap {
        width: min(100%, 310px);
    }

    .gauge::before {
        inset: 30px;
    }

    .footer-info {
        flex-direction: column;
    }
}
