/* LeadsHQ Billing — brand tokens from /brand/tokens.css (Elementor kit 5) */
:root {
  --lhq-primary:   #0153FF;
  --lhq-primary-h: #0040D6;
  --lhq-navy:      #000033;
  --lhq-deep-blue: #000066;
  --lhq-accent:    #FF6600;
  --lhq-text:      #0A071B;
  --lhq-surface:   #F5F5F5;
  --lhq-white:     #FFFFFF;

  --text-2:   #5a6275;
  --text-3:   #8e95a7;
  --border:   #e2e5eb;
  --page:     #f3f5f8;
  --glow:     rgba(1, 83, 255, 0.18);
  --ok:       #0fad5c;
  --ok-bg:    #e8fbf0;
  --bad:      #d61f35;
  --bad-bg:   #fef0f1;
  --warn:     #b85400;
  --warn-bg:  #fff3e8;

  --radius:   14px;
  --btn-r:    8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: var(--lhq-text);
  background: var(--page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 96px;
}

a { color: var(--lhq-primary); font-weight: 500; text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Navy band with the LeadsHQ triangle motif --- */
.band {
  position: absolute;
  inset: 0 0 auto 0;
  height: 280px;
  background: linear-gradient(160deg, var(--lhq-navy) 0%, #0a0a40 100%);
  overflow: hidden;
  display: flex;
  justify-content: center;
  padding-top: 40px;
}
.band-pattern {
  position: absolute;
  top: 0; right: 0;
  width: 320px; height: 240px;
  background:
    linear-gradient(135deg, transparent 50%, rgba(1,83,255,.16) 50%) no-repeat 0 0 / 80px 80px,
    linear-gradient(135deg, transparent 50%, rgba(1,83,255,.09) 50%) no-repeat 80px 0 / 80px 80px,
    linear-gradient(135deg, transparent 50%, rgba(1,83,255,.22) 50%) no-repeat 160px 0 / 80px 80px,
    linear-gradient(135deg, transparent 50%, rgba(1,83,255,.12) 50%) no-repeat 240px 0 / 80px 80px,
    linear-gradient(135deg, transparent 50%, rgba(1,83,255,.18) 50%) no-repeat 120px 80px / 80px 80px,
    linear-gradient(135deg, transparent 50%, rgba(1,83,255,.08) 50%) no-repeat 200px 80px / 80px 80px,
    linear-gradient(135deg, transparent 50%, rgba(1,83,255,.14) 50%) no-repeat 240px 160px / 80px 80px;
  pointer-events: none;
}
.logo { position: relative; z-index: 1; display: block; height: 30px; }
.logo img { height: 30px; width: auto; display: block; }

/* --- Card --- */
.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  margin-top: 112px;
  background: var(--lhq-white);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px rgba(0,0,51,.04), 0 24px 60px rgba(0,0,51,.12);
  padding: 40px 40px 36px;
  animation: in .5s cubic-bezier(.22,1,.36,1);
}
@keyframes in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lhq-primary);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

h1 {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--lhq-navy);
  margin-bottom: 12px;
  text-wrap: balance;
}

.lead { color: var(--text-2); font-size: 15.5px; margin-bottom: 24px; text-wrap: pretty; }
.lead + .lead { margin-top: -12px; }
.muted { color: var(--text-3); font-size: 13.5px; }
.mono { font-variant-numeric: tabular-nums; font-weight: 500; letter-spacing: .04em; }
.center { text-align: center; }

/* --- Status icon --- */
.icon-badge {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.icon-badge .i { width: 26px; height: 26px; stroke-width: 2.4; }
.icon-badge.ok   { background: var(--ok-bg);   color: var(--ok); }
.icon-badge.warn { background: var(--warn-bg); color: var(--warn); }
.pop { animation: pop .45s cubic-bezier(.34,1.56,.64,1) .1s both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* --- Panel (card on file / invoices) --- */
.panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 24px;
  overflow: hidden;
}
.panel-row { padding: 14px 18px; }
.panel-row + .panel-row { border-top: 1px solid var(--border); }
.panel-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}
.card-line, .invoice-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 15px;
}
.amount { font-size: 20px; font-weight: 600; color: var(--lhq-navy); font-variant-numeric: tabular-nums; }

