/* Garde-fou global : aucune icône SVG de contenu ne peut s'étaler en pleine largeur */
.app-content svg:not([width]), #app-content svg:not([width]){ max-width: 28px; max-height: 28px; }
.action-ico svg, .loan-icon svg, .feature .ico svg, .tab svg{ max-width:none; max-height:none; }
/* ============================================================
   PrêtFlash — Système de design
   Palette : slate profond, indigo→violet électrique en signature
   Display : Sora · Corps : Inter
   ============================================================ */

:root {
  --bg:            #0c0e14;
  --bg-elev:       #14171f;
  --bg-elev-2:     #1b1f2a;
  --bg-card:       #161a23;
  --line:          #262b38;
  --line-soft:     #1e222c;
  --text:          #eef1f7;
  --text-dim:      #99a1b3;
  --text-faint:    #636b7d;
  --accent:        #5b6cff;
  --accent-2:      #9b5bff;
  --accent-soft:   rgba(91,108,255,0.14);
  --success:       #2fd28a;
  --success-soft:  rgba(47,210,138,0.14);
  --warning:       #ffb648;
  --warning-soft:  rgba(255,182,72,0.14);
  --danger:        #ff5d6c;
  --danger-soft:   rgba(255,93,108,0.14);
  --grad:          linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius:        18px;
  --radius-sm:     12px;
  --radius-lg:     26px;
  --shadow:        0 8px 30px rgba(0,0,0,0.4);
  --shadow-up:     0 -6px 24px rgba(0,0,0,0.35);
  --header-h:      62px;
  --tab-h:         68px;
  --maxw:          540px;
  --ease:          cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
body { min-height: 100dvh; }

h1, h2, h3, h4 { font-family: 'Sora', sans-serif; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

::-webkit-scrollbar { width: 0; height: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Shell ---------- */
#app-shell { min-height: 100dvh; display: flex; flex-direction: column; }

.app-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; padding-top: env(safe-area-inset-top);
  background: rgba(12,14,20,0.82);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--grad); color: #fff;
  font-family: 'Sora'; font-weight: 800; font-size: 18px;
  box-shadow: 0 4px 14px var(--accent-soft);
}
.brand-name { font-family: 'Sora'; font-weight: 700; font-size: 18px; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; color: var(--text-dim);
  transition: background .2s, color .2s;
}
.icon-btn:active { background: var(--bg-elev-2); color: var(--text); }
.badge {
  position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px; background: var(--danger);
  color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--bg);
}
.badge.hidden { display: none; }
.avatar {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bg-elev-2); border: 1px solid var(--line);
  font-family: 'Sora'; font-weight: 700; font-size: 14px; color: var(--text);
}

