.portal { min-height: 100svh; }
.portal-main { min-width: 0; }
.portal-top a { color: #362896; font-weight: 650; }
.sidebar nav a { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-radius: 10px; color: #e7e4f8; font-size: 14px; }
.sidebar nav a:only-child { grid-column: 1 / -1; }
.sidebar nav a[aria-current=page] { background: #43378d; color: white; font-weight: 700; }
.sidebar nav a:hover { background: #362d73; }
.site-nav nav .portal-link { display: inline-flex; gap: 4px; }
.range-switch a { padding: 8px 13px; border-radius: 30px; font-size: 13px; font-weight: 670; }
.range-switch a[aria-current=true] { background: var(--blue); color: white; }
.report-tabs a { padding: 11px 14px; font-size: 14px; font-weight: 630; border-bottom: 2px solid transparent; color: #57537a; }
.report-tabs a[aria-current=true] { color: #3223ac; background: #eae6ff; border-bottom-color: #4332d6; }
.period-link { display: inline-block; text-align: center; padding: 7px 10px; font: 670 12px/1.35 var(--display); color: #3c3484; background: #f1effa; border: 1px solid #ded9f0; border-radius: 20px; }
.period-link:hover { background: #e8e3fd; }
.portal-signin { min-height: 100svh; display:grid; place-items:center; padding: 20px; background: #f5f5fc; }
.portal-signin article { width: min(100%, 520px); padding: clamp(26px, 6vw, 56px); }
.portal-signin h1 { margin: 22px 0 12px; font-size: clamp(32px, 6vw, 48px); line-height: 1; letter-spacing: -.06em; }
.portal-signin p { margin-bottom: 20px; color: var(--soft); }
.portal-signin .return-link { display: block; margin-top: 20px; text-decoration: underline; }
.form-grid { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 17px 0; }
.form-grid label { display: grid; gap: 5px; font-weight: 630; color: var(--soft); font-size: 13px; }
.form-grid input, .form-grid select { font: inherit; min-width: 0; padding: 9px; border: 1px solid #cfcce1; border-radius: 9px; background: #fff; }
.form-grid input[type=file] { max-width: min(100%, 285px); }
.upload-form { justify-content: center; }
.notice { margin: 15px 0; padding: 12px 16px; border-radius: 10px; background: #eeebfc; color: #302572; }
.notice[role=alert] { background: #f9e7e5; color: #6d2525; }
.report-placeholder { display: grid; gap: 10px; padding-block: 16px; color: var(--soft); }
.report-file { display: flex; align-items: center; gap: 12px; padding: 17px; background: #f1effb; border-radius: 12px; margin-top: 12px; }
.report-file > span { background: #3528b6; color: white; border-radius: 7px; padding: 8px; font-size: 11px; font-weight: 750; }
.report-file strong { overflow-wrap: anywhere; }
.report-file small { display: block; margin-top: 3px; color: #51497f; }
.statement-preview { width: 100%; height: min(68vh, 780px); min-height: 390px; border: 1px solid #dedbef; border-radius: 12px; margin-top: 14px; }
.report-links { display: flex; gap: 7px; flex-wrap: wrap; }
.portal-list { list-style: none; padding: 0; }
.portal-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #eae8f3; }
.portal-list li span:first-child { overflow-wrap: anywhere; }
.portal-list small { display: block; color: var(--soft); }
.admin-section { margin-top: 18px; }
.admin-section h2 { margin-bottom: 9px; }
.inline-form { display: inline; }
.sign-out { border: 0; background: transparent; padding: 4px; color: #362896; font: inherit; font-weight: 650; }
.registration-actions { display: grid; gap: 12px; }
.registration-actions > a:last-child { justify-self: start; text-decoration: underline; }
.registration-form { display: grid; align-items: start; gap: 14px; margin-bottom: 16px; }
.registration-form label { display: grid; gap: 6px; font-weight: 650; color: var(--soft); }
.registration-form input { width: 100%; font: inherit; padding: 10px; border: 1px solid #cfcce1; border-radius: 9px; }
.registration-form p { margin: 0; overflow-wrap: anywhere; }
@media(max-width:740px) {
  .registration-actions > .button { min-height: 48px; padding-block: 5px; font-size: 14px; white-space: normal; text-align: center; }
  .sidebar nav a { flex-direction: column; justify-content: center; gap: 4px; text-align: center; padding: 9px 4px; font-size: 12px; }
  .report-tabs a { flex: 1; text-align: center; padding: 10px 5px; font-size: 12px; }
  .report-filters .button { justify-self: start; }
}
@media(max-width:400px) {
  .form-grid { display:grid; }
  .report-links { flex-direction: column; align-items: start; }
  .portal-list li { font-size: 13px; }
}
