@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --lx-primary: #c82828;
  --lx-primary-dark: #a81f1f;
  --lx-dark: #1a1a1a;
  --lx-dark-soft: #25282d;
  --lx-text: #1a1a1a;
  --lx-muted: #6b7280;
  --lx-border: #e5e7eb;
  --lx-card-radius: 14px;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--lx-dark);
}

body.lx-auth-page {
  overflow-x: hidden;
  background: var(--lx-primary);
}

body.lx-auth-page .footer,
body.lx-auth-page .p-footer,
body.lx-auth-page > .footer {
  display: none !important;
}

body.lx-auth-page #loading {
  z-index: 9999;
}

body.lx-auth-page .main-wrapper,
body.lx-auth-page .page-wrapper,
body.lx-auth-page .content-wrapper {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

.lx-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  width: 100%;
}

/* ===== Left visual ===== */
.lx-auth__visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--lx-dark);
}

.lx-auth__visual-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://lionex.ma/images/lionexcardelivery.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: scale(1.02);
}

.lx-auth__visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 26, 26, 0.15) 0%,
    rgba(26, 26, 26, 0.35) 45%,
    rgba(26, 26, 26, 0.88) 100%
  );
}

.lx-auth__visual-copy {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 48px;
  z-index: 2;
  color: #fff;
  max-width: 420px;
}

.lx-auth__visual-copy h1 {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.lx-auth__visual-copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 400;
}

/* ===== Right panel ===== */
.lx-auth__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 24px;
  background: var(--lx-primary);
  position: relative;
}

.lx-auth__card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--lx-card-radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  padding: 28px 28px 22px;
  position: relative;
}

.lx-auth__card--register {
  max-width: 620px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 26px 28px 20px;
}

.lx-auth__card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.lx-auth__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lx-primary);
  margin-bottom: 6px;
}

.lx-auth__title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: var(--lx-text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lx-auth__logo {
  width: 88px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.lx-auth__subtitle {
  margin: 0 0 22px;
  font-size: 13px;
  color: var(--lx-muted);
  line-height: 1.45;
}

/* ===== Form fields ===== */
.lx-auth__field {
  position: relative;
  margin-bottom: 14px;
}

.lx-auth__field i.lx-auth__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 14px;
  z-index: 1;
  pointer-events: none;
}

.lx-auth__field input,
.lx-auth__field select,
.lx-auth__field .form-control {
  width: 100%;
  height: 46px;
  border: 1px solid var(--lx-border);
  border-radius: 10px;
  padding: 0 14px 0 40px;
  font-size: 14px;
  font-family: inherit;
  color: var(--lx-text);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: none !important;
  -webkit-appearance: none;
}

.lx-auth__field input:focus,
.lx-auth__field select:focus,
.lx-auth__field .form-control:focus {
  border-color: var(--lx-primary);
  box-shadow: 0 0 0 3px rgba(200, 40, 40, 0.12) !important;
}

.lx-auth__field input::placeholder {
  color: #9ca3af;
}

.lx-auth__toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  z-index: 2;
  line-height: 1;
}

.lx-auth__toggle-pass:hover {
  color: var(--lx-primary);
}

.lx-auth__field--pass input {
  padding-right: 42px;
}

.lx-auth__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lx-auth__field--select label,
.lx-auth__label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--lx-muted);
  margin-bottom: 6px;
}

.lx-auth__field--select {
  margin-bottom: 14px;
}

.lx-auth__field--select .bootstrap-select,
.lx-auth__field--select .dropdown-toggle {
  width: 100% !important;
}

.lx-auth__field--select .btn.dropdown-toggle {
  height: 46px;
  border: 1px solid var(--lx-border) !important;
  border-radius: 10px !important;
  background: #fff !important;
  padding-left: 14px !important;
  box-shadow: none !important;
}

.lx-auth__field--plain input,
.lx-auth__field--plain .form-control {
  padding-left: 14px;
}

.lx-auth__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: 10px;
  background: var(--lx-primary);
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.lx-auth__btn:hover {
  background: var(--lx-primary-dark);
  color: #fff !important;
  transform: translateY(-1px);
}

.lx-auth__switch {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--lx-muted);
}

.lx-auth__switch a {
  color: var(--lx-primary);
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
}

.lx-auth__switch a:hover {
  text-decoration: underline;
}

.lx-auth__copyright {
  margin: 18px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
}

.lx-auth__copyright a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

/* Register tweaks inside card */
.lx-auth__card--register .lx-auth__title {
  font-size: 22px;
}

.lx-auth__card--register .form-group {
  margin-bottom: 0;
}

.lx-auth__card--register .form-label,
.lx-auth__card--register label {
  font-size: 12px;
  font-weight: 500;
  color: var(--lx-muted);
  margin-bottom: 6px;
}

.lx-auth__card--register .form-control {
  height: 46px;
  border: 1px solid var(--lx-border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
}

.lx-auth__card--register .row {
  margin-left: -6px;
  margin-right: -6px;
}

.lx-auth__card--register .row > [class*="col-"] {
  padding-left: 6px;
  padding-right: 6px;
  margin-bottom: 10px;
}

/* Mobile : formulaire seul, image desktop uniquement */
@media (max-width: 900px) {
  .lx-auth {
    grid-template-columns: 1fr;
  }

  .lx-auth__visual {
    display: none !important;
  }

  .lx-auth__panel {
    min-height: 100vh;
    padding: 28px 16px 24px;
  }

  .lx-auth__card {
    max-width: 100%;
    padding: 22px 18px 18px;
  }

  .lx-auth__card--register {
    max-height: none;
  }

  .lx-auth__row {
    grid-template-columns: 1fr;
  }

  .lx-auth__logo {
    width: 72px;
  }
}

@media (max-width: 576px) {
  .lx-auth__title {
    font-size: 22px;
  }
}
