/* Shared Qopick UI tokens. Later modules reuse these variables and .ax-* components. */
:root {
  --ax-purple: #212529;
  --ax-purple-deep: #000;
  --ax-purple-soft: #576471;
  --ax-ink: #212529;
  --ax-muted: #576471;
  --ax-line: #e6e8eb;
  --ax-surface: #ffffff;
  --ax-canvas: #ffffff;
  --ax-danger: #b42318;
  --ax-danger-bg: #fef3f2;
  --ax-success: #067647;
  --ax-success-bg: #ecfdf3;
  --ax-radius: 16px;
  --ax-shadow: 0 20px 50px rgba(55, 20, 95, 0.12);
  --ax-font: "Alexandria", sans-serif;
  --ax-display: "Alexandria", sans-serif;
}

body.ax-auth {
  margin: 0;
  min-height: 100vh;
  background: var(--ax-canvas) !important;
  color: var(--ax-ink);
  font-family: var(--ax-font);
}

.ax-auth p,
.ax-auth li,
.ax-auth label,
.ax-auth span,
.ax-auth h1,
.ax-auth h2,
.ax-auth h3,
.ax-auth h6 {
  font-family: var(--ax-font);
}

.ax-auth .ax-display {
  font-family: var(--ax-display);
}

.ax-auth a {
  color: var(--ax-purple) !important;
}

.ax-auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 32px;
}

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

.ax-auth-logo {
  display: inline-flex;
  align-items: center;
  height: auto;
}

.ax-auth-logo img {
  height: 25px;
  width: auto;
  max-width: min(220px, 70vw);
  object-fit: contain;
}

@media (max-width: 991.98px) {
  .ax-auth-logo img {
    height: 25px;
  }
}

@media (max-width: 480px) {
  .ax-auth-logo img {
    height: 25px;
  }
}

.ax-auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 4px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
}

.ax-auth-shell {
  width: min(1040px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ax-auth-panel,
.ax-auth-brand {
  background: var(--ax-surface);
  border: 1px solid var(--ax-line);
  border-radius: 24px;
  box-shadow: var(--ax-shadow);
}

.ax-auth-panel {
  order: 1;
  padding: 20px 16px 24px;
}

.ax-auth-brand {
  order: 2;
  position: relative;
  overflow: hidden;
  padding: 22px 18px;
  color: #212529;
  background: #f4f1fb;
  border: 0;
}

.ax-auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 14px,
    rgba(255, 255, 255, 0.04) 14px,
    rgba(255, 255, 255, 0.04) 28px
  );
  pointer-events: none;
}

.ax-auth-brand > * {
  position: relative;
  z-index: 1;
}

.ax-auth-kicker {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #576471 !important;
}

.ax-auth-brand h2,
.ax-auth-brand p,
.ax-auth-brand li,
.ax-auth-brand h6,
.ax-auth-brand span {
  color: #212529 !important;
}

.ax-auth-brand h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 700;
}

.ax-auth-brand h6 {
  margin: 22px 0 0;
  font-size: 15px;
  font-weight: 650;
}

.ax-auth-benefits {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.ax-auth-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.ax-auth-title {
  margin: 0 0 16px;
  text-align: center;
  font-size: 28px;
  font-weight: 650;
  color: var(--ax-ink) !important;
}

.ax-auth .ax-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 18px;
  padding: 4px;
  border: 0;
  border-radius: 14px;
  background: #f3eef9;
}

.ax-auth .ax-switch .nav-item {
  width: auto;
}

.ax-auth .ax-switch .nav-link {
  width: 100%;
  min-height: 44px;
  border: 0 !important;
  border-radius: 11px !important;
  background: transparent;
  color: var(--ax-muted) !important;
  font-weight: 600;
  font-size: 15px;
}

.ax-auth .ax-switch .nav-link.active {
  background: linear-gradient(135deg, var(--ax-purple) 0%, var(--ax-purple-soft) 100%);
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(123, 44, 191, 0.28);
}

.ax-field {
  margin-bottom: 14px;
}

.ax-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ax-muted) !important;
}

.ax-control,
.ax-auth .form-control {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #ddd4ea;
  border-radius: 12px;
  background: #fff;
  color: var(--ax-ink);
  font-size: 16px;
  line-height: 1.3;
  box-shadow: none;
}

.ax-auth .form-control:focus {
  border-color: var(--ax-purple);
  box-shadow: 0 0 0 4px rgba(123, 44, 191, 0.16);
  outline: none;
}

.ax-password {
  position: relative;
}

.ax-password .form-control {
  padding-right: 52px;
}

.ax-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ax-muted);
}

.ax-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 16px;
}

.ax-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-height: 44px;
  font-size: 14px;
  color: var(--ax-ink) !important;
}

.ax-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--ax-purple);
}

.ax-link {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
}

.ax-link:hover {
  text-decoration: underline !important;
}

.ax-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ax-purple) 0%, var(--ax-purple-soft) 100%);
  color: #fff !important;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.ax-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(123, 44, 191, 0.28);
  color: #fff !important;
}

.ax-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ax-switch-copy {
  margin: 16px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--ax-muted) !important;
}

.ax-hint {
  margin: -6px 0 12px;
  font-size: 13px;
  color: var(--ax-danger) !important;
}

.ax-alert {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}

.ax-alert-danger {
  background: var(--ax-danger-bg);
  color: var(--ax-danger) !important;
  border: 1px solid #fecdca;
}

.ax-alert-success {
  background: var(--ax-success-bg);
  color: var(--ax-success) !important;
  border: 1px solid #abefc6;
}

.ax-lead {
  margin: 0 0 16px;
  text-align: center;
  color: var(--ax-muted) !important;
  font-size: 14px;
}

@media (min-width: 768px) {
  .ax-auth-page {
    padding: 28px 24px 40px;
  }

  .ax-auth-panel,
  .ax-auth-brand {
    padding: 32px;
  }

  .ax-auth-brand h2 {
    font-size: 46px;
  }

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

@media (min-width: 992px) {
  .ax-auth-page {
    justify-content: center;
  }

  .ax-auth-shell {
    flex-direction: row;
    align-items: stretch;
    min-height: 620px;
  }

  .ax-auth-brand,
  .ax-auth-panel {
    order: 0;
  }

  .ax-auth-brand {
    flex: 0 0 44%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
  }

  .ax-auth-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 36px;
  }

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