/* ==========================================================================
   NEC Money — design system
   Mobile-first. No build step: this file is the whole stylesheet.

   Served by App\Http\Controllers\AssetController, not by the web server. It lives
   in resources/ because public/ is the folder that gets left behind on a shared-
   hosting upload, and a site with no CSS is a site that looks broken.
   ========================================================================== */

:root {
    --green: #00a651;
    --green-dark: #008a43;
    --green-darker: #007038;
    --green-soft: #e8f7ee;
    --green-tint: #f2fbf6;
    --red: #e4032e;
    --amber: #f7941d;
    --purple: #7b2ff7;
    --ink: #16241d;
    --body: #4a5a52;
    --muted: #8a9a92;
    --line: #e3ebe6;
    --surface: #ffffff;
    --canvas: #cfdfe6;
    --page: #f4f7f5;
    --danger: #dc3545;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 2px 8px rgba(22, 36, 29, .06);
    --shadow: 0 6px 24px rgba(22, 36, 29, .10);
    --shadow-lg: 0 12px 40px rgba(22, 36, 29, .14);
    --nav-h: 68px;
    --font: 'Segoe UI', 'Noto Sans Bengali', Roboto, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--page);
    color: var(--ink);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }

/* --- Phone shell: the app is always framed like a handset ---------------- */

.phone {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--page);
    position: relative;
    box-shadow: 0 0 60px rgba(0, 0, 0, .08);
    overflow-x: hidden;
}

.phone--nav { padding-bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom, 0px)); }

/* --- Typography ---------------------------------------------------------- */

.h1 { font-size: 26px; font-weight: 800; letter-spacing: -.4px; }
.h2 { font-size: 20px; font-weight: 700; }
.h3 { font-size: 16px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-danger { color: var(--danger); }

/* --- Landing ------------------------------------------------------------- */

.landing { background: var(--canvas); min-height: 100vh; display: flex; flex-direction: column; }

.landing__hero {
    background: var(--canvas);
    padding: 34px 20px 0;
    position: relative;
}

.landing__logo {
    width: clamp(180px, 56vw, 240px);
    margin: 0 auto 26px;
    background: #fff;
    padding: 14px 16px;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(22, 36, 29, .16), 0 2px 6px rgba(22, 36, 29, .08);
    animation: logo-in .6s cubic-bezier(.2, .9, .3, 1.05);
}

@keyframes logo-in {
    from { opacity: 0; transform: translateY(-14px) scale(.94); }
    to { opacity: 1; transform: none; }
}

/* Keeps any logo — tall, wide or square — inside the same tidy box. */
.landing__logo img {
    width: 100%;
    max-height: 110px;
    object-fit: contain;
    margin: 0 auto;
}

.logo__name {
    text-align: center;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: .5px;
    color: var(--ink);
    margin-top: 8px;
}

/* The green dome with the curved top edge, exactly as in the mock. */
.landing__dome {
    background: var(--green);
    border-radius: 100% 100% 0 0 / 70px 70px 0 0;
    padding: 26px 20px 0;
    text-align: center;
    margin-top: -6px;
}

.landing__tagline {
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.5px;
}

.landing__body {
    background: var(--green);
    flex: 1;
    padding: 22px 20px 40px;
    border-radius: 0 0 26px 26px;
}

.landing__card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 20px 18px 16px;
    box-shadow: var(--shadow);
}

.landing__actions {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 14px;
    margin-top: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    box-shadow: var(--shadow);
}

/* Amount rows on the landing card */
.money-row { padding: 6px 0 10px; }
.money-row + .money-row { margin-top: 12px; }
.money-row__label { font-size: 15px; color: var(--body); margin-bottom: 2px; }

.money-row__line {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
}

.money-row__input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    font-size: 30px;
    font-weight: 600;
    color: var(--body);
    background: transparent;
}

