/* Page de connexion — Exchange USDT MGA */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: #0f172a;
  background: #022c22;
  overflow-x: hidden;
}

.login-page *,
.login-page *::before,
.login-page *::after {
  box-sizing: border-box;
}

.login-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(16, 185, 129, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(6, 182, 212, 0.2), transparent 50%),
    linear-gradient(145deg, #022c22 0%, #064e3b 45%, #065f46 100%);
  z-index: 0;
}

.login-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.login-panel {
  width: 100%;
  max-width: 560px;
  animation: loginFadeUp 0.6s ease-out;
}

@keyframes loginFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-brand {
  text-align: center;
  margin-bottom: 1.25rem;
  color: #fff;
}

.login-brand-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.75rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #fff;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.45);
}

.login-brand h1 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: clamp(1.35rem, 4vw, 1.65rem);
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.login-brand-tagline {
  font-size: 0.85rem;
  opacity: 0.85;
  margin: 0;
}

.login-brand-payments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin-top: 0.65rem;
}

.login-brand-payments span {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Promo liquidité */
.liquidity-promo-login {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 1rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.liquidity-promo-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #a7f3d0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.liquidity-promo-header i {
  color: #34d399;
}

.liquidity-rates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.liquidity-rate-card {
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  text-align: center;
  color: #fff;
}

.liquidity-rate-card.buy {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.5), rgba(5, 150, 105, 0.35));
  border: 1px solid rgba(110, 231, 183, 0.4);
}

.liquidity-rate-card.sell {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.45), rgba(37, 99, 235, 0.3));
  border: 1px solid rgba(147, 197, 253, 0.4);
}

.liquidity-rate-card .rate-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.15rem;
}

.liquidity-rate-card .rate-value {
  font-size: 1.05rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  letter-spacing: -0.02em;
}

.liquidity-rate-card .rate-unit {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.85;
}

.liquidity-balances-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.liquidity-balances-grid::-webkit-scrollbar {
  display: none;
}

.liquidity-balance-item {
  flex: 1 1 0;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  padding: 0.5rem 0.35rem 0.55rem;
  text-align: center;
}

.liquidity-balance-item.usdt-item {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.liquidity-balance-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  color: #fff;
}

.liquidity-balance-icon.mvola { background: #059669; }
.liquidity-balance-icon.orange { background: #ea580c; }
.liquidity-balance-icon.airtel { background: #dc2626; }
.liquidity-balance-icon.usdt { background: #6366f1; }

.liquidity-balance-text {
  min-width: 0;
  width: 100%;
  line-height: 1.25;
}

.liquidity-balance-text .bal-name {
  display: block;
  font-size: 0.55rem;
  font-weight: 600;
  color: #64748b;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.liquidity-balance-text .bal-value {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.liquidity-balance-item.low .bal-value {
  color: #b45309;
}

.liquidity-fees {
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.65rem;
  margin-bottom: 0;
}

/* Carte formulaire */
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: clamp(1.25rem, 4vw, 1.75rem);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.05),
    0 20px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

#login-form {
  width: 100%;
  max-width: 100%;
}

.login-card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
  color: #0f172a;
}

.login-form-group {
  margin-bottom: 1rem;
}

.login-form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}

.login-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.login-label-row label {
  margin-bottom: 0;
}

.login-forgot-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: #059669;
  text-decoration: none;
  white-space: nowrap;
}

.login-forgot-link:hover {
  color: #047857;
  text-decoration: underline;
}

.login-card-intro {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.login-card-back {
  text-align: center;
  margin: 1rem 0 0;
  font-size: 0.875rem;
}

.login-card-back a {
  color: #059669;
  font-weight: 600;
  text-decoration: none;
}

.login-card-back a:hover {
  text-decoration: underline;
}

.login-alert-success {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.85rem;
  border: 1px solid #a7f3d0;
}

.login-input-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.login-input-wrap i {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.9rem;
  pointer-events: none;
}

.login-input {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.8rem 0.85rem 0.8rem 2.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #f9fafb;
  box-sizing: border-box;
}

.login-input:focus {
  outline: none;
  border-color: #059669;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.login-btn {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.9rem 1rem;
  margin-top: 0.25rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  background-size: 200% auto;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.4);
  transition: transform 0.15s, box-shadow 0.15s, background-position 0.3s;
  min-height: 48px;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.45);
  background-position: right center;
}

.login-btn:active {
  transform: translateY(0);
}

.login-alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.85rem;
  border: 1px solid #fecaca;
}

.login-footer {
  text-align: center;
  margin-top: 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
}

.login-footer a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  transition: border-color 0.2s;
}

.login-footer a:hover {
  border-bottom-color: #fff;
}

@media (min-width: 768px) {
  .login-panel {
    max-width: 540px;
  }

  .liquidity-balance-item {
    min-width: 0;
  }
}

@media (max-width: 380px) {
  .liquidity-balance-text .bal-value {
    font-size: 0.65rem;
  }
}
