/* LGB Requisition — login / register (EagleFlies-style layout) */

:root {
  --lgb-navy: #1e3a6e;
  --lgb-navy-dark: #152c54;
  --lgb-navy-light: #2c5aa0;
  --lgb-accent: #b91c1c;
  --lgb-accent-dark: #991616;
  --lgb-gold: #f0b429;
  --lgb-page-bg: #ffffff;
  --lgb-card-shadow: 0 12px 40px rgba(30, 58, 110, 0.12);
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--lgb-page-bg);
  padding: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

.auth-page-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.75rem 0.5rem;
}

body.auth-page .app-site-footer {
  flex-shrink: 0;
  text-align: center;
  font-size: 0.78rem;
  color: #64748b;
  padding: 0.65rem 1rem 1rem;
  margin-top: 0;
  border-top: none;
}

.auth-shell {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-welcome-line {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--lgb-navy);
  text-align: center;
  letter-spacing: -0.01em;
}

.auth-brand {
  text-align: center;
  margin: -0.15rem 0 0.55rem;
  padding-bottom: 0.15rem;
  background: #fff;
}

.auth-brand .auth-welcome-line {
  margin-bottom: 0.25rem;
}

.auth-logo-wrap {
  text-align: center;
  margin-bottom: 0.6rem;
  background: #fff;
  line-height: 0;
}

.auth-brand .auth-logo-wrap {
  margin-bottom: 0;
}

.auth-logo-img {
  max-width: 110px;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #fff;
  box-shadow: none;
  border-radius: 0;
}

.auth-card {
  width: 100%;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--lgb-card-shadow);
  border: 1px solid rgba(30, 58, 110, 0.08);
  padding: 0.75rem 0.85rem 0.7rem;
  text-align: center;
}

.auth-card .alert,
.auth-card .alert-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  font-size: 0.7rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem;
  line-height: 1.4;
}

.auth-card .alert .alert-compact-message,
.auth-card .alert-compact .alert-compact-message {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 0.25rem;
}

.auth-card .alert .btn-close,
.auth-card .alert-compact .btn-close {
  position: static;
  flex: 0 0 auto;
  align-self: center;
  padding: 0;
  margin: 0;
  width: 1rem;
  height: 1rem;
  background-size: 0.75rem;
  opacity: 0.7;
}

.auth-card .alert .btn-close:hover,
.auth-card .alert .btn-close:focus,
.auth-card .alert-compact .btn-close:hover,
.auth-card .alert-compact .btn-close:focus {
  opacity: 1;
  box-shadow: none;
}

.auth-reset-key {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--lgb-navy-dark);
  word-break: break-all;
}

.auth-form-hint {
  font-size: 0.625rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.auth-form {
  text-align: left;
  position: relative;
}

.auth-input-group {
  position: relative;
  margin-bottom: 0.55rem;
}

.auth-input-group > i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.75rem;
  z-index: 2;
  pointer-events: none;
}

.auth-input-group .form-control {
  padding: 0.4rem 0.65rem 0.4rem 2rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.8125rem;
  min-height: 34px;
  background: #fff;
}

.auth-input-group select.form-control,
.auth-input-group select.form-select {
  padding-left: 2rem;
  cursor: pointer;
  appearance: auto;
}

.auth-input-group .form-control:focus {
  border-color: var(--lgb-navy-light);
  box-shadow: 0 0 0 3px rgba(30, 58, 110, 0.15);
}

.auth-input-group .form-control.is-invalid {
  border-color: #dc3545;
}

.auth-input-group .form-control.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.auth-input-group .form-control::placeholder {
  color: #9ca3af;
}

.auth-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.45rem;
}

.auth-actions-in-form {
  margin-top: 0.55rem;
}

.auth-actions-centered {
  display: flex;
  justify-content: center;
  grid-template-columns: unset;
}

.auth-credential-bridge {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.22rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  min-height: 26px;
  line-height: 1.15;
}

.auth-btn i {
  font-size: 0.55rem;
}

.auth-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.auth-btn-signup {
  background: var(--lgb-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.28);
}

.auth-btn-signup:hover {
  background: var(--lgb-accent-dark);
  color: #fff;
}

.auth-btn-signin {
  background: var(--lgb-navy);
  color: #fff;
  box-shadow: 0 2px 8px rgba(30, 58, 110, 0.28);
}

.auth-btn-signin:hover {
  background: var(--lgb-navy-dark);
  color: #fff;
}

.auth-secondary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  width: calc(100% - 1.7rem);
  margin-top: 0.35rem;
}

.auth-btn-outline {
  background: #fff;
  color: var(--lgb-navy);
  border: 1px solid var(--lgb-navy);
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.18rem 0.3rem;
  min-height: 24px;
}

