/* Page presentation, layered after the legacy widgets and shared portal tokens.
   Keep selectors scoped: rating workbooks and embedded systems retain their grid. */
.portal-environment-banner { display:flex; align-items:center; justify-content:center; gap:16px; }
.portal-environment-banner > span { flex:1; }
.portal-feedback-link.hang-top-left { box-sizing:border-box; left:36px; top:100px; height:36px; margin:0; padding:7px 12px; line-height:20px; }
#home-cards-manage.hang-right { box-sizing:border-box; right:0; height:36px; margin:0; padding:7px 12px; line-height:20px; }
.portal-page-tools { display:flex; justify-content:flex-end; margin-bottom:20px; }
.portal-page-heading { margin-bottom:24px; }
.portal-page-heading h1 { margin:0 0 8px; line-height:1.2; }
.portal-page-heading p { margin:0; line-height:1.6; }
.portal-heading-actions { display:flex; justify-content:space-between; align-items:center; gap:20px; flex-wrap:wrap; }
.portal-heading-actions > div { min-width:0; }
.portal-heading-actions > .btn { flex:none; }
.portal-heading-actions .btn,.portal-form-actions .btn { box-sizing:border-box; min-height:44px; padding:11px 16px; line-height:20px; }
.portal-surface { box-sizing:border-box; padding:28px; background:var(--portal-surface); border:1px solid var(--portal-border); border-radius:8px; }
.portal-surface > h2 { margin:0 0 24px; font-size:20px; line-height:1.3; }
.portal-form-panel { max-width:760px; margin:0; }
.portal-form-panel > div[id] { margin:0; }
.portal-form-panel .control-group { margin-bottom:24px; }
.portal-form-panel .control-label { display:block; font-weight:bold; margin:0 0 8px; line-height:20px; }
.portal-form-panel input[type=text],.portal-form-panel input[type=email],.portal-form-panel input[type=password],.portal-form-panel textarea { box-sizing:border-box; display:block; width:100%; max-width:100%; min-height:44px; margin:0; padding:11px 12px; line-height:20px; }
.portal-form-panel textarea { min-height:160px; resize:vertical; }
.portal-form-panel .input-prepend,.portal-form-panel .input-append { display:flex; width:100%; margin:0; }
.portal-form-panel .input-prepend input,.portal-form-panel .input-append input { min-width:0; flex:1; }
.portal-form-panel .add-on { box-sizing:border-box; display:flex; align-items:center; justify-content:center; width:44px; height:44px; padding:0; flex:none; }
.portal-form-panel .help-block { margin:8px 0 0; font-size:13px; }
.portal-form-actions { display:flex; align-items:center; flex-wrap:wrap; gap:16px; margin-top:28px; padding-top:24px; border-top:1px solid var(--portal-border); }
.portal-form-actions > a:not(.btn) { text-decoration:underline; text-underline-offset:3px; }
.portal-profile-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; align-items:start; }
.portal-profile-grid .portal-form-panel { max-width:none; }
.portal-account-connection .alert { margin-bottom:20px; line-height:1.6; }
.portal-account-connection form:last-child { margin-bottom:0; }
.portal-account-connection .btn { box-sizing:border-box; min-height:44px; padding:11px 16px; white-space:normal; }
.portal-feedback-form .btn-group { display:flex; flex-wrap:wrap; gap:8px; white-space:normal; }
.portal-feedback-form .btn-group:before,.portal-feedback-form .btn-group:after { display:none; }
.portal-feedback-form .btn-group > .btn { box-sizing:border-box; min-height:44px; margin:0; padding:11px 14px; border-radius:4px; line-height:20px; white-space:normal; }
.portal-feedback-form .btn-group > .btn.active { background:#e4eeee; border-color:var(--portal-brand); color:var(--portal-brand-hover); box-shadow:inset 0 0 0 1px var(--portal-brand); }
.portal-list-toolbar { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:24px; }
.portal-list-toolbar > p { margin:0 0 12px; white-space:nowrap; font-size:13px; }
.portal-search-field { width:100%; max-width:440px; }
.portal-search-field label { font-weight:bold; margin-bottom:8px; }
.portal-search-field input { box-sizing:border-box; width:100%; height:44px; padding:11px 12px; margin:0; border:1px solid #a8b9bc; border-radius:4px; background:#fff; color:var(--portal-ink); }
.portal-document-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; margin:0; padding:0; list-style:none; }
.portal-document-list > li { min-width:0; border-top:1px solid var(--portal-border); }
.portal-document-list a { display:flex; align-items:center; gap:12px; min-height:64px; padding:8px 4px; box-sizing:border-box; line-height:1.5; text-decoration:none; }
.portal-document-list a:hover { background:#f3f7f7; }
.portal-document-name { flex:1; min-width:0; overflow-wrap:anywhere; }
.portal-document-list a:hover .portal-document-name { text-decoration:underline; text-underline-offset:3px; }
.portal-file-label { display:flex; align-items:center; justify-content:center; flex:none; width:36px; height:40px; background:#edf3f3; border:1px solid var(--portal-border); border-radius:4px; color:var(--portal-brand); font-size:10px; font-weight:bold; letter-spacing:.03em; }
.portal-document-arrow { flex:none; color:var(--portal-muted); }
.portal-list-empty { padding:24px 0; color:var(--portal-muted); }
.portal-documents [hidden] { display:none!important; }
.portal-report-tabs { display:flex; flex-wrap:wrap; gap:4px; margin:0 0 24px; border-bottom:1px solid var(--portal-border); padding-bottom:8px; }
.portal-report-tabs:before,.portal-report-tabs:after { display:none; }
.portal-report-tabs > li { float:none; margin:0; }
.portal-report-tabs > li > a { box-sizing:border-box; min-height:44px; padding:11px 14px; margin:0; line-height:20px; border:1px solid transparent; border-radius:5px; }
.portal-report-tabs > .active > a,.portal-report-tabs > .active > a:hover,.portal-report-tabs > .active > a:focus { background:#e4eeee; color:var(--portal-brand-hover); border-color:#b7cdce; }
.portal-report-panels { background:transparent; overflow:visible; }
.portal-report-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.portal-report-card { display:block; min-width:0; padding:22px 24px; border:1px solid var(--portal-border); border-radius:8px; background:#fff; text-decoration:none; }
.portal-report-card:hover { border-color:#8cacae; background:#fbfdfd; text-decoration:none; }
.portal-report-card h2 { display:flex; justify-content:space-between; align-items:baseline; gap:16px; font-size:17px; line-height:1.4; margin:0 0 8px; color:var(--portal-brand); }
.portal-report-card h2 span { flex:none; }
.portal-report-card p { color:var(--portal-muted); margin:0; line-height:1.6; }
.portal-form-selection-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.portal-form-selection-actions > span { margin-right:4px; font-size:13px; }
.portal-package-panel { margin-bottom:24px; }
.portal-package-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.portal-package-group { min-width:0; }
.portal-package-group h2,.portal-package-addons h2 { font-size:16px; margin:0 0 12px; }
.portal-package-group .btn-group { display:flex; flex-wrap:wrap; gap:6px; white-space:normal; }
.portal-package-group .btn-group:before,.portal-package-group .btn-group:after { display:none; }
.portal-package-group .btn-group > .btn,.portal-package-addons .btn { box-sizing:border-box; min-height:36px; padding:7px 12px; margin:0; border-radius:4px; white-space:normal; line-height:20px; }
.portal-package-addons { margin-top:24px; padding-top:20px; border-top:1px solid var(--portal-border); }
.portal-addon-hint { margin:0; font-size:13px; }
.portal-addon-hint[hidden] { display:none!important; }
.portal-form-library .dataTables_filter { float:none; text-align:left; margin:0 0 16px; }
.portal-form-library .dataTables_filter label { display:flex; float:none; align-items:center; gap:12px; margin:0; font-weight:bold; }
.portal-form-library .dataTables_filter input { box-sizing:border-box; max-width:100%; width:320px; height:44px; padding:11px 12px; margin:0; }
.portal-table-scroll { overflow-x:auto; border:1px solid var(--portal-border); border-radius:6px; background:#fff; }
.portal-table-scroll .dataTables_wrapper { min-width:640px; }
.portal-table-scroll table { margin:0; border:0; width:100%!important; }
.portal-table-scroll th,.portal-table-scroll td { padding:10px 12px; vertical-align:middle; }
.portal-table-scroll th { font-size:13px; }
.portal-table-scroll .btn-mini { padding:5px 10px; line-height:20px; }
.portal-table-scroll tbody tr:nth-last-child(-n+3) .dropdown-menu { top:auto; bottom:100%; margin-bottom:2px; }
.portal-library-bottom-actions { display:flex; justify-content:flex-end; margin-top:20px; }
.portal-library-bottom-actions .btn { min-height:40px; box-sizing:border-box; padding:9px 14px; }
.portal-page-content [data-home-card] { box-sizing:border-box; max-width:100%; }
.portal-page-content [data-home-card] img { max-width:100%; height:auto; }
@media(max-width:979px) {
  .portal-profile-grid { grid-template-columns:minmax(0,1fr); }
  .portal-package-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:767px) {
  .portal-environment-banner { flex-wrap:wrap; gap:10px; text-align:left; padding:12px 14px; }
  .portal-environment-banner > span { flex-basis:100%; }
  .portal-page-heading h1 { font-size:26px; }
  .portal-heading-actions { align-items:flex-start; gap:16px; }
  .portal-surface { padding:20px; }
  .portal-document-list,.portal-report-grid,.portal-package-grid { grid-template-columns:minmax(0,1fr); }
  .portal-list-toolbar { flex-direction:column; align-items:stretch; gap:12px; }
  .portal-list-toolbar > p { margin:0; }
  .portal-report-card { padding:20px; }
  .portal-report-tabs { flex-wrap:nowrap; overflow-x:auto; padding:4px 4px 12px; }
  .portal-report-tabs > li { flex:none; }
  .portal-feedback-form .btn-group { flex-direction:column; }
  .portal-feedback-form .btn-group > .btn { text-align:left; }
  .portal-form-actions { gap:16px; }
  .portal-form-selection-actions { width:100%; }
  .portal-form-selection-actions > span { flex-basis:100%; }
  .portal-library-bottom-actions { justify-content:flex-start; }
  .portal-form-library .dataTables_filter label { align-items:flex-start; flex-direction:column; gap:8px; }
  .portal-form-library .dataTables_filter input { width:100%; }
  .portal-page-content [data-home-card] { padding:20px!important; }
}
@media print {
  .portal-feedback-link,.portal-page-tools,.portal-form-actions { display:none!important; }
  .portal-surface,.portal-report-card { break-inside:avoid; }
}

/* Policy/claim entry points use the same dimensions for native and legacy selects. */
.portal-search-panel { margin-bottom:24px; }
.portal-record-search { display:grid; grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,1fr)); gap:20px; align-items:start; }
.portal-record-search > div { min-width:0; }
.portal-record-search label { margin:0 0 8px; font-weight:bold; }
.portal-record-search input[type=text] { box-sizing:border-box; width:100%; height:44px; padding:11px 12px; margin:0; }
.portal-record-search .chzn-container,.portal-record-search .select2-container { box-sizing:border-box; width:100%!important; max-width:100%; }
.portal-record-search .chzn-single,.portal-record-search .select2-choice { box-sizing:border-box; height:44px; padding:0 12px; line-height:42px; border:1px solid #a8b9bc; border-radius:4px; background:#fff; box-shadow:none; color:var(--portal-ink); }
.portal-record-search .chzn-single div,.portal-record-search .select2-choice div { display:flex; align-items:center; justify-content:center; width:28px; background:#f2f5f5; border-left:1px solid var(--portal-border); }
.portal-record-search .chzn-single div b,.portal-record-search .select2-choice div b { display:block; width:0; height:0; background:none; border-left:4px solid transparent; border-right:4px solid transparent; border-top:5px solid #61787c; }
.portal-record-search .chzn-drop { box-sizing:border-box; max-width:100%; }
.portal-record-search .chzn-search input { box-sizing:border-box; width:100%!important; }
.portal-search-panel > p { margin:16px 0 0; font-size:13px; line-height:1.6; }
.portal-feedback-form > h2 { margin:0 0 24px; font-size:20px; }
.portal-feedback-details summary { color:var(--portal-muted); cursor:pointer; }
.portal-feedback-details p { margin:12px 0 0; font-size:13px; color:var(--portal-muted); line-height:1.6; }
.portal-section-heading { margin:32px 0 20px; }
@media(max-width:767px) { .portal-record-search { grid-template-columns:minmax(0,1fr); } }

/* Leave room for the restored side tabs on narrow screens. */
@media (max-width:979px) {
  .portal-has-navigation .container.main { box-sizing:border-box; padding-left:24px; padding-right:24px; }
}

/* Financial statements: one document per row, with readable file metadata. */
.portal-statement-table { width:100%; min-width:720px; border-collapse:collapse; }
.portal-statement-table th { padding:12px; text-align:left; font-size:13px; color:var(--portal-muted); background:#f3f7f7; }
.portal-statement-table td { padding:12px; border-top:1px solid var(--portal-border); vertical-align:middle; }
.portal-statement-table th:first-child { width:100%; }
.portal-statement-table td:first-child { min-width:250px; }
.portal-statement-table .portal-number { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.portal-statement-table .portal-file-date { white-space:nowrap; font-size:13px; font-variant-numeric:tabular-nums; }
.portal-statement-table a { display:flex; align-items:center; gap:12px; min-height:40px; text-decoration:none; }
.portal-statement-table a:hover .portal-document-name { text-decoration:underline; }
.portal-statement-table tbody tr:hover { background:#f7fafa; }
.portal-metadata-note { font-size:12px; margin:16px 0 0; }
