/* Auth pages — production UI (login / register / forgot / reset) */

.auth-material {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Roboto", system-ui, -apple-system, sans-serif;
  background: #f1f5f9;
  color: #0f172a;
}

.auth-legal-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.65rem;
  padding: 0.5rem 1rem;
  background: #0a3d24;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  text-align: center;
}
.auth-legal-strip a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.auth-legal-strip a:hover { text-decoration: underline; }
.auth-legal-strip .sep { opacity: 0.45; }

.auth-material-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  min-height: calc(100vh - 40px);
  width: 100%;
}

/* Left brand panel */
.auth-left {
  background: #043d2e;
  color: #fff;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  min-height: calc(100vh - 40px);
}
.auth-brand-block h1 {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  margin: 0.75rem 0 0.5rem;
  font-weight: 700;
  line-height: 1.3;
}
.auth-brand-block p {
  opacity: 0.92;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
  max-width: 28rem;
}
.auth-logo {
  max-height: 56px;
  width: auto;
  max-width: 200px;
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
}
.auth-logo-fallback {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  color: #064e3b;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.3rem;
}
.auth-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  backdrop-filter: blur(6px);
}
.auth-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
  font-weight: 600;
}
.auth-feed { list-style: none; margin: 0; padding: 0; }
.auth-feed li {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.auth-feed li:last-child { border-bottom: none; }
.auth-feed a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}
.auth-feed span { font-size: 0.75rem; opacity: 0.7; display: block; margin-top: 0.15rem; }
.auth-feed-empty { opacity: 0.75; font-size: 0.9rem; margin: 0; }
.auth-left-credit {
  margin-top: auto;
  font-size: 0.8rem;
  opacity: 0.75;
}
.auth-left-credit a { color: #fff; }

/* Right form column */
.auth-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: #f8fafc;
  min-height: calc(100vh - 40px);
  min-width: 0;
}
.auth-form-shell {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
  padding: clamp(1.5rem, 4vw, 2rem);
  box-sizing: border-box;
}
.auth-form-shell > h1,
.auth-right h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  letter-spacing: -0.02em;
}
.auth-form-shell > .sub,
.auth-right > .auth-form-shell .sub {
  margin: 0 0 1.5rem;
  font-size: 0.925rem;
  color: #64748b;
  text-align: center;
  line-height: 1.5;
}

/* Forms */
.auth-form-shell .form-group {
  margin-bottom: 1rem;
}
.auth-form-shell label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}
.auth-form-shell .form-control,
.auth-form-shell input.form-control,
.auth-form-shell select.form-control,
.auth-form-shell textarea.form-control {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-form-shell .form-control:focus {
  outline: none;
  border-color: #064e3b;
  box-shadow: 0 0 0 3px rgba(13, 110, 63, 0.15);
}
.auth-form-shell .muted,
.auth-form-shell .muted.small {
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.45;
}

/* Primary actions — full width, centered stack */
.auth-form-shell .btn-primary,
.auth-form-shell button.btn-primary,
.auth-form-shell .btn-lg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.8rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  background: #043d2e;
  color: #fff;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}
.auth-form-shell .btn-primary:hover {
  background: #0a5a34;
}
.auth-form-shell .btn-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  color: #334155;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
  text-align: center;
}
.auth-form-shell .btn-outline:hover {
  border-color: #064e3b;
  color: #064e3b;
  background: #f0fdf4;
}
.auth-form-shell .btn-sm {
  width: auto;
  display: inline-flex;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}
.auth-form-shell .btn-block { width: 100%; }

/* Footer links centered */
.auth-footer,
.auth-footer-links,
.auth-footer-links-center {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.85rem;
  margin-top: 1.35rem;
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
}
.auth-footer a,
.auth-footer-links a {
  color: #064e3b;
  font-weight: 600;
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }
.auth-footer-links-center .btn-outline {
  width: auto;
  min-width: 8.5rem;
}