.auth-btn-outline:hover {
  background: rgba(30, 58, 110, 0.06);
  color: var(--lgb-navy-dark);
}

.auth-register {
  max-width: 320px;
}

.auth-register .auth-brand {
  margin-bottom: 0.35rem;
}

.auth-register .auth-brand .auth-welcome-line {
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

.auth-register .auth-brand .auth-logo-wrap {
  margin-bottom: 0;
}

.auth-register .auth-logo-img {
  max-width: 68px;
}

.auth-register .auth-card {
  padding: 0.55rem 0.7rem 0.5rem;
  overflow: visible;
}

.auth-register .auth-form {
  overflow: visible;
  max-height: none;
}

.auth-register .auth-input-group {
  margin-bottom: 0.38rem;
}

.auth-register .auth-input-group .form-control {
  min-height: 30px;
  padding: 0.32rem 0.55rem 0.32rem 1.85rem;
  font-size: 0.75rem;
}

.auth-register .auth-input-group > i {
  font-size: 0.68rem;
  left: 8px;
}

.auth-register .auth-password-choice {
  margin: 0.3rem 0 0.2rem;
}

.auth-register .auth-choice-option {
  font-size: 0.62rem;
  margin-bottom: 0.22rem;
  line-height: 1.3;
}

.auth-register .auth-form-hint {
  font-size: 0.58rem;
  margin-top: 0.15rem;
}

.auth-register .auth-actions-row {
  margin-top: 0.35rem;
}

.auth-register .auth-secondary-row {
  margin-top: 0.3rem;
  width: calc(100% - 1.4rem);
}

body.auth-page:has(.auth-register) .auth-page-main {
  align-items: center;
  justify-content: center;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.auth-register .auth-card .alert-compact {
  display: block;
  width: 100%;
}

.auth-complete-profile {
  width: 100%;
  max-width: 380px;
}

.auth-complete-profile .auth-welcome-line {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.auth-complete-profile .auth-logo-wrap {
  margin-bottom: 0.45rem;
}

.auth-complete-profile .auth-logo-img {
  max-width: 90px;
}

.auth-complete-profile .auth-card {
  padding: 0.85rem 0.95rem 0.8rem;
  text-align: left;
}

.auth-complete-profile .auth-form-hint.text-center {
  text-align: center !important;
}

.auth-complete-profile .auth-input-group {
  margin-bottom: 0.45rem;
}

.auth-complete-profile .auth-actions-row {
  margin-top: 0.5rem;
}

body.auth-page:has(.auth-complete-profile) .auth-page-main {
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.75rem;
}

.auth-password-choice {
  margin: 0.5rem 0 0.35rem;
  text-align: left;
}

.auth-choice-option {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: #374151;
  margin-bottom: 0.35rem;
  cursor: pointer;
}

.auth-choice-option input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.auth-choice-option strong {
  color: var(--lgb-navy);
  font-weight: 700;
}

.auth-link-btn {
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.6rem;
  font-weight: 700;
  border: 1px solid var(--lgb-navy-light);
  border-radius: 4px;
  background: #fff;
  color: var(--lgb-navy);
  cursor: pointer;
  vertical-align: middle;
}

.auth-link-btn:hover {
  background: rgba(30, 58, 110, 0.08);
}

.auth-choice-option-inline {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
}

.auth-choice-option-inline .auth-choice-label {
  white-space: nowrap;
}

.auth-generated-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.auth-generated-inline strong {
  color: var(--lgb-navy);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.auth-password-fields-below-email {
  display: block;
  margin: 0 0 0.35rem;
  padding: 0;
}

.auth-password-fields-below-email .auth-form-hint {
  margin-top: 0.2rem;
  padding-left: 0.05rem;
}

.auth-password-fields-below-email .auth-form-hint.text-danger,
.auth-form-hint.text-danger#emailFeedback {
  color: #dc3545 !important;
  font-weight: 600;
}

.auth-password-hint-default {
  margin: 0.25rem 0 0 1.1rem;
}

.auth-password-hint-default.d-none {
  display: none !important;
}

#generatedPasswordDisplay {
  word-break: break-all;
}

@media (max-width: 400px) {
  .auth-welcome-line {
    font-size: 0.9rem;
  }

  .auth-logo-img {
    max-width: 95px;
  }

  .auth-register .auth-logo-img {
    max-width: 60px;
  }

  .auth-card {
    padding: 0.65rem 0.75rem;
  }

  .auth-actions-row,
  .auth-secondary-row {
    grid-template-columns: 1fr;
  }

  .auth-btn {
    min-height: 24px;
    font-size: 0.625rem;
  }

  .auth-btn-outline {
    min-height: 22px;
    font-size: 0.575rem;
  }
}
