/* ===== Devise Auth Pages ===== */

.devise-body {
  font-family: 'DM Sans', sans-serif;
  background: #121212 !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.devise-alpha-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.devise-alpha-bar .alert {
  margin: 0;
  border-radius: 0;
}

.devise-glow {
  position: fixed;
  top: -300px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.devise-page {
  width: 100%;
  max-width: 420px;
  padding: 5.5rem 1.25rem 2rem;
  position: relative;
  z-index: 1;
}

/* Brand */
.devise-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.devise-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none !important;
  color: #fff !important;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.devise-logo:hover {
  color: #fff !important;
}

.devise-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #FF6B00, #FF8533);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.95rem;
}

/* Card */
.devise-card {
  background: #1e1e1e !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 16px;
  padding: 2rem;
}

.devise-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff !important;
  text-align: center;
  margin-bottom: 0.5rem;
}

.devise-card-subtitle {
  font-size: 0.9rem;
  color: #777 !important;
  text-align: center;
  margin-bottom: 1.75rem;
}

/* Form elements */
.devise-card .form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #b0b0b0 !important;
  margin-bottom: 0.4rem;
}

.devise-card .form-control {
  background: #252525 !important;
  border: 1px solid #333 !important;
  border-radius: 10px;
  color: #e0e0e0 !important;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.devise-card .form-control:focus {
  border-color: #FF6B00 !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1) !important;
  background: #252525 !important;
}

.devise-card .form-control::placeholder {
  color: #555 !important;
}

.devise-card .form-check-input {
  background-color: #333 !important;
  border-color: #444 !important;
}

.devise-card .form-check-input:checked {
  background-color: #FF6B00 !important;
  border-color: #FF6B00 !important;
}

.devise-card .form-check-label {
  font-size: 0.85rem;
  color: #999 !important;
}

/* Autofill fix */
.devise-card .form-control:-webkit-autofill,
.devise-card .form-control:-webkit-autofill:hover,
.devise-card .form-control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #252525 inset !important;
  -webkit-text-fill-color: #e0e0e0 !important;
  box-shadow: 0 0 0 1000px #252525 inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Submit button */
.devise-submit {
  width: 100%;
  padding: 0.7rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #FF6B00, #FF8533) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.25);
  transition: box-shadow 0.2s, transform 0.2s;
}

.devise-submit:hover {
  box-shadow: 0 6px 25px rgba(255, 107, 0, 0.35) !important;
  transform: translateY(-1px);
  background: linear-gradient(135deg, #FF6B00, #FF8533) !important;
}

/* Links */
.devise-links {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #2a2a2a;
  text-align: center;
}

.devise-links a {
  display: inline-block;
  color: #888 !important;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.2rem 0;
  transition: color 0.2s;
}

.devise-links a:hover {
  color: #FF6B00 !important;
}

.devise-links div + div {
  margin-top: 0.4rem;
}

/* Divider */
.devise-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: #555;
  font-size: 0.8rem;
}

.devise-divider::before,
.devise-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #2a2a2a;
}

.devise-divider span {
  padding: 0 1rem;
}

/* Error messages */
.devise-card #error_explanation {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.devise-card #error_explanation h2 {
  font-size: 0.85rem !important;
  font-weight: 600;
  color: #f87171 !important;
  margin-bottom: 0.5rem;
}

.devise-card #error_explanation ul {
  margin: 0;
  padding-left: 1.25rem;
}

.devise-card #error_explanation li {
  font-size: 0.8rem;
  color: #f87171 !important;
  margin-bottom: 0.15rem;
}

/* Flash messages */
.devise-flash {
  margin-bottom: 1rem;
}

.devise-alert {
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.devise-alert.notice,
.devise-alert.success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #34d399 !important;
}

.devise-alert.alert,
.devise-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(252, 165, 165, 0.35);
  color: #fca5a5 !important;
}

/* Password hint */
.devise-hint {
  font-size: 0.8rem;
  color: #666 !important;
  margin-top: 0.25rem;
}

/* Footer */
.devise-footer {
  text-align: center;
  margin-top: 2rem;
}

.devise-footer p {
  font-size: 0.8rem;
  color: #444 !important;
  margin: 0;
}

/* Responsive */
@media (max-width: 480px) {
  .devise-page {
    padding: 5.5rem 1rem 1.5rem;
  }

  .devise-card {
    padding: 1.5rem;
  }
}