.money-row__input::placeholder { color: #b9c6c0; }
.money-row__input[readonly] { color: var(--body); }
.money-row__static { font-size: 16px; font-weight: 600; color: var(--body); }

.landing__rate {
    text-align: center;
    color: var(--red);
    font-weight: 700;
    font-size: 14px;
    margin-top: 10px;
}

/* --- Country picker (flag + code + caret) -------------------------------- */

.country-pick {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    padding: 4px 2px;
    border-radius: 8px;
}

.country-pick:hover { background: var(--green-tint); }
.country-pick__flag { width: 26px; height: 18px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.country-pick__code { font-size: 16px; font-weight: 600; color: var(--body); }
.country-pick__caret { border: 5px solid transparent; border-top-color: var(--body); margin-top: 4px; }

/* --- Auth screens -------------------------------------------------------- */

.auth { min-height: 100vh; min-height: 100dvh; background: var(--page); }

/* A green header the card can float over, so the page has depth from the start. */
.auth__hero {
    background: linear-gradient(140deg, #00c261 0%, #00a651 45%, #007a3c 100%);
    padding: 30px 22px 62px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 30px 30px;
}

.auth__hero::before,
.auth__hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
}

.auth__hero::before { width: 190px; height: 190px; top: -78px; right: -56px; }
.auth__hero::after { width: 130px; height: 130px; bottom: -58px; left: -34px; }

.auth__mark {
    width: 76px; height: 76px;
    margin: 0 auto 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    display: grid; place-items: center;
    overflow: hidden;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
}

.auth__mark img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }

.auth__title {
    color: #fff;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.4px;
    position: relative;
    z-index: 1;
}

.auth__sub {
    color: rgba(255, 255, 255, .88);
    font-size: 14px;
    margin-top: 6px;
    position: relative;
    z-index: 1;
}

/* The card lifts up into the header — that overlap is what makes it read as raised. */
.auth__card {
    background: #fff;
    border-radius: 24px;
    margin: -42px 16px 0;
    padding: 24px 20px 22px;
    box-shadow: 0 18px 44px rgba(22, 36, 29, .16), 0 2px 8px rgba(22, 36, 29, .07);
    position: relative;
    z-index: 2;
    animation: rise-in .5s cubic-bezier(.2, .9, .3, 1.02) backwards;
    animation-delay: .08s;
}

.auth__foot { padding: 20px 22px 34px; }

/* --- PIN screen ---------------------------------------------------------- */

.pin {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 22px calc(28px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(170deg, #f2fbf6 0%, var(--page) 45%);
}

.pin__top { text-align: center; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }

.pin__shield {
    width: 78px; height: 78px;
    border-radius: 26px;
    background: linear-gradient(135deg, #00c261, #00833f);
    color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 14px 32px rgba(0, 166, 81, .34);
    animation: pin-float 3s ease-in-out infinite;
}

.pin__shield svg { width: 38px; height: 38px; }

@keyframes pin-float {
    50% { transform: translateY(-6px); }
}

.pin__avatar {
    width: 78px; height: 78px;
    box-shadow: 0 12px 30px rgba(22, 36, 29, .18);
    border: 3px solid #fff;
}

.pin__title { font-size: 22px; font-weight: 800; margin-top: 20px; letter-spacing: -.3px; }
.pin__sub { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* Four dots that fill as you type */
.dots { display: flex; gap: 16px; margin-top: 30px; }

.dot {
    width: 15px; height: 15px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid #c3d5cb;
    transition: background .16s, border-color .16s, transform .16s;
}

.dot.is-on {
    background: var(--green);
    border-color: var(--green);
    transform: scale(1.18);
    box-shadow: 0 3px 10px rgba(0, 166, 81, .4);
}

.dots.is-wrong { animation: dots-shake .38s; }
.dots.is-wrong .dot { border-color: var(--danger); background: var(--danger); }

@keyframes dots-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-9px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(3px); }
}

.pin__err {
    margin-top: 18px;
    color: var(--danger);
    font-size: 13.5px;
    font-weight: 600;
    animation: rise-in .3s ease-out;
}

/* Number pad */
.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(10px, 3vw, 16px);
    width: 100%;
    max-width: 300px;
    margin-top: 34px;
}

.key {
    height: clamp(58px, 16vw, 68px);
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 3px 12px rgba(22, 36, 29, .09);
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    display: grid;
    place-items: center;
    transition: transform .1s, box-shadow .16s, background .16s;
}

.key:active {
    transform: scale(.92);
    background: var(--green-soft);
    box-shadow: 0 1px 4px rgba(22, 36, 29, .1);
}

.key--back { background: transparent; border-color: transparent; box-shadow: none; color: var(--body); }
.key--back svg { width: 26px; height: 26px; }
.key--back:active { background: #e6ece9; }

.pin__out { margin-top: 26px; }
.pin__link { color: var(--muted); font-size: 13.5px; text-decoration: underline; }

/* --- Buttons ------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    padding: 0 20px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .3px;
    transition: transform .08s, box-shadow .15s, background .15s;
    border: 1px solid transparent;
    text-align: center;
}

.btn:active { transform: scale(.98); }
.btn--block { width: 100%; }

.btn--green {
    background: linear-gradient(135deg, #00bd5c, #008a43);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 166, 81, .32);
}

.btn--green:hover { box-shadow: 0 10px 26px rgba(0, 166, 81, .42); }

.btn--outline {
    border-color: var(--line);
    color: var(--ink);
    background: #fff;
    box-shadow: 0 2px 8px rgba(22, 36, 29, .07);
}

.btn--outline:hover { border-color: var(--green); color: var(--green); }
.btn--lilac { background: #efe7f7; color: var(--ink); }
.btn--lilac:hover { background: #e5daf3; }
.btn--square { border-radius: 12px; }
.btn--sm { height: 40px; font-size: 14px; padding: 0 16px; }
.btn--danger { background: var(--danger); color: #fff; }
.btn--ghost { color: var(--body); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* --- Cards & sections ---------------------------------------------------- */

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    /* Two layers: a tight one for the edge, a wide soft one for the lift. */
    box-shadow: 0 1px 3px rgba(22, 36, 29, .05), 0 6px 20px rgba(22, 36, 29, .07);
    border: 1px solid var(--line);
}

.card--flat { box-shadow: none; }
.section { padding: 0 16px; }
.stack > * + * { margin-top: 14px; }

/* --- Home ---------------------------------------------------------------- */

.home { padding: 18px 16px 0; }

/* The header sits on its own raised card so it reads as one unit. */
.home__top {
    display: flex;
    align-items: center;
    gap: 11px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 11px 12px;
    box-shadow: 0 6px 20px rgba(22, 36, 29, .09);
}

.avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--green);
    display: grid; place-items: center;
    color: #fff; font-weight: 700; font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 40px; height: 40px; font-size: 14px; }

/* --- Default avatar: an animated cat -------------------------------------- */

.avatar .cat {
    width: 100%;
    height: 100%;
    background: #fff5e2;
}

/* The whole cat sways gently, as if breathing. */
.cat__body {
    transform-origin: 50px 70px;
    animation: cat-sway 4s ease-in-out infinite;
}

@keyframes cat-sway {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50% { transform: rotate(2deg) translateY(-1.5px); }
}

/* Eyes squeeze shut for a moment — a blink, not a wink. */
.cat__eye {
    transform-origin: center;
    animation: cat-blink 4.6s infinite;
}

@keyframes cat-blink {
    0%, 92%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(.08); }
}

