@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --background: hsl(0, 0%, 97%);
  --foreground: hsl(220, 20%, 10%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(220, 20%, 10%);
  --primary: hsl(340, 75%, 30%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(340, 20%, 94%);
  --secondary-foreground: hsl(340, 75%, 30%);
  --muted: hsl(220, 10%, 94%);
  --muted-foreground: hsl(220, 10%, 45%);
  --accent: hsl(340, 60%, 92%);
  --accent-foreground: hsl(340, 75%, 30%);
  --destructive: hsl(0, 84%, 60%);
  --destructive-foreground: hsl(0, 0%, 100%);
  --border: hsl(220, 15%, 90%);
  --input: hsl(220, 15%, 90%);
  --ring: hsl(340, 75%, 30%);
  --radius: 1rem;
  --crimson: hsl(340, 75%, 30%);
  --crimson-light: hsl(340, 60%, 92%);
  --crimson-dark: hsl(340, 80%, 22%);
  --gold: hsl(42, 90%, 55%);
  --success: hsl(145, 60%, 40%);
  --gradient-crimson: linear-gradient(135deg, hsl(340, 75%, 30%), hsl(340, 80%, 22%));
  --gradient-card: linear-gradient(135deg, hsl(340, 75%, 35%), hsl(340, 80%, 20%));
  --shadow-card: 0 4px 20px -4px hsla(340, 75%, 30%, 0.15);
  --shadow-elevated: 0 8px 30px -8px hsla(340, 75%, 30%, 0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* Gradient & Shadows */
.gradient-crimson { background: var(--gradient-crimson); }
.gradient-card { background: var(--gradient-card); }
.shadow-card { box-shadow: var(--shadow-card); }
.shadow-elevated { box-shadow: var(--shadow-elevated); }
.text-gradient {
  background: var(--gradient-crimson);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== LOADING SCREEN ===== */
.loading-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: hsla(0,0%,97%,0.95);
  backdrop-filter: blur(8px);
}
.loading-logo {
  width: 80px; height: 80px; border-radius: 16px;
  background: var(--gradient-crimson);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-elevated);
  margin-bottom: 24px;
  animation: logoPulse 1.5s ease-in-out infinite;
}
.loading-logo img { width: 48px; height: 48px; object-fit: contain; }
@keyframes logoPulse {
  0%, 100% { transform: scale(1) rotate(0); }
  25% { transform: scale(1.1) rotate(5deg); }
  75% { transform: scale(1.1) rotate(-5deg); }
}
.loading-text {
  font-size: 14px; font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 16px;
}
.loading-bar {
  width: 128px; height: 4px;
  background: var(--muted); border-radius: 99px;
  overflow: hidden;
}
.loading-bar-fill {
  width: 50%; height: 100%;
  background: var(--gradient-crimson); border-radius: 99px;
  animation: loadSlide 1.2s ease-in-out infinite;
}
@keyframes loadSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.login-bg {
  position: absolute; inset: 0;
}
.login-bg img {
  width: 100%; height: 100%; object-fit: cover;
}
.login-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    hsla(220,20%,10%,0.8),
    hsla(220,20%,10%,0.6),
    hsla(220,20%,10%,0.9));
}
.login-content {
  position: relative; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; padding: 48px 24px;
}
.login-brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 40px; }
.login-logo-box {
  width: 80px; height: 80px; border-radius: 16px;
  background: var(--gradient-crimson);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-elevated);
  margin-bottom: 16px;
  animation: fadeInDown 0.6s ease;
}
.login-logo-box img { width: 48px; height: 48px; object-fit: contain; }
.login-title {
  font-size: 30px; font-weight: 800;
  color: var(--primary-foreground); letter-spacing: -0.02em;
}
.login-subtitle {
  font-size: 14px; color: hsla(0,0%,100%,0.6); margin-top: 4px;
}
.login-form {
  width: 100%; max-width: 384px;
  display: flex; flex-direction: column; gap: 16px;
  animation: fadeInUp 0.6s ease 0.2s both;
}
.input-group { position: relative; }
.input-group svg {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: hsla(0,0%,100%,0.4);
}
.input-group input {
  width: 100%; height: 48px;
  padding: 0 44px;
  background: hsla(0,0%,100%,0.1);
  border: 1px solid hsla(0,0%,100%,0.2);
  border-radius: 12px; color: white;
  font-size: 14px; backdrop-filter: blur(8px);
  outline: none; transition: border-color 0.2s;
}
.input-group input::placeholder { color: hsla(0,0%,100%,0.4); }
.input-group input:focus { border-color: var(--primary); }
.input-group .toggle-pw {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: hsla(0,0%,100%,0.4); padding: 0;
}
.forgot-pw {
  text-align: right; font-size: 12px;
  color: hsla(0,0%,100%,0.6);
}
.forgot-pw:hover { color: hsla(0,0%,100%,0.8); }
.btn-primary {
  width: 100%; height: 48px; border-radius: 12px;
  background: var(--gradient-crimson);
  color: var(--primary-foreground);
  font-weight: 600; font-size: 16px;
  box-shadow: var(--shadow-elevated);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary .spinner { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-switch {
  text-align: center; padding-top: 16px;
  font-size: 14px; color: hsla(0,0%,100%,0.5);
}
.login-switch a {
  font-weight: 600; color: white; margin-left: 4px;
}
.login-switch a:hover { text-decoration: underline; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: var(--card);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-elevated);
}
.bottom-nav-inner {
  display: flex; align-items: flex-end; justify-content: space-around;
  max-width: 480px; margin: 0 auto;
  padding: 4px 16px 8px;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 12px;
}
.nav-item svg { width: 20px; height: 20px; color: var(--muted-foreground); }
.nav-item.active svg { color: var(--primary); }
.nav-item span {
  font-size: 10px; margin-top: 4px; font-weight: 500;
  color: var(--muted-foreground);
}
.nav-item.active span { color: var(--primary); }
.nav-logo-btn {
  display: flex; flex-direction: column; align-items: center;
  margin-top: -20px;
}
.nav-logo-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--gradient-crimson);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-elevated);
}
.nav-logo-circle img { width: 32px; height: 32px; object-fit: contain; }
.nav-logo-btn span {
  font-size: 10px; font-weight: 700;
  color: var(--primary); margin-top: 4px;
}

