/* =================================================================
   CUSTOMER PORTAL — Styles
   ================================================================= */

/* Reset body for portal */
body.hps-root:has(.portal-login) {
  background: var(--hps-bg-alt);
  min-height: 100dvh;
}

/* ============================================
   LOGIN SCREEN
   ============================================ */
.portal-login {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--hps-space-6);
  background: var(--hps-gradient-hero);
}

.portal-login__card {
  width: 100%;
  max-width: 440px;
  background: var(--hps-surface);
  border-radius: var(--hps-radius-xl);
  box-shadow: var(--hps-shadow-xl);
  padding: var(--hps-space-10);
}

/* iPhone — align card to top so sign-in button is reachable */
@media (max-width: 768px) {
  .portal-login {
    align-items: flex-start;
    padding: var(--hps-space-4);
    padding-top: var(--hps-space-6);
  }
  .portal-login__card {
    padding: var(--hps-space-6);
  }
}

.portal-login__logo {
  display: flex;
  align-items: center;
  gap: var(--hps-space-3);
  text-decoration: none;
  color: var(--hps-primary);
  margin-bottom: var(--hps-space-8);
}

.portal-login__logo svg,
.portal-login__logo-img {
  width: 64px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

.portal-login__logo span {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-lg);
  font-weight: var(--hps-weight-extrabold);
}

.portal-login__title {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-2xl);
  font-weight: var(--hps-weight-extrabold);
  color: var(--hps-text);
  margin-bottom: var(--hps-space-2);
}

.portal-login__subtitle {
  font-size: var(--hps-text-sm);
  color: var(--hps-text-muted);
  margin-bottom: var(--hps-space-4);
}

.portal-login__veteran-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(10, 35, 66, 0.06);
  border: 1px solid rgba(10, 35, 66, 0.15);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--hps-primary);
  margin-bottom: var(--hps-space-6);
}




.portal-login__form {
  display: flex;
  flex-direction: column;
  gap: var(--hps-space-4);
}

.portal-login__field {
  display: flex;
  flex-direction: column;
  gap: var(--hps-space-2);
}

.portal-login__field label {
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-medium);
  color: var(--hps-text);
}

.portal-login__field input {
  padding: 10px 14px;
  border: 1px solid var(--hps-border);
  border-radius: var(--hps-radius-md);
  font-family: var(--hps-font-body);
  font-size: var(--hps-text-sm);
  color: var(--hps-text);
  background: var(--hps-bg-alt);
  transition: border-color var(--hps-transition-fast),
              box-shadow var(--hps-transition-fast);
}

.portal-login__field input:focus {
  outline: none;
  border-color: var(--hps-primary);
  box-shadow: 0 0 0 3px rgba(10, 35, 66, 0.1);
}

.portal-login__field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hps-space-3);
}

.portal-login__checkbox {
  display: flex;
  align-items: center;
  gap: var(--hps-space-2);
  font-size: var(--hps-text-sm);
  color: var(--hps-text-muted);
  cursor: pointer;
}

.portal-login__checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--hps-primary);
}

.portal-login__link {
  font-size: var(--hps-text-sm);
  color: var(--hps-primary);
  text-decoration: none;
  font-weight: var(--hps-weight-medium);
}

.portal-login__link:hover {
  text-decoration: underline;
}

.portal-login__submit {
  padding: 12px 24px;
  background: var(--hps-gradient-cta);
  color: var(--hps-primary);
  border: none;
  border-radius: var(--hps-radius-md);
  margin-top: var(--hps-space-2);
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-bold);
  cursor: pointer;
  transition: opacity var(--hps-transition-fast);
  margin-top: var(--hps-space-2);
}

.portal-login__submit:hover {
  opacity: 0.9;
}

.portal-login__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.portal-login__error {
  padding: 10px 14px;
  background: #fdecea;
  color: #a1233a;
  border: 1px solid #f5c6cb;
  border-radius: var(--hps-radius-md);
  font-size: 14px;
  line-height: 1.4;
  margin-top: var(--hps-space-2);
}

.portal-login__footer {
  text-align: center;
  font-size: var(--hps-text-sm);
  color: var(--hps-text-muted);
  margin-top: var(--hps-space-6);
}


/* ============================================
   PORTAL APP LAYOUT
   ============================================ */
.portal-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--hps-bg-alt);
}

/* ============================================
   TOP BAR
   ============================================ */
.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--hps-space-6);
  height: 64px;
  background: var(--hps-gradient-hero);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.portal-topbar__left {
  display: flex;
  align-items: center;
}

.portal-topbar__logo {
  display: flex;
  align-items: center;
  gap: var(--hps-space-2);
  text-decoration: none;
  color: #fff;
}

.portal-topbar__logo svg,
.portal-topbar__logo-img {
  width: 40px;
  height: 30px;
  border-radius: 5px;
  object-fit: contain;
  flex-shrink: 0;
}

.portal-topbar__logo span {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-base);
  font-weight: var(--hps-weight-bold);
}

.portal-topbar__right {
  display: flex;
  align-items: center;
  gap: var(--hps-space-4);
}

.portal-topbar__user {
  display: flex;
  align-items: center;
  gap: var(--hps-space-3);
}

.portal-topbar__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-xs);
  font-weight: var(--hps-weight-bold);
  color: #fff;
}

.portal-topbar__user-info {
  display: flex;
  flex-direction: column;
}

.portal-topbar__name {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-semibold);
}

