/* Account chrome: auth forms + dashboard layout.
   Pairs with /styles/policy.css which provides the global nav + footer. */

/* Hide body until auth resolves. Set via inline <script> at the top of
   the <head> on every authenticated /account/*/index.html. Prevents the
   "flash of dashboard" before requireAuth() bounces an unauthed
   visitor. The IIFE clears this flag once a session is confirmed. */
html[data-auth="pending"] body { visibility: hidden; }

/* ─── Auth form card (login, signup, forgot, reset) ─── */
.auth-shell {
  max-width: 420px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}
.auth-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 40px 32px 32px;
  box-shadow: 0 20px 50px rgba(31, 20, 16, 0.06);
}
.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.auth-logo img { height: 32px; display: block; }
.auth-card h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  text-align: center;
  color: var(--ink);
}
.auth-card .auth-lede {
  font-size: 14.5px;
  color: var(--ink-2);
  text-align: center;
  margin: 0 0 24px;
  line-height: 1.55;
}
.auth-form { display: grid; gap: 14px; }
.auth-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}
.auth-form input {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  outline: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-form input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
}
.auth-form button[type="submit"] {
  margin-top: 6px;
  background: var(--orange);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
}
.auth-form button[type="submit"]:hover { background: var(--orange-dark); }
.auth-form button[type="submit"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--ink-2);
}

.auth-hint {
  font-size: 12px;
  color: var(--ink-2);
  margin: 6px 0 0;
  line-height: 1.45;
}
.auth-meta {
  text-align: center;
  font-size: 13px;
  color: var(--ink-2);
  margin: 20px 0 0;
}
.auth-meta a { color: var(--orange-dark); font-weight: 600; }
.auth-foot-link {
  display: block;
  text-align: center;
  font-size: 13px;
  margin-top: 14px;
  color: var(--ink-2);
}
.auth-foot-link a { color: var(--orange-dark); font-weight: 600; }

.auth-error,
.auth-success {
  font-size: 13.5px;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 6px;
  line-height: 1.4;
}
.auth-error { background: rgba(220, 38, 38, 0.08); color: #b91c1c; }
.auth-success { background: rgba(22, 163, 74, 0.08); color: #15803d; }


/* ─── Authenticated dashboard ─── */
.dash-shell { padding: 40px 24px 80px; max-width: 1100px; margin: 0 auto; }

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.dash-greeting h1 {
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--ink);
}
.dash-greeting p {
  font-size: 14.5px;
  color: var(--ink-2);
  margin: 0;
}
.dash-signout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.dash-signout:hover { border-color: var(--orange); color: var(--orange); }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.dash-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dash-card:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(31, 20, 16, 0.06);
}
.dash-card-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--orange-tint);
  color: var(--orange-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 -2px 6px rgba(194, 65, 12, 0.08);
}
.dash-card-icon svg { width: 32px; height: 32px; }
.dash-card h3 {
  font-size: 16.5px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.005em;
}
.dash-card p {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.5;
}
.dash-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--orange-tint);
  color: var(--orange-dark);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
  align-self: flex-start;
}


/* ─── Account inner page (orders, subscriptions, etc.) ─── */
.account-page { max-width: 980px; margin: 0 auto; padding: 32px 24px 80px; }
.account-page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--ink-2);
  text-decoration: none;
  margin-bottom: 16px;
}
.account-page-back:hover { color: var(--orange); }
.account-page h1 {
  font-size: clamp(28px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.account-page-lede {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0 0 32px;
}
.account-empty {
  background: var(--bg-2);
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 56px 28px;
  text-align: center;
  color: var(--ink-2);
}
.account-empty p { font-size: 15px; line-height: 1.6; margin: 0 0 18px; }
.account-empty-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--orange);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s;
}
.account-empty-cta:hover { background: var(--orange-dark); color: #fff; }
