/* Shared reader dialogs and member administration. */
.member-account { border: 1px solid var(--line); background: white; color: var(--blue); border-radius: 999px; padding: .55rem .9rem; min-height: 44px; white-space: nowrap; font-weight: 600; }
.site-head:has(.member-account:not([hidden])) { flex-wrap: wrap; }
.membership-dialog { width: min(448px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 32px; border: 0; border-radius: 28px; background: #fff; color: #202124; box-shadow: 0 24px 80px #0003; overflow-y: auto; font: 14px/1.6 var(--font-ui); }
.membership-dialog::backdrop { background: #171923b0; backdrop-filter: blur(3px); }
.membership-dialog h2 { font: 700 20px/1.4 var(--font-ui); padding-right: 26px; margin: 0 0 24px; }
.member-close { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border: 0; background: transparent; font-size: 26px; color: #727684; }
.member-option { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #dfe1e7; background: #fff; border-radius: 16px; padding: 16px 20px; margin: 12px 0; min-height: 58px; color: inherit; text-align: left; font-size: 14px; font-weight: 600; }
.member-option:hover { border-color: var(--blue); background: #f4f6ff; }
.member-option strong { font-size: 16px; white-space: nowrap; }
.member-option small { display: block; font-size: 12px; color: #707582; font-weight: 400; }
.member-plan-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.member-payment-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.member-payment-summary .pay-amount { margin: 0; white-space: nowrap; font-size: clamp(24px, 6vw, 30px); }
.member-payment-plan { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 15px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.member-promo { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 11px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.member-section { margin-top: 24px; }
.member-section h3 { font: 700 14px var(--font-ui); }
.member-help { color: #656b77; font-size: 13px; line-height: 1.65; margin: 8px 0 14px; }
.member-primary { display: block; width: 100%; min-height: 48px; border: 0; border-radius: 12px; padding: 12px; color: #fff; background: var(--blue); font-weight: 700; margin-top: 16px; }
.membership-dialog button:disabled { opacity: .55; cursor: wait; }
.membership-dialog input, .membership-dialog select { box-sizing: border-box; display: block; width: 100%; min-height: 48px; font: 16px var(--font-ui); padding: 12px; border: 1px solid #d9dde6; border-radius: 10px; margin: 8px 0; background: white; color: #202124; }
.membership-dialog label { display: block; font-weight: 600; }
#member-error, #member-admin-error { color: #b42318; margin-top: 12px; }
.member-banks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.member-banks a { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 66px; padding: 10px; border: 1px solid #dbe0f2; border-radius: 15px; text-decoration: none; font-size: 12px; text-align: center; background: #f5f6fb; }
.member-banks a:hover { border-color: var(--blue); background: #edf0ff; }
.member-banks a span { min-width: 0; overflow-wrap: anywhere; }
.member-bank-logo { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; border-radius: 8px; }
.member-bank-logo[hidden] { display: none; }
.member-phone-label { font-size: 20px; font-weight: 700; }
.member-identity { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.member-identity span { color: #656b77; font-size: 12px; }
.member-identity strong { font-size: 17px; letter-spacing: .03em; }
.member-summary { border: 1px solid #dfe1e7; border-radius: 18px; padding: 20px; background: #f5f6fb; }
.member-summary.is-active { border-color: #bce3cd; background: #effaf3; }
.member-state { font-size: 12px; font-weight: 700; color: #656b77; }
.is-active .member-state { color: #17653e; }
.member-summary h3 { font-size: 23px; line-height: 1.3; margin: 10px 0 8px; letter-spacing: -.03em; }
.member-summary p { font-size: 13px; color: #4d5b53; margin: 0; }
.member-expiry { margin-top: 18px; padding-top: 14px; border-top: 1px solid #cfdfd5; display: grid; gap: 3px; }
.member-expiry span, .member-expiry small { font-size: 11px; color: #59675e; }
.member-expiry strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.member-owned { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; font-size: 13px; }
.member-owned strong { font-size: 18px; }
.member-owned-note { font-size: 12px; color: #707582; margin: 4px 0 18px; }
.member-secondary { display: block; width: 100%; min-height: 46px; margin-top: 10px; padding: 10px; border: 1px solid #dfe1e7; border-radius: 12px; background: #fff; color: #2747c9; font: 600 13px var(--font-ui); }
.member-site-card { display: grid; justify-items: center; gap: 6px; padding: 24px; border-radius: 18px; background: #effaf3; border: 1px solid #bce3cd; }
.member-success-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #17653e; color: white; font-size: 24px; }
.member-site-card strong { font-size: 25px; color: #2747c9; }
.member-site-card a { color: #17653e; font-size: 20px; font-weight: 700; }
.member-success-card { gap: 12px; padding: 26px 14px; }
.member-success-card a { font-size: clamp(32px, 8vw, 42px); letter-spacing: -.04em; text-decoration: none; color: #2747c9; }
.member-site-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; color: #656b77; }
.member-save-copy { margin: 20px 0 8px; line-height: 1.8; }
.member-site-note { text-align: center; color: #656b77; font-size: 12px; margin: 18px 0 8px; }
.member-save-address { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; background: #f1f4ff; border-radius: 12px; }
.member-save-address strong { font-size: 18px; color: #2747c9; }
.member-save-address button { min-height: 44px; border: 1px solid #cbd4f4; border-radius: 8px; padding: 8px; background: white; color: #2747c9; }
.member-save-guide details { border-bottom: 1px solid #e4e7ef; padding: 12px 0; }
.member-save-guide summary { padding: 8px 0; font-weight: 700; cursor: pointer; }
.member-save-guide ol { margin: 8px 0; padding-left: 22px; font-size: 13px; }
.member-save-guide li { padding: 5px 0; }
.members-table-wrap { overflow-x: auto; }
.members-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.members-table th, .members-table td { padding: 16px; text-align: left; border-bottom: 1px solid var(--aline); white-space: nowrap; }
.members-table th { color: var(--amuted); }
.member-actions .btn-ghost { margin: 4px; min-height: 44px; }
#members-status { padding: 8px 16px; }
.members-note { padding: 0 16px 16px; color: var(--amuted); font-size: 12px; }
.admin-page .membership-dialog { color-scheme: light; --blue: #2747c9; }
@media (max-width: 480px) {
  .membership-dialog { padding: 28px 20px; border-radius: 22px; }
  .member-account { font-size: 15px; min-height: 48px; padding: 12px 20px; }
  .membership-dialog:has(.member-option) .member-option { font-size: 16px; gap: 12px; }
  .membership-dialog:has(.member-option) .member-option strong { font-size: 18px; }
  .membership-dialog:has(.member-option) .member-option small { font-size: 14px; }
  .membership-dialog:has(.member-option) .member-promo { font-size: 13px; }
  .membership-dialog:has(.member-option) .member-section h3 { font-size: 16px; }
  .membership-dialog:has(.member-option) .member-help { font-size: 15px; }
}

/* Single-story bank buttons share the membership three-column layout. */
.bank-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