.portal-topbar__plan {
  font-size: var(--hps-text-xs);
  opacity: 0.8;
}

.portal-topbar__logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--hps-radius-md);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: background var(--hps-transition-fast);
}

.portal-topbar__logout:hover {
  background: rgba(255, 255, 255, 0.2);
}

.portal-topbar__logout svg {
  width: 18px;
  height: 18px;
}


/* ============================================
   PORTAL BODY (sidebar + content)
   ============================================ */
.portal-body {
  display: flex;
  flex: 1;
}

/* ============================================
   SIDEBAR
   ============================================ */
.portal-sidebar {
  width: 240px;
  background: var(--hps-surface);
  border-right: 1px solid var(--hps-border);
  padding: var(--hps-space-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.portal-nav__item {
  display: flex;
  align-items: center;
  gap: var(--hps-space-3);
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-radius: var(--hps-radius-md);
  font-family: var(--hps-font-body);
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-medium);
  color: var(--hps-text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--hps-transition-fast),
              color var(--hps-transition-fast);
  width: 100%;
  text-align: left;
}

.portal-nav__item:hover {
  background: var(--hps-bg-alt);
  color: var(--hps-text);
}

.portal-nav__item.is-active {
  background: rgba(10, 35, 66, 0.08);
  color: var(--hps-primary);
  font-weight: var(--hps-weight-semibold);
}

.portal-nav__item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.portal-nav__divider {
  height: 1px;
  background: var(--hps-border);
  margin: var(--hps-space-3) 0;
}

/* Section headers group the sidebar into scannable areas
   (Field Operations, Customers & Forms, Business, Admin). */
.portal-nav__section {
  padding: var(--hps-space-4) 14px var(--hps-space-1);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--hps-text-faint, var(--hps-text-muted));
}
.portal-nav__section:first-child {
  padding-top: var(--hps-space-1);
}

.portal-nav__link {
  text-decoration: none;
  color: var(--hps-text-muted);
}


/* ============================================
   MAIN CONTENT
   ============================================ */
.portal-content {
  flex: 1;
  padding: var(--hps-space-8);
  overflow-y: auto;
}

.portal-view {
  display: none;
  max-width: 1100px;
  margin: 0 auto;
}

.portal-view.is-active {
  display: block;
}

.portal-view__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--hps-space-8);
}

.portal-view__title {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-2xl);
  font-weight: var(--hps-weight-extrabold);
  color: var(--hps-text);
  margin-bottom: var(--hps-space-1);
}

.portal-view__subtitle {
  font-size: var(--hps-text-sm);
  color: var(--hps-text-muted);
}

.portal-view__date {
  display: flex;
  align-items: center;
  gap: var(--hps-space-2);
  font-size: var(--hps-text-sm);
  color: var(--hps-text-muted);
}

.portal-view__date svg {
  width: 16px;
  height: 16px;
}


/* ============================================
   STATUS CARDS
   ============================================ */
.portal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--hps-space-4);
  margin-bottom: var(--hps-space-6);
}

.portal-card--status {
  display: flex;
  align-items: center;
  gap: var(--hps-space-3);
  padding: var(--hps-space-4);
  background: var(--hps-surface);
  border: 1px solid var(--hps-border);
  border-radius: var(--hps-radius-lg);
  box-shadow: var(--hps-shadow-sm);
}

.portal-card--healthy {
  border-color: var(--hps-success);
  border-width: 2px;
}

.portal-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--hps-radius-md);
  background: rgba(67, 122, 34, 0.1);
  color: var(--hps-success);
  flex-shrink: 0;
}

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

.portal-card__icon--calendar { background: rgba(10, 35, 66, 0.1); color: var(--hps-primary); }
.portal-card__icon--clock { background: rgba(150, 66, 25, 0.1); color: var(--hps-warning); }
.portal-card__icon--star { background: rgba(255, 180, 0, 0.1); color: #D19900; }
.portal-card__icon--money { background: rgba(67, 122, 34, 0.1); color: var(--hps-success); }
.portal-card__icon--card { background: rgba(10, 35, 66, 0.1); color: var(--hps-primary); }
.portal-card__icon--lead { background: rgba(124, 58, 173, 0.12); color: #7C3AAD; }
.portal-card__icon--order { background: rgba(0, 148, 170, 0.12); color: #007C90; }

.portal-card__body {
  display: flex;
  flex-direction: column;
}

.portal-card__label {
  font-size: var(--hps-text-xs);
  color: var(--hps-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.portal-card__value {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-base);
  font-weight: var(--hps-weight-bold);
  color: var(--hps-text);
}

.portal-card__sub {
  font-size: var(--hps-text-xs);
  color: var(--hps-text-muted);
}


/* ============================================
   SPLIT LAYOUT (two columns)
   ============================================ */
.portal-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--hps-space-6);
  margin-bottom: var(--hps-space-6);
}


/* ============================================
   PANELS
   ============================================ */
.portal-panel {
  background: var(--hps-surface);
  border: 1px solid var(--hps-border);
  border-radius: var(--hps-radius-lg);
  box-shadow: var(--hps-shadow-sm);
  padding: var(--hps-space-6);
  margin-bottom: var(--hps-space-6);
}

.portal-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--hps-space-4);
}

.portal-panel__title {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-lg);
  font-weight: var(--hps-weight-bold);
  color: var(--hps-text);
}

.portal-panel__date {
  font-size: var(--hps-text-xs);
  color: var(--hps-text-muted);
}


