/* ===== Shared auth shell (login / register) ===== */
.auth-page {
  margin: 0;
  min-height: 100vh;
  background: #fff7ed;
  color: #1c1917;
  font-family: system-ui, -apple-system, sans-serif;
}

.auth-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 247, 237, 0.96);
  border-bottom: 1px solid #fed7aa;
  backdrop-filter: blur(8px);
}

.auth-topbar-back {
  color: #c2410c;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #9a3412;
  font-size: 0.95rem;
}

.auth-topbar-brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.auth-main {
  max-width: 420px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

.auth-hero {
  text-align: center;
  margin-bottom: 20px;
}

.auth-hero img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 6px 16px rgba(154, 52, 18, 0.2));
}

.auth-hero h1 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  color: #9a3412;
}

.auth-hero p {
  margin: 0;
  font-size: 0.92rem;
  color: #a16207;
  line-height: 1.45;
}

.auth-card {
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 18px;
  padding: 22px 18px 24px;
  box-shadow: 0 8px 24px rgba(154, 52, 18, 0.06);
}

.auth-card label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #44403c;
  margin-bottom: 12px;
}

.auth-card input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1.5px solid #e7e5e4;
  border-radius: 12px;
  font-size: 1rem;
}

.auth-card input:focus {
  outline: none;
  border-color: #ea580c;
}

.auth-btn {
  width: 100%;
  margin-top: 6px;
  border: none;
  border-radius: 12px;
  padding: 14px;
  background: #ea580c;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.auth-btn:hover {
  background: #c2410c;
}

.auth-error {
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.auth-footer {
  text-align: center;
  margin-top: 18px;
  font-size: 0.9rem;
  color: #78716c;
}

.auth-footer a {
  color: #c2410c;
  font-weight: 700;
  text-decoration: none;
}

.auth-secure {
  text-align: center;
  margin-top: 14px;
  font-size: 0.78rem;
  color: #a8a29e;
}

/* Profile */
/* ===== Full profile page ===== */
.profile-page {
  margin: 0;
  min-height: 100vh;
  background: #fff7ed;
  color: #1c1917;
  font-family: system-ui, -apple-system, sans-serif;
}

.profile-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 247, 237, 0.96);
  border-bottom: 1px solid #fed7aa;
  backdrop-filter: blur(8px);
}

.profile-topbar-back,
.profile-topbar-logout {
  color: #c2410c;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
}

.profile-topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #9a3412;
  font-size: 0.95rem;
}

.profile-topbar-brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.profile-main {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.profile-alert {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.profile-alert.success { background: #dcfce7; color: #166534; }
.profile-alert.error { background: #fef2f2; color: #b91c1c; }

.profile-hero-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 18px;
  padding: 18px 16px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: #fff;
  font-weight: 800;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-hero-text h1 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  color: #9a3412;
}

.profile-hero-text p {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: #78716c;
}

.profile-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
}
.status-active { background: #dcfce7; color: #166534; }
.status-pending { background: #ffedd5; color: #9a3412; }
.status-canceled,
.status-past_due { background: #fee2e2; color: #991b1b; }

.profile-section {
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 18px;
  padding: 18px 16px 20px;
  margin-bottom: 14px;
}

.profile-section-head h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: #9a3412;
}

/* Member code */
.member-code-panel {
  text-align: center;
}
.member-code-label {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a16207;
}
.member-code-value {
  margin: 0 0 12px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #c2410c;
  font-family: ui-monospace, monospace;
}
.member-code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 14px;
}
.btn-soft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.member-perks {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  display: grid;
  gap: 8px;
}
.member-perks li {
  font-size: 0.9rem;
  color: #44403c;
  display: flex;
  gap: 8px;
  align-items: center;
}
.member-perks i { color: #16a34a; }
.member-renew {
  margin: 14px 0 0;
  font-size: 0.82rem;
  color: #78716c;
}

.member-cta-panel {
  text-align: center;
}
.member-cta-badge {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 10px;
}
.member-cta-panel h3 {
  margin: 0 0 8px;
  color: #9a3412;
  font-size: 1.1rem;
}
.member-cta-panel p {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: #78716c;
  line-height: 1.45;
}

/* Forms */
.profile-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #44403c;
  margin-bottom: 12px;
}
.profile-form input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1.5px solid #e7e5e4;
  border-radius: 12px;
  font-size: 1rem;
}
.profile-form input:focus {
  outline: none;
  border-color: #ea580c;
}
.profile-form input:disabled {
  background: #f5f5f4;
  color: #78716c;
}
.profile-form small {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  font-size: 0.75rem;
  color: #a8a29e;
}

.btn-primary-block,
.btn-secondary-block {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
  box-sizing: border-box;
}
.btn-primary-block {
  background: #ea580c;
  color: #fff;
}
.btn-primary-block:hover { background: #c2410c; }
.btn-secondary-block {
  background: #fff;
  color: #9a3412;
  border: 1.5px solid #fed7aa;
}

.profile-foot {
  text-align: center;
  font-size: 0.88rem;
  color: #a8a29e;
  margin-top: 8px;
}
.profile-foot a {
  color: #c2410c;
  font-weight: 600;
  text-decoration: none;
}