.auth-home-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #64748b;
  text-decoration: none;
}
.auth-home-link:hover { color: #064e3b; }

.auth-legal-inline {
  max-width: 420px;
  margin: 1.25rem auto 0;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.5;
}
.auth-legal-inline a { color: #64748b; }
.auth-mobile-credit {
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.75rem;
}
.auth-mobile-credit a { color: #64748b; }

/* SSO */
.sso-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
  color: #94a3b8;
  font-size: 0.8rem;
}
.sso-divider::before,
.sso-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
.sso-buttons { display: flex; flex-direction: column; gap: 0.5rem; }

/* Register steps */
.reg-steps {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.reg-steps span {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 99px;
  background: #f1f5f9;
  color: #94a3b8;
}
.reg-steps span.on {
  background: #dcfce7;
  color: #166534;
}
.auth-form-shell .grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 480px) {
  .auth-form-shell .grid2 { grid-template-columns: 1fr; }
}

/* Login method cards */
.login-method-cards {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 1.25rem;
}
.login-method-cards .material-card,
.auth-form-shell .material-card {
  padding: 1rem !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #fff;
  text-align: left;
}
.login-method-cards .btn,
.login-method-cards button {
  margin-top: 0.5rem;
}

/* OTP / 2FA */
.auth-otp-wrap,
.auth-2fa-card {
  text-align: center;
}
.auth-form-shell #codeDigits {
  text-align: center;
  letter-spacing: 0.12em;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 1.15rem;
}

/* Flash inline fallback (if any) */
.auth-form-shell .alert {
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-align: center;
}
.auth-form-shell .alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.auth-form-shell .alert-error,
.auth-form-shell .alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.auth-form-shell .alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* Latest files ticker under form */
.auth-latest-panel {
  width: 100%;
  max-width: 420px;
  margin-top: 1.25rem;
}
.auth-latest-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}
.auth-latest-head h3 {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.auth-latest-head a { color: #064e3b; font-weight: 600; font-size: 0.8rem; text-decoration: none; }

.auth-ticker {
  height: 7.5rem;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.auth-ticker-track {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  animation: authTicker 28s linear infinite;
}
.auth-ticker-track li a {
  display: block;
  padding: 0.4rem 0.85rem;
  text-decoration: none;
  color: #334155;
  font-size: 0.85rem;
}
.auth-ticker-track .t-meta { display: block; font-size: 0.72rem; color: #94a3b8; }
@keyframes authTicker {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* Mobile: single column form-first */
@media (max-width: 900px) {
  .auth-material-grid {
    grid-template-columns: 1fr;
  }
  .auth-left {
    min-height: auto;
    padding: 1.25rem 1.25rem 1rem;
  }
  .auth-left .auth-card { display: none; }
  .auth-right {
    min-height: auto;
    padding: 1rem 1rem 2rem;
    justify-content: flex-start;
  }
  .auth-left-credit { display: none; }
}
@media (max-width: 480px) {
  .auth-form-shell {
    border: none;
    box-shadow: none;
    padding: 1rem 0.25rem;
    background: transparent;
  }
  .auth-right { background: #fff; }
}


/* ============================================================
   Auth mobile overhaul — seamless sign-in / register
   ============================================================ */
@media (max-width: 900px) {
  .auth-material {
    min-height: 100dvh;
  }
  .auth-material-grid {
    display: flex !important;
    flex-direction: column !important;
    min-height: auto !important;
  }
  .auth-left {
    display: none !important; /* focus on form; brand strip remains */
  }
  .auth-right {
    width: 100% !important;
    min-height: calc(100dvh - 48px);
    padding: 1rem 0.85rem 2rem !important;
    background: #f8fafc !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .auth-form-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 1.15rem 1rem 1.35rem !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08) !important;
  }
  .auth-form-shell h1 {
    font-size: 1.35rem !important;
    text-align: center;
  }
  .auth-form-shell > .sub,
  .auth-form-shell .sub {
    text-align: center;
    font-size: 0.9rem !important;
  }
  .auth-form-shell .form-group {
    margin-bottom: 0.85rem;
  }
  .auth-form-shell .form-control,
  .auth-form-shell input,
  .auth-form-shell select {
    min-height: 48px;
    font-size: 16px !important;
    border-radius: 10px;
  }
  .auth-form-shell .btn-primary,
  .auth-form-shell .btn-lg,
  .auth-form-shell button[type="submit"] {
    width: 100% !important;
    min-height: 48px;
    font-size: 1rem !important;
    border-radius: 10px;
    margin-top: 0.35rem;
  }
  .auth-form-shell .btn-outline,
  .auth-form-shell .btn-sm {
    min-height: 44px;
  }
  .auth-form-shell .grid2 {
    grid-template-columns: 1fr !important;
  }
  .auth-home-link,
  .auth-footer,
  .auth-legal-inline {
    text-align: center;
  }
  .login-method-cards {
    gap: 0.75rem !important;
  }
  .login-method-cards .material-card {
    padding: 1rem !important;
  }
  .login-method-cards .btn,
  .login-method-cards button {
    width: 100%;
    display: block;
    text-align: center;
  }
  .auth-latest-panel {
    margin-top: 1.25rem;
    max-height: 180px;
    overflow: hidden;
  }
  /* reCAPTCHA scale */
  .g-recaptcha {
    transform: scale(0.92);
    transform-origin: 0 0;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .auth-legal-strip {
    font-size: 0.72rem;
    padding: 0.45rem 0.6rem;
  }
  .auth-form-shell {
    padding: 1rem 0.85rem 1.2rem !important;
    border-radius: 12px !important;
  }
  .auth-form-shell #codeDigits {
    font-size: 1.25rem !important;
    letter-spacing: 0.2em;
  }
}

/* Auth dark mode on mobile */
html[data-theme="dark"] .auth-right {
  background: #0b1220 !important;
}
html[data-theme="dark"] .auth-form-shell {
  background: #111827 !important;
  color: #f1f5f9 !important;
  border: 1px solid #334155 !important;
}
html[data-theme="dark"] .auth-form-shell h1,
html[data-theme="dark"] .auth-form-shell strong {
  color: #f8fafc !important;
}
html[data-theme="dark"] .login-method-cards .material-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}


/* Auth container queries */
.auth-right {
  container-type: inline-size;
  container-name: auth-right;
}
@container auth-right (max-width: 480px) {
  .auth-form-shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 1rem 0.85rem;
  }
  .auth-latest-panel {
    display: none; /* free space for form on very narrow containers */
  }
}
@container auth-right (min-width: 481px) and (max-width: 700px) {
  .auth-form-shell {
    max-width: 400px;
    margin-inline: auto;
  }
}


/* 2.91.37 auth polish */
.auth-material, .ea-wrap, body.auth-page {
  min-height: 100vh;
}
.auth-card, .ea-card, .auth-panel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  padding: 1.75rem 1.5rem;
}
.auth-card h1, .ea-card h1, .auth-panel h1 {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
  color: #0f172a;
}
.auth-card .muted, .ea-card .muted {
  color: #64748b;
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}
.auth-card .form-control,
.ea-card input[type="text"],
.ea-card input[type="email"],
.ea-card input[type="password"],
.auth-panel .form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  box-sizing: border-box;
}
.auth-card .form-control:focus,
.ea-card input:focus {
  outline: none;
  border-color: #064e3b;
  box-shadow: 0 0 0 3px rgba(13, 110, 63, 0.15);
}
.auth-card .btn-primary,
.ea-card .btn-primary,
.auth-panel button[type="submit"] {
  width: 100%;
  padding: 0.7rem 1rem;
  background: #043d2e;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.auth-card .btn-primary:hover {
  background: #0a5a34;
}
.auth-links, .ea-foot {
  text-align: center;
  margin-top: 1.1rem;
  font-size: 0.88rem;
  color: #64748b;
}
.auth-links a, .ea-foot a {
  color: #064e3b;
  font-weight: 600;
  text-decoration: none;
}
.auth-links a:hover, .ea-foot a:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .auth-material-grid {
    grid-template-columns: 1fr !important;
  }
  .auth-left { display: none; }
}


/* 2.91.47 — bold solid colors only (no gradients / soft fills) */
.auth-material { background: #f1f5f9; color: #0f172a; }
.auth-left { background: #064e3b !important; color: #fff !important; }
.auth-right { background: #ffffff !important; }
.auth-legal-strip { background: #083d28 !important; color: #fff !important; }
.auth-material .btn-primary,
.auth-material button[type="submit"],
.auth-material .auth-submit {
  background: #064e3b !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
.auth-material .btn-primary:hover,
.auth-material button[type="submit"]:hover {
  background: #0a5a34 !important;
}
.auth-material .btn-outline {
  background: #fff !important;
  border: 2px solid #064e3b !important;
  color: #064e3b !important;
  font-weight: 700 !important;
}
.auth-material input,
.auth-material select,
.auth-material textarea {
  border: 2px solid #cbd5e1 !important;
  background: #fff !important;
}
.auth-material input:focus,
.auth-material select:focus,
.auth-material textarea:focus {
  border-color: #064e3b !important;
  outline: none !important;
  box-shadow: none !important;
}
.auth-material a { color: #064e3b; font-weight: 700; }
.auth-chip, .auth-badge {
  background: #064e3b !important;
  color: #fff !important;
  border: none !important;
}


/* 2.91.47 — bold solid colors only (no gradients / soft fills) */
.auth-material { background: #f1f5f9; color: #0f172a; }
.auth-left { background: #064e3b !important; color: #fff !important; }
.auth-right { background: #ffffff !important; }
.auth-legal-strip { background: #083d28 !important; color: #fff !important; }
.auth-material .btn-primary,
.auth-material button[type="submit"],
.auth-material .auth-submit {
  background: #064e3b !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
.auth-material .btn-primary:hover,
.auth-material button[type="submit"]:hover {
  background: #0a5a34 !important;
}
.auth-material .btn-outline {
  background: #fff !important;
  border: 2px solid #064e3b !important;
  color: #064e3b !important;
  font-weight: 700 !important;
}
.auth-material input,
.auth-material select,
.auth-material textarea {
  border: 2px solid #cbd5e1 !important;
  background: #fff !important;
}
.auth-material input:focus,
.auth-material select:focus,
.auth-material textarea:focus {
  border-color: #064e3b !important;
  outline: none !important;
  box-shadow: none !important;
}
.auth-material a { color: #064e3b; font-weight: 700; }
.auth-chip, .auth-badge {
  background: #064e3b !important;
  color: #fff !important;
  border: none !important;
}

/* 2.91.52 — auth primary buttons never white */
body.auth-material .btn-primary,
body.auth-material button.btn-primary,
body.auth-material button[type="submit"],
body.auth-material .btn.btn-primary,
body.auth-material a.btn-primary,
body.ea-auth .btn-primary,
body.ea-auth button[type="submit"],
body.ea-auth .btn.btn-primary,
.auth-form-shell .btn-primary,
.auth-form-shell button[type="submit"],
.auth-card .btn-primary,
.ea-card .btn-primary,
.ea-card button[type="submit"],
.login-method-cards .btn-primary,
.login-method-cards button[type="submit"] {
  background: #064e3b !important;
  background-image: none !important;
  color: #ffffff !important;
  border: 2px solid #064e3b !important;
  font-weight: 800 !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
body.auth-material .btn-primary:hover,
body.auth-material button[type="submit"]:hover,
body.ea-auth .btn-primary:hover,
body.ea-auth button[type="submit"]:hover,
.auth-form-shell .btn-primary:hover,
.ea-card .btn-primary:hover {
  background: #0a5a34 !important;
  border-color: #0a5a34 !important;
  color: #fff !important;
}
body.auth-material .btn-outline,
body.ea-auth .btn-outline,
.auth-form-shell .btn-outline {
  background: #ffffff !important;
  color: #064e3b !important;
  border: 2px solid #064e3b !important;
  font-weight: 700 !important;
}
/* solid brand panels */
body.auth-material .auth-left,
body.ea-auth .ea-aside {
  background: #064e3b !important;
  background-image: none !important;
}


/* 2.91.66 — strong dark green auth brand */
.auth-left,
.auth-material .auth-left,
.ea-aside,
.enterprise-auth .ea-aside,
.auth-brand-panel {
  background: #043d2e !important;
  background-image: linear-gradient(165deg, #032a20 0%, #043d2e 40%, #064e3b 100%) !important;
  color: #fff !important;
}
.auth-legal-strip { background: #032a20 !important; }
.btn-primary,
.auth-material .btn-primary,
.ea-btn-primary,
button.btn-primary {
  background: #064e3b !important;
  border-color: #064e3b !important;
  color: #fff !important;
}
.btn-primary:hover,
.ea-btn-primary:hover {
  background: #043d2e !important;
  border-color: #043d2e !important;
  color: #fff !important;
}


/* 2.91.67 — strong DARK green left panel (not mid/accent green) */
body.ea-auth .ea-aside,
body.auth-material .ea-aside,
body.ea-auth aside.ea-aside,
.ea-shell > .ea-aside,
.ea-aside,
.auth-left,
.auth-material .auth-left,
.auth-brand-panel {
  background: #022c22 !important;
  background-color: #022c22 !important;
  background-image: linear-gradient(165deg, #011f18 0%, #022c22 35%, #064e3b 100%) !important;
  color: #f8fafc !important;
}
body.ea-auth .ea-aside::after,
.ea-aside::after {
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.06), transparent 42%),
    radial-gradient(circle at 85% 75%, rgba(6,78,59,.35), transparent 48%) !important;
  opacity: 1 !important;
}
body.ea-auth .ea-aside .ea-panel,
body.ea-auth .ea-aside .ea-panel-soft,
.ea-aside .ea-panel {
  background: rgba(0, 0, 0, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
.auth-legal-strip {
  background: #011f18 !important;
}