/* ============================================
   CHEMISTRY READINGS
   ============================================ */
.portal-chemistry {
  display: flex;
  flex-direction: column;
  gap: var(--hps-space-4);
}

.portal-chem__item {
  display: flex;
  align-items: center;
  gap: var(--hps-space-4);
}

.portal-chem__bar {
  position: relative;
  width: 140px;
  height: 8px;
  background: var(--hps-border);
  border-radius: 4px;
  flex-shrink: 0;
  overflow: hidden;
}

.portal-chem__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--hps-success);
  border-radius: 4px;
}

.portal-chem__ideal {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(10, 35, 66, 0.15);
  border-left: 1px dashed var(--hps-primary);
  border-right: 1px dashed var(--hps-primary);
}

.portal-chem__info {
  display: flex;
  flex-direction: column;
}

.portal-chem__name {
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-medium);
  color: var(--hps-text);
}

.portal-chem__value {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-lg);
  font-weight: var(--hps-weight-bold);
  color: var(--hps-success);
}

.portal-chem__range {
  font-size: var(--hps-text-xs);
  color: var(--hps-text-muted);
}

.portal-chem__summary {
  display: flex;
  align-items: center;
  gap: var(--hps-space-2);
  padding: var(--hps-space-3);
  background: rgba(67, 122, 34, 0.06);
  border-radius: var(--hps-radius-md);
  margin-top: var(--hps-space-4);
  font-size: var(--hps-text-sm);
  color: var(--hps-text);
}

.portal-chem__summary svg {
  width: 18px;
  height: 18px;
  color: var(--hps-success);
  flex-shrink: 0;
}


/* ============================================
   QUICK ACTIONS
   ============================================ */
.portal-actions {
  display: flex;
  flex-direction: column;
  gap: var(--hps-space-2);
}

.portal-action {
  display: flex;
  align-items: center;
  gap: var(--hps-space-3);
  padding: var(--hps-space-3);
  border: 1px solid var(--hps-border);
  border-radius: var(--hps-radius-md);
  background: transparent;
  cursor: pointer;
  transition: border-color var(--hps-transition-fast),
              background var(--hps-transition-fast);
  text-align: left;
}

.portal-action:hover {
  border-color: var(--hps-primary);
  background: rgba(10, 35, 66, 0.04);
}

.portal-action__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--hps-radius-md);
  background: rgba(10, 35, 66, 0.08);
  color: var(--hps-primary);
  flex-shrink: 0;
}

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

.portal-action__text {
  display: flex;
  flex-direction: column;
}

.portal-action__title {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-semibold);
  color: var(--hps-text);
}

.portal-action__sub {
  font-size: var(--hps-text-xs);
  color: var(--hps-text-muted);
}


/* ============================================
   TIMELINE
   ============================================ */
.portal-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.portal-timeline__item {
  display: flex;
  gap: var(--hps-space-4);
  padding-bottom: var(--hps-space-5);
  position: relative;
}

.portal-timeline__item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 20px;
  bottom: 0;
  width: 2px;
  background: var(--hps-border);
}

.portal-timeline__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
  border: 3px solid var(--hps-surface);
  box-shadow: 0 0 0 2px var(--hps-border);
}

.portal-timeline__dot--green { background: var(--hps-success); }
.portal-timeline__dot--blue { background: var(--hps-primary); }

.portal-timeline__content {
  flex: 1;
}

.portal-timeline__title {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-semibold);
  color: var(--hps-text);
  display: block;
}

.portal-timeline__date {
  font-size: var(--hps-text-xs);
  color: var(--hps-text-muted);
  display: block;
  margin-bottom: var(--hps-space-1);
}

.portal-timeline__notes {
  font-size: var(--hps-text-sm);
  color: var(--hps-text-muted);
  line-height: 1.6;
  margin: 0;
}


/* ============================================
   POOL SPECS
   ============================================ */
.portal-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--hps-space-3);
}

.portal-spec {
  display: flex;
  flex-direction: column;
  padding: var(--hps-space-3);
  background: var(--hps-bg-alt);
  border-radius: var(--hps-radius-md);
}

.portal-spec__label {
  font-size: var(--hps-text-xs);
  color: var(--hps-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--hps-space-1);
}

.portal-spec__value {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-semibold);
  color: var(--hps-text);
}


/* ============================================
   EQUIPMENT LIST
   ============================================ */
.portal-equipment {
  display: flex;
  flex-direction: column;
  gap: var(--hps-space-3);
}

.portal-equip__item {
  display: flex;
  align-items: center;
  gap: var(--hps-space-3);
  padding: var(--hps-space-3);
  border: 1px solid var(--hps-border);
  border-radius: var(--hps-radius-md);
}

.portal-equip__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--hps-radius-md);
  background: rgba(10, 35, 66, 0.08);
  color: var(--hps-primary);
  flex-shrink: 0;
}

.portal-equip__icon svg {
  width: 18px;
  height: 18px;
}

.portal-equip__info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.portal-equip__name {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-semibold);
  color: var(--hps-text);
}

.portal-equip__detail {
  font-size: var(--hps-text-xs);
  color: var(--hps-text-muted);
}

