:root {
  --auth-bg: #edf3f6;
  --auth-ink: #102033;
  --auth-muted: #65758a;
  --auth-line: #d7e1ea;
  --auth-panel: #ffffff;
  --auth-navy: #17364f;
  --auth-teal: #0f766e;
  --auth-sky: #0ea5e9;
  --auth-amber: #f59e0b;
  --auth-danger: #b42318;
  --auth-shadow: 0 24px 70px rgba(16, 32, 51, .14);
}

* {
  box-sizing: border-box;
}

body.auth-body {
  min-height: 100vh;
  margin: 0;
  color: var(--auth-ink);
  background:
    linear-gradient(135deg, rgba(14, 165, 233, .12), rgba(15, 118, 110, .09)),
    var(--auth-bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 28px 16px;
}

.auth-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .75fr);
  overflow: hidden;
  border: 1px solid rgba(215, 225, 234, .9);
  border-radius: 8px;
  background: var(--auth-panel);
  box-shadow: var(--auth-shadow);
}

.auth-shell.auth-shell-wide {
  grid-template-columns: minmax(360px, .78fr) minmax(0, 1.22fr);
}

.auth-visual {
  min-height: 610px;
  padding: 34px;
  color: #fff;
  background:
    linear-gradient(160deg, rgba(23, 54, 79, .98), rgba(15, 118, 110, .92)),
    #17364f;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.auth-visual.compact {
  min-height: 560px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-logo,
.auth-mark {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--auth-navy);
  font-weight: 900;
}

.auth-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.auth-brand small,
.auth-kicker,
.auth-stat-label,
.auth-copy,
.auth-foot,
.auth-muted {
  color: var(--auth-muted);
}

.auth-visual .auth-brand small,
.auth-visual .auth-kicker,
.auth-visual .auth-copy,
.auth-visual .auth-foot,
.auth-visual .auth-stat-label {
  color: rgba(255, 255, 255, .78);
}

.auth-kicker {
  margin: 0 0 8px;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-title {
  margin: 0;
  font-size: 2.35rem;
  line-height: 1.08;
  font-weight: 900;
}

.auth-subtitle {
  margin: 10px 0 0;
  max-width: 560px;
  color: rgba(255, 255, 255, .82);
  font-size: 1rem;
}

.auth-flow {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.auth-flow-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}

.auth-flow-index {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex: 0 0 auto;
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.auth-stat {
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, .08);
}

.auth-stat-value {
  font-size: 1.15rem;
  font-weight: 900;
}

.auth-stat-label {
  font-size: .78rem;
}

.auth-panel {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--auth-panel);
}

.auth-card {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

.auth-card-wide {
  max-width: none;
}

.auth-panel-title {
  margin: 0;
  font-weight: 900;
}

.auth-copy {
  margin: 8px 0 0;
  line-height: 1.55;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-portal {
  min-height: 126px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  padding: 14px;
  color: var(--auth-ink);
  background: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.auth-portal:hover,
.auth-portal:focus {
  color: var(--auth-ink);
  border-color: rgba(14, 165, 233, .48);
  box-shadow: 0 12px 28px rgba(16, 32, 51, .10);
  transform: translateY(-1px);
}

.auth-portal-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-portal-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--auth-navy);
  font-size: .78rem;
  font-weight: 900;
  flex: 0 0 auto;
}

.auth-portal:nth-child(2) .auth-portal-icon,
.auth-theme-gestion .auth-mark,
.auth-theme-gestion .btn-auth {
  background: var(--auth-teal);
  border-color: var(--auth-teal);
}

.auth-portal:nth-child(3) .auth-portal-icon,
.auth-theme-voyage .auth-mark,
.auth-theme-voyage .btn-auth {
  background: var(--auth-sky);
  border-color: var(--auth-sky);
}

.auth-portal:nth-child(4) .auth-portal-icon,
.auth-theme-bagage .auth-mark,
.auth-theme-bagage .btn-auth {
  background: #176b87;
  border-color: #176b87;
}

.auth-portal:nth-child(5) .auth-portal-icon,
.auth-theme-client .auth-mark,
.auth-theme-client .btn-auth {
  background: var(--auth-amber);
  border-color: var(--auth-amber);
  color: #111827;
}

.auth-portal-label {
  font-weight: 850;
}

.auth-portal-desc {
  margin-top: 10px;
  color: var(--auth-muted);
  font-size: .9rem;
  line-height: 1.35;
}

.auth-form {
  margin-top: 22px;
}

.auth-form .form-label {
  margin-bottom: 6px;
  font-size: .86rem;
  color: #344054;
  font-weight: 800;
}

.auth-form .form-control,
.auth-form .form-select {
  min-height: 48px;
  border-radius: 8px;
  border-color: var(--auth-line);
  color: var(--auth-ink);
  box-shadow: none;
}

.auth-form .form-control:focus,
.auth-form .form-select:focus {
  border-color: rgba(14, 165, 233, .72);
  box-shadow: 0 0 0 .2rem rgba(14, 165, 233, .15);
}

.btn-auth {
  min-height: 48px;
  border-radius: 8px;
  background: var(--auth-navy);
  border-color: var(--auth-navy);
  color: #fff;
  font-weight: 850;
}

.btn-auth:hover,
.btn-auth:focus {
  color: #fff;
  filter: brightness(.94);
}

.auth-theme-client .btn-auth:hover,
.auth-theme-client .btn-auth:focus {
  color: #111827;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--auth-muted);
  text-decoration: none;
  font-weight: 750;
  font-size: .92rem;
}

.auth-back:hover,
.auth-back:focus {
  color: var(--auth-navy);
}

.auth-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.auth-chip {
  border: 1px solid var(--auth-line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #f8fafc;
  color: #475467;
  font-size: .8rem;
  font-weight: 750;
}

.auth-alert {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 12px 14px;
  font-size: .92rem;
}

.auth-alert.danger {
  background: #fef3f2;
  border-color: #fecdca;
  color: var(--auth-danger);
}

.auth-alert.success {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.auth-alert.warning {
  background: #fffaeb;
  border-color: #fedf89;
  color: #93370d;
}

.auth-info-list {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.auth-info-list li {
  display: flex;
  gap: 8px;
  color: var(--auth-muted);
  font-size: .9rem;
}

.auth-info-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: .45rem;
  border-radius: 999px;
  background: var(--auth-teal);
  flex: 0 0 auto;
}

.auth-home-bar {
  width: min(1120px, 100%);
  margin: 0 auto 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.auth-login-layout {
  width: min(1040px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(340px, .52fr);
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(215, 225, 234, .9);
  background: #fff;
  box-shadow: var(--auth-shadow);
}

.auth-login-layout .auth-visual {
  min-height: 580px;
}

.auth-agency-list {
  max-height: 150px;
  overflow: auto;
  margin-top: 16px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.auth-agency-list ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

@media (max-width: 980px) {
  .auth-shell,
  .auth-shell.auth-shell-wide,
  .auth-login-layout {
    grid-template-columns: 1fr;
  }

  .auth-page {
    padding: 18px 12px;
    align-items: flex-start;
  }

  .auth-visual,
  .auth-login-layout .auth-visual {
    min-height: auto;
    padding: 26px;
  }

  .auth-title {
    font-size: 1.72rem;
  }

  .auth-stats {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    padding: 26px;
  }
}

@media (max-width: 640px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-panel,
  .auth-visual {
    padding: 20px;
  }

  .auth-card {
    max-width: none;
  }

  .auth-home-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-title {
    font-size: 1.46rem;
  }

  .auth-portal {
    min-height: 112px;
  }
}
