/* ================= MC PAY v7 — design corrections ================= */
/* Loaded AFTER app.css + v4.css. Only fixes layout/geometry defects and
   aligns shapes with the reference design. No colour-token changes. */

/* ---------- 1. overflow containment (gcard / rhero / card-h) ---------- */
.gcard,.rhero,.hero{max-width:100%}
.card-h{min-width:0}
.card-h>div{min-width:0;flex:1 1 auto}
.card-h h2,.card-h p{overflow-wrap:anywhere}
.card-link{flex:0 0 auto}
.gcard .card-h{flex-wrap:wrap;row-gap:6px}
.gcard .card-link{margin-left:auto}
.rhero-sub{flex-wrap:wrap;row-gap:4px;min-width:0}
.rhero h2{overflow-wrap:anywhere}

/* ---------- 2. stepper: keep connector inside the box ---------- */
.stepper{overflow:hidden;padding:0 2px}
.step{min-width:0}
.step-lbl{
  font-size:10px;line-height:1.25;max-width:100%;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.step:not(:last-child)::after{
  left:calc(50% + 15px);right:calc(-50% + 15px);top:11px;
}

/* ---------- 3. pill-shaped primary buttons (reference geometry) ---------- */
.btn{border-radius:999px;padding:15px 18px;font-size:14.5px;letter-spacing:.1px}
.btn-sm{border-radius:999px;padding:9px 16px;font-size:12px}
.paybtn{border-radius:999px}
.paybtn.out{border-radius:999px}
.order-cta{border-radius:999px}
.copybtn{border-radius:999px}
.pick{border-radius:999px}
.pill{border-radius:999px}
.toggle{border-radius:999px}
.toggle a{border-radius:999px}
.rhero-toggle a{border-radius:999px}
.gbadge{border-radius:999px}
.badge{border-radius:999px}

/* ---------- 4. card geometry: softer, consistent radius ---------- */
:root{--r-lg:22px;--r-md:18px;--r-sm:14px}
.order-card{border-radius:18px;padding:16px}
.sumcard{border-radius:18px}
.paysheet{border-radius:22px}
.netbox{border-radius:18px}
.wcard{border-radius:18px}
.panel{border-radius:18px}
.kpi{border-radius:18px}
.sec-card,.list-card,.menu-card{border-radius:18px}

/* ---------- 5. bottom nav: pill active state (reference) ---------- */
.tabbar{padding:8px 6px calc(8px + env(safe-area-inset-bottom))}
.tab{
  gap:4px;padding:6px 0 4px;font-size:10.5px;font-weight:700;
  border-radius:14px;transition:color .15s;
}
.tab.active{color:var(--g700)}
.tab.active::before{
  content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);
  width:44px;height:30px;border-radius:12px;background:#e6f6ee;z-index:-1;
}
.tab .ic{position:relative;z-index:1}

/* ---------- 6. page head: back button + title rhythm ---------- */
.pagehead{padding:16px 16px 6px;gap:11px}
.pagehead .back{width:36px;height:36px;border-radius:12px}
.pagehead h1{font-size:20px;letter-spacing:-.3px}

/* ---------- 7. appbar breathing room ---------- */
.appbar{padding:13px 16px}
.brand-mark{width:36px;height:36px;border-radius:11px}
.brand-txt b{font-size:15.5px}
.icon-btn{width:37px;height:37px;border-radius:12px}
.user-pill{padding:8px 11px;border-radius:999px}

/* ---------- 8. payment sheet polish ---------- */
.paysheet{padding:18px}
.paysheet-h h2{font-size:17px}
.payinput{
  display:block;width:100%;box-sizing:border-box;
  padding:13px 15px;border-radius:14px;font-size:14px;
}
.payinput::placeholder{font-size:13px;color:#9db3a9}
.paynote{font-size:11px;line-height:1.6;text-align:center;margin-top:10px;color:var(--muted)}
.tile{border-radius:16px;padding:13px 14px}
.tile-num{border-radius:16px;padding:13px 14px}
.tile-num .tn-val{font-size:15px;letter-spacing:.2px;overflow-wrap:anywhere}
.sumrow{padding:9px 0}
.sumrow.total{padding-top:11px}

/* ---------- 9. order card internals ---------- */
.order-head{gap:10px;min-width:0}
.order-amount{font-size:21px;letter-spacing:-.4px}
.order-meta{gap:10px}
.order-meta-label{font-size:10px;letter-spacing:.2px}
.order-meta-value{font-size:12.5px;font-weight:800}
.order-acct{overflow-wrap:anywhere}

/* ---------- 10. method logos: reference proportions ---------- */
.paylogo{width:30px;height:30px;border-radius:9px}
.order-logo{width:32px;height:32px;border-radius:10px}
.pick-logo{width:22px;height:22px;border-radius:6px}
.wsvc-logo{width:30px;height:30px;border-radius:9px}

/* ---------- 11. safe bottom clearance above fixed tabbar ---------- */
.shell{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
.main{padding-bottom:16px}

/* ---------- 12. small-screen tightening ---------- */
@media (max-width:380px){
  .main{padding-left:14px;padding-right:14px}
  .pagehead{padding-left:14px;padding-right:14px}
  .appbar{padding-left:14px;padding-right:14px}
  .order-amount{font-size:19px}
  .step-lbl{font-size:9.5px}
  .btn{font-size:14px;padding:14px 16px}
}