.portal-equip__status {
  padding: 3px 10px;
  border-radius: 100px;
  font-size: var(--hps-text-xs);
  font-weight: var(--hps-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.portal-equip__status--good { background: rgba(67, 122, 34, 0.1); color: var(--hps-success); }
.portal-equip__status--watch { background: rgba(255, 180, 0, 0.12); color: #B07D00; }
.portal-equip__status--replace { background: rgba(161, 44, 123, 0.1); color: var(--hps-error); }


/* ============================================
   TABLES
   ============================================ */
.portal-table-wrap {
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--hps-text-sm);
}

.portal-table th {
  text-align: left;
  padding: var(--hps-space-3) var(--hps-space-4);
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-xs);
  font-weight: var(--hps-weight-semibold);
  color: var(--hps-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--hps-border);
  white-space: nowrap;
}

.portal-table td {
  padding: var(--hps-space-3) var(--hps-space-4);
  border-bottom: 1px solid var(--hps-border);
  color: var(--hps-text);
}

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

.portal-table tr:hover td {
  background: var(--hps-bg-alt);
}

.portal-table__link {
  color: var(--hps-primary);
  text-decoration: none;
  font-weight: var(--hps-weight-medium);
}

.portal-table__link:hover {
  text-decoration: underline;
}


/* ============================================
   BADGES
   ============================================ */
.portal-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: var(--hps-text-xs);
  font-weight: var(--hps-weight-semibold);
  white-space: nowrap;
}

.portal-badge--green { background: rgba(67, 122, 34, 0.1); color: var(--hps-success); }
.portal-badge--blue { background: rgba(10, 35, 66, 0.1); color: var(--hps-primary); }
.portal-badge--yellow { background: rgba(255, 180, 0, 0.12); color: #B07D00; }
.portal-badge--gray { background: rgba(122, 121, 116, 0.1); color: var(--hps-text-muted); }
  .portal-badge--red { background: rgba(161, 44, 123, 0.1); color: var(--hps-error); }
  .portal-badge--purple { background: rgba(124, 58, 173, 0.12); color: #7C3AAD; }
  .portal-badge--teal { background: rgba(0, 148, 170, 0.12); color: #007C90; }
  .portal-badge--orange { background: rgba(150, 66, 25, 0.12); color: #964219; }

/* ============================================
   ACCOUNT REQUESTS (Leads tab)
   ============================================ */
.pp-acct-requests {
  border: 1px solid var(--hps-accent);
  background: #FFFDF6;
  border-radius: 14px;
  padding: var(--hps-space-4);
  margin-bottom: var(--hps-space-4);
}
.pp-acct-requests__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pp-acct-requests__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--hps-primary);
}
.pp-acct-requests__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--hps-accent);
  color: var(--hps-primary);
  font-size: 12px;
  font-weight: 700;
}
.pp-acct-requests__hint {
  margin: 4px 0 12px;
  font-size: 13px;
  color: var(--hps-text-muted);
}
.pp-acct-requests__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pp-acct-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--hps-border, #e7e3d8);
  border-radius: 10px;
  padding: 12px 14px;
}
.pp-acct-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--hps-text-muted);
}
.pp-acct-card__info strong {
  font-size: 15px;
  color: var(--hps-primary);
}
.pp-acct-card__when {
  font-size: 12px;
}
.pp-acct-card__actions {
  display: flex;
  gap: 8px;
}

/* ============================================
   LEAD FILTER CHIPS
   ============================================ */
.pp-lead-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--hps-space-4);
}
.pp-lead-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--hps-border);
  border-radius: 999px;
  background: var(--hps-surface);
  color: var(--hps-text-muted);
  font-family: var(--hps-font-body);
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-semibold);
  cursor: pointer;
  transition: border-color var(--hps-transition-fast),
              color var(--hps-transition-fast),
              background var(--hps-transition-fast);
}
.pp-lead-filter:hover { border-color: var(--hps-primary); color: var(--hps-text); }
.pp-lead-filter.is-active {
  background: var(--hps-primary);
  border-color: var(--hps-primary);
  color: #fff;
}
.pp-lead-filter[data-count]::after {
  content: attr(data-count);
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}
.pp-lead-filter.is-active[data-count]::after { background: rgba(255, 255, 255, 0.25); }
.pp-lead-filter__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pp-lead-filter__dot--red { background: var(--hps-error); }
.pp-lead-filter__dot--purple { background: #7C3AAD; }
.pp-lead-filter__dot--teal { background: #007C90; }
.pp-lead-filter__dot--blue { background: var(--hps-pool-dark); }
.pp-lead-filter__dot--green { background: var(--hps-success); }
.pp-lead-filter__dot--orange { background: #964219; }
.pp-lead-filter__dot--yellow { background: #E0A400; }
.pp-lead-filter.is-active .pp-lead-filter__dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5); }

/* Dashboard: clickable KPI card */
.portal-card--link {
  text-align: left;
  border: 1px solid var(--hps-border);
  cursor: pointer;
  font: inherit;
  transition: border-color var(--hps-transition-fast), box-shadow var(--hps-transition-fast), transform var(--hps-transition-fast);
}
.portal-card--link:hover {
  border-color: var(--hps-accent);
  box-shadow: var(--hps-shadow-md);
  transform: translateY(-1px);
}

/* Dashboard: Leads by Opportunity breakdown */
.pp-lead-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 640px) { .pp-lead-summary { grid-template-columns: 1fr 1fr; } }
.pp-lead-summary__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--hps-border);
  border-radius: var(--hps-radius-md);
  background: var(--hps-surface);
  cursor: pointer;
  font: inherit;
  color: var(--hps-text);
  transition: border-color var(--hps-transition-fast), background var(--hps-transition-fast);
}
.pp-lead-summary__item:hover { border-color: var(--hps-accent); background: var(--hps-surface-alt); }
.pp-lead-summary__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.pp-lead-summary__label { flex: 1; font-size: var(--hps-text-sm); font-weight: var(--hps-weight-semibold); }
.pp-lead-summary__count {
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--hps-bg);
  color: var(--hps-text);
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-bold);
  text-align: center;
}