/* ---------- Contenu ---------- */
.app-content {
  flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 20px 18px calc(var(--tab-h) + env(safe-area-inset-bottom) + 24px);
  animation: page-in .42s var(--ease) both;
}
.is-guest .app-content { padding-bottom: 40px; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.app-content.is-leaving { opacity: 0; transform: translateY(-8px); transition: opacity .18s, transform .18s; }

/* ---------- Navigation type app ---------- */
.tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: center; justify-content: space-around;
  background: rgba(16,19,27,0.9);
  backdrop-filter: saturate(160%) blur(20px);
  border-top: 1px solid var(--line-soft);
  box-shadow: var(--shadow-up);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-faint); font-size: 10.5px; font-weight: 600;
  transition: color .2s; -webkit-tap-highlight-color: transparent;
}
.tab svg { width: 23px; height: 23px; transition: transform .25s var(--ease); }
.tab.active { color: var(--accent); }
.tab.active svg { transform: translateY(-1px); }
.tab--cta {
  flex: 0 0 auto; width: 56px; height: 56px; margin-top: -16px;
  border-radius: 50%; background: var(--grad); color: #fff;
  justify-content: center; box-shadow: 0 8px 22px rgba(91,108,255,0.45);
  transition: transform .2s var(--ease);
}
.tab--cta svg { width: 26px; height: 26px; }
.tab--cta:active { transform: scale(0.92); }
.tab--cta.active { color: #fff; }

/* ---------- Cartes & surfaces ---------- */
.card {
  background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px;
}
.card + .card { margin-top: 14px; }
.section-title { font-size: 13px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; margin: 22px 2px 12px; }
.section-title:first-child { margin-top: 4px; }

/* Carte solde principale */
.balance-card {
  position: relative; overflow: hidden;
  background: var(--grad); border-radius: var(--radius-lg);
  padding: 26px 22px; color: #fff;
  box-shadow: 0 12px 34px rgba(91,108,255,0.36);
}
.balance-card::after {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
}
.balance-card::before {
  content: ''; position: absolute; right: 40px; bottom: -60px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.balance-card .label { font-size: 13px; opacity: .85; position: relative; z-index: 1; }
.balance-card .amount { font-family: 'Sora'; font-size: 34px; font-weight: 800; margin-top: 4px; position: relative; z-index: 1; }
.balance-card .sub { font-size: 13px; opacity: .85; margin-top: 8px; position: relative; z-index: 1; }

/* Grille de stats */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.stat {
  background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 16px;
}
.stat .v { font-family: 'Sora'; font-size: 22px; font-weight: 700; }
.stat .k { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* ---------- Listes de prêts ---------- */
.loan-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 15px; margin-bottom: 11px;
  transition: transform .15s var(--ease), border-color .2s;
}
.loan-item:active { transform: scale(0.985); border-color: var(--line); }
.loan-icon {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.loan-icon svg { width: 22px; height: 22px; }
.loan-meta { flex: 1; min-width: 0; }
.loan-meta .ref { font-size: 12px; color: var(--text-faint); }
.loan-meta .amt { font-family: 'Sora'; font-weight: 700; font-size: 17px; }
.loan-meta .dur { font-size: 12.5px; color: var(--text-dim); }

/* Badges de statut */
.status { font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 8px; white-space: nowrap; }
.status--pending  { background: var(--warning-soft); color: var(--warning); }
.status--approved,
.status--active   { background: var(--accent-soft); color: var(--accent); }
.status--repaid   { background: var(--success-soft); color: var(--success); }
.status--rejected,
.status--defaulted{ background: var(--danger-soft); color: var(--danger); }

/* ---------- Formulaires ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.input, .select, textarea.input {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--bg-elev); border: 1px solid var(--line); color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.input::placeholder { color: var(--text-faint); }
.input-group { position: relative; }
.input-group .suffix { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 14px; }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 6px; display: none; }
.field.has-error .input { border-color: var(--danger); }
.field.has-error .field-error { display: block; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px 20px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px; transition: transform .12s var(--ease), opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(91,108,255,0.35); }
.btn--ghost { background: var(--bg-elev); border: 1px solid var(--line); color: var(--text); }
.btn--success { background: var(--success); color: #06281b; }
.btn--danger { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(255,93,108,0.3); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn.loading { color: transparent; position: relative; }
.btn.loading::after {
  content: ''; position: absolute; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.text-btn { color: var(--accent); font-size: 13px; font-weight: 600; }

/* Range slider */
.range-wrap { margin: 6px 0 4px; }
input[type=range] {
  -webkit-appearance: none; width: 100%; height: 6px; border-radius: 3px;
  background: var(--bg-elev-2); outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 4px solid var(--accent); cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4); transition: transform .15s;
}
input[type=range]::-webkit-slider-thumb:active { transform: scale(1.15); }
input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  border: 4px solid var(--accent); cursor: pointer;
}

/* ---------- Hero invité ---------- */
.guest-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px 60px; }
.guest-hero { padding: 56px 0 32px; text-align: center; }
.guest-hero .eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); background: var(--accent-soft);
  padding: 6px 14px; border-radius: 20px; margin-bottom: 20px;
}
.guest-hero h1 { font-size: clamp(32px, 9vw, 46px); font-weight: 800; }
.guest-hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.guest-hero p { color: var(--text-dim); font-size: 16px; margin-top: 16px; max-width: 30ch; margin-inline: auto; }
.guest-cta { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.feature-row { display: flex; gap: 12px; margin-top: 36px; }
.feature {
  flex: 1; background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px 14px; text-align: center;
}
.feature .ico { width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.feature .ico svg { width: 20px; height: 20px; }
.feature h4 { font-size: 14px; }
.feature p { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.auth-card { max-width: 440px; margin: 0 auto; padding: 30px 22px; }
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head .brand-mark { width: 52px; height: 52px; font-size: 26px; border-radius: 15px; margin: 0 auto 16px; }
.auth-head h1 { font-size: 26px; }
.auth-head p { color: var(--text-dim); margin-top: 6px; font-size: 14px; }
.auth-foot { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-dim); }

/* ---------- Skeleton loaders ---------- */
.skeleton {
  background: linear-gradient(100deg, var(--bg-elev) 30%, var(--bg-elev-2) 50%, var(--bg-elev) 70%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-line { height: 14px; margin-bottom: 9px; }
.sk-line.w60 { width: 60%; } .sk-line.w40 { width: 40%; } .sk-line.w80 { width: 80%; }
.sk-card { height: 78px; border-radius: var(--radius); margin-bottom: 11px; }
.sk-balance { height: 150px; border-radius: var(--radius-lg); margin-bottom: 14px; }

/* ---------- Notifications drawer ---------- */
.notif-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 88vw); z-index: 90;
  background: var(--bg-elev); border-left: 1px solid var(--line);
  transform: translateX(105%); transition: transform .34s var(--ease);
  display: flex; flex-direction: column; padding-top: env(safe-area-inset-top);
}
.notif-drawer.open { transform: translateX(0); }
.notif-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 18px; border-bottom: 1px solid var(--line-soft); }
.notif-drawer__head h3 { font-size: 18px; }
.notif-drawer__list { flex: 1; overflow-y: auto; padding: 12px; }
.notif {
  display: flex; gap: 12px; padding: 13px; border-radius: var(--radius-sm);
  margin-bottom: 8px; background: var(--bg-card); border: 1px solid var(--line-soft);
}
.notif.unread { border-color: var(--accent); background: var(--accent-soft); }
.notif .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--text-faint); }
.notif.unread .dot { background: var(--accent); }
.notif .body h5 { font-size: 14px; font-weight: 600; }
.notif .body p { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.notif .body time { font-size: 11px; color: var(--text-faint); }

.overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.overlay.show { opacity: 1; visibility: visible; }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + 16px); z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  pointer-events: auto; max-width: var(--maxw); width: 100%;
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--bg-elev-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); animation: toast-in .35s var(--ease);
}
.toast.out { animation: toast-out .3s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(16px); } }
.toast .ico { width: 22px; height: 22px; flex-shrink: 0; }
.toast--success .ico { color: var(--success); }
.toast--error .ico { color: var(--danger); }
.toast--info .ico { color: var(--accent); }
.toast .msg { font-size: 14px; flex: 1; }

