:root { --bg:#f6f7fb; --card:#ffffff; --text:#1f2937; --muted:#6b7280; --line:#e5e7eb; --accent:#2563eb; --danger:#b91c1c; }
* { box-sizing: border-box; }
body { margin:0; font-family: Segoe UI, Arial, sans-serif; background:var(--bg); color:var(--text); }
a { color:var(--accent); text-decoration:none; }
.topbar { display:flex; justify-content:space-between; align-items:center; padding:14px 28px; background:#111827; color:white; }
.topbar a { color:white; margin-right:14px; }
.brand { font-weight:700; font-size:20px; }
.container { max-width:1100px; margin:30px auto; padding:0 20px; }
.hero { background:linear-gradient(135deg, #1d4ed8, #111827); color:white; border-radius:18px; padding:48px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:20px; margin:16px 0; box-shadow:0 2px 10px rgba(0,0,0,.03); }
.narrow { max-width:460px; }
.grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px,1fr)); gap:16px; }
.big { font-size:32px; margin:4px 0; font-weight:700; }
label { display:block; font-weight:600; margin-top:12px; }
input { width:100%; padding:10px; margin:6px 0 10px; border:1px solid var(--line); border-radius:8px; }
button, .button, .button-link { border:0; background:var(--accent); color:white; padding:10px 14px; border-radius:8px; cursor:pointer; display:inline-block; }
button.danger { background:var(--danger); }
.secondary { background:#4b5563; }
.inline { display:inline; }
.inline button { padding:7px 10px; }
table { width:100%; border-collapse:collapse; background:white; border-radius:14px; overflow:hidden; }
th, td { padding:12px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
th { background:#f3f4f6; }
.error { background:#fee2e2; color:#991b1b; padding:10px; border-radius:8px; }
.success { background:#dcfce7; color:#166534; padding:10px; border-radius:8px; }
.muted { color:var(--muted); }
.row-form { display:flex; gap:10px; align-items:end; }
.row-form input { margin:0; }
pre { background:#0f172a; color:#e5e7eb; padding:14px; border-radius:10px; overflow:auto; }
.token { font-size:16px; white-space:pre-wrap; word-break:break-all; }

/* Subscription/status badges */
.notice {
  background:#fef3c7;
  color:#92400e;
  padding:10px;
  border-radius:8px;
  border:1px solid #fde68a;
}

.status-pill {
  display:inline-block;
  padding:3px 9px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
  line-height:1.4;
  border:1px solid transparent;
  text-transform:capitalize;
  background:#eef2f7;
  color:#374151;
}

/* Active/paid accounts only */
.status-pill.active {
  background:#dcfce7;
  color:#166534;
  border-color:#bbf7d0;
}

/*
  Trial and warning states stay yellow.
  The !important flags intentionally override older inline/template rules like:
  .status-pill.active, .status-pill.trialing { background:#dcfce7; }
*/
.status-pill.trialing,
.status-pill.trial,
.status-pill.warning,
.status-pill.past_due,
.status-pill.incomplete,
.status-pill.paused {
  background:#fef3c7 !important;
  color:#92400e !important;
  border-color:#fde68a !important;
}

/* Failed/inactive states stay red */
.status-pill.unpaid,
.status-pill.canceled,
.status-pill.expired,
.status-pill.disabled,
.status-pill.incomplete_expired,
.status-pill.danger {
  background:#fee2e2 !important;
  color:#991b1b !important;
  border-color:#fecaca !important;
}

.muted-small {
  color:var(--muted);
  font-size:13px;
}

.button-row {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.pricing-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:16px;
}

.pricing-card {
  border:1px solid var(--line);
  border-radius:12px;
  padding:18px;
  background:#fff;
}

.price-line {
  font-weight:700;
}