/* ============================================
   SCHEDULE
   ============================================ */
.portal-schedule {
  display: flex;
  flex-direction: column;
  gap: var(--hps-space-3);
}

.portal-schedule__item {
  display: flex;
  align-items: center;
  gap: var(--hps-space-4);
  padding: var(--hps-space-4);
  border: 1px solid var(--hps-border);
  border-radius: var(--hps-radius-md);
}

.portal-schedule__item--next {
  border-color: var(--hps-primary);
  border-width: 2px;
  background: rgba(10, 35, 66, 0.03);
}

.portal-schedule__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--hps-radius-md);
  background: var(--hps-gradient-cta);
  color: #fff;
  flex-shrink: 0;
}

.portal-schedule__day {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-xl);
  font-weight: var(--hps-weight-extrabold);
  line-height: 1;
}

.portal-schedule__month {
  font-size: var(--hps-text-xs);
  font-weight: var(--hps-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.portal-schedule__info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.portal-schedule__title {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-semibold);
  color: var(--hps-text);
}

.portal-schedule__detail {
  font-size: var(--hps-text-xs);
  color: var(--hps-text-muted);
}


/* ============================================
   PHOTOS
   ============================================ */
.portal-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--hps-space-4);
}

.portal-photo {
  display: flex;
  flex-direction: column;
  gap: var(--hps-space-2);
}

.portal-photo__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--hps-radius-md);
  border: 1px solid var(--hps-border);
  background-size: cover;
  background-position: center;
  transition: transform var(--hps-transition-base);
}

.portal-photo__img:hover {
  transform: scale(1.02);
}

/* Gradient placeholder backgrounds for photos */
.portal-photo__img--1 { background: linear-gradient(135deg, #4FC3F7, #0288D1); }
.portal-photo__img--2 { background: linear-gradient(135deg, #81D4FA, #039BE5); }
.portal-photo__img--3 { background: linear-gradient(135deg, #B2DFDB, #00897B); }
.portal-photo__img--4 { background: linear-gradient(135deg, #E0F2F1, #80CBC4); }
.portal-photo__img--5 { background: linear-gradient(135deg, #CFD8DC, #78909C); }
.portal-photo__img--6 { background: linear-gradient(135deg, #FFF9C4, #FBC02D); }
.portal-photo__img--7 { background: linear-gradient(135deg, #EF9A9A, #E53935); }
.portal-photo__img--8 { background: linear-gradient(135deg, #A5D6A7, #43A047); }
.portal-photo__img--9 { background: linear-gradient(135deg, #90CAF9, #1E88E5); }
.portal-photo__img--10 { background: linear-gradient(135deg, #FFE082, #FFA000); }

.portal-photo__label {
  font-size: var(--hps-text-xs);
  color: var(--hps-text-muted);
  text-align: center;
}


/* ============================================
   BILLING / PLAN
   ============================================ */
.portal-plan {
  display: flex;
  flex-direction: column;
  gap: var(--hps-space-4);
}

.portal-plan__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--hps-space-4);
  border-bottom: 1px solid var(--hps-border);
}

.portal-plan__name {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-lg);
  font-weight: var(--hps-weight-bold);
  color: var(--hps-text);
  display: block;
}

.portal-plan__price {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-2xl);
  font-weight: var(--hps-weight-extrabold);
  color: var(--hps-primary);
}

.portal-plan__period {
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-medium);
  color: var(--hps-text-muted);
}

.portal-plan__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--hps-space-3);
}

.portal-plan__feature {
  display: flex;
  align-items: center;
  gap: var(--hps-space-2);
  font-size: var(--hps-text-sm);
  color: var(--hps-text);
}

.portal-plan__feature svg {
  width: 18px;
  height: 18px;
  color: var(--hps-success);
  flex-shrink: 0;
}

.portal-plan__upgrade {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: rgba(10, 35, 66, 0.08);
  color: var(--hps-primary);
  border-radius: var(--hps-radius-md);
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-semibold);
  text-decoration: none;
  align-self: flex-start;
  transition: background var(--hps-transition-fast);
}

.portal-plan__upgrade:hover {
  background: rgba(10, 35, 66, 0.15);
}


/* ============================================
   BUTTONS
   ============================================ */
.portal-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--hps-space-2);
  padding: 10px 20px;
  border-radius: var(--hps-radius-md);
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-semibold);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity var(--hps-transition-fast),
              background var(--hps-transition-fast);
  white-space: nowrap;
}

.portal-btn svg {
  width: 16px;
  height: 16px;
}

.portal-btn--primary {
  background: var(--hps-gradient-cta);
  color: var(--hps-primary);
  font-weight: var(--hps-weight-bold);
}

.portal-btn--primary:hover {
  opacity: 0.9;
}

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

.portal-btn--ghost:hover {
  background: var(--hps-bg-alt);
}


/* ============================================
   SERVICE REQUEST FORM
   ============================================ */
.portal-request-form {
  display: flex;
  flex-direction: column;
  gap: var(--hps-space-4);
}

.portal-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--hps-space-4);
}

.portal-form__field {
  display: flex;
  flex-direction: column;
  gap: var(--hps-space-2);
}

.portal-form__field label {
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-medium);
  color: var(--hps-text);
}

.portal-form__field input,
.portal-form__field select,
.portal-form__field textarea {
  padding: 10px 14px;
  border: 1px solid var(--hps-border);
  border-radius: var(--hps-radius-md);
  font-family: var(--hps-font-body);
  font-size: var(--hps-text-sm);
  color: var(--hps-text);
  background: var(--hps-bg-alt);
  transition: border-color var(--hps-transition-fast),
              box-shadow var(--hps-transition-fast);
}

.portal-form__field input:focus,
.portal-form__field select:focus,
.portal-form__field textarea:focus {
  outline: none;
  border-color: var(--hps-primary);
  box-shadow: 0 0 0 3px rgba(10, 35, 66, 0.1);
}

.portal-form__field textarea {
  resize: vertical;
  font-family: var(--hps-font-body);
}

.portal-upload {
  position: relative;
}

.portal-upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.portal-upload__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--hps-space-2);
  padding: var(--hps-space-8);
  border: 2px dashed var(--hps-border);
  border-radius: var(--hps-radius-md);
  cursor: pointer;
  transition: border-color var(--hps-transition-fast),
              background var(--hps-transition-fast);
}

.portal-upload__label:hover {
  border-color: var(--hps-primary);
  background: rgba(10, 35, 66, 0.03);
}

.portal-upload__label svg {
  width: 28px;
  height: 28px;
  color: var(--hps-text-muted);
}

.portal-upload__label span {
  font-size: var(--hps-text-sm);
  color: var(--hps-text-muted);
}

.portal-form__actions {
  display: flex;
  gap: var(--hps-space-3);
}

.portal-form__success {
  display: flex;
  align-items: center;
  gap: var(--hps-space-3);
  padding: var(--hps-space-6);
  background: rgba(67, 122, 34, 0.06);
  border: 1px solid rgba(67, 122, 34, 0.2);
  border-radius: var(--hps-radius-md);
  color: var(--hps-success);
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-medium);
}

.portal-form__success svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}


/* ============================================
   REQUEST HISTORY
   ============================================ */
.portal-requests {
  display: flex;
  flex-direction: column;
  gap: var(--hps-space-4);
}

.portal-request {
  padding: var(--hps-space-4);
  border: 1px solid var(--hps-border);
  border-radius: var(--hps-radius-md);
}

.portal-request__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--hps-space-2);
}