/* ---------- Progress bar ---------- */
.page-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200;
  background: var(--grad); transition: width .3s var(--ease), opacity .3s;
}
.page-progress.active { width: 80%; }
.page-progress.done { width: 100%; opacity: 0; }

/* ---------- Géolocalisation ---------- */
.geo-box {
  display: flex; gap: 13px; align-items: flex-start; padding: 15px;
  border-radius: var(--radius-sm); background: var(--bg-elev); border: 1px solid var(--line); margin-bottom: 8px;
}
.geo-box.ok { border-color: var(--success); background: var(--success-soft); }
.geo-box.err { border-color: var(--danger); background: var(--danger-soft); }
.geo-box .ico { width: 24px; height: 24px; flex-shrink: 0; color: var(--text-dim); }
.geo-box.ok .ico { color: var(--success); }
.geo-box.err .ico { color: var(--danger); }
.geo-box h5 { font-size: 14px; } .geo-box p { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }

/* ---------- Verification ---------- */
.verify-channel { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line-soft); border-radius: var(--radius); margin-bottom: 12px; background: var(--bg-card); }
.verify-channel.done { border-color: var(--success); }
.verify-channel .vc-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.verify-channel.done .vc-ico { background: var(--success-soft); color: var(--success); }
.verify-channel .vc-body { flex: 1; min-width: 0; }
.verify-channel .vc-body h4 { font-size: 15px; } .verify-channel .vc-body p { font-size: 12.5px; color: var(--text-dim); }
.code-inputs { display: flex; gap: 8px; margin: 14px 0; }
.code-inputs input {
  width: 100%; aspect-ratio: 1; text-align: center; font-size: 22px; font-weight: 700;
  font-family: 'Sora'; border-radius: var(--radius-sm); background: var(--bg-elev);
  border: 1px solid var(--line); color: var(--text);
}
.code-inputs input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Tableaux admin ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th { text-align: left; color: var(--text-dim); font-weight: 600; padding: 10px; border-bottom: 1px solid var(--line); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.admin-table td { padding: 12px 10px; border-bottom: 1px solid var(--line-soft); }
.admin-table tr:active td { background: var(--bg-elev); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--line-soft); }

