.portal-page {
    width: min(100%, 860px);
    max-width: 860px;
    margin: 0 auto;
    padding-bottom: 26px;
}

.portal-brand { margin-bottom: 38px; }
.portal-heading { max-width: 520px; }
.portal-heading h1 {
    margin-bottom: 14px;
    font-size: clamp(2.1rem, 4.5vw, 3.2rem);
    line-height: 1.08;
}

.portal-heading > p:last-child {
    max-width: 470px;
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.75;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 32px;
}

.portal-card {
    display: flex;
    min-width: 0;
    min-height: 280px;
    flex-direction: column;
    align-items: flex-start;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
}

.portal-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin-bottom: 22px;
    place-items: center;
    border-radius: 14px;
    background: var(--pale);
    color: var(--blue);
    font-family: Manrope, 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
}

.portal-icon-platform { background: #eaf7f3; color: #138a64; }
.portal-card .eyebrow { margin-bottom: 6px; }
.portal-card h2 { margin: 0 0 10px; font-size: 1.35rem; }
.portal-description { flex: 1; color: var(--muted); font-size: .92rem; line-height: 1.6; margin-bottom: 22px; }
.portal-card .button { margin-top: auto; }

.portal-signin {
    width: min(100%, 450px);
    margin-top: 38px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}

.portal-form { display: grid; gap: 15px; }
.portal-form label { display: grid; gap: 8px; color: #40506a; font-size: .9rem; font-weight: 700; }
.portal-form input { width: 100%; min-width: 0; min-height: 47px; }
.portal-form .button { min-height: 48px; margin-top: 8px; }
.portal-register { margin: 29px 0 10px; color: var(--muted); font-size: .9rem; }
.portal-register a,.portal-home { color: var(--blue); font-weight: 700; }
.portal-home { font-size: .88rem; }

.customer-shell .customer-topbar.admin-portal-topbar {
    width: max-content;
    min-height: 0;
    margin: 0 auto 48px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.customer-shell .admin-portal-topbar .customer-brand-mark { width: 36px; height: 36px; border-radius: 12px; }

@media (max-width: 640px) {
    .portal-page { padding-bottom: 10px; }
    .portal-grid { grid-template-columns: 1fr; gap: 13px; margin-top: 24px; }
    .portal-card { min-height: 0; padding: 22px; }
    .portal-card .button { margin-top: 0; }
    .customer-shell .customer-topbar.admin-portal-topbar { margin-bottom: 35px; }
}
