/* GGWC Customer Portal — design system */

:root {
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --card: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.1);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --info-soft: #eff6ff;
  --success-soft: var(--green-100, rgba(22, 122, 58, 0.12));
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── Layout ── */

.portal-shell { min-height: 100vh; display: flex; flex-direction: column; }

.portal-top {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.portal-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
}

.portal-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.portal-brand__left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.portal-brand__logo {
  height: 44px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
}

.portal-brand__title {
  font-size: 17px;
  font-weight: 800;
  color: var(--green-900);
  letter-spacing: -0.02em;
  margin: 0;
}

.portal-brand__sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  margin-top: 2px;
}

.portal-main {
  flex: 1;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.portal-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 20px;
  margin-top: auto;
}

.portal-footer__inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

.portal-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.portal-footer__links a {
  color: var(--muted);
  font-weight: 600;
}

.portal-footer__links a:hover { color: var(--green-700); }

/* ── Navigation ── */

.portal-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  padding: 0;
}

.portal-nav-toggle svg { width: 20px; height: 20px; }

.portal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.portal-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.portal-nav__link:hover {
  background: var(--green-100);
  text-decoration: none;
}

.portal-nav__link.is-active {
  background: var(--green-100);
  border-color: rgba(19, 122, 82, 0.25);
  color: var(--green-900);
}

.portal-nav__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--green-700);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.portal-nav__sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
  flex-shrink: 0;
}

.portal-nav--full {
  gap: 8px 6px;
}

.portal-nav__group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.portal-nav--full .portal-nav__link {
  padding: 6px 12px;
  font-size: 12.5px;
}

.portal-hero__pill--soon {
  background: #fef3c7;
  border-color: rgba(245, 158, 11, 0.45);
  color: #92400e;
  font-weight: 800;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.15);
}

.portal-hero__pill--today {
  background: #dcfce7;
  border-color: rgba(22, 122, 58, 0.35);
  color: #14532d;
  font-weight: 800;
}

.portal-credit-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(22, 122, 58, 0.22);
  background: linear-gradient(90deg, rgba(231, 245, 238, 0.85) 0%, #fff 100%);
}

.portal-credit-strip--compact {
  margin-top: 0;
  margin-bottom: 14px;
}

.portal-credit-strip__label {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-700);
}

.portal-credit-strip__amount {
  font-size: 1.05em;
  color: var(--green-900);
}

.portal-account-chip--credit {
  border-color: rgba(22, 122, 58, 0.28);
  background: rgba(231, 245, 238, 0.75);
  color: var(--green-900);
}

.portal-account-notify-section {
  margin-top: 0;
}

.portal-notify-cards {
  display: grid;
  gap: 10px;
}

.portal-notify-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
}

.portal-notify-card--info {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.portal-notify-card--form {
  border-color: rgba(22, 122, 58, 0.18);
  background: linear-gradient(145deg, rgba(231, 245, 238, 0.45) 0%, #fff 85%);
}

.portal-notify-card__icon {
  font-size: 22px;
  line-height: 1;
}

.portal-notify-card__body {
  min-width: 0;
}

.portal-notify-card__title {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
  color: var(--text);
}

.portal-notify-card__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.portal-notify-card__text strong {
  color: var(--green-900);
  font-weight: 650;
}

.portal-notify-card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.portal-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.portal-switch__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.portal-switch__track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.15s;
}

.portal-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  transition: transform 0.15s;
}

.portal-switch__input:checked + .portal-switch__track {
  background: var(--green-700);
}

.portal-switch__input:checked + .portal-switch__track::after {
  transform: translateX(18px);
}

.portal-switch__input:disabled + .portal-switch__track {
  opacity: 0.45;
  cursor: not-allowed;
}

.portal-switch__input:disabled ~ .portal-switch__label {
  opacity: 0.55;
}

.portal-switch__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  min-width: 22px;
}

.portal-switch__input:checked ~ .portal-switch__label {
  color: var(--green-900);
}

.portal-referral-reward--balance {
  border-color: rgba(22, 122, 58, 0.25);
  background: linear-gradient(145deg, rgba(231, 245, 238, 0.8) 0%, #fff 85%);
}

.portal-visit-detail__help {
  margin: 10px 0 0;
  font-size: 14px;
}

.portal-body--invoice-detail .portal-main,
.portal-body--payment .portal-main,
.portal-body--password .portal-main,
.portal-body--company .portal-main,
.portal-body--review .portal-main {
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(22, 122, 58, 0.05), transparent 50%),
    var(--bg);
}

.portal-invoice-detail__meta {
  margin: 6px 0 0;
  font-size: 14px;
}

.portal-invoice-lines {
  margin-top: 18px;
}

.portal-invoice-lines__title {
  margin: 0 0 10px;
}

.portal-invoice-lines__mobile {
  display: none;
  gap: 8px;
}

.portal-invoice-line-card {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
}

.portal-invoice-line-card__total {
  font-weight: 750;
  color: var(--green-900);
}

.portal-invoice-totals {
  display: grid;
  gap: 8px;
  max-width: 420px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.portal-invoice-totals__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  font-size: 14px;
}

.portal-invoice-totals__row--credit {
  color: var(--green-700);
}

.portal-invoice-totals__row--balance {
  font-size: 20px;
  font-weight: 800;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.portal-invoice-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.portal-form--ach {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.portal-payment-card-on-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
}

.portal-payment-card-on-file__label {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  width: 100%;
}

.portal-panel--payment .portal-panel__lead {
  margin: 0 0 14px;
}

.portal-stripe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.portal-stripe-field {
  margin-bottom: 10px;
}

.portal-stripe-field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}

.portal-stripe-field__input {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
}

.portal-form--payment {
  margin-top: 18px;
}

.portal-form--payment__submit {
  margin-top: 8px;
}

.portal-company__facts {
  margin-top: 18px;
}

.portal-company__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.portal-company__note {
  margin: 18px 0 0;
}

.portal-review-fallback {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #f8fafc;
}

.portal-review-fallback__lead {
  margin: 0 0 8px;
  font-weight: 650;
}

.portal-review-fallback__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 768px) {
  .portal-notify-card {
    grid-template-columns: auto 1fr;
  }

  .portal-notify-card__actions {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-top: 4px;
    border-top: 1px solid rgba(22, 122, 58, 0.12);
  }

  .portal-table--invoice-lines {
    display: none;
  }

  .portal-invoice-lines__table {
    display: none;
  }

  .portal-invoice-lines__mobile {
    display: grid;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .portal-invoice-detail__reveal,
  .portal-payment__reveal,
  .portal-password__reveal,
  .portal-company__reveal,
  .portal-review__reveal {
    animation: portal-rise 0.45s ease both;
  }
}


.portal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.portal-card--flat { box-shadow: none; }

.portal-card + .portal-card,
.portal-stack > * + * { margin-top: 16px; }

.portal-h1 {
  margin: 0 0 6px;
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.portal-h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.portal-lead {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

.portal-muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.portal-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
}

.portal-back:hover { color: var(--green-700); }

/* ── Buttons ── */

.portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--green-700);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
  font-family: inherit;
}

.portal-btn:hover {
  text-decoration: none;
  filter: brightness(1.05);
  box-shadow: var(--shadow-sm);
}

.portal-btn:active { transform: scale(0.98); }

.portal-btn--ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

.portal-btn--ghost:hover { background: var(--green-100); filter: none; }

.portal-btn--sm {
  padding: 7px 12px;
  font-size: 13px;
}

.portal-btn--block { width: 100%; }

/* ── Forms ── */

.portal-form {
  display: grid;
  gap: 14px;
  max-width: 440px;
}

.portal-field label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 6px;
}

.portal-input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.portal-input:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(22, 122, 58, 0.15);
}

.portal-error {
  color: var(--danger);
  font-size: 14px;
  margin: 8px 0;
}

.portal-success {
  color: var(--green-700);
  font-weight: 700;
  font-size: 14px;
}

.portal-banner {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 650;
}

.portal-banner--success {
  background: var(--success-soft);
  color: var(--green-900);
  border: 1px solid rgba(22, 122, 58, 0.18);
}

.portal-banner--info {
  background: var(--info-soft);
  color: #1e40af;
  border: 1px solid rgba(29, 78, 216, 0.15);
}

