* {
    box-sizing: border-box;
}

:root {
    --background: #08090d;
    --surface: #11131a;
    --surface-2: #171a22;
    --border: #242834;
    --text: #f4f6fb;
    --muted: #858b9b;
    --blue: #4d8dff;
    --green: #35d07f;
    --red: #ff6262;
}


body {
    margin: 0;

    background:
        radial-gradient(
            circle at 50% -10%,
            #17243d 0,
            #08090d 45%
        );

    color: var(--text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


.app {
    width: min(1150px, 100%);

    margin: auto;

    padding:
        45px 25px
        35px;
}


/* HEADER */

.header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 25px;
}


.eyebrow {
    color: var(--blue);

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 2px;
}


h1 {
    margin:
        5px 0;

    font-size: 34px;

    letter-spacing: -1px;
}


.header p {
    margin: 0;

    color: var(--muted);
}


.refresh {
    border: 1px solid var(--border);

    background: var(--surface);

    color: white;

    padding:
        11px 17px;

    border-radius: 11px;

    cursor: pointer;

    font-weight: 600;

    transition: .2s;
}


.refresh:hover {
    background: var(--surface-2);

    border-color: #3a4050;
}


.refresh:disabled {
    opacity: .5;

    cursor: wait;
}


/* STATUS */

.status {
    display: inline-flex;

    padding:
        8px 12px;

    margin-bottom: 20px;

    border-radius: 9px;

    background: var(--surface);

    border: 1px solid var(--border);

    color: var(--muted);

    font-size: 13px;
}


.status.success {
    color: var(--green);
}


.status.error {
    color: var(--red);
}


/* CARDS */

.cards {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 14px;
}


.card {
    padding: 21px;

    background:
        linear-gradient(
            145deg,
            rgba(23, 26, 34, .95),
            rgba(14, 16, 22, .95)
        );

    border: 1px solid var(--border);

    border-radius: 16px;

    min-height: 170px;

    transition: .2s;
}


.card:hover {
    transform: translateY(-2px);

    border-color: #343b4b;
}


.card-icon {
    font-size: 22px;

    margin-bottom: 15px;
}


.label {
    color: var(--muted);

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 1px;
}


.value {
    margin-top: 5px;

    font-size: 29px;

    font-weight: 750;

    letter-spacing: -1px;
}


.description {
    margin-top: 5px;

    color: #626978;

    font-size: 12px;
}


/* WIDE GRID */

.wide-grid {
    display: grid;

    grid-template-columns:
        1.5fr 1fr;

    gap: 14px;

    margin-top: 14px;
}


.panel {
    padding: 23px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 16px;
}


.panel-header {
    display: flex;

    justify-content: space-between;

    margin-bottom: 25px;
}


.panel-header h2 {
    margin: 0;

    font-size: 18px;
}


.panel-header span {
    display: block;

    margin-top: 4px;

    color: var(--muted);

    font-size: 12px;
}


/* OVERVIEW */

.overview {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 20px;
}


.overview div {
    display: flex;

    flex-direction: column;

    gap: 5px;
}


.overview span {
    color: var(--muted);

    font-size: 12px;
}


.overview strong {
    font-size: 15px;
}


/* RETENTION */

.retention {
    min-height: 130px;

    display: flex;

    align-items: center;

    gap: 25px;
}


.retention-number {
    font-size: 48px;

    font-weight: 800;

    letter-spacing: -2px;

    color: var(--green);
}


.retention strong {
    font-size: 16px;
}


.retention p {
    margin-top: 7px;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.5;
}


/* FOOTER */

footer {
    display: flex;

    justify-content: space-between;

    margin-top: 25px;

    color: #555b69;

    font-size: 11px;
}


/* MOBILE */

@media (max-width: 850px) {

    .cards {
        grid-template-columns:
            repeat(2, 1fr);
    }

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


@media (max-width: 550px) {

    .app {
        padding:
            30px 15px;
    }

    .header {
        align-items: flex-start;

        flex-direction: column;
    }

    h1 {
        font-size: 29px;
    }

    .refresh {
        width: 100%;
    }

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

    .card {
        min-height: auto;
    }

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

    .retention {
        align-items: flex-start;

        flex-direction: column;

        gap: 10px;
    }

    footer {
        flex-direction: column;

        gap: 5px;
    }
}