/* ============================================================
   GFF Member Portal — styles (layered on styles.css)
   ============================================================ */

/* ---------- Auth / login screens ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.25rem;
  background:
    radial-gradient(60% 60% at 80% 10%, rgba(91,194,206,0.18), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(231,194,74,0.12), transparent 70%),
    var(--cream);
}
.auth-card {
  width: 100%; max-width: 440px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 2.6rem 2.4rem; box-shadow: var(--sh-lg); text-align: center;
  position: relative; overflow: hidden;
}
.auth-card .leaf-mark { position: absolute; right: -50px; top: -50px; width: 170px; opacity: 0.12; }
.auth-logo { height: 52px; width: auto; margin: 0 auto 1.6rem; }
.auth-card h1 { font-size: 1.7rem; margin-bottom: 0.5rem; }
.auth-card p.sub { color: var(--muted); font-size: 0.98rem; margin-bottom: 1.8rem; }
.auth-form { text-align: left; }
.auth-form .field { margin-bottom: 1.1rem; }
.auth-card .btn { width: 100%; }
.auth-foot { margin-top: 1.6rem; font-size: 0.85rem; color: var(--muted); }
.auth-foot a { font-weight: 600; }
.auth-state { display: none; }
.auth-state.show { display: block; }
.auth-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--teal-50); color: var(--teal-700); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.3rem; }
.auth-icon svg { width: 32px; height: 32px; }
.dev-link { margin-top: 1.4rem; padding: 1rem; border-radius: var(--r-md); background: #FBF2D4; border: 1px solid #EAD79A; font-size: 0.82rem; color: #6E5618; word-break: break-all; text-align: left; }
.dev-link b { display: block; margin-bottom: 0.4rem; color: #87691B; }
.dev-link a { color: var(--teal-700); font-weight: 600; }
.auth-error { display: none; margin-top: 1rem; padding: 0.8rem 1rem; border-radius: var(--r-sm); background: #FBE2E5; border: 1px solid #f0b8bf; color: #9c2a3a; font-size: 0.9rem; text-align: left; }
.auth-error.show { display: block; }

/* ---------- Portal shell ---------- */
.portal-body { background: var(--sand); min-height: 100vh; }
.portal-bar {
  background: var(--blue-800); color: #fff; position: sticky; top: 0; z-index: 50;
}
.portal-bar .inner { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.portal-bar .brand { display: flex; align-items: center; gap: 0.7rem; }
.portal-bar .brand img { height: 38px; background: #fff; border-radius: 8px; padding: 5px 8px; }
.portal-bar .brand .label { font-family: var(--display); font-size: 1.05rem; color: #fff; }
.portal-bar .who { display: flex; align-items: center; gap: 1rem; font-size: 0.92rem; color: #C5D6DC; }
.portal-bar .who b { color: #fff; font-weight: 700; }
.btn-logout { background: rgba(255,255,255,0.12); color: #fff; padding: 0.55rem 1.1rem; border-radius: var(--r-pill); font-weight: 700; font-size: 0.9rem; transition: background .2s var(--ease); }
.btn-logout:hover { background: rgba(255,255,255,0.22); color: #fff; }

.portal-main { max-width: 1080px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.portal-welcome { margin-bottom: 2rem; }
.portal-welcome .eyebrow { margin-bottom: 0.5rem; }
.portal-welcome h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.portal-welcome p { color: var(--muted); margin-top: 0.4rem; }

.portal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; align-items: start; }
.portal-grid .span-2 { grid-column: 1 / -1; }

.pcard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden; }
.pcard-head { display: flex; align-items: center; gap: 0.8rem; padding: 1.3rem 1.5rem; border-bottom: 1px solid var(--line); }
.pcard-head .ic { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pcard-head .ic svg { width: 22px; height: 22px; }
.pcard-head h3 { font-size: 1.18rem; margin: 0; }
.pcard-head .head-action { margin-left: auto; }
.pcard-body { padding: 1.3rem 1.5rem; }

/* collapsible card header (used by Payment history) */
.pcard-toggle { width: 100%; border: none; background: none; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.pcard-toggle[aria-expanded="false"] { border-bottom: none; }
.pcard-toggle .chev svg { width: 22px; height: 22px; color: var(--muted); transition: transform 0.2s ease; }
.pcard-toggle[aria-expanded="true"] .chev svg { transform: rotate(180deg); }
.pcard-toggle:hover h3 { color: var(--teal-700); }

/* cover amount privacy toggle */
.link-btn { background: none; border: none; color: var(--teal-700); font-weight: 700; font-size: 0.85rem; cursor: pointer; padding: 0 0 0 0.6rem; text-decoration: underline; }
.link-btn:hover { color: var(--teal-600); }
.masked-amt { font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }

/* data rows */
.drow { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.drow:last-child { border-bottom: none; }
.drow .k { color: var(--muted); font-size: 0.92rem; }
.drow .v { font-weight: 600; color: var(--ink); text-align: right; }
.status-pill { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 700; padding: 0.25rem 0.7rem; border-radius: var(--r-pill); }
.status-active { background: #EAF6E0; color: #4d7c1a; }
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* payments history */
.pay-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.pay-table th { text-align: left; padding: 0.6rem 0.5rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); border-bottom: 1px solid var(--line); }
.pay-table td { padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--line); }
.pay-table tr:last-child td { border-bottom: none; }
.pay-table .amt { font-weight: 700; color: var(--blue-700); font-variant-numeric: tabular-nums; }
.tag { font-size: 0.74rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: var(--r-pill); }
.tag-paid { background: #EAF6E0; color: #4d7c1a; }
.tag-due { background: #FBF2D4; color: #87691B; }

/* editable details */
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.edit-grid .full { grid-column: 1 / -1; }
.readonly-note { font-size: 0.82rem; color: var(--muted); margin-top: 1rem; position: relative; padding-left: 1.5rem; line-height: 1.5; }
.readonly-note svg { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; color: var(--teal-600); }
.save-row { display: flex; align-items: center; gap: 1rem; margin-top: 1.4rem; }
.save-msg { font-size: 0.9rem; font-weight: 600; color: var(--leaf-green); display: none; align-items: center; gap: 0.4rem; }
.save-msg.show { display: inline-flex; }
.save-msg svg { width: 18px; height: 18px; }
.masked { letter-spacing: 0.1em; }

/* doc list */
.doc-list { display: grid; gap: 0.7rem; }
.doc-item { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color .2s var(--ease), background .2s; color: var(--ink); }
.doc-item:hover { border-color: var(--teal-300); background: var(--teal-50); }
.doc-item .di { width: 38px; height: 38px; border-radius: 9px; background: var(--teal-50); color: var(--teal-700); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-item .di svg { width: 20px; height: 20px; }
.doc-item .dt { font-weight: 700; font-size: 0.96rem; }
.doc-item .dd { font-size: 0.8rem; color: var(--muted); }
.doc-item .arrow { margin-left: auto; color: var(--muted); }

/* nominee block */
.nominee { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--cream); }
.nominee + .nominee { margin-top: 0.9rem; }
.nominee .nname { font-weight: 700; color: var(--blue-800); }
.nominee .ntype { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--teal-700); background: var(--teal-50); padding: 0.15rem 0.55rem; border-radius: var(--r-pill); }
.nominee .nmeta { font-size: 0.88rem; color: var(--muted); margin-top: 0.4rem; line-height: 1.7; }

.portal-loading { text-align: center; padding: 5rem 1rem; color: var(--muted); }
.spinner { width: 38px; height: 38px; border: 3px solid var(--line); border-top-color: var(--teal-600); border-radius: 50%; margin: 0 auto 1rem; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .portal-grid { grid-template-columns: 1fr; }
  .edit-grid { grid-template-columns: 1fr; }
  .portal-bar .who .greeting { display: none; }
}

/* payment history table + next-payment row */
.drow.nextpay .v { font-weight: 700; color: var(--blue-800); }
#payment-history { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ptable th, .ptable td { text-align: left; padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; }
.ptable td.num, .ptable th.num { text-align: right; }
.ptable td:nth-child(2) { white-space: normal; }
.ptable tbody tr:last-child td { border-bottom: none; }
.pstatus { display: inline-block; font-size: 0.76rem; font-weight: 600; padding: 0.12rem 0.55rem; border-radius: var(--r-pill); background: var(--teal-50); color: var(--teal-700); }
