.home-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 116px;
}

#screen-home .home-scroll {
  position: absolute;
  inset: 0;
}

#screen-ristourne,
#screen-collecte {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#screen-ristourne .home-scroll,
#screen-collecte .home-scroll {
  flex: 1;
}

.home-header {
  background: linear-gradient(152deg, #1A1A1A 0%, #0A0A0A 50%, #000000 100%);
  padding: 52px 20px 26px;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 28px 28px;
}

.home-header-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.home-header-orb-1 {
  width: 240px;
  height: 240px;
  top: -80px;
  right: -60px;
  background: rgba(255,255,255,0.055);
}

.home-header-orb-2 {
  width: 160px;
  height: 160px;
  bottom: -55px;
  left: -35px;
  background: rgba(236,72,153,0.12);
}

.home-greeting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  position: relative;
  z-index: 1;
}

.home-logo-mark {
  height: 28px;
  width: auto;
  display: block;
}

.home-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.home-notif-btn {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.11);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 150ms ease;
}

.home-notif-btn:active {
  background: rgba(255,255,255,0.2);
}

.home-notif-btn svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.home-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #F97316;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.wallet-switch-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.wallet-arrow-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 150ms ease, transform 150ms ease;
}

.wallet-arrow-btn:active {
  background: rgba(255,255,255,0.2);
  transform: scale(0.92);
}

.wallet-arrow-btn svg {
  width: 16px;
  height: 16px;
  color: #fff;
}

.wallet-switch-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  letter-spacing: -0.1px;
  min-width: 110px;
  justify-content: center;
}

.wallet-switch-label svg {
  width: 15px;
  height: 15px;
  color: var(--primary);
  flex-shrink: 0;
}

.wallet-balance-amount {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 8px;
}

.wallet-balance-currency {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  letter-spacing: -0.3px;
  margin-left: 4px;
}

.wallet-balance-sub {
  font-size: 12.5px;
  color: rgba(255,255,255,0.46);
  margin-bottom: 22px;
}

.wallet-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.wallet-action-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-full);
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.wallet-action-pill:active {
  background: rgba(255,255,255,0.18);
  transform: scale(0.96);
}

.wallet-action-pill svg {
  width: 15px;
  height: 15px;
  color: #fff;
}

.wallet-action-fab {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(236,72,153,0.4);
  transition: transform 150ms ease;
}

.wallet-action-fab:active {
  transform: scale(0.92);
}

.wallet-action-fab svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

.wallet-actions-row-desktop {
  display: none;
}

.home-section {
  padding: 22px 20px 0;
}

.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.home-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
}

.home-section-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
}

.wallet-empty-cta {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
}

.wallet-empty-cta p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.wallet-empty-cta .btn {
  max-width: 240px;
  margin: 0 auto;
}

.peegbox-banner {
  margin: 22px 20px 0;
  background: linear-gradient(135deg, #262626 0%, #121212 55%, #000000 100%);
  border-radius: var(--radius-xl);
  padding: 18px 18px 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.peegbox-banner:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(236,72,153,0.25);
}

.peegbox-banner:active {
  transform: scale(0.98);
}

.peegbox-banner-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.peegbox-banner-orb-1 {
  width: 190px;
  height: 190px;
  top: -65px;
  right: -45px;
  background: rgba(255,255,255,0.055);
}

.peegbox-banner-orb-2 {
  width: 110px;
  height: 110px;
  bottom: -35px;
  left: -20px;
  background: rgba(249,115,22,0.1);
}

.peegbox-banner-inner {
  position: relative;
  z-index: 1;
}

.peegbox-banner-row1 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.peegbox-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  padding: 4px 10px 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
}

.peegbox-banner-badge svg {
  width: 12px;
  height: 12px;
  color: #FCD34D;
}

.peegbox-banner-rank-box {
  text-align: right;
}

.peegbox-banner-rank-label {
  font-size: 10px;
  color: rgba(255,255,255,0.44);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  margin-bottom: 2px;
}

.peegbox-banner-rank-val {
  font-size: 26px;
  font-weight: 800;
  color: #FCD34D;
  letter-spacing: -0.5px;
  line-height: 1;
}

.peegbox-banner-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
  margin-bottom: 3px;
}

.peegbox-banner-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.56);
  margin-bottom: 14px;
  line-height: 1.5;
}

.peegbox-banner-stats {
  display: flex;
  gap: 20px;
}

