/* Page layout: shell, top bar, hero, grids, and footer. */

.shell {
    width: min(1500px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0 42px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
    padding: 8px 2px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-mark {
    position: relative;
    display: grid;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    place-items: center;
    overflow: hidden;
    color: #ffffff;
    background:
        linear-gradient(
            145deg,
            var(--blue-strong),
            #6d28d9
        );
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    box-shadow:
        0 10px 32px rgba(37, 99, 235, 0.28);
}

.brand-mark::after {
    position: absolute;
    right: -10px;
    bottom: -18px;
    width: 42px;
    height: 42px;
    content: "";
    background: rgba(34, 211, 238, 0.43);
    border-radius: 50%;
    filter: blur(5px);
}

.brand-mark svg {
    position: relative;
    z-index: 1;
    width: 30px;
    height: 30px;
}

.brand-copy {
    min-width: 0;
}

.brand-copy h1 {
    margin: 0;
    overflow: hidden;
    font-size: clamp(1.15rem, 2.3vw, 1.65rem);
    font-weight: 720;
    letter-spacing: -0.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-copy p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.account {
    max-width: 310px;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.88rem;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(285px, 0.7fr);
    gap: 24px;
    overflow: hidden;
    margin-bottom: 20px;
    padding: clamp(24px, 4vw, 38px);
    background:
        linear-gradient(
            130deg,
            rgba(30, 64, 175, 0.49),
            rgba(15, 29, 51, 0.91) 58%,
            rgba(88, 28, 135, 0.28)
        );
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
}

.hero::before {
    position: absolute;
    top: -85px;
    right: -70px;
    width: 330px;
    height: 330px;
    content: "";
    background:
        radial-gradient(
            circle,
            rgba(34, 211, 238, 0.17),
            transparent 67%
        );
    pointer-events: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 13px;
    color: #bae6fd;
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.eyebrow-dot {
    width: 8px;
    height: 8px;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow:
        0 0 14px rgba(34, 211, 238, 0.88);
}

.hero h2 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(1.9rem, 5vw, 3.3rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero h2 span {
    color: #a5f3fc;
}

.hero-description {
    max-width: 780px;
    margin: 16px 0 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.hero-tag {
    padding: 7px 10px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.36);
    border: 1px solid rgba(147, 197, 253, 0.17);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 620;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.77fr);
    gap: 20px;
    margin-bottom: 20px;
}

.stack {
    display: grid;
    gap: 20px;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 4px 2px;
    color: var(--muted);
    font-size: 0.74rem;
}

.footer-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.environment-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.11);
    border: 1px solid rgba(245, 158, 11, 0.20);
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.environment-badge::before {
    width: 6px;
    height: 6px;
    content: "";
    background: var(--yellow);
    border-radius: 50%;
}

@media (max-width: 1120px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* An odd tile out spans the row rather than sitting half-empty. */
    .kpi-grid > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

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

@media (max-width: 820px) {
    .shell {
        width: min(100% - 24px, 1500px);
        padding-top: 14px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .account {
        max-width: 60vw;
        text-align: left;
    }

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

@media (max-width: 560px) {
    .brand-copy p {
        display: none;
    }

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

    .hero {
        padding: 23px 19px;
    }

    .footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