/* ── Badges ── */

.portal-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  background: var(--green-100);
  color: var(--green-900);
  white-space: nowrap;
}

.portal-badge--warning { background: var(--warning-soft); color: var(--warning); }
.portal-badge--danger { background: var(--danger-soft); color: var(--danger); }
.portal-badge--neutral { background: #f1f5f9; color: #475569; }
.portal-badge--info { background: var(--info-soft); color: #1d4ed8; }
.portal-badge--scheduled { background: var(--info-soft); color: #1d4ed8; }
.portal-badge--completed { background: var(--success-soft); color: var(--green-900); }
.portal-badge--unscheduled { background: var(--warning-soft); color: var(--warning); }

/* ── Tables (desktop) + card rows (mobile) ── */

.portal-table-wrap { overflow-x: auto; margin-top: 16px; }

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.portal-table th,
.portal-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.portal-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.portal-table tbody tr:hover { background: rgba(15, 23, 42, 0.02); }

.portal-table__actions { text-align: right; white-space: nowrap; }
.portal-table__num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.portal-programs-intro { margin: 10px 0 0; max-width: 980px; }

/* ── Programs page ── */

.portal-body--programs .portal-main {
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(22, 122, 58, 0.05), transparent 50%),
    var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  .portal-programs__reveal {
    animation: portal-rise 0.45s ease both;
  }

  .portal-programs__reveal:nth-child(2) { animation-delay: 0.05s; }
  .portal-programs__reveal:nth-child(3) { animation-delay: 0.1s; }
  .portal-programs__reveal:nth-child(4) { animation-delay: 0.14s; }
}

.portal-programs-hero {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(22, 122, 58, 0.2);
  background: linear-gradient(145deg, rgba(231, 245, 238, 0.95) 0%, #fff 65%);
  box-shadow: var(--shadow-sm);
}

.portal-programs-hero__main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.portal-programs-hero__label {
  display: block;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 4px;
}

.portal-programs-hero__amount {
  font-size: clamp(1.75rem, 4vw, 2.1rem);
  font-weight: 800;
  color: var(--green-900);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.portal-programs-hero__suffix {
  font-size: 0.45em;
  font-weight: 700;
  color: var(--muted);
  margin-left: 2px;
}

.portal-programs-hero__subline {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  max-width: 62ch;
}

.portal-programs-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(22, 122, 58, 0.18);
  background: linear-gradient(90deg, rgba(231, 245, 238, 0.85) 0%, #fff 100%);
}

.portal-programs-next__label {
  display: block;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 2px;
}

.portal-programs-next__text {
  font-size: 14px;
  line-height: 1.45;
  min-width: 0;
}

.portal-programs__lead {
  margin: 0 0 4px;
}

.portal-program-name {
  color: var(--green-900);
}

.portal-program-schedule,
.portal-program-billing-detail,
.portal-program-amount-note,
.portal-program-amount-empty {
  font-size: 12px;
}

.portal-program-schedule {
  margin-top: 3px;
  line-height: 1.35;
}

.portal-program-property {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-program-billing-cell {
  min-width: 108px;
}

.portal-program-billing-cell .portal-badge {
  display: inline-block;
  margin-bottom: 0;
}

.portal-program-billing-detail {
  display: block;
  margin-top: 4px;
  line-height: 1.3;
}

.portal-program-amount-empty {
  font-style: italic;
}

.portal-programs-reconcile {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #f8fafc;
}

.portal-programs-reconcile--match {
  border-color: rgba(22, 122, 58, 0.22);
  background: linear-gradient(180deg, rgba(231, 245, 238, 0.5) 0%, #f8fafc 100%);
}

.portal-programs-reconcile__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 20px;
}

.portal-programs-reconcile__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.portal-programs-reconcile__value {
  font-size: 15px;
  font-weight: 750;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.portal-programs-reconcile__note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.portal-programs-reconcile__note--ok {
  color: var(--green-900);
  font-weight: 650;
}

.portal-programs__visits-link {
  margin-top: 14px;
  margin-bottom: 0;
}

.portal-table--programs .portal-table th:nth-child(2),
.portal-table--programs .portal-table td:nth-child(2) {
  max-width: 140px;
}

.portal-program-amount {
  font-weight: 650;
}

.portal-list-item--static {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.portal-list--programs {
  display: none;
}

.portal-table--programs tbody tr:last-child td {
  border-bottom: none;
}

.portal-programs-banner { margin-top: 14px; }
.portal-programs-banner__headline {
  font-size: 17px;
  font-weight: 800;
  color: var(--green-900);
}
.portal-programs-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.portal-programs-footer__summary {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
.portal-programs-footer__note {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
}
.portal-programs-footer__sep { margin: 0 8px; color: var(--muted); }

@media (max-width: 768px) {
  .portal-program-property {
    max-width: none;
    white-space: normal;
  }

  .portal-programs-hero__main {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* Mobile list cards */
.portal-list { display: none; gap: 10px; margin-top: 16px; }

.portal-list-item {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.portal-list-item:hover {
  border-color: rgba(22, 122, 58, 0.35);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.portal-list-item__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.portal-list-item__title { font-weight: 700; color: var(--text); }

.portal-list-item__meta {
  font-size: 13px;
  color: var(--muted);
}

/* ── Dashboard ── */

.portal-dashboard {
  display: grid;
  gap: 0;
}

.portal-body--dashboard .portal-main {
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(22, 122, 58, 0.07), transparent 55%),
    var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  .portal-dashboard__reveal {
    animation: portal-rise 0.5s ease both;
  }

  .portal-dashboard__reveal:nth-child(2) { animation-delay: 0.04s; }
  .portal-dashboard__reveal:nth-child(3) { animation-delay: 0.08s; }
  .portal-dashboard__reveal:nth-child(4) { animation-delay: 0.12s; }
  .portal-dashboard__reveal:nth-child(5) { animation-delay: 0.16s; }
}

@keyframes portal-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.portal-hero {
  background:
    linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 62%, #1a8f52 100%);
  color: #fff;
  border: none;
  padding: 28px 26px;
  position: relative;
  overflow: hidden;
}

.portal-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.portal-hero__content {
  flex: 1;
  min-width: 0;
}

.portal-hero__mascot {
  flex-shrink: 0;
  align-self: flex-end;
}

.portal-mascot {
  display: block;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.portal-mascot--hero {
  width: clamp(84px, 14vw, 128px);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.18));
}

.portal-mascot--auth {
  width: clamp(72px, 18vw, 96px);
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.12));
}

.portal-mascot--banner {
  width: clamp(64px, 12vw, 88px);
  filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.1));
}

.portal-mascot--empty {
  width: 72px;
  margin: 0 auto 10px;
  opacity: 0.92;
}

.portal-mascot--footer {
  width: 34px;
  opacity: 0.85;
}

.portal-mascot--peek {
  width: 56px;
  opacity: 0.9;
}

.portal-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.portal-page-head__text {
  flex: 1;
  min-width: 0;
}

.portal-auth-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  max-width: 520px;
  margin: 40px auto;
}

.portal-auth-wrap .portal-auth {
  flex: 1;
  min-width: 0;
  margin: 0;
  max-width: 420px;
}

.portal-auth-mascot {
  flex-shrink: 0;
  padding-bottom: 8px;
}

.portal-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.portal-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.portal-hero .portal-h1 { color: #fff; margin-bottom: 4px; }

.portal-hero .portal-lead { color: rgba(255, 255, 255, 0.85); }

.portal-hero__eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.portal-hero__next {
  margin: 8px 0 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.88);
}

.portal-hero__next strong { color: #fff; font-weight: 800; }

.portal-hero__next-sep { opacity: 0.65; }

.portal-hero__next-block { margin-top: 4px; }

.portal-hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.portal-hero__pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
}

.portal-btn--hero {
  background: #fff;
  color: var(--green-900);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.portal-btn--hero:hover {
  filter: none;
  background: #f8fffb;
  color: var(--green-900);
}

.portal-hero::before {
  content: "";
  position: absolute;
  left: -60px;
  bottom: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.portal-quicklinks--hero { margin-top: 18px; }

.portal-hero .portal-quicklink {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  backdrop-filter: blur(6px);
}

.portal-hero .portal-quicklink:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.portal-dashboard__section { margin-top: 20px; }

.portal-dashboard__section.portal-card { margin-top: 20px; }

.portal-dashboard__section--actions {
  border-left: 4px solid var(--warning);
}

.portal-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.portal-section-head__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 13px;
  font-weight: 800;
}

.portal-section-head__title { margin: 0; }

.portal-all-clear {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(22, 122, 58, 0.18);
  background: linear-gradient(90deg, rgba(231, 245, 238, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.portal-all-clear__icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-700);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.portal-all-clear strong {
  display: block;
  font-size: 14px;
  color: var(--green-900);
}

.portal-all-clear__text {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 1px;
}

.portal-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.portal-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 4px;
  min-height: 108px;
}

.portal-stat--link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.portal-stat--link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(22, 122, 58, 0.28);
  text-decoration: none;
}

.portal-stat--active {
  border-color: rgba(22, 122, 58, 0.22);
  background: linear-gradient(180deg, #fff 0%, rgba(231, 245, 238, 0.55) 100%);
}

.portal-stat--warn {
  border-color: rgba(180, 83, 9, 0.22);
  background: linear-gradient(180deg, #fff 0%, rgba(255, 251, 235, 0.75) 100%);
}

.portal-stat--warn .portal-stat__value { color: var(--warning); }

.portal-stat--good {
  border-color: rgba(22, 122, 58, 0.16);
  background: linear-gradient(180deg, #fff 0%, rgba(231, 245, 238, 0.65) 100%);
}

.portal-stat--good .portal-stat__value {
  font-size: clamp(18px, 2.5vw, 22px);
  color: var(--green-700);
}

.portal-stat--link::after {
  content: "→";
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 14px;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s;
}

.portal-stat--link {
  position: relative;
}

.portal-stat--link:hover::after {
  opacity: 0.7;
  transform: translateX(0);
}

.portal-stat__icon {
  font-size: 18px;
  line-height: 1;
}

.portal-stat__value {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--green-900);
  line-height: 1.1;
}

.portal-stat__label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
}

.portal-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portal-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.portal-action__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--green-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.portal-action--urgent .portal-action__icon {
  background: #fff;
}

.portal-action:hover {
  border-color: rgba(22, 122, 58, 0.4);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.portal-action--urgent {
  border-color: rgba(180, 35, 24, 0.25);
  background: var(--danger-soft);
}

.portal-action__body { min-width: 0; }

.portal-action__title { font-weight: 750; font-size: 15px; }

.portal-action__sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 0;
}

.portal-grid-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 210px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.portal-grid-card--empty {
  min-height: 0;
}

.portal-grid-card:hover {
  border-color: rgba(22, 122, 58, 0.22);
  box-shadow: var(--shadow-md);
}

.portal-grid-card--accent {
  background: linear-gradient(180deg, #fff 0%, rgba(231, 245, 238, 0.45) 100%);
}

.portal-grid-card--wide {
  grid-column: 1 / -1;
}

.portal-grid-card__title a {
  color: inherit;
  text-decoration: none;
}

.portal-grid-card__title a:hover {
  color: var(--green-700);
}

.portal-grid-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.portal-grid-card__head-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.portal-grid-card__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-900);
  font-size: 11px;
  font-weight: 800;
}

.portal-grid-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.portal-grid-card__body {
  flex: 1;
  min-height: 0;
}

.portal-grid-card__copy {
  margin: 0 0 14px;
  line-height: 1.5;
}

.portal-grid-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--green-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.portal-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.portal-feed__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fafbfc;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.portal-feed__item:hover {
  background: #fff;
  border-color: rgba(22, 122, 58, 0.25);
  text-decoration: none;
}

.portal-feed__item--static {
  background: #fafbfc;
}

.portal-feed__main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.portal-feed__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.portal-feed__meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-feed__amount {
  font-size: 14px;
  font-weight: 800;
  color: var(--green-900);
  white-space: nowrap;
}

.portal-feed__aside {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.portal-quicklinks--stack {
  margin-top: 0;
  flex-direction: column;
  align-items: stretch;
}

.portal-quicklinks--stack .portal-quicklink {
  justify-content: center;
}

.portal-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.portal-tile {
  display: grid;
  gap: 2px;
  padding: 14px 14px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.portal-tile__emoji {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 4px;
}

.portal-grid-card--wide .portal-tiles {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-grid-card .portal-link-row {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.portal-link-row a::after {
  content: " →";
  transition: transform 0.15s;
  display: inline-block;
}

.portal-link-row a:hover::after {
  transform: translateX(3px);
}

.portal-help-strip {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.portal-help-strip__text {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.portal-help-strip a {
  font-weight: 650;
}

.portal-tile:hover {
  border-color: rgba(22, 122, 58, 0.3);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  text-decoration: none;
}

.portal-tile__label {
  font-size: 14px;
  font-weight: 750;
  color: var(--text);
}

.portal-tile__hint {
  font-size: 12px;
  color: var(--muted);
}

.portal-mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-mini-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.portal-mini-list li:last-child { border-bottom: none; }

.portal-link-row {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 650;
}

/* ── Empty states ── */

.portal-empty {
  text-align: center;
  padding: 32px 16px;
}

.portal-empty--compact {
  padding: 18px 12px;
  text-align: left;
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

.portal-empty--compact .portal-empty__title {
  font-size: 14px;
}

.portal-empty--compact .portal-muted {
  font-size: 13px;
  margin: 4px 0 0;
}

.portal-empty__icon {
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.7;
}

.portal-empty .portal-mascot--empty {
  margin-bottom: 10px;
}

.portal-empty__title {
  font-weight: 750;
  margin: 0 0 6px;
}

/* ── Auth pages ── */

.portal-auth {
  max-width: 420px;
  margin: 40px auto;
}

.portal-auth .portal-card { padding: 28px; }

.portal-auth__logo {
  height: 52px;
  margin-bottom: 16px;
}

/* ── Photo grid + lightbox ── */

.portal-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.portal-photo-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.15s;
}

.portal-photo-grid img:hover { transform: scale(1.02); }

.portal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.portal-lightbox.is-open { display: flex; }

.portal-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-sm);
}

.portal-lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #fff;
  border: none;
  border-radius: 999px;
  width: 40px;
  cursor: pointer;
  font-weight: 700;
}

/* ── Definition lists ── */

.portal-dl {
  margin: 18px 0;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 14px;
  font-size: 14px;
}

.portal-dl dt { color: var(--muted); font-weight: 600; margin: 0; }
.portal-dl dd { margin: 0; }

/* ── Referrals share row ── */

.portal-referrals {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-referrals > .portal-card + .portal-card,
.portal-referrals > .portal-help-strip {
  margin-top: 0;
}

.portal-body--referrals .portal-main {
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(22, 122, 58, 0.05), transparent 50%),
    var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  .portal-referrals__reveal {
    animation: portal-rise 0.45s ease both;
  }

  .portal-referrals__reveal:nth-child(2) { animation-delay: 0.06s; }
  .portal-referrals__reveal:nth-child(3) { animation-delay: 0.12s; }
}

.portal-page-head--referrals {
  align-items: flex-start;
}

.portal-lead--referrals {
  max-width: 38ch;
  line-height: 1.55;
}

.portal-referral-rewards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.portal-referral-reward {
  padding: 16px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  text-align: center;
}

.portal-referral-reward--earn {
  border-color: rgba(22, 122, 58, 0.22);
  background: linear-gradient(180deg, rgba(231, 245, 238, 0.55) 0%, #fff 100%);
}

.portal-referral-reward__amount {
  display: block;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 800;
  color: var(--green-900);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.portal-referral-reward__label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  line-height: 1.35;
}

.portal-referral-share-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.portal-referral-share-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  align-items: start;
  padding: 20px 22px;
  border: 1px solid rgba(22, 122, 58, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(231, 245, 238, 0.98) 0%, #fff 72%);
  box-shadow: var(--shadow-sm);
}

.portal-referral-share-card__label {
  display: block;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 6px;
}

.portal-referral-share-card__code {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--green-900);
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}

.portal-referral-share-card__url {
  word-break: break-all;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #334155;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(22, 122, 58, 0.12);
  background: rgba(255, 255, 255, 0.82);
}

.portal-referral-share-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 118px;
}

.portal-referral-share-card__actions .portal-btn {
  width: 100%;
  white-space: nowrap;
}

.portal-btn--sms::before {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-referral-fineprint {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.portal-referral-leaderboard {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portal-referral-leaderboard__row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
}

.portal-referral-leaderboard__row--you {
  border-color: rgba(22, 122, 58, 0.35);
  background: rgba(231, 245, 238, 0.45);
}

.portal-referral-leaderboard__rank {
  font-weight: 800;
  color: var(--muted);
}

.portal-referral-leaderboard__name {
  font-weight: 700;
}

.portal-referral-leaderboard__score {
  font-size: 13px;
  font-weight: 700;
  color: var(--green-900);
}

.portal-referral-how {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.portal-referral-how__title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.portal-referral-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.portal-referral-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #f8fafc;
}

.portal-referral-step__num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: var(--green-100);
  color: var(--green-900);
}

.portal-referral-step strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.portal-referral-step .portal-muted {
  display: block;
  font-size: 12px;
  line-height: 1.4;
}

.portal-referrals__activity .portal-h2 {
  margin-bottom: 4px;
}

.portal-empty--referrals {
  margin-top: 8px;
}

.portal-referral-stats {
  margin-top: 14px;
  margin-bottom: 4px;
}

.portal-list--referrals {
  display: none;
}

.portal-table--referrals tbody tr:last-child td {
  border-bottom: none;
}

.portal-share-row {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--green-100);
}

.portal-share-row__url {
  word-break: break-all;
  font-size: 13px;
  font-family: ui-monospace, monospace;
  margin-top: 6px;
  color: #334155;
}

/* ── Account page ── */

.portal-account {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-account > .portal-card + .portal-card,
.portal-account > .portal-help-strip {
  margin-top: 0;
}

.portal-body--account .portal-main {
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(22, 122, 58, 0.05), transparent 50%),
    var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  .portal-account__reveal {
    animation: portal-rise 0.45s ease both;
  }

  .portal-account__reveal:nth-child(2) { animation-delay: 0.06s; }
  .portal-account__reveal:nth-child(3) { animation-delay: 0.1s; }
  .portal-account__reveal:nth-child(4) { animation-delay: 0.14s; }
}

.portal-page-head--account {
  align-items: flex-start;
}

.portal-lead--account {
  max-width: 38ch;
  line-height: 1.55;
}

.portal-account-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(22, 122, 58, 0.2);
  background: linear-gradient(145deg, rgba(231, 245, 238, 0.75) 0%, #fff 85%);
}

.portal-account-hero__identity {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.portal-account-hero__name {
  font-size: 16px;
  font-weight: 750;
  color: var(--green-900);
}

.portal-account-hero__meta {
  font-size: 13px;
  color: var(--muted);
}

.portal-account-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portal-account-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
  font-weight: 650;
  color: #475569;
  white-space: nowrap;
}

.portal-account-chip--ok {
  border-color: rgba(22, 122, 58, 0.22);
  background: var(--green-100);
  color: var(--green-900);
}

.portal-account__flash {
  margin-top: 12px;
}

.portal-account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 24px 28px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  align-items: start;
}

.portal-account-section__title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.portal-form--account {
  margin-top: 0;
  max-width: none;
}

.portal-form--account__submit {
  margin-top: 4px;
  min-width: 180px;
}

.portal-field__hint {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.4;
}

.portal-account-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.portal-account-tile {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.portal-account-tile::before {
  content: "";
  width: 16px;
  height: 16px;
  margin-bottom: 2px;
  background: var(--green-700);
  opacity: 0.85;
}

.portal-account-tile--payment::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-account-tile--password::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-account-tile--programs::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 6h16M4 12h16M4 18h10'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 6h16M4 12h16M4 18h10'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-account-tile--properties::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 10.5L12 3l9 7.5V21H3z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 10.5L12 3l9 7.5V21H3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-account-tile:hover {
  border-color: rgba(22, 122, 58, 0.28);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  text-decoration: none;
}

.portal-account-tile__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.portal-account-tile__hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.portal-list--properties {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.portal-property-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.portal-property-card--attention {
  border-color: rgba(217, 119, 6, 0.28);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.55) 0%, #fff 100%);
}

.portal-list--account-programs {
  display: none;
}

.portal-table--account-programs tbody tr:last-child td {
  border-bottom: none;
}

.portal-section-head .portal-muted {
  margin: 4px 0 0;
  font-size: 13px;
}

/* ── Property details page ── */

.portal-property {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-property > .portal-card + .portal-help-strip {
  margin-top: 0;
}

.portal-body--property .portal-main {
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(22, 122, 58, 0.05), transparent 50%),
    var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  .portal-property__reveal {
    animation: portal-rise 0.45s ease both;
  }

  .portal-property__reveal:nth-child(2) { animation-delay: 0.08s; }
}

.portal-page-head--property {
  align-items: flex-start;
  margin-top: 4px;
}

.portal-lead--property {
  max-width: 38ch;
  line-height: 1.55;
}

.portal-property-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(22, 122, 58, 0.2);
  background: linear-gradient(145deg, rgba(231, 245, 238, 0.75) 0%, #fff 85%);
}

.portal-property-hero__address {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.portal-property-hero__label {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-700);
}

.portal-property-hero__line {
  font-size: 17px;
  font-weight: 750;
  color: var(--green-900);
  line-height: 1.25;
}

.portal-property-hero__meta {
  font-size: 13px;
  color: var(--muted);
}

.portal-property-hero__count {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.portal-property-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.portal-property-status__item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 1px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.portal-property-status__item:hover {
  border-color: rgba(22, 122, 58, 0.25);
  background: #f8fafc;
  text-decoration: none;
  transform: translateY(-1px);
}

.portal-property-status__item--complete {
  border-color: rgba(22, 122, 58, 0.22);
  background: linear-gradient(180deg, rgba(231, 245, 238, 0.65) 0%, #fff 100%);
}

.portal-property-status__icon {
  grid-row: 1 / 3;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: #f1f5f9;
  color: #64748b;
}

.portal-property-status__item--complete .portal-property-status__icon {
  background: var(--green-700);
  color: #fff;
}

.portal-property-status__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.portal-property-status__hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.portal-property__flash {
  margin-top: 12px;
}

.portal-property-form {
  margin-top: 16px;
  max-width: none;
  gap: 10px;
}

.portal-property-section {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  scroll-margin-top: 88px;
}

.portal-property-section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  float: none;
  width: auto;
  margin: 0 0 4px;
  padding: 0;
  font-size: 16px;
  font-weight: 750;
  color: var(--text);
}

.portal-property-section__num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: var(--green-100);
  color: var(--green-900);
}

.portal-property-section__lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  clear: both;
}

.portal-field__label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 8px;
}

.portal-radio-group ul,
.portal-check-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-radio-group li,
.portal-check-group li {
  margin: 0;
  position: relative;
}

.portal-radio-group label,
.portal-check-group label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 40px;
  min-width: 72px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, color 0.15s;
}

.portal-radio-group label:hover,
.portal-check-group label:hover {
  border-color: rgba(22, 122, 58, 0.28);
}

.portal-radio-group label:has(input:checked),
.portal-check-group label:has(input:checked) {
  border-color: rgba(22, 122, 58, 0.35);
  background: var(--green-100);
  color: var(--green-900);
  box-shadow: inset 0 0 0 1px rgba(22, 122, 58, 0.08);
}

.portal-radio-group label:has(:focus-visible),
.portal-check-group label:has(:focus-visible) {
  outline: 2px solid var(--green-700);
  outline-offset: 2px;
}

.portal-radio-group input[type="radio"],
.portal-check-group input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.portal-field--conditional {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(148, 163, 184, 0.45);
}

.portal-field--conditional[hidden] {
  display: none !important;
}

.portal-property-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px -22px -22px;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.4) 0%, #fff 100%);
  border-radius: 0 0 var(--radius) var(--radius);
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.portal-property-form__actions .portal-btn {
  min-width: 180px;
}

/* ── Support page ── */

.portal-support {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-support > .portal-card + .portal-card {
  margin-top: 0;
}

.portal-body--support .portal-main {
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(22, 122, 58, 0.05), transparent 50%),
    var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  .portal-support__reveal {
    animation: portal-rise 0.45s ease both;
  }

  .portal-support__reveal:nth-child(2) { animation-delay: 0.08s; }
}

.portal-page-head--support {
  align-items: flex-start;
}

.portal-lead--support {
  max-width: 40ch;
  line-height: 1.55;
}

.portal-support-contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.portal-support-contact__item {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(22, 122, 58, 0.2);
  background: linear-gradient(145deg, rgba(231, 245, 238, 0.7) 0%, #fff 85%);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.portal-support-contact__item:hover {
  border-color: rgba(22, 122, 58, 0.35);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  text-decoration: none;
}

.portal-support-contact__item::before {
  content: "";
  width: 16px;
  height: 16px;
  margin-bottom: 2px;
  background: var(--green-700);
}

.portal-support-contact__item--phone::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.86 19.86 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.86 19.86 0 0 1 2.08 4.18 2 2 0 0 1 4.06 2h3a2 2 0 0 1 2 1.72c.12.86.31 1.7.57 2.5a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.58-1.09a2 2 0 0 1 2.11-.45c.8.26 1.64.45 2.5.57A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.86 19.86 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.86 19.86 0 0 1 2.08 4.18 2 2 0 0 1 4.06 2h3a2 2 0 0 1 2 1.72c.12.86.31 1.7.57 2.5a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.58-1.09a2 2 0 0 1 2.11-.45c.8.26 1.64.45 2.5.57A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-support-contact__item--email::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-support-contact__label {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--green-700);
}

.portal-support-contact__value {
  font-size: 14px;
  font-weight: 700;
  color: var(--green-900);
  word-break: break-word;
}

.portal-support-contact__note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.portal-support-contact__item--primary {
  border-color: rgba(22, 122, 58, 0.32);
  background: linear-gradient(145deg, rgba(231, 245, 238, 0.95) 0%, #fff 80%);
}

.portal-support__flash {
  margin-top: 12px;
}

.portal-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  gap: 22px 24px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  align-items: start;
}

.portal-support-compose {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.portal-support-compose__lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
}

.portal-support-section__title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.portal-support-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.portal-support-topic {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.portal-support-topic:hover {
  border-color: rgba(22, 122, 58, 0.28);
  background: #fff;
}

.portal-support-topic.is-active {
  border-color: rgba(22, 122, 58, 0.35);
  background: var(--green-100);
  color: var(--green-900);
  box-shadow: inset 0 0 0 1px rgba(22, 122, 58, 0.08);
}

.portal-field--topic-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.portal-form--support {
  position: relative;
  max-width: none;
  margin-top: 0;
}

.portal-support-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.portal-support-form__actions .portal-btn {
  min-width: 160px;
}

.portal-support-links {
  display: grid;
  gap: 8px;
}

.portal-support-link {
  display: grid;
  gap: 2px;
  padding: 12px 14px 12px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.portal-support-link::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 16px;
  height: 16px;
  background: var(--green-700);
  opacity: 0.85;
}

.portal-support-link--account::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-support-link--invoices::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 2h9l3 3v17H6z'/%3E%3Cpath d='M9 13h6M9 17h6M9 9h3'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 2h9l3 3v17H6z'/%3E%3Cpath d='M9 13h6M9 17h6M9 9h3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-support-link--visits::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-support-link--review::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='m12 2 3 7 7 1-5 5 1 7-6-3-6 3 1-7-5-5 7-1z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='m12 2 3 7 7 1-5 5 1 7-6-3-6 3 1-7-5-5 7-1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-support-link:hover {
  border-color: rgba(22, 122, 58, 0.28);
  background: #f8fafc;
  text-decoration: none;
}

.portal-support-link__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.portal-support-link__hint {
  font-size: 12px;
  color: var(--muted);
}

.portal-support-hours {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.portal-list--support {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.portal-support-request__message {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.portal-support-request--open {
  border-color: rgba(217, 119, 6, 0.28);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.55) 0%, #fff 100%);
}

.portal-empty--support {
  margin-top: 8px;
}

/* ── Lawn tips page ── */

.portal-tips {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-tips > .portal-card + .portal-card,
.portal-tips > .portal-help-strip {
  margin-top: 0;
}

.portal-body--tips .portal-main {
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(22, 122, 58, 0.05), transparent 50%),
    var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  .portal-tips__reveal {
    animation: portal-rise 0.45s ease both;
  }

  .portal-tips__reveal:nth-child(2) { animation-delay: 0.08s; }
}

.portal-page-head--tips {
  align-items: flex-start;
}

.portal-lead--tips {
  max-width: 38ch;
  line-height: 1.55;
}

.portal-tips-hero {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(22, 122, 58, 0.2);
  background: linear-gradient(145deg, rgba(231, 245, 238, 0.75) 0%, #fff 85%);
}

.portal-tips-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portal-tips-hero__count {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--green-700);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
}

.portal-tips-hero__chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(22, 122, 58, 0.18);
  background: #fff;
  color: var(--green-900);
  font-size: 12px;
  font-weight: 650;
}

.portal-tips-hero__meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 62ch;
}

.portal-tips-body {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.portal-tips-group--spaced {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.portal-tips-footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.portal-tips-section__title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.portal-tip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.portal-tip-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  height: 100%;
}

.portal-tip-card--care {
  border-left: 3px solid rgba(22, 122, 58, 0.35);
}

.portal-tip-card--after {
  border-left: 3px solid rgba(59, 130, 246, 0.35);
}

@media (prefers-reduced-motion: no-preference) {
  .portal-tip-card {
    animation: portal-rise 0.4s ease both;
  }

  .portal-tip-list li:nth-child(1) .portal-tip-card { animation-delay: 0.02s; }
  .portal-tip-list li:nth-child(2) .portal-tip-card { animation-delay: 0.05s; }
  .portal-tip-list li:nth-child(3) .portal-tip-card { animation-delay: 0.08s; }
  .portal-tip-list li:nth-child(4) .portal-tip-card { animation-delay: 0.11s; }
}

.portal-tip-card:hover {
  border-color: rgba(22, 122, 58, 0.22);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.portal-tip-card__icon-wrap {
  position: relative;
  flex-shrink: 0;
}

.portal-tip-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-100);
}

.portal-tip-card__num {
  position: absolute;
  right: -4px;
  top: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-700);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
}

.portal-tip-card__icon::before {
  content: "";
  width: 20px;
  height: 20px;
  background: var(--green-700);
}

.portal-tip-card--water .portal-tip-card__icon::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 2.5c3 4.5 6 8 6 11a6 6 0 1 1-12 0c0-3 3-6.5 6-11z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 2.5c3 4.5 6 8 6 11a6 6 0 1 1-12 0c0-3 3-6.5 6-11z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-tip-card--mow .portal-tip-card__icon::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 12h16M4 12l4-4M4 12l4 4'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 12h16M4 12l4-4M4 12l4 4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-tip-card--turf .portal-tip-card__icon::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 20v-8M8 20V8M12 20V12M16 20V6M20 20V10'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 20v-8M8 20V8M12 20V12M16 20V6M20 20V10'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-tip-card--service .portal-tip-card__icon::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-tip-card--season .portal-tip-card__icon::before,
.portal-tip-card--weed .portal-tip-card__icon::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 22V8M12 8C12 8 7 6 5 2c4 1 7 4 7 6M12 8c0 0 5-2 7-6-4 1-7 4-7 6'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 22V8M12 8C12 8 7 6 5 2c4 1 7 4 7 6M12 8c0 0 5-2 7-6-4 1-7 4-7 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-tip-card--report .portal-tip-card__icon::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 2h9l3 3v17H6z'/%3E%3Cpath d='M9 9h6M9 13h6M9 17h4'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 2h9l3 3v17H6z'/%3E%3Cpath d='M9 9h6M9 13h6M9 17h4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-tip-card--report {
  border-color: rgba(22, 122, 58, 0.28);
  background: linear-gradient(180deg, rgba(231, 245, 238, 0.45) 0%, #fff 100%);
}

.portal-tip-card--timing .portal-tip-card__icon::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-tip-card--pets .portal-tip-card__icon::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='8' cy='7' r='2'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='18' cy='13' r='2'/%3E%3Ccircle cx='6' cy='13' r='2'/%3E%3Cpath d='M12 10c-2 2-3 4-3 7h6c0-3-1-5-3-7z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='8' cy='7' r='2'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='18' cy='13' r='2'/%3E%3Ccircle cx='6' cy='13' r='2'/%3E%3Cpath d='M12 10c-2 2-3 4-3 7h6c0-3-1-5-3-7z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-tip-card__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 750;
  color: var(--text);
  line-height: 1.35;
}

.portal-tip-card__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
}

.portal-tip-card__link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--green-700);
  text-decoration: none;
}

