/* ============================================================
   COMPANY AUTH — CENTERED CARD (Login)
   Standalone full-screen design (Figma node 21718-5102 background)
   Scoped under .auth-card-* so it never affects other auth pages.
   ============================================================ */

:root {
  --avc-primary: #12715b;
  --avc-primary-dark: #0d5344;
  --avc-navy: #141b34;
  --avc-input-bg: #f3f4f6;
  --avc-input-border: #e5e7eb;
  --avc-muted: #6b7280;
  --avc-placeholder: #9ca3af;
}

* {
  box-sizing: border-box;
}

.auth-card-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--avc-navy);
  /* Figma background: soft radial glow over the gradient + world-map image */
  background-color: #eafaf3;
  background-image:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 42%),
    url("../images/auth-bg.png");
  background-repeat: no-repeat, no-repeat;
  background-position: center center, center center;
  background-size: cover, cover;
  background-attachment: fixed, fixed;
}

.auth-card-stage {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

/* ===== CARD ===== */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(17, 24, 39, 0.10), 0 2px 8px rgba(17, 24, 39, 0.04);
  padding: 40px 36px;
}

/* ===== HEADER ===== */
.auth-card-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.auth-card-logo img {
  height: 36px;
  width: auto;
  display: block;
}

.auth-card-title {
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.3;
  color: var(--avc-navy);
}

.auth-card-subtitle {
  margin: 6px 0 0;
  text-align: center;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--avc-muted);
}

/* ===== ALERTS ===== */
.auth-card-alert {
  display: none;
  margin-top: 18px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.8125rem;
}

/* Server-rendered alerts (forgot-password) are visible on load */
.auth-card-alert.show {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-card-alert.show iconify-icon {
  flex-shrink: 0;
}

.auth-card-alert-success.show p {
  margin: 0;
}

.auth-card-alert-error {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.auth-card-alert-error ul {
  margin: 0;
  padding-left: 18px;
  color: #b91c1c;
  list-style: disc;
}

.auth-card-alert-success {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.auth-card-alert-success p {
  margin: 0;
  font-weight: 600;
  color: #065f46;
}

/* ===== FORM ===== */
.auth-card-form {
  margin-top: 24px;
}

.auth-card-field {
  margin-bottom: 16px;
}

.auth-card-input-wrapper {
  position: relative;
}

.auth-card-input {
  width: 100%;
  height: 48px;
  background: var(--avc-input-bg);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--avc-navy);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

/* Space for the password eye toggle */
.auth-card-input.has-toggle {
  padding-right: 46px;
}

.auth-card-input::placeholder {
  color: var(--avc-placeholder);
  font-weight: 400;
}

.auth-card-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--avc-primary);
  box-shadow: 0 0 0 3px rgba(18, 113, 91, 0.12);
}

.auth-card-input.field-error-border {
  border-color: #ef4444 !important;
}

.auth-card-input.field-error-border:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.auth-card-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--avc-placeholder);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.auth-card-toggle:hover {
  color: var(--avc-muted);
}

/* ===== OPTIONS ROW ===== */
.auth-card-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 22px;
  font-size: 0.8125rem;
}

.auth-card-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--avc-muted);
  font-weight: 400;
}

.auth-card-remember input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  background: var(--avc-input-bg);
  border: 1px solid var(--avc-input-border);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.auth-card-remember input[type="checkbox"]:checked {
  background: var(--avc-primary);
  border-color: var(--avc-primary);
}

.auth-card-remember input[type="checkbox"]:checked::after {
  content: "\2713";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.auth-card-forgot {
  color: var(--avc-primary);
  font-weight: 500;
  text-decoration: none;
}

.auth-card-forgot:hover {
  color: var(--avc-primary-dark);
}

/* ===== SUBMIT BUTTON ===== */
.auth-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 10px;
  background: var(--avc-navy);
  color: #ffffff;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.25s, background 0.2s;
}

.auth-card-btn:hover {
  background: #1d2647;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(20, 27, 52, 0.22);
}

.auth-card-btn:active {
  transform: translateY(0);
}

.auth-card-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-card-btn-resend {
  background: var(--avc-primary);
}

.auth-card-btn-resend:hover {
  background: var(--avc-primary-dark);
}

/* ===== FOOTER ===== */
.auth-card-footer {
  margin: 22px 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--avc-navy);
}

