/* ==========================================================================
   NOVE payment pages  ·  checkout, method choice, agent, USDT, crypto,
   mobile money, result pages and the payment agent's desk.

   Visual language taken from the NOVE x Kings "Sunday Class" poster:
   warm paper ground, heavy tight Poppins headlines, white cards with soft
   depth, the black bar with a lime label over one big white figure, red and
   lime pills, tinted icon tiles, gold bars and a green rising line.
   Everything is scoped under .pay (client pages), .desk (agent desk) or
   .agx (the owner's agent control room), so no other page changes.
   ========================================================================== */

/* .agx: the owner's agent control room inside the CRM (NF-376) */
.pay, .desk, .agx {
  --p-paper: #f4f3ef;
  --p-paper-2: #ecebe5;
  --p-card: #ffffff;
  --p-ink: #111111;
  --p-ink-2: #2f2f2f;
  --p-grey: #6b6b6b;
  --p-grey-2: #9a9a9a;
  --p-line: #e6e3db;
  --p-line-2: #d9d5ca;
  --p-red: var(--brand, #ec1c24);
  --p-red-soft: #fde8ea;
  --p-lime: var(--yellow, #efff04);
  --p-green: #16a34a;
  --p-green-soft: #e3f5ea;
  --p-gold: #c8961e;
  --p-cream: #fbf1d4;
  --p-amber: #8a5a00;
  --p-amber-soft: #fff4d6;
  --p-r: 16px;
  --p-r-sm: 12px;
  --p-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 20px 34px -26px rgba(17, 17, 17, .34), 0 6px 14px -10px rgba(17, 17, 17, .12);
  --p-shadow-sm: 0 8px 16px -12px rgba(17, 17, 17, .3);
  --p-ease: cubic-bezier(.22, 1, .36, 1);
  font-family: var(--font-head);
  font-size: .9rem;
  color: var(--p-ink);
}

/* an author display rule must never beat the hidden attribute */
.pay [hidden], .desk [hidden] { display: none !important; }

/* ---- ground ---------------------------------------------------------- */
.pay {
  position: relative;
  padding: clamp(.9rem, 2vw, 1.7rem) 0 clamp(1.6rem, 3vw, 2.6rem);
  background:
    radial-gradient(60rem 26rem at 78% -6%, rgba(255, 216, 107, .28), transparent 60%),
    radial-gradient(40rem 22rem at -10% 30%, rgba(236, 28, 36, .05), transparent 60%),
    var(--p-paper);
  overflow: hidden;
}
.pay::after {               /* the poster's floor line */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 32%;
  background: linear-gradient(180deg, rgba(0, 0, 0, .025), rgba(0, 0, 0, 0));
  border-top: 1px solid rgba(0, 0, 0, .04);
  pointer-events: none;
}

.pay-wrap {
  position: relative; z-index: 1;
  width: 100%; max-width: 940px; margin: 0 auto; padding: 0 16px;
  display: grid; gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "hero" "side" "main";
}
.pay-wrap--solo { max-width: 600px; grid-template-areas: "hero" "main"; }
.pay-wrap--main-first { grid-template-areas: "hero" "main" "side"; }
.pay-hero { grid-area: hero; }
.pay-main { grid-area: main; min-width: 0; display: grid; gap: 11px; align-content: start; }
.pay-side { grid-area: side; min-width: 0; display: grid; gap: 11px; align-content: start; }
@media (min-width: 860px) {
  .pay-wrap { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "hero side" "main side"; column-gap: 28px; row-gap: 12px; padding: 0 20px; }
  .pay-wrap--wide-side { grid-template-columns: minmax(0, 1fr) 340px; }
  .pay-wrap--solo { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "main"; }
  .pay-side { grid-row: 1 / span 2; position: sticky; top: 84px; align-self: start; }
  .pay-wrap--wide-side .pay-side { position: static; }   /* a long form must scroll with the page */
}

/* ---- hero ------------------------------------------------------------ */
.pay-tag {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--p-red); color: #fff;
  font: 700 .66rem/1 var(--font-head); letter-spacing: .16em; text-transform: uppercase;
  padding: .4rem .72rem .38rem; border-radius: 999px;
  box-shadow: 0 6px 12px -8px rgba(236, 28, 36, .7);
}
.pay-tag--lime { background: var(--p-lime); color: var(--p-ink); box-shadow: 0 10px 20px -14px rgba(120, 140, 0, .9); }
.pay-tag--ink { background: var(--p-ink); color: var(--p-lime); box-shadow: none; }
.pay-tag--soft { background: #fff; color: var(--p-ink); border: 1px solid var(--p-line); box-shadow: none; }
.pay-tag .pi { width: 1.05em; height: 1.05em; }
.pay-title {
  font: 800 clamp(1.35rem, 2.8vw, 1.85rem)/1.08 var(--font-head);
  letter-spacing: -.035em; margin: .55rem 0 .3rem; color: var(--p-ink);
  text-wrap: balance;
}
.pay-title--md { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.pay-lede { font: 400 .9rem/1.45 var(--font-head); color: var(--p-grey); margin: 0; letter-spacing: -.01em; }
.pay-lede strong { color: var(--p-ink-2); font-weight: 700; }
.pay-hero-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .6rem; }

/* ---- cards ----------------------------------------------------------- */
.pay-card {
  position: relative;
  background: var(--p-card); border: 1px solid var(--p-line);
  border-radius: var(--p-r); padding: clamp(.85rem, 2vw, 1.05rem);
  box-shadow: var(--p-shadow);
}
.pay-card--flat { box-shadow: none; background: rgba(255, 255, 255, .65); }
.pay-card h3, .pay-card .pay-h { font: 700 .95rem/1.3 var(--font-head); letter-spacing: -.015em; margin: 0 0 .35rem; color: var(--p-ink); }
.pay-card p { color: var(--p-ink-2); }
.pay-card .muted, .pay .muted { color: var(--p-grey); }
.pay-card hr { border: 0; border-top: 1px dashed var(--p-line-2); margin: .8rem 0; }
.pay-sep { border: 0; border-top: 1px dashed var(--p-line-2); margin: .8rem 0; }
.pay .small { font-size: .82rem; }
.pay .tiny { font-size: .74rem; }

/* step headings: icon tile + heavy title */
.pay-step { display: flex; align-items: center; gap: .55rem; margin: .3rem 0 0; }
.pay-step h2 { font: 800 1.02rem/1.2 var(--font-head); letter-spacing: -.02em; margin: 0; color: var(--p-ink); }

/* ---- tiles (the poster's icon squares) -------------------------------- */
.pay-tile {
  flex: 0 0 auto; display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--p-paper); color: var(--p-ink);
}
.pay-tile .pi { width: 15px; height: 15px; }
.pay-tile--pink { background: var(--p-red-soft); color: var(--p-red); }
.pay-tile--mint { background: var(--p-green-soft); color: var(--p-green); }
.pay-tile--cream { background: var(--p-cream); color: var(--p-gold); }
.pay-tile--ink { background: var(--p-ink); color: var(--p-lime); }
.pay-tile--lime { background: var(--p-lime); color: var(--p-ink); }
.pay-tile--paper { background: var(--p-paper); color: var(--p-ink); border: 1px solid var(--p-line); }
.pi { width: 1.1em; height: 1.1em; flex: 0 0 auto; }

/* ---- the ticket: scene on top, black bar below ------------------------ */
.pay-ticket { border-radius: var(--p-r); overflow: hidden; background: var(--p-card); border: 1px solid var(--p-line); box-shadow: var(--p-shadow); }
.pay-scene {
  position: relative; height: 92px;
  background: radial-gradient(18rem 10rem at 50% 55%, rgba(255, 220, 120, .45), transparent 70%), linear-gradient(180deg, #faf9f6, var(--p-paper));
}
.pay-scene-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.pay-bar {
  position: relative; background: var(--p-ink); color: #fff;
  padding: .75rem .9rem .8rem; border-radius: 0;
}
.pay-ticket .pay-bar { border-radius: 0; }
.pay-bar--round { border-radius: var(--p-r); box-shadow: var(--p-shadow); }
.pay-bar-label { font: 600 .66rem/1.2 var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: var(--p-lime); }
.pay-bar-value {
  font: 800 clamp(1.3rem, 3.6vw, 1.55rem)/1.1 var(--font-head); letter-spacing: -.03em;
  margin-top: .2rem; color: #fff; font-variant-numeric: tabular-nums; word-break: break-word;
}
.pay-bar-value--md { font-size: 1.15rem; }
.pay-bar-note { margin: .35rem 0 0; font: 400 .76rem/1.45 var(--font-head); color: rgba(255, 255, 255, .72); }
.pay-bar-note strong { color: #fff; font-weight: 600; }
.pay-bar-note .hl { color: var(--p-lime); font-weight: 600; }
.pay-bar-tools { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.pay-bar .pay-chip { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .18); }
.pay-bar .pay-chip:hover { background: var(--p-lime); color: var(--p-ink); border-color: var(--p-lime); }
.pay-bar-badge {
  display: inline-flex; align-items: center; gap: .3rem; margin-bottom: .5rem;
  background: rgba(239, 255, 4, .12); color: var(--p-lime); border: 1px solid rgba(239, 255, 4, .35);
  font: 600 .66rem/1 var(--font-head); padding: .3rem .55rem; border-radius: 999px;
}

/* ---- lists with tiles ("Pia tutachambua") ------------------------------- */
.pay-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.pay-list li { display: flex; gap: .6rem; align-items: flex-start; }
.pay-list .pay-tile { width: 28px; height: 28px; border-radius: 8px; }
.pay-list .pay-tile .pi { width: 14px; height: 14px; }
.pay-list p, .pay-list span.t { margin: 0; font: 600 .82rem/1.45 var(--font-head); color: var(--p-ink); letter-spacing: -.005em; padding-top: .2rem; }
.pay-list p.light { font-weight: 400; color: var(--p-ink-2); }
.pay-list a { color: var(--p-ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--p-lime); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.pay-list-title { font: 600 .8rem/1 var(--font-head); color: var(--p-grey); margin: 0 0 .6rem; }

/* ---- key / value rows ------------------------------------------------- */
.pay-rows { list-style: none; margin: 0; padding: 0; }
.pay-rows li { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; padding: .48rem 0; border-bottom: 1px dashed var(--p-line-2); }
.pay-rows li:last-child { border-bottom: 0; }
.pay-rows .k { color: var(--p-grey); font-size: .8rem; }
.pay-rows .v { font-size: .86rem; font-weight: 600; text-align: right; word-break: break-word; }
.pay-rows .v.big { font: 800 1rem/1.1 var(--font-head); letter-spacing: -.02em; }
.pay .mono, .desk .mono { font-family: var(--font-head); font-variant-numeric: tabular-nums; letter-spacing: -.005em; }

/* ---- alert bubble (the poster's ALERT card) ---------------------------- */
.pay-alert {
  position: relative; display: flex; gap: .6rem; align-items: flex-start;
  background: #fff; border: 1.5px solid #f5c6cb; border-radius: 14px;
  padding: .6rem .75rem; box-shadow: var(--p-shadow-sm); margin-top: .65rem; font-size: .84rem;
}
.pay-alert::after {
  content: ""; position: absolute; left: 28px; bottom: -7px; width: 12px; height: 12px;
  background: #fff; border-right: 1.5px solid #f5c6cb; border-bottom: 1.5px solid #f5c6cb;
  transform: rotate(45deg); border-bottom-right-radius: 3px;
}
.pay-alert--flat::after { display: none; }
.pay-alert .pay-alert-icon { position: relative; flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; color: var(--p-red); }
.pay-alert .pay-alert-icon .pi { width: 19px; height: 19px; }
.pay-alert .pay-alert-icon::before, .pay-alert .pay-alert-icon::after {
  content: ""; position: absolute; inset: 2px; border-radius: 50%; border: 1.5px solid rgba(236, 28, 36, .35);
  animation: pay-ring 2.2s var(--p-ease) infinite;
}
.pay-alert .pay-alert-icon::after { animation-delay: 1.1s; }
.pay-alert p { margin: 0; }
.pay-alert strong { font-weight: 700; color: var(--p-ink); }
.pay-alert .name { display: block; margin-top: .15rem; font: 800 .95rem/1.25 var(--font-head); letter-spacing: -.02em; color: var(--p-ink); }
.pay-alert--warn { border-color: #f1d79a; }
.pay-alert--warn::after { border-color: #f1d79a; }
.pay-alert--warn .pay-alert-icon { color: var(--p-amber); }
.pay-alert--warn .pay-alert-icon::before, .pay-alert--warn .pay-alert-icon::after { border-color: rgba(200, 150, 30, .4); }

/* ---- notes ------------------------------------------------------------ */
.pay-note { display: flex; gap: .55rem; align-items: flex-start; background: var(--p-paper); border: 1px solid var(--p-line); border-radius: var(--p-r-sm); padding: .6rem .7rem; margin-top: .65rem; }
.pay-note p { margin: 0; font-size: .8rem; line-height: 1.55; color: var(--p-ink-2); }
.pay-note .pay-tile { width: 26px; height: 26px; border-radius: 8px; }
.pay-note .pay-tile .pi { width: 13px; height: 13px; }
.pay-note--stack { display: block; }
.pay-note--warn { background: var(--p-amber-soft); border-color: #f1d79a; }
.pay-note--warn p { color: #5c3d00; }
.pay-note--good { background: var(--p-green-soft); border-color: #bfe6cc; }
.pay-note--bad { background: var(--p-red-soft); border-color: #f5c6cb; }
.pay-note a { color: var(--p-ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--p-red); text-underline-offset: 3px; }

/* ---- status pills ----------------------------------------------------- */
.pay-status {
  display: inline-flex; align-items: center; gap: .4rem;
  font: 700 .7rem/1 var(--font-head); letter-spacing: .02em;
  padding: .38rem .65rem .38rem .55rem; border-radius: 999px;
  background: var(--p-amber-soft); color: var(--p-amber); border: 1px solid #f1d79a;
}
.pay-status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 0 currentColor; animation: pay-dot 1.6s ease-out infinite;
}
.pay-status--good { background: var(--p-green-soft); color: var(--p-green); border-color: #bfe6cc; }
.pay-status--bad { background: var(--p-red-soft); color: var(--p-red); border-color: #f5c6cb; }
.pay-status--still::before { animation: none; }
.pay-status--neutral { background: var(--p-paper); color: var(--p-ink-2); border-color: var(--p-line); }

/* ---- forms ------------------------------------------------------------- */
.pay .field { margin-bottom: .75rem; }
.pay .field > label, .pay .pay-label { display: block; font: 600 .8rem/1.3 var(--font-head); color: var(--p-ink); margin-bottom: .3rem; letter-spacing: -.005em; }
.pay .input {
  width: 100%; min-height: 40px; padding: .5rem .8rem;
  font: 500 .9rem/1.3 var(--font-head); color: var(--p-ink);
  background: #fff; border: 1.5px solid var(--p-line-2); border-radius: 11px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.pay .input::placeholder { color: var(--p-grey-2); font-weight: 400; }
.pay .input:hover { border-color: #c4bfb1; }
.pay .input:focus { outline: none; border-color: var(--p-ink); box-shadow: 0 0 0 3px rgba(239, 255, 4, .55); }
.pay select.input { appearance: none; -webkit-appearance: none; padding-right: 2.2rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .75rem center / 14px; }
.pay input[type=file].input { min-height: 0; padding: .5rem; font-size: .8rem; background: var(--p-paper); border-style: dashed; cursor: pointer; }
.pay .tiny.dim, .pay .field .tiny { color: var(--p-grey); font-size: .74rem; line-height: 1.45; margin-top: .3rem; }
.pay .check { display: flex; gap: .5rem; align-items: flex-start; font-size: .8rem; line-height: 1.5; color: var(--p-ink-2); }
.pay .check input { width: 16px; height: 16px; margin-top: .1rem; accent-color: var(--p-ink); flex: 0 0 auto; }

/* ---- buttons ----------------------------------------------------------- */
.pay .btn, .desk .btn {
  border-radius: 999px; font-family: var(--font-head); font-weight: 700; letter-spacing: -.005em;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  transition: transform .2s var(--p-ease), background .2s, color .2s, box-shadow .2s, border-color .2s;
}
.pay .btn { padding: .5rem 1rem; font-size: .82rem; }
.pay .btn-lg { padding: .62rem 1.2rem; font-size: .9rem; min-height: 42px; }
.pay .btn-primary {
  position: relative; overflow: hidden;
  background: var(--p-lime); border-color: var(--p-lime); color: var(--p-ink);
  box-shadow: 0 10px 18px -12px rgba(90, 100, 0, .9), 0 0 0 1px rgba(0, 0, 0, .04) inset;
}
.pay .btn-primary::after {     /* a slow sheen, like the gold on the poster */
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent);
  transform: skewX(-18deg); animation: pay-sheen 4.2s ease-in-out infinite;
}
.pay .btn-primary:hover { background: var(--p-ink); border-color: var(--p-ink); color: var(--p-lime); transform: translateY(-1px); }
.pay .btn-primary:hover::after { animation: none; opacity: 0; }
.pay .btn-primary[disabled] { opacity: .45; }
.pay .btn-ink { background: var(--p-ink); border-color: var(--p-ink); color: #fff; }
.pay .btn-ink:hover { background: #000; color: var(--p-lime); }
.pay .btn-ink .pi { color: #25d366; }
.pay .btn-ghost { background: #fff; border: 1.5px solid var(--p-ink); color: var(--p-ink); }
.pay .btn-ghost:hover { background: var(--p-ink); color: #fff; }
.pay .btn-quiet { background: transparent; color: var(--p-grey); border-color: transparent; font-weight: 600; }
.pay .btn-quiet:hover { color: var(--p-ink); background: rgba(0, 0, 0, .04); }
.pay .btn .pi { width: 1.05em; height: 1.05em; }
.pay .btn:hover .pi-go { transform: translateX(3px); }
.pay .pi-go { transition: transform .25s var(--p-ease); }

/* small rounded copy chips */
.pay-chip {
  display: inline-flex; align-items: center; gap: .3rem; cursor: pointer;
  font: 600 .72rem/1 var(--font-head); color: var(--p-ink);
  background: #fff; border: 1.5px solid var(--p-line-2); border-radius: 999px;
  padding: .36rem .62rem; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.pay-chip:hover { background: var(--p-ink); color: #fff; border-color: var(--p-ink); }
.pay-chip:active { transform: scale(.97); }
.pay-chip .pi { width: 12px; height: 12px; }
.pay-chip.is-done { background: var(--p-green); border-color: var(--p-green); color: #fff; }

/* ---- method choice (radio tiles) --------------------------------------- */
.pay-methods { display: grid; gap: .5rem; margin: 0 0 .75rem; border: 0; padding: 0; }
.pay-methods legend { font: 700 .95rem/1.3 var(--font-head); letter-spacing: -.015em; margin-bottom: .5rem; padding: 0; }
.pay-method { position: relative; display: block; cursor: pointer; }
.pay-method input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pay-method-body {
  display: flex; align-items: center; gap: .65rem;
  background: #fff; border: 1.5px solid var(--p-line); border-radius: 12px;
  padding: .55rem .7rem; transition: border-color .2s, box-shadow .25s, transform .2s var(--p-ease), background .2s;
}
.pay-method:hover .pay-method-body { border-color: var(--p-line-2); transform: translateY(-1px); box-shadow: var(--p-shadow-sm); }
.pay-method-name { flex: 1; font: 700 .86rem/1.3 var(--font-head); letter-spacing: -.015em; }
.pay-method-dot { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--p-line-2); display: grid; place-items: center; transition: all .2s; }
.pay-method-dot .pi { width: 11px; height: 11px; color: var(--p-lime); opacity: 0; transform: scale(.5); transition: all .25s var(--p-ease); }
.pay-method input:checked + .pay-method-body { border-color: var(--p-ink); box-shadow: 0 0 0 3px rgba(17, 17, 17, .06), var(--p-shadow-sm); background: #fffef5; }
.pay-method input:checked + .pay-method-body .pay-method-dot { background: var(--p-ink); border-color: var(--p-ink); }
.pay-method input:checked + .pay-method-body .pay-method-dot .pi { opacity: 1; transform: none; }
.pay-method input:focus-visible + .pay-method-body { box-shadow: 0 0 0 4px rgba(239, 255, 4, .7); }

/* ---- agent: payment channels (details cards) -------------------------- */
.pay-channel { background: #fff; border: 1.5px solid var(--p-line); border-radius: 13px; overflow: hidden; transition: border-color .2s, box-shadow .25s; }
.pay-channel + .pay-channel { margin-top: .45rem; }
.pay-channel[open] { border-color: var(--p-ink); box-shadow: var(--p-shadow); }
.pay-channel > summary { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; cursor: pointer; font: 700 .86rem/1.3 var(--font-head); letter-spacing: -.015em; }
.pay-channel > summary::-webkit-details-marker { display: none; }
.pay-channel > summary .lbl { flex: 1; }
.pay-channel > summary::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid var(--p-ink); border-bottom: 2px solid var(--p-ink);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .3s var(--p-ease); margin-right: .3rem;
}
.pay-channel[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.pay-channel-body { padding: 0 .7rem .8rem; animation: pay-rise .45s var(--p-ease) both; }
.pay-number {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap;
  background: var(--p-paper); border: 1px dashed var(--p-line-2); border-radius: 11px; padding: .5rem .7rem; margin-top: .3rem;
}
.pay-number .num { font: 800 1.15rem/1.15 var(--font-head); letter-spacing: .01em; word-break: break-all; font-variant-numeric: tabular-nums; }
.pay-kicker { font: 600 .65rem/1.2 var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: var(--p-grey); margin: 0; }
.pay-dial { display: inline-flex; align-items: center; gap: .3rem; margin: .45rem 0 0; font-size: .82rem; font-weight: 600; }
.pay-dial a { color: var(--p-ink); background: var(--p-lime); padding: .15rem .45rem; border-radius: 6px; text-decoration: none; font-weight: 700; }
.pay-how { white-space: pre-line; margin: .6rem 0 0; font-size: .78rem; line-height: 1.6; color: var(--p-grey); }

/* ---- USDT / crypto: address + QR -------------------------------------- */
.pay-address { display: grid; gap: .7rem; align-items: start; }
@media (min-width: 620px) { .pay-address--qr { grid-template-columns: minmax(0, 1fr) auto; } }
.pay-address .addr { font: 700 .84rem/1.45 var(--font-head); word-break: break-all; color: var(--p-ink); margin: .25rem 0 .5rem; letter-spacing: .01em; }
.pay-qr { justify-self: center; text-align: center; }
.pay-qr-frame { position: relative; padding: 7px; background: #fff; border-radius: 13px; border: 1px solid var(--p-line); box-shadow: var(--p-shadow-sm); }
.pay-qr-frame img { display: block; border-radius: 6px; width: 112px; height: 112px; }
.pay-qr-frame::before, .pay-qr-frame::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--p-ink); }
.pay-qr-frame::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; border-top-left-radius: 9px; }
.pay-qr-frame::after { bottom: -3px; right: -3px; border-left: 0; border-top: 0; border-bottom-right-radius: 9px; }
.pay-qr .tiny { margin-top: .4rem; }
.pay-netline { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding-bottom: .6rem; margin-bottom: .65rem; border-bottom: 1px dashed var(--p-line-2); }
.pay-netline .who { display: flex; align-items: center; gap: .55rem; }
.pay-netline strong { font: 800 .92rem/1.2 var(--font-head); letter-spacing: -.02em; }

/* countdown */
#usdtCountdown { text-align: center; }
.pay-clock { position: relative; width: 92px; height: 92px; margin: .3rem auto .55rem; display: grid; place-items: center; }
.pay-clock::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 4px solid var(--p-paper-2); }
.pay-clock::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 4px solid transparent; border-top-color: var(--p-ink); border-right-color: var(--p-lime); animation: pay-spin 1.6s linear infinite; }
.pay-clock .mono { position: relative; font: 800 1.3rem/1 var(--font-head) !important; letter-spacing: -.03em; }
#usdtProof { animation: pay-rise .5s var(--p-ease) both; margin-top: .8rem !important; }   /* its inline margin is pinned by tests */
#usdtProof[hidden] { display: none; }
.pay-watch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .8rem; padding-top: .7rem; border-top: 1px dashed var(--p-line-2); }
.pay-watch .tiny { color: var(--p-grey); }

/* waiting: pulse around an icon */
.pay-pulse { position: relative; width: 54px; height: 54px; margin: .2rem auto .6rem; display: grid; place-items: center; border-radius: 50%; background: var(--p-cream); color: var(--p-gold); }
.pay-pulse .pi { width: 24px; height: 24px; }
.pay-pulse::before, .pay-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(200, 150, 30, .45); animation: pay-ring 2.4s var(--p-ease) infinite; }
.pay-pulse::after { animation-delay: 1.2s; }
.pay-pulse--good { background: var(--p-green-soft); color: var(--p-green); }
.pay-pulse--good::before, .pay-pulse--good::after { border-color: rgba(22, 163, 74, .4); }
.pay-pulse--bad { background: var(--p-red-soft); color: var(--p-red); }
.pay-pulse--bad::before, .pay-pulse--bad::after { border-color: rgba(236, 28, 36, .35); }
.pay-pulse--still::before, .pay-pulse--still::after { animation: none; opacity: 0; }

/* the result badge: a check that draws itself */
.pay-badge { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--p-lime); color: var(--p-ink); box-shadow: 0 10px 18px -12px rgba(90, 100, 0, .9); margin-bottom: .6rem; animation: pay-pop .6s var(--p-ease) both; }
.pay-badge .pi { width: 24px; height: 24px; stroke-width: 2.6; }
.pay-badge .pi path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: pay-draw .7s .25s var(--p-ease) forwards; }
.pay-badge--wait { background: var(--p-cream); color: var(--p-gold); box-shadow: none; }
.pay-badge--wait .pi path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
.pay-badge--bad { background: var(--p-red-soft); color: var(--p-red); box-shadow: none; }

/* foot links */
.pay-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem .9rem; margin-top: .2rem; font-size: .8rem; }
.pay-foot a { color: var(--p-ink-2); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
.pay-foot a:hover { color: var(--p-ink); text-decoration: underline; text-decoration-color: var(--p-lime); text-decoration-thickness: 2px; }
.pay-legal { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--p-grey); font-size: .84rem; margin-top: .6rem; }

/* ---- checkout page --------------------------------------------------- */
.pay .spec-list { list-style: none; margin: 0 0 .7rem; padding: 0; }
.pay .spec-list li { display: flex; justify-content: space-between; gap: .8rem; padding: .42rem 0; border-bottom: 1px dashed var(--p-line-2); font-size: .8rem; }
.pay .spec-list li:last-child { border-bottom: 0; }
.pay .spec-list .k { color: var(--p-grey); flex: 0 0 auto; max-width: 48%; }
.pay .spec-list .v { font-weight: 600; text-align: right; color: var(--p-ink); }
.pay .spec-list .v.accent { color: var(--p-red); font-weight: 800; }
.pay .split-pay { border-radius: 13px; overflow: hidden; background: var(--p-ink); color: #fff; display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 1rem; }
.pay .split-pay > div { padding: .6rem .75rem; }
.pay .split-pay .total { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .12); }
.pay .split-pay .lbl { font: 600 .65rem/1.2 var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: var(--p-lime); }
.pay .split-pay .amt { font: 800 1.05rem/1.15 var(--font-head); letter-spacing: -.02em; margin-top: .2rem; }
.pay-total { background: var(--p-ink); color: #fff; border-radius: 13px; padding: .65rem .8rem; margin: .3rem 0 .75rem; }
.pay-total .line { display: flex; justify-content: space-between; gap: 1rem; color: rgba(255, 255, 255, .7); font-size: .78rem; padding-bottom: .45rem; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.pay-total .grand { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; padding-top: .5rem; }
.pay-total .grand strong:first-child { font: 600 .66rem/1.2 var(--font-head); letter-spacing: .22em; text-transform: uppercase; color: var(--p-lime); }
.pay-total .grand .accent { font: 800 1.3rem/1 var(--font-head); letter-spacing: -.035em; color: #fff; }
.pay .flash { border-radius: 12px; font-size: .82rem; }
.pay .panel { background: var(--p-paper); border: 1px solid var(--p-line); border-radius: var(--p-r-sm); }
.pay .notice { border-radius: 12px; font-size: .82rem; }

/* ---- motion ----------------------------------------------------------- */
.pay-in { animation: pay-rise .7s var(--p-ease) both; }
.pay-in--1 { animation-delay: .06s; } .pay-in--2 { animation-delay: .14s; } .pay-in--3 { animation-delay: .22s; }
.pay-in--4 { animation-delay: .3s; } .pay-in--5 { animation-delay: .38s; }
.pay-float { animation: pay-float 5.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.pay-float--b { animation-duration: 6.5s; animation-delay: -1.8s; }
.pay-float--c { animation-duration: 7s; animation-delay: -3.2s; }
.pay-rise { stroke-dasharray: 1; stroke-dashoffset: 1; animation: pay-line 1.6s .2s var(--p-ease) forwards; filter: drop-shadow(0 4px 8px rgba(30, 163, 74, .35)); }
.pay-rise-head { opacity: 0; animation: pay-fade .4s 1.5s ease forwards; }
.pay-spark { transform-box: fill-box; transform-origin: center; animation: pay-twinkle 2.8s ease-in-out infinite; }
.pay-spark--2 { animation-delay: -1s; }
.pay-spark--3 { animation-delay: -1.9s; }

@keyframes pay-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pay-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes pay-line { to { stroke-dashoffset: 0; } }
@keyframes pay-fade { to { opacity: 1; } }
@keyframes pay-twinkle { 0%, 100% { opacity: 1; transform: scale(1) rotate(0); } 50% { opacity: .35; transform: scale(.6) rotate(20deg); } }
@keyframes pay-ring { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes pay-dot { 0% { box-shadow: 0 0 0 0 currentColor; } 80%, 100% { box-shadow: 0 0 0 6px transparent; } }
@keyframes pay-sheen { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@keyframes pay-spin { to { transform: rotate(360deg); } }
@keyframes pay-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pay-draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .pay *, .pay *::before, .pay *::after, .desk *, .desk *::before, .desk *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition: none !important;
  }
}

/* ---- phones ---------------------------------------------------------- */
@media (max-width: 560px) {
  .pay-card { border-radius: 14px; }
  .pay-ticket, .pay-bar--round { border-radius: 14px; }
  .pay-scene { height: 80px; }
  .pay-number .num { font-size: 1.1rem; }
  .pay .btn-lg { width: 100%; }
  .pay-netline { flex-wrap: wrap; }
}

/* ==========================================================================
   The payment agent's desk (agent/desk.html): phone first, big targets.
   ========================================================================== */
.desk { min-height: 100vh; margin: 0; background: radial-gradient(40rem 20rem at 90% -10%, rgba(255, 216, 107, .3), transparent 60%), var(--p-paper); }
.desk { font-size: .88rem; }
.desk-wrap { max-width: 480px; margin: 0 auto; padding: 10px 12px 32px; }
.desk-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .2rem 0 .6rem; }
.desk-brand { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; color: var(--p-ink); }
.desk-logo { width: 28px; height: 28px; border-radius: 8px; background: var(--p-red); color: #fff; display: grid; place-items: center; font: 800 .95rem/1 var(--font-head); position: relative; box-shadow: 0 6px 12px -8px rgba(236, 28, 36, .8); }
.desk-logo::after { content: ""; position: absolute; top: 5px; right: 5px; width: 5px; height: 6px; background: var(--p-lime); border-radius: 1px; }
.desk-word { display: grid; line-height: 1; }
.desk-word b { font: 800 .85rem/1 var(--font-head); letter-spacing: -.02em; }
.desk-word i { font: 600 .5rem/1 var(--font-head); font-style: normal; letter-spacing: .3em; margin-top: .2rem; }
.desk-out { margin: 0; }
.desk-out button { font: 600 .72rem/1 var(--font-head); color: var(--p-ink); background: #fff; border: 1.5px solid var(--p-line-2); border-radius: 999px; padding: .38rem .65rem; cursor: pointer; }
.desk-out button:hover { background: var(--p-ink); color: #fff; border-color: var(--p-ink); }
.desk-tag { display: inline-flex; align-items: center; gap: .35rem; background: var(--p-red); color: #fff; font: 700 .65rem/1 var(--font-head); letter-spacing: .16em; text-transform: uppercase; padding: .38rem .66rem; border-radius: 999px; }
.desk-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--p-lime); animation: pay-dot 1.6s ease-out infinite; color: var(--p-lime); }
.desk h1 { font: 800 clamp(1.2rem, 4.6vw, 1.45rem)/1.1 var(--font-head); letter-spacing: -.035em; margin: .5rem 0 .7rem; }
.desk h2 { font: 800 .95rem/1.2 var(--font-head); letter-spacing: -.02em; margin: 1.1rem 0 .5rem; }
.desk-flash { padding: .55rem .7rem; border-radius: 12px; margin-bottom: 9px; font-size: .82rem; background: var(--p-green-soft); border: 1px solid #bfe6cc; color: #0f5c2c; font-weight: 600; animation: pay-rise .5s var(--p-ease) both; }
.desk-flash.error { background: var(--p-red-soft); border-color: #f5c6cb; color: #8c1d18; }
.desk-owe { background: var(--p-ink); color: #fff; border-radius: 16px; padding: .75rem .85rem .8rem; margin-bottom: 10px; box-shadow: var(--p-shadow); animation: pay-rise .6s var(--p-ease) both; }
.desk-owe .lbl { font: 600 .65rem/1.3 var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: var(--p-lime); }
.desk-owe .big { font: 800 clamp(1.3rem, 5.5vw, 1.55rem)/1.1 var(--font-head); letter-spacing: -.03em; margin: .2rem 0 .5rem; }
.desk-owe .r { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; padding: .38rem 0; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .78rem; }
.desk-owe .r span:last-child { white-space: nowrap; font-weight: 700; }
.desk-owe .r span:first-child { color: rgba(255, 255, 255, .65); }
.desk-owe .hint { margin-top: .5rem; font-size: .72rem; line-height: 1.5; color: rgba(255, 255, 255, .7); }
.desk-card { background: #fff; border: 1px solid var(--p-line); border-radius: 16px; padding: .7rem .8rem .8rem; margin-bottom: 10px; box-shadow: var(--p-shadow); animation: pay-rise .6s var(--p-ease) both; }
.desk-card:nth-of-type(2) { animation-delay: .07s; } .desk-card:nth-of-type(3) { animation-delay: .14s; }
.desk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding-bottom: .55rem; margin-bottom: .3rem; border-bottom: 1px dashed var(--p-line-2); }
.desk-head .ord { font: 800 .86rem/1.2 var(--font-head); letter-spacing: -.01em; }
.desk-wait { display: inline-flex; align-items: center; gap: .45rem; background: var(--p-amber-soft); color: var(--p-amber); border: 1px solid #f1d79a; border-radius: 999px; padding: .28rem .5rem; font: 700 .66rem/1 var(--font-head); white-space: nowrap; }
.desk-wait::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pay-dot 1.6s ease-out infinite; }
.desk-amount { display: grid; gap: .45rem; background: var(--p-paper); border-radius: 12px; padding: .6rem .7rem; margin: .5rem 0 .4rem; }
.desk-amount .lbl { font: 600 .65rem/1.3 var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: var(--p-grey); }
.desk-amount .val { font: 800 1.2rem/1.1 var(--font-head); letter-spacing: -.025em; margin-top: .15rem; }
.desk-amount .exp { padding-top: .45rem; border-top: 1px dashed var(--p-line-2); display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.desk-amount .exp .val { font-size: .88rem; color: var(--p-grey); font-weight: 700; margin: 0; }
.desk-row { display: grid; gap: .1rem; padding: .42rem 0; font-size: .84rem; border-bottom: 1px dashed var(--p-line); }
.desk-row:last-of-type { border-bottom: 0; }
.desk-row .k { color: var(--p-grey); font-size: .7rem; }
.desk-row > span:last-child { font-weight: 700; overflow-wrap: anywhere; }
.desk-warn { display: flex; gap: .6rem; align-items: flex-start; background: var(--p-amber-soft); color: #5c3d00; border: 1px solid #f1d79a; border-radius: 10px; padding: .45rem .6rem; font-size: .76rem; line-height: 1.45; margin-top: .45rem; }
.desk-warn::before { content: "!"; flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; background: var(--p-amber); color: #fff; display: grid; place-items: center; font: 800 .62rem/1 var(--font-head); }
.desk label { display: block; font: 600 .76rem/1.3 var(--font-head); color: var(--p-ink); margin: .7rem 0 .3rem; }
.desk input, .desk select { width: 100%; box-sizing: border-box; min-height: 42px; font: 600 .95rem/1.3 var(--font-head); padding: .5rem .75rem; color: var(--p-ink); background: #fff; border: 1.5px solid var(--p-line-2); border-radius: 11px; }
.desk select { font-size: .86rem; }
.desk input:focus, .desk select:focus { outline: none; border-color: var(--p-ink); box-shadow: 0 0 0 3px rgba(239, 255, 4, .55); }
.desk .ok, .desk .no { width: 100%; min-height: 42px; font: 700 .9rem/1 var(--font-head); border-radius: 999px; margin-top: .55rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; transition: transform .15s, background .2s, color .2s; }
.desk .ok { background: var(--p-green); color: #fff; border: 0; box-shadow: 0 10px 18px -12px rgba(22, 163, 74, .95); }
.desk .ok:hover { background: #128a3e; }
.desk .ok:active, .desk .no:active { transform: scale(.98); }
.desk .ok .pi, .desk .no .pi { width: 16px; height: 16px; }
.desk .no { background: #fff; color: var(--p-red); border: 1.5px solid #f0b4ae; }
.desk .no:hover { background: var(--p-red); color: #fff; border-color: var(--p-red); }
.desk details { margin-top: .35rem; }
.desk details summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .3rem; min-height: 34px; color: var(--p-red); font: 700 .8rem/1 var(--font-head); border-radius: 999px; }
.desk details summary::-webkit-details-marker { display: none; }
.desk details summary:hover { background: var(--p-red-soft); }
.desk details[open] summary { background: var(--p-red-soft); }
.desk details[open] form { animation: pay-rise .4s var(--p-ease) both; }
.desk-empty { text-align: center; padding: 1.2rem .8rem 1rem; }
.desk-empty .pay-pulse { margin-bottom: .7rem; }
.desk-empty p { margin: 0; font-weight: 700; font-size: .9rem; }
.desk-empty .muted { margin-top: .35rem; font-weight: 400; font-size: .76rem; color: var(--p-grey); }
.desk-recent { background: #fff; border: 1px solid var(--p-line); border-radius: 14px; overflow: hidden; }
.desk-recent .item { display: grid; grid-template-columns: 1fr auto; gap: .15rem .6rem; padding: .55rem .75rem; border-bottom: 1px dashed var(--p-line); font-size: .8rem; }
.desk-recent .item:last-child { border-bottom: 0; }
.desk-recent .item .ord { font-weight: 700; }
.desk-recent .item .st { justify-self: end; font: 700 .65rem/1 var(--font-head); letter-spacing: .05em; text-transform: uppercase; padding: .28rem .48rem; border-radius: 999px; background: var(--p-paper); color: var(--p-ink-2); }
.desk-recent .item .st.CONFIRMED { background: var(--p-green-soft); color: var(--p-green); }
.desk-recent .item .st.REJECTED { background: var(--p-red-soft); color: var(--p-red); }
.desk-recent .item .k { color: var(--p-grey); }
.desk-recent .item .amt { justify-self: end; font-weight: 700; }
.desk-owner { text-align: center; margin-top: 1.4rem; font-size: .88rem; }
.desk-owner a { color: var(--p-ink); font-weight: 700; }
.desk-foot { text-align: center; color: var(--p-grey); font-size: .8rem; margin-top: 1.6rem; }

/* ==========================================================================
   NF-375 / NF-376: the agent's desk as a dashboard and the owner's agent
   control room. Same poster language: paper ground, white cards, the black
   bar, the ALERT bubble with its tail, tinted icon tiles, lime for "on".
   Desk rules sit under .desk, room rules under .agx, shared pieces (stats,
   status pills, copy buttons, the daily chart) carry an ag- name used only
   on these two pages.
   ========================================================================== */
.agx [hidden] { display: none !important; }
.agx .mono { font-family: var(--font-head); font-variant-numeric: tabular-nums; letter-spacing: -.005em; }

/* ---- shared: stat tiles ------------------------------------------------ */
.ag-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ag-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ag-stat {
  display: flex; gap: .55rem; align-items: flex-start; min-width: 0;
  background: #fff; border: 1px solid var(--p-line); border-radius: 14px;
  padding: .6rem .65rem; box-shadow: var(--p-shadow-sm); animation: pay-rise .5s var(--p-ease) both;
}
.ag-stat:nth-child(2) { animation-delay: .04s; } .ag-stat:nth-child(3) { animation-delay: .08s; } .ag-stat:nth-child(4) { animation-delay: .12s; }
.ag-stat .pay-tile { width: 28px; height: 28px; border-radius: 8px; }
.ag-stat .pay-tile .pi { width: 14px; height: 14px; }
.ag-stat-body { min-width: 0; }
.ag-stat-label { font: 600 .64rem/1.3 var(--font-head); color: var(--p-grey); }
.ag-stat-value { font: 800 1.12rem/1.15 var(--font-head); letter-spacing: -.03em; margin-top: .15rem; color: var(--p-ink); overflow-wrap: anywhere; }
.ag-stat-sub { font-size: .66rem; line-height: 1.35; color: var(--p-grey); margin-top: .15rem; }
@media (max-width: 599px) {
  .ag-stats--3 .ag-stat { flex-direction: column; gap: .4rem; }
  .ag-stats--3 .ag-stat-value { font-size: 1rem; }
}

/* ---- shared: status pills ---------------------------------------------- */
.ag-st {
  display: inline-flex; align-items: center; justify-self: end; white-space: nowrap;
  font: 700 .62rem/1 var(--font-head); letter-spacing: .04em; text-transform: uppercase;
  padding: .28rem .48rem; border-radius: 999px; background: var(--p-paper); color: var(--p-ink-2);
}
.ag-st--confirmed { background: var(--p-green-soft); color: #0f6b30; }
.ag-st--rejected { background: var(--p-red-soft); color: #b4121a; }
.ag-st--submitted { background: var(--p-amber-soft); color: var(--p-amber); }
.ag-st--withdrawn { background: var(--p-paper-2); color: var(--p-grey); }

/* ---- shared: copy buttons ---------------------------------------------- */
.ag-copy {
  flex: 0 0 auto; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border-radius: 8px; border: 1px solid var(--p-line-2); background: #fff; color: var(--p-ink-2);
  cursor: pointer; transition: background .15s, color .15s;
}
.ag-copy .pi { width: 14px; height: 14px; }
.ag-copy:hover { background: var(--p-ink); color: #fff; border-color: var(--p-ink); }
.ag-copy.is-done { background: var(--p-green); color: #fff; border-color: var(--p-green); }

/* ---- shared: the daily chart (one series, columns from one baseline) --- */
.ag-chart { margin: 0; }
.ag-chart figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem .8rem; margin-bottom: .7rem; }
.ag-chart-title { font: 700 .8rem/1.3 var(--font-head); color: var(--p-ink); }
.ag-chart-total { font-size: .72rem; color: var(--p-grey); }
.ag-plot { position: relative; height: 140px; margin: 0 0 22px 38px; }
.ag-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--p-line); }
.ag-grid span { position: absolute; right: 100%; top: 0; transform: translateY(-50%); padding-right: 6px; font-size: .6rem; color: var(--p-grey); white-space: nowrap; }
.ag-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 2px; align-items: end; border-bottom: 1px solid var(--p-line-2); }
.ag-col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 6px; outline: none; }
.ag-col:hover, .ag-col:focus-visible { background: rgba(17, 17, 17, .035); }
.ag-col:focus-visible { box-shadow: 0 0 0 2px var(--p-ink); }
.ag-bar { display: block; width: min(100%, 24px); background: var(--p-green); border-radius: 4px 4px 0 0; transform-origin: bottom; animation: ag-grow .7s var(--p-ease) both; }
.ag-col.is-today .ag-bar { background: #0f6b30; }
.ag-x { position: absolute; top: 100%; margin-top: 5px; font-size: .58rem; color: var(--p-grey); }
.ag-col.is-today .ag-x { color: var(--p-ink); font-weight: 800; }
.ag-col::after {
  content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--p-ink); color: #fff; font: 600 .66rem/1.3 var(--font-head); padding: .35rem .5rem;
  border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 3;
}
.ag-col:nth-child(-n+4)::after { left: 0; transform: none; }
.ag-col:nth-last-child(-n+4)::after { left: auto; right: 0; transform: none; }
.ag-col:hover::after, .ag-col:focus-visible::after { opacity: 1; }
.ag-table summary { cursor: pointer; font: 600 .72rem/1.3 var(--font-head); color: var(--p-grey); }
.desk .ag-table summary { justify-content: flex-start; color: var(--p-grey); min-height: 0; padding: .2rem 0; }
.desk .ag-table summary:hover, .desk .ag-table[open] summary { background: none; color: var(--p-ink); }
.ag-table table { width: 100%; border-collapse: collapse; font-size: .74rem; margin-top: .4rem; }
.ag-table th, .ag-table td { padding: .32rem .4rem; border-bottom: 1px dashed var(--p-line); text-align: left; }
.ag-table th { font-weight: 600; color: var(--p-grey); }
.ag-table .num { text-align: right; }
@keyframes ag-grow { from { transform: scaleY(0); } to { transform: none; } }

/* ---- the desk: frame, greeting, tabs ----------------------------------- */
.desk-wrap.desk-dash { max-width: 520px; padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.desk-hello { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem; margin: 0 0 .6rem; }
.desk-hello-l, .desk-hello-r { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.desk-greet { margin: 0; font-size: .78rem; color: var(--p-grey); }
.desk-greet b { color: var(--p-ink); }
.desk-hours, .desk-room {
  display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap;
  font: 600 .66rem/1 var(--font-head); color: var(--p-grey); text-decoration: none;
  background: #fff; border: 1px solid var(--p-line); border-radius: 999px; padding: .34rem .55rem;
}
.desk-hours .pi, .desk-room .pi { width: 12px; height: 12px; }
.desk-hours.is-open { color: #0f6b30; background: var(--p-green-soft); border-color: #bfe6cc; }
.desk-room { background: var(--p-ink); color: #fff; border-color: var(--p-ink); }
.desk-room .pi { color: var(--p-lime); }

/* tabs: a bottom bar on phones, a pill row on wide screens */
.desk-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--p-line); box-shadow: 0 -12px 26px -20px rgba(17, 17, 17, .45);
}
.desk-tabs a { display: grid; justify-items: center; gap: .2rem; padding: .25rem .1rem; text-decoration: none; color: var(--p-grey); border-radius: 12px; }
.desk-tab-ic { position: relative; display: grid; place-items: center; width: 40px; height: 26px; border-radius: 999px; transition: background .2s; }
.desk-tab-ic .pi { width: 18px; height: 18px; }
.desk-tab-t { display: grid; justify-items: center; gap: .1rem; font: 700 .66rem/1 var(--font-head); }
.desk-tab-t small { font: 500 .54rem/1 var(--font-head); color: var(--p-grey-2); }
.desk-tabs a.is-on { color: var(--p-ink); }
.desk-tabs a.is-on .desk-tab-ic { background: var(--p-lime); }
.desk-badge {
  position: absolute; top: -5px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box;
  border-radius: 999px; background: var(--p-red); color: #fff; font: 800 .6rem/17px var(--font-head); text-align: center;
  box-shadow: 0 0 0 2px #fff; animation: pay-pop .4s var(--p-ease) both;
}

/* the poster's ALERT bubble, on the desk and in the room */
.desk-alert, .agx-alert {
  position: relative; display: flex; gap: .65rem; align-items: flex-start;
  background: #fff; border: 1.5px solid #f5c6cb; border-radius: 16px; padding: .7rem .8rem;
  box-shadow: var(--p-shadow-sm); margin-bottom: 16px; animation: pay-rise .5s var(--p-ease) both;
}
.desk-alert::after, .agx-alert::after {
  content: ""; position: absolute; left: 30px; bottom: -7px; width: 12px; height: 12px; background: #fff;
  border-right: 1.5px solid #f5c6cb; border-bottom: 1.5px solid #f5c6cb; transform: rotate(45deg); border-bottom-right-radius: 3px;
}
.desk-alert .pay-alert-icon, .agx-alert .pay-alert-icon { position: relative; flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; color: var(--p-red); }
.desk-alert .pay-alert-icon .pi, .agx-alert .pay-alert-icon .pi { width: 20px; height: 20px; }
.desk-alert .pay-alert-icon::before, .desk-alert .pay-alert-icon::after,
.agx-alert .pay-alert-icon::before, .agx-alert .pay-alert-icon::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 1.5px solid rgba(236, 28, 36, .35);
  animation: pay-ring 2.2s var(--p-ease) infinite;
}
.desk-alert .pay-alert-icon::after, .agx-alert .pay-alert-icon::after { animation-delay: 1.1s; }
.desk-alert-k, .agx-alert-k { font: 800 .7rem/1 var(--font-head); letter-spacing: .06em; color: var(--p-red); }
.desk-alert-t, .agx-alert-t { margin: .2rem 0 0; font: 800 1rem/1.2 var(--font-head); letter-spacing: -.02em; color: var(--p-ink); }
.desk-alert-s, .agx-alert-s { margin: .25rem 0 0; font-size: .76rem; line-height: 1.45; color: var(--p-ink-2); }
.desk-alert-s b, .agx-alert-s b { color: #b4121a; }
.desk-alert--warn, .desk-alert--warn::after { border-color: #f1d79a; }
.desk-alert--warn .pay-alert-icon { color: var(--p-amber); }
.desk-alert--warn .pay-alert-icon::before, .desk-alert--warn .pay-alert-icon::after { border-color: rgba(200, 150, 30, .4); }
.agx-alert--calm, .agx-alert--calm::after { border-color: #bfe6cc; }
.agx-alert--calm .pay-alert-icon { color: var(--p-green); }
.agx-alert--calm .pay-alert-icon::before, .agx-alert--calm .pay-alert-icon::after { border-color: rgba(22, 163, 74, .35); animation: none; opacity: 0; }

/* queue: cards, then today's figures; two columns from 900px */
.desk-grid { display: grid; gap: 4px; }
.desk-side h2 { margin-top: .9rem; }
.desk-sla { height: 4px; border-radius: 999px; background: var(--p-paper-2); overflow: hidden; margin: .15rem 0 .1rem; }
.desk-sla span { display: block; height: 100%; border-radius: inherit; background: var(--p-gold); transition: width .6s var(--p-ease); }
.desk-card.is-late { border-color: #f5c6cb; }
.desk-card.is-late .desk-sla span { background: var(--p-red); }
.desk-card.is-late .desk-wait { background: var(--p-red-soft); color: #b4121a; border-color: #f5c6cb; }
.desk .desk-copyrow { display: flex; align-items: center; justify-content: space-between; gap: .45rem; min-width: 0; }
.desk .desk-copyrow .mono { min-width: 0; overflow-wrap: anywhere; }
.desk-owe--link { display: block; text-decoration: none; color: #fff; transition: transform .15s; }
.desk-owe--link:hover { transform: translateY(-1px); }
.desk-owe-more { display: inline-flex; align-items: center; gap: .3rem; font: 600 .72rem/1 var(--font-head); color: var(--p-lime); }
.desk-owe-more .pi { width: 13px; height: 13px; }
.desk-addr { margin-top: .55rem; padding: .5rem .55rem; border-radius: 10px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.desk-addr .k { font-size: .66rem; color: rgba(255, 255, 255, .65); margin-bottom: .25rem; }
.desk-addr .mono { font-size: .74rem; font-weight: 600; }
.desk-owe .ag-copy { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .2); }
.desk-owe .ag-copy:hover { background: var(--p-lime); color: var(--p-ink); border-color: var(--p-lime); }
.desk-recent .item .ag-st { justify-self: end; }
.desk-more { margin: .6rem 0 0; text-align: right; }
.desk-more a, .desk-pager a {
  display: inline-flex; align-items: center; gap: .3rem; font: 700 .76rem/1 var(--font-head); color: var(--p-ink);
  text-decoration: underline; text-decoration-color: var(--p-lime); text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.desk-more .pi, .desk-pager .pi { width: 13px; height: 13px; }

/* history */
.desk-filter { background: #fff; border: 1px solid var(--p-line); border-radius: 16px; padding: .6rem; box-shadow: var(--p-shadow-sm); margin-bottom: 10px; }
.desk-chips { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .1rem; }
.desk-chips::-webkit-scrollbar { display: none; }
.desk .desk-chip { position: relative; display: inline-flex; flex: 0 0 auto; margin: 0; }
.desk .desk-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; }
.desk-chip span {
  display: inline-block; white-space: nowrap; cursor: pointer; font: 600 .72rem/1 var(--font-head);
  padding: .48rem .7rem; border-radius: 999px; border: 1.5px solid var(--p-line-2); background: #fff; color: var(--p-ink-2);
}
.desk-chip input:checked + span { background: var(--p-ink); border-color: var(--p-ink); color: #fff; }
.desk-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(239, 255, 4, .65); }
.desk-filter-row { display: grid; gap: .4rem; margin-top: .5rem; }
.desk .desk-go {
  min-height: 42px; border: 0; border-radius: 999px; padding: 0 1rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  background: var(--p-lime); color: var(--p-ink); font: 700 .84rem/1 var(--font-head);
}
.desk .desk-go .pi { width: 15px; height: 15px; }
.desk-sum { font-size: .76rem; color: var(--p-grey); margin: .1rem 0 .6rem; }
.desk-sum b { color: var(--p-ink); white-space: nowrap; }
.desk-hist { display: grid; gap: 8px; }
.desk-hist-item { background: #fff; border: 1px solid var(--p-line); border-radius: 14px; padding: .6rem .7rem; box-shadow: var(--p-shadow-sm); animation: pay-rise .45s var(--p-ease) both; }
.desk-hist-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.desk-hist-top .ord { font: 800 .84rem/1.2 var(--font-head); }
.desk-hist-amt { font: 800 1.05rem/1.2 var(--font-head); letter-spacing: -.02em; margin: .3rem 0 .25rem; }
.desk-hist-amt small { font: 600 .7rem/1 var(--font-head); color: var(--p-gold); letter-spacing: 0; }
.desk-hist-meta { display: flex; flex-wrap: wrap; gap: .2rem .7rem; font-size: .7rem; line-height: 1.4; color: var(--p-grey); }
.desk-hist-meta .mono { color: var(--p-ink-2); }
.desk-hist-meta b.late { color: #b4121a; }
.desk-pager { display: flex; justify-content: space-between; align-items: center; margin-top: .8rem; font-size: .76rem; }

/* numbers */
.desk-sub { font-size: .76rem; color: var(--p-grey); margin: .2rem 0 .5rem; }
.desk-nums { display: grid; gap: 8px; margin-bottom: 12px; }
.desk-num { background: #fff; border: 1px solid var(--p-line); border-radius: 16px; padding: .7rem .8rem .5rem; box-shadow: var(--p-shadow-sm); animation: pay-rise .5s var(--p-ease) both; }
.desk-num.is-off { opacity: .62; }
.desk-num-top { display: flex; align-items: center; gap: .5rem; }
.desk-num-top .t { flex: 1; min-width: 0; font: 700 .8rem/1.3 var(--font-head); }
.desk-num-n { margin: .55rem 0 .15rem; }
.desk .desk-num-n .mono { font: 800 1.35rem/1.1 var(--font-head); letter-spacing: .02em; }

/* help: the WhatsApp line, as the poster's black bar */
.desk-wa {
  display: flex; align-items: center; gap: .75rem; margin-top: 14px; padding: .75rem .9rem;
  background: var(--p-ink); color: #fff; border-radius: 16px; text-decoration: none; box-shadow: var(--p-shadow);
}
.desk-wa > .pi { width: 24px; height: 24px; color: var(--p-lime); }
.desk-wa small { display: block; font: 600 .6rem/1.2 var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: var(--p-lime); }
.desk-wa b { display: block; font: 800 1.15rem/1.2 var(--font-head); letter-spacing: -.02em; margin-top: .15rem; }

@media (min-width: 600px) {
  .desk-filter-row { grid-template-columns: 170px minmax(0, 1fr) auto; }
}
@media (min-width: 900px) {
  .desk-wrap.desk-dash { max-width: 1080px; padding: 18px 24px 40px; }
  .desk-tabs {
    position: static; display: flex; flex-wrap: wrap; gap: .35rem; margin: .1rem 0 1rem; padding: 0;
    background: transparent; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .desk-tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .85rem .3rem .3rem; background: #fff; border: 1px solid var(--p-line); border-radius: 999px; color: var(--p-ink-2); }
  .desk-tabs a:hover { border-color: var(--p-ink); }
  .desk-tabs a.is-on { background: var(--p-ink); color: #fff; border-color: var(--p-ink); }
  .desk-tabs a.is-on .desk-tab-ic { color: var(--p-ink); }
  .desk-tab-ic { width: 28px; height: 28px; }
  .desk-tab-ic .pi { width: 15px; height: 15px; }
  .desk-tab-t { display: inline-flex; align-items: baseline; gap: .35rem; font-size: .8rem; }
  .desk-tab-t small { font-size: .66rem; color: inherit; opacity: .6; }
  .desk-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 20px; }
  .desk-side { position: sticky; top: 14px; }
  .desk-side h2:first-child { margin-top: 0; }
  .desk-hist, .desk-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desk-dash .ag-stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .desk-dash h1 { font-size: 1.6rem; }
}

/* ---- the owner's control room (inside the CRM shell) ------------------- */
.agx {
  font-size: .86rem; line-height: 1.5; border-radius: 22px; padding: clamp(12px, 2vw, 22px);
  background: radial-gradient(48rem 18rem at 92% -8%, rgba(255, 216, 107, .3), transparent 60%), var(--p-paper);
}
.agx a { color: var(--p-ink); }
.agx .muted { color: var(--p-grey); }
.agx .small { font-size: .76rem; }
.agx .tiny { font-size: .68rem; }
.agx-bad { color: #b4121a; }
.agx-switch { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 12px; }
.agx-switch a, .agx-tabs a {
  font: 600 .78rem/1 var(--font-head); padding: .5rem .9rem; border-radius: 999px; text-decoration: none;
  background: #fff; border: 1px solid var(--p-line); color: var(--p-ink-2);
}
.agx-switch a.is-on, .agx-tabs a.is-on { background: var(--p-ink); color: #fff; border-color: var(--p-ink); box-shadow: inset 0 -3px 0 var(--p-lime); }
.agx-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin: 14px 0; }

.agx-hero {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 14px;
  background: #fff; border: 1px solid var(--p-line); border-radius: 20px; padding: 16px 18px; box-shadow: var(--p-shadow);
  animation: pay-rise .5s var(--p-ease) both;
}
.agx-id { display: flex; gap: 14px; align-items: flex-start; min-width: 0; flex: 1 1 440px; }
.agx-id-text { min-width: 0; }
.agx-avatar {
  position: relative; flex: 0 0 auto; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--p-red); color: #fff; font: 800 1.25rem/1 var(--font-head); letter-spacing: -.02em;
  box-shadow: 0 12px 20px -14px rgba(236, 28, 36, .95);
}
.agx-avatar::after { content: ""; position: absolute; top: 8px; right: 8px; width: 8px; height: 9px; background: var(--p-lime); border-radius: 2px; }
.agx-pills { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.agx-tag {
  display: inline-flex; align-items: center; gap: .35rem; background: var(--p-red); color: #fff;
  font: 700 .64rem/1 var(--font-head); letter-spacing: .16em; text-transform: uppercase; padding: .4rem .7rem; border-radius: 999px;
}
.agx-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--p-lime); color: var(--p-lime); animation: pay-dot 1.6s ease-out infinite; }
.agx-pill { font: 600 .66rem/1 var(--font-head); padding: .36rem .58rem; border-radius: 999px; border: 1px solid var(--p-line); background: var(--p-paper); color: var(--p-ink-2); white-space: nowrap; }
.agx-pill--good { background: var(--p-green-soft); border-color: #bfe6cc; color: #0f6b30; }
.agx-pill--bad { background: var(--p-red-soft); border-color: #f5c6cb; color: #b4121a; }
.agx-pill--warn { background: var(--p-amber-soft); border-color: #f1d79a; color: var(--p-amber); }
.agx-pill--quiet { color: var(--p-grey); }
.agx h1 { font: 800 clamp(1.35rem, 2.6vw, 1.85rem)/1.05 var(--font-head); letter-spacing: -.045em; margin: .5rem 0 .35rem; color: var(--p-ink); }
.agx-meta { margin: .15rem 0 0; font-size: .76rem; line-height: 1.55; color: var(--p-grey); }
.agx-meta b { color: var(--p-ink); font-weight: 600; }
.agx-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.agx-actions form { margin: 0; }
.agx-btn {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 34px; padding: 0 .85rem; box-sizing: border-box;
  border-radius: 999px; border: 1.5px solid var(--p-line-2); background: #fff; color: var(--p-ink);
  font: 600 .76rem/1 var(--font-head); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: border-color .15s, transform .15s;
}
.agx a.agx-btn { color: var(--p-ink); }
.agx-btn .pi { width: 14px; height: 14px; }
.agx-btn:hover { border-color: var(--p-ink); }
.agx-btn:active { transform: scale(.98); }
.agx .agx-btn--ink, .agx a.agx-btn--ink { background: var(--p-ink); border-color: var(--p-ink); color: #fff; }
.agx-btn--ink .pi { color: var(--p-lime); }
.agx-btn--lime { background: var(--p-lime); border-color: var(--p-lime); font-weight: 700; }
.agx-btn--warn { background: var(--p-amber-soft); border-color: #f1d79a; color: var(--p-amber); }
.agx-btn--good { background: var(--p-green-soft); border-color: #bfe6cc; color: #0f6b30; }

.agx-top { display: grid; gap: 14px; margin-bottom: 14px; }
.agx-owe .pay-bar-value { font-size: clamp(1.5rem, 3vw, 2rem); }
.agx-owe .pay-chip { display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; font: 600 .74rem/1 var(--font-head); padding: .45rem .75rem; border-radius: 999px; border: 1px solid; }
.agx-owe .pay-chip .pi { width: 14px; height: 14px; }
.agx-alert { margin-bottom: 0; align-self: start; }

.agx-card { background: #fff; border: 1px solid var(--p-line); border-radius: 18px; padding: 14px 16px; box-shadow: var(--p-shadow-sm); margin-bottom: 12px; min-width: 0; }
.agx-h { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin: 0 0 .7rem; font: 800 .95rem/1.2 var(--font-head); letter-spacing: -.02em; color: var(--p-ink); }
.agx .agx-link { font: 600 .74rem/1.2 var(--font-head); color: var(--p-ink); text-decoration: underline; text-decoration-color: var(--p-lime); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.agx-two { display: grid; gap: 12px; margin-bottom: 12px; }
.agx-two .agx-card { margin-bottom: 0; }
.agx-chans { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.agx-chans li { display: flex; align-items: center; gap: .55rem; }
.agx-chans li > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.agx-chans b { font-size: .78rem; font-weight: 600; }
.agx-chans small { font-size: .7rem; color: var(--p-grey); }
.agx-chans li.is-off { opacity: .55; }

.agx .table-wrap { border: 0; border-radius: 0; background: transparent; }
.agx-table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.agx-table th { text-align: left; white-space: nowrap; padding: .45rem .5rem; border-bottom: 1px solid var(--p-line-2); font: 600 .62rem/1.2 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--p-grey); }
.agx-table td { padding: .5rem; border-bottom: 1px dashed var(--p-line); vertical-align: top; }
.agx-table tr:last-child td { border-bottom: 0; }
.agx-table .num { text-align: right; white-space: nowrap; }
.agx-table tbody tr:hover td { background: #faf9f6; }
.agx-table tr.is-late td { background: #fff6f6; }
.agx-wait { display: inline-block; white-space: nowrap; font: 700 .66rem/1 var(--font-head); padding: .28rem .45rem; border-radius: 999px; background: var(--p-amber-soft); color: var(--p-amber); }
.agx-wait.is-late { background: var(--p-red-soft); color: #b4121a; }
.agx-warns { display: block; margin-top: .15rem; font-size: .68rem; color: var(--p-amber); }
.agx-table .nowrap { white-space: nowrap; }
.agx-table .agx-sub { display: block; margin-top: .15rem; font-size: .7rem; color: var(--p-grey); }
.agx-table .agx-sub a { color: var(--p-grey); }
.agx-table .agx-chan { min-width: 110px; max-width: 160px; }
.agx-table .agx-notes { min-width: 160px; max-width: 260px; }

.agx-filter { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; background: #fff; border: 1px solid var(--p-line); border-radius: 16px; padding: .55rem; margin-bottom: .6rem; }
.agx-filter select, .agx-filter input, .agx-record select, .agx-record input {
  min-height: 34px; box-sizing: border-box; padding: 0 .65rem; border: 1.5px solid var(--p-line-2); border-radius: 10px;
  background: #fff; color: var(--p-ink); font: 500 .8rem/1 var(--font-head);
}
.agx-filter input[type=search] { flex: 1 1 220px; min-width: 0; }
.agx-filter select:focus, .agx-filter input:focus, .agx-record select:focus, .agx-record input:focus { outline: none; border-color: var(--p-ink); box-shadow: 0 0 0 3px rgba(239, 255, 4, .55); }
.agx-sum { font-size: .76rem; color: var(--p-grey); margin: .1rem 0 .6rem; }
.agx-sum b { color: var(--p-ink); }
.agx-pager { display: flex; justify-content: center; align-items: center; gap: .7rem; margin-top: .7rem; }
.agx-record { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.agx-record label { display: grid; gap: .25rem; font: 600 .7rem/1.2 var(--font-head); color: var(--p-grey); }
.agx-record .grow { flex: 1 1 280px; }
.agx-addr { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.agx-addr .mono { overflow-wrap: anywhere; }

.agx-timeline { list-style: none; margin: 0; padding: 0; }
.agx-timeline li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: .6rem; padding: .55rem 0; border-bottom: 1px dashed var(--p-line); }
.agx-timeline li:last-child { border-bottom: 0; }
.agx-dot { width: 10px; height: 10px; margin-top: .35rem; border-radius: 50%; background: var(--p-ink); box-shadow: 0 0 0 3px var(--p-paper); }
.agx-timeline .is-login .agx-dot { background: var(--p-green); }
.agx-timeline .is-bad .agx-dot { background: var(--p-red); }
.agx-ev { margin: 0; font-size: .8rem; }
.agx-ev-d { margin: .15rem 0 0; font-size: .7rem; color: var(--p-grey); overflow-wrap: anywhere; }
.agx-ev-t { font-size: .7rem; color: var(--p-grey); white-space: nowrap; }
.agx-empty { text-align: center; padding: 1.6rem 1rem; }
.agx-empty p { margin: .2rem 0; }

@media (min-width: 760px) {
  .agx .ag-stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .agx-top { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .agx-two { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .agx { border-radius: 16px; }
  .agx-hero { padding: 14px; }
  .agx-avatar { width: 46px; height: 46px; border-radius: 13px; font-size: 1.05rem; }
  .agx-actions { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .agx *, .agx *::before, .agx *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition: none !important;
  }
}

/* NF-377/378: alerts bar, channel groups, "amount matches", money seen in SMS */
.desk-alerts { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 0 0 .8rem; }
.desk-alerts form { margin: 0; }
.desk .desk-test { min-height: 34px; border-radius: 999px; border: 1.5px solid var(--p-line-2); background: #fff; color: var(--p-ink); font: 600 .74rem/1 var(--font-head); padding: 0 .8rem; cursor: pointer; }
.desk-alerts-ok { display: inline-flex; align-items: center; gap: .3rem; font: 600 .74rem/1.2 var(--font-head); color: #0f6b30; }
.desk-alerts-ok .pi { width: 14px; height: 14px; }
.desk .desk-group { margin: .9rem 0 .45rem; font-size: .82rem; color: var(--p-grey); text-transform: uppercase; letter-spacing: .08em; }
.desk .desk-fill { display: block; width: 100%; min-height: 34px; margin-top: .45rem; border-radius: 999px; border: 1.5px dashed var(--p-line-2); background: var(--p-paper); color: var(--p-ink); font: 600 .76rem/1 var(--font-head); cursor: pointer; }
.desk .desk-fill:hover { border-color: var(--p-ink); }
.desk-seen { display: flex; align-items: center; gap: .4rem; margin-top: .45rem; padding: .45rem .6rem; border-radius: 10px; background: var(--p-green-soft); border: 1px solid #bfe6cc; color: #0f6b30; font: 600 .78rem/1.35 var(--font-head); }
.desk-seen .pi { width: 15px; height: 15px; }
.desk-card.is-seen { border-color: #bfe6cc; }
.desk-recent .item .desk-smsbody { grid-column: 1 / -1; font-size: .72rem; overflow-wrap: anywhere; }

/* NF-381..383: reports for any period, receipts */
.ag-rep-dates { align-items: end; }
.desk .ag-rep-date { display: grid; gap: .25rem; margin: 0; font-size: .7rem; color: var(--p-grey); }
.desk-rlink { display: inline-flex; align-items: center; gap: .35rem; margin-top: .45rem; font: 700 .78rem/1.2 var(--font-head); color: var(--p-ink); text-decoration: underline; text-decoration-color: var(--p-lime); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.desk-rlink .pi { width: 15px; height: 15px; }
.desk .desk-remit input[type=file] { padding: .45rem; font-size: .8rem; }
.agx-chip { position: relative; display: inline-flex; }
.agx-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.agx-chip span { display: inline-block; font: 600 .76rem/1 var(--font-head); padding: .5rem .8rem; border-radius: 999px; border: 1.5px solid var(--p-line-2); background: #fff; cursor: pointer; white-space: nowrap; }
.agx-chip input:checked + span { background: var(--p-ink); color: #fff; border-color: var(--p-ink); }
.agx-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(239, 255, 4, .6); }
.agx-date { display: inline-flex; align-items: center; gap: .3rem; font: 600 .72rem/1 var(--font-head); color: var(--p-grey); }
@media (max-width: 899px) { .desk-tabs { grid-template-columns: repeat(6, minmax(0, 1fr)); } .desk-tab-ic { width: 34px; } }
.pay-upload { border: 1.5px dashed var(--p-line-2); background: #fff; text-align: center; }
.pay-upload-btn { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; font: 700 .9rem/1 var(--font-head); padding: .75rem 1.1rem; border-radius: 999px; background: var(--p-lime); color: var(--p-ink); }
.pay-upload-btn .pi { width: 18px; height: 18px; }
.pay-upload-msg { margin: .5rem 0 0; font: 600 .82rem/1.45 var(--font-head); color: var(--p-ink-2); }
.pay-upload-msg.is-ok { color: #0f6b30; }
.pay-upload-msg.is-bad { color: #b4121a; }

/* NF-384: undo a rejection made by mistake (desk last decisions + history). */
.desk .desk-undo { grid-column: 1 / -1; margin-top: .3rem; }
.desk .desk-undo summary { justify-content: flex-start; min-height: 30px; padding: 0 .55rem; color: var(--p-ink-2); font-size: .76rem; }
.desk .desk-undo summary .pi { width: 13px; height: 13px; }
.desk .desk-undo summary:hover, .desk .desk-undo[open] summary { background: var(--p-paper); color: var(--p-ink); }
.desk .desk-undo p { margin: .45rem .1rem 0; font-size: .78rem; line-height: 1.45; color: var(--p-ink-2); }

/* NF-385: the report's headline -- what the agent owes NOVE for the chosen period. */
.ag-stat--owe { grid-column: 1 / -1; border: 1.5px solid var(--p-ink); background: #fff; }
.ag-stat--owe .pay-tile { width: 34px; height: 34px; border-radius: 10px; }
.ag-stat--owe .pay-tile .pi { width: 17px; height: 17px; }
.ag-stat--owe .ag-stat-label { font-size: .72rem; color: var(--p-ink-2); }
.ag-stat--owe .ag-stat-value { font-size: 1.5rem; }
.ag-stat--owe .ag-stat-sub { font-size: .72rem; }

/* ==========================================================================
   NF-423: the agent payment page, simple and trusted -- one number first,
   the PIN-screen name, a preview of the PIN prompt, the promise, honest
   figures, paste-the-SMS, a tracker. NF-425: the public number check.
   ========================================================================== */
.pay-swbtn {
  display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
  font: 700 .86rem/1 var(--font-head); color: var(--p-ink);
  background: var(--p-lime); border: 0; border-radius: 999px; padding: .62rem 1rem;
  box-shadow: 0 10px 18px -12px rgba(90, 100, 0, .9);
}
.pay-swbtn .pi { width: 16px; height: 16px; }
.pay-swbtn:hover { background: var(--p-ink); color: var(--p-lime); }

.pay-channel-main { display: grid; gap: .55rem; }
.pay-namebox { background: var(--p-amber-soft); border: 1.5px solid #f1d79a; border-radius: var(--p-r-sm); padding: .6rem .75rem; }
.pay-namebox p { margin: .2rem 0 0; color: #5c3d00; font-size: .8rem; line-height: 1.5; }
.pay-namebox strong { color: var(--p-ink); font: 800 .9rem/1.35 var(--font-head); letter-spacing: -.01em; }
.pay-namebox .small { font-size: .74rem; }

.pay-pin { position: relative; border-radius: 14px; background: var(--p-ink); color: #fff; padding: .7rem .8rem .65rem; }
.pay-pin-tag { display: block; font: 600 .6rem/1.2 var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: var(--p-lime); margin-bottom: .3rem; }
.pay-pin p { margin: 0; font: 700 .86rem/1.35 var(--font-head); }
.pay-pin .pay-pin-sub { margin-top: .2rem; font-weight: 400; font-size: .74rem; color: rgba(255, 255, 255, .72); }
.pay-dialbtn { min-height: 42px; font-size: .9rem; }
.pay-dialbtn .pi { color: var(--p-lime); }

.pay-others { background: #fff; border: 1.5px solid var(--p-line); border-radius: 13px; padding: .1rem .5rem .5rem; }
.pay-others > summary { cursor: pointer; padding: .55rem .2rem; font: 700 .84rem/1.3 var(--font-head); color: var(--p-ink-2); }
.pay-others[open] > summary { color: var(--p-ink); }

.pay-promise { display: flex; gap: .6rem; align-items: flex-start; background: var(--p-green-soft); border: 1.5px solid #bfe6cc; border-radius: var(--p-r); padding: .75rem .8rem; }
.pay-promise p { margin: 0; font-size: .8rem; line-height: 1.5; color: #0f4d27; }
.pay-promise strong { color: #0b3b1d; font-family: var(--font-head); }
.pay-live { display: flex; align-items: center; gap: .5rem; margin: 0; font: 600 .76rem/1.4 var(--font-head); color: var(--p-ink-2); padding: 0 .2rem; }
.pay-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--p-green); box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); flex: 0 0 auto; }

.pay-or { display: flex; align-items: center; gap: .6rem; margin: .1rem 0 .7rem; color: var(--p-grey); font: 600 .72rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .14em; }
.pay-or::before, .pay-or::after { content: ""; flex: 1; border-top: 1px dashed var(--p-line-2); }
.pay textarea.input { min-height: 96px; resize: vertical; line-height: 1.45; }

.pay-faq { display: grid; gap: .1rem; }
.pay-faq details { border-bottom: 1px dashed var(--p-line-2); padding: .5rem 0; }
.pay-faq details:last-child { border-bottom: 0; }
.pay-faq summary { cursor: pointer; font: 700 .84rem/1.35 var(--font-head); color: var(--p-ink); }
.pay-faq p { margin: .4rem 0 0; font-size: .8rem; line-height: 1.55; color: var(--p-ink-2); }
.pay-faq a { color: var(--p-ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--p-lime); text-decoration-thickness: 2px; }

.pay-typed > summary { cursor: pointer; padding: .4rem .2rem; font: 600 .8rem/1.3 var(--font-head); color: var(--p-grey); }
.pay-typed[open] > summary { color: var(--p-ink); margin-bottom: .4rem; }

.pay-track { list-style: none; margin: .8rem 0 .2rem; padding: 0; display: grid; gap: .45rem; }
.pay-track li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: .5rem; align-items: center; font: 600 .82rem/1.35 var(--font-head); color: var(--p-grey); }
.pay-track i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--p-line); }
.pay-track i .pi { width: 12px; height: 12px; }
.pay-track .is-done { color: var(--p-ink); }
.pay-track .is-done i { background: var(--p-green); color: #fff; }
.pay-track .is-now { color: var(--p-ink); }
.pay-track .is-now i { background: var(--p-ink); box-shadow: 0 0 0 3px rgba(239, 255, 4, .6); }
.pay-track time { font: 500 .74rem/1 var(--font-mono, ui-monospace); color: var(--p-grey); }
.pay-track-note { margin: .35rem 0 0; text-align: center; font-size: .78rem; line-height: 1.5; color: var(--p-grey); }

.lipa-result { margin-top: .8rem; }
.lipa-cert { border: 1.5px solid var(--p-ink); }
.lipa-cert p { margin: .3rem 0 0; font-size: .84rem; line-height: 1.55; }
.lipa-sign { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .8rem; margin-top: .8rem; }
.lipa-sign img { max-width: 160px; height: auto; }
.lipa-sign p { margin: 0; font-size: .8rem; line-height: 1.4; }
@media (prefers-reduced-motion: reduce) { .pay-swbtn, .pay-dialbtn { transition: none; } }

/* NF-424: the desk -- opened payments to tick, missing ones, "all on my statement". */
.desk .desk-card.is-opened { border-color: #bfe6cc; box-shadow: inset 4px 0 0 var(--p-green), var(--p-shadow); }
.desk .desk-tickall { margin: 0 0 10px; }
.desk .desk-tickall .ok { width: 100%; }
.desk .desk-note { margin: .35rem 0 .5rem; font-size: .74rem; line-height: 1.45; color: var(--p-ink-2); }
.desk .desk-smsbody { font: 400 .76rem/1.45 var(--font-head); color: var(--p-ink-2); overflow-wrap: anywhere; }

/* NF-423 review: the PIN preview reads white on black (the card rule set grey
   text), the Dial icon is lime not WhatsApp green, and the signature scan is
   white ink on black, shown here as black ink on the card. */
.pay .pay-pin p { color: #fff; }
.pay .pay-pin .pay-pin-sub { color: rgba(255, 255, 255, .72); }
.pay .pay-dialbtn .pi { color: var(--p-lime); }
.lipa-sign img { filter: invert(1); mix-blend-mode: multiply; }