.portal-tip-card__link:hover {
  text-decoration: underline;
}

.portal-tips-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.portal-tips-link {
  display: grid;
  gap: 3px;
  padding: 14px 14px 12px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.portal-tips-link::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 16px;
  height: 16px;
  background: var(--green-700);
  opacity: 0.85;
}

.portal-tips-link--visits::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-tips-link--property::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 10.5L12 3l9 7.5V21H3z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 10.5L12 3l9 7.5V21H3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-tips-link--support::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portal-tips-link:hover {
  border-color: rgba(22, 122, 58, 0.28);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  text-decoration: none;
}

.portal-tips-link__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.portal-tips-link__hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

/* ── Autopay panel ── */

.portal-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--success-soft);
}

.portal-panel--neutral {
  background: #f8fafc;
}

.portal-list-plain {
  margin: 0;
  padding-left: 18px;
}

.portal-visit-detail__meta {
  margin: 0;
}

.portal-visit-detail__cta {
  margin: 14px 0 0;
}

.portal-visit-detail__nav-item + .portal-visit-detail__nav-item {
  margin-top: 6px;
}

.portal-visit-detail__section {
  margin-top: 18px;
}

.portal-visit-detail__section--photos {
  margin-top: 24px;
}

.portal-visit-detail__notes {
  margin-top: 8px;
}

