/* =========================================================
   PSF MY ACCOUNT DASHBOARD
   Clean light-theme version.
   Clean cascade; no forced declarations.
   ========================================================= */

.psf-dash-replica {
  --psf-dash-green-dark: #254d18;
  --psf-dash-green: #5a8f36;
  --psf-dash-green-soft: #edf4e9;
  --psf-dash-green-pale: #f6f9f4;
  --psf-dash-text: #20241f;
  --psf-dash-muted: #687066;
  --psf-dash-border: rgba(37, 77, 24, 0.16);
  --psf-dash-border-strong: rgba(37, 77, 24, 0.24);
  --psf-dash-card: #ffffff;
  --psf-dash-shadow: 0 10px 28px rgba(24, 54, 16, 0.08);
  --psf-dash-shadow-hover: 0 14px 32px rgba(24, 54, 16, 0.12);

  width: min(1358px, calc(100vw - 72px));
  margin: 0 auto;
  padding: 20px 0 34px;
  position: relative;

  color: var(--psf-dash-text);
  font-family: var(--psf-body-font);
}

/* The old dashboard used a dark full-width pseudo background.
   The current dashboard intentionally uses the site's light account shell. */
.psf-dash-replica::before {
  display: none;
}

.psf-dash-icon {
  display: inline-block;
  width: 35px;
  height: 35px;
  max-width: 35px;
  max-height: 35px;
  flex: 0 0 auto;
  color: var(--psf-dash-green);
  vertical-align: middle;
  overflow: visible;
}

/* =========================================================
   HERO
   ========================================================= */

.psf-dash-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
}

.psf-dash-hero-row h1 {
  margin: 0;
  color: var(--psf-dash-text);
  font-family: var(--psf-display-font);
  font-size: 41px;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: none;
}

.psf-dash-hero-row p {
  margin: 4px 0 0;
  color: var(--psf-dash-green);
  font-size: 21px;
  line-height: 1.2;
  font-weight: 700;
}

.psf-dash-logout {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--psf-dash-border-strong);
  background: #fff;
  color: var(--psf-dash-green-dark);
  box-shadow: 0 5px 16px rgba(24, 54, 16, 0.06);
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.psf-dash-logout:hover {
  color: var(--psf-dash-green-dark);
  background: var(--psf-dash-green-pale);
  border-color: var(--psf-dash-green);
  box-shadow: 0 8px 20px rgba(24, 54, 16, 0.09);
  transform: translateY(-1px);
}

/* =========================================================
   STAT STRIP
   ========================================================= */

.psf-dash-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
  min-height: 110px;
  background: linear-gradient(135deg, #32651f 0%, #254d18 100%);
  border: 1px solid rgba(37, 77, 24, 0.34);
  border-radius: 8px;
  box-shadow:
    0 12px 28px rgba(37, 77, 24, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.psf-dash-stat-cell {
  display: grid;
  grid-template-columns: 54px auto;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 16px;
  padding: 23px 44px;
  position: relative;
}

.psf-dash-stat-cell + .psf-dash-stat-cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.psf-dash-stat-cell .psf-dash-icon {
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: center;
  width: 39px;
  height: 39px;
  max-width: 39px;
  max-height: 39px;
  color: #9fd766;
}

.psf-dash-stat-cell strong {
  display: block;
  color: #fff;
  font-family: var(--psf-display-font);
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
}

body.woocommerce-account
  .psf-dash-replica
  .psf-dash-stat-cell
  strong
  span,
body.woocommerce-account
  .psf-dash-replica
  .psf-dash-stat-cell
  strong
  bdi,
body.woocommerce-account
  .psf-dash-replica
  .psf-dash-stat-cell
  strong
  .woocommerce-Price-amount,
body.woocommerce-account
  .psf-dash-replica
  .psf-dash-stat-cell
  strong
  .woocommerce-Price-currencySymbol {
  display: inline;
  white-space: nowrap;
  color: #fff;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

.psf-dash-stat-cell > span {
  display: block;
  margin-top: 5px;
  color: #fff;
  font-size: 15px;
  line-height: 1.2;
}

/* =========================================================
   TOP GRID / PANELS
   ========================================================= */

.psf-dash-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(390px, 1.07fr);
  gap: 20px;
  margin-bottom: 22px;
}

.psf-dash-panel {
  border-radius: 8px;
  overflow: hidden;
  background: var(--psf-dash-card);
  border: 1px solid var(--psf-dash-border);
  box-shadow: var(--psf-dash-shadow);
}

.psf-dash-panel--active,
.psf-dash-panel--small {
  background: var(--psf-dash-card);
  color: var(--psf-dash-text);
}

.psf-dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 12px;
}

.psf-dash-panel-head h2 {
  margin: 0;
  color: var(--psf-dash-green-dark);
  font-family: var(--psf-display-font);
  font-size: 23px;
  line-height: 1;
  text-transform: none;
}

.psf-dash-panel-head a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--psf-dash-green-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.psf-dash-panel-head a:hover {
  color: var(--psf-dash-green);
}

/* =========================================================
   ACTIVE LAYAWAY
   ========================================================= */

.psf-dash-active-card {
  display: grid;
  grid-template-columns: 247px minmax(0, 1fr) 170px;
  align-items: center;
  gap: 30px;
  padding: 8px 22px 28px;
}

.psf-dash-active-image {
  width: 247px;
  height: 152px;
  border-radius: 9px;
  overflow: hidden;
  background: #f3f5f2;
  border: 1px solid var(--psf-dash-border);
}

.psf-dash-active-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.psf-dash-active-main h3 {
  margin: 0 0 24px;
  color: var(--psf-dash-text);
  font-family: var(--psf-display-font);
  font-size: 31px;
  line-height: 1;
  text-transform: none;
}

.psf-dash-progress {
  display: flex;
  align-items: center;
  gap: 14px;
}

.psf-dash-progress span {
  display: block;
  height: 13px;
  flex: 1;
  max-width: 245px;
  border-radius: 999px;
  background: #e1e7de;
  overflow: hidden;
}

.psf-dash-progress span i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, #5a8f36, #254d18);
}