/* One ear flicks, the way a real cat's does. */
.cat__ear--l {
    transform-origin: 33px 34px;
    animation: cat-flick 5.4s ease-in-out infinite;
}

.cat__ear--r {
    transform-origin: 67px 34px;
    animation: cat-flick 5.4s ease-in-out .8s infinite;
}

@keyframes cat-flick {
    0%, 70%, 100% { transform: rotate(0); }
    76% { transform: rotate(-9deg); }
    82% { transform: rotate(5deg); }
    88% { transform: rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
    .cat__body, .cat__eye, .cat__ear--l, .cat__ear--r { animation: none; }
}

/* Takes the leftover width and truncates rather than wrapping. */
.home__who { flex: 1; min-width: 0; }

.home__hello { font-size: 12px; color: var(--green); font-weight: 600; line-height: 1.25; }

.home__name {
    font-size: 15px; font-weight: 700; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.home__sub {
    font-size: 11.5px; color: var(--muted); line-height: 1.25;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.pill-balance {
    background: var(--green);
    color: #fff;
    border-radius: 20px;
    height: 38px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 13.5px;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 166, 81, .32);
}

.bell {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    display: grid; place-items: center;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 166, 81, .32);
}

.bell svg { width: 20px; height: 20px; }

/* Fires once, the moment something new arrives. */
.bell.is-ringing svg {
    animation: bell-swing .7s ease-in-out 2;
    transform-origin: 50% 12%;
}

@keyframes bell-swing {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(15deg); }
    30% { transform: rotate(-13deg); }
    45% { transform: rotate(9deg); }
    60% { transform: rotate(-6deg); }
    75% { transform: rotate(3deg); }
}