.portal-photo-grid__caption {
  font-size: 11px;
  margin-top: 4px;
}

.portal-body--visit-detail .portal-main {
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(22, 122, 58, 0.04), transparent 50%),
    var(--bg);
}

/* ── Toast notifications ── */

.portal-toast-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.portal-toast {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--green-900);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  box-shadow: var(--shadow-lg);
  animation: portal-toast-in 0.3s ease;
  pointer-events: auto;
}

.portal-toast--error { background: var(--danger); }

@keyframes portal-toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Quick links row ── */

.portal-quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.portal-quicklink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  background: #fff;
  text-decoration: none;
}

.portal-quicklink:hover {
  background: var(--green-100);
  text-decoration: none;
}

.portal-quicklink.is-active {
  background: var(--green-100);
  border-color: rgba(19, 122, 82, 0.25);
  color: var(--green-900);
}

/* ── Visit treatment guidance (from Visit snippets) ── */

.portal-visit-guidance {
  margin-top: 24px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.portal-visit-guidance__title {
  margin: 0 0 14px;
  font-size: 1.25rem;
}

.portal-visit-guidance__body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.portal-visit-guidance__body p {
  margin: 0 0 0.85em;
}

.portal-visit-guidance__body p:last-child {
  margin-bottom: 0;
}

.portal-visit-guidance__body h2,
.portal-visit-guidance__body h3 {
  margin: 1.25em 0 0.5em;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--green-900);
}

