/* ============================================================
   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; align-items: center; gap: 1rem; position: static;
}
.admin__menu-toggle { flex: none; }

/* ---------- 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[hidden] { display: none; }
.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; }

/* ---------- KYC details ---------- */
.bkyc { margin: 1.4rem 0; text-align: left; }
.bkyc__title { font-size: 1rem; margin: 0 0 .3rem; }
.bkyc__hint { margin-bottom: .9rem; font-size: .88rem; }

/* ---------- 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__user {
  color: var(--grey); font-size: .88rem; max-width: 260px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin__logout {
  align-items: center; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--ink); cursor: pointer; display: inline-flex;
  font: inherit; font-size: .88rem; font-weight: 700;
  line-height: 1.2; padding: .48rem .78rem; white-space: nowrap;
}
.admin__logout:hover {
  border-color: var(--blue); color: var(--blue);
}
.admin__nav-button {
  background: transparent; border: 0; color: var(--ink-700); cursor: pointer;
  font: inherit; font-size: .95rem; font-weight: 600; padding: 0;
}
.admin__nav-button:hover { color: var(--blue); }

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

.adash {
  display: grid; gap: 1.2rem; margin-bottom: 1.4rem;
}
.adash__head {
  align-items: flex-end; display: flex; gap: 1rem; justify-content: space-between;
}
.adash .bcard__title { margin-bottom: 0; }
.adash__grid {
  display: grid; gap: .85rem; grid-template-columns: minmax(0, 1fr) 280px;
}
.adash__stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem;
}
.astat {
  background: var(--white); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow-sm); color: inherit; cursor: pointer; font: inherit;
  min-height: 126px; padding: 1rem 1.1rem; text-align: left;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease);
}
.astat:hover,
.astat:focus-visible {
  border-color: var(--blue); box-shadow: var(--shadow-md); outline: none; transform: translateY(-1px);
}
.astat--primary {
  background: linear-gradient(135deg, var(--ink), var(--blue-600));
  border-color: transparent; color: var(--white); grid-row: span 2;
}
.astat--primary .astat__label,
.astat--primary .astat__meta { color: rgba(255, 255, 255, .76); }
.astat--primary strong { color: var(--white); font-size: clamp(1.9rem, 4vw, 3rem); }
.astat--primary .astat__meta { margin-top: 1.1rem; }
.astat--primary:hover,
.astat--primary:focus-visible {
  border-color: transparent;
}
.astat__label {
  display: block; color: var(--grey); font-size: .76rem; font-weight: 800;
  letter-spacing: .03em; line-height: 1.25; margin-bottom: .35rem; text-transform: uppercase;
}
.astat strong {
  display: block;  color: #FFD700; font-size: clamp(1.3rem, 2.6vw, 1.9rem); text-shadow: 0 0 8px rgba(255, 215, 0, 0.35);
  line-height: 1.1; overflow-wrap: anywhere;
}
.astat__meta {
  color: var(--grey); display: block; font-size: .82rem; font-weight: 700;
  line-height: 1.35; margin-top: .55rem;
}
.adash__side {
  align-self: stretch; background: var(--white); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  gap: 1rem; padding: 1rem;
}
.aqueue {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.aqueue__label {
  background: var(--grey-050); color: var(--grey); display: block; font-size: .72rem;
  font-weight: 800; letter-spacing: .04em; padding: .65rem .75rem; text-transform: uppercase;
}
.aqueue__row {
  align-items: center; background: var(--white); border: 0; border-top: 1px solid var(--line);
  color: var(--ink); cursor: pointer; display: flex; font: inherit; gap: .8rem;
  justify-content: space-between; padding: .8rem .75rem; text-align: left; width: 100%;
}
.aqueue__row:hover,
.aqueue__row:focus-visible {
  background: var(--blue-050); outline: none;
}
.aqueue__row span { color: var(--ink-700); font-size: .86rem; font-weight: 800; }
.aqueue__row strong { color: var(--blue); font-size: 1.05rem; }
.aquick {
  display: grid; gap: .6rem;
}
.aquick .btn { width: 100%; }
.adash-search {
  display: grid; gap: .7rem;
}
.adash-search__field {
  display: grid; gap: .35rem;
}
.adash-search__field span {
  color: var(--grey); font-size: .72rem; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase;
}
.adash-search__field input {
  background: var(--white); border: 1.5px solid var(--line); border-radius: 8px;
  color: var(--ink); font: inherit; font-size: .88rem; min-height: 40px;
  min-width: 0; padding: .55rem .75rem; width: 100%;
}
.adash-search__field input:focus {
  border-color: var(--blue); outline: none;
}
.adash-search__clear {
  background: transparent; border: 0; color: var(--blue); cursor: pointer;
  font: inherit; font-size: .82rem; font-weight: 800; justify-self: start; padding: .1rem 0;
}
.adash-search__clear:hover { color: var(--blue-600); }
.adash__refresh {
  color: var(--grey); font-size: .78rem; font-weight: 700; margin-top: auto;
}

.acard {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; 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; }
.admin-actions .acard__head { margin-bottom: 1rem; }
.admin-tabs {
  display: inline-grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem;
  background: var(--grey-050); border: 1px solid var(--line); border-radius: 8px;
  margin-bottom: 1.1rem; padding: .25rem;
}
.admin-tabs__button {
  background: transparent; border: 0; border-radius: 6px; color: var(--grey);
  cursor: pointer; font: inherit; font-size: .88rem; font-weight: 800;
  min-height: 40px; padding: .48rem .8rem; white-space: nowrap;
}
.admin-tabs__button:hover { color: var(--blue); }
.admin-tabs__button.is-active {
  background: var(--white); box-shadow: var(--shadow-sm); color: var(--ink);
}
.admin-panel[hidden] { display: none; }
.admin-modal[hidden] { display: none; }
.admin-modal {
  align-items: flex-start; background: rgba(13, 17, 23, .42); display: flex;
  inset: 0; justify-content: center; overflow-y: auto; padding: 96px 20px 36px;
  position: fixed; z-index: 80;
}
.admin-modal .admin-actions {
  margin: 0; max-width: 820px; width: min(100%, 820px);
}
.admin-modal__close {
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); cursor: pointer; flex: none; font: inherit; font-size: .85rem;
  font-weight: 800; min-height: 38px; padding: .45rem .85rem;
}
.admin-modal__close:hover {
  border-color: var(--blue); color: var(--blue);
}
.admin-modal-open { overflow: hidden; }
.afilters {
  display: inline-flex; gap: .35rem; margin: .2rem 0 .4rem;
  background: var(--grey-050); border: 1px solid var(--line); border-radius: 8px; padding: .25rem;
}
.afilters__button {
  background: transparent; border: 0; border-radius: 6px; color: var(--grey);
  cursor: pointer; font: inherit; font-size: .82rem; font-weight: 800;
  min-height: 34px; padding: .35rem .7rem;
}
.afilters__button:hover { color: var(--blue); }
.afilters__button.is-active {
  background: var(--white); box-shadow: var(--shadow-sm); color: var(--ink);
}
#loginCard,
#loadingCard,
#unauthorizedCard {
  max-width: 460px; margin: 0 auto; text-align: center;
}

#unauthorizedCard .btn {
  margin-top: 1.2rem;
}

.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; min-width: 0; width: 100%; 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; min-width: 0; font: inherit; font-size: .85rem; padding: .55rem .8rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--white);
}

.atable__wrap {
  margin: 0 -2.1rem; overflow-x: auto; padding: 0 2.1rem;
  -webkit-overflow-scrolling: touch;
}
.atable { width: 100%; min-width: 760px; 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; }
.atable__meta {
  color: var(--grey); font-size: .82rem; font-weight: 700; margin: .35rem 0 0;
}
.atable__group td {
  background: var(--grey-050); border-bottom: 1px solid var(--line); padding: 0;
}
.atable__group-button {
  align-items: center; background: transparent; border: 0; color: var(--ink);
  cursor: pointer; display: flex; font: inherit; font-size: .82rem; font-weight: 800;
  gap: .5rem; justify-content: flex-start; padding: .62rem .7rem; text-align: left; width: 100%;
}
.atable__group-button b {
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  color: var(--grey); font-size: .72rem; margin-left: .2rem; min-width: 1.8rem;
  padding: .04rem .45rem; text-align: center;
}
.atable__chevron {
  align-items: center; background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; color: var(--blue); display: inline-flex; flex: none;
  font-size: .9rem; height: 1.35rem; justify-content: center; line-height: 1; width: 1.35rem;
}

.apager {
  align-items: center; display: flex; gap: .75rem; justify-content: flex-end;
  margin-top: 1rem;
}
.apager span {
  color: var(--grey); font-size: .85rem; font-weight: 700; min-width: 86px; text-align: center;
}
.apager .btn:disabled {
  cursor: not-allowed; opacity: .5; transform: none;
}

.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: 820px) {
  .nav__inner {
    align-items: center; height: 72px; padding-top: 0; padding-bottom: 0;
  }
  .admin__menu-toggle[hidden] { display: none; }
  .admin__menu-toggle {
    display: flex; margin-left: auto;
  }
  .admin__menu-toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .admin__menu-toggle.is-open span:nth-child(2) { opacity: 0; }
  .admin__menu-toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .nav__links--admin {
    align-items: stretch; background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); flex-direction: column; gap: .75rem;
    inset: 72px 0 auto 0; padding: 1rem 16px 1.2rem; position: fixed;
    transform: translateY(-130%); transition: transform .25s var(--ease); width: 100%;
    z-index: 40;
  }
  .nav__links--admin.is-open { transform: translateY(0); }
  .admin__nav-button {
    border-radius: var(--radius-sm); min-height: 42px; padding: .5rem 0; text-align: left;
  }
  .admin { padding: 96px 0 56px; }
  .admin .container { padding: 0 16px; }
  .adash__grid { grid-template-columns: 1fr; }
  .adash__stats { grid-template-columns: repeat(2, 1fr); }
  .acard { border-radius: 12px; padding: 1.45rem 1.15rem; margin-bottom: 1rem; }
  .bcard__title { font-size: 1.35rem; }
  .bcard__muted { font-size: .92rem; }
  .admin__user {
    border-bottom: 1px solid var(--line); display: block; max-width: none;
    overflow-wrap: anywhere; padding: .2rem 0 .8rem; white-space: normal;
  }
  .admin__logout {
    align-self: stretch; background: var(--blue); border-color: transparent;
    color: var(--white); justify-content: center; min-height: 44px;
  }
  .admin__logout:hover {
    background: var(--blue-600); border-color: transparent; color: var(--white);
  }
  .brand__mark { display: block; }
}

@media (max-width: 560px) {
  .acard__head { align-items: flex-start; flex-direction: column; }
  .acard__head .btn { width: 100%; }
  .adash__head { align-items: stretch; flex-direction: column; }
  .adash__head .btn { width: 100%; }
  .adash__grid { grid-template-columns: 1fr; }
  .adash__stats { grid-template-columns: 1fr; }
  .astat,
  .astat--primary { grid-row: auto; min-height: 112px; }
  .admin-tabs { display: grid; width: 100%; }
  .admin-tabs__button { white-space: normal; }
  .afilters { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .adash-search__clear { justify-self: stretch; text-align: left; }
  .admin-modal { padding: 84px 12px 24px; }
  .admin-modal__close { width: 100%; }
  .acard__form { gap: .85rem; }
  .acard__form .btn { min-height: 44px; white-space: normal; }
  .alinkbox { padding: .85rem; }
  .alinkbox__row { flex-direction: column; }
  .atable__wrap { margin: 0; overflow: visible; padding: 0; }
  .atable { display: block; font-size: .86rem; min-width: 0; }
  .atable thead { display: none; }
  .atable tbody, .atable tr, .atable td { display: block; width: 100%; }
  .atable tr {
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    margin-top: .75rem; overflow: hidden; background: var(--white);
  }
  .atable .atable__group {
    border: 0; border-radius: 0; margin-top: .8rem; overflow: visible;
  }
  .atable__group td {
    border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
  }
  .atable__group td::before { content: none; }
  .atable__group td > * { max-width: none; }
  .atable td {
    align-items: flex-start; border-bottom: 1px solid var(--line);
    display: flex; gap: 1rem; justify-content: space-between;
    min-width: 0; overflow-wrap: anywhere; padding: .72rem .8rem; white-space: normal;
  }
  .atable td:last-child { border-bottom: 0; }
  .atable td::before {
    content: attr(data-label); color: var(--grey); flex: 0 0 42%;
    font-size: .74rem; font-weight: 800; letter-spacing: .03em;
    text-transform: uppercase;
  }
  .atable td > * { max-width: 58%; min-width: 0; }
  .atable .atable__group td {
    display: block;
  }
  .atable .atable__group td > * {
    max-width: none;
  }
  .atable td .btn { white-space: nowrap; }
  .atable__empty { border: 0 !important; display: block !important; }
  .atable__empty::before { content: none; }
  .apager { justify-content: stretch; }
  .apager .btn { flex: 1; min-width: 0; }
}

@media (max-width: 380px) {
  .brand__mark { width: 34px; height: 34px; }
  .brand__word { font-size: 1.08rem; }
  .admin .container { padding: 0 12px; }
  .acard { padding: 1.25rem .95rem; }
  .atable td { flex-direction: column; gap: .25rem; }
  .atable td::before { flex-basis: auto; }
  .atable td > * { max-width: 100%; }
}

/* ============================================================
   Collections: customer account page (pay.html), prepay tiers,
   and the collector's queue in the admin console.
   ============================================================ */