/* ===== PAGE WRAPPER ===== */
.page { min-height: 100vh; background: var(--background); padding-bottom: 96px; }
.page-header {
  padding: 24px 20px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.page-header-left { display: flex; align-items: center; gap: 12px; }
.avatar-sm {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gradient-crimson);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-foreground); font-weight: 700; font-size: 14px;
}
.avatar-lg {
  width: 112px; height: 112px; border-radius: 50%;
  border: 4px solid var(--primary);
  overflow: hidden; box-shadow: var(--shadow-elevated);
}
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.page-title { font-size: 18px; font-weight: 700; }
.bell-btn { position: relative; padding: 8px; }
.bell-btn svg { width: 20px; height: 20px; color: var(--primary); }
.bell-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
}

/* ===== DASHBOARD ===== */
.dash-welcome { text-align: center; margin-top: 16px; }
.dash-welcome p { font-size: 14px; color: var(--muted-foreground); }
.dash-welcome span { font-weight: 700; color: var(--foreground); }
.quick-actions {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-top: 24px; padding: 0 20px;
}
.quick-action {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.quick-action-icon {
  width: 48px; height: 48px; border-radius: 16px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.quick-action-icon svg { width: 20px; height: 20px; color: var(--accent-foreground); }
.quick-action span {
  font-size: 10px; font-weight: 500;
  color: var(--muted-foreground);
  text-align: center; line-height: 1.3;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; margin-top: 32px;
}
.section-title { font-size: 16px; font-weight: 700; }
.section-link {
  font-size: 14px; font-weight: 500; color: var(--primary);
  display: flex; align-items: center; gap: 4px;
}
.action-circles {
  display: flex; justify-content: center; gap: 24px;
  margin-top: 24px;
}
.action-circle {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.action-circle-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.action-circle-icon svg { width: 24px; height: 24px; color: var(--primary); }
.action-circle span { font-size: 12px; font-weight: 500; color: var(--muted-foreground); }
.contracts-scroll {
  display: flex; gap: 12px; overflow-x: auto;
  padding: 12px 20px 8px; -ms-overflow-style: none; scrollbar-width: none;
}
.contracts-scroll::-webkit-scrollbar { display: none; }
.contract-card {
  min-width: 260px; flex-shrink: 0;
  background: var(--gradient-card); border-radius: 16px;
  padding: 20px; color: var(--primary-foreground); position: relative;
}
.contract-card h3 { font-size: 14px; font-weight: 700; }
.contract-card .amount { font-size: 20px; font-weight: 800; margin-top: 4px; }
.contract-card .amount span { font-size: 14px; font-weight: 500; }
.contract-card .meta {
  font-size: 12px; color: hsla(0,0%,100%,0.7); margin-top: 12px;
}
.contract-more {
  position: absolute; top: 16px; right: 16px;
  color: hsla(0,0%,100%,0.7);
}

/* ===== FEED / COMPOSE ===== */
.feed-header {
  padding: 24px 20px 16px;
  display: flex; align-items: center; gap: 8px;
}
.feed-header svg { width: 20px; height: 20px; color: var(--primary); }
.feed-header h1 { font-size: 18px; font-weight: 700; }
.compose-box {
  margin: 0 20px 16px; background: var(--card);
  border-radius: 16px; padding: 16px;
  box-shadow: var(--shadow-card);
}
.compose-top { display: flex; align-items: flex-start; gap: 12px; }
.compose-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gradient-crimson);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--primary-foreground); font-size: 12px; font-weight: 700;
}
.compose-textarea {
  flex: 1; background: transparent; border: none;
  font-size: 14px; color: var(--foreground);
  resize: none; outline: none; min-height: 40px;
}
.compose-textarea::placeholder { color: var(--muted-foreground); }
/* ===== Compose previews — WhatsApp-style grid ===== */
.compose-previews { margin-top: 12px; }
.compose-previews:not([data-count]) { display: none; }
.compose-previews[data-count] {
  display: grid; gap: 3px; border-radius: 14px; overflow: hidden;
  background: var(--muted); aspect-ratio: 4 / 3; max-height: 360px;
}
.compose-previews[data-count="1"] { grid-template-columns: 1fr; grid-template-rows: 1fr; aspect-ratio: 4 / 3; }
.compose-previews[data-count="2"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; aspect-ratio: 16 / 9; }
.compose-previews[data-count="3"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.compose-previews[data-count="3"] .wa-tile:first-child { grid-row: span 2; }
.compose-previews[data-count="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.wa-tile { position: relative; overflow: hidden; background: #000; }
.wa-tile img, .wa-tile video { width: 100%; height: 100%; object-fit: cover; display:block; }
.wa-vbadge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; backdrop-filter: blur(4px);
}
.wa-remove {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1; backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
}
.wa-remove:hover { background: var(--destructive); }
/* legacy fallback */
.compose-preview-item { position: relative; flex-shrink: 0; }
.compose-preview-item img, .compose-preview-item video { width: 80px; height: 80px; object-fit: cover; border-radius: 12px; }
.compose-preview-remove {
  position: absolute; top: -4px; right: -4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--destructive); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
}
.compose-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.compose-media-btns { display: flex; gap: 12px; }
.compose-media-btn {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--muted-foreground);
}
.compose-media-btn svg { width: 16px; height: 16px; }
.btn-sm {
  height: 32px; padding: 0 16px; border-radius: 12px;
  background: var(--gradient-crimson);
  color: var(--primary-foreground);
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.btn-sm:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== POST CARD ===== */
.post-card {
  margin: 0 20px 16px; background: var(--card);
  border-radius: 16px; box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: fadeInUp 0.4s ease;
}
.post-header {
  padding: 16px 16px 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.post-header-left { display: flex; align-items: center; gap: 12px; }
.post-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gradient-crimson);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-foreground); font-size: 12px; font-weight: 700;
}
.post-name { font-size: 14px; font-weight: 700; }
.post-time { font-size: 10px; color: var(--muted-foreground); }
.post-more svg { width: 20px; height: 20px; color: var(--muted-foreground); }
.post-content { padding: 0 16px 12px; font-size: 14px; line-height: 1.6; }
.post-media { display: grid; gap: 2px; background: #000; border-radius: 0; overflow: hidden; }
.post-media[data-count="1"] { grid-template-columns: 1fr; }
.post-media[data-count="2"] { grid-template-columns: 1fr 1fr; }
.post-media[data-count="3"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.post-media[data-count="3"] > *:first-child { grid-row: span 2; }
.post-media[data-count="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.post-media.single { grid-template-columns: 1fr; }
.post-media.multi { grid-template-columns: 1fr 1fr; }
.post-media img, .post-media video {
  width: 100%; height: 220px; object-fit: cover; display:block;
}
.post-media[data-count="1"] img, .post-media[data-count="1"] video { height: auto; max-height: 480px; }
.post-stats {
  padding: 8px 16px;
  display: flex; align-items: center; gap: 16px;
  font-size: 12px; color: var(--muted-foreground);
}
.post-stats .like-icon { width: 12px; height: 12px; color: var(--primary); }
.post-actions {
  border-top: 1px solid var(--border);
  display: flex;
}
.post-action {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 12px 0;
  font-size: 12px; font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s, transform 0.1s;
}
.post-action:active { transform: scale(0.9); }
.post-action svg { width: 16px; height: 16px; }
.post-action.liked { color: var(--primary); }
.post-action.donate-btn { color: var(--accent-foreground); }

/* ===== COMMENT DRAWER ===== */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: hsla(220,20%,10%,0.5);
  animation: fadeIn 0.2s ease;
}
.drawer-panel {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--card); border-radius: 24px 24px 0 0;
  max-height: 70vh; display: flex; flex-direction: column;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid var(--border);
}
.drawer-header h3 { font-weight: 700; }
.drawer-close svg { width: 20px; height: 20px; color: var(--muted-foreground); }
.drawer-body {
  flex: 1; overflow-y: auto; padding: 16px;
}
.comment-item { display: flex; gap: 12px; margin-bottom: 16px; }
.comment-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gradient-crimson);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--primary-foreground); font-size: 11px; font-weight: 700;
}
.comment-name { font-size: 12px; font-weight: 700; }
.comment-text { font-size: 14px; margin-top: 2px; }
.comment-time { font-size: 10px; color: var(--muted-foreground); margin-top: 4px; }
.drawer-input {
  padding: 16px; border-top: 1px solid var(--border);
  display: flex; gap: 8px;
}
.drawer-input input {
  flex: 1; background: var(--muted); border: none;
  border-radius: 12px; padding: 10px 16px;
  font-size: 14px; color: var(--foreground); outline: none;
}
.drawer-input input::placeholder { color: var(--muted-foreground); }
.drawer-send {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--gradient-crimson);
  display: flex; align-items: center; justify-content: center;
}
.drawer-send svg { width: 16px; height: 16px; color: var(--primary-foreground); }

