/* assets/css/app.css - Geedi Agence */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --green: #00c853;
  --green-light: #69f0ae;
  --green-dim: rgba(0,200,83,0.12);
  --red: #ff3d57;
  --red-dim: rgba(255,61,87,0.12);
  --gold: #ffd600;
  --gold-dim: rgba(255,214,0,0.12);

  --bg: #0a0e1a;
  --bg-card: #111827;
  --bg-card2: #1a2235;
  --bg-card3: #1e2a3a;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);

  --text: #f0f4ff;
  --text-muted: #8896ab;
  --text-dim: #4a5568;

  --header-h: 56px;
  --footer-h: 48px;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.3);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Consolas', 'Liberation Mono', monospace;

  --transition: 0.2s ease;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── HEADER ─── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: #0d1526;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  backdrop-filter: blur(12px);
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.app-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--green), #00695c);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
}
.app-logo .logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.app-logo .logo-text span { color: var(--green); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.header-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--bg-card2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: var(--transition);
  text-decoration: none;
}
.header-btn:hover { background: var(--bg-card3); color: var(--text); }
.header-btn.active { color: var(--green); border-color: var(--green); }

/* ─── MAIN CONTENT ─── */
.app-content {
  padding: 16px;
  padding-bottom: calc(var(--footer-h) + 24px);
  min-height: calc(100vh - var(--header-h));
}

/* ─── FOOTER ─── */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--footer-h);
  background: #0d1526;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.app-footer span {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ─── CARDS ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.card + .card { margin-top: 12px; }

/* ─── BALANCE CARD ─── */
.balance-card {
  background: linear-gradient(135deg, #0d1f3c 0%, #0a1628 60%, #0d2040 100%);
  border: 1px solid rgba(0,200,83,0.2);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,200,83,0.12) 0%, transparent 70%);
}
.balance-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 6px;
}
.balance-amount {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
  font-family: var(--font-mono);
}
.balance-amount .currency { font-size: 1.4rem; color: var(--green); }
.balance-blocked {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.balance-blocked i { color: var(--gold); font-size: 11px; }

/* ─── QUICK ACTIONS ─── */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.quick-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
}
.quick-btn:hover, .quick-btn:active {
  background: var(--bg-card2);
  border-color: var(--border2);
  transform: scale(0.98);
}
.quick-btn.deposit { border-color: rgba(0,200,83,0.3); }
.quick-btn.deposit .btn-icon { background: var(--green-dim); color: var(--green); }
.quick-btn.payout { border-color: rgba(255,61,87,0.25); }
.quick-btn.payout .btn-icon { background: var(--red-dim); color: var(--red); }
.quick-btn.statement .btn-icon { background: rgba(255,214,0,0.1); color: var(--gold); }
.quick-btn.commission .btn-icon { background: rgba(100,181,246,0.1); color: #64b5f6; }
.quick-btn.help .btn-icon { background: rgba(0,200,83,0.1); color: var(--green); }
.quick-btn.full { grid-column: 1 / -1; }

.btn-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.btn-label { font-size: 0.85rem; font-weight: 600; }

/* ─── SECTION HEADER ─── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 10px;
}
.section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}
.section-link {
  font-size: 0.78rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}

/* ─── WALLET CARD ─── */
.wallet-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
}
.wallet-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.wallet-name-row { display: flex; align-items: center; gap: 8px; }
.wallet-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-card2);
  color: var(--text);
  border: 1px solid var(--border2);
  letter-spacing: 0.04em;
}
.wallet-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}
.wallet-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.wallet-dot.offline { background: var(--text-dim); }