.brand-chip {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--lhq-surface);
  color: var(--lhq-navy);
  border: 1px solid var(--border);
}
.brand-visa       { background: #1a1f71; color: #fff; border-color: #1a1f71; }
.brand-mastercard { background: #fff4e5; color: #c25100; border-color: #ffd9b3; }
.brand-amex       { background: #e6f2ff; color: #0067b8; border-color: #b8dbff; }

.tag {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 99px;
  white-space: nowrap;
}
.tag-bad     { background: var(--bad-bg);  color: var(--bad); }
.tag-warn    { background: var(--warn-bg); color: var(--warn); }
.tag-ok      { background: var(--ok-bg);   color: var(--ok); }
.tag-neutral { background: var(--lhq-surface); color: var(--text-2); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 16px 26px;
  border-radius: var(--btn-r);
  border: 0;
  cursor: pointer;
  text-decoration: none !important;
  transition: background .15s, box-shadow .15s, transform .1s;
}
.btn .i { width: 19px; height: 19px; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--glow); }
.btn-primary { background: var(--lhq-primary); color: #fff; }
.btn-primary:hover { background: var(--lhq-primary-h); }
.btn-secondary { background: #fff; color: var(--lhq-navy); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--lhq-primary); color: var(--lhq-primary); }
.btn-link { background: none; color: var(--text-2); padding: 16px 8px; font-weight: 500; }
.btn-link:hover { color: var(--lhq-primary); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn-secondary.is-loading::after { border-color: rgba(0,0,51,.2); border-top-color: var(--lhq-navy); }
@keyframes spin { to { transform: rotate(360deg); } }

.fine { font-size: 12.5px; color: var(--text-3); margin-top: 10px; }

.divider {
  display: flex; align-items: center; gap: 14px;
  margin: 26px 0 16px;
  color: var(--text-3); font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.alt { text-align: center; font-size: 14px; color: var(--text-2); }
.alt a { display: inline-block; }

.pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(160deg, var(--lhq-navy), #0a0a40);
  color: #fff;
}
.pay-row .panel-label { color: rgba(255,255,255,.6); }
.pay-row .amount { color: #fff; }
.pay-row + .fine { margin-bottom: 20px; }

.banner { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 20px; font-weight: 400; }
.banner-bad { background: var(--bad-bg); color: var(--bad); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 4px; }
.actions form { display: contents; }

/* --- Footer --- */
.foot {
  max-width: 520px;
  width: 100%;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 24px;
}
.foot p + p { margin-top: 6px; }
.secure { text-wrap: balance; }
.secure .i { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }

/* --- Demo bar (DEMO_MODE only) --- */
.demo-bar {
  position: fixed;
  left: 50%; bottom: 16px;
  transform: translateX(-50%);
  z-index: 10;
  display: flex; align-items: center; gap: 4px;
  background: var(--lhq-navy);
  color: #fff;
  padding: 6px;
  border-radius: 99px;
  font-size: 12.5px;
  box-shadow: 0 10px 30px rgba(0,0,51,.3);
  max-width: calc(100vw - 32px);
  overflow-x: auto;
}
.demo-bar strong { padding: 0 10px; color: var(--lhq-accent); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.demo-bar a { color: rgba(255,255,255,.75); padding: 6px 12px; border-radius: 99px; white-space: nowrap; font-weight: 500; }
.demo-bar a:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.08); }
.demo-bar a.on { background: var(--lhq-primary); color: #fff; }

@media (max-width: 560px) {
  .band { height: 220px; padding-top: 28px; }
  .band-pattern { width: 200px; opacity: .8; }
  .card { margin-top: 84px; padding: 28px 22px 26px; }
  h1 { font-size: 24px; }
  .pay-row { flex-direction: column; align-items: stretch; }
  .pay-row .btn { width: 100%; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; }
}

/* ======================================================================== */
/* Sign-up checkout                                                          */
/* ======================================================================== */

.card-wide { max-width: 760px; }
.foot { max-width: 760px; }

.steps { display: flex; justify-content: center; gap: 8px; list-style: none; margin: -6px 0 28px; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.steps li + li::before { content: ""; width: 28px; height: 2px; background: var(--border); border-radius: 2px; margin-right: 4px; }
.steps li span {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--border); font-size: 12px; font-weight: 600; background: #fff;
}
.steps li.on { color: var(--lhq-primary); font-weight: 600; }
.steps li.on span { background: var(--lhq-primary); border-color: var(--lhq-primary); color: #fff; box-shadow: 0 0 0 4px var(--glow); }
.steps li.done { color: var(--ok); }
.steps li.done span { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.done + li::before, .steps li.on::before { background: var(--ok); }
.steps li.on::before { background: var(--ok); }
.steps li:first-child::before { display: none; }

.plan {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--lhq-navy), #0a0a40);
  color: #fff; border-radius: 14px; padding: 24px 24px 20px; margin-bottom: 18px;
}
.plan-pattern {
  position: absolute; top: 0; right: 0; width: 160px; height: 120px; pointer-events: none;
  background:
    linear-gradient(135deg, transparent 50%, rgba(1,83,255,.28) 50%) no-repeat 0 0 / 40px 40px,
    linear-gradient(135deg, transparent 50%, rgba(1,83,255,.14) 50%) no-repeat 40px 0 / 40px 40px,
    linear-gradient(135deg, transparent 50%, rgba(1,83,255,.34) 50%) no-repeat 80px 0 / 40px 40px,
    linear-gradient(135deg, transparent 50%, rgba(1,83,255,.18) 50%) no-repeat 120px 0 / 40px 40px,
    linear-gradient(135deg, transparent 50%, rgba(1,83,255,.22) 50%) no-repeat 80px 40px / 40px 40px,
    linear-gradient(135deg, transparent 50%, rgba(1,83,255,.12) 50%) no-repeat 120px 40px / 40px 40px,
    linear-gradient(135deg, transparent 50%, rgba(1,83,255,.2) 50%) no-repeat 120px 80px / 40px 40px;
}
.plan-eyebrow { position: relative; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #7fa6ff; }
.plan-total { position: relative; font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 14px; font-variant-numeric: tabular-nums; }
.plan-total span { font-size: 13px; font-weight: 400; color: rgba(255,255,255,.65); letter-spacing: 0; }
.plan-lines { position: relative; border-top: 1px solid rgba(255,255,255,.14); padding-top: 12px; font-size: 14px; }
.plan-lines div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.plan-lines dt { color: rgba(255,255,255,.75); }
.plan-lines dd { font-variant-numeric: tabular-nums; font-weight: 500; }
.plan-note { position: relative; margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,.6); }

.plan-mini {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--lhq-surface); border-radius: 10px; padding: 12px 16px; margin: 4px 0 20px; font-size: 14px;
}
.plan-mini strong { font-size: 17px; color: var(--lhq-navy); font-variant-numeric: tabular-nums; }

.pe { min-height: 210px; margin-bottom: 18px; }
.pe-loading { color: var(--text-3); font-size: 13px; padding: 24px 0; text-align: center; }

.agree { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.55; color: var(--text-2); margin-bottom: 18px; cursor: pointer; }
.agree input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--lhq-primary); }

.panel-row > div:not(.panel-label):not(.invoice-line) { font-size: 14.5px; }

/* ======================================================================== */
/* Admin form                                                                */
/* ======================================================================== */

.form { display: grid; gap: 20px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--lhq-navy); }
.field em { font-style: normal; font-weight: 400; color: var(--text-3); }
.input {
  font: inherit; font-size: 15px; font-weight: 400; color: var(--lhq-text);
  border: 1.5px solid var(--border); border-radius: 8px; padding: 11px 13px; background: #fff; width: 100%;
}
.input:focus { outline: none; border-color: var(--lhq-primary); box-shadow: 0 0 0 4px var(--glow); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%235a6275' stroke-width='2'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.prefix { position: relative; }
.prefix em { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 15px; }
.prefix .input { padding-left: 26px; }
.field-err { color: var(--bad); font-size: 12px; font-weight: 400; }
.total-box { background: var(--lhq-surface); border-radius: 10px; padding: 12px 14px; justify-content: center; }
.total-box strong { font-size: 24px; color: var(--lhq-navy); font-variant-numeric: tabular-nums; }
.total-box small { font-size: 12px; color: var(--text-2); font-weight: 400; }
.more summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 12px; }
.form > .btn { justify-self: start; }

.made { border: 1.5px solid var(--ok); background: var(--ok-bg); border-radius: 12px; padding: 16px; margin-bottom: 24px; }
.copy-row { display: flex; gap: 8px; margin: 6px 0 2px; }
.copy-row .input { font-size: 12.5px; }
.copy-row .btn { padding: 12px 18px; }

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .steps li { font-size: 0; gap: 0; }
  .steps li + li::before { width: 22px; margin: 0 6px 0 0; }
  .plan-total { font-size: 28px; }
  .copy-row { flex-direction: column; }
}