/* ===== SETTINGS ===== */
.settings-profile {
  margin: 0 20px; background: var(--card);
  border-radius: 16px; padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; gap: 16px;
}
.settings-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--gradient-crimson);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-foreground); font-size: 20px; font-weight: 700;
}
.settings-name { font-weight: 700; }
.settings-email { font-size: 12px; color: var(--muted-foreground); }
.settings-badge {
  display: inline-block; margin-top: 4px;
  font-size: 10px; font-weight: 600;
  background: var(--accent); color: var(--accent-foreground);
  padding: 2px 8px; border-radius: 99px;
}
.settings-menu { padding: 0 20px; margin-top: 24px; }
.settings-menu-item {
  width: 100%; display: flex; align-items: center; gap: 16px;
  background: var(--card); border-radius: 12px;
  padding: 16px; box-shadow: var(--shadow-card);
  margin-bottom: 8px;
}
.menu-icon-box {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.menu-icon-box svg { width: 20px; height: 20px; color: var(--primary); }
.menu-text { flex: 1; text-align: left; }
.menu-label { font-size: 14px; font-weight: 600; }
.menu-desc { font-size: 11px; color: var(--muted-foreground); }
.menu-chevron svg { width: 16px; height: 16px; color: var(--muted-foreground); }
.btn-logout {
  width: 100%; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px; border-radius: 12px;
  border: 1px solid var(--destructive);
  color: var(--destructive);
  font-weight: 600; font-size: 14px;
  margin: 24px 20px 0; width: calc(100% - 40px);
}

/* ===== DONATE PAGE ===== */
.donate-page { min-height: 100vh; background: var(--background); }
.donate-header {
  padding: 24px 20px 16px;
  display: flex; align-items: center; gap: 12px;
}
.donate-header svg { width: 20px; height: 20px; }
.donate-header h1 { font-size: 18px; font-weight: 700; }
.donate-content { padding: 0 20px; }
.donate-recipient {
  background: var(--card); border-radius: 16px;
  padding: 20px; box-shadow: var(--shadow-card);
  text-align: center; margin-bottom: 24px;
}
.donate-recipient-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--gradient-crimson);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.donate-recipient-avatar img { width: 40px; height: 40px; object-fit: contain; }
.donate-recipient h2 { font-weight: 700; }
.donate-recipient p { font-size: 12px; color: var(--muted-foreground); margin-top: 4px; }
.form-label { font-size: 14px; font-weight: 600; margin-bottom: 8px; display: block; }
.form-input {
  width: 100%; height: 48px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border);
  padding: 0 16px; font-size: 14px; color: var(--foreground);
  outline: none; transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--primary); }
