/* =====================================================
   TRANSFERWIRE - STYLES
   ===================================================== */

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --success: #16a34a;
  --success-light: #dcfce7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef7e0;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  height: 100%;
  overflow: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ✅ Arrière-plan gris partout */
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  background: #e0e0e0;
  color: var(--gray-900);
  overflow: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  font-size: 14px;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ========== CONTENEUR PRINCIPAL ========== */
.app-container {
  width: 100%;
  max-width: 340px;
  height: 100vh;
  height: 100dvh;
  max-height: 660px;
  background: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  border-radius: 14px;
}

@media (max-width: 500px) {
  /* ✅ Sur mobile : gris aussi autour, conteneur blanc plein écran */
  body { background: #e0e0e0; }
  .app-container {
    max-width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}

.view {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.view.active { display: flex; }

/* ========== SPINNER ========== */
.spinner {
  width: 26px;
  height: 26px;
  border: 2.5px solid var(--gray-200);
  border-top: 2.5px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 22px 0;
}
@keyframes spin {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}

/* ========== ACCÈS RESTREINT / BLOQUÉ ========== */
.no-access, .blocked-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px 18px;
  text-align: center;
  background: #fff;
}
.no-access .ico, .blocked-screen .ico {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.no-access .ico { background: var(--gray-200); }
.no-access .ico svg { width: 26px; height: 26px; fill: var(--gray-500); }
.blocked-screen .ico { background: var(--danger-light); }
.blocked-screen .ico svg { width: 26px; height: 26px; fill: var(--danger); }
.no-access h2, .blocked-screen h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.no-access p, .blocked-screen p {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.6;
  max-width: 240px;
}

/* ========== ADMIN AUTH ========== */
.admin-auth {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 26px 20px;
  background: #fff;
}
.admin-auth .auth-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 8px 22px rgba(26, 115, 232, 0.3);
}
.admin-auth .auth-logo svg { width: 30px; height: 30px; fill: #fff; }
.admin-auth h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
  text-align: center;
}
.admin-auth p {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 22px;
  text-align: center;
  line-height: 1.5;
  max-width: 260px;
}
.admin-auth .auth-form {
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-auth .auth-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-auth .auth-group label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-left: 2px;
}
.admin-auth .input-wrap { position: relative; }
.admin-auth .input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  fill: var(--gray-400);
  pointer-events: none;
}
.admin-auth input {
  width: 100%;
  padding: 12px 12px 12px 36px;
  border: 1.5px solid var(--gray-200);
  border-radius: 9px;
  font-size: 13px;
  outline: none;
  background: #fff;
  transition: 0.2s;
}
.admin-auth input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}
.admin-auth .btn-auth {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(26, 115, 232, 0.3);
  margin-top: 4px;
}
.admin-auth .btn-auth:disabled { opacity: 0.6; cursor: not-allowed; }
.admin-auth .auth-switch {
  text-align: center;
  font-size: 11.5px;
  color: var(--gray-500);
  margin-top: 14px;
}
.admin-auth .auth-switch a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.admin-auth .auth-switch a:hover { text-decoration: underline; }
.admin-auth .err {
  color: var(--danger);
  font-size: 11px;
  margin-top: 6px;
  font-weight: 600;
  display: none;
  text-align: center;
  background: var(--danger-light);
  padding: 8px 10px;
  border-radius: 7px;
  line-height: 1.4;
}
.admin-auth .err.show { display: block; }
.admin-auth .info-box {
  font-size: 10.5px;
  color: var(--gray-500);
  margin-top: 18px;
  text-align: center;
  line-height: 1.5;
  max-width: 260px;
}

