/* ============================================================
   CaveTools Billing — billing.css
   Page-specific styles layered on top of the shared styles.css
   brand tokens. Do not redefine brand colors here.
   ============================================================ */

/* ---------- Static nav (no mobile toggle on billing pages) ---------- */
.nav__links--static { display: flex !important; position: static; }

/* ---------- Layout ---------- */
.billing {
  min-height: calc(100vh - 84px);
  padding: 120px 0 80px;
  background:
    radial-gradient(700px 380px at 85% -10%, rgba(0, 82, 204, .08), transparent 60%),
    radial-gradient(560px 320px at 0% 110%, rgba(255, 122, 0, .07), transparent 60%),
    var(--grey-050);
}
.billing__inner { display: flex; justify-content: center; }

/* ---------- Card ---------- */
.bcard {
  width: 100%;
  max-width: 560px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.5rem 2.25rem;
  text-align: center;
}
.bcard__title { font-size: 1.7rem; margin: .35rem 0 .6rem; }
.bcard__muted { color: var(--grey); margin-bottom: 1.4rem; }
.bcard__fineprint { color: var(--grey); font-size: .82rem; margin-top: .9rem; }

/* ---------- Loading spinner ---------- */
.bcard__spinner {
  width: 42px; height: 42px;
  margin: 1rem auto 1.2rem;
  border-radius: 50%;
  border: 4px solid var(--blue-050);
  border-top-color: var(--blue);
  animation: bspin 0.9s linear infinite;
}
@keyframes bspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .bcard__spinner { animation: none; }
}

/* ---------- Summary rows ---------- */
.bsummary {
  margin: 1.6rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-align: left;
}
.bsummary__row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .85rem 1.1rem;
}
.bsummary__row + .bsummary__row { border-top: 1px solid var(--line); }
.bsummary__row dt { color: var(--grey); font-size: .88rem; font-weight: 600; }
.bsummary__row dd { font-weight: 700; }
.bsummary__row--price { background: var(--blue-050); }
.bsummary__row--price b { font-size: 1.35rem; color: var(--blue); }
.bsummary__row--price small { color: var(--grey); font-weight: 600; }

/* ---------- Terms checkbox ---------- */
.bterms { margin: 1.4rem 0 1.2rem; text-align: left; }
.bterms__check {
  display: flex; gap: .7rem; align-items: flex-start;
  font-size: .92rem; line-height: 1.5; cursor: pointer;
}
.bterms__check input {
  flex: none; width: 1.15rem; height: 1.15rem; margin-top: .15rem;
  accent-color: var(--blue); cursor: pointer;
}
.bterms__check a { color: var(--blue); font-weight: 700; text-decoration: underline; }
.bterms__version { color: var(--grey); font-size: .82rem; }

/* ---------- Slim footer ---------- */
.footer--slim { padding: 1.4rem 0; }
.footer--slim .footer__bottom { border-top: 0; padding-top: 0; }
.footer--slim a { text-decoration: underline; }

/* ---------- Legal / terms page ---------- */
.legal { padding: 120px 0 80px; }
.legal__inner { max-width: 760px; margin: 0 auto; }
.legal h1 { font-size: 2rem; margin-bottom: .4rem; }
.legal__meta { color: var(--grey); font-size: .9rem; margin-bottom: 2rem; }
.legal h2 {
  font-size: 1.18rem; margin: 2.2rem 0 .7rem;
  padding-top: 1.2rem; border-top: 1px solid var(--line);
}
.legal p, .legal li { color: var(--ink-700); font-size: .95rem; margin-bottom: .7rem; }
.legal ol.legal__clauses { list-style: none; }
.legal ol.legal__clauses > li { margin-bottom: .7rem; }
.legal ol.legal__sub { list-style: lower-alpha; margin: .4rem 0 .7rem 2rem; }
.legal ol.legal__sub > li { margin-bottom: .25rem; }
.legal b { color: var(--ink); }
.legal .legal__accept {
  margin-top: 2.4rem; padding: 1.2rem 1.4rem;
  background: var(--blue-050); border-radius: var(--radius-sm);
  font-size: .92rem;
}

@media (max-width: 560px) {
  .bcard { padding: 1.8rem 1.3rem; }
  .billing { padding-top: 104px; }
}

/* ---------- Admin console ---------- */
.admin__badge {
  background: var(--ink); color: #fff; font-size: .72rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .65rem; border-radius: 999px;
}
.admin__linklike {
  background: none; border: 0; color: var(--grey); font: inherit;
  font-size: .88rem; text-decoration: underline; cursor: pointer;
}

.admin { min-height: calc(100vh - 84px); padding: 120px 0 80px; background: var(--grey-050); }
.admin .container { max-width: 980px; }

.acard {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 2rem 2.1rem; margin-bottom: 1.8rem;
}
.acard--wide { padding-bottom: 1.4rem; }
.acard__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: .6rem; }
#gateCard { max-width: 460px; margin: 0 auto; text-align: center; }

.acard__form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.2rem; }
.acard__form--grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; text-align: left;
}
.acard__form--grid .field--full { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .acard__form--grid { grid-template-columns: 1fr; }
}

/* Reuses .field/.contact__form input styling defined in styles.css for the
   lead-generation form; keep field markup consistent with that pattern. */
.field { display: flex; flex-direction: column; gap: .4rem; text-align: left; }
.field label { font-size: .85rem; font-weight: 700; color: var(--ink-700); }
.field .opt { color: var(--grey); font-weight: 500; }
.field input, .field select, .field textarea {
  font: inherit; padding: .7rem .9rem; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); background: var(--white); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue);
}

.alinkbox {
  margin-top: 1.4rem; padding: 1rem 1.2rem; background: var(--blue-050);
  border-radius: var(--radius-sm); text-align: left;
}
.alinkbox__label { display: block; font-size: .85rem; color: var(--ink-700); margin-bottom: .5rem; }
.alinkbox__row { display: flex; gap: .6rem; }
.alinkbox__row input {
  flex: 1; font: inherit; font-size: .85rem; padding: .55rem .8rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--white);
}

.atable__wrap { overflow-x: auto; }
.atable { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: .6rem; }
.atable th {
  text-align: left; color: var(--grey); font-weight: 700; font-size: .78rem;
  letter-spacing: .03em; text-transform: uppercase;
  padding: .6rem .7rem; border-bottom: 2px solid var(--line); white-space: nowrap;
}
.atable td { padding: .7rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.atable__empty { color: var(--grey); text-align: center; padding: 1.6rem 0 !important; white-space: normal; }

.apill {
  display: inline-block; padding: .2rem .6rem; border-radius: 999px;
  font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
}
.apill--active { background: #e5f6ea; color: #1a7d3c; }
.apill--pending { background: var(--blue-050); color: var(--blue-600); }
.apill--cancelled { background: #f4f6f8; color: var(--grey); }
.apill--suspended { background: #fdecea; color: #b3261e; }

@media (max-width: 560px) {
  .acard { padding: 1.5rem 1.3rem; }
}
