/* CloudPacker billing. Red and black design system, matches the landing page. */
:root {
  --bg: #0d0f12; --bg-alt: #111419; --surface: #14171d; --surface-2: #171b22;
  --border: #262b33; --border-strong: #3a414d;
  --text: #e8eaed; --muted: #98a2b3;
  --accent: #e5484d; --accent-hover: #f2555a; --accent-soft: rgba(229, 72, 77, 0.10);
  --ok: #3dd68c; --down: #f2555a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.45);
  --code-bg: #0a0c0f; --code-border: #222832;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6; font-size: 16px;
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; width: 100%; padding: 56px 24px; }
main.narrow { max-width: 720px; }
.container { max-width: 1120px; margin: 0 auto; }
a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; background: var(--code-bg); border: 1px solid var(--code-border); border-radius: 5px; padding: 1px 7px; font-size: 0.86em; }
h1 { letter-spacing: -0.015em; font-size: 1.9rem; }
h2 { font-size: 1.15rem; margin: 44px 0 14px; }
.sub { color: var(--muted); margin: 12px 0 36px; max-width: 620px; }
.muted { color: var(--muted); }
.note { font-size: 0.88rem; color: var(--muted); margin-top: 16px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; padding: 11px 20px;
  font-family: inherit; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #ffffff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 8px 22px rgba(229, 72, 77, 0.25); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: #556070; background: var(--surface); }
.btn-small { padding: 8px 14px; font-size: 0.88rem; }
.btn:disabled { opacity: 0.55; cursor: wait; transform: none; }

/* nav */
.nav { border-bottom: 1px solid var(--border); background: rgba(13, 15, 18, 0.92); }
.nav-inner { display: flex; align-items: center; height: 64px; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 11px; height: 11px; background: var(--accent); border-radius: 2px; flex: 0 0 auto; }
.crumb {
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); background: var(--bg-alt); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 5px;
}
.nav-links { margin-left: auto; display: flex; gap: 22px; }
.nav-links a { color: var(--muted); font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* plan cards */
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.plan-option input { position: absolute; opacity: 0; }
.plan-box {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 22px; cursor: pointer; height: 100%;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.plan-box:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.plan-option input:checked + .plan-box { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 28px rgba(229, 72, 77, 0.12); }
.plan-option input:checked + .plan-box:hover { transform: translateY(-2px); }
.plan-option input:focus-visible + .plan-box { outline: 2px solid var(--accent-soft); }
.plan-name { font-weight: 700; font-size: 1.05rem; }
.plan-amount { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; }
.plan-amount span { font-size: 0.9rem; font-weight: 500; color: var(--muted); margin-left: 4px; }
.plan-desc { color: var(--muted); font-size: 0.9rem; }

/* checkout row */
.checkout-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 260px; }
.field label { font-size: 0.88rem; font-weight: 600; }
.field input {
  height: 44px; border: 1px solid var(--border-strong); border-radius: 6px;
  padding: 0 14px; font-size: 0.95rem; color: var(--text);
  outline: none; font-family: inherit; background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder { color: #6b7686; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.checkout-row .btn { height: 44px; }
.field-note { color: var(--muted); font-size: 0.85rem; margin-top: 12px; }

.msg { margin-top: 18px; font-weight: 500; }
.msg.err { color: var(--down); }
.msg.ok { color: var(--ok); }

/* payment steps */
.how { margin-top: 48px; max-width: 620px; }
.how ol { padding-left: 20px; color: var(--muted); }
.how li { margin: 8px 0; }

/* success page */
.status-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 44px; text-align: center;
  box-shadow: var(--shadow-md);
}
.spinner {
  width: 36px; height: 36px; margin: 0 auto 18px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.license-label {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem;
  font-weight: 600; color: var(--muted); margin-top: 22px;
}
.license-row {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  margin: 12px 0 4px;
}
.license-row code {
  font-size: 1.3rem; font-weight: 700; letter-spacing: 0.06em;
  background: var(--code-bg); border: 1px dashed var(--accent);
  color: #f2b8ba; padding: 10px 18px; border-radius: 8px;
}
.fail { color: var(--down); margin: 16px 0 22px; }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 20px 0; background: var(--bg); }
.footer .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.85rem; }

@media (max-width: 760px) {
  .plan-grid { grid-template-columns: 1fr; }
  .checkout-row { flex-direction: column; align-items: stretch; }
  .nav-links { display: none; }
}