.portal-visit-guidance__body h2:first-child,
.portal-visit-guidance__body h3:first-child {
  margin-top: 0;
}

.portal-visit-guidance__body ul,
.portal-visit-guidance__body ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.portal-visit-guidance__body li {
  margin-bottom: 0.35em;
}

.portal-visit-guidance__body strong {
  font-weight: 700;
}

.portal-visit-guidance__body a {
  font-weight: 650;
}

.portal-visit-guidance__body img {
  border-radius: 8px;
  margin: 0.5em 0;
}

.portal-visit-section { margin-top: 16px; }

.portal-visit-section__head {
  margin-bottom: 12px;
}

.portal-visit-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.portal-visit-section__icon {
  font-size: 18px;
  line-height: 1;
}

.portal-visit-section__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-900);
  font-size: 11px;
  font-weight: 800;
}

.portal-visit-section__lead {
  margin: 6px 0 0;
  max-width: 62ch;
}

.portal-visit-section__help {
  margin-top: 12px;
}

.portal-visit-date {
  font-weight: 650;
}

.portal-visit-date__sub {
  font-size: 12px;
}

/* ── Visits page tabs & summary ── */

.portal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

@media (max-width: 640px) {
  .portal-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .portal-tabs::-webkit-scrollbar {
    display: none;
  }

  .portal-tab {
    flex-shrink: 0;
  }
}