.auth-card-footer a {
  color: var(--avc-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-card-footer a:hover {
  color: var(--avc-primary-dark);
}

.auth-card-verify {
  margin-top: 16px;
}

/* ============================================================
   SIGNUP-SPECIFIC (Create Account card)
   ============================================================ */

/* Field-level inline error text */
.auth-card-field-error {
  display: none;
  margin-top: 6px;
  font-size: 0.75rem;
  color: #ef4444;
}

/* Password strength meter */
.auth-card-strength {
  margin-top: 8px;
  display: none;
}

.auth-card-strength.show {
  display: block;
}

.auth-card-strength-bar {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}

.auth-card-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}

.auth-card-strength-fill.weak   { width: 33%;  background: #ef4444; }
.auth-card-strength-fill.medium { width: 66%;  background: #f59e0b; }
.auth-card-strength-fill.strong { width: 100%; background: #10b981; }

.auth-card-strength-text {
  display: block;
  margin-top: 5px;
  font-size: 0.6875rem;
  color: var(--avc-muted);
}

/* Terms row */
.auth-card-terms {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 4px 0 22px;
}

.auth-card-terms input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  background: var(--avc-input-bg);
  border: 1px solid var(--avc-input-border);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.auth-card-terms input[type="checkbox"]:checked {
  background: var(--avc-primary);
  border-color: var(--avc-primary);
}

.auth-card-terms input[type="checkbox"]:checked::after {
  content: "\2713";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.auth-card-terms-text {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--avc-muted);
}

.auth-card-terms-text a {
  color: var(--avc-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-card-terms-text a:hover {
  color: var(--avc-primary-dark);
}

/* Error alert can carry a heading + list on the signup card */
.auth-card-alert-error p {
  margin: 0 0 6px;
  font-weight: 600;
  font-size: 0.8125rem;
  color: #991b1b;
}

/* ============================================================
   VERIFY EMAIL (OTP card)
   ============================================================ */

/* The OTP card centers its content */
.auth-card-otp-desc {
  margin: 6px 0 0;
  text-align: center;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--avc-muted);
  line-height: 1.5;
}

.auth-card-otp-email {
  font-weight: 600;
  color: var(--avc-navy);
}

/* OTP input group */
.auth-card-otp-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 26px 0 0;
}

.auth-card-otp-input {
  width: 48px;
  height: 52px;
  padding: 0;
  text-align: center;
  background: var(--avc-input-bg);
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--avc-navy);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-card-otp-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--avc-primary);
  box-shadow: 0 0 0 3px rgba(18, 113, 91, 0.12);
}

.auth-card-otp-input.field-error-border {
  border-color: #ef4444 !important;
}

.auth-card-otp-input.field-error-border:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* Timer text */
.auth-card-timer {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--avc-muted);
}

/* Verify button gets its own top spacing inside the OTP card */
.auth-card-otp-group + .auth-card-timer + .auth-card-btn,
.auth-card-timer + .auth-card-btn {
  margin-top: 18px;
}

/* Resend row */
.auth-card-resend {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--avc-muted);
}

.auth-card-resend-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--avc-primary);
  cursor: pointer;
}

.auth-card-resend-link:hover {
  color: var(--avc-primary-dark);
}

.auth-card-resend-link:disabled {
  color: var(--avc-placeholder);
  cursor: not-allowed;
}

/* "Back to Sign In" footer link (plain, centered) */
.auth-card-back {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.875rem;
}

.auth-card-back a {
  color: var(--avc-navy);
  text-decoration: none;
}

.auth-card-back a:hover {
  color: var(--avc-primary);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
  .auth-card-stage {
    padding: 20px 14px;
  }
  .auth-card {
    padding: 32px 22px;
    border-radius: 14px;
  }
  .auth-card-title {
    font-size: 1.25rem;
  }
  .auth-card-otp-group {
    gap: 8px;
  }
  .auth-card-otp-input {
    width: 44px;
    height: 50px;
    font-size: 1.25rem;
  }
}

@media (max-width: 360px) {
  .auth-card {
    padding: 28px 18px;
  }
  .auth-card-otp-group {
    gap: 6px;
  }
  .auth-card-otp-input {
    width: 38px;
    height: 46px;
    font-size: 1.125rem;
  }
}

/* Short / landscape phones — let the page scroll instead of clipping */
@media (max-height: 640px) {
  .auth-card-stage {
    align-items: flex-start;
  }
}
