/* PatWaGo Account Pages — commercial account UI stylesheet.
   Black/gold design system. Mobile-first. New file only — builds on the
   tokens already used by /app/app.css (.glass, .btn, .eyebrow, .field) and
   adds account-specific surfaces: onboarding, auth, trial paywall,
   checkout, and profile/account views.
   Colors:  #ffd400 (gold)  #080908 (near-black bg)  #8ce3b2 (green-active)
            #e63946 (sos/red)  Anton (display)  Inter (body)
*/
:root {
  --pw-gold: #ffd400;
  --pw-gold-dim: #d6a800;
  --pw-bg: #080908;
  --pw-bg-soft: #151614;
  --pw-card: #1e211d;
  --pw-border: rgba(255, 255, 255, 0.1);
  --pw-text: #f8f5e8;
  --pw-muted: #a7a79f;
  --pw-green: #8ce3b2;
  --pw-green-bg: rgba(0, 166, 81, 0.15);
  --pw-red: #e63946;
  --pw-radius: 22px;
  --pw-radius-sm: 13px;
}

/* account shell — full-bleed wrapper */
.account-shell {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: 0 5vw 32px;
}

.account-head {
  margin-bottom: 26px;
}
.account-head .eyebrow {
  color: var(--pw-gold);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.account-head h1 {
  font-family: Anton, sans-serif;
  font-weight: 400;
  font-size: clamp(34px, 8vw, 54px);
  line-height: 0.98;
  margin: 8px 0 12px;
  color: var(--pw-text);
}
.account-head p {
  color: var(--pw-muted);
  line-height: 1.65;
  margin: 0;
}

/* generic section */
.account-section {
  margin-top: 28px;
}
.account-section h2 {
  font-family: Anton, sans-serif;
  font-weight: 400;
  font-size: 26px;
  margin: 0 0 14px;
}

/* onboarding stepper */
.onboard-stepper {
  display: grid;
  gap: 14px;
  margin: 8px 0 26px;
}
.onboard-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-radius: var(--pw-radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--pw-border);
}
.onboard-step .num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pw-gold);
  color: #090909;
  font-weight: 800;
  font-size: 16px;
}
.onboard-step strong {
  display: block;
  font-size: 15px;
  color: var(--pw-text);
}
.onboard-step span {
  color: var(--pw-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* auth card */
.auth-card {
  padding: 26px;
  display: grid;
  gap: 16px;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--pw-radius-sm);
  overflow: hidden;
  border: 1px solid var(--pw-border);
}
.auth-tab {
  padding: 13px;
  text-align: center;
  font-weight: 800;
  color: var(--pw-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.auth-tab.active {
  background: var(--pw-gold);
  color: #090909;
}
.auth-form {
  display: grid;
  gap: 16px;
}
.auth-form .field {
  display: grid;
  gap: 7px;
}
.auth-form label {
  font-size: 13px;
  font-weight: 700;
  color: var(--pw-text);
}
.auth-form input,
.auth-form select,
.auth-form textarea {
  width: 100%;
  background: #10110f;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  padding: 14px;
  outline: none;
  font: inherit;
}
.auth-form input:focus-visible,
.auth-form select:focus-visible,
.auth-form textarea:focus-visible {
  border-color: var(--pw-gold);
}
.auth-hint {
  color: var(--pw-muted);
  font-size: 12px;
  line-height: 1.5;
}
.auth-error {
  color: var(--pw-red);
  font-size: 13px;
  font-weight: 700;
}

/* trial / paywall */
.trial-card {
  padding: 28px;
  text-align: center;
}
.trial-ring {
  width: 132px;
  height: 132px;
  margin: 0 auto 18px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--pw-gold) 0deg, var(--pw-gold) calc(var(--trial-deg, 180) * 1deg), rgba(255, 255, 255, 0.08) 0deg);
}
.trial-ring::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--pw-bg-soft);
}
.trial-ring strong {
  position: relative;
  z-index: 1;
  font-family: Anton, sans-serif;
  font-size: 44px;
  color: var(--pw-gold);
  line-height: 1;
}
.trial-ring span {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pw-muted);
  margin-top: 2px;
}
.trial-card h2 {
  font-family: Anton, sans-serif;
  font-weight: 400;
  font-size: 30px;
  margin: 0 0 8px;
}
.trial-card .muted {
  color: var(--pw-muted);
  margin: 0 0 20px;
}
.plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 18px;
}
.plan-card {
  padding: 18px;
  border-radius: var(--pw-radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--pw-border);
  text-align: left;
}
.plan-card .plan-name {
  font-family: Anton, sans-serif;
  font-size: 22px;
  color: var(--pw-gold);
}
.plan-card .plan-price {
  font-size: 16px;
  font-weight: 800;
  margin: 4px 0 8px;
}
.plan-card .plan-features {
  color: var(--pw-muted);
  font-size: 13px;
  line-height: 1.5;
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.plan-card .plan-features li {
  margin: 0 0 4px;
}

/* checkout */
.checkout-card {
  padding: 26px;
  display: grid;
  gap: 18px;
}
.checkout-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.checkout-row span {
  color: var(--pw-muted);
}
.checkout-row strong {
  color: #fff;
}
.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 0;
  font-size: 18px;
  font-weight: 800;
}
.checkout-total strong {
  color: var(--pw-gold);
  font-family: Anton, sans-serif;
  font-size: 30px;
}
.checkout-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.checkout-status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.checkout-status.awaiting {
  background: rgba(255, 212, 0, 0.18);
  color: var(--pw-gold);
}
.checkout-status.completed {
  background: var(--pw-green-bg);
  color: var(--pw-green);
}