.portal-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.portal-tab:hover {
  background: var(--green-100);
  text-decoration: none;
}

.portal-tab.is-active {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}

.portal-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 11px;
  font-weight: 800;
}

.portal-tab.is-active .portal-tab__count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.portal-visits-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.portal-visits-summary__item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border);
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.portal-visits-summary__item:hover {
  border-color: rgba(22, 122, 58, 0.28);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  text-decoration: none;
}

.portal-visits-summary__item--active {
  border-color: rgba(22, 122, 58, 0.22);
  background: linear-gradient(180deg, #fff 0%, rgba(231, 245, 238, 0.55) 100%);
}

.portal-visits-summary__item--warn {
  border-color: rgba(180, 83, 9, 0.2);
  background: linear-gradient(180deg, #fff 0%, rgba(255, 251, 235, 0.7) 100%);
}

.portal-visits-summary__value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--green-900);
  line-height: 1.1;
}

.portal-visits-summary__label {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}

.portal-visits-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(22, 122, 58, 0.18);
  background: linear-gradient(90deg, rgba(231, 245, 238, 0.85) 0%, #fff 100%);
}

.portal-visits-next__label {
  display: block;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 2px;
}

.portal-visits-next__text {
  font-size: 14px;
  line-height: 1.45;
  min-width: 0;
}

.portal-visits-next__text strong {
  color: var(--green-900);
}

.portal-visit-section--solo {
  margin-top: 16px;
}

.portal-visit-section__lead--solo {
  margin: 0 0 14px;
}

.portal-table-row--click {
  cursor: pointer;
  transition: background 0.12s;
}

.portal-table-row--click:hover {
  background: rgba(22, 122, 58, 0.04);
}

.portal-table-row--click:focus-visible {
  outline: 2px solid var(--green-700);
  outline-offset: -2px;
}

@media (prefers-reduced-motion: no-preference) {
  .portal-visits__reveal {
    animation: portal-rise 0.45s ease both;
  }

  .portal-visits__reveal:nth-child(2) { animation-delay: 0.05s; }
  .portal-visits__reveal:nth-child(3) { animation-delay: 0.1s; }
  .portal-visits__reveal:nth-child(4) { animation-delay: 0.14s; }
  .portal-visits__reveal:nth-child(5) { animation-delay: 0.18s; }
}

.portal-body--visits .portal-main {
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(22, 122, 58, 0.05), transparent 50%),
    var(--bg);
}

/* ── Estimates page ── */

.portal-body--estimates .portal-main {
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(22, 122, 58, 0.05), transparent 50%),
    var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  .portal-estimates__reveal {
    animation: portal-rise 0.45s ease both;
  }

  .portal-estimates__reveal:nth-child(2) { animation-delay: 0.05s; }
  .portal-estimates__reveal:nth-child(3) { animation-delay: 0.1s; }
  .portal-estimates__reveal:nth-child(4) { animation-delay: 0.14s; }
}

.portal-estimates-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(180, 83, 9, 0.22);
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.9) 0%, #fff 100%);
}

.portal-estimates-next__label {
  display: block;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warning);
  margin-bottom: 2px;
}

.portal-estimates-next__text {
  font-size: 14px;
  line-height: 1.45;
  min-width: 0;
}

.portal-estimates-next__text strong {
  color: var(--text);
}

.portal-estimates__lead {
  margin: 0 0 4px;
}

.portal-all-clear--compact {
  margin-top: 16px;
  padding: 12px 14px;
}

.portal-estimate-id {
  font-weight: 700;
  color: var(--green-900);
}

.portal-estimate-amount {
  font-weight: 650;
}