.form-input.with-icon { padding-left: 44px; }
.form-group { margin-bottom: 24px; position: relative; }
.form-group > svg {
  position: absolute; left: 16px; top: 44px;
  width: 16px; height: 16px; color: var(--muted-foreground);
}
.amount-presets { display: flex; gap: 8px; margin-top: 8px; }
.amount-preset {
  flex: 1; padding: 8px; border-radius: 12px;
  font-size: 12px; font-weight: 600;
  background: var(--muted); color: var(--muted-foreground);
  text-align: center; transition: all 0.2s;
}
.amount-preset.active {
  background: var(--gradient-crimson); color: var(--primary-foreground);
}
.form-textarea {
  width: 100%; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border);
  padding: 12px 16px; font-size: 14px; color: var(--foreground);
  resize: none; outline: none;
}
.form-textarea::placeholder { color: var(--muted-foreground); }

/* ===== TOAST ===== */
.toast {
  position: fixed; top: 20px; right: 20px; z-index: 10000;
  padding: 12px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 500; color: white;
  animation: fadeInDown 0.3s ease, fadeOut 0.3s ease 2.7s;
  pointer-events: none;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--destructive); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-15px); } to { opacity: 1; transform: translateY(0); } }

/* Empty state */
.empty-state {
  text-align: center; padding: 48px 20px;
  font-size: 14px; color: var(--muted-foreground);
}

/* Responsive */
@media (min-width: 768px) {
  .page, .login-page, .donate-page { max-width: 480px; margin: 0 auto; }
  .bottom-nav .bottom-nav-inner { max-width: 480px; }
}

