/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

/* Container & Layout */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

/* Background Decorations */
.login-bg-decoration {
  position: absolute;
  border-radius: 50%;
  opacity: 0.03;
  pointer-events: none;
  background: var(--brand);
  filter: blur(80px);
}

.decoration-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -200px;
}

.decoration-2 {
  width: 500px;
  height: 500px;
  bottom: -150px;
  left: -150px;
}

.decoration-3 {
  width: 400px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Login Card */
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo & Header */
.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-logo {
  display: block;
  margin-bottom: 1.5rem;
  color: var(--brand);
}

.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: "Manrope", sans-serif;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.login-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Form Styles */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  font-family: "Manrope", sans-serif;
}

/* Input Wrapper */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
}

.login-form .input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.9375rem;
  color: var(--text-primary);
  font-family: "Inter", sans-serif;
  transition: all 0.2s ease;
  outline: none;
}

.login-form .input::placeholder {
  color: var(--text-muted);
}

.login-form .input:focus {
  border-color: var(--brand);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 3px rgba(57, 229, 166, 0.1);
}

.login-form .input:hover:not(:focus) {
  border-color: var(--border-hover);
}

/* Password Toggle */
.password-toggle {
  position: absolute;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  color: var(--text-muted);
  padding: 0;
}

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

.password-toggle .eye-icon {
  width: 18px;
  height: 18px;
  transition: opacity 0.2s ease;
}

.password-toggle .eye-open {
  display: none;
  opacity: 0;
}

.password-toggle.visible .eye-closed {
  display: none;
  opacity: 0;
}

.password-toggle.visible .eye-open {
  display: block;
  opacity: 1;
}

/* Form Options */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: -0.5rem;
}

/* Checkbox uses .checkbox from the design system (_inputs.css) */

.forgot-link {
  font-size: 0.875rem;
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.forgot-link:hover {
  opacity: 0.8;
}

/* Submit Button */
.login-button {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--brand);
  color: #09090b;
  border: none;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: "Manrope", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  box-shadow: 0 2px 8px rgba(57, 229, 166, 0.25);
  text-decoration: none;
  text-align: center;
}

.login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(57, 229, 166, 0.35);
}

.login-button:active {
  transform: translateY(0);
}

.button-text {
  flex: 1;
  text-align: center;
}

.button-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Footer */
.login-footer {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.footer-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.footer-link:hover {
  opacity: 0.8;
}

/* Theme Toggle (Floating) */
.theme-toggle-floating {
  position: fixed;
  top: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.theme-toggle-floating:hover {
  background: var(--bg-tertiary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.theme-toggle-floating svg {
  width: 20px;
  height: 20px;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.theme-icon-light {
  display: none;
}

.theme-icon-dark {
  display: block;
}

[data-theme="light"] .theme-icon-light {
  display: block;
}

[data-theme="light"] .theme-icon-dark {
  display: none;
}

/* System preference (no data-theme) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-icon-light {
    display: block;
  }
  :root:not([data-theme]) .theme-icon-dark {
    display: none;
  }
}

/* Success Message */
.success-message {
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 10px;
  color: #22c55e;
  font-size: 0.875rem;
  animation: slideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 0.5rem;
}

.success-message.show {
  display: flex;
}

.success-message svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.success-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.success-title {
  font-weight: 600;
  font-size: 0.9375rem;
}

.success-text {
  font-size: 0.8125rem;
  opacity: 0.9;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Password Strength Indicator */
.password-strength {
  margin-top: 0.5rem;
  display: none;
}

.password-strength.show {
  display: block;
}

.strength-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.375rem;
}

.strength-bar-fill {
  height: 100%;
  width: 0%;
  background: #ef4444;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.strength-bar-fill.weak {
  width: 33%;
  background: #ef4444;
}

.strength-bar-fill.medium {
  width: 66%;
  background: #f59e0b;
}

.strength-bar-fill.strong {
  width: 100%;
  background: #22c55e;
}

.strength-text {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.strength-text.weak {
  color: #ef4444;
}

.strength-text.medium {
  color: #f59e0b;
}

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

/* Inline Links in Text */
.inline-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.inline-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Back to Login Link */
.back-to-login {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 0.5rem 0;
}

.back-to-login:hover {
  color: var(--brand);
  gap: 0.625rem;
}

.back-to-login svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.back-to-login:hover svg {
  transform: translateX(-2px);
}

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

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

  .theme-toggle-floating {
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
  }
}
