/* =====================================================================
   INTEL AFRICA — part2.css
   Plans, plan payment panel, referrals, PIN boxes + keypad sheet, tasks.
   Loaded after intel.css / polish.css / v2.css via view('head', ['css' => ['part2.css']]).
   ===================================================================== */

/* ---------- shared bits ---------- */
.page-head { margin: 6px 0 16px; }
.page-head p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: 11.5px; font-weight: 800; white-space: nowrap;
  background: var(--surface-2); color: var(--muted);
}
.pill.ok   { background: var(--success-bg); color: var(--success); }
.pill.warn { background: var(--warning-bg); color: var(--warning); }
.pill.bad  { background: var(--danger-bg);  color: var(--danger); }
.pill.info { background: var(--grad-soft);  color: var(--link); }
.btn-link { border: 0; background: none; padding: 0; color: var(--link); font-weight: 700; font-size: 13px; }
.stack > * + * { margin-top: 12px; }
.hint-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); color: var(--muted); font-size: 12.5px; }
.hint-box .icon { flex: none; margin-top: 1px; color: var(--link); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.pager .btn { height: 36px; padding: 0 14px; font-size: 13px; }
@media (min-width: 760px) { .app-main.wide { max-width: 1000px; } }

/* =====================================================================
   PLANS
   ===================================================================== */
.plans-wrap { margin: 0 -16px; container-type: inline-size; }
.plans-track {
  display: flex; gap: 12px; padding: 6px 12cqw 18px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.plans-track::-webkit-scrollbar { display: none; }
.plan-card {
  --plan: var(--brand);
  position: relative; flex: 0 0 76cqw; scroll-snap-align: center;
  display: flex; flex-direction: column; padding: 20px 18px 18px; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--plan) 6%, transparent), transparent 42%), var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.plan-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--plan); }
