/* Member portal styles (loaded after site.css) */
body.portal { background: var(--cream); display: flex; flex-direction: column; min-height: 100vh; }
body.portal main { flex: 1; }
.portal .site-header .btn { font-family: var(--font); }
.portal .header-actions form { margin: 0; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.stack > * + * { margin-top: 4px; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid #c8cbd1; }
.btn--ghost:hover { background: var(--white); color: var(--ink); }
.linkish { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }

/* Forms (portal variant: boxed inputs) */
.portal .field input, .portal .field select, .portal .field textarea {
  width: 100%; font: 15px var(--font); color: var(--ink); background: var(--white);
  border: 1px solid #d5dacd; border-radius: 8px; padding: 11px 12px;
}
.portal .field input:focus, .portal .field select:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }

/* Alerts */
.alert { border-radius: 10px; padding: 14px 16px; margin: 0 0 20px; font-size: 15px; border: 1px solid; }
.alert a { color: inherit; font-weight: 600; }
.alert .btn { margin-left: 8px; color: var(--white); }
.alert--ok { background: #eef7e3; border-color: #cfe6b3; color: #2f5512; }
.alert--err { background: #fdeeee; border-color: #f2c9c9; color: #8a1f1f; }
.alert--warn { background: #fff7e6; border-color: #f3dfae; color: #6b4b00; }
.alert--info { background: #eef4f8; border-color: #d3e2ec; color: #284459; }
.copy-field { display: block; width: 100%; margin-top: 10px; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px; border: 1px solid #cfe6b3; border-radius: 6px; background: var(--white); color: var(--ink); }

/* Auth (login / set password): split screen */
.portal--bare { background: var(--white); }
.auth-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-split__brand {
  position: relative; display: flex; align-items: flex-end; padding: 56px;
  background: linear-gradient(180deg, rgba(0,29,33,.25) 0%, rgba(0,29,33,.55) 45%, rgba(0,29,33,.96) 100%),
              url("../img/hero-bg.jpg") 35% center / cover no-repeat, var(--ink-2);
  color: #d6dbd2;
}
.auth-split__brand-inner { max-width: 520px; }
.auth-split__brand h2 { color: var(--white); font-size: clamp(28px, 2.6vw, 40px); font-weight: 600; line-height: 1.15; margin: 6px 0 26px; }
.auth-points { list-style: none; margin: 0 0 34px; padding: 0; display: grid; gap: 14px; }
.auth-points li { position: relative; padding-left: 34px; font-size: 16px; color: #e6ebe1; }
.auth-points li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.auth-split__trust { font-size: 13px; color: #9fb0a6; margin: 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); }

.auth-split__form { display: flex; flex-direction: column; padding: 32px 56px; background: var(--white); }
.auth-split__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; color: var(--ink); }
.auth-brand img { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(122,188,50,0.45), 0 4px 12px rgba(0,29,33,0.16); transition: box-shadow .2s ease, transform .2s ease; }
.auth-brand:hover img { box-shadow: 0 0 0 2px #7ABC32, 0 6px 16px rgba(122,188,50,0.3); transform: rotate(-4deg); }
.auth-brand__text { display: flex; flex-direction: column; gap: 6px; }
.auth-brand__name { font-family: 'Playfair Display', Georgia, serif; font-size: 21px; font-weight: 700; line-height: 1.05; color: #001D21; white-space: nowrap; }
.auth-brand__sub { align-self: flex-start; font-size: 9.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1; color: #3d6b12; padding: 4px 8px; border-radius: 999px; background: rgba(122,188,50,0.12); border: 1px solid rgba(122,188,50,0.3); }
@media (max-width: 380px) {
  .auth-brand { gap: 10px; }
  .auth-brand img { width: 42px; height: 42px; }
  .auth-brand__name { font-size: 17px; }
}
.auth-back { white-space: nowrap; }
.auth-back__short { display: none; }
@media (max-width: 420px) {
  .auth-back__full { display: none; }
  .auth-back__short { display: inline; }
}
.auth-back { color: var(--muted); font-size: 14px; text-decoration: none; }
.auth-back:hover { color: var(--green-dark); }
.auth-panel { width: 100%; max-width: 400px; margin: auto; padding: 48px 0; }
.auth-panel h1 { font-size: 34px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.auth-sub { color: var(--muted); font-size: 16px; margin-bottom: 28px; }
.auth-sub a, .auth-help a { color: var(--green-dark); font-weight: 600; }
.auth-form .field { margin-bottom: 20px; }
.auth-form label { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.portal .auth-form input {
  height: 50px; padding: 0 14px; border: 1.5px solid #dde2d6; border-radius: 10px; font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.portal .auth-form input:hover { border-color: #c4cbbb; }
.portal .auth-form input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(122,188,50,.18); }
.pw-wrap { position: relative; }
.portal .pw-wrap input { padding-right: 70px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; padding: 6px 8px; border-radius: 6px; cursor: pointer;
  font: 600 13px var(--font); color: var(--green-dark);
}
.pw-toggle:hover { background: var(--cream); }
.hint { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.btn--lg { padding: 16px 26px; font-size: 16px; border-radius: 10px; margin-top: 6px; }
.auth-help { display: grid; gap: 4px; margin-top: 28px; padding: 16px 18px; background: var(--cream); border-radius: 10px; font-size: 14px; color: var(--muted); }
.auth-help strong { color: var(--ink); font-weight: 600; }
.auth-legal { text-align: center; font-size: 13px; color: var(--muted); margin: 0; }
.auth-legal a { color: var(--muted); }
.auth-panel .alert { margin-bottom: 22px; }

/* Panels / account / admin */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 26px 28px; margin-bottom: 20px; }
.panel h2 { font-size: 19px; margin-bottom: 16px; }
.panel summary { cursor: pointer; color: var(--ink); }
.panel form[style*="inline"] { margin-right: 8px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 0 0 18px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); }
.search { display: flex; gap: 10px; margin: 0 0 16px; }
.search input { flex: 1; font: 15px var(--font); border: 1px solid #d5dacd; border-radius: 8px; padding: 10px 12px; }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th, .table td { text-align: left; padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.table thead th { border-top: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.table a { color: var(--ink); font-weight: 600; }

@media (max-width: 1000px) {
  .auth-split__brand { padding: 40px; }
  .auth-split__form { padding: 28px 36px; }
}
@media (max-width: 820px) {
  .auth-split { grid-template-columns: 1fr; min-height: 0; }
  .auth-split__brand { order: 2; padding: 36px 24px; }
  .auth-split__brand h2 { font-size: 24px; }
  .auth-split__form { order: 1; padding: 20px 20px 36px; min-height: 100vh; }
  .auth-panel { padding: 36px 0 28px; }
  .auth-panel h1 { font-size: 28px; }
}
@media (max-width: 640px) {
  .panel { padding: 22px 18px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .portal .header-actions form .btn { padding: 8px 14px; }
}

/* Login: "Forgot password?" next to the Password label */
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.forgot-link { font-size: 13px; color: var(--green-dark); text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }
