/* ============================================================
   NokashConnect Login - Split Layout
   ============================================================ */

.login-page {
  display: flex;
  min-height: 100vh;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* ── Left Column: Form ──────────────────────────────────────── */
.login-left {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 60px;
  background: #fff;
  min-height: 100vh;
}
.login-left .login-logo,
.login-left .login-heading,
.login-left .login-divider,
.login-left form {
  width: 100%;
  max-width: 360px;
}

.login-logo {
  margin-bottom: 40px;
}
.login-logo svg {
  width: 48px;
  height: 48px;
}

.login-heading h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1a1d23;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}
.login-heading p {
  font-size: 0.88rem;
  color: #9ca3af;
  margin: 0 0 28px;
}

.login-divider {
  height: 1px;
  background: #f0f0f5;
  margin-bottom: 28px;
}

/* Form fields */
.login-field {
  margin-bottom: 18px;
}
.login-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.login-field input,
.login-field select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e0e0e6;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #1a1d23;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}
.login-field input:focus,
.login-field select:focus {
  border-color: var(--app-them, #16489f);
  box-shadow: 0 0 0 3px rgba(22,72,159,0.08);
}
.login-field input::placeholder {
  color: #c4c7cc;
}
.login-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Password row */
.login-pwd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.login-pwd-header label {
  margin-bottom: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
}
.login-pwd-header a {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--app-them, #16489f);
  text-decoration: none;
}
.login-pwd-header a:hover {
  text-decoration: underline;
}

.login-pwd-wrap {
  position: relative;
}
.login-pwd-wrap input {
  width: 100%;
  padding: 11px 44px 11px 14px;
  border: 1.5px solid #e0e0e6;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #1a1d23;
  outline: none;
  transition: border-color 0.2s;
}
.login-pwd-wrap input:focus {
  border-color: var(--app-them, #16489f);
  box-shadow: 0 0 0 3px rgba(22,72,159,0.08);
}
.login-pwd-wrap .toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px;
  display: flex;
  align-items: center;
}
.login-pwd-wrap .toggle-password:hover {
  color: #374151;
}

/* Submit button */
.login-submit {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--app-them, #16489f), var(--app-sombre, #21194a));
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.login-submit:hover {
  opacity: 0.9;
}

.login-signup {
  text-align: center;
  margin-top: 24px;
  font-size: 0.84rem;
  color: #9ca3af;
}
.login-signup a {
  color: var(--app-them, #16489f);
  font-weight: 600;
  text-decoration: none;
}
.login-signup a:hover {
  text-decoration: underline;
}

/* ── Right Column: Hero ─────────────────────────────────────── */
.login-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #162d50 40%, #16489f 70%, #1ea64a 100%);
}

.login-hero-text {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 480px;
}
.login-hero-text h2 {
  font-size: 3rem;
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.85);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.5px;
}
.login-hero-text h2 span {
  font-weight: 700;
  font-style: normal;
  color: #fff;
}
.login-hero-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin-top: 20px;
  max-width: 420px;
}

.login-hero-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.95);
  border-radius: 16px;
  padding: 24px 28px;
  margin-top: 40px;
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.login-hero-card-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.login-hero-card-logo svg {
  width: 28px;
  height: 28px;
}
.login-hero-card-logo span {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b7280;
}
.login-hero-balance {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1a1d23;
  margin: 0 0 4px;
}
.login-hero-balance-label {
  font-size: 0.75rem;
  color: var(--app-second-them, #1ea64a);
  font-weight: 500;
  margin: 0;
}

/* Ambient glow */
.login-right::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22,72,159,0.3), transparent 70%);
  filter: blur(60px);
}
.login-right::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  bottom: -80px;
  left: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30,166,74,0.2), transparent 70%);
  filter: blur(60px);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 992px) {
  .login-right {
    display: none;
  }
  .login-left {
    flex: 1;
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .login-left {
    padding: 24px 16px;
  }
  .login-heading h1 {
    font-size: 1.3rem;
  }
}

/* Override page styles */
.page-wrapper { margin: 0 !important; padding: 0 !important; }
.page-content { padding: 0 !important; min-height: auto !important; background: #fff !important; }
.login_form { max-width: none; width: 100%; }
.authentication-wrapper.authentication-basic .authentication-inner {
  max-width: 100% !important;
  width: 100% !important;
}
.authentication-wrapper {
  max-width: 100% !important;
  padding: 0 !important;
}

/* ── Register-specific styles ───────────────────────────────── */
.reg-row {
  display: flex;
  gap: 14px;
}
.reg-row .login-field {
  flex: 1;
}

/* SA-UX-C : case de consentement CGU. Bloc dedie (PAS .login-field) pour ne PAS heriter
   du `.login-field input { width:100% }` qui transformait la checkbox en gros champ vide. */
.reg-terms {
  margin-bottom: 18px;
}
.reg-terms-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #374151;
}
.reg-terms-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 1px 0 0 0;
  flex-shrink: 0;
  appearance: auto;           /* rend la coche native (le reset input du form l'avait retiree) */
  accent-color: var(--app-them, #16489f);
  cursor: pointer;
}
.reg-terms-label a {
  color: var(--app-them, #16489f);
  font-weight: 600;
  text-decoration: none;
}
.reg-terms-label a:hover {
  text-decoration: underline;
}
/* Signalement d'erreur (case non cochee) : contour ambre visible sur le bloc. */
.reg-terms.input-error {
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 8px;
}

.signup-step { display: none; }
.signup-step.active { display: block; }
.reg-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  margin-top: 20px;
}
.login-left .reg-nav {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 40%;
  padding: 14px 60px;
  margin: 0;
  background: #fff;
  border-top: 1px solid #f0f0f5;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
  z-index: 100;
}
@media (max-width: 992px) {
  .login-left .reg-nav {
    width: 100%;
    padding: 14px 24px;
  }
}
.reg-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  padding: 10px 16px;
  border: 1px solid #e0e0e6;
  border-radius: 10px;
  background: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.reg-back-btn:hover {
  border-color: var(--app-them, #16489f);
  color: var(--app-them, #16489f);
  text-decoration: none;
}
.reg-strength-bar {
  height: 4px;
  background: #e0e0e6;
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}
.reg-strength-fill {
  height: 100%;
  border-radius: 4px;
  width: 0;
  transition: width 0.3s, background-color 0.3s;
}
.strength-weak { background-color: #ef4444; width: 33%; }
.strength-medium { background-color: #f59e0b; width: 66%; }
.strength-strong { background-color: #1ea64a; width: 100%; }
.reg-strength-label {
  font-size: 0.72rem;
  color: #9ca3af;
  margin-top: 4px;
}

/* Step toggle */
.signup-step { display: none; }
.signup-step.active { display: block; }

.reg-step-desc {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 20px;
}

/* Verification options */
.reg-verify-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
/* Step 2 header */
.reg-step2-header {
  text-align: center;
  margin-bottom: 24px;
}
.reg-step2-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(22,72,159,0.08);
  color: var(--app-them, #16489f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin: 0 auto 14px;
}
.reg-step2-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1d23;
  margin: 0 0 4px;
}
.reg-step2-header p {
  font-size: 0.82rem;
  color: #9ca3af;
  margin: 0;
}

.reg-verify-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid #e0e0e6;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.reg-verify-option:hover {
  border-color: var(--app-them, #16489f);
  background: rgba(22,72,159,0.02);
}
.reg-verify-option input[type="radio"] {
  display: none;
}
.reg-verify-option:has(input:checked) {
  border-color: var(--app-them, #16489f);
  background: rgba(22,72,159,0.04);
  box-shadow: 0 0 0 3px rgba(22,72,159,0.08);
}

/* Verification icons */
.reg-verify-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(22,72,159,0.08);
  color: var(--app-them, #16489f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.reg-verify-icon--wa {
  background: rgba(37,211,102,0.1);
  color: #25d366;
}
.reg-verify-icon--sms {
  background: rgba(245,158,11,0.1);
  color: #f59e0b;
}
.reg-verify-option.disabled {
  opacity: 0.5;
  pointer-events: none;
}
.reg-verify-body { flex: 1; }
.reg-verify-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a1d23;
  display: flex;
  align-items: center;
  gap: 8px;
}
.reg-badge {
  font-size: 0.62rem;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}
.reg-verify-desc {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 2px;
}
.reg-contact-input {
  display: none;
  margin-top: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #e0e0e6;
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
}
.reg-contact-input:focus {
  border-color: var(--app-them, #16489f);
}

/* Error animation */
.input-error {
  border-color: #f59e0b !important;
  background-color: #fffbeb !important;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-4px); }
  40%,80% { transform: translateX(4px); }
}

@media (max-width: 480px) {
  .reg-row { flex-direction: column; gap: 0; }
}