@media (hover: hover) {
  .plan-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--plan) 35%, var(--border));
    box-shadow: 0 8px 24px color-mix(in srgb, var(--plan) 25%, transparent); }
}
.plan-card.is-current { border-color: color-mix(in srgb, var(--plan) 50%, var(--border)); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.plan-badge {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 800; color: var(--plan);
  background: color-mix(in srgb, var(--plan) 12%, transparent);
}
.plan-popular { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 800; background: var(--grad); color: #fff; box-shadow: var(--shine); }
.plan-price { margin: 18px 0 4px; font-size: 28px; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
.plan-once { font-size: 12px; color: var(--muted); }
.plan-rows { list-style: none; margin: 14px 0 18px; padding: 0; }
.plan-rows li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13px; }
.plan-rows li:last-child { border-bottom: 1px solid var(--border); }
.plan-rows span { color: var(--muted); }
.plan-rows strong { font-variant-numeric: tabular-nums; }
.plan-card .btn { margin-top: auto; }
.plan-dots { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
.plan-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: var(--r-pill); background: var(--border); transition: background-color .2s var(--ease); }
.plan-dots button.is-active { width: 20px; background: var(--brand); }
@media (min-width: 760px) {
  .plans-wrap { margin: 0; }
  .plans-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 6px 0 18px; overflow: visible; }
  .plan-dots { display: none; }
}

/* =====================================================================
   PLAN PAYMENT PANEL
   ===================================================================== */
.pay-panel {
  position: relative; overflow: hidden; padding: 20px 18px; border-radius: var(--r-xl);
  background: var(--panel); color: #fff; box-shadow: 0 24px 48px -28px rgba(6,21,64,.9);
}
.pay-panel::before { content: ""; position: absolute; inset: 0; background: var(--panel-glow); pointer-events: none; }
.pay-panel > * { position: relative; }
.pay-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pay-plan { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.timer {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px;
}
.timer.low { background: rgba(255,210,26,.18); border-color: rgba(255,210,26,.45); color: var(--withdraw); }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.pay-row:last-of-type { border-bottom: 0; }
.pay-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .65; margin-bottom: 3px; }
.pay-value { font-size: 15px; font-weight: 700; word-break: break-word; }
.acct-no { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 27px; font-weight: 700; letter-spacing: .02em; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; flex: none;
  border: 1px solid rgba(255,255,255,.24); border-radius: var(--r-pill); background: rgba(255,255,255,.1); color: #fff;
  font-size: 12px; font-weight: 700; transition: background-color .15s, transform .12s var(--ease);
}
.copy-btn:active { transform: scale(.96); }
.copy-btn.done { background: rgba(14,159,110,.35); border-color: rgba(52,211,153,.6); }
.pay-amount { margin-top: 4px; padding: 16px; border-radius: var(--r-lg); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.pay-amount p { font-size: 13px; opacity: .85; }
.pay-amount strong { display: block; font-size: 32px; letter-spacing: -.03em; margin-top: 2px; opacity: 1; }
.pay-warn { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: 12px;
  background: var(--withdraw); color: var(--withdraw-text); font-size: 12.5px; font-weight: 700; }
.pay-foot { margin-top: 14px; font-size: 12px; opacity: .7; text-align: center; }
.pay-actions { display: grid; gap: 10px; margin-top: 16px; }
.pay-status { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.pay-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: ia-pulse 1.4s ease-in-out infinite; }
@keyframes ia-pulse { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }
.summary { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.summary .plan-badge { --plan: var(--brand); }

/* =====================================================================
   REFERRALS
   ===================================================================== */
.ref-card { padding: 18px; }
.ref-link {
  display: block; margin: 10px 0 14px; padding: 12px 14px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--brand) 45%, var(--border));
  background: var(--grad-soft); font-family: var(--font-num); font-size: 13px; font-weight: 600; word-break: break-all; color: var(--text);
}
.ref-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 14px 6px; }
.stat { text-align: center; padding: 0 4px; border-left: 1px solid var(--border); }
.stat:first-child { border-left: 0; }
.stat strong { display: block; font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat > span { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.stat.earned strong { color: var(--success); font-size: 15px; line-height: 27px; }
.people { padding: 4px 16px; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.person:first-child { border-top: 0; }
.person .avatar { width: 38px; height: 38px; font-size: 12.5px; }
.person-main { flex: 1; min-width: 0; }
.person-name { font-weight: 700; }
.person-meta { font-size: 12px; color: var(--muted); }
.rtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.rtable th { text-align: left; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 800; padding: 0 0 8px; }
.rtable td { padding: 10px 0; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.rtable th:not(:first-child), .rtable td:not(:first-child) { text-align: right; }
.rtable .dot-c { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--plan); }
.rtable td:last-child { font-weight: 800; color: var(--success); }

/* bottom sheet (share sheet + PIN sheet) */
.sheet-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(6,12,28,.5); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; max-width: 520px; margin: 0 auto;
  padding: 10px 20px calc(22px + env(safe-area-inset-bottom)); border-radius: var(--r-modal) var(--r-modal) 0 0;
  background: var(--surface); box-shadow: 0 -20px 50px -20px rgba(0,0,0,.35);
  /* Part 5: opens from translateY(14px) + opacity 0 in 0.28s with the pop easing */
  transform: translateY(14px); opacity: 0; visibility: hidden;
  transition: transform .28s var(--ease-pop), opacity .28s var(--ease-pop), visibility 0s .28s;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet.open { transform: translateY(0); opacity: 1; visibility: visible; transition: transform .28s var(--ease-pop), opacity .28s var(--ease-pop); }
.sheet-grip { width: 40px; height: 4px; margin: 0 auto 14px; border-radius: var(--r-pill); background: var(--border); }
.sheet-title { font-size: 16px; font-weight: 800; text-align: center; }
.sheet-sub { margin-top: 4px; font-size: 12.5px; color: var(--muted); text-align: center; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0 6px; }
.share-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--text); font-size: 12px; font-weight: 700; }
.share-ico { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border); color: var(--link); transition: transform .15s var(--ease); }
.share-ico img { width: 28px; height: 28px; }
.share-btn:active .share-ico { transform: scale(.94); }

/* =====================================================================
   PIN — 4 boxes (set/change/forgot) and the keypad sheet
   ===================================================================== */
