/* ===== Auth Modal Styles ===== */

/* Overlay */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal card */
.auth-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 16px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
  padding: 40px 32px 32px;
  font-family: 'Inter', sans-serif;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}

.auth-overlay.active .auth-modal {
  transform: translateY(0) scale(1);
}

/* Close button */
.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f0f2f5;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.auth-modal-close:hover {
  background: #e2e5ea;
}

.auth-modal-close svg {
  width: 16px;
  height: 16px;
  color: #555;
}

/* Title */
.auth-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #0a1854;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}

.auth-modal-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 28px;
}

/* Tabs (Log In / Sign Up toggle) */
.auth-tabs {
  display: flex;
  background: #f0f2f5;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px 0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  background: #fff;
  color: #0a1854;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Form */
.auth-form {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.auth-form.active {
  display: flex;
}

/* Input group */
.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-input-group label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.auth-input-group input {
  width: 100%;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #111;
  background: #f7f8fa;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.auth-input-group input:focus {
  border-color: #2240c4;
  box-shadow: 0 0 0 3px rgba(34, 64, 196, 0.12);
  background: #fff;
}

.auth-input-group input::placeholder {
  color: #9ca3af;
}

/* Submit button */
.auth-submit-btn {
  width: 100%;
  padding: 14px 0;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #1a33a3 0%, #2240c4 50%, #2b50e0 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
  margin-top: 4px;
}

.auth-submit-btn:hover {
  opacity: 0.92;
}

.auth-submit-btn:active {
  transform: scale(0.985);
}

.auth-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Status message */
.auth-message {
  font-size: 13px;
  text-align: center;
  padding: 10px 12px;
  border-radius: 10px;
  display: none;
}

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

.auth-message.success {
  color: #065f46;
  background: #d1fae5;
}

.auth-message.error {
  color: #991b1b;
  background: #fee2e2;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: #9ca3af;
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* Logout button in header */
.simdex-header-btn.logout {
  background: transparent;
  color: #000;
  border: 1.5px solid #e5e7eb;
  display: none;
}

.simdex-header-btn.logout:hover {
  border-color: #c9cdd3;
  background: #f7f8fa;
}

/* Profile icon button in header */
.auth-profile-btn {
  width: 40px;
  height: 40px;
  border: 1.5px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #1f2937;
  margin-right: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.1s ease;
}

.auth-profile-btn svg {
  width: 20px;
  height: 20px;
}

.auth-profile-btn:hover {
  border-color: #c9cdd3;
  background: #f7f8fa;
}

.auth-profile-btn:active {
  transform: scale(0.97);
}

/* Responsive */
@media (max-width: 480px) {
  .auth-modal {
    padding: 32px 20px 24px;
    border-radius: 16px;
  }

  .auth-modal-title {
    font-size: 20px;
  }

  .auth-profile-btn {
    display: none !important;
  }
}
