html {
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    margin: 0 auto;
    max-width: 1180px;
    min-height: 100vh;
    padding: 20px;
    background: #f4f7f8;
    color: #1f2933;
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    line-height: 1.4;
}

a {
    color: inherit;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

.portal-topbar,
.portal-nav,
.portal-hero,
.portal-card-grid,
.portal-quick-links {
    background: #fff;
    border: 1px solid #dde7ea;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(31, 41, 51, 0.04);
}

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

.portal-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.portal-brand__logo {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: linear-gradient(135deg, #dbe9ee 0%, #b8d3db 100%);
    color: #205b66;
    font-size: 28px;
    font-weight: 700;
}

.portal-brand__eyebrow {
    color: #5f7a82;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-brand__text h1 {
    font-size: 30px;
    line-height: 1.05;
}

.portal-topbar__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.portal-user {
    display: grid;
    gap: 2px;
    margin-right: 6px;
    text-align: right;
}

.portal-user strong {
    font-size: 15px;
}

.portal-user span {
    color: #617780;
    font-size: 13px;
}

.portal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid #3e7280;
    border-radius: 12px;
    background: #3e7280;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
}

.portal-button[hidden] {
    display: none;
}

.portal-button--ghost {
    background: #fff;
    color: #2f6170;
}

.portal-nav {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 18px;
    overflow: hidden;
}

.portal-nav__item {
    flex: 1 1 150px;
    padding: 14px 12px;
    border-right: 1px solid #e6eef1;
    color: #445a63;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}

.portal-nav__item:last-child {
    border-right: 0;
}

.portal-hero {
    margin-bottom: 18px;
    padding: 56px 40px;
    background: linear-gradient(180deg, #edf5f8 0%, #d7e5ea 100%);
}

.portal-hero__content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.portal-hero__eyebrow {
    color: #54727b;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-hero__content h2 {
    margin-top: 10px;
    font-size: 44px;
    line-height: 1.08;
}

.portal-hero__content p {
    margin-top: 14px;
    color: #42525a;
    font-size: 20px;
}

.portal-hero__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 26px;
}

.portal-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
    padding: 18px;
}

.portal-card {
    padding: 16px;
    border: 1px solid #e2ebee;
    border-radius: 16px;
    background: #fbfcfd;
}

.portal-card__media {
    height: 150px;
    margin-bottom: 16px;
    border-radius: 12px;
    background:
        linear-gradient(135deg, transparent 49%, #c4d5db 50%, transparent 51%),
        linear-gradient(45deg, transparent 49%, #c4d5db 50%, transparent 51%),
        #e8f0f3;
}

.portal-card h3 {
    color: #59737d;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.portal-card h4 {
    margin-top: 8px;
    font-size: 24px;
    line-height: 1.2;
}

.portal-card p {
    margin-top: 10px;
    color: #52636b;
}

.portal-card__meta {
    display: inline-block;
    margin-top: 14px;
    color: #628390;
    font-size: 14px;
    font-weight: 600;
}

.portal-quick-links {
    padding: 24px;
}

.portal-quick-links__header h2 {
    margin-top: 8px;
    font-size: 30px;
}

.portal-quick-links__header p {
    margin-top: 10px;
    max-width: 760px;
    color: #52636b;
    font-size: 18px;
}

.portal-priorities__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    justify-content: space-around;
}

.portal-quick-links__items {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.quick-link {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 18px;
    border: 1px solid #dbe6ea;
    border-radius: 12px;
    background: #f7fafb;
}

a.quick-link {
    color: inherit;
    text-decoration: none;
}

a.quick-link:hover strong {
    color: #2f6170;
}

.quick-link strong {
    color: #1f2933;
    min-width: 190px;
}

.quick-link span {
    color: #50626b;
    flex: 1;
}

@media (max-width: 980px) {
    .portal-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body {
        padding: 12px;
    }

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

    .portal-topbar__actions {
        justify-content: flex-start;
    }

    .portal-user {
        margin-right: 0;
        text-align: left;
    }

    .portal-hero {
        padding: 36px 20px;
    }

    .portal-hero__content h2 {
        font-size: 34px;
    }

    .portal-hero__content p {
        font-size: 18px;
    }

    .portal-hero__actions {
        flex-direction: column;
    }

    .quick-link {
        flex-direction: column;
    }

    .quick-link strong {
        min-width: 0;
    }
}

@media (max-width: 520px) {
    .portal-brand {
        align-items: flex-start;
    }

    .portal-brand__text h1 {
        font-size: 24px;
    }

    .portal-nav__item {
        flex-basis: 100%;
    }
}