.filter-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.chip { white-space: nowrap; padding: 8px 14px; border-radius: 20px; background: var(--bg-elev); border: 1px solid var(--line); font-size: 13px; color: var(--text-dim); }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.kv { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--text-dim); } .kv .v { font-weight: 600; }

/* États vides */
.empty { text-align: center; padding: 50px 20px; color: var(--text-dim); }
.empty .ico { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; background: var(--bg-elev); display: grid; place-items: center; color: var(--text-faint); }
.empty h3 { font-size: 18px; color: var(--text); } .empty p { font-size: 14px; margin-top: 6px; }

/* Timeline échéances */
.timeline-item { display: flex; gap: 14px; padding: 12px 0; }
.timeline-item .tl-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; background: var(--text-faint); flex-shrink: 0; position: relative; }
.timeline-item .tl-dot::after { content: ''; position: absolute; top: 14px; left: 5px; width: 2px; height: calc(100% + 12px); background: var(--line); }
.timeline-item:last-child .tl-dot::after { display: none; }
.timeline-item.paid .tl-dot { background: var(--success); }
.timeline-item.overdue .tl-dot { background: var(--danger); }
.timeline-item .tl-body { flex: 1; }
.timeline-item .tl-body .d { font-size: 13px; font-weight: 600; }
.timeline-item .tl-body .s { font-size: 12px; color: var(--text-dim); }

.hidden { display: none !important; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.center { text-align: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--text-dim); } .small { font-size: 13px; }

@media (min-width: 768px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Bouton flottant WhatsApp ---------- */
.wa-fab{
  position: fixed;
  right: 18px;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px);
  width: 54px; height: 54px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(37,211,102,0.45);
  z-index: 60;
  transition: transform .2s var(--ease);
}
.wa-fab:active{ transform: scale(0.92); }
.is-guest .wa-fab{ bottom: calc(env(safe-area-inset-bottom) + 18px); }

/* ============================================================
   Confort de lecture — sobre et professionnel
   Tailles légèrement augmentées pour la lisibilité,
   sans casser la hiérarchie visuelle.
   ============================================================ */

body { font-size: 15px; line-height: 1.55; }
h2 { font-size: 20px; }
.section-title { font-size: 13px; letter-spacing: .03em; }
.field label { font-size: 13.5px; }
.muted, .small { font-size: 13px; }

.input, .select, textarea.input {
  font-size: 15px;
  padding: 13px 15px;
}

.btn {
  font-size: 15px;
  padding: 13px 18px;
  min-height: 48px;
}

.text-btn { font-size: 14px; }
.kv { font-size: 14px; padding: 11px 0; }

.tab { font-size: 11px; }
.tab span { font-weight: 600; }

.card { padding: 16px; }
.card + .card { margin-top: 12px; }
.loan-item { padding: 14px; margin-bottom: 10px; }

.code-inputs input { font-size: 22px; }

@media (max-width: 380px) {
  body { font-size: 14px; }
}