/* profile / account */
.profile-card {
  padding: 28px;
  display: grid;
  gap: 16px;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--pw-gold);
  color: #090909;
  display: grid;
  place-items: center;
  font-family: Anton, sans-serif;
  font-size: 28px;
}
.profile-info strong {
  display: block;
  font-size: 18px;
}
.profile-info span {
  color: var(--pw-muted);
  font-size: 13px;
}
.profile-pass {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.profile-pass .pass-badge {
  font-family: Anton, sans-serif;
  font-size: 28px;
  color: var(--pw-gold);
}
.profile-pass .pass-active {
  background: var(--pw-green-bg);
  color: var(--pw-green);
  padding: 8px 13px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.profile-pass .pass-expired {
  background: rgba(230, 57, 70, 0.16);
  color: var(--pw-red);
  padding: 8px 13px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.profile-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.profile-links a {
  padding: 18px;
  border-radius: var(--pw-radius-sm);
  font-weight: 700;
  color: var(--pw-text);
}

/* shared buttons reuse .btn from app.css; account-specific variants */
.btn-block {
  width: 100%;
  justify-content: center;
}

/* focus-visible accessibility for all interactive elements */
.btn:focus-visible,
.auth-tab:focus-visible,
.plan-card button:focus-visible,
.auth-form input:focus-visible,
.auth-form select:focus-visible,
.auth-form textarea:focus-visible,
.profile-links a:focus-visible,
.checkout-actions a:focus-visible {
  outline: 2px solid var(--pw-gold);
  outline-offset: 2px;
}

/* toast (own copy so account-pages.js is self-contained if app.css absent) */
.toast {
  position: fixed;
  right: 20px;
  top: 90px;
  z-index: 100;
  background: var(--pw-gold);
  color: #090909;
  border-radius: 13px;
  padding: 14px 18px;
  font-weight: 800;
  box-shadow: 0 14px 40px #000;
  max-width: 330px;
}
.toast.error {
  background: var(--pw-red);
  color: #fff;
}

/* skeleton / loading */
.account-skeleton {
  display: grid;
  gap: 12px;
  padding: 26px;
}
.account-skeleton .skel {
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  background-size: 200% 100%;
  animation: pw-skel 1.4s infinite;
}
.account-skeleton .skel:nth-child(2) { width: 70%; }
.account-skeleton .skel:nth-child(3) { width: 90%; }
@keyframes pw-skel {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* mobile-first: enhance layout on wider screens */
@media (min-width: 640px) {
  .account-shell {
    max-width: 680px;
    padding: 0 4vw 40px;
  }
  .plan-grid {
    grid-template-columns: 1fr 1fr;
  }
  .profile-links {
    grid-template-columns: repeat(3, 1fr);
  }
  .checkout-card,
  .auth-card,
  .trial-card,
  .profile-card {
    padding: 34px;
  }
}
@media (min-width: 960px) {
  .account-shell {
    max-width: 760px;
  }
  .plan-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  .account-skeleton .skel { animation: none; }
  * { scroll-behavior: auto !important; }
}