.peegbox-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.peegbox-stat-label {
  font-size: 10px;
  color: rgba(255,255,255,0.42);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.peegbox-stat-value {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

.savings-list,
.ristourne-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.savings-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.savings-card:active {
  transform: scale(0.98);
}

.savings-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.savings-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--purple-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.savings-card-icon svg {
  width: 18px;
  height: 18px;
  color: var(--purple);
}

.savings-card-info {
  flex: 1;
  min-width: 0;
}

.savings-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.savings-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.savings-card-pct {
  font-size: 15px;
  font-weight: 700;
  color: var(--purple);
  flex-shrink: 0;
}

.savings-progress-bg {
  height: 6px;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
}

.savings-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #DB2777 0%, #EC4899 100%);
  width: 0;
  transition: width 820ms var(--ease-out);
}

.savings-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.savings-card-current {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple);
}

.savings-card-target {
  font-size: 12px;
  color: var(--text-muted);
}

.ristourne-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.ristourne-card:active {
  transform: scale(0.98);
}

.ristourne-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--orange-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ristourne-card-icon svg {
  width: 20px;
  height: 20px;
  color: var(--orange);
}

.ristourne-card-info {
  flex: 1;
  min-width: 0;
}

.ristourne-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ristourne-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.ristourne-card-right {
  flex-shrink: 0;
  text-align: right;
}

.ristourne-card-amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.ristourne-card-rank {
  font-size: 11px;
  color: var(--text-muted);
}

.home-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon.in-icon {
  background: var(--accent-light);
  color: var(--accent-dark);
}

.activity-icon.out-icon {
  background: var(--red-light);
  color: var(--red);
}

.activity-icon svg {
  width: 18px;
  height: 18px;
}

.activity-info {
  flex: 1;
  min-width: 0;
}

.activity-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-date {
  font-size: 12px;
  color: var(--text-muted);
}

.activity-amount {
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.activity-amount.positive { color: var(--accent-dark); }
.activity-amount.negative { color: var(--red); }

.home-topbar { display: none; }
.sidebar-header { display: none; }

@media (min-width: 1024px) {
  .home-scroll-inner {
    padding: 28px 32px;
    gap: 28px;
  }

  #wallet-content { gap: 28px; }

  .home-topbar { padding: 16px 32px; }
}

.savings-card-amounts {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}

.savings-card-actions {
  display: flex;
  gap: 8px;
}

.savings-btn-deposit {
  flex: 1;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: background 150ms ease;
}

.savings-btn-deposit:active { background: var(--primary-dark); }

.savings-btn-withdraw {
  flex: 1;
  height: 36px;
  background: var(--secondary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: background 150ms ease;
}

.savings-btn-withdraw:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.home-section-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  outline: none;
  padding: 0;
}

.tir-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.tir-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.tir-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 430px;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  z-index: 201;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  transition: transform 300ms ease;
}

.tir-sheet.open {
  transform: translateX(-50%) translateY(0);
}

.tir-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin: 14px auto 0;
  flex-shrink: 0;
}

.tir-sheet-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.tir-sheet-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.tir-sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  color: var(--text-muted);
}

.tir-sheet-close svg {
  width: 16px;
  height: 16px;
}

.tir-sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tir-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tir-type-selector {
  display: flex;
  gap: 8px;
}

.tir-type-btn {
  flex: 1;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  outline: none;
  transition: all 150ms ease;
}

.tir-type-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.tir-type-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary);
}

.tir-separator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
}

.tir-separator::before,
.tir-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.tir-separator span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.tir-error {
  font-size: 13px;
  color: var(--red);
  display: none;
}

.tir-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px;
  gap: 16px;
  text-align: center;
}

.tir-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.tir-waiting-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.tir-waiting-msg {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.tir-withdraw-info {
  text-align: center;
  padding: 20px 0 8px;
}

.tir-withdraw-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.tir-withdraw-amount {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.tir-withdraw-note {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.tir-fee-breakdown {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 4px 0 14px;
}

.tir-fee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  padding: 5px 0;
}

.tir-fee-row.tir-fee-net {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 9px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

#transfer-recipient-status {
  min-height: 28px;
  margin: -4px 0 14px;
}

.peegbox-banner-soon-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.3px;
}

.r-caisse-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.r-caisse-btn {
  flex: 1;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  transition: background 150ms ease;
}

.r-caisse-btn:active { background: rgba(236,72,153,0.06); }

.r-caisse-btn svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}
