.portal-main { min-height: 62vh; background: #f5f7fa; padding: clamp(2rem, 6vw, 5rem) 1rem; }
.portal-wrap { max-width: 960px; margin: 0 auto; }
.portal-heading { margin-bottom: 1.75rem; }
.portal-heading h1 { color: #12243e; font-size: clamp(1.8rem, 5vw, 2.7rem); line-height: 1.15; margin: .55rem 0 0; }
.portal-card { background: #fff; border: 1px solid #dfe5eb; border-radius: 12px; padding: clamp(1.25rem, 4vw, 2rem); box-shadow: 0 12px 30px rgba(15,38,67,.05); }
#login-view, #recovery-view { max-width: 480px; }
.portal-card form { display: grid; gap: .75rem; }
.portal-card label { display: block; color: #12243e; font-size: .95rem; font-weight: 700; margin-top: .35rem; }
.portal-card input, .portal-card select { display: block; width: 100%; min-height: 46px; padding: .65rem .8rem; color: #12243e; background: #fff; border: 1px solid #abb9c8; border-radius: 6px; font: inherit; }
.portal-card input[type=file] { padding: .55rem .7rem; height: auto; }
.portal-card :focus-visible, .portal-text-button:focus-visible { outline: 3px solid #ee8a37; outline-offset: 2px; }
.portal-button { min-height: 46px; padding: .7rem 1.25rem; border: 0; border-radius: 6px; background: #ed792b; color: #12243e; font: inherit; font-weight: 800; cursor: pointer; margin-top: .7rem; }
.portal-button:hover { background: #f39348; }
.portal-button:disabled { opacity: .6; cursor: wait; }
.portal-text-button { background: none; border: 0; padding: .7rem 0; color: #163456; text-decoration: underline; font: inherit; cursor: pointer; }
#forgot-button { margin-top: .7rem; }
#portal-message, #password-message { max-width: 680px; padding: .85rem 1rem; border-left: 4px solid #e67528; background: #fff7ed; color: #3b2c1d; margin-bottom: 1rem; }
#portal-message[data-kind=success], #password-message[data-kind=success] { border-left-color: #207854; background: #eefaf4; color: #123d2b; }
.portal-password-card { max-width: 480px; }
.portal-welcome { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
.portal-welcome h2 { color: #12243e; margin: 0 0 .35rem; }
.portal-welcome p { margin: 0; }
.portal-card h2 { color: #12243e; margin: 0 0 1.2rem; font-size: 1.4rem; }
.portal-company-card { margin-bottom: 1.25rem; }
.portal-note { color: #485b70; font-size: .9rem; line-height: 1.5; margin: 1rem 0 0; }
.portal-field-note { color: #485b70; font-size: .9rem; line-height: 1.45; margin: -.35rem 0 .25rem; }
.portal-table-wrap { overflow-x: auto; }
#admin-report-scroll.portal-scroll-active { overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #a9bdcb #f5f7fa; }
#admin-report-scroll.portal-scroll-active:focus-visible { outline: 3px solid #ee8a37; outline-offset: 2px; }
#admin-report-scroll.portal-scroll-active th { position: sticky; top: 0; z-index: 1; background: #fff; }
.portal-card table { border-collapse: collapse; width: 100%; min-width: 480px; text-align: left; }
.portal-card th, .portal-card td { padding: .85rem .6rem; border-bottom: 1px solid #dfe5eb; font-size: .95rem; vertical-align: middle; }
.portal-card th { color: #12243e; }
#customer-view .portal-card table { min-width: 760px; }
.portal-date-note { display: block; color: #526477; font-size: .82rem; margin-top: .2rem; }
.portal-status { display: inline-block; padding: .4rem .6rem; border-radius: 6px; font-size: .9rem; font-weight: 700; line-height: 1.35; }
.portal-status--suitable { color: #13563b; background: #e4f5ea; }
.portal-status--conditional { color: #694800; background: #fff0c4; }
.portal-status--unsuitable { color: #8c2020; background: #ffe1dd; }
.portal-status--unknown { color: #405368; background: #eaf0f5; }
.portal-report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.portal-file-button { padding: .45rem .65rem; color: #163456; background: #edf3f9; border: 1px solid #b4c7d9; border-radius: 5px; font: inherit; cursor: pointer; margin: .2rem .35rem .2rem 0; }
.portal-file-button:hover { background: #dceaf5; }
.portal-file-button--danger { color: #8c2020; background: #fff3f1; border-color: #e8b7af; }
.portal-file-button--danger:hover { background: #ffe1dd; }
#edit-report-form, #edit-account-form { margin-top: 1.25rem; padding: 1.2rem; border: 1px solid #c6d2dc; border-radius: 8px; background: #f8fafc; }
#edit-report-form h3, #edit-account-form h3 { color: #12243e; margin: 0 0 .25rem; font-size: 1.2rem; }
.portal-account-delete { margin-top: 1.25rem; padding: 1.2rem; border: 1px solid #e8b7af; border-radius: 8px; background: #fff8f6; }
.portal-account-delete h3 { color: #8c2020; margin: 0 0 .5rem; font-size: 1.2rem; }
.portal-account-delete p { color: #26394d; line-height: 1.5; margin: 0 0 1rem; overflow-wrap: anywhere; }
.portal-account-action-message { margin: 1rem 0 0; padding: .8rem 1rem; border-left: 4px solid #b43729; background: #fff3f1; color: #68251d; line-height: 1.5; }
.portal-account-action-message[data-kind=success] { border-left-color: #207854; background: #eefaf4; color: #123d2b; }
.portal-edit-actions { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.portal-edit-actions .portal-button { margin-top: 0; }
.portal-search-label { display: block; color: #12243e; font-weight: 700; margin-bottom: .4rem; }
.portal-card .portal-search-input { max-width: 430px; margin-bottom: 1rem; }
[hidden] { display: none !important; }
@media (max-width: 540px) {
  .portal-main { padding-top: 2rem; }
  .portal-card { padding: 1.2rem; }
  .portal-card table { min-width: 0; }
  .portal-card th, .portal-card td { padding: .75rem .3rem; overflow-wrap: anywhere; }
  .portal-card th:nth-child(2), .portal-card td:nth-child(2) { white-space: nowrap; }
  .portal-file-button { display: block; width: 100%; margin: .25rem 0; }
  #customer-view .portal-table-wrap { overflow: visible; }
  #customer-view .portal-card table, #customer-view .portal-card tbody,
  #customer-view .portal-card tr { display: block; min-width: 0; width: 100%; }
  #customer-view .portal-card thead { display: none; }
  #customer-view .portal-card tr { border: 1px solid #dfe5eb; border-radius: 9px; padding: .7rem; margin: 0 0 .8rem; }
  #customer-view .portal-card td { display: grid; grid-template-columns: minmax(0, 7rem) minmax(0, 1fr); align-items: start; gap: .5rem; border: 0; padding: .45rem .2rem; white-space: normal; }
  #customer-view .portal-card td::before { content: attr(data-label); color: #405368; font-weight: 700; }
  #customer-view .portal-file-button { width: auto; margin: .1rem 0; }
  #customer-view .portal-report-actions { gap: .3rem; }
  #admin-report-list tr { display: block; border: 1px solid #dfe5eb; border-radius: 9px; padding: .7rem; margin-bottom: .8rem; }
  #admin-report-list td { display: grid; grid-template-columns: minmax(0, 5rem) minmax(0, 1fr); gap: .5rem; border: 0; white-space: normal !important; }
  #admin-report-list td::before { content: attr(data-label); color: #405368; font-weight: 700; }
  #admin-report-table thead { display: none; }
  #admin-report-table, #admin-report-table tbody { display: block; min-width: 0; }
  #admin-report-list .portal-file-button { width: auto; }
}
