/* Appily Thirtyseven — Member Grove account
   New layout: centered hero + horizontal desk tabs + single auth console */

.page-account-grove {
  --gr-ink: #04261f;
  --gr-deep: #0a3d32;
  --gr-leaf: #0f8f72;
  --gr-mint: #2ee6a8;
  --gr-sky: #d6f3ea;
  --gr-wash: #eef9f4;
  --gr-paper: #f7fcfa;
  --gr-coral: #ff6b4a;
  --gr-gold: #e8c547;
  --gr-muted: #4d6b62;
  --gr-line: rgba(4, 38, 31, 0.12);
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Outfit', 'Segoe UI', sans-serif;
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

.page-account-grove .page-main {
  padding-top: 0;
  font-family: var(--font-body);
  color: var(--gr-ink);
  background:
    radial-gradient(ellipse 55% 35% at 90% 0%, rgba(46, 230, 168, 0.16), transparent 55%),
    radial-gradient(ellipse 40% 28% at 5% 10%, rgba(232, 197, 71, 0.12), transparent 50%),
    linear-gradient(180deg, var(--gr-sky) 0%, var(--gr-wash) 30%, var(--gr-paper) 62%, #fff 100%);
}

.page-account-grove .auth-page {
  padding: 0 0 3.5rem;
  background: transparent;
}

.page-account-grove .auth-page > .container {
  max-width: 880px;
}

.page-account-grove .dash-panel {
  display: none;
}

.page-account-grove .dash-panel.is-active {
  display: block;
  animation: a37GrovePanelIn 0.4s var(--ease-out);
}

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

.a37-grove { padding: 0; }

/* —— Hero —— */
.a37-grove-hero {
  position: relative;
  padding: 2.4rem 0 1.8rem;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

.a37-grove-hero-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      -14deg,
      transparent,
      transparent 18px,
      rgba(15, 143, 114, 0.04) 18px,
      rgba(15, 143, 114, 0.04) 19px
    );
  mask-image: linear-gradient(180deg, #000 35%, transparent 100%);
  animation: a37GroveMesh 32s linear infinite;
}

@keyframes a37GroveMesh {
  to { transform: translateX(26px); }
}

.a37-grove-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.a37-grove-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gr-leaf);
}

.a37-grove-hero h1 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--gr-ink);
}

.a37-grove-hero h1 span {
  background: linear-gradient(120deg, var(--gr-leaf), var(--gr-mint));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
}

.a37-grove-lede {
  margin: 0 auto;
  max-width: 46ch;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gr-muted);
}

.a37-grove-loading {
  margin: 1.5rem 0;
  text-align: center;
  color: var(--gr-muted);
}

/* —— Logged-in dashboard —— */
.a37-grove-dashboard {
  margin-top: 0.5rem;
}

.a37-grove-member {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding: 1.25rem 1.35rem;
  border-radius: 1.4rem;
  background: linear-gradient(145deg, var(--gr-deep), var(--gr-ink));
  color: #fff;
  border: 1px solid rgba(46, 230, 168, 0.28);
  box-shadow: 0 20px 44px rgba(4, 38, 31, 0.22);
  position: relative;
  overflow: hidden;
}

.a37-grove-member::before {
  content: '';
  position: absolute;
  inset: auto -20% -40% auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(46, 230, 168, 0.35), transparent 65%);
  pointer-events: none;
}

.a37-grove-member-copy,
.a37-grove-member-actions {
  position: relative;
  z-index: 1;
}

.a37-grove-member-tag {
  display: inline-block;
  margin-bottom: 0.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(46, 230, 168, 0.95);
  color: var(--gr-ink);
}

.a37-grove-member h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.a37-grove-member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Horizontal desk tabs (replaces left rail) */
.a37-grove-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}

.a37-grove-tab {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.85rem 0.9rem;
  border-radius: 1.1rem;
  border: 1px solid var(--gr-line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--gr-ink);
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(4, 38, 31, 0.04);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s, border-color 0.25s, background 0.25s;
}

.a37-grove-tab:hover {
  transform: translateY(-3px);
  border-color: rgba(46, 230, 168, 0.4);
  box-shadow: 0 14px 28px rgba(4, 38, 31, 0.1);
  text-decoration: none !important;
}

.a37-grove-tab.is-active {
  background: linear-gradient(145deg, var(--gr-deep), var(--gr-ink));
  color: #fff;
  border-color: rgba(46, 230, 168, 0.3);
  box-shadow: 0 16px 32px rgba(4, 38, 31, 0.2);
}

.a37-grove-tab-num {
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--gr-leaf);
  padding-top: 0.15rem;
}

.a37-grove-tab.is-active .a37-grove-tab-num { color: var(--gr-mint); }

.a37-grove-tab-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.a37-grove-tab-copy strong {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.a37-grove-tab-copy small {
  font-size: 0.68rem;
  color: var(--gr-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.a37-grove-tab.is-active .a37-grove-tab-copy small {
  color: rgba(255, 255, 255, 0.65);
}

.a37-grove-tab--link {
  background: rgba(46, 230, 168, 0.1);
  border-color: rgba(46, 230, 168, 0.28);
}

/* Stage / panels */
.a37-grove-stage {
  padding: 1.35rem 1.4rem 1.5rem;
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--gr-line);
  box-shadow: 0 16px 36px rgba(4, 38, 31, 0.07);
  backdrop-filter: blur(12px);
  min-height: 280px;
}

.a37-grove-panel-code {
  display: inline-block;
  margin-bottom: 0.4rem;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gr-leaf);
}

.a37-grove-panel-head {
  margin-bottom: 1.15rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--gr-line);
}