/* ========== ADMIN LOGIN (ancien) ========== */
.admin-login {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 24px 18px;
  background: #fff;
}
.admin-login .logo {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(26, 115, 232, 0.3);
}
.admin-login .logo svg { width: 28px; height: 28px; fill: #fff; }
.admin-login h1 {
  font-size: 17px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 5px;
}
.admin-login p {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 22px;
  text-align: center;
}
.admin-login .input-wrap {
  width: 100%;
  max-width: 240px;
  position: relative;
  margin-bottom: 12px;
}
.admin-login .input-wrap svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  fill: var(--gray-400);
}
.admin-login input {
  width: 100%;
  padding: 10px 10px 10px 32px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  background: #fff;
}
.admin-login input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}
.admin-login .btn-auth {
  width: 100%;
  max-width: 240px;
  padding: 11px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(26, 115, 232, 0.3);
}
.admin-login .err {
  color: var(--danger);
  font-size: 11px;
  margin-top: 9px;
  font-weight: 500;
  display: none;
}
.admin-login .hint {
  margin-top: 18px;
  font-size: 10px;
  color: var(--gray-400);
  text-align: center;
}
.admin-login .hint code {
  background: var(--gray-100);
  padding: 2px 5px;
  border-radius: 3px;
  color: var(--gray-700);
  font-weight: 600;
}

/* ========== ADMIN DASHBOARD ========== */
.admin-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #e0e0e0; /* ✅ gris */
  min-height: 0;
}
.admin-topbar {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 3px 12px rgba(26, 115, 232, 0.25);
  flex-shrink: 0;
}
.admin-topbar .brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
}
.admin-topbar .brand svg { width: 18px; height: 18px; fill: #fff; }
.admin-topbar .actions { display: flex; gap: 5px; }
.admin-topbar .icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-topbar .icon-btn svg { width: 14px; height: 14px; fill: #fff; }

.admin-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 11px 11px 30px 11px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.admin-body::-webkit-scrollbar { width: 4px; }
.admin-body::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}

.client-list:last-child { margin-bottom: 20px; }
.client-card:last-child { margin-bottom: 20px; }

/* ========== QUICK ACTIONS CARD ========== */
.quick-actions-card {
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  margin-bottom: 13px;
  position: relative;
}
.quick-actions-card .qac-title {
  display: inline-block;
  background: var(--gray-100);
  border: 1.5px solid var(--gray-200);
  color: var(--gray-900);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.quick-actions-card .qac-title svg {
  width: 13px;
  height: 13px;
  fill: var(--gray-900);
  vertical-align: middle;
  margin-right: 4px;
  margin-top: -2px;
}
.quick-actions-card .qac-subtitle {
  font-size: 11px;
  color: var(--gray-500);
  line-height: 1.5;
  margin-bottom: 12px;
}
.quick-actions-card .admin-group { margin-bottom: 12px; }
.quick-actions-card .admin-group:last-child { margin-bottom: 0; }
.quick-actions-card label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-700);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 5px;
  display: block;
}
.quick-actions-card label .req { color: var(--danger); font-weight: 700; }
.quick-actions-card select,
.quick-actions-card input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 12px;
  color: var(--gray-900);
  outline: none;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 32px;
}
.quick-actions-card select:focus,
.quick-actions-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}
.quick-actions-card input {
  background-image: none;
  padding-right: 11px;
}
.quick-actions-card #qa-transfer-fields {
  background: var(--gray-50);
  border: 1.5px dashed var(--gray-300);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  margin-top: 4px;
}
.quick-actions-card .btn-admin-submit { margin-top: 4px; }

/* ========== STATS GRID ========== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 13px;
}
.stat-card {
  background: #fff;
  border-radius: 9px;
  padding: 10px;
  border: 1px solid #eef2f7;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.04);
}
.stat-card .ico {
  width: 25px;
  height: 25px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.stat-card .ico svg { width: 13px; height: 13px; fill: #fff; }
.stat-card .ico.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-card .ico.green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.stat-card .ico.orange { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.stat-card .ico.purple { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.stat-card .val {
  font-size: 14px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 1px;
  word-break: break-all;
}
.stat-card .lbl {
  font-size: 9px;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ========== ADMIN SECTIONS ========== */
