* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f7;
  color: #111;
}
.wrap {
  max-width: 480px;
  margin: 60px auto;
  background: #fff;
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.wrap.wide {
  max-width: 720px;
}
h1 { font-size: 22px; margin: 0 0 4px; }
p.sub { color: #666; margin: 0 0 24px; font-size: 14px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
input, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
textarea { min-height: 120px; resize: vertical; }
button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  background: #111;
  color: #fff;
  margin-top: 18px;
}
button.secondary { background: #eee; color: #111; }
button.small { margin-top: 0; padding: 8px 12px; font-size: 13px; }
.row { display: flex; gap: 12px; align-items: center; }
.error { color: #c0392b; font-size: 13px; margin-top: 10px; }
.success { color: #1a7f37; font-size: 13px; margin-top: 10px; }
.muted { color: #6b6b6b; font-size: 13px; } /* #6b6b6b on white ≈ 5.7:1, meets WCAG AA (was #888 ≈ 3.5:1) */
a { color: #111; }
.card {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 16px;
  margin-top: 20px;
}
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge.active { background: #e6f6ea; color: #1a7f37; }
.badge.inactive { background: #fbe9e7; color: #c0392b; }
pre {
  background: #111;
  color: #d4f4dd;
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 12px;
}
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.topbar button { margin-top: 0; }

/* Brand mark */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Plan / subscription card */
.plan-card {
  border: 1px solid #eee;
  border-radius: 14px;
  margin-top: 20px;
  overflow: hidden;
}
.plan-card-top {
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.plan-name { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #6b6b6b; margin: 0 0 6px; }
.plan-price { font-size: 30px; font-weight: 700; line-height: 1; }
.plan-price span { font-size: 14px; font-weight: 500; color: #6b6b6b; }
.plan-status { margin-top: 10px; }
.plan-cta { text-align: right; }
.plan-cta .muted { display: block; margin-top: 8px; max-width: 220px; }
.plan-features {
  list-style: none;
  margin: 0;
  padding: 16px 22px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}
.plan-features li {
  font-size: 13px;
  color: #444;
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-features li::before {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: #1a7f37;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}
@media (max-width: 520px) {
  .plan-card-top { flex-direction: column; }
  .plan-cta { text-align: left; }
  .plan-cta .muted { max-width: none; }
  .plan-features { grid-template-columns: 1fr; }
}

/* Toast: always-visible feedback regardless of scroll position */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 1000;
}
.toast.toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-success { background: #1a7f37; color: #fff; }
.toast.toast-error { background: #c0392b; color: #fff; }
