:root {
  --bg: #0f1420;
  --card: #171d2b;
  --border: #262f42;
  --text: #e8ecf4;
  --muted: #8b94ab;
  --accent: #4c8bf5;
  --accent-dark: #3a6fd0;
  --error: #f2545b;
  --success: #3ecf8e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 20px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
}

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

.card h1 { margin: 0 0 8px; font-size: 22px; }
.card h2 { margin: 0 0 14px; font-size: 17px; }

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

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 6px;
}

input[type="email"],
input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0d1220;
  color: var(--text);
  font-size: 16px;
}

input:focus { outline: 2px solid var(--accent); }

.primary-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.primary-btn:hover { background: var(--accent-dark); }
.primary-btn:disabled { opacity: .5; cursor: default; }

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 14px;
  cursor: pointer;
  padding: 10px 0;
}

.error {
  color: var(--error);
  font-size: 14px;
  margin-top: 10px;
}

.plans-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.plan-title { font-weight: 600; }
.plan-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(62, 207, 142, .15);
  color: var(--success);
  font-size: 12px;
}

.provider-btns { display: flex; gap: 8px; }

.provider-btn {
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.provider-btn:hover { background: rgba(76, 139, 245, .12); }

.link-box {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  font-family: monospace;
  font-size: 13px;
  word-break: break-all;
}

.link-box .copy-btn {
  flex-shrink: 0;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tab-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.tab-btn.active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(76, 139, 245, .12);
}

#instructions-body ol { padding-left: 20px; }
#instructions-body a { color: var(--accent); }

.status-active { color: var(--success); font-weight: 600; }
.status-inactive { color: var(--error); font-weight: 600; }

.agreement-text {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  white-space: pre-wrap;
}

.bonus-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.bonus-row:last-child { border-bottom: none; }
