
.portal-page, .portal-dialog { color: #202936; font: 15px/1.6 system-ui, "Microsoft YaHei", sans-serif; }
.portal-page { background: #f4f6f9; margin: 0; }
.portal-page > header { background: #fff; border-bottom: 1px solid #dbe1e9; padding: .85rem clamp(1rem, 5vw, 5rem); display: flex; align-items: center; gap: 1rem; }
.portal-page > header a { font-weight: 700; color: #174d98; }
#portal-main { max-width: 72rem; margin: auto; padding: 1rem clamp(1rem, 4vw, 3rem) 3rem; }
#portal-content { background: #fff; border: 1px solid #dbe1e9; border-radius: .6rem; padding: 1rem; }
.portal-page h1, .portal-dialog h2 { margin: .3rem 0 .9rem; line-height: 1.25; }
.portal-page a, .portal-dialog a { color: #174d98; }
.portal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin: .6rem 0 1rem; }
.portal-page button, .portal-dialog button { border: 1px solid #bac6d7; border-radius: .35rem; padding: .5rem .75rem; background: #fff; color: #202936; cursor: pointer; font: inherit; }
.portal-page button[aria-current], .portal-page button.portal-primary, .portal-dialog button.portal-primary { background: #174d98; color: #fff; border-color: #174d98; }
.portal-page button:disabled, .portal-dialog button:disabled { cursor: waiting; opacity: .65; }
.portal-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .75rem; }
.portal-form label { display: grid; gap: .25rem; min-width: 0; align-content: start; }
.portal-form input, .portal-form textarea, .portal-form select { box-sizing: border-box; min-width: 0; width: 100%; padding: .45rem; border: 1px solid #bac6d7; border-radius: .3rem; font: inherit; background: #fff; color: #202936; }
.portal-form .portal-wide, .portal-form .portal-actions, .portal-form .portal-feedback { grid-column: 1 / -1; }
.portal-feedback { color: #8f2d26; margin: .25rem 0; }
.portal-feedback:empty { display: none; }
.portal-dialog { box-sizing: border-box; width: min(32rem, calc(100vw - 1.5rem)); max-height: calc(100% - 1.5rem); border: 1px solid #b8c4d4; border-radius: .6rem; background: #fff; padding: 1rem; text-align: left; }
.portal-dialog::backdrop { background: rgba(18, 30, 47, .55); }
.portal-table-wrap { overflow: auto; }
.portal-table { width: 100%; border-collapse: collapse; text-align: left; }
.portal-table td, .portal-table th { padding: .55rem; border-bottom: 1px solid #dbe1e9; }
.portal-table th { background: #f1f5fa; white-space: nowrap; }
.portal-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.portal-caption { color: #4d5d72; }
.zhf-packet { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 12px; }
.zhf-packet button { border: 0; border-radius: 2px; padding: 1px 4px; color: white; background: #6a5c4d; cursor: pointer; }
.zhf-packet button[data-claim] { background: #a71713; }
.www-member-link { display: block; text-align: right; padding-right: .55rem; color: #7a2306; font-weight: bold; }

.portal-page[data-portal="member"] {
  --member-accent: #b84d0c;
  --member-line: #e4e6eb;
  --member-rail: #f6f6f6;
  background: #fafafa;
  color: #25282d;
  font-size: 14px;
}
[data-portal="member"] > .member-top { display: block; padding: 0; border-color: var(--member-line); }
.member-top-inner {
  width: min(1200px, calc(100% - 2rem));
  min-height: 70px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.25rem);
}
.member-logo { flex: none; display: block; width: min(184px, 37vw); }
.member-logo img { display: block; width: 100%; height: auto; }
.member-top-inner nav { display: flex; gap: clamp(.65rem, 3vw, 2rem); flex-wrap: wrap; }
.portal-page[data-portal="member"] .member-top-inner a { color: #292d35; font-weight: 500; text-decoration: none; }
.portal-page[data-portal="member"] .member-top-inner a:hover, .member-panel a { color: var(--member-accent); text-decoration: underline; text-underline-offset: 3px; }
.member-account { margin-left: auto; min-width: 0; text-align: right; overflow-wrap: anywhere; }
[data-portal="member"] #portal-main { max-width: 1200px; padding: 0; width: calc(100% - 2rem); margin: 1rem auto 2rem; }
[data-portal="member"] #portal-content {
  background: white;
  border: 1px solid var(--member-line);
  border-radius: 5px;
  padding: 1.5rem;
}
[data-portal="member"] #portal-content.member-workspace {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  min-height: calc(100vh - 90px);
  padding: 0;
  overflow: clip;
}
.member-sidebar { background: var(--member-rail); }
.member-identity { display: grid; justify-items: center; gap: .35rem; padding: 1.2rem .75rem 2rem; }
.member-name { max-width: 100%; color: #535b65; font-size: 13px; text-align: center; overflow-wrap: anywhere; }
.member-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 86px;
  aspect-ratio: 1;
  border: 1px solid #d9dbe0;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
}
.member-menu-icon::before, .member-menu-icon::after { content: ""; position: absolute; background: currentColor; }
.member-avatar img { width: 86%; height: 86%; object-fit: contain; }
.member-navigation { display: grid; }
.member-navigation button {
  position: relative;
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .65rem;
  padding: .5rem .75rem .5rem 2.75rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #343940;
  text-align: left;
}
.member-navigation button:hover { background: #eeeef0; }
.member-navigation button[aria-current] { background: white; color: var(--member-accent); font-weight: 700; }
.member-navigation button[aria-current]::before {
  content: "";
  position: absolute;
  left: 13px;
  width: 9px;
  height: 9px;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}
.member-menu-icon { position: relative; display: inline-block; width: 14px; height: 15px; color: #6c7681; flex: none; }
.member-menu-icon::before { top: 0; left: 4px; width: 7px; height: 7px; border-radius: 50%; }
.member-menu-icon::after { bottom: 0; left: 1px; width: 13px; height: 7px; border-radius: 6px 6px 2px 2px; }
.member-navigation button[aria-current] .member-menu-icon { color: var(--member-accent); }
.member-panel { min-width: 0; padding: 1.2rem 1.4rem 2rem; }
.portal-page h1.member-panel-title {
  display: flex;
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid var(--member-line);
  color: var(--member-accent);
  font-size: 16px;
  line-height: 1.4;
  margin: 0 0 .85rem;
}
.member-panel-title::after { content: ""; align-self: end; position: absolute; width: 3.5rem; border-bottom: 2px solid #e97629; }
.member-panel-title { position: relative; }
.member-panel .portal-form { max-width: 48rem; }
.member-section-title { font-size: 15px; margin: 1.5rem 0 .55rem; }
.member-help { color: #626b76; margin: .45rem 0 .85rem; }
.member-panel button.portal-primary, [data-portal="member"] #portal-content > .portal-actions .portal-primary {
  background: var(--member-accent); color: white; border-color: var(--member-accent);
}
.member-panel .portal-table-wrap { border: 1px solid var(--member-line); min-height: 19rem; }
.member-panel .portal-table { min-width: 30rem; }
.member-panel .portal-table th { background: #f0f0f0; color: #2d3138; }
.member-panel .portal-table th, .member-panel .portal-table td { text-align: center; padding: .75rem .45rem; }
.member-panel .portal-table .portal-table-empty { color: #626b76; border: 0; padding-top: 1.15rem; }
.member-pagination { display: flex; justify-content: flex-end; align-items: center; gap: .45rem; padding-top: 1rem; }
.member-pagination button { padding: .25rem .6rem; min-height: 32px; }
.member-pagination button:disabled { cursor: default; opacity: .58; }
.member-pagination span { min-width: 2rem; text-align: center; background: var(--member-accent); color: white; padding: .24rem .3rem; border-radius: 3px; }
.member-policy { background: white; border: 1px solid #e4e6eb; padding: clamp(1rem, 5vw, 2rem); overflow-wrap: anywhere; }
.member-policy img { max-width: 100%; height: auto; }

.packet-dialog {
  --packet-red: #aa180e;
  --packet-edge: #cd381f;
  --packet-cream: #fff9e1;
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  max-height: calc(100dvh - 1.5rem);
  border: 1px solid var(--packet-red);
  border-radius: 3px;
  padding: 0;
  color: #2e241b;
}
.packet-dialog[data-kind="claim"] { background: var(--packet-cream); }
.packet-dialog[data-kind="records"] { width: min(73.5rem, calc(100vw - 1.5rem)); background: white; }
.packet-dialog-heading {
  background: var(--packet-red);
  color: white;
  padding: .65rem .95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}
.packet-dialog-heading h2 { font-size: 16px; margin: 0; }
.packet-dialog-heading button {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: .2rem .55rem;
}
.packet-dialog-body { padding: 1rem; }
.packet-claim-summary { margin: 0 0 1rem; color: #801a0d; font-weight: 700; }
.packet-records-summary { background: #176333; color: white; border-radius: 2px; padding: .5rem .8rem; margin: 0 0 .8rem; font-weight: 700; }
.packet-records-summary:empty { display: none; }
.packet-dialog .portal-table { min-width: 53rem; font-size: 13px; }
.packet-dialog .portal-table td, .packet-dialog .portal-table th { border: 1px solid var(--packet-edge); text-align: center; overflow-wrap: anywhere; }
.packet-dialog .portal-table th { background: var(--packet-red); color: white; padding: .7rem .45rem; }
.packet-dialog .portal-table td { background: #fff; padding: .6rem .4rem; }
.packet-dialog .portal-table .portal-table-empty { padding: 1rem; color: #63594e; }
.packet-dialog[data-kind="records"] .portal-table-wrap { max-height: 58vh; }
.packet-dialog[data-kind="records"] .portal-table th { position: sticky; top: 0; }
.packet-dialog button.portal-primary { background: var(--packet-red); border-color: var(--packet-red); color: white; }
.packet-dialog a { color: #942216; }
.packet-dialog[data-kind="login"] { width: min(44rem, calc(100vw - 1.5rem)); border-color: #d5dce3; background: white; }
.packet-dialog[data-kind="login"][open] { display: grid; grid-template-columns: 38% minmax(0, 1fr); }
.packet-dialog[data-kind="login"] .packet-dialog-heading { grid-column: 2; grid-row: 1; background: white; color: #394656; border-bottom: 1px solid #e5e9ef; }
.packet-dialog[data-kind="login"] .packet-dialog-body, .packet-login-layout { display: contents; }
.packet-login-side { grid-area: 1 / 1 / 3 / 2; position: relative; isolation: isolate; background: #14517a; color: white; padding: 1.35rem 1rem; overflow: hidden; }
.packet-login-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .42; z-index: -1; }
.packet-login-brand { display: grid; justify-items: center; gap: .6rem; }
.packet-login-logo { width: min(160px, 95%); height: auto; }
.packet-login-copy { max-width: 100%; overflow-wrap: anywhere; }
.packet-login-copy img { max-width: 100%; height: auto; }
.packet-dialog .packet-login-copy a { color: white; }
.packet-login-panel { grid-column: 2; min-width: 0; min-height: 300px; display: grid; grid-template-rows: 1fr auto auto; align-items: center; justify-items: center; padding: 1.1rem 1rem 1rem; }
.packet-login-scan { width: 100%; display: grid; justify-items: center; gap: .5rem; }
.packet-login-scan img { width: 168px; max-width: 100%; height: auto; border: 1px solid #e5e9ef; }
.packet-login-scan iframe { display: block; width: min(100%, 310px); height: 355px; border: 0; }
.packet-login-notice { text-align: center; margin: .8rem 0; color: #54616d; }
.packet-login-qr-note { margin: 0 0 .7rem; color: #54616d; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; }
.packet-login-policies { width: 100%; display: flex; justify-content: center; flex-wrap: wrap; gap: .9rem; border-top: 1px solid #e9edf1; padding-top: .65rem; }
.packet-login-policies:empty { display: none; }
.packet-dialog :focus-visible, [data-portal="member"] :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

@media (max-width: 640px) {
  .member-top-inner { width: calc(100% - 1.2rem); gap: .75rem; min-height: 60px; flex-wrap: wrap; padding: .4rem 0; }
  .member-top-inner nav { order: 3; width: 100%; font-size: 13px; }
  [data-portal="member"] #portal-main { width: calc(100% - 1rem); margin-top: .5rem; }
  [data-portal="member"] #portal-content.member-workspace { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .member-identity { display: flex; gap: .55rem; padding: .6rem .7rem; }
  .member-avatar { width: 38px; flex: none; }
  .member-navigation { display: flex; overflow: auto; }
  .member-navigation button { width: auto; flex: none; min-height: 44px; padding: .5rem .65rem; white-space: nowrap; }
  .member-navigation button[aria-current]::before { display: none; }
  .member-navigation button[aria-current] { box-shadow: inset 0 -2px var(--member-accent); }
  .member-panel { padding: .75rem .65rem 1.1rem; }
  .packet-dialog-body { padding: .65rem; }
  .packet-dialog[data-kind="login"][open] { display: block; }
  .packet-login-side { padding: .75rem 1rem; }
  .packet-login-logo { width: 116px; }
  .packet-login-copy { width: 100%; }
  .packet-login-panel { min-height: 0; padding: .8rem 1rem; }
}