.a37-grove-panel-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.a37-grove-panel-head h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.a37-grove-panel-head p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--gr-muted);
}

.a37-grove-profile.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.a37-grove-profile.profile-grid > div,
.a37-grove-profile .profile-item {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: var(--gr-wash);
  border: 1px solid transparent;
  transition: border-color 0.2s, transform 0.25s, box-shadow 0.25s;
}

.a37-grove-profile.profile-grid > div:hover,
.a37-grove-profile .profile-item:hover {
  border-color: rgba(46, 230, 168, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(4, 38, 31, 0.06);
}

.a37-grove-profile dt,
.a37-grove-profile .profile-label {
  margin: 0 0 0.3rem;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gr-leaf);
}

.a37-grove-profile dd,
.a37-grove-profile .profile-value {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--gr-ink);
  word-break: break-word;
}

.a37-grove-orders.order-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.a37-grove-orders .order-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.05rem;
  border-radius: 1rem;
  background: var(--gr-wash);
  border: 1px solid var(--gr-line);
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.a37-grove-orders .order-row:hover {
  transform: translateY(-2px);
  border-color: rgba(46, 230, 168, 0.4);
  box-shadow: 0 12px 26px rgba(4, 38, 31, 0.08);
}

/* —— Logged-out gate —— */
.a37-grove-gate {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  max-width: 520px;
  margin: 0.5rem auto 0;
}

.a37-grove-perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.a37-grove-perk {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.85rem 0.9rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--gr-line);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.35;
  color: var(--gr-ink);
  box-shadow: 0 8px 20px rgba(4, 38, 31, 0.04);
}

.a37-grove-perk-num {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--gr-leaf);
  padding-top: 0.1rem;
}

.a37-grove-auth {
  padding: 1.35rem 1.4rem 1.5rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--gr-line);
  box-shadow: 0 20px 48px rgba(4, 38, 31, 0.1);
  backdrop-filter: blur(14px);
}

.a37-grove-auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem;
  padding: 0.28rem;
  margin-bottom: 1.25rem;
  border-radius: 999px;
  background: var(--gr-ink);
  border: 1px solid rgba(46, 230, 168, 0.25);
}

.a37-grove-auth-glider {
  position: absolute;
  top: 0.28rem;
  left: 0.28rem;
  height: calc(100% - 0.56rem);
  width: calc(50% - 0.28rem);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gr-mint), #7ef0c4);
  transition: transform 0.4s var(--ease-spring);
  z-index: 0;
  box-shadow: 0 0 18px rgba(46, 230, 168, 0.4);
}

.a37-grove-auth-tab {
  position: relative;
  z-index: 1;
  border: 0;
  background: none;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.2s;
}

.a37-grove-auth-tab.is-active { color: var(--gr-ink); }

.a37-grove-auth-panel h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.a37-grove-auth-panel .lead {
  margin: 0 0 1.15rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--gr-muted);
}

.a37-grove-auth-panel.auth-split-panel { display: none; }
.a37-grove-auth-panel.auth-split-panel.is-active {
  display: block;
  animation: a37GrovePanelIn 0.35s var(--ease-out);
}

.a37-grove-forgot {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px dashed var(--gr-line);
}

.a37-grove-forgot .form-subhead {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gr-ink);
}

.a37-grove-reset {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gr-line);
}

/* Forms & buttons */
.a37-grove-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.a37-grove-field {
  display: grid;
  gap: 0.4rem;
}

.a37-grove-field span {
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gr-leaf);
}

.a37-grove-field input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--gr-line);
  border-radius: 0.95rem;
  font: inherit;
  font-size: 0.92rem;
  background: #fff;
  color: var(--gr-ink);
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.a37-grove-field input:focus {
  outline: none;
  border-color: rgba(46, 230, 168, 0.65);
  box-shadow: 0 0 0 3px rgba(46, 230, 168, 0.2);
}

.a37-grove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none !important;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.a37-grove-btn--primary {
  color: var(--gr-ink);
  background: linear-gradient(135deg, var(--gr-mint), #7ef0c4);
  box-shadow: 0 12px 28px rgba(46, 230, 168, 0.35);
}

.a37-grove-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(46, 230, 168, 0.45);
}

.a37-grove-btn--soft {
  color: var(--gr-ink);
  background: rgba(46, 230, 168, 0.18);
  border: 1px solid rgba(46, 230, 168, 0.35);
}

.a37-grove-member .a37-grove-btn--soft {
  color: var(--gr-ink);
  background: rgba(46, 230, 168, 0.95);
  border-color: transparent;
}

.a37-grove-btn--soft:hover {
  background: var(--gr-ink);
  color: var(--gr-mint);
}

.a37-grove-btn--outline {
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.a37-grove-btn--outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

.page-account-grove .toast {
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 900px) {
  .a37-grove-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .a37-grove-tab--link {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .a37-grove-tabs {
    grid-template-columns: 1fr;
  }

  .a37-grove-profile.profile-grid,
  .a37-grove-perks {
    grid-template-columns: 1fr;
  }

  .a37-grove-member {
    flex-direction: column;
    align-items: flex-start;
  }

  .a37-grove-stage,
  .a37-grove-auth {
    padding: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .a37-grove-hero-mesh,
  .page-account-grove .dash-panel.is-active,
  .a37-grove-auth-panel.auth-split-panel.is-active,
  .a37-grove-auth-glider {
    animation: none !important;
    transition: none !important;
  }
}