.bell__dot {
    position: absolute; top: -2px; right: -2px;
    min-width: 18px; height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--red);
    color: #fff;
    font-size: 10px; font-weight: 700;
    display: grid; place-items: center;
    border: 2px solid #fff;
}

/* Invite row */
.invite {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.invite__btn {
    /* Soft-cornered rectangles, not pills. */
    background: linear-gradient(135deg, #00bd5c, #008a43);
    color: #fff;
    border-radius: 14px;
    height: 50px;
    padding: 0 10px;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    box-shadow: 0 5px 14px rgba(0, 166, 81, .3);
    transition: transform .12s, box-shadow .18s;
}

.invite__btn:active { transform: scale(.97); }
.invite__btn:hover { box-shadow: 0 8px 20px rgba(0, 166, 81, .4); }
.invite__btn svg { flex-shrink: 0; }

.invite__amp {
    font-weight: 800;
    font-size: 16px;
    white-space: nowrap;
    color: var(--ink);
}

/* Narrow phones: shrink the text before the buttons start clipping. */
@media (max-width: 380px) {
    .invite { gap: 7px; }
    .invite__btn { font-size: 13.5px; height: 46px; gap: 6px; padding: 0 8px; }
    .invite__amp { font-size: 14px; }
    .invite__btn svg { width: 17px; height: 17px; }
}

/* --- Promo slider -------------------------------------------------------- */

.slider { margin-top: 18px; }

.slider__track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.slider__track::-webkit-scrollbar { display: none; }

.slider__slide {
    position: relative;
    flex: 0 0 100%;
    scroll-snap-align: center;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--green-soft);
    /* Keeps every banner the same height whatever the source image is. */
    aspect-ratio: 16 / 7;
}

.slider__slide img { width: 100%; height: 100%; object-fit: cover; }

.slider__caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 22px 16px 12px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    background: linear-gradient(transparent, rgba(9, 20, 14, .78));
}

.slider__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.slider__dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #c8d5ce;
    transition: width .2s, background .2s;
}

.slider__dot.is-on { width: 20px; border-radius: 4px; background: var(--green); }

/* --- Converter ------------------------------------------------------------ */

.converter { margin-top: 18px; }

.converter__country {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.converter__country .name { font-weight: 600; font-size: 15px; }
.converter__country .rate { margin-left: auto; color: var(--green); font-weight: 700; font-size: 15px; }
.converter__country .caret { border: 5px solid transparent; border-top-color: var(--body); margin-top: 5px; }

.converter__grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.converter__side { min-width: 0; }
.converter__side--right { text-align: right; }
.converter__cur { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.converter__side--right .converter__cur { justify-content: flex-end; }
.converter__cur img { width: 26px; height: 18px; object-fit: cover; border-radius: 3px; }

.converter__input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    outline: none;
    font-size: 22px;
    font-weight: 600;
    color: var(--body);
    padding: 8px 0;
    margin-top: 12px;
}

.converter__side--right .converter__input { text-align: right; }
.converter__input:focus { border-bottom-color: var(--green); }

.converter__swap {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--green);
    color: var(--green);
    display: grid; place-items: center;
    background: #fff;
    align-self: end;
    margin-bottom: 6px;
}

.converter__bonus { text-align: center; margin-top: 16px; font-size: 15px; color: var(--ink); }

/* --- Menu grid ----------------------------------------------------------- */

