body.portal-body {
    background: #f2f8f5;
    color: #173c4d;
    font: 16px/1.5 Arial, sans-serif;
}
.portal-body *, .portal-body *::before, .portal-body *::after { box-sizing: border-box; }
.portal-body #wrap { min-height: 100vh; background: none; }
.portal-body #header {
    height: auto;
    padding: 22px max(24px, calc((100% - 1040px) / 2));
    background: #fff;
    border-bottom: 1px solid #e8f0ef;
}
.portal-body .clinic-brand { display: flex; align-items: center; gap: 12px; }
.portal-body .clinic-brand-text { min-width: 0; }
.portal-body .clinic-logo { flex: 0 0 52px; width: 52px; height: 52px; padding: 5px; border: 1px solid #e1ece8; border-radius: 12px; background: #fff; object-fit: contain; }
.portal-body #header h1#logo-text {
    position: static;
    display: block;
    color: #173c4d;
    font: 700 25px/1.2 Arial, sans-serif;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}
.portal-body #header p#slogan {
    position: static;
    margin: 6px 0 0;
    color: #728b92;
    font: 14px/1.4 Arial, sans-serif;
}
.portal-body #content-wrap.portal-page {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 42px 24px 56px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}
.portal-page .portal-intro { margin-bottom: 28px; }
.portal-page .portal-links { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 18px; }
.portal-page .portal-staff-link { display: inline-block; color: #147d78; font-size: 14px; font-weight: 700; }
.portal-page .portal-staff-link:focus-visible { outline: 3px solid #35a9a0; outline-offset: 3px; }
.portal-page .portal-eyebrow { color: #158a7c; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.portal-page .portal-intro h1 { margin: 8px 0; color: #173e4c; font-size: clamp(28px, 4vw, 38px); line-height: 1.15; }
.portal-page .portal-intro p { padding: 0; color: #5c7b81; }
.portal-page .portal-steps { display: flex; flex-wrap: wrap; gap: 12px 24px; list-style: none; margin: 26px 0 0; padding: 0; }
.portal-page .portal-steps li { display: flex; align-items: center; gap: 8px; color: #78899a; font-size: 13px; font-weight: 700; }
.portal-page .portal-steps li span { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #cbd9e4; border-radius: 50%; }
.portal-page .portal-steps .is-current { color: #147d78; }
.portal-page .portal-steps .is-current span { border-color: #147d78; background: #147d78; color: #fff; }
.portal-page .portal-steps .is-done { color: #177d79; }
.portal-page .portal-steps .is-done span { border-color: #b6e2d9; background: #e4f6f1; }
.portal-page .portal-card {
    margin: 18px 0;
    padding: 28px;
    background: #fff;
    border: 1px solid #e1ece8;
    border-radius: 16px;
    box-shadow: 0 8px 26px rgba(38, 90, 75, .05);
}
.portal-page .portal-card-heading { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 24px; }
.portal-page .portal-icon { display: grid; flex: 0 0 44px; height: 44px; place-items: center; border-radius: 13px; background: #d9f1e8; color: #218c7b; font-size: 13px; font-weight: 700; }
.portal-page .portal-card h2 { margin: 0; padding: 0; border: 0; background: none; color: #173e4c; font: 700 20px/1.3 Arial, sans-serif; }
.portal-page .portal-card-heading p { padding: 5px 0 0; color: #718991; font-size: 14px; }
.portal-page form.portal-form { width: auto; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.portal-page .portal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.portal-page .portal-grid-full { grid-column: 1 / -1; }
.portal-page .portal-field { min-width: 0; }
.portal-page .portal-field label { display: block; margin: 0 0 7px; color: #304c61; font-size: 14px; font-weight: 700; }
.portal-page .portal-field input, .portal-page .portal-field select, .portal-page .portal-field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    height: auto;
    margin: 0;
    padding: 11px 13px;
    border: 1px solid #c9ded6;
    border-radius: 9px;
    background: #fff;
    color: #173c4d;
    font: 16px/1.4 Arial, sans-serif;
}
.portal-page .portal-field textarea { min-height: 94px; resize: vertical; }
.portal-page .portal-field input:focus, .portal-page .portal-field select:focus, .portal-page .portal-field textarea:focus,
.portal-page button:focus-visible, .portal-page input[type="checkbox"]:focus-visible { outline: 3px solid #35a9a0; outline-offset: 2px; border-color: #147d78; }
.portal-page .portal-field small { display: block; margin-top: 6px; color: #687e90; font-size: 13px; }
.portal-page .portal-patient-section { margin-top: 20px; }
.portal-page .portal-section-label { margin: 0 0 14px; padding: 0; color: #38556a; font-size: 14px; font-weight: 700; }
.portal-page .portal-divider { height: 1px; margin: 25px 0; background: #e5edf2; }
.portal-page .portal-field-status { margin: 8px 0 0; padding: 0; color: #3a617a; font-size: 13px; }
.portal-page .portal-field-status:empty { display: none; }
.portal-page .portal-patient-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; padding: 18px; border-radius: 10px; background: #f3f8fa; }
.portal-page .portal-patient-details div:last-child { grid-column: 1 / -1; }
.portal-page .portal-patient-details dt { color: #687e90; font-size: 12px; }
.portal-page .portal-patient-details dd { margin: 4px 0 0; overflow-wrap: anywhere; color: #233e52; font-weight: 700; }
.portal-page .portal-consent { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0; color: #526b7e; font-size: 13px; font-weight: 400; }
.portal-page .portal-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: #147d78; }
.portal-page .portal-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 18px; margin-top: 20px; padding: 11px 20px; border: 0; border-radius: 9px; background: #147d78; color: #fff; font: 700 15px/1.3 Arial, sans-serif; cursor: pointer; }
.portal-page a.portal-button { text-decoration: none; }
.portal-page .portal-button:hover { background: #0e6864; }
.portal-page .portal-button-secondary { border: 1px solid #c0ddd5; background: #f0f8f4; color: #206d67; }
.portal-page .portal-button-secondary:hover { background: #e2f2eb; }
.portal-page .portal-notice, .portal-page .portal-verified { margin: 16px 0; padding: 14px 18px; border-radius: 10px; font-size: 14px; }
.portal-page .portal-notice-success, .portal-page .portal-verified { border: 1px solid #b9e5d7; background: #eaf8f2; color: #226b54; }
.portal-page .portal-notice-error { border: 1px solid #efc3c0; background: #fff2f1; color: #a33832; }
.portal-page .portal-verified span { margin-right: 6px; font-weight: 700; }
.portal-page .portal-verified small { display: block; margin: 4px 0 0 20px; color: #547a6a; }
.portal-page .portal-inline-form { display: flex; align-items: flex-end; gap: 12px; }
.portal-page .portal-inline-form .portal-field { flex: 1; }
.portal-page .portal-inline-form .portal-button { margin: 0; }
.portal-page .portal-search-option { margin-top: 16px; }
.portal-page .portal-search-option summary { cursor: pointer; color: #147d78; font-weight: 700; }
.portal-page .portal-search-option[open] summary { margin-bottom: 12px; }
.portal-page .portal-results { overflow-x: auto; }
.portal-page .portal-results table { width: 100%; border-collapse: collapse; }
.portal-page .portal-results th, .portal-page .portal-results td { padding: 10px; border: 1px solid #dcebe3; text-align: left; }
.portal-page .portal-results th { background: #e6f3ed; color: #245c53; }
.portal-page [hidden] { display: none !important; }
.portal-body #footer { width: 100%; height: auto; padding: 12px 24px; background: #e5f1eb; color: #58776d; }
.portal-body #footer p { padding: 0; }
.portal-body #footer a { color: #147d78; }
@media (max-width: 600px) {
    .portal-body #header { padding: 18px; }
    .portal-body #header h1#logo-text { font-size: 19px; }
    .portal-body .clinic-logo { flex-basis: 44px; width: 44px; height: 44px; }
    .portal-body #content-wrap.portal-page { padding: 30px 16px 40px; }
    .portal-page .portal-card { padding: 20px; border-radius: 13px; }
    .portal-page .portal-card-heading { gap: 12px; }
    .portal-page .portal-grid, .portal-page .portal-patient-details { grid-template-columns: 1fr; }
    .portal-page .portal-grid-full, .portal-page .portal-patient-details div:last-child { grid-column: auto; }
    .portal-page .portal-inline-form { display: block; }
    .portal-page .portal-inline-form .portal-button { margin-top: 14px; }
    .portal-page .portal-button { width: 100%; }
}