.portal-request__id {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-xs);
  font-weight: var(--hps-weight-semibold);
  color: var(--hps-primary);
  margin-right: var(--hps-space-2);
}

.portal-request__subject {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-sm);
  font-weight: var(--hps-weight-semibold);
  color: var(--hps-text);
}

.portal-request__meta {
  display: flex;
  gap: var(--hps-space-2);
  font-size: var(--hps-text-xs);
  color: var(--hps-text-muted);
  margin-bottom: var(--hps-space-2);
}

.portal-request__desc {
  font-size: var(--hps-text-sm);
  color: var(--hps-text-muted);
  line-height: 1.6;
  margin: 0 0 var(--hps-space-3) 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.portal-request__update {
  display: flex;
  align-items: flex-start;
  gap: var(--hps-space-2);
  padding: var(--hps-space-3);
  background: var(--hps-bg-alt);
  border-radius: var(--hps-radius-md);
  font-size: var(--hps-text-sm);
  color: var(--hps-text);
}

.portal-request__update svg {
  width: 16px;
  height: 16px;
  color: var(--hps-primary);
  flex-shrink: 0;
  margin-top: 2px;
}


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .portal-cards {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

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

@media (max-width: 768px) {
  .portal-sidebar {
    position: fixed;
    top: 64px;
    left: -260px;
    z-index: 50;
    transition: left var(--hps-transition-base);
  }

  .portal-sidebar.is-open {
    left: 0;
  }

  .portal-content {
    padding: var(--hps-space-4);
  }

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

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

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

  .portal-topbar__user-info {
    display: none;
  }

  .portal-view__header {
    flex-direction: column;
    gap: var(--hps-space-2);
  }

  .portal-login__card {
    padding: var(--hps-space-6);
  }
}

/* =================================================
     SIGNUP MODAL — Professional Redesign
     ================================================= */
.portal-signup__card {
  max-width: 560px;
  max-height: 90vh;
}

/* Branded Navy Header */
.portal-signup__header {
  background: linear-gradient(135deg, #06172B 0%, #0A2342 48%, #006D8F 100%);
  padding: 28px 24px 24px;
  border-radius: var(--hps-radius-lg) var(--hps-radius-lg) 0 0;
  text-align: center;
  position: relative;
}

.portal-signup__logo {
  width: 72px;
  height: 56px;
  margin: 0 auto 12px;
  color: var(--hps-accent);
}

.portal-signup__logo svg,
.portal-signup__logo-img {
  width: 72px;
  height: 56px;
  border-radius: 10px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.portal-signup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  color: rgba(247, 246, 242, 0.7);
  font-size: 28px;
}

.portal-signup__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.portal-signup__title {
  font-family: 'Manrope', sans-serif;
  font-size: var(--hps-text-xl);
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.portal-signup__subtitle {
  font-size: var(--hps-text-sm);
  color: rgba(247, 246, 242, 0.8);
  line-height: 1.5;
  margin: 0 0 12px;
}

.portal-signup__trust {
  font-size: 11px;
  color: var(--hps-accent);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin: 0;
}

/* Form Body */
.portal-signup__body {
  padding: 0;
}

.portal-signup__form {
  padding: 24px;
}

/* Section Labels */
.portal-signup__section-label {
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hps-text-muted);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--hps-border);
}

.portal-signup__section-label:first-child {
  margin-top: 0;
}

/* Password Hints */
.portal-signup__pw-hints {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 8px 0 4px;
}

.portal-signup__pw-hint {
  font-size: 12px;
  color: var(--hps-text-muted);
  transition: color 0.2s;
}

.portal-signup__pw-hint--good {
  color: var(--hps-success);
  font-weight: 600;
}

.portal-signup__pw-hint--bad {
  color: var(--hps-error);
  font-weight: 600;
}

/* Consent Checkbox */
.portal-signup__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 0;
  cursor: pointer;
  font-size: var(--hps-text-sm);
  color: var(--hps-text-muted);
  line-height: 1.5;
}

.portal-signup__consent input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--hps-pool-dark);
  flex-shrink: 0;
  cursor: pointer;
}