.portal-estimate-amount__suffix {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.portal-list--estimates {
  display: none;
}

.portal-table--estimates tbody tr:last-child td {
  border-bottom: none;
}

/* ── Invoices page ── */

.portal-body--invoices .portal-main {
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(22, 122, 58, 0.05), transparent 50%),
    var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  .portal-invoices__reveal {
    animation: portal-rise 0.45s ease both;
  }

  .portal-invoices__reveal:nth-child(2) { animation-delay: 0.05s; }
  .portal-invoices__reveal:nth-child(3) { animation-delay: 0.1s; }
  .portal-invoices__reveal:nth-child(4) { animation-delay: 0.14s; }
}

.portal-invoices-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(180, 83, 9, 0.22);
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.9) 0%, #fff 100%);
}

.portal-invoices-next__label {
  display: block;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warning);
  margin-bottom: 2px;
}

.portal-invoices-next__text {
  font-size: 14px;
  line-height: 1.45;
  min-width: 0;
}

.portal-invoices-next__text strong {
  color: var(--text);
  font-size: 1.05em;
}

.portal-invoices__lead {
  margin: 0 0 4px;
}

.portal-invoice-id {
  font-weight: 700;
  color: var(--green-900);
}

.portal-invoice-balance {
  color: var(--warning);
}

.portal-table-row--urgent {
  background: rgba(255, 251, 235, 0.35);
}

.portal-table-row--urgent:hover {
  background: rgba(255, 251, 235, 0.55);
}

.portal-list-item--urgent {
  border-color: rgba(180, 83, 9, 0.22);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.5) 0%, #fff 100%);
}

.portal-list--invoices {
  display: none;
}

.portal-table--invoices tbody tr:last-child td {
  border-bottom: none;
}

.portal-list--visits {
  display: none;
}

.portal-list-item--link {
  display: block;
  color: inherit;
}

.portal-list-item--link:hover {
  text-decoration: none;
}

.portal-list-item__cta {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-700);
}

.portal-table--visits tbody tr:last-child td {
  border-bottom: none;
}

/* ── Technician profile card ── */

.portal-tech-card {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  box-shadow: var(--shadow-sm);
}

.portal-tech-card__heading {
  margin: 0 0 14px;
  font-size: 1.15rem;
}

.portal-tech-card__body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.portal-tech-card__photo,
.portal-tech-card__avatar {
  width: 72px;
  height: 72px;
  min-width: 72px;
  max-width: 72px;
  max-height: 72px;
  border-radius: 50%;
  flex: 0 0 72px;
}

.portal-tech-card__photo {
  object-fit: cover;
  object-position: center top;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Flex children ignore width on large photos without flex-basis (global img { max-width: 100% }). */
.portal-report .portal-tech-card {
  margin-top: 0;
  margin-bottom: 24px;
}

.portal-report .portal-tech-card__photo,
.portal-report .portal-tech-card__avatar {
  width: 64px;
  height: 64px;
  min-width: 64px;
  max-width: 64px;
  max-height: 64px;
  flex: 0 0 64px;
}

.portal-report .portal-tech-card__bio {
  display: block;
  overflow: visible;
}

/* ── Service report (completed visit) ── */

.portal-body--report .portal-main {
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(22, 122, 58, 0.05), transparent 50%),
    var(--bg);
}

.portal-report-wrap {
  max-width: 820px;
  margin: 0 auto;
}

.portal-report-wrap .portal-help-strip {
  margin-top: 16px;
}

.portal-report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 8px;
  z-index: 20;
  box-shadow: var(--shadow-sm);
}

.portal-report-toolbar__print {
  flex-shrink: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .portal-report__reveal {
    animation: portal-rise 0.45s ease both;
  }

  .portal-report__reveal:nth-child(2) { animation-delay: 0.06s; }
  .portal-report__reveal:nth-child(3) { animation-delay: 0.12s; }
}

.portal-report-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.portal-report-print-head {
  display: none;
}

.portal-report-print-head__title {
  margin: 0 0 4px;
}

.portal-report-hero {
  margin: 0 0 24px;
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(19, 122, 58, 0.18);
  background: linear-gradient(145deg, #f0fdf4 0%, #fff 55%);
  box-shadow: var(--shadow-sm);
}

.portal-report-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.portal-report-hero__eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-700, #137a52);
}

.portal-report-hero__title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  line-height: 1.25;
  color: var(--text);
}

.portal-report-hero__subtitle {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.portal-report-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 20px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(19, 122, 58, 0.12);
}

.portal-report-fact--weather {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .portal-report-fact--weather {
    grid-column: auto;
  }
}

.portal-report-fact__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.portal-report-fact__value {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.portal-report-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.portal-report-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: #fff;
  border: 1px solid var(--border);
  color: #334155;
}

.portal-report-chip--conditions::before { content: "☁️"; font-size: 11px; }
.portal-report-chip--temp::before { content: "🌡️"; font-size: 11px; }
.portal-report-chip--humidity::before { content: "💧"; font-size: 11px; }
.portal-report-chip--wind::before { content: "💨"; font-size: 11px; }

.portal-report-aftercare {
  margin-bottom: 24px;
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 2px solid rgba(19, 122, 58, 0.28);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.portal-report-aftercare .portal-visit-guidance__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 1.3rem;
  color: var(--green-900, #0f5a3f);
}

.portal-report-aftercare .portal-visit-guidance__body {
  font-size: 15px;
}

.portal-report-rei--prominent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}

.portal-report-rei__icon {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1.4;
}

.portal-report-section__icon {
  font-size: 1.1em;
  line-height: 1;
}

.portal-report-section__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--green-100);
  color: var(--green-900);
  vertical-align: middle;
}

.portal-report-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.portal-report-checklist li {
  position: relative;
  padding: 10px 14px 10px 36px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.45;
}

.portal-report-checklist li::before {
  content: "✓";
  position: absolute;
  left: 12px;
  top: 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--green-700);
}

.portal-report-empty {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

.portal-report-section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.portal-report-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  font-size: 1.15rem;
  color: var(--text);
}

.portal-report-notes {
  white-space: pre-wrap;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.55;
}

.portal-report-about {
  font-size: 15px;
  line-height: 1.6;
  color: #334155;
}

.portal-report-products-intro {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.portal-report-product-group {
  margin-bottom: 18px;
}

.portal-report-product-group:last-child {
  margin-bottom: 0;
}

.portal-report-product-group__label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-800, #0f5a3f);
}

.portal-report-product-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.portal-report-product-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border);
  font-size: 14px;
}

.portal-report-product-item__name {
  font-weight: 650;
  color: var(--text);
}

