/* ─── Settings Page ──────────────────────────────────────────────────────── */

.settings-page {
  width: 100%;
  min-height: 100vh;
  background: var(--kith-bg);
  color: var(--kith-text);
  display: flex;
  flex-direction: column;
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

/* Sticky header */
.st-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 60px 20px 12px;
  flex-shrink: 0;
  background: var(--kith-bg);
  z-index: 5;
}
.st-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--kith-surface);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--kith-shadow-soft);
  flex-shrink: 0;
  color: var(--kith-text);
}
.st-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--kith-text);
}

/* Scrollable body */
.st-body {
  flex: 1;
  padding: 6px 20px 120px;
}

/* Section label */
.st-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--kith-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0 4px 8px;
}

/* Card */
.st-card {
  background: var(--kith-surface);
  border-radius: 18px;
  box-shadow: var(--kith-shadow);
  padding: 18px;
  margin-bottom: 22px;
}
.st-card-nopad {
  background: var(--kith-surface);
  border-radius: 18px;
  box-shadow: var(--kith-shadow);
  overflow: hidden;
  margin-bottom: 22px;
}

/* Profile card */
.st-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
}
.st-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--kith-green);
  color: var(--kith-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 500;
  overflow: hidden;
}
.st-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.st-profile-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.st-profile-email {
  font-size: 13px;
  color: var(--kith-text-muted);
  margin-top: 2px;
}
.st-profile-since {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 12px;
  color: var(--kith-text-dim);
  margin-top: 6px;
}

/* Subscription card */
.st-sub-card {
  background: var(--kith-surface);
  border-radius: 18px;
  box-shadow: var(--kith-shadow);
  padding: 18px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}
.st-sub-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(209,160,38,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.st-sub-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 10px;
  position: relative;
}
.st-trial-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(209,160,38,0.15);
  color: var(--kith-gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.st-trial-days {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 12px;
  color: var(--kith-text-muted);
  white-space: nowrap;
}
/* Real plan badges: Free = muted (beige role), Pro = green (active-state role) */
.st-plan-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(190, 178, 166, 0.18);
  color: var(--kith-text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.st-plan-badge.pro {
  background: rgba(41, 94, 44, 0.12);
  color: var(--kith-green);
}
.st-sub-headline {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  position: relative;
  color: var(--kith-text);
}
.st-sub-blurb {
  font-size: 13px;
  color: var(--kith-text-muted);
  margin-top: 4px;
  line-height: 1.45;
  position: relative;
}
.st-sub-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  position: relative;
}
.st-upgrade-btn {
  flex: 1;
  padding: 11px;
  border-radius: 999px;
  border: none;
  background: var(--kith-green);
  color: var(--kith-on-accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.st-plans-btn {
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--kith-border);
  background: transparent;
  color: var(--kith-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

/* Settings row */
.st-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--kith-line-soft);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.st-row.last-row {
  border-bottom: none;
}
.st-row-content {
  flex: 1;
  min-width: 0;
}
.st-row-label {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--kith-text);
  letter-spacing: -0.005em;
}
.st-row-label.danger { color: var(--kith-red); }
.st-row-hint {
  font-size: 12px;
  color: var(--kith-text-muted);
  margin-top: 2px;
  line-height: 1.35;
}
.st-row-value {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: var(--kith-text-muted);
  flex-shrink: 0;
}
.st-row-chevron {
  flex-shrink: 0;
  color: var(--kith-text-dim);
}

/* My Fields section */
.st-fields-label-block {
  margin-bottom: 22px;
}
.st-fields-explainer {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 12px;
  color: var(--kith-text-dim);
  padding: 0 4px 10px;
  line-height: 1.4;
}
.st-field-row {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--kith-line-soft);
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
}
.st-field-row:last-child { border-bottom: none; }
.st-field-name {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--kith-text);
  letter-spacing: -0.005em;
}
.st-field-desc {
  font-size: 12.5px;
  color: var(--kith-text-muted);
  margin-top: 2px;
  line-height: 1.35;
}
.st-add-field-btn {
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  border: 1.5px dashed var(--kith-border);
  background: transparent;
  color: var(--kith-text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 22px;
}

/* Account actions */
.st-signout-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: var(--kith-surface);
  color: var(--kith-text);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--kith-shadow-soft);
  margin-bottom: 12px;
}
.st-delete-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(192,57,43,0.25);
  background: transparent;
  color: var(--kith-red);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

