.portal {
  --portal-ink: #16342c;
  --portal-muted: #47685e;
  --portal-accent: #146a54;
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) 1rem;
  color: var(--portal-ink);
}
#app[data-page="portal"] { min-height: 100vh; background: #f2f7f3; }
.portal-nav { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 0; }
.portal-brand, .portal-login { display: inline-flex; align-items: center; gap: .55rem; color: var(--portal-ink); text-decoration: none; }
.portal-brand span { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .75rem; background: #146a54; color: white; font-weight: 800; }
.portal-login { font-size: .9rem; padding: .55rem .8rem; border-radius: 2rem; background: white; border: 1px solid #c9ded3; }
.portal-hero { display: grid; grid-template-columns: 1.3fr .85fr; gap: clamp(1rem, 4vw, 3rem); align-items: center; color: #f3fffa; background: linear-gradient(125deg,#12372f,#17594a 78%,#1b6956); border-radius: 1.6rem; padding: clamp(1.35rem, 5vw, 3.5rem); margin-bottom: 1.3rem; }
.portal-kicker { display: inline-block; font-weight: 800; font-size: .73rem; letter-spacing: .12em; color: var(--portal-accent); }
.portal-hero .portal-kicker { color: #b2efce; }
.portal-hero h1 { margin: .55rem 0; line-height: 1.02; font-size: clamp(2.5rem, 6.4vw, 4.8rem); letter-spacing: -.05em; }
.portal-hero p { max-width: 42ch; color: #d8eee5; line-height: 1.6; }
.portal-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.35rem; }
.portal-actions a { display: inline-flex; gap: .7rem; padding: .65rem .9rem; border: 1px solid #9cc9b9; border-radius: .7rem; color: #fff; text-decoration: none; font-weight: 700; }
.portal-actions a:first-child { color: #16342c; background: #b2efce; border-color: #b2efce; }
.portal-guide { border: 1px solid #6b9c8e; border-radius: 1.1rem; padding: 1rem; background: #163e35; }
.portal-guide ol { list-style: none; margin: .8rem 0 0; padding: 0; }
.portal-guide li { display: flex; align-items: start; gap: .7rem; padding: .65rem 0; border-top: 1px solid #4b7268; }
.portal-guide li > span { font-weight: 800; color: #b2efce; }
.portal-guide small { display: block; margin-top: .2rem; color: #d8eee5; line-height: 1.4; }
.portal-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1rem; align-items: start; }
.portal .panel { padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid #d7e5dc; border-radius: 1.1rem; box-shadow: 0 8px 24px #1d4c3410; background: white; }
.portal-section-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.portal h2 { margin: .35rem 0 .5rem; }
.portal-form > p, .portal-footer { color: var(--portal-muted); line-height: 1.55; }
.portal-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-block: .6rem; }
.portal-metrics div { background: #eef7f1; border-radius: .75rem; padding: .65rem; overflow-wrap: anywhere; }
.portal-metrics strong { display: block; font-size: clamp(1.35rem, 3vw, 2rem); color: var(--portal-accent); }
.portal-metrics span { font-size: .82rem; }
.portal-feed p { font-size: .95rem; font-weight: 650; min-height: 1.5em; }
.portal-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding-block: 1rem; }
.portal a:hover { text-decoration: underline; }
.portal :is(a,button,input,select,textarea):focus-visible { outline: 3px solid #318a71; outline-offset: 2px; }
.service-stack > .panel { border-radius: 1rem; margin-bottom: 1rem; }
.service-stack :is(input,select,textarea), .portal :is(input,select,textarea) { border-radius: .65rem; }
.recovery-box { margin-top: 1rem; padding: .85rem; border: 1px solid var(--line, #c6dad2); border-radius: .75rem; }
.recovery-box summary { cursor: pointer; font-weight: 700; }
.recovery-box form { margin-top: .85rem; }
.reset-dialog { border: 1px solid var(--line, #c6dad2); border-radius: 1rem; width: min(520px, calc(100% - 2rem)); }
.reset-dialog::backdrop { background: #112e28aa; }
@media (max-width: 700px) {
  .portal-hero, .portal-grid { grid-template-columns: 1fr; }
  .portal-guide { padding: .85rem; }
  .portal-login { padding: .45rem .55rem; }
}
.public-link { text-align: center; }
.service-meta, .service-message small { color: var(--muted, #526662); }
.service-message { border-left: 3px solid #bcded3; padding: .65rem .9rem; margin-block: .6rem; background: #f2f8f6; color: #18372f; }
.service-message small { display: block; }
.service-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.complaint-entry { display: block; margin-block: .45rem; text-align: left; white-space: normal; }
.ticket-receipt { border: 1px solid #81b7a4; border-radius: .6rem; padding: .75rem; }
.profile-photo img { width: 88px; height: 88px; object-fit: cover; border-radius: 50%; }
.profile-photo { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.credential-text { width: 100%; }
.portal [data-service-status], #service-body [data-service-status] { margin: .4rem 0; }
