.parent-portal-body {
    background: #f5f7fb;
    color: #1f2937;
    min-height: 100vh;
}

.portal-header {
    align-items: center;
    background: var(--portal-primary);
    color: var(--portal-button-text);
    display: flex;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 24px;
}

.portal-brand {
    align-items: center;
    color: var(--portal-button-text);
    display: flex;
    font-size: 18px;
    font-weight: 700;
    gap: 12px;
    text-decoration: none;
}

.portal-brand img {
    height: 36px;
    max-width: 120px;
    object-fit: contain;
}

.portal-link-button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 6px;
    color: var(--portal-button-text);
    padding: 8px 14px;
}

.portal-shell {
    margin: 0 auto;
    max-width: 1120px;
    padding: 32px 20px;
}

.portal-login,
.portal-form-page {
    display: grid;
    min-height: calc(100vh - 128px);
    place-items: center;
}

.portal-login-panel,
.portal-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
    padding: 24px;
}

.portal-login-panel,
.portal-form-card {
    max-width: 480px;
    width: 100%;
}

.portal-kicker {
    color: var(--portal-accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.portal-muted {
    color: #6b7280;
}

.portal-form {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.portal-form label {
    color: #374151;
    display: grid;
    font-weight: 600;
    gap: 6px;
}

.portal-auth-link {
    margin: 16px 0 0;
    text-align: center;
}

.portal-auth-link a {
    color: var(--portal-primary);
    font-weight: 700;
    text-decoration: none;
}

.portal-primary-button,
.portal-small-button {
    align-items: center;
    background: var(--portal-primary);
    border: 0;
    border-radius: 6px;
    color: var(--portal-button-text);
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    text-decoration: none;
}

.portal-small-button {
    font-size: 13px;
    min-height: 34px;
    padding: 6px 12px;
}

.portal-page-heading {
    align-items: end;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 24px;
}

.portal-page-heading h1,
.portal-card h2 {
    margin-bottom: 4px;
}

.portal-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.portal-card-header {
    align-items: start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.portal-badge {
    background: color-mix(in srgb, var(--portal-accent) 16%, #fff);
    border-radius: 999px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    white-space: nowrap;
}

.portal-stats {
    display: grid;
    gap: 12px;
    margin: 18px 0;
}

.portal-stats div,
.portal-balance {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
}

.portal-stats dt,
.portal-balance span {
    color: #6b7280;
    font-size: 13px;
}

.portal-stats dd,
.portal-balance strong {
    color: #111827;
    display: block;
    font-size: 22px;
    font-weight: 800;
    margin: 0;
}

.portal-section {
    margin-top: 28px;
}

.portal-table-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow-x: auto;
}

.portal-table {
    margin: 0;
    min-width: 720px;
    width: 100%;
}

.portal-table th,
.portal-table td {
    border-bottom: 1px solid #eef2f7;
    padding: 12px 14px;
}

.portal-table th {
    color: #4b5563;
    font-size: 13px;
    text-transform: uppercase;
}

.portal-empty {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    padding: 22px;
}

@media (max-width: 720px) {
    .portal-header,
    .portal-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