/* ---------- Tuiles d'action du tableau de bord ---------- */
.dash-actions{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.action-tile{
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 18px 12px;
  background: var(--surface, #1a1d27);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 16px;
  color: var(--text, #fff);
  font-weight: 600; font-size: 15px;
  text-align: center;
  transition: transform .15s var(--ease), border-color .15s var(--ease);
}
.action-tile:active{ transform: scale(.97); }
.action-ico{
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #5b6cff, #9b5bff);
  color: #fff;
}
.action-ico svg{ width: 22px; height: 22px; }

/* ---------- Bouton "Télécharger l'application" ---------- */
.btn--install{
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #5b6cff, #9b5bff);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(91,108,255,.35);
}
.btn--install:active{ transform: scale(.98); }
.btn--install svg{ flex-shrink: 0; }

/* ---------- Carte solde portefeuille ---------- */
.wallet-card{
  background: linear-gradient(135deg, #5b6cff 0%, #9b5bff 100%);
  border-radius: 20px;
  padding: 20px;
  color: #fff;
  box-shadow: 0 12px 30px rgba(91,108,255,.30);
  position: relative;
  overflow: hidden;
}
.wallet-card::after{
  content:''; position:absolute; right:-30px; top:-30px;
  width:140px; height:140px; border-radius:50%;
  background:rgba(255,255,255,.12); pointer-events:none;
}
.wallet-card > *{ position:relative; z-index:1; }
.wallet-card__label{ font-size:13px; opacity:.9; }
.wallet-card__amount{ font-size:32px; font-weight:800; margin:4px 0 12px; }
.wallet-card__amount span{ font-size:16px; font-weight:600; opacity:.85; }
.wallet-card__btn{
  display:inline-block;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.30);
  color:#fff; font-weight:700; font-size:14px;
  padding:10px 18px; border-radius:12px;
}
.wallet-card__btn:active{ transform:scale(.97); }

/* ---------- Scroll infini : indicateur de chargement ---------- */
.infinite-sentinel{
  height: 40px;
  margin: 8px 0 24px;
}
.infinite-sentinel.loading-more{
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cg%3E%3Ccircle cx='12' cy='3' r='2' fill='%235b6cff'/%3E%3C/g%3E%3C/svg%3E") center no-repeat;
  position: relative;
}
.infinite-sentinel.loading-more::after{
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border: 2px solid rgba(91,108,255,.25);
  border-top-color: #5b6cff;
  border-radius: 50%;
  animation: pf-spin .7s linear infinite;
}
@keyframes pf-spin{ to { transform: rotate(360deg); } }

/* ---------- Champ mot de passe avec icône œil ---------- */
.pass-wrap{ position: relative; }
.pass-wrap > input{ padding-right: 48px !important; width: 100%; }
.pass-toggle{
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 38px; height: 38px; border: none; background: transparent;
  color: var(--text-dim, #8a93a6); cursor: pointer;
  display: grid; place-items: center; border-radius: 10px;
  padding: 0;
}
.pass-toggle:hover{ color: var(--text, #fff); }
.pass-toggle.is-visible{ color: #5b6cff; }

/* ---------- Éléments de transaction ---------- */
.tx-item{
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; margin-bottom: 8px;
  background: var(--surface, #1a1d27);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 14px;
}
.tx-icon{
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
}
.tx-icon--credit{ background: rgba(46,204,113,.15); color: #2ecc71; }
.tx-icon--debit{ background: rgba(231,76,60,.15); color: #e74c3c; }
.tx-meta{ flex: 1; min-width: 0; }
.tx-reason{ font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-date{ font-size: 12px; color: var(--text-dim, #8a93a6); margin-top: 2px; }
.tx-amount{ text-align: right; font-weight: 800; font-size: 15px; white-space: nowrap; }
.tx-amount--credit{ color: #2ecc71; }
.tx-amount--debit{ color: #e74c3c; }
.tx-bal{ display: block; font-weight: 500; font-size: 11px; color: var(--text-dim, #8a93a6); margin-top: 2px; }