.admin-section {
  background: #fff;
  border-radius: 9px;
  padding: 12px;
  margin-bottom: 11px;
  box-shadow: 0 1px 7px rgba(15, 23, 42, 0.04);
  border: 1px solid #eef2f7;
}
.admin-section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding-bottom: 7px;
  border-bottom: 1.5px solid var(--gray-100);
  text-transform: uppercase;
}
.admin-section-title svg { width: 12px; height: 12px; fill: var(--primary); }

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.admin-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.admin-group.full-width { grid-column: span 2; }
.admin-group label {
  font-size: 9px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.admin-group label .req { color: var(--danger); }
.admin-group input,
.admin-group select,
.admin-group textarea {
  padding: 8px 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: 7px;
  font-size: 12px;
  color: var(--gray-900);
  outline: none;
  background: var(--gray-50);
  width: 100%;
}
.admin-group input:focus,
.admin-group select:focus,
.admin-group textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}
.admin-group textarea { resize: vertical; min-height: 44px; }

.btn-admin-submit {
  padding: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}
.btn-admin-submit svg { width: 12px; height: 12px; fill: #fff; }

@media (max-width: 450px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-group.full-width { grid-column: span 1; }
}

/* ========== CLIENT LIST ========== */
.client-list-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 13px 0 7px 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.client-list-title .count {
  background: var(--primary);
  color: #fff;
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 9px;
}
.client-card {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 9px;
  padding: 10px;
  margin-bottom: 7px;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.04);
}
.client-card.blocked {
  opacity: 0.7;
  background: #fef2f2;
  border-color: #fecaca;
}
.cc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
  gap: 6px;
}
.cc-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--gray-900);
  word-break: break-word;
}
.cc-badges { display: flex; gap: 3px; flex-wrap: wrap; }
.cc-badge {
  padding: 2px 6px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.cc-badge.lang { background: #eff6ff; color: #2563eb; }
.cc-badge.blocked { background: var(--danger-light); color: var(--danger); }
.cc-badge.active { background: var(--success-light); color: var(--success); }
.cc-info {
  font-size: 10px;
  color: var(--gray-500);
  margin-bottom: 2px;
  word-break: break-word;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cc-info strong { color: var(--gray-900); font-weight: 600; }
.cc-info svg { width: 9px; height: 9px; fill: var(--gray-400); flex-shrink: 0; }
.cc-codes { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.cc-code {
  background: var(--gray-100);
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 3px;
}
.cc-code span { color: var(--gray-500); font-weight: 600; font-size: 8px; }
.cc-link {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--gray-50);
  padding: 6px 8px;
  border-radius: 6px;
  margin-top: 6px;
  border: 1px solid #eef2f7;
}
.cc-link a {
  flex-grow: 1;
  color: var(--primary);
  font-size: 9px;
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
  min-width: 0;
}
.cc-link svg { width: 9px; height: 9px; fill: var(--primary); flex-shrink: 0; }
.cc-actions { display: flex; gap: 4px; margin-top: 7px; flex-wrap: wrap; }
.cc-btn {
  flex: 1;
  min-width: 48px;
  padding: 6px 4px;
  border: none;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.cc-btn svg { width: 9px; height: 9px; }
.cc-btn.edit { background: #eff6ff; color: #2563eb; }
.cc-btn.edit svg { fill: #2563eb; }
.cc-btn.copy { background: #f0fdf4; color: var(--success); }
.cc-btn.copy svg { fill: var(--success); }
.cc-btn.tx { background: #fef3c7; color: #d97706; }
.cc-btn.tx svg { fill: #d97706; }
.cc-btn.block { background: #fff7ed; color: #ea580c; }
.cc-btn.block svg { fill: #ea580c; }
.cc-btn.unblock { background: var(--success-light); color: var(--success); }
.cc-btn.unblock svg { fill: var(--success); }
.cc-btn.del { background: var(--danger-light); color: var(--danger); }
.cc-btn.del svg { fill: var(--danger); }

.empty-state {
  text-align: center;
  padding: 30px 12px;
  color: var(--gray-400);
}
.empty-state svg { width: 38px; height: 38px; fill: var(--gray-300); margin-bottom: 8px; }
.empty-state p { font-size: 11px; font-weight: 500; }

/* ========== MODALS ========== */
.edit-modal { max-height: 92vh; overflow-y: auto; }
.edit-modal-header {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  border-radius: 11px 11px 0 0;
}
.edit-modal-header h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--gray-900);
}
.close-btn-edit {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px;
  border-radius: 5px;
}
.close-btn-edit svg { width: 14px; height: 14px; fill: var(--gray-500); }
.edit-modal-body { padding: 12px 14px 18px; }

.color-presets { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.color-preset {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  cursor: pointer;
  border: 2.5px solid transparent;
}
.color-preset.selected {
  border-color: var(--gray-900);
  box-shadow: 0 0 0 2px #fff inset;
}
.color-picker-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.color-picker-row input[type=color] {
  width: 34px;
  height: 30px;
  border: 1.5px solid var(--gray-200);
  border-radius: 7px;
  cursor: pointer;
  padding: 2px;
  background: #fff;
}
.color-picker-row input[type=text] {
  flex: 1;
  padding: 7px 9px;
  border: 1.5px solid var(--gray-200);
  border-radius: 7px;
  font-size: 11px;
  font-family: monospace;
  outline: none;
}

.tx-list { display: flex; flex-direction: column; gap: 6px; }
.tx-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--gray-50);
  border-radius: 7px;
  border: 1px solid #eef2f7;
}
.tx-row .tx-ico {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tx-row .tx-ico.in { background: var(--success-light); }
.tx-row .tx-ico.out { background: var(--danger-light); }
.tx-row .tx-ico svg { width: 11px; height: 11px; }
.tx-row .tx-ico.in svg { fill: var(--success); }
.tx-row .tx-ico.out svg { fill: var(--danger); }
.tx-row .tx-info { flex-grow: 1; min-width: 0; }
.tx-row .tx-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1px;
}
.tx-row .tx-date { font-size: 9px; color: var(--gray-400); }
.tx-row .tx-amt { font-size: 11.5px; font-weight: 800; flex-shrink: 0; }
.tx-row .tx-amt.pos { color: var(--success); }
.tx-row .tx-amt.neg { color: var(--danger); }

/* ========== LOGIN CLIENT — NOUVELLE VERSION CARTE ========== */
.login-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 20px 16px;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 55%, #0b1220 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.login-page::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.login-page::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35),
              0 8px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
  animation: loginCardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- En-tête dégradé avec logo --- */
.login-card-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 22px 20px 26px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.login-card-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  border-radius: 50%;
}
.login-logo-circle {
  width: 54px;
  height: 54px;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.login-logo-circle svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}
.login-brand-name {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}
.login-brand-sub {
  font-size: 8.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 2.5px;
  margin-top: 3px;
  position: relative;
  z-index: 1;
}

/* --- Corps de la carte --- */
.login-card-body {
  padding: 22px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-welcome-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--gray-900);
  text-align: center;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

/* --- Chip utilisateur avec avatar --- */
.login-user-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 10px 12px;
}
.login-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(26, 115, 232, 0.28);
}
.login-user-info {
  min-width: 0;
  flex: 1;
}
.login-user-name {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
}
.login-user-role {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-500);
  margin-top: 1px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* --- Formulaire --- */
.login-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.login-field-label {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-left: 2px;
}
.login-field-input {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
  transition: all 0.2s ease;
}
.login-field-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}
.login-field-input svg {
  width: 15px;
  height: 15px;
  fill: var(--gray-400);
  margin-right: 9px;
  flex-shrink: 0;
  transition: fill 0.2s ease;
}
.login-field-input:focus-within svg {
  fill: var(--primary);
}
.login-field-input input {
  border: none;
  outline: none;
  padding: 12px 0;
  width: 100%;
  font-size: 13px;
  color: var(--gray-900);
  background: transparent;
  font-weight: 500;
}
.login-field-input input::placeholder {
  color: var(--gray-400);
  font-weight: 400;
}

/* --- Message d'erreur --- */
.login-error-msg {
  display: none;
  background: var(--danger-light);
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
  padding: 9px 11px;
  border-radius: 8px;
  text-align: center;
  line-height: 1.4;
  border: 1px solid #fecaca;
}

/* --- Bouton de connexion --- */
.login-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 2px;
  box-shadow: 0 6px 16px rgba(26, 115, 232, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.login-submit-btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 3px 10px rgba(26, 115, 232, 0.3);
}
.login-submit-btn svg {
  width: 13px;
  height: 13px;
  fill: #fff;
}

/* --- Note de sécurité --- */
.login-secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--gray-500);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-top: 2px;
}
.login-secure-note svg {
  width: 11px;
  height: 11px;
  fill: var(--success);
  flex-shrink: 0;
}

@media (max-height: 640px) {
  .login-card-header { padding: 16px 20px 18px 20px; }
  .login-logo-circle { width: 46px; height: 46px; margin-bottom: 8px; }
  .login-logo-circle svg { width: 24px; height: 24px; }
  .login-card-body { padding: 16px 18px 16px 18px; gap: 12px; }
  .login-welcome-title { font-size: 14px; }
  .login-user-chip { padding: 8px 10px; }
  .login-user-avatar { width: 34px; height: 34px; font-size: 12px; }
}

/* ========== APP HEADER ========== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
}
.header-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--gray-900);
}
.icon-button {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: 5px;
}
.icon-button svg { width: 18px; height: 18px; fill: var(--primary); }
.menu-icon svg { fill: var(--gray-900); }

/* ========== SCREENS ========== */
.screens-container {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
  overflow-y: auto;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  display: none;
  flex-direction: column;
  padding-bottom: 12px;
}
.screen.active { display: flex; }

/* ========== DASHBOARD ========== */
.greeting {
  padding: 14px 12px 6px 12px;
  font-size: 16px;
  color: var(--gray-900);
  font-weight: 600;
  letter-spacing: -0.2px;
}

.dashboard-hero {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  margin: 8px 12px 0 12px;
  border-radius: 16px;
  padding: 22px 14px 18px 14px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(26, 115, 232, 0.3);
  text-align: center;
}
.dashboard-hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -40%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.dashboard-hero::after {
  content: '';
  position: absolute;
  bottom: -60%;
  left: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.balance-label {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  text-transform: uppercase;
}
.balance-big {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0;
  margin-bottom: 14px;
  line-height: 1;
  position: relative;
  z-index: 1;
}
.balance-int {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.5px;
}
.balance-dec {
  font-size: 16px;
  font-weight: 700;
  opacity: 0.92;
  letter-spacing: -0.3px;
}
.account-pill {
  display: inline-block;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 7px 22px;
  border-radius: 14px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  letter-spacing: 0.3px;
  font-family: inherit;
}
.account-pill:active { background: rgba(0, 0, 0, 0.35); }
.dots-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 1;
}
.dots-indicator span {
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}
.dots-indicator span.active {
  background: #fff;
  width: 14px;
  border-radius: 3px;
}

/* ========== QUICK ACTIONS ========== */
.quick-actions-block {
  background: #fff;
  margin: 14px 12px 0 12px;
  border-radius: 16px;
  padding: 14px 8px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 4px;
}
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  flex: 1;
  max-width: 110px;
  -webkit-tap-highlight-color: transparent;
}
.quick-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 1px solid rgba(26, 115, 232, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.quick-icon svg { width: 20px; height: 20px; fill: var(--primary); }
.quick-action:hover .quick-icon,
.quick-action:active .quick-icon {
  background: rgba(26, 115, 232, 0.2);
  transform: scale(1.05);
}
.quick-action span {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--gray-900);
  text-align: center;
  line-height: 1.25;
  word-break: break-word;
  max-width: 90px;
}

/* ========== HISTORIQUE ========== */
.section-title {
  padding: 22px 12px 10px 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--gray-900);
  border-bottom: 1px solid var(--gray-900);
  margin: 0 12px;
  padding-left: 0;
  padding-right: 0;
  letter-spacing: -0.2px;
}
.transaction-list { padding: 0 12px; }
.transaction-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.transaction-item:last-child { border-bottom: none; }
.tx-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  flex-shrink: 0;
}
.tx-icon svg { width: 13px; height: 13px; }
.icon-grey { background: #e8eaed; }
.icon-grey svg { fill: #5f6368; }
.icon-red { background: #ea4335; }
.icon-red svg { fill: #fff; }
.icon-green { background: #2d9249; }
.icon-green svg { fill: #fff; }
.tx-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tx-title {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--gray-900);
}
.tx-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-900);
  word-break: break-all;
}
.tx-amount {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  margin-left: 8px;
}
.amount-pos {
  font-size: 12.5px;
  font-weight: 800;
  color: #2d9249;
  letter-spacing: -0.2px;
}
.amount-neg {
  font-size: 12.5px;
  font-weight: 800;
  color: #ea4335;
  letter-spacing: -0.2px;
}
.tx-date {
  font-size: 9.5px;
  color: var(--gray-500);
  font-weight: 400;
}

/* ========== BOTTOM NAV ========== */
.bottom-nav {
  background: #e8eaf0;
  padding: 7px 10px 8px 10px;
  flex-shrink: 0;
  z-index: 10;
  position: relative;
}
@supports (padding: env(safe-area-inset-bottom)) {
  .bottom-nav { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
}
.bottom-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border-radius: 17px;
  padding: 4px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
  gap: 2px;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 3px;
  border-radius: 12px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.nav-item.active { background: #ede9fe; }
.nav-item svg { width: 15px; height: 15px; fill: #1e293b; flex-shrink: 0; }
.nav-item span {
  font-size: 8.5px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  letter-spacing: -0.1px;
  line-height: 1;
}
.nav-item.active svg { fill: #7c3aed; }
.nav-item.active span { color: #7c3aed; }
.notification-dot {
  position: absolute;
  top: 4px;
  right: 20%;
  width: 4px;
  height: 4px;
  background: #ea4335;
  border-radius: 50%;
  border: 1px solid #fff;
  z-index: 2;
}

/* ========== TRANSFERT ========== */
.page-title-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gray-900);
}
.page-title-icon {
  background: var(--primary);
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.page-title-icon svg { width: 11px; height: 11px; fill: #fff; }
.transfer-amount {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  padding: 6px 0 14px 0;
  letter-spacing: -0.3px;
}
.details-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px 12px 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--gray-900);
}
.details-icon {
  background: var(--primary);
  color: #fff;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 9px;
}

/* ========== FORMULAIRE ========== */
.form-group {
  padding: 0 12px 12px 12px;
}
.form-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 15px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--gray-900);
  outline: none;
  background: #fff;
  font-family: inherit;
  min-height: 48px;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}
.amount-input {
  font-size: 17px !important;
  font-weight: 800;
  padding: 16px 14px !important;
  color: var(--primary) !important;
  text-align: center;
  letter-spacing: 0.5px;
  min-height: 54px;
}

/* ========== WARNING BOX ========== */
.warning-box {
  background: var(--warning-light);
  border-radius: 7px;
  padding: 11px 12px;
  margin: 4px 12px 15px 12px;
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.warning-box svg {
  width: 12px;
  height: 12px;
  fill: #b08d00;
  flex-shrink: 0;
  margin-top: 2px;
}
.warning-text {
  font-size: 10.5px;
  color: #78350f;
  line-height: 1.5;
  font-weight: 600;
}

/* ========== SUBMIT BUTTON ========== */
.submit-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 12px 12px 12px;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
  cursor: pointer;
}
.submit-btn svg { width: 12px; height: 12px; fill: #fff; }

#screen-transfer .submit-btn { margin-top: auto; }

/* ========== VÉRIFICATION ========== */
.summary-card {
  background: var(--primary-light);
  border-radius: 10px;
  padding: 20px 16px;
  margin: 14px 12px;
  border: 1px solid #dbeafe;
}
.summary-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 14px;
}
.summary-header svg {
  width: 13px;
  height: 13px;
  fill: var(--primary);
  flex-shrink: 0;
}
.summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 11.5px;
  color: var(--gray-700);
  line-height: 1.5;
}
.summary-item { display: flex; flex-wrap: wrap; }
.summary-value {
  font-weight: 800;
  margin-left: 4px;
  word-break: break-all;
  color: var(--gray-900);
}
.summary-value-block {
  font-weight: 800;
  display: block;
  width: 100%;
  margin-top: 2px;
  word-break: break-all;
  color: var(--gray-900);
}

.verification-section { padding: 0 12px; }
.verification-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.verification-header svg {
  width: 13px;
  height: 13px;
  fill: var(--primary);
  flex-shrink: 0;
}
.verification-desc {
  font-size: 11.5px;
  color: var(--gray-700);
  line-height: 1.5;
  margin-bottom: 12px;
}
.verification-input {
  width: 100%;
  padding: 14px 12px;
  border: 2px solid var(--primary);
  border-radius: 8px;
  font-size: 13px;
  color: var(--gray-900);
  outline: none;
  margin-bottom: 12px;
  background: #fff;
  letter-spacing: 1.5px;
  text-align: center;
  font-weight: 700;
  min-height: 48px;
}
.verification-section .submit-btn {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}

/* ========== TRAITEMENT ========== */
.info-card {
  background: var(--primary-light);
  border-radius: 10px;
  padding: 20px 16px;
  margin: 14px 12px;
  border: 1px solid #dbeafe;
}
.info-card h2 {
  font-size: 13px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.info-card p {
  font-size: 11.5px;
  color: var(--gray-700);
  line-height: 1.55;
  margin-bottom: 12px;
}
.divider {
  height: 1px;
  background: var(--gray-300);
  margin: 12px 0;
}
.info-details {
  font-size: 11.5px;
  color: var(--gray-700);
  line-height: 1.7;
  word-break: break-all;
}
.info-details > div { padding: 3px 0; }
.info-details span.lbl {
  font-weight: 800;
  color: var(--gray-900);
  margin-right: 4px;
}

.progress-section { margin: 14px 12px; }
.progress-text {
  text-align: center;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 14px;
}
.progress-circle-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.progress-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.25);
  letter-spacing: -0.3px;
}
.progress-bar-container {
  background: var(--gray-200);
  border-radius: 6px;
  height: 32px;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.progress-fill {
  background: #16a34a;
  height: 100%;
  width: 0;
  border-radius: 6px 0 0 6px;
  transition: width 0.15s linear;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 0,
    rgba(255, 255, 255, 0.15) 8px,
    transparent 8px,
    transparent 16px
  ),
  linear-gradient(90deg, #16a34a, #22c55e);
}

/* ========== MODAL ========== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
  padding: 12px;
}
.overlay.active { display: flex; }
.modal {
  background: #fff;
  border-radius: 11px;
  width: 100%;
  max-width: 300px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
  display: flex;
  flex-direction: column;
  animation: popIn 0.3s ease-out;
  max-height: 92vh;
  overflow-y: auto;
}
@keyframes popIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-header {
  padding: 18px 12px 15px 12px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-header.success { background: linear-gradient(135deg, #26a69a, #00897b); }
.modal-header.failure { background: linear-gradient(135deg, #ef4444, #dc2626); }
.modal-header.iban-modal-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 22px 12px 18px 12px;
}
.close-btn {
  position: absolute;
  top: 9px;
  right: 9px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.close-btn svg { width: 12px; height: 12px; fill: #fff; }
.check-icon-circle {
  background: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.check-icon-circle svg { width: 24px; height: 24px; }
.check-icon-circle.success svg { fill: #26a69a; }
.check-icon-circle.failure svg { fill: #ef4444; }
.iban-icon-circle {
  background: rgba(255, 255, 255, 0.2);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.iban-icon-circle svg { width: 28px; height: 28px; fill: #fff; }
.modal-body {
  padding: 14px 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.modal-title {
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 3px;
}
.modal-title.success { color: #00897b; }
.modal-title.failure { color: var(--danger); }
.transaction-details {
  font-size: 11px;
  color: var(--gray-700);
  line-height: 1.6;
  word-break: break-all;
}
.transaction-details span.lbl {
  font-weight: 800;
  color: var(--gray-900);
  margin-right: 3px;
}
.info-text {
  font-size: 10px;
  color: var(--gray-700);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 3px;
  background: var(--gray-50);
  padding: 7px;
  border-radius: 6px;
}
.info-text svg {
  width: 11px;
  height: 11px;
  fill: var(--gray-700);
  flex-shrink: 0;
  margin-top: 2px;
}
.modal-footer {
  padding: 10px 13px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #eef2f7;
}
.modal-footer.iban-modal-footer { gap: 6px; }
.btn-close {
  background: var(--gray-100);
  border: none;
  border-radius: 6px;
  padding: 7px 15px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-700);
  cursor: pointer;
}
.btn-iban-copy { flex: 1; background: var(--primary); color: #fff; }

.iban-value-box {
  background: var(--gray-50);
  padding: 14px 12px;
  border-radius: 8px;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-900);
  word-break: break-all;
  letter-spacing: 0.8px;
  border: 1px dashed var(--gray-300);
  line-height: 1.5;
}

/* ========== CARTE ========== */
.info-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 12px;
  margin: 12px;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1.5;
}
.info-banner-blue { background: #eff6ff; border: 1px solid #dbeafe; }
.info-banner-blue .banner-text { color: #1e40af; font-weight: 600; }
.info-banner-yellow { background: var(--warning-light); border: 1px solid #fde68a; }
.info-banner-yellow .banner-text { color: #78350f; font-weight: 600; }
.banner-close { cursor: pointer; padding: 2px; border-radius: 4px; }
.banner-close svg { width: 12px; height: 12px; fill: currentColor; opacity: 0.6; }
.credit-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 11px;
  padding: 14px;
  margin: 0 12px 12px 12px;
  color: #fff;
  width: calc(100% - 24px);
  max-width: 240px;
  height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 6px 20px rgba(26, 115, 232, 0.35);
  position: relative;
  overflow: hidden;
}
.credit-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent);
  border-radius: 50%;
}
.credit-card .card-brand {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}
.credit-card .card-number {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1.2px;
  margin-top: 5px;
  position: relative;
  z-index: 1;
}
.credit-card .card-holder {
  font-size: 9.5px;
  font-weight: 600;
  margin-top: 9px;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
.credit-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 6px;
  position: relative;
  z-index: 1;
}
.credit-card .card-expiry { font-size: 8.5px; font-weight: 600; opacity: 0.9; }
.credit-card .card-cvv { font-size: 8.5px; font-weight: 600; margin-top: 2px; opacity: 0.9; }
.credit-card .visa-logo { font-size: 16px; font-weight: 900; font-style: italic; letter-spacing: 1.2px; }
.card-actions { display: flex; gap: 7px; padding: 0 12px; margin-bottom: 18px; }
.card-actions .btn { flex: 1; justify-content: center; padding: 8px; font-size: 10.5px; }
.card-transactions-title {
  padding: 0 12px 9px 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--gray-900);
  border-bottom: 1px solid var(--gray-100);
  margin: 0 12px;
}

/* ========== PROFIL ========== */
.profile-section { padding: 12px; }
.profile-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 9px;
}
.profile-header svg { width: 13px; height: 13px; fill: var(--primary); flex-shrink: 0; }
.profile-list { display: flex; flex-direction: column; gap: 8px; }
.profile-item { display: flex; font-size: 11px; color: var(--gray-900); flex-wrap: wrap; }
.profile-label {
  font-weight: 800;
  width: 100px;
  flex-shrink: 0;
  color: var(--gray-500);
  font-size: 9.5px;
  text-transform: uppercase;
  padding-top: 1px;
}
.profile-value { font-weight: 500; word-break: break-all; flex: 1; min-width: 0; }
.status-active {
  color: var(--success);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 3px;
}
.status-active svg { width: 11px; height: 11px; fill: var(--success); }
.iban-link { color: var(--primary); text-decoration: underline; font-weight: 600; word-break: break-all; }
.logout-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 9px 16px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  margin: 12px;
  width: fit-content;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}
.logout-btn svg { width: 12px; height: 12px; fill: #fff; }

/* ========== BOUTONS GÉNÉRIQUES ========== */
.btn {
  border: none;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: 0.2s;
}
.btn-yellow { background: #fbbc04; color: #000; }
.btn-green { background: #2d9249; color: #fff; }
.btn-red { background: var(--danger); color: #fff; }
.btn svg { width: 11px; height: 11px; fill: currentColor; flex-shrink: 0; }

::selection { background: var(--primary); color: #fff; }
*:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
