/* ==========================================================================
   BenueDraws — Authentication Pages Stylesheet
   login.html | register.html | reset-password.html
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page Shell — full-viewport centered layout
   -------------------------------------------------------------------------- */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  background: var(--color-bg, #F8FAFC);
  background-image:
    radial-gradient(ellipse at top, rgba(13, 138, 78, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(245, 158, 11, 0.06) 0%, transparent 45%);
}

.auth-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6, 1.5rem) var(--space-4, 1rem);
  box-sizing: border-box;
}

.auth-container {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6, 1.5rem);
}

/* --------------------------------------------------------------------------
   Auth Card
   -------------------------------------------------------------------------- */
.auth-card {
  width: 100%;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-xl, 16px);
  box-shadow:
    0 1px 2px rgba(11, 21, 40, 0.04),
    0 12px 32px rgba(11, 21, 40, 0.08);
  padding: var(--space-8, 2rem) var(--space-6, 1.5rem);
  box-sizing: border-box;
  text-align: center;
}

@media (min-width: 480px) {
  .auth-card {
    padding: var(--space-10, 2.5rem) var(--space-8, 2rem);
  }
}

/* Top gold accent line on card */
.auth-card::before {
  content: '';
  display: block;
  height: 4px;
  width: 100%;
  margin: calc(-1 * var(--space-8, 2rem)) calc(-1 * var(--space-6, 1.5rem)) var(--space-6, 1.5rem);
  border-radius: var(--radius-xl, 16px) var(--radius-xl, 16px) 0 0;
  background: linear-gradient(90deg, var(--color-primary, #0D8A4E), var(--color-accent, #F59E0B));
}

@media (min-width: 480px) {
  .auth-card::before {
    margin: calc(-1 * var(--space-10, 2.5rem)) calc(-1 * var(--space-8, 2rem)) var(--space-6, 1.5rem);
  }
}

/* --------------------------------------------------------------------------
   Header / Brand
   -------------------------------------------------------------------------- */
.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: var(--space-6, 1.5rem);
}

.auth-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4, 1rem);
  text-decoration: none;
}

.auth-logo-img {
  display: block;
  max-width: 180px;
  height: auto;
}

.auth-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--color-text, #0B1528);
  margin: 0 0 var(--space-2, 0.5rem);
  line-height: 1.25;
}

.auth-subtitle {
  font-size: 0.92rem;
  color: var(--color-text-muted, #64748B);
  margin: 0;
  line-height: 1.55;
  max-width: 320px;
}

/* --------------------------------------------------------------------------
   Form
   -------------------------------------------------------------------------- */
.auth-form {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--space-4, 1rem);
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 0.5rem);
  margin: 0;
}

.auth-form .form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text, #0B1528);
}

.auth-form .form-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border, #CBD5E1);
  border-radius: var(--radius-md, 8px);
  background: var(--color-bg, #F8FAFC);
  color: var(--color-text, #0B1528);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form .form-input:focus {
  outline: none;
  border-color: var(--color-primary, #0D8A4E);
  box-shadow: 0 0 0 3px rgba(13, 138, 78, 0.15);
  background: var(--color-surface, #ffffff);
}

.auth-form .form-input::placeholder {
  color: var(--color-text-muted, #94A3B8);
}

/* Password field with eye toggle */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper .form-input {
  padding-right: 2.75rem;
}

.btn-toggle-password {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.35rem;
  opacity: 0.7;
}

.btn-toggle-password:hover {
  opacity: 1;
}

/* Remember me + forgot password row */
.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3, 0.75rem);
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.remember-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  color: var(--color-text-muted, #64748B);
  font-weight: 500;
  user-select: none;
}

.remember-checkbox-label input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-primary, #0D8A4E);
}

.auth-link-sm {
  color: var(--color-accent, #D97706);
  font-weight: 600;
  text-decoration: none;
}

.auth-link-sm:hover {
  text-decoration: underline;
}

/* Full-width primary button */
.auth-form .btn-block {
  width: 100%;
  margin-top: var(--space-2, 0.5rem);
}

.auth-form .btn-lg {
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 9999px;
}

/* --------------------------------------------------------------------------
   Alert / Message Box
   -------------------------------------------------------------------------- */
.auth-message {
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md, 8px);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-4, 1rem);
  line-height: 1.45;
}

.auth-message.error {
  background: rgba(220, 38, 38, 0.08);
  color: #B91C1C;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.auth-message.success {
  background: rgba(13, 138, 78, 0.08);
  color: #047857;
  border: 1px solid rgba(13, 138, 78, 0.25);
}

.auth-message.info {
  background: rgba(37, 99, 235, 0.08);
  color: #1D4ED8;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

/* --------------------------------------------------------------------------
   Card footer + page footer
   -------------------------------------------------------------------------- */
.auth-card-footer {
  margin-top: var(--space-6, 1.5rem);
  padding-top: var(--space-5, 1.25rem);
  border-top: 1px solid var(--color-border, #e2e8f0);
  text-align: center;
}

.auth-card-footer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted, #64748B);
}

.auth-link {
  color: var(--color-accent, #D97706);
  font-weight: 700;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-page-footer {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2, 0.5rem);
}

.auth-footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2, 0.5rem);
  font-size: 0.85rem;
  color: var(--color-text-muted, #94A3B8);
}

.auth-footer-nav a {
  color: var(--color-text-muted, #64748B);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer-nav a:hover {
  color: var(--color-primary, #0D8A4E);
}

.auth-copyright {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted, #94A3B8);
}

/* --------------------------------------------------------------------------
   Dark mode refinements
   -------------------------------------------------------------------------- */
[data-theme="dark"] .auth-page {
  background-image:
    radial-gradient(ellipse at top, rgba(16, 185, 129, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(245, 158, 11, 0.08) 0%, transparent 45%);
}

[data-theme="dark"] .auth-card {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 12px 32px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .auth-form .form-input {
  background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .auth-form .form-input:focus {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .auth-message.error {
  color: #FCA5A5;
}

[data-theme="dark"] .auth-message.success {
  color: #6EE7B7;
}