.portal-report-product-item__purpose {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.portal-report-rei {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--success-soft);
  border: 1px solid rgba(19, 122, 58, 0.2);
  font-size: 14px;
  font-weight: 650;
  color: var(--green-900, #0f5a3f);
  line-height: 1.45;
}

.portal-report-footer-note {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.portal-report-upsell-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.portal-report-upsell {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 16px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(19, 122, 58, 0.22);
  background: linear-gradient(180deg, #f8fdf9 0%, #fff 100%);
}

.portal-report-upsell__title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.portal-report-upsell__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
  max-width: 52ch;
}

.portal-report-upsell__cta {
  flex-shrink: 0;
  align-self: center;
}

.portal-tech-card__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--success-soft, #e7f5ee);
  color: var(--green-800, #0f5a3f);
  font-size: 1.35rem;
  font-weight: 800;
}

.portal-tech-card__name {
  font-size: 1.1rem;
  font-weight: 750;
  color: var(--text);
}

.portal-tech-card__title {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 2px;
}

.portal-tech-card__bio {
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #334155;
}

.portal-tech-card__fact {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--green-700);
  font-style: italic;
}

@media (max-width: 520px) {
  .portal-tech-card__body {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .portal-report-upsell {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-report-upsell__cta {
    width: 100%;
    text-align: center;
  }

  .portal-report-toolbar {
    top: 0;
    border-radius: 0;
    margin-left: -16px;
    margin-right: -16px;
    border-left: none;
    border-right: none;
  }
}

@media print {
  .portal-nav,
  .portal-report-toolbar,
  .portal-report-actions,
  .portal-help-strip {
    display: none !important;
  }

  .portal-card {
    box-shadow: none;
    border: none;
    padding: 0;
  }

  .portal-report-print-head {
    display: block !important;
    margin-bottom: 14px;
  }

  .portal-report-hero,
  .portal-report-aftercare {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* ── Mobile ── */

@media (max-width: 768px) {
  .portal-nav-toggle { display: inline-flex; }

  .portal-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }

  .portal-nav.is-open { display: flex; }

  .portal-nav--full {
    gap: 2px;
  }

  .portal-nav__group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .portal-nav--full .portal-nav__link {
    padding: 12px 14px;
    font-size: 13px;
  }

  .portal-nav__link {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    border: 1px solid transparent;
  }

  .portal-nav__sep { display: none; }

  .portal-table-wrap { display: none; }
  .portal-list { display: grid; }
  .portal-list--visits { display: grid; }
  .portal-list--estimates { display: grid; }
  .portal-list--invoices { display: grid; }
  .portal-list--programs { display: grid; }
  .portal-list--referrals { display: grid; }
  .portal-list--account-programs { display: grid; }

  .portal-account-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .portal-account-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-form--account__submit {
    width: 100%;
  }

  .portal-property-status {
    grid-template-columns: 1fr;
  }

  .portal-property-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-property-form__actions {
    flex-direction: column;
    margin: 10px -22px -22px;
  }

  .portal-property-form__actions .portal-btn {
    width: 100%;
    min-width: 0;
  }

  .portal-support-contact {
    grid-template-columns: 1fr;
  }

  .portal-support-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .portal-support-form__actions .portal-btn {
    width: 100%;
    min-width: 0;
  }

  .portal-tips-links {
    grid-template-columns: 1fr;
  }

  .portal-tip-list {
    grid-template-columns: 1fr;
  }

  .portal-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-tabs {
    gap: 6px;
  }

  .portal-tab {
    padding: 8px 12px;
    font-size: 12px;
  }

  .portal-visits-summary {
    grid-template-columns: 1fr;
  }

  .portal-visits-next {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-visits-next .portal-btn {
    width: 100%;
  }

  .portal-estimates-next {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-estimates-next .portal-btn {
    width: 100%;
  }

  .portal-invoices-next {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-invoices-next .portal-btn {
    width: 100%;
  }

  .portal-programs-next {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-programs-next .portal-btn {
    width: 100%;
  }

  .portal-brand__actions .portal-btn--ghost { display: none; }

  .portal-hero { padding: 22px 20px; }

  .portal-hero__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-hero__mascot {
    align-self: flex-end;
    margin-top: -8px;
  }

  .portal-mascot--hero {
    width: 72px;
  }

  .portal-auth-wrap {
    flex-direction: column;
    align-items: center;
  }

  .portal-auth-mascot {
    order: -1;
    padding-bottom: 0;
  }

  .portal-page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-page-head .portal-mascot--banner {
    align-self: flex-end;
  }

  .portal-action { flex-direction: column; align-items: stretch; }
  .portal-action .portal-btn { width: 100%; }

  .portal-share-row { flex-direction: column; align-items: stretch; }
  .portal-btn { min-height: 44px; }

  .portal-referral-rewards {
    grid-template-columns: 1fr;
  }

  .portal-referral-share-card {
    grid-template-columns: 1fr;
  }

  .portal-referral-share-card__actions {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
    width: 100%;
  }

  .portal-referral-share-card__actions .portal-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  .portal-referral-steps {
    grid-template-columns: 1fr;
  }

  .portal-dl { grid-template-columns: 1fr; gap: 2px; }
  .portal-dl dt { margin-top: 10px; }

  .portal-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-grid-card {
    min-height: 0;
  }

  .portal-feed__item {
    flex-wrap: wrap;
  }

  .portal-tiles {
    grid-template-columns: 1fr;
  }

  .portal-grid-card--wide .portal-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-hero__cta-row .portal-btn--hero {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .portal-wrap, .portal-main { padding-left: 16px; padding-right: 16px; }
  .portal-card { padding: 18px; }
  .portal-stats { grid-template-columns: 1fr 1fr; }
}

/* ── Visit attention badges & recommendation banner ── */

.portal-visit-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portal-visit-flags--list {
  margin-top: 6px;
}

.portal-visit-flag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.portal-visit-flag--report {
  background: var(--info-soft);
  color: #1d4ed8;
}

.portal-visit-flag--rec {
  background: var(--warning-soft);
  color: var(--warning);
}

.portal-visit-rec-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 18px 0 0;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid #fde68a;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.portal-visit-rec-banner__icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.portal-visit-rec-banner__title {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text);
}

.portal-visit-rec-banner__text {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #334155;
}

.portal-visit-rec-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* ── Service report lawn snapshot ── */

.portal-report-lawn {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.portal-report-lawn__title {
  margin-bottom: 6px;
}

.portal-report-lawn__block + .portal-report-lawn__block {
  margin-top: 20px;
}

.portal-report-lawn__subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
}

.portal-vital-summary {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #f8fafc;
}

.portal-vital-summary--good {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

.portal-vital-summary--watch {
  border-color: #fde68a;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.portal-vital-summary--concern {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
}

.portal-vital-summary__headline {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.portal-vital-summary__detail {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #475569;
}

.portal-vital-summary__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.portal-vital-stat {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.portal-vital-stat--good {
  background: #dcfce7;
  color: #166534;
}

.portal-vital-stat--watch {
  background: #fef3c7;
  color: #92400e;
}

.portal-vital-stat--concern {
  background: #fee2e2;
  color: #991b1b;
}

.portal-vital-group + .portal-vital-group {
  margin-top: 16px;
}

.portal-vital-group__title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.portal-vital-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.portal-vital-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
}

.portal-vital-card--good {
  border-color: #bbf7d0;
  background: #fafffe;
}

.portal-vital-card--watch {
  border-color: #fde68a;
  background: #fffdf5;
}

.portal-vital-card--concern {
  border-color: #fecaca;
  background: #fffafa;
}

.portal-vital-card--neutral {
  background: #f8fafc;
}

.portal-vital-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.portal-vital-card__label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  color: #64748b;
}

.portal-vital-card__value {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.portal-vital-card__trend {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 999px;
}

.portal-vital-card__trend--up {
  color: #166534;
  background: #dcfce7;
}

.portal-vital-card__trend--down {
  color: #92400e;
  background: #fef3c7;
}

.portal-vital-meter {
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.portal-vital-meter__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.portal-vital-meter__fill--good {
  background: var(--green-700);
}

.portal-vital-meter__fill--watch {
  background: #d97706;
}

.portal-vital-meter__fill--concern {
  background: #dc2626;
}

.portal-vital-meter__fill--neutral {
  background: #94a3b8;
}

.portal-visit-vitals-preview {
  margin-top: 8px;
}

.portal-visit-vitals-preview .portal-vital-group + .portal-vital-group {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .portal-vital-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .portal-vital-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.portal-report-section--recommendations {
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 20px 18px 18px;
  background: #fffbeb;
}

.portal-report-condition-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.portal-report-condition {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border);
}

.portal-report-condition--has-photo {
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: start;
}

.portal-report-condition__severity {
  margin-bottom: 8px;
}

.portal-report-condition__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.portal-report-condition__photo {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.portal-report-condition__photo img {
  display: block;
  width: 100%;
  height: 88px;
  object-fit: cover;
}

@media (max-width: 520px) {
  .portal-report-condition--has-photo {
    grid-template-columns: 1fr;
  }

  .portal-report-condition__photo img {
    height: 140px;
  }

  .portal-visit-rec-banner {
    flex-direction: column;
  }
}

.portal-staff-preview-bar {
  background: #0f172a;
  color: #f8fafc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-staff-preview-bar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 0;
  flex-wrap: wrap;
}

.portal-staff-preview-bar__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
}

.portal-staff-preview-bar__meta {
  flex: 1 1 220px;
  font-size: 13px;
  color: #e2e8f0;
}

.portal-staff-preview-bar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.portal-staff-preview-bar .portal-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border-color: rgba(248, 250, 252, 0.35);
}

.portal-staff-preview-bar .portal-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  filter: none;
}

.portal-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.portal-alert--info {
  background: var(--info-soft);
  color: #1e40af;
  border: 1px solid rgba(29, 78, 216, 0.15);
}