/* ---------- Prepay tiers (pay.html and the activation page) ---------- */
.bplan { margin: 1.4rem 0 0; text-align: left; }
.ptiers {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: .6rem; margin: .2rem 0 1.2rem;
}
.ptier {
  position: relative; display: flex; flex-direction: column; gap: .15rem; align-items: flex-start;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); cursor: pointer; font: inherit; padding: 1rem .8rem .8rem; text-align: left;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.ptier:hover { border-color: var(--blue); }
.ptier.is-selected { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-050); }
.ptier--best { border-color: var(--orange); }
.ptier__flag {
  position: absolute; top: -0.6rem; left: .7rem; background: var(--orange); border-radius: 999px;
  color: var(--white); font-size: .66rem; font-weight: 800; letter-spacing: .03em;
  padding: .12rem .5rem; text-transform: uppercase;
}
.ptier__months { color: var(--grey); font-size: .8rem; font-weight: 700; }
.ptier__price { font-size: 1.25rem; font-weight: 800; }
.ptier__was { color: #1a7d3c; font-size: .76rem; font-weight: 700; }
.ptier__was s { color: var(--grey); font-weight: 500; }
.ptier__until { color: var(--grey); font-size: .72rem; margin-top: .2rem; }

/* ---------- Account page ---------- */
.bcard--account { max-width: 640px; text-align: left; }
.bcard--account .bcard__title { margin-bottom: 1rem; }
.pstatus {
  display: flex; flex-direction: column; gap: .2rem; border-radius: var(--radius-sm);
  border-left: 5px solid #1a7d3c; background: #e5f6ea; padding: .9rem 1rem;
}
.pstatus strong { font-size: 1.15rem; }
.pstatus span { color: var(--ink-700); font-size: .92rem; }
.pstatus--late { background: #fdecea; border-left-color: #b3261e; }
.pstatus--due { background: #fff3e6; border-left-color: var(--orange); }
.pstatus--plain { background: var(--blue-050); border-left-color: var(--blue); }
.pnotice {
  background: var(--blue-050); border-radius: var(--radius-sm); color: var(--ink-700);
  font-size: .92rem; font-weight: 600; margin-top: .8rem; padding: .8rem 1rem;
}
.pnotice--done { background: #e5f6ea; color: #1a7d3c; }
.psection { font-size: 1.05rem; margin: 1.8rem 0 .3rem; }
.psection__hint { font-size: .9rem; margin-bottom: 1rem; }
.pown { background: var(--grey-050); border-radius: var(--radius-sm); margin-top: 1.6rem; padding: .9rem 1rem; }
.pown__head { display: flex; flex-wrap: wrap; gap: .3rem 1rem; justify-content: space-between; font-size: .88rem; }
.pown__head span { color: var(--blue); font-weight: 800; }
.pown__bar { background: var(--line); border-radius: 999px; height: 8px; margin-top: .6rem; overflow: hidden; }
.pown__bar span { background: var(--blue); border-radius: 999px; display: block; height: 100%; width: 0; }
.phistory { border: 1px solid var(--line); border-radius: var(--radius-sm); list-style: none; margin: 0; overflow: hidden; }
.phistory:empty { display: none; }
.phistory__row { align-items: center; display: flex; gap: 1rem; justify-content: space-between; padding: .7rem 1rem; }
.phistory__row + .phistory__row { border-top: 1px solid var(--line); }
.phistory__what { display: flex; flex-direction: column; }
.phistory__what b { font-size: .92rem; }
.phistory__what span { color: var(--grey); font-size: .8rem; }
.phistory__amount { font-weight: 800; white-space: nowrap; }
.phistory__row--gift .phistory__amount { color: #1a7d3c; }

/* ---------- Collector's queue ---------- */
.cq__tiles { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: .8rem 0 1rem; }
.cq__tile { background: var(--grey-050); border-radius: var(--radius-sm); padding: .7rem .9rem; }
.cq__tile span { color: var(--grey); display: block; font-size: .76rem; font-weight: 700; }
.cq__tile strong { font-size: 1.2rem; }
.cq__tile--late strong { color: #b3261e; }
.cq__note {
  background: #fff3e6; border-radius: var(--radius-sm); color: var(--ink-700);
  font-size: .86rem; font-weight: 600; margin-bottom: .8rem; padding: .7rem .9rem;
}
.cq__note[hidden] { display: none; }
.cq { display: flex; flex-direction: column; gap: .6rem; margin-top: .6rem; }
.cq__empty { color: var(--grey); padding: 1.4rem 0; text-align: center; }
.cq__row {
  align-items: center; border: 1px solid var(--line); border-left: 5px solid var(--line);
  border-radius: var(--radius-sm); display: grid; gap: .5rem 1rem;
  grid-template-columns: minmax(0, 1fr) auto; padding: .8rem 1rem;
}
.cq__row--late { border-left-color: #b3261e; }
.cq__row--due { border-left-color: var(--orange); }
.cq__row--ok { border-left-color: #1a7d3c; }
.cq__row--unset { border-left-color: var(--blue); }
.cq__name { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.cq__name b { font-size: 1rem; }
.cq__meta { color: var(--grey); font-size: .82rem; margin-top: .15rem; }
.cq__todo { color: #b3261e; font-size: .82rem; font-weight: 700; margin-top: .25rem; }
.cq__buttons { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.cq__owed { font-weight: 800; }
.apill--late { background: #fdecea; color: #b3261e; }
.apill--due { background: #fff3e6; color: #a85400; }
.apill--unset { background: var(--blue-050); color: var(--blue-600); }
@media (max-width: 640px) {
  .cq__row { grid-template-columns: 1fr; }
  .cq__buttons { justify-content: flex-start; }
}

/* ---------- Customer panel (collector) ---------- */
.admin-modal .cpanel { margin: 0; max-width: 820px; width: min(100%, 820px); }
.cpanel__facts { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: .4rem 0 1rem; }
.cpanel__actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .4rem; }
.cpanel__actions .btn.is-open { background: var(--blue-050); border-color: var(--blue); }
.cpanel__form { background: var(--grey-050); border-radius: var(--radius-sm); margin-top: .6rem; padding: 0 1rem 1rem; }
.cpanel__form[hidden] { display: none; }
.cpanel__form .acard__form { margin-top: 0; padding-top: 1rem; }
.cpanel__check { align-items: flex-start; display: flex; font-size: .86rem; gap: .5rem; }
.cpanel__check input { flex: none; height: 18px; margin-top: .15rem; width: 18px; }
.cpanel__hint { color: var(--grey); font-size: .8rem; }
.cpanel h3 { font-size: 1rem; margin: 1.6rem 0 .5rem; }
.cpanel .atable { min-width: 560px; }
.cpanel__log { list-style: none; margin: 0; }
.cpanel__log li { border-top: 1px solid var(--line); font-size: .86rem; padding: .55rem 0; }
.cpanel__log small { color: var(--grey); display: block; }
.btn--danger { background: #fff; border-color: #f3c4c0; color: #b3261e; }
.btn--danger:hover { background: #fdecea; border-color: #b3261e; }
.btn--whatsapp { background: #1a7d3c; border-color: #1a7d3c; color: #fff; }
.btn--whatsapp:hover { background: #156a32; }
.ctier { align-items: flex-end; display: grid; gap: .6rem; grid-template-columns: 1fr 1fr auto; margin-bottom: .6rem; }