.ticker {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 13px 15px;
    margin: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.ticker__label { color: var(--green); font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }

.ticker__label::before {
    content: '';
    width: 9px; height: 9px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(0, 166, 81, .16);
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    50% { box-shadow: 0 0 0 7px rgba(0, 166, 81, .07); }
}

.ticker__viewport { height: 26px; overflow: hidden; margin-top: 7px; position: relative; }

.ticker__item {
    font-size: 14.5px;
    color: var(--body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .4s, transform .4s;
}

.ticker__item.is-on { opacity: 1; transform: none; }

/* Five shortcuts across, each on its own raised card.
   Everything scales with the viewport so five still fit on a 320px phone. */
.tiles {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: clamp(5px, 1.8vw, 9px);
}

.tile {
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: clamp(9px, 3vw, 13px) 3px clamp(8px, 2.4vw, 11px);
    box-shadow: var(--shadow-sm);
    transition: transform .12s, box-shadow .18s, border-color .18s;
    min-width: 0;
}

.tile:active { transform: scale(.96); }
.tile:hover { box-shadow: var(--shadow); border-color: #cfe7da; }

.tile__label {
    margin-top: 7px;
    font-size: clamp(9.5px, 2.8vw, 11.5px);
    color: var(--green);
    font-weight: 700;
    line-height: 1.25;
    /* Long words like "Banking" must not push the card wider than its column. */
    overflow-wrap: anywhere;
}

.tile__art {
    width: clamp(34px, 10.5vw, 44px);
    height: clamp(34px, 10.5vw, 44px);
    margin: 0 auto;
    display: grid;
    place-items: center;
}

.tile__art img { width: 100%; height: 100%; object-fit: contain; }

.tile__ic {
    width: 100%;
    height: 100%;
    border-radius: 13px;
    display: grid; place-items: center;
    background: var(--green-soft);
    color: var(--green);
}

.tile__ic svg { width: 55%; height: 55%; }

/* Holds a brand logo rather than a line icon: let the artwork fill the tile. */
.brandmark { padding: 6px; }
.brandmark img { width: 100%; height: 100%; object-fit: contain; }

/* Gateway badge used on the Send and Add Money cards. */
.gwmark {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: grid; place-items: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 13px;
    overflow: hidden;
}

/* --- Icon grid (More screen) --------------------------------------------- */

.groupbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 26px 0 14px;
}

.groupbar__title { font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.groupbar__rule { flex: 1; height: 1px; background: var(--line); }

.navgrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(7px, 2.2vw, 11px);
}

.navtile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: clamp(11px, 3.4vw, 16px) 4px clamp(10px, 3vw, 14px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    transition: transform .12s, box-shadow .18s, border-color .18s;
    position: relative;
    min-width: 0;
}

.navtile:active { transform: scale(.96); }
.navtile:hover { border-color: #cfe7da; box-shadow: var(--shadow); }

.navtile__ic {
    width: clamp(38px, 11.5vw, 48px);
    height: clamp(38px, 11.5vw, 48px);
    border-radius: 15px;
    display: grid; place-items: center;
    background: var(--green-soft);
    color: var(--green);
    flex-shrink: 0;
}

.navtile__ic svg { width: 52%; height: 52%; }

/* The icon partial ships no width/height, so containers set the size. */
.listitem__icon svg { width: 22px; height: 22px; }
.btn svg { width: 100%; height: 100%; }

.navtile__label {
    font-size: clamp(10px, 2.9vw, 11.5px);
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    color: var(--ink);
    overflow-wrap: anywhere;
}

/* Tints so each group reads as its own family. */
.navtile--mint  .navtile__ic { background: #e8f7ee; color: #00a651; }
.navtile--sky   .navtile__ic { background: #e7f1ff; color: #1a63d8; }
.navtile--amber .navtile__ic { background: #fff3e0; color: #d98200; }
.navtile--rose  .navtile__ic { background: #fdecef; color: #d92a4d; }
.navtile--plum  .navtile__ic { background: #f1e9fd; color: #7b2ff7; }
.navtile--slate .navtile__ic { background: #eef1ef; color: #56655e; }

.navtile__dot {
    position: absolute;
    top: 9px; right: 9px;
    min-width: 17px; height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--red);
    color: #fff;
    font-size: 10px; font-weight: 700;
    display: grid; place-items: center;
}

/* Profile strip at the top of the More screen */
.profilebar {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--green), var(--green-darker));
    color: #fff;
    box-shadow: 0 10px 26px rgba(0, 166, 81, .28);
}

.profilebar__name { font-size: 16px; font-weight: 700; line-height: 1.3; }
.profilebar__sub { font-size: 12.5px; opacity: .85; }

.profilebar__bal {
    margin-left: auto;
    text-align: right;
    flex-shrink: 0;
}

.profilebar__bal .k { font-size: 11px; opacity: .8; }
.profilebar__bal .v { font-size: 17px; font-weight: 800; }

.profilebar .avatar {
    background: rgba(255, 255, 255, .2);
    border: 2px solid rgba(255, 255, 255, .45);
}

/* --- Bottom navigation --------------------------------------------------- */

.bottomnav {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    /* Keeps the bar clear of the iPhone home indicator. */
    height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    box-shadow: 0 -4px 20px rgba(22, 36, 29, .07);
    z-index: 40;
}

.bottomnav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    padding-top: 6px;
}

.bottomnav__item svg { width: 24px; height: 24px; }
.bottomnav__item.is-active { color: var(--purple); }

/* The floating send button that pops out of the notch */
.bottomnav__fab {
    position: relative;
    display: grid;
    place-items: center;
}

.bottomnav__fab a {
    position: absolute;
    top: -30px;
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 6px 18px rgba(0, 166, 81, .45);
    border: 4px solid #fff;
}

.bottomnav__fab a svg { width: 26px; height: 26px; }

/* --- Page header (inner pages) ------------------------------------------ */

.pagehead {
    background: var(--green);
    color: #fff;
    padding: 18px 16px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 0 0 22px 22px;
}

.pagehead__back { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.16); }
.pagehead__title { font-size: 18px; font-weight: 700; }
.pagehead__right { margin-left: auto; }

/* --- Forms --------------------------------------------------------------- */

.field { margin-bottom: 16px; }
.field__label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }

.input {
    width: 100%;
    height: 52px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #f7faf8;
    padding: 0 14px;
    outline: none;
    /* 16px: anything smaller makes iOS zoom the page on focus. */
    font-size: 16px;
    transition: border-color .15s, background .15s, box-shadow .16s;
}

textarea.input { height: auto; padding: 12px 14px; resize: vertical; min-height: 96px; }

.input:focus {
    border-color: var(--green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 166, 81, .12);
}

.input--underline { border: 0; border-bottom: 1px solid #cfd8d3; border-radius: 0; background: transparent; padding: 0 4px; }
.input--underline:focus { border-bottom-color: var(--green); background: transparent; }

/* Phone field: flag box on the left, number on the right */
.phonefield { display: grid; grid-template-columns: 112px 1fr; gap: 10px; }

.phonefield__code,
.phonefield__num,
.passwordfield {
    background: #f7faf8;
    border: 1px solid var(--line);
    border-radius: 14px;
    height: 60px;
    box-shadow: inset 0 1px 2px rgba(22, 36, 29, .04);
    transition: border-color .15s, box-shadow .16s, background .15s;
}

.phonefield__code {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-weight: 700;
    width: 100%;
}

.phonefield__code:hover { border-color: #c9e2d5; }
.phonefield__code img { width: 30px; height: 21px; object-fit: cover; border-radius: 3px; }

.phonefield__num { display: flex; align-items: center; padding: 0 14px; }

.phonefield__num input,
.passwordfield input {
    width: 100%;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 16px;
}

/* The whole box lights up on focus, not just a line under the text. */
.phonefield__num:focus-within,
.passwordfield:focus-within {
    border-color: var(--green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 166, 81, .12);
}

.passwordfield {
    display: flex; align-items: center;
    padding: 0 14px;
    gap: 10px;
}

.passwordfield input { flex: 1; }
.passwordfield__eye { color: var(--green); display: grid; place-items: center; flex-shrink: 0; }

.error { color: var(--danger); font-size: 13px; margin-top: 6px; }

.divider {
    display: flex; align-items: center; gap: 12px;
    color: var(--muted); font-size: 14px;
    margin: 26px 0 18px;
}

.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* --- Lists --------------------------------------------------------------- */

.list { display: flex; flex-direction: column; gap: 10px; }

.listitem {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 13px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform .12s, box-shadow .18s, border-color .18s;
}

.listitem:active { transform: scale(.985); }
a.listitem:hover, label.listitem:hover { box-shadow: var(--shadow); border-color: #cfe7da; }

.listitem__icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: 20px;
    background: var(--green-soft);
    color: var(--green);
    flex-shrink: 0;
    font-weight: 700;
    overflow: hidden;
}

.listitem__icon img { width: 100%; height: 100%; object-fit: contain; }
.listitem__main { flex: 1; min-width: 0; }
.listitem__title { font-weight: 600; font-size: 15px; }
.listitem__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.listitem__end { text-align: right; flex-shrink: 0; }
.listitem--unread { background: var(--green-tint); border-color: #cfeadb; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.badge--success { background: var(--green-soft); color: var(--green-darker); }
.badge--warning { background: #fff3e0; color: #b26a00; }
.badge--danger { background: #fdecee; color: #b3243b; }
.badge--info { background: #e7f1ff; color: #14509c; }
.badge--muted { background: #eef1ef; color: var(--body); }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty__icon { font-size: 44px; margin-bottom: 10px; }

/* --- Alerts -------------------------------------------------------------- */

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}

.alert--success { background: var(--green-soft); color: var(--green-darker); border-color: #bfe6cf; }
.alert--danger { background: #fdecee; color: #b3243b; border-color: #f5c6cd; }
.alert--warning { background: #fff8e6; color: #8a5b00; border-color: #f3e0b0; }

/* --- Toasts (drop in from the top) --------------------------------------- */

.toasts {
    position: fixed;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    padding: 12px 14px 0;
    z-index: 95;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 34px rgba(22, 36, 29, .18);
    pointer-events: auto;
    animation: toast-drop .32s cubic-bezier(.2, .9, .3, 1.2);
    transition: opacity .3s, transform .3s;
}

@keyframes toast-drop {
    from { opacity: 0; transform: translateY(-22px); }
    to { opacity: 1; transform: none; }
}

.toast.is-out { opacity: 0; transform: translateY(-14px); }

.toast__ic {
    width: 30px; height: 30px;
    border-radius: 10px;
    display: grid; place-items: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 15px;
    background: var(--green-soft);
    color: var(--green);
}

.toast__body { flex: 1; min-width: 0; font-size: 14px; color: var(--body); line-height: 1.45; }
.toast__title { font-weight: 700; font-size: 15px; color: var(--ink); margin-bottom: 2px; }
.toast__text { font-size: 13.5px; }

.toast__cta {
    display: inline-block;
    margin-top: 8px;
    color: var(--green);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .5px;
}

.toast__x {
    width: 26px; height: 26px;
    flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 8px;
    color: var(--muted);
    font-size: 21px;
    line-height: 1;
}

.toast__x:hover { background: #f1f4f2; color: var(--ink); }

.toast--success .toast__ic { background: var(--green-soft); color: var(--green-darker); }
.toast--danger { border-color: #f5c6cd; }
.toast--danger .toast__ic { background: #fdecee; color: #b3243b; }
.toast--warning { border-color: #f3e0b0; }
.toast--warning .toast__ic { background: #fff8e6; color: #8a5b00; }
.toast--kyc { border-color: #f3e0b0; background: #fffdf6; }
.toast--kyc .toast__ic { background: #fff3e0; color: #d98200; }

/* --- Live notification card ----------------------------------------------
   Dropped in by app.js the moment something lands, so the news reaches you
   on whichever screen you happen to be sitting on. */

.toast--notify {
    text-decoration: none;
    color: inherit;
    align-items: center;
    border-left: 4px solid var(--green);
    animation: toast-drop .32s cubic-bezier(.2, .9, .3, 1.2), notify-glow 1.5s ease-out 1;
}

.toast--notify .toast__ic {
    width: 38px; height: 38px;
    border-radius: 12px;
    font-size: 18px;
    background: var(--green-soft);
    animation: notify-pop 1.6s ease-in-out infinite;
}

.toast--notify .toast__text {
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@keyframes notify-pop {
    50% { transform: scale(1.09); }
}

/* A single ring of light, so a new card reads as new even with the sound off. */
@keyframes notify-glow {
    0% { box-shadow: 0 12px 34px rgba(22, 36, 29, .18), 0 0 0 0 rgba(0, 166, 81, .45); }
    70% { box-shadow: 0 12px 34px rgba(22, 36, 29, .18), 0 0 0 12px rgba(0, 166, 81, 0); }
    100% { box-shadow: 0 12px 34px rgba(22, 36, 29, .18), 0 0 0 0 rgba(0, 166, 81, 0); }
}

.toast--danger.toast--notify { border-left-color: #b3243b; }
.toast--danger.toast--notify .toast__ic { background: #fdecee; }
.toast--warning.toast--notify { border-left-color: #d98200; }
.toast--warning.toast--notify .toast__ic { background: #fff8e6; }

/* --- Entrance animation --------------------------------------------------
   Sections rise into place one after another, so the screen assembles itself
   instead of appearing all at once. */

.rise {
    opacity: 0;
    transform: translateY(16px);
    animation: rise-in .55s cubic-bezier(.2, .8, .3, 1) forwards;
}

@keyframes rise-in {
    to { opacity: 1; transform: none; }
}

.rise--1 { animation-delay: .05s; }
.rise--2 { animation-delay: .13s; }
.rise--3 { animation-delay: .21s; }
.rise--4 { animation-delay: .29s; }
.rise--5 { animation-delay: .37s; }
.rise--6 { animation-delay: .45s; }

/* Respect people who have asked their device to stop moving things around. */
@media (prefers-reduced-motion: reduce) {
    .rise { animation: none; opacity: 1; transform: none; }
    .popup__card, .popup__scrim, .toast { animation: none !important; }
    .ticker__label::before { animation: none; }
}

/* --- Welcome popup ------------------------------------------------------- */

.popup {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 22px;
}

.popup[hidden] { display: none; }

.popup__scrim {
    position: absolute;
    inset: 0;
    background: rgba(8, 20, 14, .6);
    backdrop-filter: blur(2px);
    animation: pop-fade .28s ease-out;
}

.popup.is-closing .popup__scrim { animation: pop-fade .24s ease-in reverse forwards; }

.popup__card {
    position: relative;
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .38);
    animation: pop-in .42s cubic-bezier(.2, 1.1, .3, 1.05);
}

.popup.is-closing .popup__card { animation: pop-out .26s ease-in forwards; }

@keyframes pop-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pop-in {
    from { opacity: 0; transform: translateY(28px) scale(.9); }
    to { opacity: 1; transform: none; }
}

@keyframes pop-out {
    from { opacity: 1; transform: none; }
    to { opacity: 0; transform: translateY(18px) scale(.94); }
}

.popup__x {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 2;
    width: 34px; height: 34px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .94);
    color: var(--ink);
    font-size: 23px;
    line-height: 1;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .22);
    transition: background .15s, color .15s, transform .12s;
}

.popup__x:hover { background: #fff; color: var(--red); transform: scale(1.06); }
.popup__x:active { transform: scale(.94); }

.popup__banner {
    display: block;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
}

/*
 * The image sets its own height, so it keeps its exact aspect ratio on every
 * screen — nothing is cropped, letterboxed or stretched. The card is simply
 * whatever shape the artwork is, scaled down to fit. Same design everywhere.
 */
.popup__banner img {
    display: block;
    width: 100%;
    height: auto;
    animation: banner-in .7s .1s cubic-bezier(.2, .9, .3, 1) backwards;
}

@keyframes banner-in {
    from { opacity: 0; transform: scale(1.06); }
    to { opacity: 1; transform: none; }
}

/* Banner only, no words: the artwork is the whole card. */
.popup__card--bare { overflow: hidden; }
.popup__card--bare .popup__banner { border-radius: 24px; }

.popup__body { padding: 18px 20px 20px; text-align: center; }
.popup__title { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.popup__text { font-size: 14.5px; color: var(--body); margin-top: 8px; line-height: 1.55; }

@media (max-width: 360px) {
    .popup { padding: 16px; }
}

/* --- Sheet (bottom modal for country / method pickers) ------------------- */

.sheet {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
}

.sheet.is-open { display: block; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(9, 20, 14, .45); }

.sheet__panel {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 480px;
    max-height: 78vh;
    background: #fff;
    border-radius: 22px 22px 0 0;
    display: flex;
    flex-direction: column;
    animation: sheet-up .22s ease-out;
}

@keyframes sheet-up { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }

.sheet__head { padding: 16px 16px 10px; border-bottom: 1px solid var(--line); }
.sheet__grab { width: 44px; height: 4px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet__search { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; outline: none; background: #f5f7f6; font-size: 16px; }
.sheet__search:focus { border-color: var(--green); }
.sheet__list { overflow-y: auto; padding: 8px; }

.sheet__row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    text-align: left;
}

.sheet__row:hover { background: var(--green-tint); }
.sheet__row img { width: 30px; height: 21px; object-fit: cover; border-radius: 3px; }
.sheet__row .name { font-weight: 600; font-size: 15px; }
.sheet__row .meta { margin-left: auto; color: var(--green); font-weight: 700; font-size: 14px; }

/* --- Summary rows -------------------------------------------------------- */

.summary {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 4px 16px;
    box-shadow: 0 1px 3px rgba(22, 36, 29, .05), 0 6px 20px rgba(22, 36, 29, .07);
}

.summary__row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-size: 15px; }
.summary__row + .summary__row { border-top: 1px dashed var(--line); }
.summary__row .k { color: var(--body); }
.summary__row .v { font-weight: 700; }
.summary__row--total .v { color: var(--green); font-size: 17px; }

/* --- Utilities ----------------------------------------------------------- */

.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.p-16 { padding: 16px; }
.flex { display: flex; }
.between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hidden { display: none !important; }
.w-full { width: 100%; }
