body {
    background: #eef2f5;
}

.portal-shell {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.portal-auth-card,
.portal-panel,
.portal-admin-summary,
.portal-hero {
    background: #ffffff;
    border: 1px solid rgba(30, 58, 95, 0.12);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.portal-auth-card {
    max-width: 460px;
    margin: 48px auto 0;
    padding: 28px;
}

.portal-profile-card {
    max-width: 520px;
}

.portal-recovery-card {
    max-width: 520px;
}

.portal-profile-section + .portal-profile-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e6ebef;
}

.portal-profile-section h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

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

.portal-readonly-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 15px;
    color: #171717;
}

.portal-field-label {
    color: #5b6873;
    font-size: 13px;
}

.portal-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: #1e3a5f;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-copy {
    color: #53606c;
    line-height: 1.5;
}

.portal-form {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.portal-form label {
    font-size: 14px;
    font-weight: bold;
}

.portal-form input {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #cdd6dd;
    border-radius: 6px;
    font-size: 15px;
}

.portal-form textarea {
    min-height: 108px;
    padding: 10px 12px;
    border: 1px solid #cdd6dd;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
}

.portal-form button {
    margin-top: 6px;
    border: none;
}

.portal-help {
    margin: 18px 0 0;
    color: #66727c;
    font-size: 13px;
}

.portal-inline-link {
    margin: 14px 0 0;
    font-size: 14px;
}

.portal-inline-link a {
    color: #1e3a5f;
    text-decoration: none;
    font-weight: bold;
}

.portal-status {
    display: none;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.portal-status.is-visible {
    display: block;
}

.portal-status.is-error {
    background: #fff1f1;
    color: #8f1f1f;
    border: 1px solid #f2c7c7;
}

.portal-status.is-success {
    background: #eef9f1;
    color: #166534;
    border: 1px solid #bfe3c9;
}

.portal-status.is-loading {
    background: #eef4ff;
    color: #1e3a5f;
    border: 1px solid #c9d8f2;
}

.portal-dashboard-shell {
    display: grid;
    gap: 20px;
}

.portal-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 24px;
}

.portal-hero h1 {
    margin: 4px 0 8px;
}

.portal-logout-button {
    border-color: #1e3a5f;
    color: #1e3a5f;
    background: transparent;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.portal-stat {
    background: #ffffff;
    border: 1px solid rgba(30, 58, 95, 0.12);
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.portal-stat strong {
    display: block;
    margin-top: 8px;
    font-size: 24px;
}

.portal-stat span {
    color: #5b6873;
    font-size: 13px;
}

.portal-admin-summary {
    padding: 20px 24px;
}

.portal-admin-summary h2,
.portal-panel-header h2 {
    margin: 0;
}

.portal-admin-summary p {
    margin: 6px 0 0;
    color: #5b6873;
}

.portal-panel {
    padding: 20px 24px;
}

.portal-panel-header {
    margin-bottom: 14px;
}

.portal-table-wrap {
    overflow-x: auto;
}

.portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.portal-table th,
.portal-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e6ebef;
    text-align: left;
    white-space: nowrap;
}

.portal-table th {
    color: #51606d;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.portal-empty {
    color: #66727c;
    font-size: 14px;
}

.portal-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.portal-pill.is-admin {
    background: #dbeafe;
    color: #1d4ed8;
}

.portal-pill.is-standard {
    background: #ecfdf3;
    color: #15803d;
}

.portal-pill.is-pending {
    background: #fff7dd;
    color: #8a5a00;
}

.portal-pill.is-paid {
    background: #eef9f1;
    color: #166534;
}

.portal-pill.is-cancelled {
    background: #f4f4f5;
    color: #52525b;
}

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

    .portal-readonly-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .navbar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .navbar nav {
        flex-wrap: wrap;
    }

    .portal-shell {
        width: min(100% - 24px, 1100px);
        padding-top: 20px;
    }

    .portal-auth-card,
    .portal-panel,
    .portal-admin-summary,
    .portal-hero {
        padding: 18px;
    }

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

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