/* Sadiba — customer app */
body.app { background: var(--bg); }
.shell { min-height: 100vh; min-height: 100dvh; }
.screen {
  position: relative; max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); padding-bottom: calc(92px + env(safe-area-inset-bottom));
}
.screen.no-tabbar { padding-bottom: 28px; }
.content { padding: 16px; }
.content-tight { padding: 0 16px 16px; }

/* Gradient app bar for inner screens */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 14px) 16px 16px;
  background: var(--grad); color: #fff; border-radius: 0 0 22px 22px;
  box-shadow: 0 8px 22px rgba(160, 20, 120, .18);
}
.bar h1 { font-size: 18px; color: #fff; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, .16); color: #fff; border: 0; cursor: pointer; position: relative;
}
.icon-btn:hover { background: rgba(255, 255, 255, .26); color: #fff; }
.icon-btn .dot {
  position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px;
  background: #FFD24A; color: var(--v-900); font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid #D0158A;
}

/* Home hero */
.hero {
  position: relative; overflow: hidden; color: #fff; background: var(--grad);
  padding: calc(env(safe-area-inset-top) + 18px) 18px 86px; border-radius: 0 0 30px 30px;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.22), rgba(255,255,255,0) 70%);
}
.hero::before { width: 260px; height: 260px; right: -90px; top: -110px; }
.hero::after { width: 200px; height: 200px; left: -80px; bottom: -120px; }
.hero .who { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.hero .who .avatar { background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.55); }
.hero .hello { font-size: 13px; opacity: .85; }
.hero .name { font-size: 17px; font-weight: 600; }
.balance { position: relative; z-index: 1; margin-top: 20px; }
.balance .label-sm { font-size: 13px; opacity: .85; display: flex; align-items: center; gap: 6px; }
.balance .amount { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.balance .amount strong { font-size: 32px; font-weight: 700; letter-spacing: -.5px; }
.balance .eye { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.18); border: 0; color: #fff; cursor: pointer; }
.balance.is-hidden .amount strong { letter-spacing: 3px; }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 10px; margin-top: 16px; }
.hero-actions .btn { min-height: 40px; padding: 0 16px; font-size: 14px; background: rgba(255,255,255,.18); color: #fff; }
.hero-actions .btn:hover { background: rgba(255,255,255,.28); }
.hero-actions .btn.solid { background: #fff; color: var(--m-600); }

/* Main action tiles (overlap the hero) */
.tiles {
  position: relative; z-index: 2; margin: -62px 16px 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.tile {
  display: flex; align-items: center; gap: 12px; padding: 14px; background: #fff; border-radius: 18px;
  box-shadow: var(--shadow); border: 1px solid rgba(239, 227, 240, .8); color: var(--ink); min-height: 74px;
}
.tile:hover { color: var(--ink); border-color: var(--m-200); }
.tile .ti {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--m-50); color: var(--m-600);
}
.tile.t2 .ti { background: #F2E8FB; color: var(--v-600); }
.tile.t3 .ti { background: #E7F1FF; color: #2F64D8; }
.tile.t4 .ti { background: #E5F7EE; color: #11975A; }
.tile b { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; }
.tile small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.notice { margin: 16px 16px 0; }

/* Services row (bKash / Nagad / Rocket) */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.service {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px;
  background: #fff; border-radius: 16px; border: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 600;
}
.service:hover { border-color: var(--m-200); color: var(--ink); }

/* Rate chips */
.rate-strip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 4px; margin: 0 -16px; scroll-snap-type: x mandatory; }
.rate-strip::-webkit-scrollbar { display: none; }
.rate-chip {
  flex: none; scroll-snap-align: start; min-width: 168px; padding: 12px 14px; border-radius: 16px; background: #fff;
  border: 1px solid var(--line); color: var(--ink);
}
.rate-chip .row { gap: 8px; }
.rate-chip .code { font-weight: 700; font-size: 14px; }
.rate-chip .country { font-size: 12px; color: var(--muted); }
.rate-chip .val { margin-top: 8px; font-size: 18px; font-weight: 700; color: var(--m-600); }
.rate-chip .sub { font-size: 12px; color: var(--muted); }

/* Transaction rows */
.tx-list { background: #fff; border-radius: var(--radius); border: 1px solid rgba(239, 227, 240, .8); box-shadow: var(--shadow); overflow: hidden; }
.tx { display: flex; align-items: center; gap: 12px; padding: 13px 15px; color: var(--ink); border-bottom: 1px solid var(--line); }
.tx:last-child { border-bottom: 0; }
.tx:hover { background: #FFF9FC; color: var(--ink); }
.tx .ti { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.ti.in { background: var(--ok-bg); color: var(--ok); }
.ti.out { background: var(--m-50); color: var(--m-600); }
.ti.neutral { background: #F1ECF3; color: var(--muted); }
.tx .t-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .t-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .t-amt { text-align: right; flex: none; }
.tx .t-amt b { display: block; font-size: 14.5px; }
.t-amt .in { color: var(--ok); }
.t-amt .out { color: var(--ink); }
.t-amt .void { color: var(--muted); text-decoration: line-through; }
.tx .pill { margin-top: 3px; }

/* Segmented control */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: #F2E7F3; border-radius: 15px; }
.seg > a, .seg > label, .seg > button {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 8px;
  border-radius: 12px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); cursor: pointer; border: 0; background: none; text-align: center; line-height: 1.2;
}
.seg > .is-active, .seg input:checked + span { background: #fff; color: var(--m-600); box-shadow: 0 2px 8px rgba(120, 20, 110, .12); }
.seg label { padding: 0; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 42px; border-radius: 12px; padding: 0 8px; }

/* Method / currency picker */
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choices.two { grid-template-columns: repeat(2, 1fr); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > a, .choice > label {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 98px; padding: 14px 8px 12px; border: 1.5px solid var(--line-2); border-radius: 16px; background: #fff;
  font-weight: 600; font-size: 13.5px; color: var(--ink); cursor: pointer; text-align: center; line-height: 1.25;
}
.choice small { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.choice .is-active, .choice input:checked + label, .choice > a.is-active {
  border-color: var(--m-500); background: var(--m-50); box-shadow: 0 0 0 3px rgba(224, 24, 127, .12);
}
.choice .tick {
  position: absolute; top: 7px; right: 7px; width: 20px; height: 20px; border-radius: 50%; display: none; place-items: center;
  background: var(--m-500); color: #fff;
}
.choice .is-active .tick, .choice input:checked + label .tick { display: grid; }

/* "Pay to" box */
.payto { border-radius: 18px; padding: 16px; background: var(--grad-soft); border: 1px dashed var(--m-200); }
.payto .acc { display: flex; align-items: center; gap: 12px; }
.payto .acc-no { font-size: 21px; font-weight: 700; letter-spacing: .5px; }
.payto ol { margin: 10px 0 0; padding-left: 20px; font-size: 13.5px; color: var(--ink-2); }
.payto ol li + li { margin-top: 3px; }
.payto pre { white-space: pre-wrap; font-family: inherit; font-size: 13.5px; margin: 10px 0 0; color: var(--ink-2); }

/* Quote preview */
.quote { border-radius: 16px; border: 1.5px dashed var(--line-2); padding: 4px 16px; background: #fff; }
.quote.is-error { border-color: #F6C1C8; background: #FFF8F9; }
.quote .q-error { padding: 10px 0; color: var(--bad); font-size: 13.5px; }
.receive-box { border-radius: 18px; padding: 16px; background: var(--grad); color: #fff; }
.receive-box .lbl { font-size: 13px; opacity: .85; }
.receive-box .big { font-size: 28px; font-weight: 700; letter-spacing: -.3px; }
.receive-box .rate { font-size: 12.5px; opacity: .85; margin-top: 2px; }

/* Upload */
.upload {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1.5px dashed var(--line-2);
  background: #fff; cursor: pointer; color: var(--ink-2); font-size: 14px;
}
.upload:hover { border-color: var(--m-400); }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload .ti { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--m-50); color: var(--m-600); flex: none; }
.upload img.preview { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; }

/* Success screen */
.done { text-align: center; padding: 34px 20px 10px; }
.done .badge { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: var(--ok-bg); animation: pop .4s ease; }
.done .badge span { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; box-shadow: 0 10px 24px rgba(20, 161, 90, .35); }
.done .badge.pending { background: var(--warn-bg); }
.done .badge.pending span { background: var(--warn); box-shadow: 0 10px 24px rgba(217, 138, 6, .3); }
.done .badge.failed { background: var(--bad-bg); }
.done .badge.failed span { background: var(--bad); box-shadow: 0 10px 24px rgba(224, 56, 75, .3); }
.done h1 { font-size: 21px; color: var(--ok); }
.done h1.pending { color: var(--warn); }
.done h1.failed { color: var(--bad); }
.done p { color: var(--muted); margin-top: 6px; font-size: 14px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Profile */
.profile-card { text-align: center; padding: 22px 18px; }
.profile-card .avatar { margin: 0 auto 10px; }
.menu { background: #fff; border-radius: var(--radius); border: 1px solid rgba(239, 227, 240, .8); box-shadow: var(--shadow); overflow: hidden; }
.menu a, .menu button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--ink); background: none; border: 0;
  border-bottom: 1px solid var(--line); font-size: 15px; text-align: left; cursor: pointer;
}
.menu > :last-child, .menu form:last-child button { border-bottom: 0; }
.menu a:hover, .menu button:hover { background: #FFF9FC; color: var(--ink); }
.menu .mi { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--m-50); color: var(--m-600); flex: none; }
.menu .chev { color: #C9B6CE; margin-left: auto; }
.menu .val { margin-left: auto; color: var(--muted); font-size: 14px; }
.menu .danger { color: var(--bad); }
.menu .danger .mi { background: var(--bad-bg); color: var(--bad); }

/* Notifications */
.note { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.note:last-child { border-bottom: 0; }
.note.unread { background: #FFF6FB; }
.note .ti { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--m-50); color: var(--m-600); }
.note .ti.rate { background: #F2E8FB; color: var(--v-600); }
.note .ti.ok { background: var(--ok-bg); color: var(--ok); }
.note .ti.bad { background: var(--bad-bg); color: var(--bad); }
.note h3 { font-size: 14.5px; }
.note p { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.note time { font-size: 12px; color: var(--muted); }

/* FAQ */
details.faq { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; }
details.faq + details.faq { margin-top: 10px; }
details.faq summary { list-style: none; cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 14.5px; display: flex; justify-content: space-between; gap: 10px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .ico { transition: transform .15s; color: var(--muted); }
details.faq[open] summary .ico { transform: rotate(180deg); }
details.faq p { padding: 0 0 14px; color: var(--ink-2); font-size: 14px; white-space: pre-line; }

/* Rates page */
.rate-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.rate-row:last-child { border-bottom: 0; }
.rate-row .r-vals { margin-left: auto; text-align: right; }
.rate-row .r-vals b { display: block; font-size: 15px; color: var(--m-600); }
.rate-row .r-vals span { font-size: 12.5px; color: var(--muted); }

/* Bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  max-width: 560px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 24px rgba(110, 20, 110, .08);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; color: #A592AC; font-size: 11.5px; font-weight: 500; position: relative; }
.tabbar a.is-active { color: var(--m-600); }
.tabbar a.is-active::before { content: ''; position: absolute; top: -9px; width: 26px; height: 3px; border-radius: 0 0 4px 4px; background: var(--grad); }
.tabbar .fab { margin-top: -26px; }
.tabbar .fab span.ring {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--grad); box-shadow: 0 10px 22px rgba(200, 20, 138, .4); border: 4px solid #fff;
}
.tabbar .fab.is-active::before { display: none; }
.tabbar .fab { color: var(--m-600); }

/* Desktop rail (tablet / laptop) */
.rail { display: none; }

/* Splash / welcome */
.splash {
  min-height: 100vh; min-height: 100dvh; background: var(--grad); color: #fff; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center;
  padding: calc(env(safe-area-inset-top) + 40px) 24px calc(env(safe-area-inset-bottom) + 28px);
}
.splash::before { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; top: -240px; right: -260px; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); }
.splash::after { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; bottom: -200px; left: -220px; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%); }
.splash > * { position: relative; z-index: 1; }
.splash .logo-box { width: 116px; height: 116px; border-radius: 32px; margin: 0 auto; padding: 6px; background: rgba(255,255,255,.22); box-shadow: 0 20px 40px rgba(60, 0, 60, .25); }
.splash .logo-box img, .splash .logo-box svg { width: 100%; height: 100%; border-radius: 26px; }
.splash .brand-name { font-size: 34px; font-weight: 700; margin-top: 22px; letter-spacing: -.5px; line-height: 1.1; }
.splash .brand-sub { font-size: 17px; opacity: .92; font-weight: 500; }
.splash .tagline { margin-top: 12px; font-size: 15px; opacity: .9; }
.splash .features { display: grid; gap: 10px; text-align: left; margin: 26px auto 0; max-width: 300px; }
.splash .features div { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.splash .features .ico { background: rgba(255,255,255,.2); border-radius: 50%; padding: 3px; width: 24px; height: 24px; }
.splash .cta { width: 100%; max-width: 360px; display: grid; gap: 10px; }
.splash .btn-white { background: #fff; color: var(--m-600); box-shadow: 0 12px 28px rgba(60, 0, 60, .25); }
.splash .btn-white:hover { color: var(--m-700); }
.splash .btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6); }
.splash .btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }
.splash .foot { font-size: 13px; opacity: .85; margin-top: 14px; }

/* Auth screens */
.auth-top { background: var(--grad); color: #fff; text-align: center; padding: calc(env(safe-area-inset-top) + 34px) 24px 70px; border-radius: 0 0 34px 34px; position: relative; }
.auth-top .back { position: absolute; left: 16px; top: calc(env(safe-area-inset-top) + 16px); }
.auth-top .logo-sm { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 12px; padding: 4px; background: rgba(255,255,255,.22); }
.auth-top .logo-sm img, .auth-top .logo-sm svg { width: 100%; height: 100%; border-radius: 18px; }
.auth-top h1 { color: #fff; font-size: 22px; }
.auth-top p { opacity: .9; font-size: 14px; margin-top: 4px; }
.auth-card { margin: -46px 16px 0; position: relative; padding: 22px 18px; }
.auth-foot { text-align: center; margin: 18px 16px; font-size: 14px; color: var(--muted); }

/* Wide screens: rail + content column */
@media (min-width: 960px) {
  body.app { background: radial-gradient(1200px 600px at 10% -10%, #FDE3F1 0%, transparent 60%), radial-gradient(900px 600px at 110% 10%, #EFE2FB 0%, transparent 55%), var(--bg); }
  .shell { display: grid; grid-template-columns: 290px minmax(0, 620px); justify-content: center; gap: 28px; padding: 28px 24px; align-items: start; }
  .rail {
    display: flex; flex-direction: column; gap: 18px; position: sticky; top: 28px; padding: 22px;
    background: #fff; border-radius: 26px; box-shadow: var(--shadow); border: 1px solid var(--line);
  }
  .rail .brand { display: flex; align-items: center; gap: 12px; }
  .rail .brand img, .rail .brand svg { width: 46px; height: 46px; border-radius: 14px; }
  .rail .brand b { display: block; font-size: 16px; line-height: 1.2; }
  .rail .brand small { color: var(--muted); font-size: 12px; }
  .rail .bal { padding: 16px; border-radius: 18px; background: var(--grad); color: #fff; }
  .rail .bal small { opacity: .85; font-size: 12.5px; }
  .rail .bal strong { display: block; font-size: 24px; font-weight: 700; }
  .rail nav { display: grid; gap: 4px; }
  .rail nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 13px; color: var(--ink-2); font-weight: 500; }
  .rail nav a:hover { background: var(--m-50); color: var(--m-700); }
  .rail nav a.is-active { background: var(--m-50); color: var(--m-600); font-weight: 600; }
  .rail nav a .badge-n { margin-left: auto; background: var(--m-500); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
  .screen { max-width: none; margin: 0; min-height: calc(100vh - 56px); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); padding-bottom: 28px; }
  .bar { position: relative; border-radius: 0 0 22px 22px; }
  .tabbar { display: none; }
  .content { padding: 20px 22px; }
  .content-tight { padding: 0 22px 22px; }
  .tiles { grid-template-columns: repeat(4, 1fr); margin: -62px 20px 0; }
  .tile { flex-direction: column; text-align: center; padding: 16px 10px; }
  .notice { margin: 18px 20px 0; }
  .rate-strip { margin: 0 -22px; padding: 2px 22px 4px; }
  .shell.guest { display: block; padding: 0; }
  .guest-wrap { max-width: 460px; margin: 40px auto; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--bg); }
  .guest-wrap .splash { min-height: 760px; }
  .toast { bottom: 40px; }
}
@media (max-width: 380px) {
  .tiles { gap: 9px; margin-left: 12px; margin-right: 12px; }
  .tile { padding: 12px 10px; gap: 9px; }
  .tile .ti { width: 38px; height: 38px; }
  .choices { gap: 8px; }
  .balance .amount strong { font-size: 28px; }
}
