:root {
  --profile-max-width: 560px;
}

.profile-container {
  width: min(100%, var(--profile-max-width));
  margin: 0 auto;
  padding: 28px 16px calc(100px + var(--safe-bottom));
}

.profile-heading {
  margin: 0 4px 20px;
}

.profile-kicker {
  display: block;
  color: var(--accent-gold);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-heading h1 {
  color: var(--text-main);
  font-size: 1.7rem;
  line-height: 1.15;
  margin: 4px 0 8px;
}

.profile-heading p,
.account-card > p {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.profile-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 14px;
  padding: 16px;
}

.profile-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--bg-color);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 14px;
}

.profile-tab,
.logout-button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
}

.profile-tab.active {
  background: var(--border-color);
  color: var(--text-main);
}

.profile-form {
  display: grid;
  gap: 11px;
}

.profile-form[hidden],
.profile-panel[hidden] {
  display: none;
}

.profile-form label {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.profile-form input {
  display: block;
  width: 100%;
  min-height: 46px;
  margin-top: 5px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-color);
  color: var(--text-main);
  font: inherit;
  font-size: 0.82rem;
  outline: none;
}

.profile-form input:focus {
  border-color: var(--accent-gold);
}

.profile-submit,
.profile-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  background: var(--accent-gold);
  color: #000;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.profile-feedback {
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.45;
  margin-top: 12px;
}

.profile-feedback.success {
  color: var(--whatsapp-color);
}

.profile-feedback.error {
  color: #ff4444;
}

.account-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.account-card h2 {
  color: var(--text-main);
  font-size: 1rem;
  margin-top: 3px;
}

.logout-button {
  border: 1px solid var(--border-color);
  padding: 0 12px;
}

.coupon-card {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: var(--radius-sm);
  margin: 18px 0;
  padding: 14px;
}

.coupon-card strong {
  display: block;
  color: var(--accent-gold);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  margin: 5px 0 2px;
}

.coupon-card p {
  color: var(--text-muted);
  font-size: 0.68rem;
}

@media (min-width: 600px) {
  .profile-container {
    padding: 40px 24px calc(120px + var(--safe-bottom));
  }

  .profile-panel {
    padding: 20px;
  }
}