.psf-dash-progress strong {
  color: var(--psf-dash-green-dark);
  font-size: 14px;
  white-space: nowrap;
}

.psf-dash-active-meta {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 28px;
  color: var(--psf-dash-muted);
  font-size: 16px;
}

.psf-dash-active-meta div + div {
  border-left: 1px solid rgba(37, 77, 24, 0.14);
  padding-left: 30px;
}

.psf-dash-active-meta strong {
  color: var(--psf-dash-green-dark);
  font-weight: 800;
}

.psf-dash-active-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.psf-dash-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 20px;
  border-radius: 5px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  text-align: center;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.psf-dash-button--green {
  color: #fff;
  background: linear-gradient(180deg, #5a8f36 0%, #254d18 100%);
  border-color: #254d18;
  box-shadow:
    0 6px 16px rgba(37, 77, 24, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.psf-dash-button--green:hover {
  color: #fff;
  box-shadow:
    0 9px 20px rgba(37, 77, 24, 0.23),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.psf-dash-button--white {
  color: var(--psf-dash-text);
  background: #fff;
  border-color: var(--psf-dash-border-strong);
}

.psf-dash-button--white:hover {
  color: var(--psf-dash-green-dark);
  background: var(--psf-dash-green-pale);
  border-color: var(--psf-dash-green);
}

.psf-dash-button--outline {
  color: var(--psf-dash-green-dark);
  background: #fff;
  border-color: var(--psf-dash-green);
  min-width: 143px;
}

.psf-dash-button--outline:hover {
  color: #fff;
  background: linear-gradient(180deg, #5a8f36 0%, #254d18 100%);
  border-color: #254d18;
}

/* =========================================================
   EMPTY STATE
   ========================================================= */

.psf-dash-empty-state {
  display: grid;
  gap: 8px;
  padding: 12px 22px 28px;
  color: var(--psf-dash-muted);
}

.psf-dash-empty-state strong {
  color: var(--psf-dash-text);
  font-size: 18px;
}

.psf-dash-empty-state .psf-dash-button {
  width: max-content;
  margin-top: 8px;
}

/* =========================================================
   QUICK LINKS
   ========================================================= */

.psf-dash-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

body.woocommerce-account
  .psf-dash-replica
  .psf-dash-quick-grid
  a {
  display: grid;
  grid-template-columns: 42px 1fr 22px;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 16px 18px;
  border-radius: 7px;
  border: 1px solid var(--psf-dash-border);
  background: #fff;
  color: var(--psf-dash-text);
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 7px 20px rgba(24, 54, 16, 0.07);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

body.woocommerce-account
  .psf-dash-replica
  .psf-dash-quick-grid
  a
  span {
  color: var(--psf-dash-text);
}

.psf-dash-quick-grid a:hover {
  background: var(--psf-dash-green-pale);
  border-color: var(--psf-dash-green);
  box-shadow: var(--psf-dash-shadow-hover);
  transform: translateY(-2px);
}

.psf-dash-quick-grid .psf-dash-icon {
  width: 36px;
  height: 36px;
  max-width: 36px;
  max-height: 36px;
  color: var(--psf-dash-green);
}

.psf-dash-quick-grid .psf-dash-icon:last-child {
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
  color: var(--psf-dash-green);
  opacity: 1;
}

/* =========================================================
   LOWER CARD GRID
   ========================================================= */

.psf-dash-card-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.9fr 1.08fr;
  gap: 18px;
  margin-bottom: 22px;
}

.psf-dash-panel--small {
  min-height: 218px;
}

.psf-dash-panel--small .psf-dash-panel-head {
  padding: 19px 22px 10px;
  border-bottom: 1px solid rgba(37, 77, 24, 0.14);
  margin: 0 22px;
  padding-left: 0;
  padding-right: 0;
}

.psf-dash-list,
.psf-dash-ready-list {
  padding: 0 22px 12px;
}

.psf-dash-order-row {
  display: grid;
  grid-template-columns: 1fr auto 24px;
  align-items: center;
  gap: 14px;
  min-height: 53px;
  color: var(--psf-dash-text);
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 77, 24, 0.12);
}

.psf-dash-order-row:last-child {
  border-bottom: 0;
}

.psf-dash-order-row:hover {
  color: var(--psf-dash-green-dark);
}

.psf-dash-order-row strong {
  display: block;
  font-size: 15px;
  color: var(--psf-dash-text);
}

.psf-dash-order-row small {
  display: block;
  margin-top: 2px;
  color: var(--psf-dash-muted);
  font-size: 14px;
}

.psf-dash-order-row .psf-dash-icon {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  color: var(--psf-dash-green);
}

.psf-dash-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 7px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.psf-dash-pill--success {
  background: #dcebd2;
  color: #315d1e;
}

.psf-dash-pill--warning {
  background: #f7e9c7;
  color: #684b04;
}

.psf-dash-pill--muted {
  background: #e8e8e8;
  color: #555;
}

/* =========================================================
   READY TO SHIP
   ========================================================= */

.psf-dash-ready-row {
  display: grid;
  grid-template-columns: 100px 1fr 24px;
  gap: 22px;
  align-items: center;
  min-height: 123px;
  color: var(--psf-dash-text);
  text-decoration: none;
}

.psf-dash-ready-row:hover {
  color: var(--psf-dash-green-dark);
}

.psf-dash-ready-img {
  width: 100px;
  height: 100px;
  border-radius: 7px;
  background: #f3f5f2;
  border: 1px solid var(--psf-dash-border);
  overflow: hidden;
}

.psf-dash-ready-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.psf-dash-ready-copy strong {
  display: block;
  color: var(--psf-dash-text);
  font-size: 18px;
  line-height: 1.15;
  margin-bottom: 7px;
}

.psf-dash-ready-copy em {
  display: block;
  color: var(--psf-dash-green-dark);
  font-style: normal;
  font-weight: 800;
  font-size: 14px;
}

.psf-dash-ready-copy small {
  display: block;
  color: var(--psf-dash-muted);
  font-size: 14px;
  margin-top: 3px;
}

.psf-dash-ready-row .psf-dash-icon {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  color: var(--psf-dash-green);
}

/* =========================================================
   PREFERRED FFL
   ========================================================= */

.psf-dash-ffl-card {
  display: grid;
  grid-template-columns: 112px 1fr 25px;
  gap: 22px;
  align-items: center;
  min-height: 150px;
  padding: 18px 22px 24px;
  color: var(--psf-dash-text);
  text-decoration: none;
}

.psf-dash-ffl-card:hover {
  color: var(--psf-dash-green-dark);
}

.psf-dash-ffl-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle, #2a2c2f 0 53%, #111 54% 100%);
  border: 5px solid #fff;
  box-shadow:
    0 0 0 2px #111,
    inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.psf-dash-ffl-badge .psf-dash-icon {
  color: #fff;
  width: 54px;
  height: 54px;
  max-width: 54px;
  max-height: 54px;
}

.psf-dash-ffl-copy strong {
  display: block;
  color: var(--psf-dash-text);
  font-size: 18px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.psf-dash-ffl-copy small {
  display: block;
  color: var(--psf-dash-muted);
  font-size: 14px;
  margin-top: 3px;
}

.psf-dash-ffl-card > .psf-dash-icon {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  color: var(--psf-dash-green);
}

.psf-dash-empty-copy {
  color: var(--psf-dash-muted);
  margin: 18px 0;
  font-size: 14px;
}

/* =========================================================
   THANK YOU CARD
   ========================================================= */

.psf-dash-thankyou {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 118px;
  padding: 18px 48px 18px 36px;
  border-radius: 8px;
  border: 1px solid var(--psf-dash-border);
  background: linear-gradient(135deg, #ffffff 0%, #f2f7ef 100%);
  box-shadow: var(--psf-dash-shadow);
}

.psf-dash-shield {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(180deg, #5a8f36 0%, #254d18 100%);
  border: 0;
  box-shadow: 0 6px 18px rgba(37, 77, 24, 0.18);
}

.psf-dash-shield .psf-dash-icon {
  color: #fff;
  width: 42px;
  height: 42px;
  max-width: 42px;
  max-height: 42px;
}

.psf-dash-thankyou strong {
  display: block;
  color: var(--psf-dash-text);
  font-family: var(--psf-display-font);
  font-size: 24px;
  line-height: 1;
  font-weight: 600;
}

.psf-dash-thankyou small {
  display: block;
  margin-top: 9px;
  color: var(--psf-dash-muted);
  font-size: 16px;
}

/* The thank-you CTA is intentionally a primary action even if
   the template uses the outline modifier. */
.psf-dash-thankyou .psf-dash-button--outline {
  color: #fff;
  background: linear-gradient(180deg, #5a8f36 0%, #254d18 100%);
  border-color: #254d18;
  box-shadow:
    0 6px 16px rgba(37, 77, 24, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.psf-dash-thankyou .psf-dash-button--outline:hover {
  color: #fff;
  box-shadow:
    0 9px 20px rgba(37, 77, 24, 0.23),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.psf-dash-replica a:focus-visible {
  outline: 3px solid rgba(90, 143, 54, 0.35);
  outline-offset: 3px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
  .psf-dash-replica {
    width: min(100%, calc(100vw - 32px));
  }

  .psf-dash-stat-cell {
    padding: 22px 26px;
  }

  .psf-dash-active-card {
    grid-template-columns: 210px 1fr;
  }

  .psf-dash-active-actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .psf-dash-active-actions .psf-dash-button {
    flex: 1;
  }

  .psf-dash-active-image {
    width: 210px;
  }
}

@media (max-width: 980px) {
  .psf-dash-top-grid,
  .psf-dash-card-grid {
    grid-template-columns: 1fr;
  }

  .psf-dash-quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .psf-dash-stat-strip {
    grid-template-columns: 1fr 1fr;
  }

  .psf-dash-stat-cell:nth-child(3)::before {
    display: none;
  }

  .psf-dash-panel--small {
    min-height: 0;
  }
}

@media (max-width: 849px) {
  .psf-dash-stat-cell strong,
  .psf-dash-stat-cell strong .woocommerce-Price-amount,
  .psf-dash-stat-cell strong .woocommerce-Price-currencySymbol {
    font-size: 28px;
  }
}

@media (max-width: 700px) {
  .psf-dash-replica {
    width: min(100%, calc(100vw - 24px));
    padding-top: 14px;
  }

  .psf-dash-hero-row {
    align-items: stretch;
    flex-direction: column;
  }

  .psf-dash-logout {
    width: max-content;
  }

  .psf-dash-stat-strip {
    grid-template-columns: 1fr;
  }

  .psf-dash-stat-cell + .psf-dash-stat-cell::before {
    top: 0;
    left: 22px;
    right: 22px;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .psf-dash-stat-cell:nth-child(3)::before {
    display: block;
  }

  .psf-dash-active-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .psf-dash-active-image {
    width: 100%;
    height: 190px;
  }

  .psf-dash-active-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .psf-dash-active-meta div + div {
    border-left: 0;
    padding-left: 0;
  }

  .psf-dash-quick-grid {
    grid-template-columns: 1fr;
  }

  .psf-dash-ready-row,
  .psf-dash-ffl-card {
    grid-template-columns: 72px 1fr 20px;
    gap: 14px;
  }

  .psf-dash-ready-img,
  .psf-dash-ffl-badge {
    width: 72px;
    height: 72px;
  }

  .psf-dash-ffl-badge .psf-dash-icon {
    width: 34px;
    height: 34px;
    max-width: 34px;
    max-height: 34px;
  }

  .psf-dash-thankyou {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .psf-dash-thankyou .psf-dash-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .psf-dash-hero-row h1 {
    font-size: 36px;
  }

  .psf-dash-hero-row p {
    font-size: 18px;
  }

  .psf-dash-stat-cell {
    padding: 20px;
  }

  .psf-dash-panel-head {
    padding: 18px 18px 10px;
  }

  .psf-dash-active-card,
  .psf-dash-list,
  .psf-dash-ready-list {
    padding-left: 18px;
    padding-right: 18px;
  }

  .psf-dash-active-actions {
    flex-direction: column;
  }

  .psf-dash-order-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 0;
  }

  .psf-dash-order-row > .psf-dash-icon {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .psf-dash-replica *,
  .psf-dash-replica *::before,
  .psf-dash-replica *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}