.portal-signup__consent span {
  user-select: none;
}

/* Helper Text */
.portal-signup__helper {
  font-size: 12px;
  color: var(--hps-text-muted);
  text-align: center;
  margin: 12px 0 0;
  line-height: 1.4;
}

/* Success State */
.portal-signup__success {
  padding: 40px 24px;
  text-align: center;
}

.portal-signup__success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: rgba(67, 122, 34, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-signup__success-icon svg {
  width: 28px;
  height: 28px;
  color: var(--hps-success);
}

.portal-signup__success-title {
  font-family: 'Manrope', sans-serif;
  font-size: var(--hps-text-xl);
  font-weight: 700;
  color: var(--hps-primary);
  margin: 0 0 12px;
}

.portal-signup__success-text {
  font-size: var(--hps-text-sm);
  color: var(--hps-text-muted);
  line-height: 1.6;
  margin: 0 0 16px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

.portal-signup__success-phone {
  font-size: var(--hps-text-sm);
  color: var(--hps-text-muted);
  margin: 0 0 8px;
}

.portal-signup__success-phone a {
  color: var(--hps-pool-dark);
  font-weight: 600;
  text-decoration: none;
}

/* Mobile */
@media (max-width: 520px) {
  .portal-signup__header {
    padding: 20px 16px 16px;
  }

  .portal-signup__form {
    padding: 16px;
  }

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

  .portal-signup__pw-hints {
    flex-direction: column;
    gap: 4px;
  }

  .portal-signup__success {
    padding: 28px 16px;
  }
}

/* =================================================
     MODAL OVERLAY (shared by signup & forgot password)
     ================================================= */
.pp-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pp-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 23, 43, 0.6);
  backdrop-filter: blur(4px);
}

.pp-modal__card {
  position: relative;
  background: var(--hps-surface);
  border-radius: var(--hps-radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
}

.pp-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--hps-space-5) var(--hps-space-6);
  border-bottom: 1px solid var(--hps-border);
  position: sticky;
  top: 0;
  background: var(--hps-surface);
  z-index: 2;
}

.pp-modal__header h2 {
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-lg);
  font-weight: 700;
  color: var(--hps-text);
}

.pp-modal__close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--hps-text-muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--hps-transition);
}

.pp-modal__close:hover {
  background: var(--hps-surface-alt);
  color: var(--hps-text);
}

.pp-modal__form {
  padding: var(--hps-space-6);
}

.pp-modal__actions {
  display: flex;
  gap: var(--hps-space-3);
  justify-content: flex-end;
  margin-top: var(--hps-space-5);
  padding-top: var(--hps-space-4);
  border-top: 1px solid var(--hps-border);
}

@media (max-width: 520px) {
  .pp-modal__card {
    width: 95%;
    max-height: 95vh;
  }
}

/* iPhone touch targets — 44px minimum */
@media (max-width: 768px) {
  .portal-btn,
  .portal-login__submit,
  .portal-nav__link,
  .portal-tab,
  .pp-btn,
  .pp-nav__link,
  .pp-tab,
  .pp-login__submit,
  .pp-form__input,
  .pp-form__select,
  .pp-form__textarea,
  .portal-form__input,
  .portal-form__select,
  .portal-form__textarea {
    min-height: 44px;
  }
}

