.niva-wallet, .niva-access {
  --nw-ink: #102d48;
  --nw-muted: #456178;
  --nw-rule: #d4e3ee;
  --nw-paper: #fff;
  --nw-font: "DM Sans", "Segoe UI", Arial, sans-serif;
  --nw-glass: linear-gradient(145deg, #ffffffed, #e0effa9c);
  color: var(--nw-ink);
  font: 15px/1.5 var(--nw-font);
}
.niva-wallet {
  display: block;
  padding: clamp(12px, 3vw, 40px);
  background: linear-gradient(158deg, #102d48, #254a64 80%, #173851);
  font-variant-numeric: tabular-nums;
}
.nw-shell { max-width: 1240px; min-height: calc(100dvh - clamp(24px, 6vw, 80px)); margin-inline: auto; border-radius: 14px; background: radial-gradient(ellipse at 68% 0%, #d8eaf7, transparent 48%), #f5faff; }
.niva-wallet :where(h1, h2, p, dl, dd) { margin: 0; }
.niva-wallet button { cursor: pointer; }
.niva-wallet button:focus-visible, .niva-access :is(button, input):focus-visible { outline: 2px solid #2374be; outline-offset: 3px; }
.nw-header, .nw-main { width: min(1100px, calc(100% - 72px)); margin-inline: auto; }
.nw-header {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--nw-rule);
}
.nw-brand, .nw-nav button, .nw-auth {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--nw-ink);
  border: 0;
}
.nw-brand { justify-self: start; padding: 0; font-size: 21px; font-weight: 750; letter-spacing: -.06em; }
.nw-nav { display: flex; gap: 5px; }
.nw-nav button { padding: 11px 13px; border-radius: 9px; font-size: 13px; font-weight: 650; }
.nw-nav svg { width: 20px; height: 20px; flex: none; }
.nw-nav button[aria-current], .nw-nav button:hover { background: #dfedf9; color: #174f81; }
.nw-nav button[aria-current] { box-shadow: inset 0 0 0 1px #b9d5ea, inset 0 1px 1px #fff; }
.nw-auth { justify-self: end; border: 1px solid #cbd4d3; border-radius: 999px; padding: 10px 14px; font-size: 12px; font-weight: 650; }
.nw-auth:hover { background: #e3edf0; }
.nw-main { padding-block: 40px; }
.nw-title { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 10px; margin-bottom: 23px; }
.nw-title p { color: var(--nw-muted); font-size: 13px; margin-bottom: 6px; }
.nw-title h1 { font: 730 clamp(31px, 5vw, 58px)/1 var(--nw-font); letter-spacing: -.05em; }
.nw-edition { align-self: center; border: 1px solid #c4dbed; border-radius: 999px; padding: 5px 10px; background: #ffffffb8; color: #1c588b; font-size: 11px; font-weight: 650; }
.nw-title h1:focus { outline: none; }
.nw-wallet-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
.nw-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 16px;
  padding: clamp(20px, 3vw, 38px);
  background: radial-gradient(ellipse at 93% 16%, #267ab1, transparent 68%), #102d48;
  color: #fff;
  box-shadow: 0 12px 27px #0f365029, inset 0 1px 1px #e3f4ff59;
}
.nw-card-art { position: absolute; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(150deg, #ffffff20, transparent 35%); }
.nw-card-art img { position: absolute; width: min(46%, 260px); height: auto; right: -8%; top: -13%; opacity: .34; filter: saturate(.8); }
.nw-card-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(118deg, transparent 42%, #b5e1ff26 49%, transparent 56%) 100% 0 / 240% 100%; }
.nw-card-top, .nw-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nw-card-top h2 { font: 600 14px/1.3 system-ui, sans-serif; }
.nw-card-top > span { border: 1px solid #d5ebff73; border-radius: 999px; color: #e4f4ff; font-size: 11px; padding: 3px 9px; background: #19496a8c; }
.nw-balance { margin-block: 14px 21px; font: 400 clamp(40px, 6vw, 68px)/1 system-ui, sans-serif; letter-spacing: -.065em; }
.nw-balance small { font-size: .32em; letter-spacing: .02em; color: #c9dce5; white-space: nowrap; }
.nw-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 1px solid #abc4d252; padding-top: 15px; }
.nw-card dt { color: #c9dce5; font-size: 12px; }
.nw-card dd { margin-top: 4px; font-size: 15px; font-weight: 650; }
.nw-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.nw-card-actions button, .nw-empty button, .nw-section-title button, .nw-filters button { border: 0; font-size: 12px; font-weight: 650; }
.nw-card-actions button { min-height: 42px; border-radius: 999px; padding: 8px 14px; background: #f0f8ff; color: var(--nw-ink); }
.nw-card-actions button + button { background: #ffffff22; color: #fff; }
.nw-card-actions button:hover { box-shadow: inset 0 0 0 1px #c4e4ff; }
.nw-panel { background: #fff; border: 1px solid var(--nw-rule); border-radius: 13px; padding: clamp(14px, 2.2vw, 27px); box-shadow: 0 4px 17px #12355209; }
.nw-panel > p { margin: 12px 0; color: var(--nw-muted); overflow-wrap: anywhere; }
.nw-recent { margin-top: 18px; }
.nw-wallet-grid { align-items: stretch; }
.nw-clock {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 18px;
  min-height: 215px;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid #ffffffc9;
  border-radius: 16px;
  background: var(--nw-glass);
  backdrop-filter: blur(8px) saturate(115%);
  box-shadow: inset 0 1px 1px #fff, 0 10px 24px #254c701a;
}
.nw-clock svg { position: absolute; z-index: -1; width: min(40%, 150px); right: 3%; top: 10%; color: #5e93be; opacity: .55; }
.nw-clock-hand { transform-origin: 60px 60px; }
.nw-clock p { color: #36596b; font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.nw-clock h2 { margin-top: 6px; font: 700 clamp(20px, 2.6vw, 30px)/1.05 var(--nw-font); letter-spacing: -.04em; }
.nw-clock-time { display: block; margin-top: 12px; font: 450 clamp(24px, 4vw, 42px)/1.1 system-ui, sans-serif; letter-spacing: -.045em; }
.nw-clock > div > span { color: var(--nw-muted); font-size: 12px; }
.nw-clock button { min-height: 42px; padding: 6px 13px; border: 1px solid #b6d2e7; border-radius: 999px; background: #fff; color: var(--nw-ink); font-size: 12px; font-weight: 650; }
.nw-shortcuts { margin-block: 18px; }
.nw-shortcut-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nw-shortcut-grid button {
  display: grid;
  justify-items: start;
  gap: 5px;
  min-width: 0;
  padding: 12px 9px;
  border: 1px solid #d9e8f2;
  border-radius: 8px;
  background: #f3f9fe;
  color: var(--nw-ink);
  text-align: left;
  transition: transform .18s, background-color .18s;
}
.nw-shortcut-grid button:hover:not(:disabled) { transform: translateY(-2px); background: #e1edf0; }
.nw-shortcut-grid button:disabled { cursor: default; }
.nw-shortcut-grid img { object-fit: contain; }
.nw-shortcut-grid strong { font-size: 12px; }
.nw-shortcut-grid small { color: var(--nw-muted); font-size: 11px; }
.nw-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.nw-detail-grid .nw-recent { margin-top: 0; }
@media (prefers-reduced-motion: no-preference) {
  .nw-clock svg { animation: nw-clock-arrive .52s ease-out both; }
  .nw-clock-hand { animation: nw-clock-turn 24s linear infinite; }
  .nw-card-art::after { animation: nw-card-reflection 18s linear infinite; }
  @keyframes nw-clock-arrive { from { opacity: 0; transform: rotate(-18deg) scale(.9); } to { opacity: .55; transform: rotate(0) scale(1); } }
  @keyframes nw-clock-turn { to { transform: rotate(360deg); } }
  @keyframes nw-card-reflection { to { background-position: 0 0; } }
}
@media (prefers-reduced-motion: reduce) {
  .nw-shortcut-grid button:hover:not(:disabled) { transform: none; }
}
.nw-section-title { min-height: 42px; margin-bottom: 10px; }
.nw-section-title h2 { font: 700 clamp(19px, 2.7vw, 27px)/1.1 var(--nw-font); letter-spacing: -.035em; }
.nw-section-title > span, .nw-section-title button { color: var(--nw-muted); font-size: 12px; text-align: right; }
.nw-section-title button, .nw-empty button { min-height: 40px; background: transparent; color: #31566b; padding-inline: 4px; }
.nw-empty { border-top: 1px solid var(--nw-rule); padding-top: 14px; font-size: 13px; }
.nw-empty p { margin-top: 3px; color: var(--nw-muted); }
.nw-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px 4px;
  min-height: 63px;
  border: 0;
  border-top: 1px solid var(--nw-rule);
  background: transparent;
  color: var(--nw-ink);
  text-align: left;
  font: inherit;
}
.nw-row img { object-fit: contain; padding: 4px; border-radius: 7px; background: #ebf4fc; }
.nw-row strong { display: block; font-size: 14px; }
.nw-row small { display: block; font-size: 12px; color: var(--nw-muted); }
.nw-row-end { text-align: right; }
.nw-row-end strong { white-space: nowrap; }
.nw-offer:hover:not(:disabled) { background: #edf3f3; }
.nw-offer:disabled { cursor: default; }
.nw-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.nw-filters button { border-radius: 999px; padding: 8px 12px; background: #f0f2ee; color: var(--nw-ink); }
.nw-filters button[aria-pressed="true"] { background: #dcebf0; box-shadow: inset 0 0 0 1px #adc7d2; }
.nw-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--nw-muted); margin-top: 25px; font-size: 12px; }
.nw-referral-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; }
.nw-referral h2 { font: 700 clamp(25px, 4vw, 40px)/1.1 var(--nw-font); }
.nw-referral label { display: block; margin-top: 20px; font-size: 12px; }
.nw-referral-copy { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 5px; }
.nw-referral-copy input { min-width: 0; width: 155px; background: #eef2ee; border: 1px solid var(--nw-rule); color: var(--nw-ink); border-radius: 5px; padding: 9px; font: 650 13px monospace; }
.nw-panel.nw-referral-score { display: grid; align-content: start; gap: 6px; background: linear-gradient(155deg, #216395, #102d48); color: #fff; }
.nw-panel.nw-referral-score p, .nw-referral-score small { color: #c9dce5; }
.nw-referral-score strong { font: 650 clamp(32px, 5vw, 56px)/1 var(--nw-font); letter-spacing: -.04em; }
.nw-referral-included { margin-top: 10px; color: #c9dce5; font-size: 12px; }
.niva-wallet .cycle-confirm { background: #fff; color: var(--nw-ink); max-height: calc(100dvh - 40px); overflow: auto; }
.niva-wallet .cycle-confirm h2 { font-family: var(--nw-font); font-weight: 700; }
.niva-wallet .cycle-confirm :where(dt, dd, p, .cycle-close, .cycle-confirm > span) { color: var(--nw-muted); font-size: 13px; }
.niva-wallet .cycle-close { font-size: 24px; min-width: 44px; min-height: 44px; }
.niva-wallet .cycle-confirm-submit { background: var(--nw-ink); }
.niva-wallet .cycle-error { color: #8b382b; font-size: 13px; }
@media (max-width: 760px) {
  .niva-wallet { padding: 0; }
  .nw-shell { min-height: 100dvh; border-radius: 0; }
  .nw-header, .nw-main { width: calc(100% - 32px); }
  .nw-header { min-height: 61px; grid-template-columns: 1fr auto; }
  .nw-main { padding-top: 25px; padding-bottom: calc(93px + env(safe-area-inset-bottom)); }
  .nw-wallet-grid { grid-template-columns: 1fr; gap: 12px; }
  .nw-detail-grid { grid-template-columns: 1fr; gap: 12px; }
  .nw-shortcuts { margin-block: 12px; }
  .nw-recent { margin-top: 12px; }
  .nw-nav {
    position: fixed;
    z-index: 20;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--nw-rule);
    background: #f2f8fef0;
    backdrop-filter: blur(12px);
  }
  .nw-nav button { min-width: 0; min-height: 52px; flex-direction: column; justify-content: center; gap: 2px; padding: 5px 0; font-size: 11px; }
  .nw-referral-grid { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .nw-nav button { font-size: 10px; }
}

.niva-access {
  position: fixed;
  inset: 0;
  width: min(960px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #dcebf6;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 90px #07223b6b;
}
.niva-access::backdrop { background: #102d48a6; backdrop-filter: blur(6px); }
.na-layout { display: grid; grid-template-columns: 1.04fr 1fr; }
.na-visual {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  overflow: hidden;
  background: radial-gradient(ellipse at 40% 55%, #e8f5ff, transparent 65%), linear-gradient(155deg, #e1effa, #a8c8e5);
}
.na-wordmark { position: absolute; inset: 6% 0 auto; z-index: -1; text-align: center; color: #ffffffd9; font: 300 clamp(62px, 10vw, 138px)/1 var(--nw-font); letter-spacing: .15em; padding-left: .15em; }
.na-macaw { position: absolute; inset: 16% 0 0; width: 100%; height: 84%; object-fit: cover; object-position: 50% 26%; mask-image: radial-gradient(ellipse 64% 63% at 50% 48%, #000 35%, transparent 96%); }
.na-visual-note, .na-visual-badge { position: absolute; border: 1px solid #ffffffd9; background: var(--nw-glass); box-shadow: inset 0 1px 1px #fff, 0 9px 22px #284e7826; backdrop-filter: blur(8px) saturate(115%); }
.na-visual-note { display: grid; gap: 2px; left: 9%; bottom: 12%; padding: 12px; border-radius: 10px; }
.na-visual-note img { margin-top: -28px; filter: drop-shadow(0 5px 5px #102d4840); }
.na-visual-note span { font-size: 11px; color: var(--nw-muted); }
.na-visual-note strong { font-size: 14px; }
.na-visual-badge { right: 9%; top: 38%; border-radius: 999px; padding: 5px 10px; color: #184c7a; font-size: 12px; font-weight: 650; }
.na-content { position: relative; min-width: 0; padding: clamp(24px, 4vw, 46px); }
.na-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 1px solid #d5e5f1; border-radius: 50%; background: #f2f8ff; color: var(--nw-ink); font: 400 24px/1 var(--nw-font); cursor: pointer; }
.na-brand { display: flex; align-items: center; gap: 7px; margin-bottom: 15px; font-size: 14px; font-weight: 750; letter-spacing: .07em; }
.na-content h2 { margin: 0; font: 700 clamp(26px, 3.5vw, 43px)/1.08 "Space Grotesk", var(--nw-font); letter-spacing: -.05em; }
.na-content h2:focus { outline: none; }
.na-content > p { margin: 9px 0 17px; color: var(--nw-muted); font-size: 13px; }
.na-form { display: grid; gap: 10px; }
.na-form label { display: block; color: var(--nw-ink); font-size: 13px; font-weight: 650; }
.na-form label span { color: var(--nw-muted); font-size: 11px; font-weight: 450; }
.na-form input { display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 8px 11px; border: 1px solid #ccdfea; border-radius: 8px; background: #f4f9fd; color: var(--nw-ink); font: 400 16px/1.3 var(--nw-font); }
.na-form input::placeholder { color: #5b7488; }
.na-error { color: #a12729; font-size: 13px; }
.na-error:empty { display: none; }
.na-submit { display: flex; align-items: center; justify-content: space-between; min-height: 45px; padding: 8px 15px; border: 0; border-radius: 999px; background: #1d68ad; color: #fff; font: 650 14px/1.2 var(--nw-font); cursor: pointer; }
.na-submit:hover { background: #154f86; }
.na-submit:disabled { opacity: .65; cursor: wait; }
.na-switch { min-height: 42px; margin-top: 5px; padding: 0; border: 0; background: transparent; color: #1b5f98; font: 650 13px/1.2 var(--nw-font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 620px) {
  .niva-access { width: min(440px, calc(100% - 20px)); max-height: calc(100dvh - 20px); }
  .na-layout { grid-template-columns: 1fr; }
  .na-visual { min-height: 108px; }
  .na-wordmark { inset: 18% auto auto 7%; padding: 0; font-size: clamp(45px, 12vw, 62px); }
  .na-macaw { inset: 0 0 0 auto; width: 56%; height: 100%; }
  .na-visual-note, .na-visual-badge { display: none; }
}

/* ------------------------------------------------------------------
   Real money � deposits, withdrawals, movement history
   ------------------------------------------------------------------ */

.nw-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.nw-card-links button {
  border: 0;
  background: transparent;
  color: #d7e8f4;
  padding: 0;
  font-size: 11px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nw-card-links button:hover { color: #fff; }

.nw-movements { margin-top: 18px; }

.nw-movement-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 12px;
}

.nw-movement-actions button {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--nw-rule);
  border-radius: 10px;
  padding: 12px 14px;
  background: #f3f9fd;
  color: var(--nw-ink);
  text-align: left;
  transition: transform .18s, background-color .18s;
}

.nw-movement-actions button:hover { transform: translateY(-2px); background: #e1eff8; }

.nw-movement-actions button > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: #dcecf7;
  color: #1d68ad;
  font-size: 17px;
  line-height: 1;
}

.nw-movement-actions button:last-child > span {
  background: #efe3dc;
  color: #8b4b2b;
}

.nw-movement-actions strong { display: block; font-size: 12px; }
.nw-movement-actions small { display: block; margin-top: 2px; color: var(--nw-muted); font-size: 10px; }

.nw-movements-empty { border-top: 1px solid var(--nw-rule); }

.nw-movement-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
}

.nw-movement-icon.in { background: #e3f2e7; color: #256c3e; }
.nw-movement-icon.out { background: #f7e9e2; color: #93502f; }
.nw-movement .nw-in { color: #2c7b4b; }
.nw-movement .nw-out { color: #9b5735; }
.nw-status-pending { color: #9a6b21; }
.nw-status-confirmed { color: #2c7b4b; }
.nw-status-failed { color: #a13f34; }

/* Payment dialog ---------------------------------------------------- */

.niva-payment .na-content { padding-bottom: 28px; }

.na-payment-recap {
  display: grid;
  gap: 8px;
  margin-bottom: 4px;
  padding: 15px;
  border: 1px solid #cfe2ef;
  border-radius: 10px;
  background: #f2f9fe;
}

.na-payment-recap > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
}

.na-payment-recap > div span { color: var(--nw-muted); }
.na-payment-recap > div strong { font-size: 14px; }
.na-payment-recap .na-payment-total {
  padding-top: 8px;
  border-top: 1px solid #cfe2ef;
  color: var(--nw-ink);
}
.na-payment-recap .na-payment-total strong { font-size: 20px; letter-spacing: -.03em; }
.na-payment-recap > small { color: var(--nw-muted); font-size: 10px; line-height: 1.55; }

.na-payment-help {
  margin: 0;
  color: var(--nw-muted);
  font-size: 10px;
  line-height: 1.6;
}

.na-payment-names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.na-payment-result {
  min-height: 18px;
  color: #1d5f8c;
  font-size: 12px;
  line-height: 1.55;
}

.na-payment-result:empty { display: none; }

.na-payment-reset {
  justify-self: start;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1b5f98;
  font: 650 12px var(--nw-font);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.niva-payment select {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 11px;
  border: 1px solid #ccdfea;
  border-radius: 8px;
  background: #f4f9fd;
  color: var(--nw-ink);
  font: 400 16px/1.3 var(--nw-font);
}

.niva-payment .na-submit[aria-busy="true"] { cursor: wait; }
.niva-payment .na-submit:disabled { opacity: .62; cursor: default; }

@media (max-width: 620px) {
  .na-payment-names { grid-template-columns: 1fr; }
  .nw-movement-actions { grid-template-columns: 1fr; }
}

.niva-payment [hidden] { display: none !important; }

/* Choix du réseau mobile money (logos opérateurs) */
.na-networks { margin: 0; padding: 0; border: 0; }
.na-networks legend {
  padding: 0;
  margin-bottom: 6px;
  color: var(--nw-muted);
  font-size: 11px;
  font-weight: 650;
}
.na-network-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.na-network {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid #ccdfea;
  border-radius: 10px;
  background: #f4f9fd;
  color: var(--nw-ink);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.na-network img { width: auto; height: 26px; min-width: 26px; max-width: 62px; object-fit: contain; flex: none; border-radius: 6px; background: #fff; }
.na-network input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.na-network:has(input:checked) { border-color: #1d68ad; background: #fff; box-shadow: 0 0 0 2px #1d68ad26; }
.na-network:has(input:focus-visible) { outline: 2px solid #1d68ad; outline-offset: 2px; }
.na-network-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 6px;
  background: #dcecf7;
  color: #1d68ad;
  font-size: 11px;
}

/* Repères du portefeuille */
.nw-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.nw-stat {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px 15px;
  border: 1px solid var(--nw-rule);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 17px #12355209;
}
.nw-stat-top {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #59798c;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.nw-stat-top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-stat-top .nw-ico { width: 15px; height: 15px; }
.nw-stat strong { font: 650 clamp(21px, 3vw, 27px)/1.1 var(--nw-font); letter-spacing: -.035em; }
.nw-stat small { color: var(--nw-muted); font-size: 11px; }

/* Pictogrammes */
.nw-ico { width: 18px; height: 18px; flex: none; }
.nw-card-actions button { display: inline-flex; align-items: center; gap: 7px; }
.nw-card-actions .nw-ico { width: 16px; height: 16px; }
.nw-movement-actions button > span .nw-ico { width: 17px; height: 17px; }
.nw-movement-icon .nw-ico { width: 16px; height: 16px; }

/* Dépôts/retraits et versements côte à côte */
.nw-flow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}
.nw-flow-grid .nw-movements { margin-top: 0; }
.nw-timeline { list-style: none; margin: 0; padding: 0; }
.nw-timeline li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px 2px;
  border-top: 1px solid var(--nw-rule);
  font-size: 13px;
}
.nw-timeline li:first-child { border-top: 0; }
.nw-timeline img { object-fit: contain; padding: 3px; border-radius: 7px; background: #ebf4fc; }
.nw-timeline strong { display: block; font-size: 13px; }
.nw-timeline small { display: block; color: var(--nw-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.nw-timeline li > span { font-weight: 650; white-space: nowrap; }

/* États vides plus lisibles */
.nw-empty-rich { display: flex; align-items: flex-start; gap: 12px; }
.nw-empty-rich .nw-empty-ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: #eaf3fa;
  color: #3a6d92;
}
.nw-empty-rich .nw-empty-ico .nw-ico { width: 17px; height: 17px; }
.nw-empty-rich button { padding-inline: 0; }

/* Lien de parrainage */
.nw-referral-copy input {
  width: min(100%, 360px);
  font: 500 12px/1.4 system-ui, sans-serif;
  letter-spacing: 0;
  text-overflow: ellipsis;
}
.nw-referral-copy { align-items: center; }

@media (max-width: 1000px) {
  .nw-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nw-flow-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nw-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
  .nw-stat { padding: 12px 13px; }
  .nw-flow-grid { gap: 12px; margin-top: 12px; }
}

/* Portefeuille NIVA */
.niva-wallet {
  --app-font: "DM Sans", "Segoe UI", sans-serif;
  --app-display: "Space Grotesk", var(--app-font);
  --app-ink: #102d48;
  --app-muted: #456178;
  --app-link: #195c94;
  --app-blue: #165d9d;
  --app-background: #eaf2fa;
  --app-panel: linear-gradient(147deg, #f8fcffd9 4%, #edf6fc88 46%, #d8ebf867 84%, #f1f8fd9c);
  --app-row: #f1f6fb;
  --app-row-wash: linear-gradient(142deg, #f8fcffc9, #dcecf89c);
  --app-line: #d3e1ee;
  --app-amber: #f0c171;
  --app-ease: cubic-bezier(.23, 1, .32, 1);
  --wallet-sky-start: clamp(280px, 31vw, 400px);
  --wallet-content: min(1000px, calc(100% - 72px));
  --nw-ink: var(--app-ink);
  --nw-muted: var(--app-muted);
  --nw-rule: var(--app-line);
  --nw-font: var(--app-font);
  padding: 0;
  background:
    radial-gradient(ellipse 68% 400px at 48% 74px, #f7fbff, transparent 100%),
    radial-gradient(circle at 1px 1px, #3c729c2c .65px, transparent 1px) center top / 17px 17px,
    radial-gradient(ellipse 58% 400px at 4% 720px, #fff8e8b8, transparent 97%),
    radial-gradient(ellipse 83% 490px at 100% 530px, #b8d6ee, transparent 100%),
    linear-gradient(180deg, #dfedf9, var(--app-background) 1120px);
  color: var(--app-ink);
}
.niva-wallet.is-app { --wallet-sky-start: clamp(440px, 43vw, 620px); }
.niva-wallet .nw-shell { position: relative; isolation: isolate; max-width: none; min-height: 100dvh; background: transparent; }
.niva-wallet .nw-shell::before {
  position: absolute;
  z-index: -1;
  inset: var(--wallet-sky-start) 0 0;
  max-height: clamp(620px, 72vw, 860px);
  background:
    linear-gradient(90deg, #eff6fc 0%, #eff6fc00 72%),
    url("assets/niva-sky.webp") right center / cover no-repeat;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 63%, transparent);
  opacity: .38;
  pointer-events: none;
  content: "";
}
.is-app .nw-main { width: 100%; padding-block: 0 48px; }

.niva-app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.niva-app > :not(.app-hero) { width: var(--wallet-content); margin-inline: auto; }

.app-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: clamp(20px, 3vw, 34px) max(26px, calc((100% - 1120px) / 2)) 24px;
  border-radius: 0 0 28px 28px;
  color: #f5faff;
  background:
    repeating-linear-gradient(132deg, #bbd8fa0b 0 1px, transparent 1px 31px),
    radial-gradient(ellipse at 77% -32%, #3a70a0 0%, transparent 60%),
    radial-gradient(ellipse at 6% 12%, #214c75, transparent 62%),
    #0c233d;
}
.app-greet, .app-id { display: flex; align-items: center; gap: 12px; }
.app-greet { justify-content: space-between; }
.app-avatar, .app-icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.app-avatar {
  border: 1px solid #c6e4ff61;
  border-radius: 14px;
  background: linear-gradient(150deg, #c3e4ff3d, #c3e4ff0a);
  color: #f0f7ff;
  font: 650 16px var(--app-display);
}
.app-id small { display: block; color: #bdd4e9; font-size: 13px; overflow-wrap: anywhere; }
.app-id h1 { font: 700 clamp(21px, 2.8vw, 32px)/1.12 var(--app-display); letter-spacing: -.045em; }
.app-clock-banner {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(100px, 10vw, 128px);
  padding: 12px clamp(13px, 3vw, 26px);
  overflow: hidden;
  border: 1px solid #e4f4ff;
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 85% 0%, #f6fbff 0%, transparent 63%),
    linear-gradient(110deg, #edf7ff, #cde4f7 50%, #a7cbe8);
  box-shadow: 0 5px 16px #03152926;
  color: var(--app-ink);
}
.app-clock-banner::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background: repeating-radial-gradient(ellipse 140px 85px at 72% 110%, transparent 0 11px, #2e6d9b32 11px 12px, transparent 12px 18px);
  mask-image: linear-gradient(90deg, transparent 28%, #000 50%, #000 82%, transparent);
}
.app-clock-macaw {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: min(59%, 450px);
  height: 100%;
  object-fit: cover;
  object-position: 50% 16%;
  mask-image: linear-gradient(90deg, transparent, #000 47%, #000 90%, #000b);
}
.app-clock { display: flex; align-items: center; gap: clamp(9px, 2vw, 16px); }
.app-clock-face {
  display: block;
  flex: none;
  width: clamp(62px, 12vw, 95px);
  border-radius: 50%;
  background: linear-gradient(155deg, #fff, #e5f0fa);
  box-shadow: inset 0 0 0 1px #9eb9d0, 0 4px 10px #1f4b7029;
}
.app-clock-dial { fill: none; stroke: #fff; stroke-width: 3; }
.app-clock-marks { stroke: #55728a; stroke-width: 1.5; stroke-linecap: round; }
.app-clock-marks :nth-child(3n + 1) { stroke: #183e61; stroke-width: 2; }
.app-clock-hour, .app-clock-minute, .app-clock-second { stroke: #133a5e; stroke-linecap: round; }
.app-clock-hour { stroke-width: 4; }
.app-clock-minute { stroke-width: 2.5; }
.app-clock-second { stroke: #a64e18; stroke-width: 1.5; }
.app-clock-pin { fill: #133a5e; }
.app-clock-readout { display: grid; gap: 4px; }
.app-clock-readout span { color: var(--app-muted); font-size: 12px; font-weight: 600; }
.app-clock-readout time { font: 700 clamp(24px, 4vw, 34px)/1 var(--app-display); font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
@media (prefers-reduced-motion: reduce) {
  .app-clock-second { display: none; }
}
.app-icon-btn, .app-card-navigation button { border: 1px solid #cce6ff4a; background: #d9eeff14; color: #f1f8ff; }
.app-icon-btn:hover, .app-card-navigation button:hover { background: #d9eeff32; }
.app-icon-btn:disabled { opacity: .55; }
.app-card-navigation, .app-card-pager { display: flex; gap: 3px; align-items: center; justify-content: center; }
.app-card-navigation button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; font: 650 23px/1 var(--app-font); }
.app-card-pager button { width: 44px; height: 44px; border-color: transparent; background: transparent; }
.app-card-pager button::after { content: ""; width: 7px; height: 7px; border-radius: 9px; background: #c5d9ec9e; }
.app-card-pager button[aria-pressed="true"]::after { width: 24px; background: var(--app-amber); }
.app-cards {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  padding: 1px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.app-hero :is(button, .app-cards):focus-visible { outline: 2px solid #d9ecff; outline-offset: 3px; }
.app-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: clamp(188px, 23vw, 250px);
  padding: clamp(16px, 2.4vw, 26px);
  border: 1px solid #cce5ff59;
  border-radius: 21px;
  scroll-snap-align: start;
  color: #fff;
  background: var(--card-art);
  box-shadow: inset 0 1px #f2f8ff46, inset 0 -1px #061f3659;
  text-shadow: 0 1px 3px #071e346b;
}
.app-card.is-primary {
  --card-art:
    radial-gradient(ellipse at 100% -10%, #75abc9 0%, transparent 64%),
    linear-gradient(128deg, #235e95, #164472 55%, #112c50);
  --card-lines: #bedfff47;
}
.app-card.is-engaged {
  --card-art:
    radial-gradient(ellipse at 100% -18%, #879aba 0%, transparent 64%),
    linear-gradient(135deg, #405b83, #253857 61%, #233452);
  --card-lines: #d6e1ff3d;
}
.app-card.is-referral {
  --card-art:
    radial-gradient(ellipse at 100% -12%, #6fa8ac 0%, transparent 64%),
    linear-gradient(128deg, #285f73, #174357 57%, #15354a);
  --card-lines: #b8eef33f;
}
.app-card::after {
  position: absolute;
  z-index: -1;
  inset: -45% -42% -35% 23%;
  content: "";
  background: repeating-radial-gradient(ellipse at 80% 54%, transparent 0 7px, var(--card-lines) 8px 9px, transparent 10px 15px);
  mask-image: radial-gradient(ellipse at 70% 49%, #000 10%, transparent 74%);
  transform: rotate(-23deg);
  pointer-events: none;
}
.app-card-head, .app-card-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 8px; }
.app-card-head > span { font: 650 14px/1.2 var(--app-display); }
.app-card-head .nw-ico { width: 32px; height: 32px; padding: 5px; border: 1px solid #e2f2ff43; border-radius: 9px; color: #fff; background: #102f5091; }
.app-card-label { color: #f3f8ff; font-size: 13px; }
.app-card strong { display: block; margin-top: 3px; font: 700 clamp(27px, 5.2vw, 42px)/1.1 var(--app-display); font-variant-numeric: tabular-nums; letter-spacing: -.045em; overflow-wrap: anywhere; }
.app-card strong small { font: 600 13px var(--app-font); letter-spacing: 0; color: #e4f0ff; }
.app-card-foot { border-top: 1px solid #d9eaff54; padding-top: 9px; color: #f4f7ff; font-size: 12px; }
.app-card-foot button { min-height: 36px; margin: -5px 0; padding: 0; border: 0; background: transparent; color: inherit; font: 650 12px var(--app-font); text-decoration: underline; text-underline-offset: 3px; }
.app-card-foot button:focus-visible { outline-color: #d3eaff; }

.app-money-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.app-money-actions button {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 9px;
  padding: 10px clamp(9px, 1.6vw, 18px);
  min-height: 66px;
  overflow: hidden;
  border: 1px solid var(--app-line);
  border-radius: 16px;
  color: var(--app-link);
  background: linear-gradient(155deg, #fff, #f5f9fe);
  box-shadow: 0 2px 7px #294c7110;
}
.app-money-actions button::after {
  position: absolute;
  inset: 0 0 auto auto;
  width: 67px;
  height: 54px;
  background: repeating-radial-gradient(circle at 100% 0, transparent 0 11px, #2a689b1e 11px 12px, transparent 12px 20px);
  mask-image: radial-gradient(ellipse at 100% 0, #000, transparent 77%);
  pointer-events: none;
  content: "";
}
.app-money-actions button:first-child { border-color: #bad5ed; background: linear-gradient(150deg, #eef7ff, #d3e9fa); color: #164d7a; }
.app-money-actions button:hover { background: #deedf8; }
.app-money-actions button:first-child:hover { background: #d0e7f8; }
.app-money-actions strong { font: 650 14px/1.2 var(--app-font); }
.app-money-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 1px solid #17365612; border-radius: 12px; background: #e6f0fa; color: #255c90; box-shadow: inset 0 1px #ffffff6b, 0 2px 4px #19395f12; }
.app-money-actions button:first-child .app-money-icon { background: linear-gradient(145deg, #1e6ca9, #164575); color: #fff; }
.app-money-actions button:nth-child(2) .app-money-icon { background: linear-gradient(145deg, #f3f6ff, #d9e6fb); color: #304f85; }
.app-money-actions button:nth-child(3) .app-money-icon { background: linear-gradient(145deg, #f1fbfa, #cfece8); color: #23605f; }
.app-money-icon .nw-ico { width: 23px; height: 23px; }

.app-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.niva-wallet :is(.app-panel, .nw-panel:not(.nw-referral-score)) {
  min-width: 0;
  border: 1px solid #f6fbffdb;
  border-radius: 19px;
  background: var(--app-panel);
  box-shadow: 0 5px 18px #214c7214, inset 0 1px #ffffff80;
}
.app-panel { padding: 14px 16px; }
.app-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.app-panel-head h2 { font: 650 clamp(17px, 2.4vw, 22px)/1.2 var(--app-display); letter-spacing: -.03em; }
.app-panel-head button, .app-empty button, .nw-movement-empty button {
  flex: none;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--app-link);
  font: 650 12px/1.3 var(--app-font);
}
.app-panel-head button:hover, .app-empty button:hover, .nw-movement-empty button:hover { text-decoration: underline; text-underline-offset: 3px; }
.app-rows, .nw-movement-list { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.app-rows li, .nw-movement {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 8px;
  border: 1px solid #f8fcffd9;
  border-radius: 12px;
  background: var(--app-row-wash);
}
.app-rows :is(strong, small), .nw-movement :is(strong, small) { display: block; line-height: 1.4; }
.nw-movement-info { min-width: 0; overflow-wrap: anywhere; }
.app-rows strong, .nw-movement strong { color: var(--app-ink); font-size: 13px; }
.app-rows small, .nw-movement small { color: var(--app-muted); font-size: 11px; }
.app-cycle-amount, .nw-movement-result { text-align: right; }
.app-cycle-amount strong, .nw-movement-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.nw-movement-list .nw-movement-icon, .nw-movement-empty .nw-movement-icon, .app-empty-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #195c94;
  background: #e4f0fa;
}
.nw-movement-list .nw-movement-icon[data-operator-brand="orange"] { background: #fff1e4; color: #8b4821; }
.nw-movement-list .nw-movement-icon[data-operator-brand="wave"] { background: #e0f3fb; color: #165772; }
.nw-movement-list .nw-movement-icon[data-operator-brand="moov"] { background: #e9edff; color: #394d97; }
.nw-movement-amount.is-credit { color: #17603c; }
.nw-movement-state { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; padding: 2px 6px; border-radius: 999px; color: #6e4c13; background: #fff1d6; font-size: 10px; font-weight: 650; line-height: 1.35; white-space: nowrap; }
.nw-movement-state::before { width: 4px; height: 4px; border-radius: 50%; background: currentColor; content: ""; }
.nw-movement-state[data-status="confirmed"] { color: #1d5d42; background: #e2f4ea; }
.nw-movement-state[data-status="failed"] { color: #8e332d; background: #fbe8e6; }
.app-empty, .nw-movement-empty { display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; padding: 12px 11px 3px; border: 1px solid #f8fcffd9; border-radius: 11px; background: var(--app-row-wash); }
.app-empty strong, .nw-movement-empty strong { font-size: 14px; }
.app-empty p, .nw-movement-empty p { color: var(--app-muted); font-size: 12px; }

.app-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-bottom: 2px; }
.app-shortcuts button { display: grid; justify-items: start; gap: 4px; min-width: 0; padding: clamp(8px, 1.8vw, 13px); border: 1px solid #bed6eb; border-radius: 11px; background: var(--app-row-wash); color: var(--app-ink); text-align: left; }
.app-shortcuts button:hover:not(:disabled) { background: #e8f2fb; }
.app-shortcuts small { color: var(--app-muted); font-size: 11px; }
.niva-wallet .nw-brand-logo { display: block; flex: none; object-fit: contain; padding: clamp(5px, 1vw, 10px); border-radius: 10px; background: #fff; }
.niva-wallet .nw-brand-logo[data-brand="netflix"], .niva-wallet .nw-brand-logo[data-brand="spotify"] { background: #0b1020; }
.niva-wallet .cycle-confirm > .nw-brand-logo { margin-bottom: 14px; }
.app-shortcuts .nw-brand-logo { width: clamp(40px, 8vw, 57px); height: auto; aspect-ratio: 1; margin-bottom: 3px; }
.app-shortcuts strong { font-size: 13px; font-weight: 650; }

@media (min-width: 880px) {
  .app-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .app-card-navigation { display: none; }
}
@media (max-width: 879px) {
  .app-cards { --card-width: 47%; --card-gap: 10px; grid-template-columns: repeat(3, var(--card-width)) calc(100% - var(--card-width) - var(--card-gap)); gap: var(--card-gap); }
  .app-cards::after { content: ""; }
}
@media (max-width: 760px) {
  .niva-wallet { --wallet-content: min(640px, calc(100% - 28px)); }
  .is-app .nw-main { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
  .niva-app { gap: 13px; }
  .app-hero { padding: 16px 14px 6px; gap: 12px; }
  .app-clock-macaw { object-position: 50% 25%; }
  .app-card { min-height: 176px; border-radius: 17px; }
  .app-card-navigation > button { display: none; }
  .app-money-actions button { flex-direction: column; justify-content: center; gap: 5px; min-height: 81px; }
}
@media (max-width: 600px) {
  .app-cards { --card-width: 86%; --card-gap: 9px; }
  .app-card { width: 100%; aspect-ratio: 1.65; }
}
@media (prefers-reduced-motion: no-preference) {
  .app-card-pager button::after { transition: width 190ms var(--app-ease), background-color 190ms; }
  .app-money-icon { transition: transform 160ms var(--app-ease); }
  .app-money-actions button:active .app-money-icon { transform: scale(.9); }
  .app-icon-btn[aria-busy="true"] .nw-ico { animation: niva-refresh .85s linear infinite; }
  @keyframes niva-refresh { to { transform: rotate(360deg); } }
}
@media (max-width: 380px) {
  .app-money-actions button { gap: 5px; }
  .app-money-actions strong { font-size: 12px; }
  .app-money-icon .nw-ico { width: 20px; height: 20px; }
  .app-rows li, .nw-movement { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 7px; }
  .app-rows img, .app-rows .app-empty-icon, .nw-movement-list .nw-movement-icon { width: 32px; height: 32px; }
  .app-rows strong, .nw-movement strong { font-size: 12px; }
}
