/**
 * Authentication Pages Styles
 * Login, Register, Forgot Password
 */

/* Main container */
.auth-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--color-bg-primary);
  position: relative;
  overflow: hidden;
}

.auth-container {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

/* Card */
.auth-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2.5rem;
  position: relative;
}

/* Logo */
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo a {
  display: inline-block;
}

.auth-logo img {
  max-height: 48px;
  width: auto;
}

/* Title */
.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 0.5rem;
  color: var(--color-text-primary);
}

.auth-subtitle {
  font-size: 0.9375rem;
  color: var(--color-text-tertiary);
  text-align: center;
  margin: 0 0 2rem;
}

/* Alerts */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.auth-alert svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.auth-alert ul {
  margin: 0;
  padding-left: 1rem;
}

.auth-alert ul li {
  margin-bottom: 0.25rem;
}

.auth-alert ul li:last-child {
  margin-bottom: 0;
}

.auth-alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.auth-alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

/* Fixed input-wrapper CSS - increased padding and added !important to prevent override */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper > svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-text-tertiary);
  pointer-events: none;
  z-index: 2;
  flex-shrink: 0;
}

.input-wrapper input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem !important;
  padding-left: 2.75rem !important;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.9375rem;
  color: var(--color-text-primary);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-wrapper input::placeholder {
  color: var(--color-text-tertiary);
  opacity: 1;
}

/* Toggle password button */
.toggle-password {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--color-text-tertiary);
  transition: color 0.2s;
  z-index: 2;
}

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

.toggle-password svg {
  position: static;
  width: 18px;
  height: 18px;
}

/* Form row (remember me + forgot) */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Checkbox */
.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.checkbox-wrapper input {
  display: none;
}

.checkbox-wrapper .checkmark {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-top: 1px;
}

.checkbox-wrapper input:checked + .checkmark {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.checkbox-wrapper input:checked + .checkmark::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.checkbox-wrapper a {
  color: var(--color-accent);
  text-decoration: none;
}

.checkbox-wrapper a:hover {
  text-decoration: underline;
}

/* Forgot link */
.forgot-link {
  font-size: 0.875rem;
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
}

.forgot-link:hover {
  text-decoration: underline;
}

/* Buttons */
.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
}

/* Password strength */
.password-strength {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.strength-weak {
  color: #ef4444;
}

.strength-medium {
  color: #f59e0b;
}

.strength-strong {
  color: #22c55e;
}

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

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

.auth-footer a:hover {
  text-decoration: underline;
}

/* Background decoration */
.auth-bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}

.circle-1 {
  width: 600px;
  height: 600px;
  background: var(--color-accent);
  top: -200px;
  right: -200px;
}

.circle-2 {
  width: 400px;
  height: 400px;
  background: #8b5cf6;
  bottom: -100px;
  left: -100px;
}

.circle-3 {
  width: 300px;
  height: 300px;
  background: #06b6d4;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Responsive */
@media (max-width: 480px) {
  .auth-card {
    padding: 1.5rem;
  }

  .auth-title {
    font-size: 1.5rem;
  }

  .form-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