/* iPhone login screen — tighten spacing so sign-in button fits in viewport */
@media (max-width: 768px) {
  .portal-login__logo {
    margin-bottom: var(--hps-space-4);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .portal-login__veteran-badge {
    margin-bottom: var(--hps-space-4);
    padding: 4px 12px;
  }
  .portal-login__veteran-img {
    width: 26px;
    height: 26px;
  }
  .portal-login__form {
    gap: var(--hps-space-3);
  }
  .portal-login__field input {
    padding: 8px 12px;
  }
  .portal-login__link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* iPhone SE — even more compact */
@media (max-width: 400px) {
  .portal-login__logo svg,
  .portal-login__logo-img {
    width: 48px;
    height: 36px;
  }
  .portal-login__title {
    font-size: var(--hps-text-xl);
  }
  .portal-login__subtitle {
    margin-bottom: var(--hps-space-2);
  }
  .portal-login__veteran-badge {
    margin-bottom: var(--hps-space-3);
  }
  .portal-login__card {
    padding: var(--hps-space-5);
  }
  .portal-login__form {
    gap: var(--hps-space-2);
  }
  .portal-login__field input {
    padding: 6px 10px;
  }
}

/* ================================================================
   STORE — "sell this item" block + order inbox cards
   ================================================================ */
.pp-sell-block {
  margin-top: var(--hps-space-4);
  padding-top: var(--hps-space-4);
  border-top: 1px solid var(--hps-divider);
}
.pp-sell-toggle {
  display: flex;
  gap: var(--hps-space-3);
  align-items: flex-start;
  cursor: pointer;
  font-size: var(--hps-text-sm);
  line-height: var(--hps-leading-normal);
}
.pp-sell-toggle input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--hps-primary);
}
.pp-sell-toggle__hint {
  color: var(--hps-text-muted);
  font-size: var(--hps-text-xs);
}
#pp-sell-fields {
  margin-top: var(--hps-space-4);
  padding: var(--hps-space-4);
  background: var(--hps-surface-2, rgba(0, 0, 0, 0.03));
  border-radius: var(--hps-radius, 10px);
}
.pp-sell-feature-label {
  display: flex !important;
  gap: var(--hps-space-2);
  align-items: center;
  cursor: pointer;
}

.pp-orders-list {
  display: flex;
  flex-direction: column;
  gap: var(--hps-space-4);
}
.pp-orders-empty {
  padding: var(--hps-space-6);
  text-align: center;
  color: var(--hps-text-muted);
  background: var(--hps-surface, #fff);
  border: 1px dashed var(--hps-divider);
  border-radius: var(--hps-radius, 12px);
}
.pp-order-card {
  background: var(--hps-surface, #fff);
  border: 1px solid var(--hps-divider);
  border-radius: var(--hps-radius, 12px);
  padding: var(--hps-space-5);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.pp-order-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--hps-space-3);
  flex-wrap: wrap;
  margin-bottom: var(--hps-space-3);
}
.pp-order-card__num {
  font-weight: 700;
  font-family: var(--hps-font-heading, inherit);
}
.pp-order-card__date {
  font-size: var(--hps-text-xs);
  color: var(--hps-text-muted);
}
.pp-order-card__cust {
  font-size: var(--hps-text-sm);
  margin-bottom: var(--hps-space-2);
}
.pp-order-card__cust a {
  color: var(--hps-primary);
  text-decoration: none;
}
.pp-order-card__addr {
  font-size: var(--hps-text-sm);
  color: var(--hps-text-muted);
  margin-bottom: var(--hps-space-3);
}
.pp-order-card__items {
  list-style: none;
  margin: 0 0 var(--hps-space-3);
  padding: var(--hps-space-3);
  background: var(--hps-surface-2, rgba(0, 0, 0, 0.03));
  border-radius: 8px;
  font-size: var(--hps-text-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pp-order-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--hps-space-3);
  flex-wrap: wrap;
  margin-bottom: var(--hps-space-2);
}
.pp-order-card__total {
  font-weight: 700;
}
.pp-order-card__notes {
  font-size: var(--hps-text-sm);
  color: var(--hps-text-muted);
  margin-bottom: var(--hps-space-3);
}
.pp-order-card__actions {
  display: flex;
  gap: var(--hps-space-2);
  flex-wrap: wrap;
  padding-top: var(--hps-space-3);
  border-top: 1px solid var(--hps-divider);
}
.portal-btn--sm {
  padding: 6px 12px;
  font-size: var(--hps-text-xs);
}

/* ---- Dashboard referral banner — Give $25, Get $25 ---------------- */
.portal-referral {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--hps-space-4) var(--hps-space-6);
  margin-bottom: var(--hps-space-6);
  padding: var(--hps-space-6);
  border-radius: var(--hps-radius-xl, 16px);
  background: var(--hps-gradient-hero);
  color: var(--hps-text-inverse, #fff);
  box-shadow: var(--hps-shadow-md);
  overflow: hidden;
}
.portal-referral__content { min-width: 260px; flex: 1 1 auto; }
.portal-referral__badge {
  display: inline-block;
  margin-bottom: var(--hps-space-2);
  padding: 2px 10px;
  border-radius: var(--hps-radius-full, 999px);
  background: rgba(214, 178, 94, 0.18);
  border: 1px solid rgba(214, 178, 94, 0.45);
  color: var(--hps-accent);
  font-size: var(--hps-text-xs);
  font-weight: var(--hps-weight-bold, 700);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.portal-referral__title {
  margin: 0 0 4px;
  font-family: var(--hps-font-heading);
  font-size: var(--hps-text-xl);
  font-weight: var(--hps-weight-extrabold, 800);
  line-height: 1.15;
}
.portal-referral__title span { color: var(--hps-accent); }
.portal-referral__text {
  margin: 0;
  max-width: 60ch;
  font-size: var(--hps-text-sm);
  line-height: var(--hps-leading-normal, 1.5);
  color: rgba(255, 255, 255, 0.82);
}
.portal-referral a.portal-referral__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 12px 22px;
  border-radius: var(--hps-radius-full, 999px);
  background: var(--hps-gradient-cta);
  color: var(--hps-primary, #0A2342);
  font-weight: var(--hps-weight-bold, 700);
  font-size: var(--hps-text-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--hps-transition-base, 0.2s ease), box-shadow var(--hps-transition-base, 0.2s ease);
}
.portal-referral a.portal-referral__cta:hover { color: var(--hps-primary, #0A2342); transform: translateY(-2px); box-shadow: var(--hps-shadow-lg); }