/* ===== v2 Additions ===== */
.page-header{display:flex;align-items:center;gap:12px;padding:20px;}
.page-header .back-btn{font-size:22px;color:var(--primary,#dc143c);text-decoration:none;font-weight:bold;}
.page-header .link-action{margin-left:auto;font-size:12px;color:var(--primary,#dc143c);text-decoration:none;font-weight:600;}
.alert-success{margin:0 20px 12px;padding:12px 16px;background:#dcfce7;color:#166534;border-radius:12px;font-size:14px;font-weight:500;}
.alert-error{margin:0 20px 12px;padding:12px 16px;background:#fee2e2;color:#991b1b;border-radius:12px;font-size:14px;font-weight:500;}
.profile-form,.card-block{margin:0 20px 16px;background:#fff;border-radius:18px;padding:18px;box-shadow:0 2px 8px rgba(0,0,0,.05);}
.form-section{font-size:13px;font-weight:700;color:var(--primary,#dc143c);text-transform:uppercase;letter-spacing:.5px;margin:14px 0 10px;}
.form-section:first-child{margin-top:0;}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.form-field{margin-bottom:12px;display:flex;flex-direction:column;}
.form-field label{font-size:12px;color:#64748b;margin-bottom:4px;font-weight:500;}
.form-field input,.form-field select,.form-field textarea{padding:10px 12px;border:1px solid #e2e8f0;border-radius:10px;font-size:14px;font-family:inherit;background:#f8fafc;}
.form-field input:focus,.form-field select:focus,.form-field textarea:focus{outline:none;border-color:var(--primary,#dc143c);background:#fff;}
.btn-primary-full{width:100%;padding:14px;background:var(--primary,#dc143c);color:#fff;border:none;border-radius:12px;font-weight:700;font-size:14px;cursor:pointer;margin-top:8px;}
.btn-primary-full:hover{opacity:.92;}
.avatar-upload{display:flex;flex-direction:column;align-items:center;gap:10px;margin-bottom:18px;}
.avatar-preview-lg{width:96px;height:96px;border-radius:50%;background:linear-gradient(135deg,#dc143c,#9a0d2c);display:flex;align-items:center;justify-content:center;color:#fff;font-size:32px;font-weight:700;overflow:hidden;}
.avatar-preview-lg img{width:100%;height:100%;object-fit:cover;}
.upload-btn{padding:8px 16px;background:#f1f5f9;border-radius:10px;font-size:13px;font-weight:600;cursor:pointer;color:#0f172a;}
.switch-row{display:flex;align-items:center;gap:10px;font-size:14px;margin:8px 0 14px;cursor:pointer;}
.hint{font-size:12px;color:#64748b;margin-top:8px;}
.activity-list,.tx-list,.notif-list{list-style:none;padding:0;margin:0;}
.activity-list li,.tx-list li{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid #f1f5f9;font-size:13px;}
.activity-list li:last-child,.tx-list li:last-child{border-bottom:none;}
.activity-list li em,.tx-list li em{display:block;font-size:11px;color:#94a3b8;font-style:normal;}
.tx-amount{font-weight:700;color:#16a34a;}
.tx-amount.neg{color:#dc2626;}
.balance-hero{margin:0 20px 16px;background:linear-gradient(135deg,#dc143c,#9a0d2c);color:#fff;border-radius:20px;padding:24px;text-align:center;}
.balance-label{font-size:12px;opacity:.85;text-transform:uppercase;letter-spacing:.5px;margin:0;}
.balance-amount{font-size:36px;font-weight:800;margin:6px 0;}
.balance-amount span{font-size:14px;opacity:.85;font-weight:500;}
.balance-sub{font-size:12px;opacity:.85;margin:0;}
.stats-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:0 20px 16px;}
.stat-card{background:#fff;padding:14px;border-radius:14px;box-shadow:0 2px 6px rgba(0,0,0,.04);}
.stat-card span{font-size:11px;color:#64748b;text-transform:uppercase;display:block;margin-bottom:4px;}
.stat-card strong{font-size:18px;font-weight:700;color:#0f172a;}
.notif-item{display:flex;gap:12px;padding:14px 20px;border-bottom:1px solid #f1f5f9;background:#fff;align-items:flex-start;}
.notif-item.unread{background:#fef2f4;}
.notif-icon{font-size:22px;flex-shrink:0;}
.notif-body{flex:1;}
.notif-body strong{font-size:14px;display:block;color:#0f172a;}
.notif-body p{font-size:13px;color:#475569;margin:2px 0;}
.notif-body em{font-size:11px;color:#94a3b8;font-style:normal;}
.notif-link{color:var(--primary,#dc143c);font-size:18px;text-decoration:none;align-self:center;}
.empty-state{text-align:center;padding:40px 20px;color:#94a3b8;font-size:14px;}
.menu-badge{display:inline-block;background:var(--primary,#dc143c);color:#fff;font-size:10px;padding:2px 7px;border-radius:10px;margin-left:6px;font-weight:700;}
.faq-list{display:flex;flex-direction:column;gap:8px;}
.faq-item{background:#f8fafc;border-radius:10px;padding:12px 14px;cursor:pointer;}
.faq-item summary{font-size:14px;font-weight:600;color:#0f172a;outline:none;}
.faq-item p{font-size:13px;color:#475569;margin:8px 0 0;line-height:1.5;}

/* ========== v3 — Modules avancés ========== */
:root{--primary:#dc143c;--primary-dark:#a01030;--bg:#f8fafc;--surface:#fff;--text:#0f172a;--muted:#64748b;--border:#e2e8f0;--success:#16a34a;--destructive:#dc2626;}

/* Forms responsive professional */
.form-card{background:#fff;border-radius:16px;padding:18px;margin:12px 16px;box-shadow:0 2px 10px rgba(0,0,0,.04);}
.form-section{font-size:15px;font-weight:700;color:var(--text);margin:0 0 14px;padding-bottom:10px;border-bottom:1px solid var(--border);}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px;}
.form-row:has(>.form-field:nth-child(3)){grid-template-columns:1fr 1fr 1fr;}
@media(max-width:480px){.form-row{grid-template-columns:1fr;gap:10px;}.form-row:has(>.form-field:nth-child(3)){grid-template-columns:1fr;}}
.form-field{display:flex;flex-direction:column;gap:6px;margin-bottom:12px;}
.form-field label{font-size:12px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.3px;}
.form-field input,.form-field select,.form-field textarea{width:100%;padding:11px 13px;border:1.5px solid var(--border);border-radius:10px;font-size:14px;font-family:inherit;color:var(--text);background:#fff;transition:border-color .15s,box-shadow .15s;box-sizing:border-box;}
.form-field input:focus,.form-field select:focus,.form-field textarea:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(220,20,60,.1);}
.form-field textarea{resize:vertical;min-height:70px;}
.form-hint{font-size:12px;color:var(--muted);margin:6px 0 0;}

.btn-primary-full{width:100%;padding:13px;background:var(--primary);color:#fff;border:none;border-radius:12px;font-size:15px;font-weight:700;cursor:pointer;transition:background .15s;text-align:center;text-decoration:none;display:block;}
.btn-primary-full:hover{background:var(--primary-dark);}
.btn-primary-full:disabled{opacity:.5;cursor:not-allowed;}
.btn-secondary-full{display:block;width:100%;padding:11px;background:#fff;color:var(--text);border:1.5px solid var(--border);border-radius:12px;font-size:14px;font-weight:600;cursor:pointer;text-align:center;text-decoration:none;}

.alert-success{margin:12px 16px;padding:12px 16px;background:#dcfce7;color:#166534;border-radius:10px;font-size:14px;font-weight:500;border-left:4px solid var(--success);}
.alert-error{margin:12px 16px;padding:12px 16px;background:#fee2e2;color:#991b1b;border-radius:10px;font-size:14px;font-weight:500;border-left:4px solid var(--destructive);}
.alert-info{margin:12px 16px;padding:12px 16px;background:#dbeafe;color:#1e40af;border-radius:10px;font-size:13px;border-left:4px solid #2563eb;}

.page-header{position:relative;}
.back-btn{position:absolute;left:16px;top:50%;transform:translateY(-50%);width:36px;height:36px;display:flex;align-items:center;justify-content:center;font-size:22px;color:var(--text);text-decoration:none;background:#fff;border-radius:50%;box-shadow:0 1px 4px rgba(0,0,0,.08);}
.header-action{position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:13px;font-weight:600;color:var(--primary);text-decoration:none;padding:6px 12px;border-radius:8px;background:rgba(220,20,60,.08);}
.page-title{text-align:center;font-size:17px;font-weight:700;margin:0;padding:18px 56px;}

/* Avatar upload */
.avatar-upload{text-align:center;padding:20px 0 8px;}
.avatar-preview-lg{width:110px;height:110px;border-radius:50%;background:linear-gradient(135deg,var(--primary),var(--primary-dark));margin:0 auto 12px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:42px;font-weight:700;overflow:hidden;border:4px solid #fff;box-shadow:0 4px 16px rgba(220,20,60,.25);}
.avatar-preview-lg img{width:100%;height:100%;object-fit:cover;}
.upload-btn{display:inline-block;padding:9px 18px;background:#fff;border:1.5px solid var(--primary);color:var(--primary);border-radius:10px;font-size:13px;font-weight:600;cursor:pointer;}

/* Stats */
.stats-grid .stat-card em{display:block;font-size:10px;color:var(--muted);font-style:normal;margin-top:2px;}

/* Lists */
.list-card{background:#fff;border-radius:14px;margin:0 16px 12px;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,.03);}
.list-item{display:flex;gap:12px;padding:14px;border-bottom:1px solid var(--border);align-items:flex-start;}
.list-item:last-child{border:none;}
.list-item-icon{width:38px;height:38px;border-radius:10px;background:#fef2f4;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0;}
.list-item-body{flex:1;min-width:0;}
.list-item-title{font-size:14px;font-weight:600;color:var(--text);margin:0;}
.list-item-sub{font-size:12px;color:var(--muted);margin:2px 0 0;}
.list-item-msg{font-size:13px;color:var(--text);margin:6px 0 0;font-style:italic;}
.list-item-right{text-align:right;flex-shrink:0;display:flex;flex-direction:column;align-items:flex-end;gap:4px;}
.list-item-right strong{font-size:14px;color:var(--text);}
.empty-line{text-align:center;color:var(--muted);font-size:13px;padding:20px;margin:0;}
.link-sm{font-size:12px;color:var(--primary);text-decoration:none;display:inline-block;margin-top:4px;}

.badge{display:inline-block;font-size:10px;font-weight:600;padding:2px 8px;border-radius:8px;text-transform:uppercase;}
.badge-pending{background:#fef3c7;color:#92400e;}
.badge-active{background:#dcfce7;color:#166534;}
.badge-completed{background:#dcfce7;color:#166534;}
.badge-rejected,.badge-cancelled{background:#fee2e2;color:#991b1b;}
.badge-expired{background:#e2e8f0;color:#475569;}

/* Empty state card */
.empty-state-card{margin:24px 16px;background:#fff;padding:32px 20px;border-radius:16px;text-align:center;box-shadow:0 1px 4px rgba(0,0,0,.03);}
.empty-state-card .empty-icon{font-size:48px;margin-bottom:12px;}
.empty-state-card h3{font-size:16px;font-weight:700;margin:0 0 6px;color:var(--text);}
.empty-state-card p{font-size:13px;color:var(--muted);margin:0;}

/* Match cards */
.match-card{display:flex;gap:14px;background:#fff;margin:0 16px 10px;padding:14px;border-radius:14px;box-shadow:0 1px 4px rgba(0,0,0,.04);align-items:center;}
.match-card.upcoming{border-left:4px solid var(--primary);}
.match-card.past{opacity:.85;}
.match-date{text-align:center;min-width:54px;}
.match-date strong{display:block;font-size:13px;color:var(--primary);font-weight:700;text-transform:uppercase;}
.match-date span{font-size:11px;color:var(--muted);}
.match-info{flex:1;min-width:0;}
.match-title{font-size:14px;font-weight:600;color:var(--text);margin:0;}
.match-meta{font-size:11px;color:var(--muted);margin:2px 0;}
.match-result{font-size:12px;color:var(--success);font-weight:600;margin:4px 0 0;}
.match-actions{display:flex;gap:6px;}
.icon-btn{width:32px;height:32px;border-radius:8px;background:#f1f5f9;display:flex;align-items:center;justify-content:center;text-decoration:none;color:var(--text);font-size:14px;}
.icon-btn.danger{background:#fee2e2;color:var(--destructive);}

/* Entity cards (contracts/sponsors) */
.entity-card{display:flex;gap:12px;background:#fff;margin:0 16px 10px;padding:14px;border-radius:14px;box-shadow:0 1px 4px rgba(0,0,0,.04);align-items:flex-start;}
.entity-logo{width:54px;height:54px;border-radius:12px;object-fit:cover;flex-shrink:0;background:#f1f5f9;}
.entity-logo-sm{width:38px;height:38px;border-radius:10px;object-fit:cover;flex-shrink:0;}
.entity-logo-fallback{width:54px;height:54px;border-radius:12px;background:linear-gradient(135deg,var(--primary),var(--primary-dark));color:#fff;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;flex-shrink:0;}
.entity-body{flex:1;min-width:0;}
.entity-title{font-size:15px;font-weight:700;color:var(--text);margin:0;}
.entity-tag{display:inline-block;background:#fef2f4;color:var(--primary);font-size:10px;padding:2px 6px;border-radius:6px;margin-left:6px;text-transform:uppercase;font-weight:600;vertical-align:middle;}
.entity-sub{font-size:12px;color:var(--muted);margin:2px 0;}
.entity-amount{font-size:14px;color:var(--text);font-weight:700;margin:4px 0;}
.entity-meta{font-size:11px;color:var(--muted);margin:2px 0;}
.entity-actions{display:flex;flex-direction:column;gap:6px;}

/* Goals */
.goal-card{background:#fff;margin:0 16px 10px;padding:14px;border-radius:14px;box-shadow:0 1px 4px rgba(0,0,0,.04);border-left:4px solid var(--primary);}
.goal-card.status-atteint{border-left-color:var(--success);background:#f0fdf4;}
.goal-card.status-abandonne{border-left-color:#94a3b8;opacity:.7;}
.goal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;}
.goal-cat{font-size:11px;color:var(--muted);text-transform:uppercase;font-weight:600;}
.goal-title{font-size:15px;font-weight:700;color:var(--text);margin:0 0 4px;}
.goal-desc{font-size:13px;color:var(--muted);margin:0 0 10px;}
.goal-meta{font-size:11px;color:var(--muted);margin:6px 0 0;}
.progress-bar{height:6px;background:#f1f5f9;border-radius:4px;overflow:hidden;}
.progress-bar span{display:block;height:100%;background:linear-gradient(90deg,var(--primary),var(--primary-dark));transition:width .3s;}

/* Player public profile */
.player-hero{text-align:center;padding:20px;background:linear-gradient(135deg,var(--primary),var(--primary-dark));color:#fff;margin:0 16px 16px;border-radius:18px;}
.player-avatar-xl{width:100px;height:100px;border-radius:50%;background:#fff;color:var(--primary);margin:0 auto 12px;display:flex;align-items:center;justify-content:center;font-size:38px;font-weight:700;overflow:hidden;border:3px solid #fff;}
.player-avatar-xl img{width:100%;height:100%;object-fit:cover;}
.player-name{font-size:20px;font-weight:700;margin:0;}
.player-sub{font-size:13px;opacity:.9;margin:4px 0;}
.player-bio{font-size:13px;margin:12px 0 0;opacity:.95;line-height:1.5;}

.plan-badge{display:inline-block;font-size:11px;font-weight:700;padding:3px 10px;border-radius:10px;text-transform:uppercase;letter-spacing:.5px;margin-left:6px;}
.plan-badge.pro{background:#dbeafe;color:#1e40af;}
.plan-badge.elite{background:linear-gradient(135deg,#fbbf24,#f59e0b);color:#fff;}

/* Subscription page */
.current-plan-card{margin:12px 16px;padding:18px;background:linear-gradient(135deg,var(--text),#1e293b);color:#fff;border-radius:16px;text-align:center;}
.cp-label{font-size:12px;opacity:.8;margin:0;text-transform:uppercase;letter-spacing:.5px;}
.cp-name{font-size:28px;font-weight:800;margin:6px 0;}
.cp-expire{font-size:12px;opacity:.85;margin:0;}
.plans-grid{display:grid;grid-template-columns:1fr;gap:12px;padding:0 16px;}
@media(min-width:768px){.plans-grid{grid-template-columns:repeat(3,1fr);}}
.plan-card{background:#fff;border-radius:16px;padding:20px;border:2px solid var(--border);box-shadow:0 1px 4px rgba(0,0,0,.04);}
.plan-card.pro{border-color:#3b82f6;}
.plan-card.elite{border-color:#f59e0b;background:linear-gradient(180deg,#fffbeb,#fff);}
.plan-card.current{border-color:var(--success);}
.plan-name{font-size:16px;font-weight:700;margin:0 0 8px;color:var(--text);}
.plan-price{margin:0 0 14px;}
.plan-price strong{font-size:26px;font-weight:800;color:var(--primary);}
.plan-price span{font-size:13px;color:var(--muted);}
.plan-features{list-style:none;padding:0;margin:0 0 16px;}
.plan-features li{font-size:13px;color:var(--text);padding:5px 0;border-bottom:1px dashed var(--border);}
.plan-features li:last-child{border:none;}

.balance-mini{margin:0 16px 8px;padding:10px 14px;background:#fff;border-radius:10px;font-size:13px;color:var(--muted);}
.balance-mini strong{color:var(--text);}

/* ===========================================================
   v3.1 — DARK MODE (inversion via data-theme="dark")
   =========================================================== */
html[data-theme="dark"] {
  --background: hsl(222, 24%, 8%);
  --foreground: hsl(0, 0%, 96%);
  --card: hsl(222, 22%, 12%);
  --card-foreground: hsl(0, 0%, 96%);
  --primary: hsl(340, 80%, 55%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(222, 18%, 16%);
  --secondary-foreground: hsl(0, 0%, 96%);
  --muted: hsl(222, 16%, 18%);
  --muted-foreground: hsl(220, 10%, 70%);
  --accent: hsl(340, 30%, 22%);
  --accent-foreground: hsl(340, 80%, 80%);
  --border: hsl(222, 18%, 22%);
  --input: hsl(222, 18%, 22%);
  --crimson-light: hsl(340, 30%, 22%);
  --gradient-crimson: linear-gradient(135deg, hsl(340, 80%, 45%), hsl(340, 85%, 30%));
  --gradient-card: linear-gradient(135deg, hsl(340, 80%, 35%), hsl(340, 85%, 22%));
  --shadow-card: 0 4px 20px -4px rgba(0,0,0,.5);
  --shadow-elevated: 0 8px 30px -8px rgba(0,0,0,.6);
}
/* Force backgrounds blancs codés en dur dans le CSS v3 à suivre le token */
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .entity-card,
html[data-theme="dark"] .goal-card,
html[data-theme="dark"] .plan-card,
html[data-theme="dark"] .balance-mini,
html[data-theme="dark"] .post-card,
html[data-theme="dark"] .list-card,
html[data-theme="dark"] .settings-menu-item,
html[data-theme="dark"] .match-card,
html[data-theme="dark"] .empty-state-card { background: var(--card) !important; color: var(--foreground); }
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: var(--input); color: var(--foreground); border-color: var(--border);
}
html[data-theme="dark"] .loading-overlay { background: rgba(15,18,28,.92); }

/* ===========================================================
   v3.1 — TOAST (compat: showToast existant l'utilise déjà)
   =========================================================== */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  z-index: 10001; padding: 12px 18px; border-radius: 12px;
  background: var(--card); color: var(--foreground);
  box-shadow: var(--shadow-elevated);
  font-weight: 600; font-size: 14px; max-width: 90%;
  animation: toastIn .3s ease-out;
  border-left: 4px solid var(--success);
}
.toast.error { border-left-color: var(--destructive); }
@keyframes toastIn { from { opacity:0; transform: translate(-50%, 20px);} to {opacity:1; transform: translate(-50%, 0);} }

/* ===========================================================
   v3.1 — MODAL (popup ajout/confirm)
   =========================================================== */
.ndb-modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; opacity: 0; transition: opacity .2s;
  backdrop-filter: blur(4px);
}
.ndb-modal-overlay.open { opacity: 1; }
.ndb-modal {
  background: var(--card); color: var(--foreground);
  border-radius: 18px; box-shadow: var(--shadow-elevated);
  width: 100%; max-width: 460px; max-height: 90vh; overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(20px); transition: transform .25s;
}
.ndb-modal-overlay.open .ndb-modal { transform: translateY(0); }
.ndb-modal-head { display:flex; align-items:center; justify-content:space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.ndb-modal-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.ndb-modal-close { font-size: 24px; line-height: 1; color: var(--muted-foreground); }
.ndb-modal-body { padding: 18px; overflow-y: auto; }
.ndb-modal-actions { display:flex; gap:10px; margin-top: 8px; }
.ndb-modal-actions .btn-primary-full.danger { background: var(--destructive); }

/* ===========================================================
   v3.1 — DRAG & DROP UPLOAD
   =========================================================== */
.upload-zone {
  border: 2px dashed var(--border); border-radius: 14px;
  background: var(--secondary);
  padding: 18px; cursor: pointer; transition: all .2s;
  position: relative; min-height: 110px;
  display: flex; align-items: center; justify-content: center;
}
.upload-zone.drag, .upload-zone:hover { border-color: var(--primary); background: var(--accent); }
.upload-zone .uz-inner { text-align: center; }
.upload-zone .uz-icon { font-size: 28px; margin-bottom: 6px; }
.upload-zone .uz-text strong { display:block; font-size: 14px; color: var(--foreground); }
.upload-zone .uz-text span { display:block; font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }
.upload-zone .uz-preview {
  display: flex; align-items: center; gap: 12px; width: 100%;
}
.upload-zone .uz-preview img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.upload-zone .uz-preview .uz-file { font-size: 28px; }
.upload-zone .uz-meta { flex: 1; min-width: 0; }
.upload-zone .uz-meta strong { display:block; font-size: 13px; color: var(--foreground); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.upload-zone .uz-meta span { display:block; font-size: 11px; color: var(--muted-foreground); }
.upload-zone .uz-remove { background: var(--destructive); color: #fff; width: 28px; height: 28px; border-radius: 50%; font-size: 18px; line-height: 1; }
.upload-input-hidden { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }

/* ===========================================================
   v3.1 — INSTALL BANNER
   =========================================================== */
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: 80px;
  z-index: 9998; background: var(--card); color: var(--foreground);
  border-radius: 16px; box-shadow: var(--shadow-elevated);
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-left: 4px solid var(--primary);
}
.install-banner img { width: 40px; height: 40px; border-radius: 10px; }
.install-banner .ib-text { flex: 1; min-width: 0; }
.install-banner .ib-text strong { display:block; font-size: 14px; }
.install-banner .ib-text span { display:block; font-size: 12px; color: var(--muted-foreground); }
.install-banner .btn-primary { padding: 8px 14px; font-size: 13px; border-radius: 10px; background: var(--primary); color: var(--primary-foreground); }
.install-banner #ndb-install-close { font-size: 22px; color: var(--muted-foreground); padding: 0 4px; }

/* ===========================================================
   v3.1 — Spinner bouton
   =========================================================== */
.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
  vertical-align: -2px; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===========================================================
   v3.1 — Mobile Money modal
   =========================================================== */
.mm-pay { text-align: center; padding: 6px 0 4px; }
.mm-pay .mm-icon { font-size: 42px; }
.mm-pay .mm-msg { font-weight: 600; margin: 10px 0 4px; }
.mm-pay .mm-sub { font-size: 12px; color: var(--muted-foreground); margin: 0; }
.mm-pay .mm-progress { height: 4px; background: var(--secondary); border-radius: 4px; overflow: hidden; margin-top: 16px; }
.mm-pay .mm-progress > div { height: 100%; width: 30%; background: var(--gradient-crimson); animation: mmSlide 1.2s linear infinite; }
@keyframes mmSlide { 0%{transform:translateX(-100%);} 100%{transform:translateX(400%);} }

/* Theme toggle in settings */
.theme-toggle-row { display:flex; align-items:center; justify-content:space-between; padding: 14px 16px; background: var(--card); margin: 0 16px 10px; border-radius: 14px; }
.theme-toggle-row .ttr-label { font-size: 14px; font-weight: 600; }
.theme-switch { position: relative; width: 52px; height: 28px; background: var(--muted); border-radius: 999px; cursor: pointer; transition: background .2s; }
.theme-switch::after { content:''; position:absolute; left:3px; top:3px; width:22px; height:22px; background:#fff; border-radius:50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.theme-switch.on { background: var(--primary); }
.theme-switch.on::after { transform: translateX(24px); }