/* ── Bottom sheets ───────────────────────────────────────────────────────── */
.st-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20,15,10,0.5);
  display: flex;
  align-items: flex-end;
}
.st-sheet {
  width: 100%;
  background: var(--kith-bg);
  border-radius: 24px 24px 0 0;
  padding: 14px 20px 28px;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.25);
}
.st-sheet-grabber {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
.st-sheet-grabber-pill {
  width: 42px;
  height: 5px;
  border-radius: 3px;
  background: var(--kith-border);
}
.st-sheet-title {
  font-size: 22px;
  font-weight: 600;
  margin: 6px 0 16px;
  letter-spacing: -0.02em;
  color: var(--kith-text);
}
.st-field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--kith-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.st-field-label.mt { margin-top: 16px; }
.st-input {
  width: 100%;
  border: 1px solid var(--kith-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  background: var(--kith-surface);
  color: var(--kith-text);
  outline: none;
  box-sizing: border-box;
}
.st-textarea {
  width: 100%;
  border: 1px solid var(--kith-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  background: var(--kith-surface);
  color: var(--kith-text);
  outline: none;
  box-sizing: border-box;
  resize: none;
  line-height: 1.4;
}
.st-char-count {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  font-size: 11px;
  color: var(--kith-text-dim);
}
.st-char-count.near { color: var(--kith-rose); }
.st-sheet-footer {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.st-sheet-delete-btn {
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--kith-border);
  background: transparent;
  color: var(--kith-red);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.st-sheet-cancel-btn {
  flex: 1;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid var(--kith-border);
  background: transparent;
  color: var(--kith-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.st-sheet-save-btn {
  flex: 1;
  padding: 13px;
  border-radius: 12px;
  border: none;
  background: var(--kith-green);
  color: var(--kith-on-accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 150ms, color 150ms;
}
.st-sheet-save-btn:disabled {
  background: var(--kith-border);
  color: var(--kith-text-dim);
  cursor: default;
}

/* Theme picker sheet */
.st-theme-list {
  background: var(--kith-surface);
  border-radius: 14px;
  box-shadow: var(--kith-shadow-soft);
  overflow: hidden;
}
.st-theme-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--kith-line-soft);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.st-theme-row:last-child { border-bottom: none; }
.st-theme-label {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--kith-text);
  letter-spacing: -0.005em;
}
.st-theme-hint {
  font-size: 12px;
  color: var(--kith-text-muted);
  margin-top: 2px;
}
.st-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--kith-border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 150ms, background 150ms;
}
.st-radio.selected {
  border-color: var(--kith-green);
  background: var(--kith-green);
}

/* ── Confirm modal ───────────────────────────────────────────────────────── */
.st-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20,15,10,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.st-modal {
  width: 100%;
  background: var(--kith-bg);
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: 0 16px 50px rgba(0,0,0,0.35);
}
.st-modal-title {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: var(--kith-text);
}
.st-modal-body {
  font-size: 14px;
  color: var(--kith-text-muted);
  line-height: 1.45;
  margin: 0 0 18px;
}
.st-modal-actions {
  display: flex;
  gap: 10px;
}
.st-modal-cancel {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--kith-border);
  background: transparent;
  color: var(--kith-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.st-modal-confirm {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: var(--kith-green);
  color: var(--kith-on-accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.st-modal-confirm.danger { background: var(--kith-red); }
