@import url('/css/shared/production-surface.css');

* {
  box-sizing: border-box;
}

:root {
  --al-primary: #1f4f9f;
  --al-primary-dark: #173f81;
  --al-bg: #eef3fa;
  --al-surface: #ffffff;
  --al-text: #1d2430;
  --al-muted: #6b7788;
  --al-border: #d9e2ee;
  --al-success: #0f766e;
  --al-danger: #b91c1c;
  --al-warning: #8b5f00;
  --al-radius-xl: 24px;
  --al-radius-lg: 16px;
  --al-radius-md: 12px;
  --al-shadow-shell: 0 22px 44px rgba(20, 46, 88, 0.16);
  --al-shadow-card: 0 12px 26px rgba(17, 39, 80, 0.08);
  --al-font: 'Manrope', 'Segoe UI', -apple-system, system-ui, sans-serif;
}

html,
body {
  min-height: 100%;
  margin: 0;
  font-family: var(--al-font);
  color: var(--al-text);
}

body.admin-login-no-motion,
body.admin-login-page {
  background: #f4f7fb;
}

#alwv-toast-stack,
.al-toast-stack {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1200;
}

.al-wrap {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.2vw, 24px);
}

.al-card-shell {
  width: min(442px, 100%);
  min-height: auto;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
  margin: 0 auto;
}

.al-card-shell::before,
.al-card-shell::after {
  content: none !important;
  display: none !important;
}

.al-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 0;
}

.al-form-card {
  width: min(442px, 100%);
  border: 0 !important;
  border-radius: var(--al-radius-lg);
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 39, 80, 0.08);
  padding: 20px 20px 14px;
}

.al-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.al-brand-row-form {
  margin-bottom: 10px;
}

.al-brand-dot {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.al-brand-text {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #33465f;
}

.al-auth-toggle {
  display: flex;
  margin-bottom: 12px;
  padding: 3px;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid #c7d2e3;
  background: #d7dce4;
}

.al-auth-toggle .tab-btn {
  flex: 1;
  border: 0;
  border-radius: 999px;
  min-height: 36px;
  padding: 7px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #51627a;
  background: transparent;
  transition: all 0.22s ease;
}

.al-auth-toggle .tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--al-primary) 0%, var(--al-primary-dark) 100%);
}

.al-form-inner {
  width: 100%;
  overflow: hidden;
}

.al-slide-viewport {
  width: 100%;
  overflow: hidden;
  height: auto;
  transition: height 0.22s ease;
}

.al-slide-track {
  width: 200%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: max-content;
  align-items: start;
  transition: transform 0.34s ease;
}

.form-section {
  width: 100%;
  min-width: 0;
  height: auto;
  align-self: start;
  padding-right: 0;
  padding-bottom: 2px;
}

.form-section h2 {
  margin: 2px 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e3658;
}

.al-subtitle {
  margin: 6px 0 0;
  font-size: 0.86rem;
  color: var(--al-muted);
  line-height: 1.5;
}

.al-alert {
  margin-top: 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
}

.al-alert-danger {
  color: #7f1d1d;
  background: #fef2f2;
  border-color: #fecaca;
}

.al-field {
  margin-top: 11px;
}

.al-label {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #304767;
}

.al-input-wrap {
  position: relative;
}

.al-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #7a8798;
  font-size: 0.85rem;
  pointer-events: none;
}

.al-input {
  width: 100%;
  min-height: 41px;
  border: 1px solid #c3cfdf;
  border-radius: var(--al-radius-md);
  box-shadow: none;
  padding-left: 36px;
  font-size: 0.85rem;
}

.al-input::placeholder {
  font-size: 0.84rem;
}

.al-input:focus {
  border-color: rgba(31, 79, 159, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(31, 79, 159, 0.12);
}

.al-input-wrap .al-input-check,
.al-input-wrap .otp-verified-badge {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  color: var(--al-success);
}

.al-pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #6b7788;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.al-pw-toggle:hover {
  background: #f1f5f9;
  color: #3f4b5f;
}

.al-field .invalid-feedback,
.al-field-err {
  font-size: 0.78rem;
  margin-top: 5px;
}

.al-options-row {
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.al-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #4f5d71;
}

.al-remember input {
  width: 15px;
  height: 15px;
}

.al-forgot {
  color: var(--al-primary);
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
}

.al-forgot:hover {
  text-decoration: underline;
}

.al-local-captcha-note {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 0.78rem;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.al-btn-submit,
.al-btn-otp {
  border: 0;
  border-radius: var(--al-radius-md);
  font-weight: 700;
}

.al-btn-submit {
  width: 100%;
  min-height: 43px;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--al-primary) 0%, var(--al-primary-dark) 100%);
}

.al-btn-submit:hover {
  filter: brightness(1.03);
}

.al-phone-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.al-btn-otp {
  min-height: 42px;
  padding: 0 12px;
  color: #4f5d71;
  border: 1px solid var(--al-border);
  background: #f8fbff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.al-btn-otp[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

.otp-status {
  margin-top: 5px;
  font-size: 0.76rem;
  color: #64748b;
}

.password-rules,
.al-pw-rules {
  list-style: none;
  margin: 8px 0 0;
  padding-left: 0;
  display: grid;
  gap: 4px;
}

.password-rules li,
.al-pw-rules li {
  font-size: 0.77rem;
  color: #8793a4;
}

.password-rules li.valid,
.al-pw-rules li.valid {
  color: var(--al-success);
}

.password-rules li.invalid,
.al-pw-rules li.invalid {
  color: var(--al-danger);
}

.password-rules i,
.al-pw-rules i {
  margin-right: 6px;
}

.password-strength-signup,
.al-pw-strength {
  margin-top: 8px;
}

.strength-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.strength-bar {
  height: 6px;
  border-radius: 99px;
  background: #e2e8f0;
}

.strength-bar.active {
  background: var(--al-primary);
}

.strength-text-signup {
  margin-top: 6px;
  font-size: 0.76rem;
  color: #64748b;
}

.al-footer {
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid #e8eef6;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: #7b8798;
}

.al-footer i {
  color: #64748b;
}

@media (max-width: 991.98px) {
  .al-wrap {
    padding: 12px;
  }

  .al-card-shell {
    width: min(442px, 100%);
    padding: 0;
  }

  .al-form-panel {
    padding: 0;
  }

  .al-form-card {
    width: 100%;
    box-shadow: none;
    padding: 16px 14px 12px;
  }
}

@media (max-width: 575.98px) {
  #alwv-toast-stack,
  .al-toast-stack {
    left: 10px;
    right: 10px;
    top: 10px;
  }

  .al-wrap {
    align-items: center;
    padding: 10px;
  }

  .al-card-shell {
    width: 100%;
    padding: 0;
  }

  .al-form-panel {
    padding: 0;
  }

  .al-form-card {
    border-radius: 14px;
    padding: 14px 12px 10px;
  }

  .form-section h2 {
    font-size: 1.1rem;
  }

  .al-input,
  .al-btn-submit,
  .al-btn-otp {
    min-height: 40px;
  }

  .al-phone-row {
    grid-template-columns: 1fr;
  }

  .al-auth-toggle .tab-btn {
    font-size: 0.82rem;
  }
}
