/* ============================================================
   JAMMAL LIBRARY – Authentication Styles
   ============================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-secondary);
}

.auth-header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-background);
}

.auth-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.auth-card .brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
  color: var(--color-primary);
}

.auth-card .brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.auth-card .brand span {
  font-weight: 600;
  font-size: 1.125rem;
}

.auth-card h1 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.auth-sub {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.75rem;
}

.auth-form .form-group {
  margin-bottom: 1.15rem;
}

.password-field {
  position: relative;
}

.password-field .form-input {
  padding-right: 4.5rem;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}

.password-toggle:hover {
  color: var(--color-primary);
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

.auth-options label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--color-text-muted);
}

.auth-options a {
  color: var(--color-accent);
}

.btn-block {
  width: 100%;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.35rem 0;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.btn-google {
  width: 100%;
  background: #fff;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.btn-google:hover {
  background: var(--color-surface);
}

.btn-google svg {
  width: 18px;
  height: 18px;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.auth-footer a {
  color: var(--color-accent);
  font-weight: 500;
}

.guest-link {
  display: block;
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.guest-link a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: underline;
}

/* Alert messages */
.auth-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 1.15rem;
  display: none;
}

.auth-alert.show {
  display: block;
}

.auth-alert.error {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.auth-alert.success {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border: 1px solid #c5d9cc;
}

/* Security question select */
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6b6b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
}