.pin-boxes { display: flex; gap: 10px; }
.pin-boxes input {
  width: 56px; height: 60px; padding: 0; text-align: center; font-family: var(--font-num); font-size: 24px; font-weight: 700;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text);
  -webkit-text-security: disc; transition: border-color .15s, box-shadow .15s;
}
.pin-boxes input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.pin-boxes input.filled { border-color: color-mix(in srgb, var(--brand) 55%, var(--border)); }
.has-error .pin-boxes input { border-color: var(--danger); }
.code-input { letter-spacing: .4em; font-family: var(--font-num); font-size: 20px; font-weight: 700; text-align: center; }

.pin-dots { display: flex; justify-content: center; gap: 18px; margin: 22px 0 8px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); background: transparent; transition: background .15s, border-color .15s, transform .15s var(--ease-pop); }
.pin-dots i.on { border-color: transparent; background: var(--grad); transform: scale(1.08); }
.pin-dots.bad i { border-color: var(--danger); background: var(--danger); }
.pin-dots.shake { animation: ia-shake .35s linear; }
@keyframes ia-shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.pin-msg { min-height: 20px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--danger); }
.pin-msg.muted { color: var(--muted); font-weight: 600; }
.keypad { display: grid; grid-template-columns: repeat(3, 56px); justify-content: center; gap: 14px 30px; margin: 14px 0 8px; }
.key {
  width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-family: var(--font-num); font-size: 22px; font-weight: 600; display: grid; place-items: center;
  transition: transform .1s var(--ease), background-color .15s;
}
.key:active { transform: scale(.92); background: var(--grad-soft); }
.key.blank { visibility: hidden; }
.key.back { background: none; border-color: transparent; color: var(--muted); }
.keypad.busy { opacity: .5; pointer-events: none; }
.pin-forgot { display: block; margin-top: 6px; text-align: center; font-size: 12.5px; font-weight: 700; }

/* =====================================================================
   TASKS
   ===================================================================== */
.seg { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px; margin-bottom: 14px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border); }
.seg-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 4); border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow);
  transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .3s var(--ease); }
.seg button { position: relative; z-index: 1; height: 34px; border: 0; background: none; font-size: 12.5px; font-weight: 700; color: var(--muted); transition: color .2s; }
.seg button[aria-selected="true"] { color: var(--text); }
.seg button .n { font-size: 11px; color: var(--faint); margin-left: 2px; }
.quota { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--grad-soft); border: 1px solid rgba(0,82,255,.16); font-size: 13px; font-weight: 700; }
.quota strong { color: var(--link); }
.task-list { display: grid; gap: 10px; }
.task-card { display: flex; align-items: center; gap: 12px; padding: 14px; color: var(--text); transition: transform .15s var(--ease), border-color .15s; }
.task-card:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.task-card:active { transform: scale(.99); }
.task-ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 13px; background: var(--grad-soft); color: var(--link); }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-desc { margin-top: 2px; font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.task-reward { flex: none; align-self: flex-start; }
.task-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.task-hero .task-ico { width: 52px; height: 52px; border-radius: 16px; }
.task-body { white-space: normal; font-size: 13.5px; line-height: 1.65; }
.task-img { width: 100%; margin-top: 14px; border-radius: var(--r); border: 1px solid var(--border); }
.reward-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; font-size: 12.5px; color: var(--success); font-weight: 700; }
.file-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 14px; border: 1.5px dashed var(--border); border-radius: var(--r); background: var(--surface-2); text-align: center; cursor: pointer; color: var(--muted); font-size: 12.5px; }
.file-drop:hover { border-color: var(--brand); }
.file-drop strong { color: var(--text); font-size: 13.5px; }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-preview { max-height: 220px; margin: 10px auto 0; border-radius: 12px; }
textarea.input { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; }
.sub-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.sub-row:first-child { border-top: 0; }
.sub-main { flex: 1; min-width: 0; }
.sub-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-meta { font-size: 12px; color: var(--muted); }
.sub-reason { margin-top: 4px; font-size: 12px; color: var(--danger); }
.sub-amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.locked-card { text-align: center; padding: 34px 22px 26px; }