.wallet-body { padding: 12px 14px; }
.wallet-rows { display: flex; flex-direction: column; gap: 7px; }
.wallet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}
.wallet-row .wr-label { color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.wallet-row .wr-label i { font-size: 11px; width: 12px; }
.wallet-row .wr-val { font-weight: 600; color: var(--text); font-family: var(--font-mono); font-size: 0.78rem; }
.wallet-row .wr-val.green { color: var(--green); }
.wallet-row .wr-val.red { color: var(--red); }
.wallet-row .wr-val.gold { color: var(--gold); }
.wallet-divider { height: 1px; background: var(--border); margin: 6px 0; }

.wallet-commission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--green-dim);
  border-top: 1px solid rgba(0,200,83,0.2);
}
.wallet-commission-row .wc-label { font-size: 0.75rem; color: var(--green); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.wallet-commission-row .wc-val { font-size: 1rem; font-weight: 800; color: var(--green); font-family: var(--font-mono); }

.wallet-date-range {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ─── TRANSACTION LIST ─── */
.tx-list { display: flex; flex-direction: column; gap: 8px; }
.tx-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}
.tx-item:active { background: var(--bg-card2); }
.tx-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.tx-icon.profit, .tx-icon.deposit { background: var(--green-dim); color: var(--green); }
.tx-icon.withdrawal, .tx-icon.payout { background: var(--red-dim); color: var(--red); }
.tx-icon.topup { background: var(--gold-dim); color: var(--gold); }

.tx-info { flex: 1; min-width: 0; }
.tx-type { font-size: 0.85rem; font-weight: 600; color: var(--text); text-transform: capitalize; }
.tx-desc { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-time { font-size: 0.68rem; color: var(--text-dim); margin-top: 3px; font-family: var(--font-mono); }

.tx-amount {
  text-align: right;
  flex-shrink: 0;
}
.tx-amount .amt {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-mono);
}
.tx-amount .amt.positive { color: var(--green); }
.tx-amount .amt.negative { color: var(--red); }
.tx-amount .comm { font-size: 0.68rem; color: var(--text-dim); margin-top: 2px; }

/* ─── FORMS ─── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.form-input, .form-select {
  width: 100%;
  background: var(--bg-card2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}
.form-input:focus, .form-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,200,83,0.1);
}
.form-input::placeholder { color: var(--text-dim); }
.form-select option { background: var(--bg-card2); }

/* ─── BUTTONS ─── */
.btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary { background: var(--green); color: #000; }
.btn-primary:hover:not(:disabled) { background: var(--green-light); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.1); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text);
}
.btn-outline:hover { background: var(--bg-card2); }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; width: auto; }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 480px;
  padding: 20px;
  padding-bottom: 32px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.34, 1.3, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-handle {
  width: 40px; height: 4px;
  background: var(--border2);
  border-radius: 2px;
  margin: 0 auto 20px;
}
.modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 18px; }

/* ─── LOGIN PAGE ─── */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.login-logo {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin-bottom: 32px;
}
.login-logo .big-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--green), #00695c);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #fff;
  box-shadow: 0 8px 32px rgba(0,200,83,0.3);
}
.login-logo h1 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; }
.login-logo h1 span { color: var(--green); }
.login-logo p { font-size: 0.8rem; color: var(--text-muted); }

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 360px;
}

/* ─── BADGE / PILL ─── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.68rem; font-weight: 700;
  padding: 3px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-green { background: var(--green-dim); color: var(--green); }
.badge-red { background: var(--red-dim); color: var(--red); }
.badge-gold { background: var(--gold-dim); color: var(--gold); }
.badge-blue { background: rgba(100,181,246,0.1); color: #64b5f6; }

/* ─── ALERT ─── */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  margin-bottom: 14px;
  display: flex; align-items: flex-start; gap: 8px;
}
.alert i { flex-shrink: 0; margin-top: 1px; }
.alert-error { background: var(--red-dim); border: 1px solid rgba(255,61,87,0.3); color: var(--red); }
.alert-success { background: var(--green-dim); border: 1px solid rgba(0,200,83,0.3); color: var(--green); }
.alert-info { background: rgba(100,181,246,0.1); border: 1px solid rgba(100,181,246,0.2); color: #64b5f6; }

/* ─── WHATSAPP FAB ─── */
.whatsapp-fab {
  position: fixed;
  bottom: calc(var(--footer-h) + 16px);
  right: 16px;
  width: 50px; height: 50px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  z-index: 99;
  text-decoration: none;
  font-size: 22px; color: #fff;
  transition: transform var(--transition);
}
.whatsapp-fab:hover { transform: scale(1.1); }

/* ─── LOADING / SPINNER ─── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--bg-card2) 25%, var(--bg-card3) 50%, var(--bg-card2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 6px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ─── NAV BOTTOM ─── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: var(--footer-h);
  background: #0d1526;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  z-index: 100;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  text-decoration: none; color: var(--text-dim);
  font-size: 0.6rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  transition: color var(--transition);
}
.nav-item i { font-size: 18px; }
.nav-item.active, .nav-item:hover { color: var(--green); }

/* ─── ADMIN TABLE ─── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.admin-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-card2); }

/* ─── MISC ─── */
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-3 { margin-bottom: 12px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 0.82rem; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-gold { color: var(--gold); }
.fw-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }
.w-full { width: 100%; }

.page-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 40px; opacity: 0.3; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 0.85rem; }

.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ─── STEP AMOUNT ─── */
.amount-display {
  text-align: center;
  padding: 20px 0;
}
.amount-display .big-amt {
  font-size: 2.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.04em;
}
.amount-display .big-amt span { color: var(--green); }
.amount-display small { color: var(--text-muted); font-size: 0.78rem; }

.quick-amounts {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin: 12px 0;
}
.quick-amt-btn {
  padding: 7px 14px;
  background: var(--bg-card2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-mono);
}
.quick-amt-btn:hover, .quick-amt-btn.selected {
  background: var(--green-dim);
  border-color: var(--green);
  color: var(--green);
}

/* ─── RESPONSIVE ADJUSTMENTS ─── */
@media (max-width: 360px) {
  .balance-amount { font-size: 2rem; }
  .quick-btn { padding: 11px 10px; font-size: 0.82rem; }
}
